@tipp/ui 2.3.33 → 2.3.35
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 +456 -198
- package/dist/app/index.cjs.map +1 -1
- package/dist/app/index.js +72 -71
- package/dist/app/platform/coach-question-list.cjs +12 -4
- package/dist/app/platform/coach-question-list.cjs.map +1 -1
- package/dist/app/platform/coach-question-list.js +27 -27
- package/dist/app/platform/contents-card.cjs +12 -4
- package/dist/app/platform/contents-card.cjs.map +1 -1
- package/dist/app/platform/contents-card.js +27 -27
- package/dist/app/platform/curriculum-card.js +2 -2
- package/dist/app/platform/edit-coaching-time.cjs +286 -28
- package/dist/app/platform/edit-coaching-time.cjs.map +1 -1
- package/dist/app/platform/edit-coaching-time.js +55 -54
- package/dist/app/platform/edit-service-type.cjs +281 -23
- package/dist/app/platform/edit-service-type.cjs.map +1 -1
- package/dist/app/platform/edit-service-type.js +55 -54
- package/dist/app/platform/goal-manage-card-edit.cjs +289 -31
- package/dist/app/platform/goal-manage-card-edit.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-edit.js +56 -55
- package/dist/app/platform/goal-manage-card-read.cjs +12 -4
- package/dist/app/platform/goal-manage-card-read.cjs.map +1 -1
- package/dist/app/platform/goal-manage-card-read.js +27 -27
- package/dist/app/platform/on-offline-radio-card.cjs +314 -54
- package/dist/app/platform/on-offline-radio-card.cjs.map +1 -1
- package/dist/app/platform/on-offline-radio-card.js +55 -54
- package/dist/app/platform/report-card.cjs +12 -4
- package/dist/app/platform/report-card.cjs.map +1 -1
- package/dist/app/platform/report-card.js +27 -27
- package/dist/app/platform/reservation-card.cjs +305 -47
- package/dist/app/platform/reservation-card.cjs.map +1 -1
- package/dist/app/platform/reservation-card.js +56 -55
- package/dist/app/platform/session-card.cjs +331 -73
- package/dist/app/platform/session-card.cjs.map +1 -1
- package/dist/app/platform/session-card.js +57 -56
- package/dist/app/platform/session-review-simple-read.cjs +12 -4
- package/dist/app/platform/session-review-simple-read.cjs.map +1 -1
- package/dist/app/platform/session-review-simple-read.js +27 -27
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs +12 -4
- package/dist/app/platform/userInfos/coaching-customer-info/index.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs +12 -4
- package/dist/app/platform/userInfos/coaching-customer-info/large.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +27 -27
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs +12 -4
- package/dist/app/platform/userInfos/coaching-customer-info/medium.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +27 -27
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs +12 -4
- package/dist/app/platform/userInfos/coaching-customer-info/small.cjs.map +1 -1
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +26 -26
- package/dist/app/platform/userInfos/session-user-info-detail.cjs +12 -4
- package/dist/app/platform/userInfos/session-user-info-detail.cjs.map +1 -1
- package/dist/app/platform/userInfos/session-user-info-detail.js +26 -26
- package/dist/app/platform/userInfos/utils.cjs +12 -4
- package/dist/app/platform/userInfos/utils.cjs.map +1 -1
- package/dist/app/platform/userInfos/utils.js +26 -26
- package/dist/atoms/dropdown-menu.cjs +9 -1
- package/dist/atoms/dropdown-menu.cjs.map +1 -1
- package/dist/atoms/dropdown-menu.d.cts +4 -1
- package/dist/atoms/dropdown-menu.d.ts +4 -1
- package/dist/atoms/dropdown-menu.js +1 -1
- package/dist/atoms/index.cjs +29 -11
- package/dist/atoms/index.cjs.map +1 -1
- package/dist/atoms/index.js +61 -61
- package/dist/atoms/pagination.cjs +14 -4
- package/dist/atoms/pagination.cjs.map +1 -1
- package/dist/atoms/pagination.js +1 -1
- package/dist/{chunk-HLL4QJJY.js → chunk-2TNZVHXZ.js} +5 -5
- package/dist/{chunk-GXWE3QNN.js → chunk-2U7C7J5P.js} +4 -4
- package/dist/{chunk-ZVSATS4O.js → chunk-5OLJJUMC.js} +7 -7
- package/dist/{chunk-SSSGPTRM.js → chunk-5TZNUXBT.js} +4 -4
- package/dist/{chunk-GXPEADVY.js → chunk-5WX7CODZ.js} +7 -7
- package/dist/{chunk-KD6EXWP7.js → chunk-62HSZXVT.js} +4 -4
- package/dist/{chunk-RFXVHZAN.js → chunk-64XYTE54.js} +4 -4
- package/dist/{chunk-TTVJOFG5.js → chunk-6MQMVYEP.js} +3 -3
- package/dist/{chunk-3WNHPKHP.js → chunk-7R5KG7SJ.js} +7 -7
- package/dist/{chunk-6UXCNYVO.js → chunk-7R65MUL6.js} +4 -4
- package/dist/{chunk-MIATMZDP.js → chunk-AA6OYHCE.js} +4 -4
- package/dist/{chunk-CI2XFT7Y.js → chunk-AYWPBD4T.js} +4 -4
- package/dist/{chunk-4QHXYLE4.js → chunk-CIQ7ELE6.js} +4 -4
- package/dist/{chunk-SNPAB3HJ.js → chunk-DWBYAHIR.js} +4 -4
- package/dist/{chunk-WOAZK56Z.js → chunk-ESM3HX57.js} +5 -5
- package/dist/{chunk-SACH3XVV.js → chunk-F7JSPN5P.js} +4 -4
- package/dist/{chunk-MFIOT62L.js → chunk-F7LTJOOC.js} +22 -6
- package/dist/chunk-F7LTJOOC.js.map +1 -0
- package/dist/{chunk-KCAOUZCT.js → chunk-GTO7GG2K.js} +2 -2
- package/dist/{chunk-MPZJH3PI.js → chunk-HTNDVNLQ.js} +4 -4
- package/dist/{chunk-PWTMDEL2.js → chunk-LATTGN7W.js} +7 -7
- package/dist/chunk-LSDD4TAP.js +276 -0
- package/dist/chunk-LSDD4TAP.js.map +1 -0
- package/dist/{chunk-JFJ3N4V5.js → chunk-NTJLECYY.js} +4 -4
- package/dist/{chunk-GXG26SHU.js → chunk-OILH5J7Q.js} +4 -4
- package/dist/{chunk-PD7RTFGB.js → chunk-P5GENHKO.js} +10 -10
- package/dist/{chunk-TB3ZF5TJ.js → chunk-PGUDVR3V.js} +2 -2
- package/dist/{chunk-BFRNEBJN.js → chunk-QEDJOAP6.js} +4 -4
- package/dist/{chunk-3Z2XZ4ZG.js → chunk-QKZTZUWP.js} +4 -4
- package/dist/{chunk-3JRHAKLV.js → chunk-RM5CQ77X.js} +7 -7
- package/dist/{chunk-D4U2MCJG.js → chunk-SMLC2O3V.js} +10 -2
- package/dist/chunk-SMLC2O3V.js.map +1 -0
- package/dist/{chunk-R3ZYNS4D.js → chunk-SRZK4OC5.js} +2 -2
- package/dist/chunk-SYMOHU2B.js +1 -0
- package/dist/{chunk-XXMZLXDE.js → chunk-TCFXG4AX.js} +7 -7
- package/dist/{chunk-I5RQ5T4B.js → chunk-U3FBMFRL.js} +10 -10
- package/dist/{chunk-5J4YHHVX.js → chunk-V3F7KAR6.js} +19 -5
- package/dist/chunk-V3F7KAR6.js.map +1 -0
- package/dist/{chunk-3DEAIJBF.js → chunk-WH6QD4SY.js} +10 -10
- package/dist/{chunk-BKYPABII.js → chunk-YPEB36YK.js} +5 -5
- package/dist/{chunk-JRSZNGFD.js → chunk-ZA4NYPSW.js} +5 -5
- package/dist/context/index.js +1 -1
- package/dist/index.cjs +576 -296
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +131 -127
- package/dist/molecules/autocomplete-textfield.cjs +417 -0
- package/dist/molecules/autocomplete-textfield.cjs.map +1 -0
- package/dist/molecules/autocomplete-textfield.d.cts +26 -0
- package/dist/molecules/autocomplete-textfield.d.ts +26 -0
- package/dist/molecules/autocomplete-textfield.js +12 -0
- package/dist/molecules/autocomplete-textfield.js.map +1 -0
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +1 -1
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +11 -11
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +12 -12
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +14 -14
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +1 -1
- package/dist/molecules/curriculumV2/index.js +15 -15
- package/dist/molecules/description-json-render.js +2 -2
- package/dist/molecules/dynamic-field.js +3 -3
- package/dist/molecules/dynamic-form-editor-field-editor-panel.js +3 -3
- package/dist/molecules/dynamic-form-editor-field-list-panel.js +2 -2
- package/dist/molecules/dynamic-form-editor-issues-panel.js +2 -2
- package/dist/molecules/dynamic-form-editor-preview-panel.js +6 -6
- package/dist/molecules/dynamic-form-editor.js +11 -11
- package/dist/molecules/dynamic-form.js +4 -4
- package/dist/molecules/expand-table/index.cjs +26 -6
- package/dist/molecules/expand-table/index.cjs.map +1 -1
- package/dist/molecules/expand-table/index.d.cts +2 -0
- package/dist/molecules/expand-table/index.d.ts +2 -0
- package/dist/molecules/expand-table/index.js +3 -3
- package/dist/molecules/index.cjs +312 -6
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.d.cts +2 -0
- package/dist/molecules/index.d.ts +2 -0
- package/dist/molecules/index.js +52 -47
- package/dist/molecules/learning-post.js +2 -2
- package/dist/molecules/stepper.js +2 -2
- package/dist/molecules/tag-selector.js +3 -3
- package/package.json +1 -1
- package/src/atoms/dropdown-menu.tsx +13 -0
- package/src/atoms/pagination.tsx +23 -5
- package/src/molecules/autocomplete-textfield.tsx +302 -0
- package/src/molecules/expand-table/index.tsx +16 -3
- package/src/molecules/index.ts +2 -1
- package/dist/chunk-5J4YHHVX.js.map +0 -1
- package/dist/chunk-D4U2MCJG.js.map +0 -1
- package/dist/chunk-MFIOT62L.js.map +0 -1
- package/dist/chunk-YWYYPYBK.js +0 -1
- /package/dist/{chunk-HLL4QJJY.js.map → chunk-2TNZVHXZ.js.map} +0 -0
- /package/dist/{chunk-GXWE3QNN.js.map → chunk-2U7C7J5P.js.map} +0 -0
- /package/dist/{chunk-ZVSATS4O.js.map → chunk-5OLJJUMC.js.map} +0 -0
- /package/dist/{chunk-SSSGPTRM.js.map → chunk-5TZNUXBT.js.map} +0 -0
- /package/dist/{chunk-GXPEADVY.js.map → chunk-5WX7CODZ.js.map} +0 -0
- /package/dist/{chunk-KD6EXWP7.js.map → chunk-62HSZXVT.js.map} +0 -0
- /package/dist/{chunk-RFXVHZAN.js.map → chunk-64XYTE54.js.map} +0 -0
- /package/dist/{chunk-TTVJOFG5.js.map → chunk-6MQMVYEP.js.map} +0 -0
- /package/dist/{chunk-3WNHPKHP.js.map → chunk-7R5KG7SJ.js.map} +0 -0
- /package/dist/{chunk-6UXCNYVO.js.map → chunk-7R65MUL6.js.map} +0 -0
- /package/dist/{chunk-MIATMZDP.js.map → chunk-AA6OYHCE.js.map} +0 -0
- /package/dist/{chunk-CI2XFT7Y.js.map → chunk-AYWPBD4T.js.map} +0 -0
- /package/dist/{chunk-4QHXYLE4.js.map → chunk-CIQ7ELE6.js.map} +0 -0
- /package/dist/{chunk-SNPAB3HJ.js.map → chunk-DWBYAHIR.js.map} +0 -0
- /package/dist/{chunk-WOAZK56Z.js.map → chunk-ESM3HX57.js.map} +0 -0
- /package/dist/{chunk-SACH3XVV.js.map → chunk-F7JSPN5P.js.map} +0 -0
- /package/dist/{chunk-KCAOUZCT.js.map → chunk-GTO7GG2K.js.map} +0 -0
- /package/dist/{chunk-MPZJH3PI.js.map → chunk-HTNDVNLQ.js.map} +0 -0
- /package/dist/{chunk-PWTMDEL2.js.map → chunk-LATTGN7W.js.map} +0 -0
- /package/dist/{chunk-JFJ3N4V5.js.map → chunk-NTJLECYY.js.map} +0 -0
- /package/dist/{chunk-GXG26SHU.js.map → chunk-OILH5J7Q.js.map} +0 -0
- /package/dist/{chunk-PD7RTFGB.js.map → chunk-P5GENHKO.js.map} +0 -0
- /package/dist/{chunk-TB3ZF5TJ.js.map → chunk-PGUDVR3V.js.map} +0 -0
- /package/dist/{chunk-BFRNEBJN.js.map → chunk-QEDJOAP6.js.map} +0 -0
- /package/dist/{chunk-3Z2XZ4ZG.js.map → chunk-QKZTZUWP.js.map} +0 -0
- /package/dist/{chunk-3JRHAKLV.js.map → chunk-RM5CQ77X.js.map} +0 -0
- /package/dist/{chunk-R3ZYNS4D.js.map → chunk-SRZK4OC5.js.map} +0 -0
- /package/dist/{chunk-YWYYPYBK.js.map → chunk-SYMOHU2B.js.map} +0 -0
- /package/dist/{chunk-XXMZLXDE.js.map → chunk-TCFXG4AX.js.map} +0 -0
- /package/dist/{chunk-I5RQ5T4B.js.map → chunk-U3FBMFRL.js.map} +0 -0
- /package/dist/{chunk-3DEAIJBF.js.map → chunk-WH6QD4SY.js.map} +0 -0
- /package/dist/{chunk-BKYPABII.js.map → chunk-YPEB36YK.js.map} +0 -0
- /package/dist/{chunk-JRSZNGFD.js.map → chunk-ZA4NYPSW.js.map} +0 -0
|
@@ -23,6 +23,7 @@ export { OneOnOneGuideData, OneOnOneGuideList, OneOnOneGuideListProps, oneOnOneN
|
|
|
23
23
|
export { Description, DescriptionBlock, DescriptionBlockType, DescriptionBulletListBlock, DescriptionCalloutBlock, DescriptionJsonRender, DescriptionJsonRenderProps, DescriptionTypoBlock } from './description-json-render.cjs';
|
|
24
24
|
export { TrainingInfoGuideline, TrainingInfoGuidelineProps } from './training-info-guideline.cjs';
|
|
25
25
|
export { DynamicFormEditor, DynamicFormEditorProps } from './dynamic-form-editor.cjs';
|
|
26
|
+
export { AutocompleteOption, AutocompleteTextfield, AutocompleteTextfieldProps } from './autocomplete-textfield.cjs';
|
|
26
27
|
export { ExpandComp, OnRowClick } from './expand-table/row.cjs';
|
|
27
28
|
export { ColumnDef, Row, createColumnHelper } from '@tanstack/react-table';
|
|
28
29
|
import 'react';
|
|
@@ -37,4 +38,5 @@ import '../types/curriculum.type.cjs';
|
|
|
37
38
|
import 'yup';
|
|
38
39
|
import '../types/dynamic-form-schema-generated.cjs';
|
|
39
40
|
import '../types/training-info-guideline-schema-generated.cjs';
|
|
41
|
+
import '../atoms/text-field.cjs';
|
|
40
42
|
import '../utils/get-cell-align.cjs';
|
|
@@ -23,6 +23,7 @@ export { OneOnOneGuideData, OneOnOneGuideList, OneOnOneGuideListProps, oneOnOneN
|
|
|
23
23
|
export { Description, DescriptionBlock, DescriptionBlockType, DescriptionBulletListBlock, DescriptionCalloutBlock, DescriptionJsonRender, DescriptionJsonRenderProps, DescriptionTypoBlock } from './description-json-render.js';
|
|
24
24
|
export { TrainingInfoGuideline, TrainingInfoGuidelineProps } from './training-info-guideline.js';
|
|
25
25
|
export { DynamicFormEditor, DynamicFormEditorProps } from './dynamic-form-editor.js';
|
|
26
|
+
export { AutocompleteOption, AutocompleteTextfield, AutocompleteTextfieldProps } from './autocomplete-textfield.js';
|
|
26
27
|
export { ExpandComp, OnRowClick } from './expand-table/row.js';
|
|
27
28
|
export { ColumnDef, Row, createColumnHelper } from '@tanstack/react-table';
|
|
28
29
|
import 'react';
|
|
@@ -37,4 +38,5 @@ import '../types/curriculum.type.js';
|
|
|
37
38
|
import 'yup';
|
|
38
39
|
import '../types/dynamic-form-schema-generated.js';
|
|
39
40
|
import '../types/training-info-guideline-schema-generated.js';
|
|
41
|
+
import '../atoms/text-field.js';
|
|
40
42
|
import '../utils/get-cell-align.js';
|
package/dist/molecules/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import "../chunk-
|
|
1
|
+
import "../chunk-SYMOHU2B.js";
|
|
2
2
|
import "../chunk-AS7ID74X.js";
|
|
3
3
|
import {
|
|
4
4
|
CurriculumBody
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-2TNZVHXZ.js";
|
|
6
|
+
import "../chunk-KFUBWOCN.js";
|
|
6
7
|
import {
|
|
7
8
|
CurriculumSidebar
|
|
8
9
|
} from "../chunk-6TQGX5ZU.js";
|
|
@@ -13,22 +14,21 @@ import "../chunk-MJMHPIYX.js";
|
|
|
13
14
|
import "../chunk-4TST4UK5.js";
|
|
14
15
|
import "../chunk-VH37R5IH.js";
|
|
15
16
|
import "../chunk-ZFTQ2XBH.js";
|
|
16
|
-
import "../chunk-
|
|
17
|
-
import "../chunk-
|
|
18
|
-
import "../chunk-
|
|
19
|
-
import "../chunk-
|
|
20
|
-
import "../chunk-
|
|
21
|
-
import "../chunk-
|
|
17
|
+
import "../chunk-SRZK4OC5.js";
|
|
18
|
+
import "../chunk-ESM3HX57.js";
|
|
19
|
+
import "../chunk-PGUDVR3V.js";
|
|
20
|
+
import "../chunk-7R5KG7SJ.js";
|
|
21
|
+
import "../chunk-W7TBPRHG.js";
|
|
22
|
+
import "../chunk-TCFXG4AX.js";
|
|
22
23
|
import "../chunk-76PNGKCB.js";
|
|
23
24
|
import "../chunk-SAEPW5JF.js";
|
|
24
25
|
import "../chunk-VK6INFSB.js";
|
|
25
|
-
import "../chunk-
|
|
26
|
-
import "../chunk-
|
|
27
|
-
import "../chunk-W7TBPRHG.js";
|
|
26
|
+
import "../chunk-OILH5J7Q.js";
|
|
27
|
+
import "../chunk-NTJLECYY.js";
|
|
28
28
|
import "../chunk-CNW3YEAK.js";
|
|
29
29
|
import "../chunk-NIMLBANB.js";
|
|
30
|
+
import "../chunk-CIQ7ELE6.js";
|
|
30
31
|
import "../chunk-GMKRNFH5.js";
|
|
31
|
-
import "../chunk-KFUBWOCN.js";
|
|
32
32
|
import {
|
|
33
33
|
CurriculumSubNav
|
|
34
34
|
} from "../chunk-M6C7IXCB.js";
|
|
@@ -48,15 +48,18 @@ import {
|
|
|
48
48
|
import {
|
|
49
49
|
ExpandTable,
|
|
50
50
|
createColumnHelper
|
|
51
|
-
} from "../chunk-
|
|
51
|
+
} from "../chunk-V3F7KAR6.js";
|
|
52
52
|
import "../chunk-JCG2AUFJ.js";
|
|
53
53
|
import "../chunk-2ISIAPFS.js";
|
|
54
|
+
import {
|
|
55
|
+
RadioButtonCard
|
|
56
|
+
} from "../chunk-CSKNBWPB.js";
|
|
54
57
|
import {
|
|
55
58
|
Stepper
|
|
56
|
-
} from "../chunk-
|
|
59
|
+
} from "../chunk-QKZTZUWP.js";
|
|
57
60
|
import {
|
|
58
61
|
TagSelector
|
|
59
|
-
} from "../chunk-
|
|
62
|
+
} from "../chunk-5OLJJUMC.js";
|
|
60
63
|
import {
|
|
61
64
|
TimeSelect
|
|
62
65
|
} from "../chunk-7PF6I4RN.js";
|
|
@@ -68,6 +71,10 @@ import "../chunk-2BPFXK4L.js";
|
|
|
68
71
|
import {
|
|
69
72
|
TrainingInfoGuideline
|
|
70
73
|
} from "../chunk-SLJLEPD2.js";
|
|
74
|
+
import {
|
|
75
|
+
DynamicFormResponseItem
|
|
76
|
+
} from "../chunk-77H5BUYO.js";
|
|
77
|
+
import "../chunk-K7LTEKQS.js";
|
|
71
78
|
import {
|
|
72
79
|
ForceRefresh
|
|
73
80
|
} from "../chunk-EWFZXCMV.js";
|
|
@@ -76,7 +83,7 @@ import {
|
|
|
76
83
|
} from "../chunk-5JQOU3IR.js";
|
|
77
84
|
import {
|
|
78
85
|
LearningPost
|
|
79
|
-
} from "../chunk-
|
|
86
|
+
} from "../chunk-F7JSPN5P.js";
|
|
80
87
|
import "../chunk-7FKRQQYK.js";
|
|
81
88
|
import {
|
|
82
89
|
Navigation
|
|
@@ -86,74 +93,74 @@ import {
|
|
|
86
93
|
oneOnOneNoteTextReplacer
|
|
87
94
|
} from "../chunk-FVNXDLRU.js";
|
|
88
95
|
import {
|
|
89
|
-
|
|
90
|
-
} from "../chunk-
|
|
96
|
+
DownloadCard
|
|
97
|
+
} from "../chunk-OHNBVT52.js";
|
|
91
98
|
import {
|
|
92
99
|
DynamicFormEditor
|
|
93
|
-
} from "../chunk-
|
|
94
|
-
import "../chunk-
|
|
95
|
-
import "../chunk-
|
|
96
|
-
import "../chunk-
|
|
97
|
-
import "../chunk-
|
|
100
|
+
} from "../chunk-YPEB36YK.js";
|
|
101
|
+
import "../chunk-5WX7CODZ.js";
|
|
102
|
+
import "../chunk-7R65MUL6.js";
|
|
103
|
+
import "../chunk-AA6OYHCE.js";
|
|
104
|
+
import "../chunk-ZA4NYPSW.js";
|
|
98
105
|
import {
|
|
99
106
|
DynamicForm,
|
|
100
107
|
createYupValidation
|
|
101
|
-
} from "../chunk-
|
|
108
|
+
} from "../chunk-GTO7GG2K.js";
|
|
102
109
|
import {
|
|
103
110
|
DynamicFormField
|
|
104
|
-
} from "../chunk-
|
|
111
|
+
} from "../chunk-HTNDVNLQ.js";
|
|
105
112
|
import "../chunk-Z7WNKARH.js";
|
|
106
113
|
import {
|
|
107
|
-
|
|
108
|
-
} from "../chunk-
|
|
109
|
-
import "../chunk-K7LTEKQS.js";
|
|
114
|
+
AutocompleteTextfield
|
|
115
|
+
} from "../chunk-LSDD4TAP.js";
|
|
110
116
|
import {
|
|
111
117
|
DescriptionJsonRender
|
|
112
|
-
} from "../chunk-
|
|
118
|
+
} from "../chunk-QEDJOAP6.js";
|
|
113
119
|
import "../chunk-LT6LBTA7.js";
|
|
114
120
|
import {
|
|
115
121
|
DotNavigation
|
|
116
122
|
} from "../chunk-IJOOKMKQ.js";
|
|
117
|
-
import {
|
|
118
|
-
DownloadCard
|
|
119
|
-
} from "../chunk-OHNBVT52.js";
|
|
120
123
|
import "../chunk-4U6DFH7Z.js";
|
|
121
124
|
import "../chunk-QDC3LFHS.js";
|
|
125
|
+
import "../chunk-5ZITU5L7.js";
|
|
122
126
|
import "../chunk-5XYPLDI5.js";
|
|
123
127
|
import "../chunk-6NPTJBFE.js";
|
|
128
|
+
import "../chunk-MUPK4L3U.js";
|
|
124
129
|
import "../chunk-X2GMDZ7M.js";
|
|
125
130
|
import "../chunk-HYITAA4J.js";
|
|
126
131
|
import "../chunk-FR2GDOU2.js";
|
|
127
|
-
import "../chunk-
|
|
132
|
+
import "../chunk-JIJLOKVN.js";
|
|
133
|
+
import "../chunk-F7LTJOOC.js";
|
|
134
|
+
import "../chunk-5AVBYDPB.js";
|
|
128
135
|
import "../chunk-365QMK4D.js";
|
|
129
136
|
import "../chunk-6IVCARWS.js";
|
|
130
137
|
import "../chunk-6DJOIRMF.js";
|
|
131
138
|
import "../chunk-FPD73OHW.js";
|
|
132
|
-
import "../chunk-
|
|
139
|
+
import "../chunk-EGEQY3KT.js";
|
|
133
140
|
import "../chunk-XQOL7UBI.js";
|
|
134
141
|
import "../chunk-TULWX7D6.js";
|
|
135
142
|
import "../chunk-DHZVOXFM.js";
|
|
136
|
-
import "../chunk-JIJLOKVN.js";
|
|
137
|
-
import "../chunk-MFIOT62L.js";
|
|
138
|
-
import "../chunk-5AVBYDPB.js";
|
|
139
|
-
import "../chunk-EGEQY3KT.js";
|
|
140
|
-
import "../chunk-W7X7KSJP.js";
|
|
141
|
-
import "../chunk-VYCYVN3L.js";
|
|
142
|
-
import "../chunk-OHMOP5PV.js";
|
|
143
|
-
import "../chunk-NFDQJVFA.js";
|
|
144
143
|
import "../chunk-B5CKZFDM.js";
|
|
145
144
|
import "../chunk-BESTU2AY.js";
|
|
146
145
|
import "../chunk-U7N2PWMO.js";
|
|
147
146
|
import "../chunk-XK6VEVOK.js";
|
|
148
147
|
import "../chunk-HF6GNDPV.js";
|
|
148
|
+
import "../chunk-SMLC2O3V.js";
|
|
149
|
+
import "../chunk-B6XJN6EC.js";
|
|
150
|
+
import "../chunk-RP2RGCAW.js";
|
|
151
|
+
import "../chunk-W7X7KSJP.js";
|
|
152
|
+
import "../chunk-VYCYVN3L.js";
|
|
153
|
+
import "../chunk-OHMOP5PV.js";
|
|
154
|
+
import "../chunk-NFDQJVFA.js";
|
|
155
|
+
import "../chunk-6SYFG6YY.js";
|
|
156
|
+
import "../chunk-K36TPMKL.js";
|
|
157
|
+
import "../chunk-U3BQT7ZO.js";
|
|
149
158
|
import "../chunk-4Y5BEXVN.js";
|
|
150
159
|
import "../chunk-PMJIFLDT.js";
|
|
151
160
|
import "../chunk-LDBWASUA.js";
|
|
152
161
|
import "../chunk-25HMMI7R.js";
|
|
153
162
|
import "../chunk-ZVDAEY5Q.js";
|
|
154
163
|
import "../chunk-LQY4RKWI.js";
|
|
155
|
-
import "../chunk-B6XJN6EC.js";
|
|
156
|
-
import "../chunk-RP2RGCAW.js";
|
|
157
164
|
import "../chunk-DLP4UUNG.js";
|
|
158
165
|
import "../chunk-VD7AQ7HK.js";
|
|
159
166
|
import "../chunk-ZQE7SP6P.js";
|
|
@@ -171,11 +178,9 @@ import "../chunk-5OM2H6RI.js";
|
|
|
171
178
|
import "../chunk-ZUYCXCPW.js";
|
|
172
179
|
import "../chunk-YVFNJE4E.js";
|
|
173
180
|
import "../chunk-EAXUQEO5.js";
|
|
174
|
-
import "../chunk-6SYFG6YY.js";
|
|
175
|
-
import "../chunk-K36TPMKL.js";
|
|
176
|
-
import "../chunk-U3BQT7ZO.js";
|
|
177
181
|
import "../chunk-CRTRMMJ7.js";
|
|
178
182
|
export {
|
|
183
|
+
AutocompleteTextfield,
|
|
179
184
|
CurriculumBody,
|
|
180
185
|
CurriculumProvider,
|
|
181
186
|
CurriculumSidebar,
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
LearningPost
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-F7JSPN5P.js";
|
|
4
4
|
import "../chunk-7FKRQQYK.js";
|
|
5
5
|
import "../chunk-EGEQY3KT.js";
|
|
6
6
|
import "../chunk-BESTU2AY.js";
|
|
7
|
+
import "../chunk-U3BQT7ZO.js";
|
|
7
8
|
import "../chunk-4Y5BEXVN.js";
|
|
8
9
|
import "../chunk-PMJIFLDT.js";
|
|
9
10
|
import "../chunk-LDBWASUA.js";
|
|
@@ -11,7 +12,6 @@ import "../chunk-25HMMI7R.js";
|
|
|
11
12
|
import "../chunk-ZVDAEY5Q.js";
|
|
12
13
|
import "../chunk-LQY4RKWI.js";
|
|
13
14
|
import "../chunk-EAXUQEO5.js";
|
|
14
|
-
import "../chunk-U3BQT7ZO.js";
|
|
15
15
|
import "../chunk-CRTRMMJ7.js";
|
|
16
16
|
export {
|
|
17
17
|
LearningPost
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
Stepper
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-QKZTZUWP.js";
|
|
4
|
+
import "../chunk-K36TPMKL.js";
|
|
4
5
|
import "../chunk-PMJIFLDT.js";
|
|
5
6
|
import "../chunk-LDBWASUA.js";
|
|
6
7
|
import "../chunk-25HMMI7R.js";
|
|
@@ -20,7 +21,6 @@ import "../chunk-YSYJCYHY.js";
|
|
|
20
21
|
import "../chunk-5OM2H6RI.js";
|
|
21
22
|
import "../chunk-ZUYCXCPW.js";
|
|
22
23
|
import "../chunk-YVFNJE4E.js";
|
|
23
|
-
import "../chunk-K36TPMKL.js";
|
|
24
24
|
import "../chunk-CRTRMMJ7.js";
|
|
25
25
|
export {
|
|
26
26
|
Stepper
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TagSelector
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-5OLJJUMC.js";
|
|
4
4
|
import "../chunk-MUPK4L3U.js";
|
|
5
5
|
import "../chunk-5AVBYDPB.js";
|
|
6
6
|
import "../chunk-EGEQY3KT.js";
|
|
7
|
+
import "../chunk-6SYFG6YY.js";
|
|
8
|
+
import "../chunk-U3BQT7ZO.js";
|
|
7
9
|
import "../chunk-PMJIFLDT.js";
|
|
8
10
|
import "../chunk-LDBWASUA.js";
|
|
9
11
|
import "../chunk-25HMMI7R.js";
|
|
@@ -25,8 +27,6 @@ import "../chunk-YSYJCYHY.js";
|
|
|
25
27
|
import "../chunk-5OM2H6RI.js";
|
|
26
28
|
import "../chunk-ZUYCXCPW.js";
|
|
27
29
|
import "../chunk-YVFNJE4E.js";
|
|
28
|
-
import "../chunk-6SYFG6YY.js";
|
|
29
|
-
import "../chunk-U3BQT7ZO.js";
|
|
30
30
|
import "../chunk-CRTRMMJ7.js";
|
|
31
31
|
export {
|
|
32
32
|
TagSelector
|
package/package.json
CHANGED
|
@@ -3,6 +3,7 @@ import { forwardRef, useMemo } from 'react';
|
|
|
3
3
|
|
|
4
4
|
type ContentProps = RadixDropdownMenu.ContentProps & {
|
|
5
5
|
isNavigation?: boolean;
|
|
6
|
+
onOpenAutoFocus?: (event: Event) => void;
|
|
6
7
|
};
|
|
7
8
|
|
|
8
9
|
const Content = forwardRef<HTMLDivElement, ContentProps>((props, ref) => {
|
|
@@ -23,7 +24,19 @@ const Content = forwardRef<HTMLDivElement, ContentProps>((props, ref) => {
|
|
|
23
24
|
|
|
24
25
|
Content.displayName = 'DropdownMenu.Content';
|
|
25
26
|
|
|
27
|
+
/** @radix-ui/themes의 DropdownMenu.Trigger는 asChild 타입이 누락되어 있어 별도로 확장 */
|
|
28
|
+
type TriggerProps = RadixDropdownMenu.TriggerProps & { asChild?: boolean };
|
|
29
|
+
|
|
30
|
+
const Trigger = forwardRef<HTMLButtonElement, TriggerProps>(
|
|
31
|
+
({ asChild: _asChild, ...props }, ref) => (
|
|
32
|
+
<RadixDropdownMenu.Trigger ref={ref} {...props} />
|
|
33
|
+
),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
Trigger.displayName = 'DropdownMenu.Trigger';
|
|
37
|
+
|
|
26
38
|
export const DropdownMenu = {
|
|
27
39
|
...RadixDropdownMenu,
|
|
28
40
|
Content,
|
|
41
|
+
Trigger,
|
|
29
42
|
};
|
package/src/atoms/pagination.tsx
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, {
|
|
2
|
+
useCallback,
|
|
3
|
+
useEffect,
|
|
4
|
+
useMemo,
|
|
5
|
+
useRef,
|
|
6
|
+
useState,
|
|
7
|
+
} from 'react';
|
|
2
8
|
import {
|
|
3
9
|
ChevronLeftIcon,
|
|
4
10
|
ChevronRightIcon,
|
|
@@ -40,15 +46,27 @@ export function Pagination(props: PaginationProps): React.ReactNode {
|
|
|
40
46
|
return Array.from({ length: end - start + 1 }, (_, i) => i + start);
|
|
41
47
|
}, [count, page, siblingCount]);
|
|
42
48
|
|
|
49
|
+
// onChange 참조가 매 렌더 새로 생성되더라도 effect가 재발화하지 않도록 ref로 보관한다.
|
|
50
|
+
const onChangeRef = useRef(onChange);
|
|
43
51
|
useEffect(() => {
|
|
44
|
-
onChange
|
|
45
|
-
}
|
|
52
|
+
onChangeRef.current = onChange;
|
|
53
|
+
});
|
|
46
54
|
|
|
55
|
+
// 내부 page 상태가 바뀔 때만 부모에 알림. 마운트 시 초기 page는 부모가 이미 알고 있으므로 제외.
|
|
56
|
+
const isFirstRender = useRef(true);
|
|
47
57
|
useEffect(() => {
|
|
48
|
-
if (
|
|
58
|
+
if (isFirstRender.current) {
|
|
59
|
+
isFirstRender.current = false;
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
onChangeRef.current?.(page);
|
|
63
|
+
}, [page]);
|
|
64
|
+
|
|
65
|
+
useEffect(() => {
|
|
66
|
+
if (props.page && props.page !== page) {
|
|
49
67
|
setPage(props.page);
|
|
50
68
|
}
|
|
51
|
-
}, [props.page]);
|
|
69
|
+
}, [props.page, page]);
|
|
52
70
|
|
|
53
71
|
const prev = useMemo<number | undefined>(() => {
|
|
54
72
|
const p = page - 1;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import React, {
|
|
2
|
+
forwardRef,
|
|
3
|
+
useCallback,
|
|
4
|
+
useEffect,
|
|
5
|
+
useId,
|
|
6
|
+
useRef,
|
|
7
|
+
useState,
|
|
8
|
+
} from 'react';
|
|
9
|
+
import { Box } from '@radix-ui/themes';
|
|
10
|
+
import { TextField, type RootProps as TextFieldRootProps } from '../atoms/text-field';
|
|
11
|
+
import { DropdownMenu } from '../atoms/dropdown-menu';
|
|
12
|
+
import { Typo } from '../atoms/typo';
|
|
13
|
+
|
|
14
|
+
export interface AutocompleteOption {
|
|
15
|
+
label: string;
|
|
16
|
+
value: string;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface AutocompleteTextfieldProps
|
|
20
|
+
extends Omit<TextFieldRootProps, 'value' | 'onChange' | 'onSelect'> {
|
|
21
|
+
options: AutocompleteOption[];
|
|
22
|
+
value?: string;
|
|
23
|
+
onChange?: (value: string) => void;
|
|
24
|
+
onSelect?: (option: AutocompleteOption) => void;
|
|
25
|
+
placeholder?: string;
|
|
26
|
+
/** 빈 결과일 때 표시할 메시지. null이면 빈 결과 시 드롭다운을 표시하지 않음 */
|
|
27
|
+
emptyMessage?: string | null;
|
|
28
|
+
/** 최대 표시 항목 수 (기본값: 10) */
|
|
29
|
+
maxItems?: number;
|
|
30
|
+
/** TextField 왼쪽 슬롯 (아이콘 등) */
|
|
31
|
+
slotLeft?: React.ReactNode;
|
|
32
|
+
/** TextField 오른쪽 슬롯 (아이콘 등) */
|
|
33
|
+
slotRight?: React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const AutocompleteTextfield = forwardRef<
|
|
37
|
+
HTMLInputElement,
|
|
38
|
+
AutocompleteTextfieldProps
|
|
39
|
+
>(
|
|
40
|
+
(
|
|
41
|
+
{
|
|
42
|
+
options,
|
|
43
|
+
value: externalValue,
|
|
44
|
+
onChange,
|
|
45
|
+
onSelect,
|
|
46
|
+
placeholder,
|
|
47
|
+
emptyMessage = '검색 결과가 없습니다.',
|
|
48
|
+
maxItems = 10,
|
|
49
|
+
slotLeft,
|
|
50
|
+
slotRight,
|
|
51
|
+
error,
|
|
52
|
+
...rest
|
|
53
|
+
},
|
|
54
|
+
ref
|
|
55
|
+
): React.ReactElement => {
|
|
56
|
+
const isControlled = externalValue !== undefined;
|
|
57
|
+
const [internalValue, setInternalValue] = useState('');
|
|
58
|
+
const inputValue = isControlled ? externalValue : internalValue;
|
|
59
|
+
|
|
60
|
+
const [open, setOpen] = useState(false);
|
|
61
|
+
const [highlightedIndex, setHighlightedIndex] = useState(-1);
|
|
62
|
+
|
|
63
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
64
|
+
const listRef = useRef<HTMLUListElement>(null);
|
|
65
|
+
const listboxId = useId();
|
|
66
|
+
const justSelectedRef = useRef(false);
|
|
67
|
+
|
|
68
|
+
const filtered = options
|
|
69
|
+
.filter((opt: AutocompleteOption) =>
|
|
70
|
+
opt.label.toLowerCase().includes(inputValue.toLowerCase())
|
|
71
|
+
)
|
|
72
|
+
.slice(0, maxItems);
|
|
73
|
+
|
|
74
|
+
const handleInputChange = useCallback(
|
|
75
|
+
(e: React.ChangeEvent<HTMLInputElement>) => {
|
|
76
|
+
const next = e.target.value;
|
|
77
|
+
if (!isControlled) setInternalValue(next);
|
|
78
|
+
onChange?.(next);
|
|
79
|
+
const nextFiltered = options
|
|
80
|
+
.filter((opt) => opt.label.toLowerCase().includes(next.toLowerCase()))
|
|
81
|
+
.slice(0, maxItems);
|
|
82
|
+
setOpen(nextFiltered.length > 0 || emptyMessage !== null);
|
|
83
|
+
setHighlightedIndex(-1);
|
|
84
|
+
},
|
|
85
|
+
[isControlled, onChange, options, maxItems, emptyMessage]
|
|
86
|
+
);
|
|
87
|
+
|
|
88
|
+
const handleSelect = useCallback(
|
|
89
|
+
(option: AutocompleteOption) => {
|
|
90
|
+
if (!isControlled) setInternalValue(option.label);
|
|
91
|
+
onChange?.(option.label);
|
|
92
|
+
onSelect?.(option);
|
|
93
|
+
setOpen(false);
|
|
94
|
+
setHighlightedIndex(-1);
|
|
95
|
+
justSelectedRef.current = true;
|
|
96
|
+
inputRef.current?.focus();
|
|
97
|
+
},
|
|
98
|
+
[isControlled, onChange, onSelect]
|
|
99
|
+
);
|
|
100
|
+
|
|
101
|
+
const handleFocus = useCallback(() => {
|
|
102
|
+
if (justSelectedRef.current) {
|
|
103
|
+
justSelectedRef.current = false;
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
const currentFiltered = options
|
|
107
|
+
.filter((opt) => opt.label.toLowerCase().includes(inputValue.toLowerCase()))
|
|
108
|
+
.slice(0, maxItems);
|
|
109
|
+
setOpen(currentFiltered.length > 0 || emptyMessage !== null);
|
|
110
|
+
}, [options, inputValue, maxItems, emptyMessage]);
|
|
111
|
+
|
|
112
|
+
const handleBlur = useCallback((e: React.FocusEvent<HTMLInputElement>) => {
|
|
113
|
+
// 포커스가 dropdown content 내부로 이동한 경우 닫지 않음
|
|
114
|
+
if (e.relatedTarget && inputRef.current?.parentElement?.contains(e.relatedTarget as Node)) {
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
setOpen(false);
|
|
118
|
+
setHighlightedIndex(-1);
|
|
119
|
+
}, []);
|
|
120
|
+
|
|
121
|
+
const handleKeyDown = useCallback(
|
|
122
|
+
(e: React.KeyboardEvent<HTMLInputElement>) => {
|
|
123
|
+
if (!open) {
|
|
124
|
+
if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {
|
|
125
|
+
setOpen(true);
|
|
126
|
+
setHighlightedIndex(0);
|
|
127
|
+
e.preventDefault();
|
|
128
|
+
}
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
switch (e.key) {
|
|
133
|
+
case 'ArrowDown':
|
|
134
|
+
e.preventDefault();
|
|
135
|
+
setHighlightedIndex((prev) =>
|
|
136
|
+
prev < filtered.length - 1 ? prev + 1 : 0
|
|
137
|
+
);
|
|
138
|
+
break;
|
|
139
|
+
case 'ArrowUp':
|
|
140
|
+
e.preventDefault();
|
|
141
|
+
setHighlightedIndex((prev) =>
|
|
142
|
+
prev > 0 ? prev - 1 : filtered.length - 1
|
|
143
|
+
);
|
|
144
|
+
break;
|
|
145
|
+
case 'Enter':
|
|
146
|
+
e.preventDefault();
|
|
147
|
+
if (highlightedIndex >= 0 && filtered[highlightedIndex]) {
|
|
148
|
+
handleSelect(filtered[highlightedIndex]);
|
|
149
|
+
}
|
|
150
|
+
break;
|
|
151
|
+
case 'Escape':
|
|
152
|
+
setOpen(false);
|
|
153
|
+
setHighlightedIndex(-1);
|
|
154
|
+
break;
|
|
155
|
+
case 'Tab':
|
|
156
|
+
setOpen(false);
|
|
157
|
+
setHighlightedIndex(-1);
|
|
158
|
+
break;
|
|
159
|
+
default:
|
|
160
|
+
break;
|
|
161
|
+
}
|
|
162
|
+
},
|
|
163
|
+
[open, filtered, highlightedIndex, handleSelect]
|
|
164
|
+
);
|
|
165
|
+
|
|
166
|
+
// 하이라이트 항목을 리스트 뷰에 스크롤
|
|
167
|
+
useEffect(() => {
|
|
168
|
+
if (!listRef.current || highlightedIndex < 0) return;
|
|
169
|
+
const item = listRef.current.children[highlightedIndex];
|
|
170
|
+
(item as HTMLElement).scrollIntoView({ block: 'nearest' });
|
|
171
|
+
}, [highlightedIndex]);
|
|
172
|
+
|
|
173
|
+
return (
|
|
174
|
+
<Box position="relative" style={{ width: '100%' }}>
|
|
175
|
+
<TextField.Root
|
|
176
|
+
aria-activedescendant={
|
|
177
|
+
open && highlightedIndex >= 0
|
|
178
|
+
? `${listboxId}-option-${highlightedIndex}`
|
|
179
|
+
: undefined
|
|
180
|
+
}
|
|
181
|
+
aria-autocomplete="list"
|
|
182
|
+
aria-controls={open ? listboxId : undefined}
|
|
183
|
+
aria-expanded={open}
|
|
184
|
+
error={error}
|
|
185
|
+
onBlur={handleBlur}
|
|
186
|
+
onChange={handleInputChange}
|
|
187
|
+
onFocus={handleFocus}
|
|
188
|
+
onKeyDown={handleKeyDown}
|
|
189
|
+
placeholder={placeholder}
|
|
190
|
+
ref={(node) => {
|
|
191
|
+
(inputRef as React.MutableRefObject<HTMLInputElement | null>).current =
|
|
192
|
+
node;
|
|
193
|
+
if (typeof ref === 'function') {
|
|
194
|
+
ref(node);
|
|
195
|
+
} else if (ref) {
|
|
196
|
+
(ref as React.MutableRefObject<HTMLInputElement | null>).current =
|
|
197
|
+
node;
|
|
198
|
+
}
|
|
199
|
+
}}
|
|
200
|
+
role="combobox"
|
|
201
|
+
style={{ width: '100%' }}
|
|
202
|
+
value={inputValue}
|
|
203
|
+
{...rest}
|
|
204
|
+
>
|
|
205
|
+
{slotLeft && <TextField.Slot side="left">{slotLeft}</TextField.Slot>}
|
|
206
|
+
{slotRight && <TextField.Slot side="right">{slotRight}</TextField.Slot>}
|
|
207
|
+
</TextField.Root>
|
|
208
|
+
|
|
209
|
+
{/* DropdownMenu.Trigger는 포지셔닝 앵커 전용으로 사용 (비대화형) */}
|
|
210
|
+
<DropdownMenu.Root
|
|
211
|
+
modal={false}
|
|
212
|
+
onOpenChange={(nextOpen) => {
|
|
213
|
+
if (!nextOpen && document.activeElement !== inputRef.current) {
|
|
214
|
+
setOpen(false);
|
|
215
|
+
setHighlightedIndex(-1);
|
|
216
|
+
}
|
|
217
|
+
}}
|
|
218
|
+
open={open}
|
|
219
|
+
>
|
|
220
|
+
<DropdownMenu.Trigger asChild>
|
|
221
|
+
<span
|
|
222
|
+
aria-hidden="true"
|
|
223
|
+
style={{
|
|
224
|
+
bottom: 0,
|
|
225
|
+
height: 0,
|
|
226
|
+
left: 0,
|
|
227
|
+
opacity: 0,
|
|
228
|
+
pointerEvents: 'none',
|
|
229
|
+
position: 'absolute',
|
|
230
|
+
width: '100%',
|
|
231
|
+
}}
|
|
232
|
+
/>
|
|
233
|
+
</DropdownMenu.Trigger>
|
|
234
|
+
|
|
235
|
+
<DropdownMenu.Content
|
|
236
|
+
align="start"
|
|
237
|
+
onCloseAutoFocus={(e: Event) => {
|
|
238
|
+
e.preventDefault();
|
|
239
|
+
}}
|
|
240
|
+
onOpenAutoFocus={(e: Event) => {
|
|
241
|
+
e.preventDefault();
|
|
242
|
+
}}
|
|
243
|
+
sideOffset={4}
|
|
244
|
+
style={{
|
|
245
|
+
maxHeight: 240,
|
|
246
|
+
overflowY: 'auto',
|
|
247
|
+
padding: 0,
|
|
248
|
+
width: 'var(--radix-dropdown-menu-trigger-width)',
|
|
249
|
+
}}
|
|
250
|
+
>
|
|
251
|
+
{filtered.length === 0 && emptyMessage !== null ? (
|
|
252
|
+
<Box px="2" py="2">
|
|
253
|
+
<Typo color="gray">
|
|
254
|
+
{emptyMessage}
|
|
255
|
+
</Typo>
|
|
256
|
+
</Box>
|
|
257
|
+
) : (
|
|
258
|
+
<ul
|
|
259
|
+
id={listboxId}
|
|
260
|
+
ref={listRef}
|
|
261
|
+
role="listbox"
|
|
262
|
+
style={{ listStyle: 'none', margin: 0, padding: 0 }}
|
|
263
|
+
>
|
|
264
|
+
{filtered.map((option, index) => {
|
|
265
|
+
const isHighlighted = index === highlightedIndex;
|
|
266
|
+
return (
|
|
267
|
+
<li
|
|
268
|
+
aria-selected={isHighlighted}
|
|
269
|
+
id={`${listboxId}-option-${index}`}
|
|
270
|
+
key={option.value}
|
|
271
|
+
onMouseEnter={() => {
|
|
272
|
+
setHighlightedIndex(index);
|
|
273
|
+
}}
|
|
274
|
+
onPointerDown={(e) => {
|
|
275
|
+
// blur 전에 선택되도록 pointerdown 사용
|
|
276
|
+
e.preventDefault();
|
|
277
|
+
handleSelect(option);
|
|
278
|
+
}}
|
|
279
|
+
role="option"
|
|
280
|
+
style={{
|
|
281
|
+
padding: 'var(--spacing-4) var(--spacing-6)',
|
|
282
|
+
cursor: 'pointer',
|
|
283
|
+
backgroundColor: isHighlighted
|
|
284
|
+
? 'var(--accent-3)'
|
|
285
|
+
: 'transparent',
|
|
286
|
+
transition: 'background-color 80ms',
|
|
287
|
+
}}
|
|
288
|
+
>
|
|
289
|
+
<Typo variant="body">{option.label}</Typo>
|
|
290
|
+
</li>
|
|
291
|
+
);
|
|
292
|
+
})}
|
|
293
|
+
</ul>
|
|
294
|
+
)}
|
|
295
|
+
</DropdownMenu.Content>
|
|
296
|
+
</DropdownMenu.Root>
|
|
297
|
+
</Box>
|
|
298
|
+
);
|
|
299
|
+
}
|
|
300
|
+
);
|
|
301
|
+
|
|
302
|
+
AutocompleteTextfield.displayName = 'AutocompleteTextfield';
|