@tipp/ui 1.5.10 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app/index.cjs +274 -264
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +29 -31
- package/dist/app/platform/coach-question-list.cjs +1 -1
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +4 -4
- package/dist/app/platform/edit-coaching-time.cjs +63 -59
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +12 -14
- package/dist/app/platform/edit-service-type.cjs +2 -1
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +12 -12
- package/dist/app/platform/goal-manage-card-edit.cjs +24 -4
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +12 -12
- package/dist/app/platform/goal-manage-card-read.cjs +10 -8
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +5 -5
- package/dist/app/platform/on-offline-radio-card.cjs +2 -1
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +11 -11
- package/dist/app/platform/report-card.cjs +1 -1
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +4 -4
- package/dist/app/platform/reservation-card.cjs +81 -9
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.d.cts +2 -0
- package/dist/app/platform/reservation-card.d.ts +2 -0
- package/dist/app/platform/reservation-card.js +12 -12
- package/dist/app/platform/session-card.cjs +104 -100
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +14 -16
- package/dist/app/platform/session-review-simple-read.cjs +1 -1
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +4 -4
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs +10 -34
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +9 -9
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs +4 -11
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.d.cts +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.d.ts +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +6 -6
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs +4 -11
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.d.cts +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.d.ts +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +6 -6
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs +4 -12
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.d.cts +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.d.ts +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +5 -5
- package/dist/app/platform/userInfos/session-user-info-detail.cjs +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +6 -6
- package/dist/app/platform/userInfos/utils.cjs +1 -1
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.d.cts +1 -0
- package/dist/app/platform/userInfos/utils.d.ts +1 -0
- package/dist/app/platform/userInfos/utils.js +5 -5
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/drawer.cjs +38 -9
- package/dist/atoms/drawer.cjs.map +1 -1
- package/dist/atoms/drawer.js +2 -1
- package/dist/atoms/index.cjs +24 -2
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.d.cts +1 -1
- package/dist/atoms/index.d.ts +1 -1
- package/dist/atoms/index.js +10 -8
- package/dist/chunk-2MNNK576.js +52 -0
- package/dist/chunk-2MNNK576.js.map +1 -0
- package/dist/chunk-3BDAXSFJ.js +46 -0
- package/dist/chunk-3BDAXSFJ.js.map +1 -0
- package/dist/chunk-3F6KWGBZ.js +89 -0
- package/dist/chunk-3F6KWGBZ.js.map +1 -0
- package/dist/chunk-4DHKHART.js +177 -0
- package/dist/chunk-4DHKHART.js.map +1 -0
- package/dist/chunk-4VVKVY67.js +45 -0
- package/dist/chunk-4VVKVY67.js.map +1 -0
- package/dist/chunk-55BS56C7.js +165 -0
- package/dist/chunk-55BS56C7.js.map +1 -0
- package/dist/chunk-5QTFO46W.js +177 -0
- package/dist/chunk-5QTFO46W.js.map +1 -0
- package/dist/chunk-5QXQPRW7.js +89 -0
- package/dist/chunk-5QXQPRW7.js.map +1 -0
- package/dist/chunk-643OBFGH.js +145 -0
- package/dist/chunk-643OBFGH.js.map +1 -0
- package/dist/chunk-6LNT56PI.js +30 -0
- package/dist/chunk-6LNT56PI.js.map +1 -0
- package/dist/chunk-6NK4TENV.js +244 -0
- package/dist/chunk-6NK4TENV.js.map +1 -0
- package/dist/chunk-6RTDC4IZ.js +145 -0
- package/dist/chunk-6RTDC4IZ.js.map +1 -0
- package/dist/chunk-7HTPOEYY.js +60 -0
- package/dist/chunk-7HTPOEYY.js.map +1 -0
- package/dist/chunk-7QSHSKGH.js +250 -0
- package/dist/chunk-7QSHSKGH.js.map +1 -0
- package/dist/chunk-7XPVJ35J.js +177 -0
- package/dist/chunk-7XPVJ35J.js.map +1 -0
- package/dist/chunk-AEM57IUZ.js +145 -0
- package/dist/chunk-AEM57IUZ.js.map +1 -0
- package/dist/chunk-BN23HSLB.js +145 -0
- package/dist/chunk-BN23HSLB.js.map +1 -0
- package/dist/chunk-BSDY5S2S.js +177 -0
- package/dist/chunk-BSDY5S2S.js.map +1 -0
- package/dist/chunk-BXSGWGPX.js +51 -0
- package/dist/chunk-BXSGWGPX.js.map +1 -0
- package/dist/chunk-C54BNXQ3.js +174 -0
- package/dist/chunk-C54BNXQ3.js.map +1 -0
- package/dist/chunk-DAAG2ECN.js +145 -0
- package/dist/chunk-DAAG2ECN.js.map +1 -0
- package/dist/chunk-DEC74YZM.js +277 -0
- package/dist/chunk-DEC74YZM.js.map +1 -0
- package/dist/chunk-EDGXK4S3.js +30 -0
- package/dist/chunk-EDGXK4S3.js.map +1 -0
- package/dist/chunk-EPHO2NHY.js +165 -0
- package/dist/chunk-EPHO2NHY.js.map +1 -0
- package/dist/chunk-FLHTCZJ6.js +145 -0
- package/dist/chunk-FLHTCZJ6.js.map +1 -0
- package/dist/chunk-FYMXBVJN.js +163 -0
- package/dist/chunk-FYMXBVJN.js.map +1 -0
- package/dist/chunk-G4HAO2PO.js +145 -0
- package/dist/chunk-G4HAO2PO.js.map +1 -0
- package/dist/chunk-GWJPOXZB.js +145 -0
- package/dist/chunk-GWJPOXZB.js.map +1 -0
- package/dist/chunk-GWV7ZQS7.js +165 -0
- package/dist/chunk-GWV7ZQS7.js.map +1 -0
- package/dist/chunk-HAXSZIZN.js +174 -0
- package/dist/chunk-HAXSZIZN.js.map +1 -0
- package/dist/chunk-HVKX7LGP.js +63 -0
- package/dist/chunk-HVKX7LGP.js.map +1 -0
- package/dist/chunk-HW5TXRPH.js +51 -0
- package/dist/chunk-HW5TXRPH.js.map +1 -0
- package/dist/chunk-HXUZQJQY.js +60 -0
- package/dist/chunk-HXUZQJQY.js.map +1 -0
- package/dist/chunk-I5NKXTH5.js +63 -0
- package/dist/chunk-I5NKXTH5.js.map +1 -0
- package/dist/chunk-ID5SXFYY.js +277 -0
- package/dist/chunk-ID5SXFYY.js.map +1 -0
- package/dist/chunk-JFAEGRYZ.js +145 -0
- package/dist/chunk-JFAEGRYZ.js.map +1 -0
- package/dist/chunk-JHZGOPC4.js +104 -0
- package/dist/chunk-JHZGOPC4.js.map +1 -0
- package/dist/chunk-KEVIRRIU.js +250 -0
- package/dist/chunk-KEVIRRIU.js.map +1 -0
- package/dist/chunk-KWVMO7QA.js +145 -0
- package/dist/chunk-KWVMO7QA.js.map +1 -0
- package/dist/chunk-KZQALSCC.js +277 -0
- package/dist/chunk-KZQALSCC.js.map +1 -0
- package/dist/chunk-LSZ6443S.js +250 -0
- package/dist/chunk-LSZ6443S.js.map +1 -0
- package/dist/chunk-MEVO4WQM.js +163 -0
- package/dist/chunk-MEVO4WQM.js.map +1 -0
- package/dist/chunk-MR7H7IVE.js +192 -0
- package/dist/chunk-MR7H7IVE.js.map +1 -0
- package/dist/chunk-NCAJKLJL.js +277 -0
- package/dist/chunk-NCAJKLJL.js.map +1 -0
- package/dist/chunk-NOU2SQ3S.js +145 -0
- package/dist/chunk-NOU2SQ3S.js.map +1 -0
- package/dist/chunk-NTS2GASQ.js +30 -0
- package/dist/chunk-NTS2GASQ.js.map +1 -0
- package/dist/chunk-OCCR3BYX.js +145 -0
- package/dist/chunk-OCCR3BYX.js.map +1 -0
- package/dist/chunk-P3IQELLW.js +103 -0
- package/dist/chunk-P3IQELLW.js.map +1 -0
- package/dist/chunk-P7MEVIA2.js +177 -0
- package/dist/chunk-P7MEVIA2.js.map +1 -0
- package/dist/chunk-PM2MEPSY.js +145 -0
- package/dist/chunk-PM2MEPSY.js.map +1 -0
- package/dist/chunk-PYR4SVP5.js +146 -0
- package/dist/chunk-PYR4SVP5.js.map +1 -0
- package/dist/chunk-Q4B4TVV6.js +52 -0
- package/dist/chunk-Q4B4TVV6.js.map +1 -0
- package/dist/chunk-Q76YER7W.js +177 -0
- package/dist/chunk-Q76YER7W.js.map +1 -0
- package/dist/chunk-QW3Q5PDH.js +250 -0
- package/dist/chunk-QW3Q5PDH.js.map +1 -0
- package/dist/chunk-RSCMNIHH.js +165 -0
- package/dist/chunk-RSCMNIHH.js.map +1 -0
- package/dist/chunk-RZDYA4LT.js +174 -0
- package/dist/chunk-RZDYA4LT.js.map +1 -0
- package/dist/chunk-S3F7WBI2.js +45 -0
- package/dist/chunk-S3F7WBI2.js.map +1 -0
- package/dist/chunk-SDY76VWM.js +145 -0
- package/dist/chunk-SDY76VWM.js.map +1 -0
- package/dist/chunk-SNL4BT3L.js +249 -0
- package/dist/chunk-SNL4BT3L.js.map +1 -0
- package/dist/chunk-T24Z37LZ.js +51 -0
- package/dist/chunk-T24Z37LZ.js.map +1 -0
- package/dist/chunk-TDRNTGNE.js +164 -0
- package/dist/chunk-TDRNTGNE.js.map +1 -0
- package/dist/chunk-TU453YST.js +63 -0
- package/dist/chunk-TU453YST.js.map +1 -0
- package/dist/chunk-UTBSTESQ.js +30 -0
- package/dist/chunk-UTBSTESQ.js.map +1 -0
- package/dist/chunk-VF5Q4NSV.js +174 -0
- package/dist/chunk-VF5Q4NSV.js.map +1 -0
- package/dist/chunk-VIOAD7BY.js +145 -0
- package/dist/chunk-VIOAD7BY.js.map +1 -0
- package/dist/chunk-VKXZLSWB.js +249 -0
- package/dist/chunk-VKXZLSWB.js.map +1 -0
- package/dist/chunk-VVZ6M3AZ.js +145 -0
- package/dist/chunk-VVZ6M3AZ.js.map +1 -0
- package/dist/chunk-WHPYQRMZ.js +145 -0
- package/dist/chunk-WHPYQRMZ.js.map +1 -0
- package/dist/chunk-WNSDISYV.js +54 -0
- package/dist/chunk-WNSDISYV.js.map +1 -0
- package/dist/chunk-X7RBL443.js +145 -0
- package/dist/chunk-X7RBL443.js.map +1 -0
- package/dist/chunk-XM5HV4U7.js +145 -0
- package/dist/chunk-XM5HV4U7.js.map +1 -0
- package/dist/chunk-XY5462PL.js +277 -0
- package/dist/chunk-XY5462PL.js.map +1 -0
- package/dist/chunk-YDPVHTY2.js +163 -0
- package/dist/chunk-YDPVHTY2.js.map +1 -0
- package/dist/chunk-ZILPOC5V.js +277 -0
- package/dist/chunk-ZILPOC5V.js.map +1 -0
- package/dist/index.cjs +261 -250
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +48 -51
- package/dist/layouts/index.cjs.map +1 -1
- package/dist/layouts/index.js +26 -26
- package/dist/layouts/response-display.cjs.map +1 -1
- package/dist/layouts/response-display.js +26 -26
- package/dist/molecules/date-picker/date-picker-button.cjs +1 -1
- package/dist/molecules/date-picker/date-picker-button.cjs.map +1 -1
- package/dist/molecules/date-picker/date-picker-button.js +4 -4
- package/dist/molecules/expand-table/index.cjs +1 -1
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.js +4 -4
- package/dist/molecules/expand-table/row.cjs +1 -1
- package/dist/molecules/expand-table/row.cjs.map +1 -1
- package/dist/molecules/expand-table/row.js +4 -4
- package/dist/molecules/form/form.cjs +251 -0
- package/dist/molecules/form/form.cjs.map +1 -0
- package/dist/molecules/form/form.d.cts +33 -0
- package/dist/molecules/form/form.d.ts +33 -0
- package/dist/molecules/form/form.js +12 -0
- package/dist/molecules/form/form.js.map +1 -0
- package/dist/molecules/form/index.cjs +253 -0
- package/dist/molecules/form/index.cjs.map +1 -0
- package/dist/molecules/form/index.d.cts +3 -0
- package/dist/molecules/form/index.d.ts +3 -0
- package/dist/molecules/form/index.js +12 -0
- package/dist/molecules/form/index.js.map +1 -0
- package/dist/molecules/index.cjs +27 -4
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +15 -15
- package/dist/molecules/navigation.cjs +1 -1
- package/dist/molecules/navigation.cjs.map +1 -1
- package/dist/molecules/navigation.js +4 -4
- package/dist/molecules/radio-button-card.cjs +1 -1
- package/dist/molecules/radio-button-card.cjs.map +1 -1
- package/dist/molecules/radio-button-card.js +4 -4
- package/dist/molecules/tag-selector.cjs +1 -1
- package/dist/molecules/tag-selector.cjs.map +1 -1
- package/dist/molecules/tag-selector.js +4 -4
- package/dist/molecules/time-select.cjs +27 -4
- package/dist/molecules/time-select.cjs.map +1 -1
- package/dist/molecules/time-select.d.cts +6 -1
- package/dist/molecules/time-select.d.ts +6 -1
- package/dist/molecules/time-select.js +7 -7
- package/dist/utils/index.js +6 -6
- package/package.json +1 -1
- package/src/app/platform/edit-coaching-time.tsx +3 -2
- package/src/app/platform/goal-manage-card-read.tsx +10 -7
- package/src/app/platform/reservation-card.tsx +39 -2
- package/src/app/platform/userInfos/coaching-customer-info/large.tsx +3 -15
- package/src/app/platform/userInfos/coaching-customer-info/medium.tsx +3 -15
- package/src/app/platform/userInfos/coaching-customer-info/small.tsx +4 -18
- package/src/app/platform/userInfos/utils.tsx +1 -0
- package/src/atoms/drawer.tsx +2 -0
- package/src/atoms/index.ts +1 -1
- package/src/index.ts +0 -1
- package/src/molecules/{form.tsx → form/form.tsx} +32 -6
- package/src/molecules/form/index.ts +1 -0
- package/src/molecules/time-select.tsx +37 -6
- package/src/layouts/index.ts +0 -1
- package/src/layouts/response-display.tsx +0 -62
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import * as RadixForm from '@radix-ui/react-form';
|
|
3
|
+
|
|
4
|
+
type FormFieldProps = RadixForm.FormFieldProps & {
|
|
5
|
+
required?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type FormLabelProps = RadixForm.FormLabelProps & {
|
|
8
|
+
/** label의 타입을 지정 */
|
|
9
|
+
variant?: 'title' | 'body' | 'caption';
|
|
10
|
+
};
|
|
11
|
+
interface FormItemProps extends FormFieldProps {
|
|
12
|
+
children: React.ReactElement;
|
|
13
|
+
label: string;
|
|
14
|
+
labelVariant?: FormLabelProps['variant'];
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
}
|
|
17
|
+
declare function FormItem({ label, labelVariant, children, errorMessage, ...fieldProps }: FormItemProps): React.JSX.Element;
|
|
18
|
+
declare const Form: {
|
|
19
|
+
Root: React$1.ForwardRefExoticComponent<RadixForm.FormProps & React$1.RefAttributes<HTMLFormElement>>;
|
|
20
|
+
Field: React$1.ForwardRefExoticComponent<RadixForm.FormFieldProps & {
|
|
21
|
+
required?: boolean | undefined;
|
|
22
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Label: React$1.ForwardRefExoticComponent<RadixForm.FormLabelProps & {
|
|
24
|
+
/** label의 타입을 지정 */
|
|
25
|
+
variant?: "body" | "caption" | "title" | undefined;
|
|
26
|
+
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
27
|
+
Message: React$1.ForwardRefExoticComponent<RadixForm.FormMessageProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
Control: React$1.ForwardRefExoticComponent<RadixForm.FormControlProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
Submit: React$1.ForwardRefExoticComponent<RadixForm.FormSubmitProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
FormItem: typeof FormItem;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { Form, type FormFieldProps, FormItem, type FormLabelProps };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
2
|
+
import * as RadixForm from '@radix-ui/react-form';
|
|
3
|
+
|
|
4
|
+
type FormFieldProps = RadixForm.FormFieldProps & {
|
|
5
|
+
required?: boolean;
|
|
6
|
+
};
|
|
7
|
+
type FormLabelProps = RadixForm.FormLabelProps & {
|
|
8
|
+
/** label의 타입을 지정 */
|
|
9
|
+
variant?: 'title' | 'body' | 'caption';
|
|
10
|
+
};
|
|
11
|
+
interface FormItemProps extends FormFieldProps {
|
|
12
|
+
children: React.ReactElement;
|
|
13
|
+
label: string;
|
|
14
|
+
labelVariant?: FormLabelProps['variant'];
|
|
15
|
+
errorMessage?: string;
|
|
16
|
+
}
|
|
17
|
+
declare function FormItem({ label, labelVariant, children, errorMessage, ...fieldProps }: FormItemProps): React.JSX.Element;
|
|
18
|
+
declare const Form: {
|
|
19
|
+
Root: React$1.ForwardRefExoticComponent<RadixForm.FormProps & React$1.RefAttributes<HTMLFormElement>>;
|
|
20
|
+
Field: React$1.ForwardRefExoticComponent<RadixForm.FormFieldProps & {
|
|
21
|
+
required?: boolean | undefined;
|
|
22
|
+
} & React$1.RefAttributes<HTMLDivElement>>;
|
|
23
|
+
Label: React$1.ForwardRefExoticComponent<RadixForm.FormLabelProps & {
|
|
24
|
+
/** label의 타입을 지정 */
|
|
25
|
+
variant?: "body" | "caption" | "title" | undefined;
|
|
26
|
+
} & React$1.RefAttributes<HTMLLabelElement>>;
|
|
27
|
+
Message: React$1.ForwardRefExoticComponent<RadixForm.FormMessageProps & React$1.RefAttributes<HTMLSpanElement>>;
|
|
28
|
+
Control: React$1.ForwardRefExoticComponent<RadixForm.FormControlProps & React$1.RefAttributes<HTMLInputElement>>;
|
|
29
|
+
Submit: React$1.ForwardRefExoticComponent<RadixForm.FormSubmitProps & React$1.RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
FormItem: typeof FormItem;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export { Form, type FormFieldProps, FormItem, type FormLabelProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __defProps = Object.defineProperties;
|
|
5
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
6
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
7
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
9
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
10
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
11
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
12
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
13
|
+
var __spreadValues = (a, b) => {
|
|
14
|
+
for (var prop in b || (b = {}))
|
|
15
|
+
if (__hasOwnProp.call(b, prop))
|
|
16
|
+
__defNormalProp(a, prop, b[prop]);
|
|
17
|
+
if (__getOwnPropSymbols)
|
|
18
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
19
|
+
if (__propIsEnum.call(b, prop))
|
|
20
|
+
__defNormalProp(a, prop, b[prop]);
|
|
21
|
+
}
|
|
22
|
+
return a;
|
|
23
|
+
};
|
|
24
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
25
|
+
var __objRest = (source, exclude) => {
|
|
26
|
+
var target = {};
|
|
27
|
+
for (var prop in source)
|
|
28
|
+
if (__hasOwnProp.call(source, prop) && exclude.indexOf(prop) < 0)
|
|
29
|
+
target[prop] = source[prop];
|
|
30
|
+
if (source != null && __getOwnPropSymbols)
|
|
31
|
+
for (var prop of __getOwnPropSymbols(source)) {
|
|
32
|
+
if (exclude.indexOf(prop) < 0 && __propIsEnum.call(source, prop))
|
|
33
|
+
target[prop] = source[prop];
|
|
34
|
+
}
|
|
35
|
+
return target;
|
|
36
|
+
};
|
|
37
|
+
var __export = (target, all) => {
|
|
38
|
+
for (var name in all)
|
|
39
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
40
|
+
};
|
|
41
|
+
var __copyProps = (to, from, except, desc) => {
|
|
42
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
43
|
+
for (let key of __getOwnPropNames(from))
|
|
44
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
45
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
46
|
+
}
|
|
47
|
+
return to;
|
|
48
|
+
};
|
|
49
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
50
|
+
// If the importer is in node compatibility mode or this is not an ESM
|
|
51
|
+
// file that has been converted to a CommonJS file using a Babel-
|
|
52
|
+
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
53
|
+
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
54
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
55
|
+
mod
|
|
56
|
+
));
|
|
57
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
58
|
+
|
|
59
|
+
// src/molecules/form/index.ts
|
|
60
|
+
var form_exports = {};
|
|
61
|
+
__export(form_exports, {
|
|
62
|
+
Form: () => Form,
|
|
63
|
+
FormItem: () => FormItem
|
|
64
|
+
});
|
|
65
|
+
module.exports = __toCommonJS(form_exports);
|
|
66
|
+
|
|
67
|
+
// src/molecules/form/form.tsx
|
|
68
|
+
var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
|
|
69
|
+
var import_react3 = require("react");
|
|
70
|
+
|
|
71
|
+
// src/atoms/heading.tsx
|
|
72
|
+
var import_themes = require("@radix-ui/themes");
|
|
73
|
+
var import_react = require("react");
|
|
74
|
+
var import_themes2 = require("@radix-ui/themes");
|
|
75
|
+
var import_jsx_runtime = require("react/jsx-runtime");
|
|
76
|
+
function Heading2(props) {
|
|
77
|
+
const _a = props, { size, children, variant } = _a, rest = __objRest(_a, ["size", "children", "variant"]);
|
|
78
|
+
const radixSize = (0, import_react.useMemo)(() => {
|
|
79
|
+
switch (variant) {
|
|
80
|
+
case "heading1":
|
|
81
|
+
return "7";
|
|
82
|
+
case "heading2":
|
|
83
|
+
return "6";
|
|
84
|
+
case "heading3":
|
|
85
|
+
return "5";
|
|
86
|
+
case "heading4":
|
|
87
|
+
return "4";
|
|
88
|
+
case "heading5":
|
|
89
|
+
return "3";
|
|
90
|
+
default:
|
|
91
|
+
return size;
|
|
92
|
+
}
|
|
93
|
+
}, [size, variant]);
|
|
94
|
+
return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_themes.Heading, __spreadProps(__spreadValues({}, rest), { size: radixSize, children }));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// src/atoms/typo.tsx
|
|
98
|
+
var import_themes3 = require("@radix-ui/themes");
|
|
99
|
+
var import_react2 = require("react");
|
|
100
|
+
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
101
|
+
var Typo = (0, import_react2.forwardRef)(
|
|
102
|
+
(props, ref) => {
|
|
103
|
+
const _a = props, { size, variant, children } = _a, rest = __objRest(_a, ["size", "variant", "children"]);
|
|
104
|
+
const radixSize = (0, import_react2.useMemo)(() => {
|
|
105
|
+
if (size !== void 0)
|
|
106
|
+
return size;
|
|
107
|
+
switch (variant) {
|
|
108
|
+
case "caption":
|
|
109
|
+
return "1";
|
|
110
|
+
case "subtitle":
|
|
111
|
+
return "3";
|
|
112
|
+
case "body":
|
|
113
|
+
default:
|
|
114
|
+
return "2";
|
|
115
|
+
}
|
|
116
|
+
}, [size, variant]);
|
|
117
|
+
return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_themes3.Text, __spreadProps(__spreadValues({}, rest), { ref, size: radixSize, children }));
|
|
118
|
+
}
|
|
119
|
+
);
|
|
120
|
+
Typo.displayName = "Typo";
|
|
121
|
+
|
|
122
|
+
// src/molecules/form/form.tsx
|
|
123
|
+
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
124
|
+
var Root2 = (0, import_react3.forwardRef)(
|
|
125
|
+
(_a, ref) => {
|
|
126
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
127
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
128
|
+
RadixForm.Root,
|
|
129
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
130
|
+
className: `FormRoot ${className || ""}`,
|
|
131
|
+
ref,
|
|
132
|
+
children
|
|
133
|
+
})
|
|
134
|
+
);
|
|
135
|
+
}
|
|
136
|
+
);
|
|
137
|
+
Root2.displayName = "FORM_ROOT";
|
|
138
|
+
var FieldContext = (0, import_react3.createContext)({
|
|
139
|
+
name: ""
|
|
140
|
+
});
|
|
141
|
+
var Field2 = (0, import_react3.forwardRef)(
|
|
142
|
+
(_a, ref) => {
|
|
143
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
144
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
145
|
+
RadixForm.Field,
|
|
146
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
147
|
+
className: `FormField ${className || ""}`,
|
|
148
|
+
ref,
|
|
149
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(FieldContext.Provider, { value: rest, children })
|
|
150
|
+
})
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
Field2.displayName = "FORM_FIELD";
|
|
155
|
+
function HeadingLabel(props) {
|
|
156
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Heading2, __spreadProps(__spreadValues({ variant: "heading5" }, props), { children: props.children }));
|
|
157
|
+
}
|
|
158
|
+
function CaptionLabel(props) {
|
|
159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Typo, __spreadProps(__spreadValues({ color: "gray", variant: "caption" }, props), { children: props.children }));
|
|
160
|
+
}
|
|
161
|
+
var Label2 = (0, import_react3.forwardRef)(
|
|
162
|
+
(_a, ref) => {
|
|
163
|
+
var _b = _a, { children, className, variant } = _b, rest = __objRest(_b, ["children", "className", "variant"]);
|
|
164
|
+
const Comp = (0, import_react3.useMemo)(() => {
|
|
165
|
+
switch (variant) {
|
|
166
|
+
case "title":
|
|
167
|
+
return HeadingLabel;
|
|
168
|
+
case "caption":
|
|
169
|
+
return CaptionLabel;
|
|
170
|
+
case "body":
|
|
171
|
+
default:
|
|
172
|
+
return Typo;
|
|
173
|
+
}
|
|
174
|
+
}, [variant]);
|
|
175
|
+
const fieldProps = (0, import_react3.useContext)(FieldContext);
|
|
176
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
177
|
+
RadixForm.Label,
|
|
178
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
179
|
+
asChild: true,
|
|
180
|
+
className: `FormLabel ${className || ""}`,
|
|
181
|
+
ref,
|
|
182
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Comp, { children: [
|
|
183
|
+
children,
|
|
184
|
+
fieldProps.required ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Typo, { as: "span", color: "tomato", children: ` *` }) : null
|
|
185
|
+
] })
|
|
186
|
+
})
|
|
187
|
+
);
|
|
188
|
+
}
|
|
189
|
+
);
|
|
190
|
+
Label2.displayName = "FORM_Label";
|
|
191
|
+
var Message2 = (0, import_react3.forwardRef)(
|
|
192
|
+
(_a, ref) => {
|
|
193
|
+
var _b = _a, { children, className } = _b, rest = __objRest(_b, ["children", "className"]);
|
|
194
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
195
|
+
RadixForm.Message,
|
|
196
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
197
|
+
asChild: true,
|
|
198
|
+
className: `FormMessage ${className || ""}`,
|
|
199
|
+
ref,
|
|
200
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Typo, { color: "red", children })
|
|
201
|
+
})
|
|
202
|
+
);
|
|
203
|
+
}
|
|
204
|
+
);
|
|
205
|
+
Message2.displayName = "FORM_Message";
|
|
206
|
+
var Control2 = (0, import_react3.forwardRef)(
|
|
207
|
+
(_a, ref) => {
|
|
208
|
+
var _b = _a, { className } = _b, rest = __objRest(_b, ["className"]);
|
|
209
|
+
const fieldProps = (0, import_react3.useContext)(FieldContext);
|
|
210
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
211
|
+
RadixForm.Control,
|
|
212
|
+
__spreadProps(__spreadValues({}, rest), {
|
|
213
|
+
className: `FormControl ${className || ""}`,
|
|
214
|
+
ref,
|
|
215
|
+
required: fieldProps.required
|
|
216
|
+
})
|
|
217
|
+
);
|
|
218
|
+
}
|
|
219
|
+
);
|
|
220
|
+
Control2.displayName = "FORM_Control";
|
|
221
|
+
function FormItem(_a) {
|
|
222
|
+
var _b = _a, {
|
|
223
|
+
label,
|
|
224
|
+
labelVariant,
|
|
225
|
+
children,
|
|
226
|
+
errorMessage
|
|
227
|
+
} = _b, fieldProps = __objRest(_b, [
|
|
228
|
+
"label",
|
|
229
|
+
"labelVariant",
|
|
230
|
+
"children",
|
|
231
|
+
"errorMessage"
|
|
232
|
+
]);
|
|
233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Form.Field, __spreadProps(__spreadValues({}, fieldProps), { children: [
|
|
234
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Form.Label, { variant: labelVariant, children: label }),
|
|
235
|
+
children,
|
|
236
|
+
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Form.Message, { forceMatch: Boolean(errorMessage), children: errorMessage })
|
|
237
|
+
] }));
|
|
238
|
+
}
|
|
239
|
+
var Form = {
|
|
240
|
+
Root: Root2,
|
|
241
|
+
Field: Field2,
|
|
242
|
+
Label: Label2,
|
|
243
|
+
Message: Message2,
|
|
244
|
+
Control: RadixForm.Control,
|
|
245
|
+
Submit: RadixForm.Submit,
|
|
246
|
+
FormItem
|
|
247
|
+
};
|
|
248
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
249
|
+
0 && (module.exports = {
|
|
250
|
+
Form,
|
|
251
|
+
FormItem
|
|
252
|
+
});
|
|
253
|
+
//# sourceMappingURL=index.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/molecules/form/index.ts","../../../src/molecules/form/form.tsx","../../../src/atoms/heading.tsx","../../../src/atoms/typo.tsx"],"sourcesContent":["export * from './form';\n","import * as RadixForm from '@radix-ui/react-form';\nimport { createContext, forwardRef, useContext, useMemo } from 'react';\nimport type { HeadingProps } from '@radix-ui/themes';\nimport { Heading } from '../../atoms/heading';\nimport type { TypoProps } from '../../atoms/typo';\nimport { Typo } from '../../atoms/typo';\n\nconst Root = forwardRef<HTMLFormElement, RadixForm.FormProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <RadixForm.Root\n {...rest}\n className={`FormRoot ${className || ''}`}\n ref={ref}\n >\n {children}\n </RadixForm.Root>\n );\n }\n);\n\nRoot.displayName = 'FORM_ROOT';\n\nexport type FormFieldProps = RadixForm.FormFieldProps & { required?: boolean };\n\nconst FieldContext = createContext<FormFieldProps>({\n name: '',\n});\n\nconst Field = forwardRef<HTMLDivElement, FormFieldProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <RadixForm.Field\n {...rest}\n className={`FormField ${className || ''}`}\n ref={ref}\n >\n <FieldContext.Provider value={rest}>{children}</FieldContext.Provider>\n </RadixForm.Field>\n );\n }\n);\nField.displayName = 'FORM_FIELD';\n\nexport type FormLabelProps = RadixForm.FormLabelProps & {\n /** label의 타입을 지정 */\n variant?: 'title' | 'body' | 'caption';\n};\n\nfunction HeadingLabel(props: HeadingProps): React.ReactElement {\n return (\n <Heading variant=\"heading5\" {...props}>\n {props.children}\n </Heading>\n );\n}\n\nfunction CaptionLabel(props: TypoProps): React.ReactElement {\n return (\n <Typo color=\"gray\" variant=\"caption\" {...props}>\n {props.children}\n </Typo>\n );\n}\n\nconst Label = forwardRef<HTMLLabelElement, FormLabelProps>(\n ({ children, className, variant, ...rest }, ref) => {\n const Comp = useMemo(() => {\n switch (variant) {\n case 'title':\n return HeadingLabel;\n case 'caption':\n return CaptionLabel;\n case 'body':\n default:\n return Typo;\n }\n }, [variant]);\n\n const fieldProps = useContext(FieldContext);\n return (\n <RadixForm.Label\n {...rest}\n asChild\n className={`FormLabel ${className || ''}`}\n ref={ref}\n >\n <Comp>\n {children}\n {fieldProps.required ? (\n <Typo as=\"span\" color=\"tomato\">\n {` *`}\n </Typo>\n ) : null}\n </Comp>\n </RadixForm.Label>\n );\n }\n);\nLabel.displayName = 'FORM_Label';\n\nconst Message = forwardRef<HTMLSpanElement, RadixForm.FormMessageProps>(\n ({ children, className, ...rest }, ref) => {\n return (\n <RadixForm.Message\n {...rest}\n asChild\n className={`FormMessage ${className || ''}`}\n ref={ref}\n >\n <Typo color=\"red\">{children}</Typo>\n </RadixForm.Message>\n );\n }\n);\nMessage.displayName = 'FORM_Message';\n\ntype ControlProps = Omit<RadixForm.FormControlProps, 'required'>;\nconst Control = forwardRef<HTMLInputElement, ControlProps>(\n ({ className, ...rest }, ref) => {\n const fieldProps = useContext(FieldContext);\n return (\n <RadixForm.Control\n {...rest}\n className={`FormControl ${className || ''}`}\n ref={ref}\n required={fieldProps.required}\n />\n );\n }\n);\nControl.displayName = 'FORM_Control';\n\ninterface FormItemProps extends FormFieldProps {\n children: React.ReactElement;\n label: string;\n labelVariant?: FormLabelProps['variant'];\n errorMessage?: string;\n}\n\nexport function FormItem({\n label,\n labelVariant,\n children,\n errorMessage,\n ...fieldProps\n}: FormItemProps): React.JSX.Element {\n return (\n <Form.Field {...fieldProps}>\n <Form.Label variant={labelVariant}>{label}</Form.Label>\n {children}\n <Form.Message forceMatch={Boolean(errorMessage)}>\n {errorMessage}\n </Form.Message>\n </Form.Field>\n );\n}\n\nexport const Form = {\n Root,\n Field,\n Label,\n Message,\n Control: RadixForm.Control,\n Submit: RadixForm.Submit,\n FormItem,\n};\n","import {\n Heading as RadixHeading,\n type HeadingProps as RadixHeadingProps,\n} from '@radix-ui/themes';\nimport { useMemo } from 'react';\n\nexport { Heading as RadixHeading } from '@radix-ui/themes';\n\nexport type HeadingProps = RadixHeadingProps & {\n variant?: 'heading1' | 'heading2' | 'heading3' | 'heading4' | 'heading5';\n};\n\nexport function Heading(props: HeadingProps): React.ReactElement {\n const { size, children, variant, ...rest } = props;\n const radixSize = useMemo<RadixHeadingProps['size']>(() => {\n switch (variant) {\n case 'heading1':\n return '7';\n case 'heading2':\n return '6';\n case 'heading3':\n return '5';\n case 'heading4':\n return '4';\n case 'heading5':\n return '3';\n default:\n return size;\n }\n }, [size, variant]);\n\n return (\n <RadixHeading {...rest} size={radixSize}>\n {children}\n </RadixHeading>\n );\n}\n","import type { TextProps as RadixTextProps } from '@radix-ui/themes';\nimport { Text as RadixText } from '@radix-ui/themes';\nimport React, { useMemo, forwardRef } from 'react';\n\nexport type TypoProps = RadixTextProps & {\n variant?: 'body' | 'caption' | 'subtitle';\n};\n\nexport const Typo = forwardRef<HTMLSpanElement, TypoProps>(\n (props: TypoProps, ref): React.ReactElement => {\n const { size, variant, children, ...rest } = props;\n\n const radixSize = useMemo<RadixTextProps['size']>(() => {\n if (size !== undefined) return size;\n switch (variant) {\n case 'caption':\n return '1';\n case 'subtitle':\n return '3';\n case 'body':\n default:\n return '2';\n }\n }, [size, variant]);\n\n return (\n <RadixText {...rest} ref={ref} size={radixSize}>\n {children}\n </RadixText>\n );\n }\n);\n\nTypo.displayName = 'Typo';\n"],"mappings":"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","names":["import_react","import_themes","Heading","RadixHeading","import_themes","import_react","import_jsx_runtime","RadixText","import_jsx_runtime","Root","Field","Heading","Label","Message","Control"]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/molecules/index.cjs
CHANGED
|
@@ -795,7 +795,7 @@ ClosePanelArrowIcon.displayName = "ArrowDownIcon";
|
|
|
795
795
|
// src/atoms/drawer.tsx
|
|
796
796
|
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
797
797
|
|
|
798
|
-
// src/molecules/form.tsx
|
|
798
|
+
// src/molecules/form/form.tsx
|
|
799
799
|
var RadixForm = __toESM(require("@radix-ui/react-form"), 1);
|
|
800
800
|
var import_react18 = require("react");
|
|
801
801
|
var import_jsx_runtime22 = require("react/jsx-runtime");
|
|
@@ -2087,6 +2087,7 @@ function DatePickerButton(props) {
|
|
|
2087
2087
|
|
|
2088
2088
|
// src/molecules/time-select.tsx
|
|
2089
2089
|
var import_react27 = require("react");
|
|
2090
|
+
var import_date_fns2 = require("date-fns");
|
|
2090
2091
|
|
|
2091
2092
|
// src/utils/get-time-options.ts
|
|
2092
2093
|
var getTimeOptions = () => {
|
|
@@ -2101,18 +2102,40 @@ var getTimeOptions = () => {
|
|
|
2101
2102
|
|
|
2102
2103
|
// src/molecules/time-select.tsx
|
|
2103
2104
|
var import_jsx_runtime38 = require("react/jsx-runtime");
|
|
2105
|
+
var getOptionValue = (date, timeValue) => {
|
|
2106
|
+
if (date && timeValue) {
|
|
2107
|
+
if ((0, import_date_fns2.format)(date, "yyyyMMdd") === (0, import_date_fns2.format)(timeValue, "yyyyMMdd")) {
|
|
2108
|
+
return (0, import_date_fns2.format)(date, "HH:mm");
|
|
2109
|
+
}
|
|
2110
|
+
}
|
|
2111
|
+
};
|
|
2104
2112
|
function TimeSelect(_a) {
|
|
2105
2113
|
var _b = _a, {
|
|
2106
|
-
value
|
|
2114
|
+
value,
|
|
2115
|
+
maxTime,
|
|
2116
|
+
minTime,
|
|
2117
|
+
time
|
|
2107
2118
|
} = _b, rest = __objRest(_b, [
|
|
2108
|
-
"value"
|
|
2119
|
+
"value",
|
|
2120
|
+
"maxTime",
|
|
2121
|
+
"minTime",
|
|
2122
|
+
"time"
|
|
2109
2123
|
]);
|
|
2110
2124
|
const timeOptions = (0, import_react27.useMemo)(() => {
|
|
2111
2125
|
return getTimeOptions();
|
|
2112
2126
|
}, []);
|
|
2127
|
+
const [minOption, maxOption] = (0, import_react27.useMemo)(() => {
|
|
2128
|
+
return [getOptionValue(minTime, time), getOptionValue(maxTime, time)];
|
|
2129
|
+
}, [maxTime, minTime, time]);
|
|
2113
2130
|
return /* @__PURE__ */ (0, import_jsx_runtime38.jsxs)(Select.Root, __spreadProps(__spreadValues({ value }, rest), { children: [
|
|
2114
2131
|
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(import_themes22.Flex, { direction: "column", width: "100%", children: /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Select.Trigger, { placeholder: "- ", style: { minWidth: "100px" } }) }),
|
|
2115
|
-
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Select.Content, { children: timeOptions.map((
|
|
2132
|
+
/* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Select.Content, { children: timeOptions.map((option) => {
|
|
2133
|
+
const visible = (!minOption || option >= minOption) && (!maxOption || option <= maxOption);
|
|
2134
|
+
if (!visible) {
|
|
2135
|
+
return null;
|
|
2136
|
+
}
|
|
2137
|
+
return /* @__PURE__ */ (0, import_jsx_runtime38.jsx)(Select.Item, { value: option, children: option }, option);
|
|
2138
|
+
}) })
|
|
2116
2139
|
] }));
|
|
2117
2140
|
}
|
|
2118
2141
|
|