@eliceio/cdk-cli 1.2.0 → 1.3.0-contenttypes.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.
Files changed (104) hide show
  1. package/README.md +69 -60
  2. package/es/cli.js +11 -2
  3. package/es/commands/build/index.js +12 -0
  4. package/es/commands/create/index.js +2 -1
  5. package/es/commands/create/scaffold.d.ts +2 -2
  6. package/es/commands/create/scaffold.js +3 -3
  7. package/es/commands/dev/index.d.ts +10 -1
  8. package/es/commands/dev/index.js +47 -7
  9. package/es/core/config.d.ts +20 -9
  10. package/es/core/config.js +53 -12
  11. package/es/core/project-check.d.ts +3 -2
  12. package/es/core/project-check.js +14 -3
  13. package/es/core/regex.d.ts +11 -0
  14. package/es/core/regex.js +41 -0
  15. package/es/core/sandbox.d.ts +26 -0
  16. package/es/core/sandbox.js +240 -30
  17. package/es/dev/check.d.ts +30 -0
  18. package/es/dev/check.js +224 -34
  19. package/es/dev/grading.d.ts +20 -1
  20. package/es/dev/grading.js +38 -7
  21. package/es/dev/host-page.js +1 -1
  22. package/es/dev/mock-api.d.ts +3 -1
  23. package/es/dev/mock-api.js +20 -11
  24. package/es/engines/vite/index.js +1 -1
  25. package/es/engines/vite/plugin.d.ts +2 -0
  26. package/es/engines/vite/plugin.js +33 -5
  27. package/es/rules/answers.d.ts +13 -0
  28. package/es/rules/answers.js +94 -0
  29. package/es/rules/check.js +70 -1
  30. package/es/rules/index.d.ts +1 -0
  31. package/es/rules/index.js +1 -0
  32. package/es/rules/size.d.ts +31 -0
  33. package/es/rules/size.js +58 -0
  34. package/es/rules/types.d.ts +12 -0
  35. package/es/rules.json.js +2 -2
  36. package/package.json +2 -2
  37. package/rules.json +32 -3
  38. package/skills/_shared/always.md +3 -3
  39. package/skills/_shared/references/00-what-the-person-decides.md +1 -1
  40. package/skills/_shared/references/02-design-the-material.md +10 -7
  41. package/skills/_shared/references/03-create-the-project.md +2 -1
  42. package/skills/_shared/references/05-screen-code.md +49 -22
  43. package/skills/_shared/references/06-using-the-quiz-template.md +7 -6
  44. package/skills/_shared/references/08-fix-check-errors.md +23 -22
  45. package/skills/_shared/references/09-check.md +7 -6
  46. package/skills/_shared/references/12-upload-with-the-material-mcp.md +13 -13
  47. package/skills/_shared/references/13-edit-screen-design.md +122 -0
  48. package/skills/_shared/references/14-layouts.md +96 -0
  49. package/skills/elice-content-check/SKILL.md +2 -2
  50. package/skills/elice-content-create/SKILL.md +1 -1
  51. package/skills/elice-content-migrate/SKILL.md +1 -1
  52. package/templates/_shared/lib/cdk-mock.d.ts +30 -3
  53. package/templates/_shared/lib/cdk-mock.js +88 -15
  54. package/templates/_shared/lib/elice-content-editor.js +89 -58
  55. package/templates/_shared/lib/elice-content.css +1313 -126
  56. package/templates/_shared/lib/elice-content.d.ts +162 -23
  57. package/templates/_shared/lib/elice-content.js +865 -84
  58. package/templates/_shared/lib/icons/empty-content.d.ts +2 -0
  59. package/templates/_shared/lib/icons/empty-content.js +11 -0
  60. package/templates/_shared/lib/icons/file-video.d.ts +2 -0
  61. package/templates/_shared/lib/icons/file-video.js +11 -0
  62. package/templates/_shared/lib/icons/file.d.ts +2 -0
  63. package/templates/_shared/lib/icons/file.js +11 -0
  64. package/templates/blank/README.md +5 -3
  65. package/templates/blank/edit.html +8 -2
  66. package/templates/blank/index.html +6 -1
  67. package/templates/blank/instructor.html +6 -1
  68. package/templates/blank/template.json +1 -1
  69. package/templates/quiz/README.md +28 -12
  70. package/templates/quiz/core/behaviors.d.ts +13 -7
  71. package/templates/quiz/core/behaviors.js +36 -51
  72. package/templates/quiz/core/editor.d.ts +10 -0
  73. package/templates/quiz/core/editor.js +471 -8
  74. package/templates/quiz/core/markdown.d.ts +4 -0
  75. package/templates/quiz/core/markdown.js +65 -11
  76. package/templates/quiz/core/model.d.ts +34 -1
  77. package/templates/quiz/core/model.js +89 -7
  78. package/templates/quiz/core/rich-text.d.ts +19 -0
  79. package/templates/quiz/core/rich-text.js +521 -0
  80. package/templates/quiz/edit.html +12 -3
  81. package/templates/quiz/index.html +12 -3
  82. package/templates/quiz/screens/edit.js +848 -168
  83. package/templates/quiz/screens/learn.js +90 -14
  84. package/templates/quiz/styles.css +889 -213
  85. package/templates/quiz/template.json +9 -2
  86. package/templates/quiz/ui/templates/edit.d.ts +19 -6
  87. package/templates/quiz/ui/templates/edit.js +666 -87
  88. package/templates/quiz/ui/templates/group.js +19 -8
  89. package/templates/quiz/ui/templates/order.js +25 -24
  90. package/templates/quiz/ui/templates/page.js +19 -8
  91. package/templates/quiz/ui/templates/question.js +2 -2
  92. package/templates/quiz/ui/texts.js +104 -35
  93. package/templates/quiz/ui/theme.css +8 -9
  94. package/templates/steps/README.md +77 -0
  95. package/templates/steps/commentary.txt +7 -0
  96. package/templates/steps/edit.html +21 -0
  97. package/templates/steps/gitignore +4 -0
  98. package/templates/steps/index.html +69 -0
  99. package/templates/steps/metadata.json +9 -0
  100. package/templates/steps/package.json +13 -0
  101. package/templates/steps/screens/edit.js +32 -0
  102. package/templates/steps/screens/learn.js +108 -0
  103. package/templates/steps/styles.css +54 -0
  104. package/templates/steps/template.json +6 -0
@@ -21,6 +21,17 @@
21
21
  --ec-radius: var(--eds-radius);
22
22
  /* 떠 있는 요소(끄는 보기 등). 그림자는 두 테마 모두 검정 */
23
23
  --ec-shadow: 0 8px 24px rgb(0 0 0 / 0.16);
24
+ /* 편집 화면 (body.ec-edit-page, 아래 "편집 화면" 절): 회색 바탕 위 흰 카드 · 밑줄 칸 · 아래 저장 바 */
25
+ --ec-edit-bg: var(--eds-background-neutral);
26
+ --ec-edit-card: var(--eds-background-paper);
27
+ --ec-edit-hover-line: var(--eds-color-bluegray-400);
28
+ --ec-fill: var(--eds-color-bluegray-200);
29
+ --ec-fill-hover: var(--eds-color-bluegray-300);
30
+ --ec-toggle-on-bg: color-mix(in srgb, var(--eds-primary-main) 15%, var(--eds-common-white));
31
+ --ec-toggle-on-fg: var(--eds-primary-dark);
32
+ --ec-snackbar-fg: var(--eds-common-white);
33
+ /* 회색 바탕 위 상자 (파일 줄): 흰 면 + 구분선 테두리 (V3 수정 시안) */
34
+ --ec-edit-box: var(--eds-background-paper);
24
35
  font-family: var(--eds-font-family);
25
36
  font-size: var(--eds-fs-body2);
26
37
  font-weight: var(--eds-fw-medium);
@@ -32,6 +43,12 @@
32
43
  :root[data-eds-theme='dark'] {
33
44
  color-scheme: dark;
34
45
  --ec-shadow: 0 8px 24px rgb(0 0 0 / 0.48);
46
+ --ec-edit-hover-line: var(--eds-secondary-opacity05);
47
+ --ec-fill: var(--eds-color-gray-700);
48
+ --ec-fill-hover: var(--eds-color-gray-800);
49
+ --ec-toggle-on-bg: color-mix(in srgb, var(--eds-primary-main) 30%, var(--eds-common-black));
50
+ --ec-toggle-on-fg: var(--eds-primary-light);
51
+ --ec-snackbar-fg: var(--eds-common-black);
35
52
  }
36
53
  * {
37
54
  box-sizing: border-box;
@@ -63,14 +80,128 @@ p {
63
80
  color: var(--ec-muted);
64
81
  font-size: var(--eds-fs-body2);
65
82
  }
66
- /* 편집 화면이 아직 내용을 저장하지 않았을 때 (app.emptyState) */
83
+ /* 편집 화면이 아직 내용을 저장하지 않았을 때 (app.emptyState): 가운데 그림 112px + 제목 + 설명 (디자이너 시안).
84
+ 높이가 정해진 main(문서 학생 화면 100dvh)이면 세로 가운데. 그림 색은 경로 클래스(lib/icons/empty-content.js)에:
85
+ 밝은 = EDS 보라 토큰 (퀴즈 시안의 밝은 그림: 원 #eeeafe = elicepurple-100, 보라 점 #8567fe = elicepurple-600,
86
+ 카드 · 물음표 흰색, 줄 #f4f2fe ≈ elicepurple-50), 어두운 = 문서 학생 화면 시안의 고정값 (어두운 바탕 #212121 위) */
67
87
  .ec-empty {
68
- color: var(--ec-muted);
69
- border: 1px dashed var(--ec-border);
70
- border-radius: var(--ec-radius);
71
- padding: 32px 16px;
88
+ --ec-empty-art-bg: var(--eds-color-elicepurple-100);
89
+ --ec-empty-art-card: var(--eds-common-white);
90
+ --ec-empty-art-line: var(--eds-color-elicepurple-50);
91
+ --ec-empty-art-dot: var(--eds-color-elicepurple-600);
92
+ --ec-empty-art-mark: var(--eds-common-white);
93
+ --ec-empty-title: var(--ec-fg);
94
+ --ec-empty-desc: var(--eds-text-tertiary);
95
+ flex: 1;
96
+ display: flex;
97
+ flex-direction: column;
98
+ align-items: center;
99
+ justify-content: center;
100
+ gap: 8px;
101
+ min-height: 0;
102
+ padding: 48px 24px;
72
103
  text-align: center;
73
104
  }
105
+ /* 어두운 테마 화면, 또는 밝은 테마 화면 안의 어두운 바탕 (emptyState({ theme: 'dark' })) */
106
+ :root[data-eds-theme='dark'] .ec-empty,
107
+ .ec-empty[data-theme='dark'] {
108
+ --ec-empty-art-bg: #2f2b4a;
109
+ --ec-empty-art-card: #3d3860;
110
+ --ec-empty-art-line: #5a5388;
111
+ --ec-empty-art-dot: #9d86ff;
112
+ --ec-empty-art-mark: #ffffff;
113
+ --ec-empty-title: #ffffff;
114
+ --ec-empty-desc: #ffffffa6;
115
+ }
116
+ /* 화면에 빈 안내만 있으면 화면 높이의 가운데에 (main을 화면 높이로 늘림) */
117
+ body:has(> main > .ec-empty:only-child) {
118
+ display: flex;
119
+ flex-direction: column;
120
+ min-height: 100dvh;
121
+ }
122
+ body:has(> main > .ec-empty:only-child) > main {
123
+ flex: 1;
124
+ width: 100%;
125
+ }
126
+ .ec-empty-art {
127
+ display: block;
128
+ flex: none;
129
+ width: 112px;
130
+ height: 112px;
131
+ margin-bottom: 8px;
132
+ }
133
+ .ec-empty-art-bg {
134
+ fill: var(--ec-empty-art-bg);
135
+ }
136
+ .ec-empty-art-card {
137
+ fill: var(--ec-empty-art-card);
138
+ }
139
+ .ec-empty-art-line {
140
+ fill: var(--ec-empty-art-line);
141
+ }
142
+ .ec-empty-art-dot {
143
+ fill: var(--ec-empty-art-dot);
144
+ }
145
+ .ec-empty-art-mark {
146
+ fill: var(--ec-empty-art-mark);
147
+ }
148
+ .ec-empty-title {
149
+ margin: 0;
150
+ color: var(--ec-empty-title);
151
+ font-size: var(--eds-fs-subtitle1);
152
+ font-weight: var(--eds-fw-semibold);
153
+ line-height: 1.4;
154
+ }
155
+ .ec-empty-desc {
156
+ margin: 0;
157
+ color: var(--ec-empty-desc);
158
+ font-size: var(--eds-fs-body2);
159
+ line-height: 1.5;
160
+ }
161
+ /* 불러오는 동안의 자리 (skeleton()): 회색 면 위로 빛이 지나간다. "불러오는 중…"은 화면 읽기 프로그램에만.
162
+ 학습 화면(.ec-sk-learn) = 화면을 채우는 면 하나, 편집 화면(.ec-sk-edit) = 위에서부터 조각을 쌓는다 */
163
+ .ec-sk {
164
+ display: flex;
165
+ flex-direction: column;
166
+ gap: 16px;
167
+ }
168
+ .ec-sk-shimmer {
169
+ background: linear-gradient(
170
+ 90deg,
171
+ var(--eds-background-neutral) 25%,
172
+ color-mix(in srgb, var(--eds-text-primary) 8%, transparent) 50%,
173
+ var(--eds-background-neutral) 75%
174
+ )
175
+ 0 0 / 200% 100%;
176
+ animation: ec-sk-move 1.4s linear infinite;
177
+ }
178
+ @keyframes ec-sk-move {
179
+ to {
180
+ background-position: -200% 0;
181
+ }
182
+ }
183
+ /* 파일 줄(.ec-file-bar) 자리 */
184
+ .ec-sk-bar {
185
+ height: 48px;
186
+ border-radius: 8px;
187
+ }
188
+ /* 동영상 · 문서 미리보기 자리 */
189
+ .ec-sk-media {
190
+ width: 100%;
191
+ aspect-ratio: 16 / 9;
192
+ border-radius: 10px;
193
+ }
194
+ /* 높이가 정해진 main(동영상 · 문서 학습 화면 100dvh)이면 꽉 채우고, 아니면 240px */
195
+ .ec-sk-learn {
196
+ width: 100%;
197
+ height: 100%;
198
+ min-height: 240px;
199
+ }
200
+ @media (prefers-reduced-motion: reduce) {
201
+ .ec-sk-shimmer {
202
+ animation: none;
203
+ }
204
+ }
74
205
  .ec-card {
75
206
  border: 1px solid var(--ec-border);
76
207
  border-radius: var(--ec-radius);
@@ -153,7 +284,7 @@ button.ec-primary {
153
284
  background: var(--ec-accent);
154
285
  color: var(--eds-primary-contrast-text);
155
286
  }
156
- button.ec-primary:hover {
287
+ button.ec-primary:hover:not(:disabled) {
157
288
  background: var(--ec-accent-dark);
158
289
  }
159
290
  button:disabled {
@@ -201,6 +332,26 @@ button:disabled {
201
332
  background: var(--ec-no-bg);
202
333
  color: var(--ec-no);
203
334
  }
335
+ /* 제출 직후 결과를 화면 안으로 옮길 때 아래 고정 제출 바에 가리지 않게 (키트가 바 높이로 다시 맞춤). 위 화면 영역과 띄움 */
336
+ .ec-result {
337
+ margin-top: 16px;
338
+ scroll-margin-bottom: 96px;
339
+ }
340
+ /* 같은 답이라 제출 버튼이 꺼졌을 때 버튼 옆 안내 */
341
+ .ec-submit-hint {
342
+ margin: 0;
343
+ color: var(--ec-muted);
344
+ font-size: var(--eds-fs-body2);
345
+ }
346
+ @media (max-width: 511.98px) {
347
+ .ec-submitbar:has(.ec-submit-hint:not([hidden])) {
348
+ flex-wrap: wrap;
349
+ }
350
+ .ec-submit-hint {
351
+ flex-basis: 100%;
352
+ text-align: center;
353
+ }
354
+ }
204
355
  .ec-error {
205
356
  color: var(--ec-no);
206
357
  font-size: var(--eds-fs-body2);
@@ -483,169 +634,1158 @@ button.ec-text-button {
483
634
  display: none !important;
484
635
  }
485
636
 
486
- /* 여러 단계 (app.usePaging): 양옆 동그란 화살표 = 자료 안 단계 이동 (EDS IconButton outlined 40px).
487
- 첫 · 마지막 단계에서 나가는 버튼은 글자 있는 알약(이전 자료 · 다음 자료)으로 모양을 달리한다.
488
- LXP가 자료 아래에 수업 자료 사이 이전 · 다음 막대를 그리므로, 자료 안에는 아래 막대를 두지 않는다 */
489
- /* 옆 여백은 끝 단계의 알약(약 80px)이 들어가는 96px로 늘 잡는다. 알약이 보일 때만 넓히면 단계마다 내용 폭이 바뀐다 */
490
- .ec-paging {
637
+ /* ---------- 레이아웃 ----------
638
+ 콘텐츠 레이아웃: 한 화면(스테퍼면 한 단계)의 칸 배치. <div data-ec-layout="split"> 안에 이름 붙은 칸
639
+ data-ec-region="main | aside | stage | controls | readout | actions"을 두고 내용은 칸 안에만 (제목 h1–h3은 칸 밖 맨 위 가능).
640
+ CSS만이라 자바스크립트 없이 학생 · 교육자 화면 어디에나 붙는다. 값은 --ec-layout-* 토큰으로 */
641
+ :root {
642
+ /* 읽기 폭 (single) · 넓은 레이아웃 폭 (split · stage · media) · 칸 사이 */
643
+ --ec-layout-max: 720px;
644
+ --ec-layout-wide: 1200px;
645
+ --ec-layout-gap: 24px;
646
+ /* split의 옆 칸(aside) 폭 */
647
+ --ec-panel-width: 40%;
648
+ /* stage의 무대 높이: 무대 · 실시간 값 · 조작이 첫 화면에 같이 보이게 */
649
+ --ec-stage-height: min(56dvh, 520px);
650
+ /* stage에 실시간 값(readout)이 있으면 무대 위쪽 이만큼은 실시간 값 자리: 무대 그림은 그 아래부터 (값이 그림을 덮지 않게) */
651
+ --ec-readout-safe: 56px;
652
+ /* 스테퍼 옆 여백: 가장자리 10px + 끝 단계 알약("다음 자료", 약 95px)이 내용에 닿지 않는 폭 */
653
+ --ec-nav-gutter: 112px;
654
+ /* 오른쪽 아래 비울 자리: LXP 플로팅 버튼(⊞ · ✦, iframe 밖)과 겹치지 않게 (추정 값) */
655
+ --ec-fab-safe: 72px;
656
+ /* 낮은 창(iframe 높이 520px 이하, LXP 최소 512px)에서 이전 · 다음을 세로 가운데보다 올리는 거리: LXP ⊞ 버튼 위로 */
657
+ --ec-nav-short-shift: 50px;
658
+ /* 스테퍼 버튼 (문서 자료 학생 화면의 쪽 넘김과 같은 모양): 테두리 1px 원(32px, 모바일 40px), 채움 · 그림자 없음,
659
+ 꺾쇠 16px은 secondary 색. 막히면 글자색만 흐리게, 마우스를 올리면 action-hover 바탕. 보라(강조색)는 쓰지 않는다 */
660
+ --ec-nav-size: 32px;
661
+ --ec-nav-size-mobile: 40px;
662
+ /* 모바일 아래 비울 자리: 화면 아래 12px에 뜬 버튼 줄(40px) + 띄움 20px. 내용 맨 끝의 조작 · 버튼이 그 밑에 깔리지 않게 */
663
+ --ec-nav-reserve-mobile: calc(var(--ec-nav-size-mobile) + 12px + 20px);
664
+ /* 모바일 스테퍼 stage 단계: 무대의 최소 높이, 단계 위쪽(화면 맨 위 여백 body padding)까지 */
665
+ --ec-stage-min-mobile: 160px;
666
+ --ec-stage-top-mobile: 24px;
667
+ --ec-nav-icon: 16px;
668
+ /* 화면 가장자리에서 버튼까지 */
669
+ --ec-nav-inset: 10px;
670
+ /* 면은 바탕색과 같게 (채움이 없어 보이되, 아래로 지나가는 내용이 비치지 않게). 어두운 테마는 EDS 토큰이 바꾼다
671
+ (테두리 #ffffff3b · 꺾쇠 흰색 · 막힘 #ffffff80 · hover #ffffff14, 문서 자료 어두운 화면과 같음) */
672
+ --ec-nav-bg: var(--ec-bg);
673
+ --ec-nav-fg: var(--eds-secondary-main);
674
+ --ec-nav-border: var(--eds-surface-border);
675
+ --ec-nav-disabled-fg: var(--eds-text-disabled);
676
+ --ec-nav-hover-bg: var(--eds-action-hover);
677
+ /* 단계 표시 "1 / 6": 두 버튼 사이(모바일) · 왼쪽 아래(데스크톱)의 테두리 알약, 14px(모바일 15px) / 600 secondary */
678
+ --ec-nav-count-size: var(--eds-fs-body2);
679
+ }
680
+ /* 레이아웃이 있는 main은 폭을 레이아웃에 맡긴다 (single은 읽기 폭, 나머지는 넓은 폭) */
681
+ main:has([data-ec-layout]) {
682
+ max-width: none;
683
+ }
684
+ [data-ec-layout] {
685
+ display: grid;
686
+ gap: var(--ec-layout-gap);
687
+ width: 100%;
688
+ max-width: var(--ec-layout-wide);
689
+ margin-inline: auto;
690
+ align-content: start;
691
+ /* 마지막 줄을 오른쪽 아래(LXP 플로팅 버튼) 위로 올릴 수 있게 */
692
+ padding-bottom: var(--ec-fab-safe);
693
+ }
694
+ /* 칸 밖 제목은 한 줄 전체. 레이아웃 안 제목 · 문단의 기본 여백은 빼고 칸 사이 간격(gap)으로 띄운다 */
695
+ [data-ec-layout] > :is(h1, h2, h3) {
696
+ grid-column: 1 / -1;
697
+ }
698
+ /* 단계 · 화면 제목(레이아웃 바로 아래 h2): EDS h6 크기, semibold (퀴즈 최종 시안의 제목 굵기) */
699
+ [data-ec-layout] > h2 {
700
+ font-size: var(--eds-fs-h6);
701
+ line-height: var(--eds-lh-h6);
702
+ font-weight: var(--eds-fw-semibold);
703
+ }
704
+ [data-ec-layout] :is(h1, h2, h3, h4, p) {
705
+ margin: 0;
706
+ }
707
+ [data-ec-region] {
708
+ min-width: 0;
709
+ display: flex;
710
+ flex-direction: column;
711
+ gap: 16px;
712
+ }
713
+ /* 빈 칸은 자리를 차지하지 않는다 (첫 화면 빈 띠 방지) */
714
+ [data-ec-region]:empty {
715
+ display: none;
716
+ }
717
+ /* 칸 안에 붙은 제출 바 · 결과 줄 (useSubmit의 root가 칸 안 요소): 칸 폭을 채운다 (가운데 정렬 margin auto로 줄어들지 않게) */
718
+ [data-ec-region] > :is(.ec-submitbar, .ec-result) {
719
+ width: 100%;
720
+ }
721
+ [data-ec-region='actions'] {
722
+ flex-direction: row;
723
+ flex-wrap: wrap;
724
+ justify-content: flex-end;
725
+ align-items: center;
726
+ gap: 8px;
727
+ }
728
+ /* single: 읽기 폭 한 줄 (설명 · 개념 글, 퀴즈 문항, 설문) */
729
+ [data-ec-layout='single'] {
730
+ max-width: var(--ec-layout-max);
731
+ }
732
+ /* split: main | aside 두 칸 (설명 + 실습, 코드 + 결과). 좁으면 위아래 */
733
+ [data-ec-layout='split'] {
734
+ grid-template-columns: minmax(0, 1fr) minmax(0, var(--ec-panel-width));
735
+ }
736
+ [data-ec-layout='split'] > [data-ec-region='actions'] {
737
+ grid-column: 1 / -1;
738
+ }
739
+ /* stage: 무대(그림) 위 모서리에 실시간 값(readout), 무대 바로 아래 조작(controls). 위에 짧은 안내(main) · 아래 설명(aside).
740
+ 칸이 없는 줄은 높이 0이 되도록 줄 사이 gap 대신 칸 아래 여백으로 띄운다 (무대 위 모서리의 실시간 값 자리가 어긋나지 않게) */
741
+ [data-ec-layout='stage'] {
742
+ grid-template-columns: minmax(0, 1fr);
743
+ grid-template-areas: 'head' 'main' 'stage' 'controls' 'aside' 'actions';
744
+ row-gap: 0;
745
+ }
746
+ [data-ec-layout='stage'] > :not([data-ec-region='readout']) {
747
+ margin-bottom: 16px;
748
+ }
749
+ [data-ec-layout='stage'] > :is(h1, h2, h3) {
750
+ grid-area: head;
751
+ }
752
+ [data-ec-layout='stage'] > [data-ec-region='main'] {
753
+ grid-area: main;
754
+ }
755
+ [data-ec-layout='stage'] > [data-ec-region='aside'] {
756
+ grid-area: aside;
757
+ }
758
+ [data-ec-layout='stage'] > [data-ec-region='stage'] {
759
+ grid-area: stage;
491
760
  position: relative;
492
- padding-inline: 96px;
761
+ height: var(--ec-stage-height);
762
+ display: grid;
763
+ place-items: center;
764
+ overflow: hidden;
765
+ /* 퀴즈 카드와 같은 상자: 모서리 12px, 테두리 1px, 그림자 없음 */
766
+ border: 1px solid var(--ec-border);
767
+ border-radius: 12px;
768
+ background: var(--ec-surface);
493
769
  }
494
- .ec-step-nav {
770
+ /* 무대 바로 아래 그림(canvas · svg · img · video)은 무대 칸을 꽉 채운다. 가운데 정렬 격자 안에서는 height: 100%가 풀리지 않고
771
+ canvas가 그림 버퍼(width · height 속성) 크기로 늘어나 넘치므로, 칸에 절대 위치로 붙인다. 비율이 다르면 contain으로 맞춤.
772
+ canvas 버퍼를 화면 크기 × devicePixelRatio로 맞추는 것은 작성자 몫 (lib/elice-content.js fitCanvas) */
773
+ [data-ec-layout='stage'] > [data-ec-region='stage'] > :is(canvas, svg, img, video) {
495
774
  position: absolute;
496
- top: 50%;
497
- translate: 0 -50%;
775
+ top: var(--ec-stage-inset-top, 0px);
776
+ left: 0;
777
+ display: block;
778
+ width: 100%;
779
+ height: calc(100% - var(--ec-stage-inset-top, 0px));
780
+ max-width: none;
781
+ max-height: none;
782
+ object-fit: contain;
783
+ }
784
+ /* 실시간 값이 있는 stage: 무대 위쪽 띠(--ec-readout-safe)를 비워 두고 값은 그 띠의 오른쪽에 한 줄로 */
785
+ [data-ec-layout='stage']:has(> [data-ec-region='readout']) > [data-ec-region='stage'] {
786
+ --ec-stage-inset-top: var(--ec-readout-safe);
787
+ padding-top: var(--ec-readout-safe);
788
+ }
789
+ [data-ec-layout='stage'] > [data-ec-region='readout'] {
790
+ grid-area: stage;
498
791
  z-index: 1;
499
- min-width: 40px;
500
- height: 40px;
501
- padding: 0;
502
- border-radius: 999px;
792
+ align-self: start;
793
+ justify-self: end;
794
+ flex-direction: row;
795
+ flex-wrap: wrap;
796
+ justify-content: flex-end;
797
+ align-items: baseline;
798
+ max-width: calc(100% - 24px);
799
+ margin: 10px 12px;
800
+ padding: 6px 12px;
801
+ gap: 2px 16px;
503
802
  border: 1px solid var(--ec-border);
803
+ border-radius: 12px;
504
804
  background: var(--ec-bg);
505
- color: var(--eds-action-active);
506
- font-size: 24px;
507
- line-height: 1;
508
- cursor: pointer;
805
+ font-variant-numeric: tabular-nums;
509
806
  }
510
- .ec-step-nav:hover {
511
- background: var(--eds-action-hover);
807
+ [data-ec-layout='stage'] > [data-ec-region='controls'] {
808
+ grid-area: controls;
809
+ flex-direction: row;
810
+ flex-wrap: wrap;
811
+ align-items: center;
812
+ gap: 12px 24px;
512
813
  }
513
- .ec-step-nav.prev {
514
- left: 0;
814
+ [data-ec-layout='stage'] > [data-ec-region='actions'] {
815
+ grid-area: actions;
515
816
  }
516
- .ec-step-nav.next {
517
- right: 0;
817
+ /* media: 16:9 칸이 화면 폭 · 높이에 맞고 아래 짧은 설명 (동영상 · PDF/PPT) */
818
+ [data-ec-layout='media'] > [data-ec-region='main'] {
819
+ width: min(100%, calc((100dvh - 160px) * 16 / 9));
820
+ aspect-ratio: 16 / 9;
821
+ justify-self: center;
822
+ overflow: hidden;
823
+ border-radius: var(--ec-radius);
824
+ background: var(--ec-surface);
518
825
  }
519
- .ec-step-nav.leave {
520
- padding: 0 12px;
521
- border-color: var(--ec-accent);
522
- background: var(--ec-accent-bg);
523
- color: var(--ec-accent);
524
- font-size: var(--eds-fs-caption);
525
- font-weight: var(--eds-fw-semibold);
526
- white-space: nowrap;
826
+ [data-ec-layout='media'] > [data-ec-region='main'] > :is(video, img, canvas, svg) {
827
+ width: 100%;
828
+ height: 100%;
829
+ object-fit: contain;
527
830
  }
528
- .ec-step-count {
529
- margin: 12px 0 0;
530
- color: var(--ec-muted);
531
- font-size: var(--eds-fs-body2);
831
+ @media (max-width: 767.98px) {
832
+ [data-ec-layout='split'] {
833
+ grid-template-columns: minmax(0, 1fr);
834
+ }
835
+ }
836
+ @media (max-width: 511.98px) {
837
+ :root {
838
+ --ec-layout-gap: 16px;
839
+ --ec-stage-height: min(48dvh, 360px);
840
+ /* 좁으면 값이 두 줄이 될 수 있어 띠를 넓힌다 */
841
+ --ec-readout-safe: 72px;
842
+ }
843
+ }
844
+
845
+ /* 여러 단계 (app.useStepper, 옛 이름 usePaging): 키트 틀 .ec-stepper가 내용 영역을 감싸고, 이전 · 다음 버튼과 n / N은
846
+ <ec-stepper-nav>(Shadow DOM) 안에서 키트가 그린다 (고치지 못함). 첫 · 마지막 단계에서 나가는 버튼은 글자 있는 알약.
847
+ LXP가 자료 아래에 수업 자료 사이 이전 · 다음 막대를 그리므로, 자료 안에는 화면 폭 아래 막대를 두지 않는다.
848
+ 옆 여백은 끝 단계의 알약이 들어가는 --ec-nav-gutter로 늘 잡는다 (알약이 보일 때만 넓히면 단계마다 내용 폭이 바뀜) */
849
+ .ec-stepper {
850
+ position: relative;
851
+ padding-inline: var(--ec-nav-gutter);
852
+ padding-bottom: 40px;
853
+ }
854
+ /* 스테퍼 안에서는 단계마다 레이아웃 폭이 달라도(single 720px · 나머지 1200px) 제목 · 내용이 같은 왼쪽 끝에서 시작한다:
855
+ single 단계도 넓은 폭 칸에 왼쪽으로 붙이고 읽기 폭(--ec-layout-max)은 그 안 내용에만 */
856
+ .ec-stepper [data-ec-layout='single'] {
857
+ max-width: var(--ec-layout-wide);
858
+ }
859
+ .ec-stepper [data-ec-layout='single'] > * {
860
+ max-width: var(--ec-layout-max);
861
+ }
862
+ /* 단계를 넘기면 키트가 단계 제목에 초점을 옮긴다 (화면 읽기 프로그램이 제목부터 읽게). 누르는 요소가 아니라 테두리는 그리지 않는다 */
863
+ .ec-step-content [tabindex='-1']:focus {
864
+ outline: none;
532
865
  }
533
866
  @media (max-width: 511.98px) {
534
- .ec-paging {
867
+ /* 모바일: 버튼 줄이 화면 아래 가운데에 떠 있으니 그만큼 아래를 비운다 (--ec-nav-reserve-mobile) */
868
+ .ec-stepper {
535
869
  padding-inline: 0;
536
- padding-bottom: 56px;
870
+ padding-bottom: var(--ec-nav-reserve-mobile);
537
871
  }
538
- .ec-step-nav {
539
- top: auto;
540
- bottom: 0;
541
- translate: none;
872
+ /* 스테퍼가 있는 화면의 제출 바: 화면 아래에 붙되 버튼은 스테퍼 버튼 줄 위로 올린다. 바 바탕이 줄 뒤까지 내려와
873
+ 줄과 바 사이로 내용이 비치지 않는다 (useSubmit을 스테퍼 앞 · 뒤 어디서 불러도: 틀 안 · 밖 모두) */
874
+ body:not(.ec-edit-page):has(.ec-stepper) .ec-submitbar {
875
+ padding-bottom: var(--ec-nav-reserve-mobile);
542
876
  }
543
- .ec-step-count {
544
- text-align: center;
877
+ /* 모바일 스테퍼의 stage 단계: 첫 화면에서 조작 · 버튼이 아래 버튼 줄 밑에 깔리지 않게, 단계가 줄 위까지의 화면 높이를
878
+ 채우고 무대가 남는 높이만 쓴다 (최소 --ec-stage-min-mobile). 내용이 더 많으면 단계가 길어지고 맨 끝은 위 여백으로 비운다 */
879
+ .ec-stepper [data-ec-layout='stage'] {
880
+ grid-template-rows: auto auto minmax(var(--ec-stage-min-mobile), 1fr) auto auto auto;
881
+ min-height: calc(100dvh - var(--ec-stage-top-mobile) - var(--ec-nav-reserve-mobile));
882
+ padding-bottom: 0;
883
+ }
884
+ .ec-stepper [data-ec-layout='stage'] > [data-ec-region='stage'] {
885
+ height: auto;
886
+ min-height: var(--ec-stage-min-mobile);
545
887
  }
546
888
  }
547
889
 
548
- /* 내용 편집기 (lib/elice-content-editor.js useContentEditor): 폼 보기 · 코드 보기 탭.
549
- 칸은 EDS OutlinedInput(위 input 규칙), 목록 줄 · 카드는 개발 가이드 5 UI 패턴(⠿ 손잡이 · 빨간 ✕ · 휴지통) */
550
- .ec-json {
890
+ /* ---------- 편집 화면 (디자이너 시안 V3 · 퀴즈 템플릿 1.4.0 편집 화면을 키트로 옮김) ----------
891
+ <body class="ec-edit-page">: 회색 바탕(EDS background.neutral) 위에 흰 카드, 라벨 대신 placeholder를 쓰는 밑줄 칸,
892
+ 선택 칸은 "+ 추가" 버튼 뒤에 숨기고, 화면 아래에 붙는 흰 저장 바. 값은 EDS 명세(elice-design-system@7f3366a)를 따른다.
893
+ 퀴즈 · 동영상 · 문서(PDF/PPT) · blank 내용 편집기가 같은 클래스를 쓴다 (템플릿 styles.css에는 그 자료만의 모양만).
894
+ 쓰는 법 · 배치 규칙: 스킬 references/13-edit-screen-design.md */
895
+ :root:has(body.ec-edit-page) {
896
+ /* background.neutral은 라이트에서 4% 투명이라 기본 바탕 위에 겹쳐 같은 색으로 보이되 뒤가 비치지 않게 한다 */
897
+ --ec-edit-page-bg: linear-gradient(var(--ec-edit-bg), var(--ec-edit-bg)), var(--eds-background-default);
898
+ background: var(--ec-edit-page-bg);
899
+ }
900
+ /* 화면 높이가 남으면 저장 바를 맨 아래에 두고, 내용이 길면 화면 아래에 붙여 둔다 */
901
+ body.ec-edit-page {
902
+ min-height: 100vh;
903
+ min-height: 100dvh;
551
904
  display: flex;
552
905
  flex-direction: column;
553
- gap: 16px;
906
+ padding: 24px 16px 0;
554
907
  }
555
- .ec-json-note {
556
- padding: 10px 12px;
557
- border-radius: var(--ec-radius);
558
- background: var(--ec-info-bg);
559
- color: var(--ec-info);
560
- font-size: var(--eds-fs-body2);
561
- word-break: keep-all;
908
+ body.ec-edit-page main {
909
+ width: 100%;
910
+ flex: 1;
911
+ padding-bottom: 24px;
912
+ }
913
+ /* 저장 바: 화면 너비 전체 흰 바 + 위 구분선, 버튼은 가운데 720px 열의 오른쪽 끝 */
914
+ body.ec-edit-page .ec-submitbar {
915
+ max-width: none;
916
+ margin: 0 -16px;
917
+ padding: 8px max(16px, calc((100% - 720px) / 2));
918
+ z-index: 8;
919
+ border-top: 1px solid var(--ec-line);
920
+ background: var(--eds-background-paper);
562
921
  }
563
- /* 탭: EDS ToggleButton 모양, 고른 쪽은 primary */
564
- .ec-json-tabs {
565
- display: inline-flex;
566
- align-self: flex-start;
567
- gap: 2px;
568
- padding: 2px;
569
- border: 1px solid var(--ec-border);
570
- border-radius: calc(var(--ec-radius) + 2px);
922
+ /* 저장 버튼: EDS Button contained · secondary · medium (40px, 모서리 8px). 버튼 이름은 템플릿마다 (useSave label) */
923
+ body.ec-edit-page .ec-submitbar button {
924
+ min-height: 40px;
925
+ height: auto;
926
+ border-radius: 8px;
927
+ font-size: 14px;
928
+ font-weight: var(--eds-fw-semibold);
571
929
  }
572
- .ec-json-tabs button {
573
- min-height: 36px;
574
- padding: 4px 14px;
575
- border: 0;
576
- color: var(--ec-muted);
930
+ /* 저장 버튼: EDS Button contained · color secondary (라이트 검정 · 다크 흰색) */
931
+ body.ec-edit-page .ec-submitbar button.ec-primary {
932
+ background: var(--eds-secondary-main);
933
+ color: var(--eds-secondary-contrast-text);
577
934
  }
578
- .ec-json-tabs button[aria-selected='true'] {
579
- background: var(--ec-accent-bg);
580
- color: var(--ec-accent);
935
+ @media (hover: hover) {
936
+ body.ec-edit-page .ec-submitbar button.ec-primary:hover {
937
+ background: var(--eds-secondary-light);
938
+ }
581
939
  }
582
- .ec-json-form {
940
+ body.ec-edit-page .ec-submitbar button.ec-primary:focus-visible,
941
+ body.ec-edit-page .ec-submitbar button.ec-primary:active {
942
+ background: var(--eds-secondary-dark);
943
+ outline: 2px solid var(--eds-secondary-opacity04);
944
+ outline-offset: 2px;
945
+ }
946
+ body.ec-edit-page .ec-submitbar button.ec-primary:disabled {
947
+ background: var(--eds-action-disabled-background);
948
+ color: var(--eds-action-disabled);
949
+ }
950
+ /* 맨 위 mock 안내 줄: 옅은 색이 투명이라 흰 면 위에 겹쳐 아래로 지나가는 글이 비치지 않게 */
951
+ body.ec-edit-page #elice-status {
952
+ background: linear-gradient(var(--ec-accent-bg), var(--ec-accent-bg)), var(--eds-background-paper);
953
+ }
954
+ /* 키트가 그리는 채점 방식 블록 · 내용 편집기의 묶음도 편집 화면에서는 흰 카드 */
955
+ body.ec-edit-page .ec-grading {
956
+ padding: 20px;
957
+ border-radius: 12px;
958
+ background: var(--ec-edit-card);
959
+ }
960
+
961
+ /* 카드: 항목 하나(문항 · 단계 · 슬라이드)마다 하나. 테두리 없이 흰 면 */
962
+ .ec-edit-card {
583
963
  display: flex;
584
964
  flex-direction: column;
585
965
  gap: 16px;
966
+ min-width: 0;
967
+ padding: 20px;
968
+ border: 0;
969
+ border-radius: 12px;
970
+ background: var(--ec-edit-card);
586
971
  }
587
- .ec-json-field {
972
+ /* 카드 머리: 이름(굵게) · 종류 고르기 · 오른쪽 끝에 ↑ ↓ 삭제. 좁아도 줄을 넘기지 않고 고르기 칸이 줄어든다 */
973
+ .ec-edit-card-head {
588
974
  display: flex;
589
- flex-direction: column;
590
- gap: 6px;
975
+ flex-wrap: nowrap;
976
+ align-items: center;
977
+ gap: 8px;
591
978
  min-width: 0;
979
+ font-size: var(--eds-fs-subtitle2);
980
+ font-weight: var(--eds-fw-semibold);
592
981
  }
593
- .ec-json-field > label,
594
- .ec-json-group > legend,
595
- .ec-json-list > legend {
982
+ .ec-edit-card-head > strong {
983
+ flex: none;
984
+ margin-right: 4px;
985
+ white-space: nowrap;
596
986
  font-weight: var(--eds-fw-semibold);
597
987
  }
598
- .ec-json-required {
599
- color: var(--ec-no);
988
+ .ec-edit-card-head > select {
989
+ width: auto;
990
+ min-width: 0;
991
+ flex: 0 1 auto;
992
+ margin-right: auto;
993
+ text-overflow: ellipsis;
994
+ font-size: var(--eds-fs-body2);
995
+ font-weight: 400;
600
996
  }
601
- .ec-json-hint {
602
- color: var(--ec-muted);
603
- font-size: var(--eds-fs-caption);
604
- word-break: keep-all;
997
+ /* 머리 이름 뒤 남는 자리를 채워 버튼을 오른쪽으로 (고르기 칸이 없을 때) */
998
+ .ec-edit-card-head > .ec-edit-card-title {
999
+ flex: 1 1 auto;
1000
+ margin-right: 0;
1001
+ min-width: 0;
1002
+ overflow: hidden;
1003
+ text-overflow: ellipsis;
1004
+ white-space: nowrap;
605
1005
  }
606
- .ec-json-error {
607
- font-size: var(--eds-fs-caption);
1006
+ /* 카드 안 아이콘 버튼: EDS IconButton default · small (28px 원, 아이콘 20px, action.active). 삭제 ✕도 중립색 */
1007
+ .ec-edit-card button.ec-icon-button,
1008
+ .ec-edit-card button.ec-icon-button.ec-danger {
1009
+ width: 28px;
1010
+ height: 28px;
1011
+ min-height: 28px;
1012
+ padding: 0;
1013
+ border-radius: 50%;
1014
+ background: none;
1015
+ color: var(--eds-action-active);
608
1016
  }
609
- .ec-json [aria-invalid='true'] {
610
- border-color: var(--ec-no);
1017
+ .ec-edit-card button.ec-icon-button svg {
1018
+ width: 20px;
1019
+ height: 20px;
611
1020
  }
612
- /* 켜고 끄기: 체크박스를 스위치 모양으로 */
613
- .ec-json-switch {
614
- flex-direction: row;
615
- flex-wrap: wrap;
616
- align-items: center;
617
- gap: 10px;
1021
+ @media (hover: hover) {
1022
+ .ec-edit-card button.ec-icon-button:hover {
1023
+ background: var(--eds-action-hover);
1024
+ }
618
1025
  }
619
- .ec-json-switch input {
620
- appearance: none;
621
- position: relative;
622
- flex: none;
623
- width: 40px;
624
- height: 24px;
625
- padding: 0;
626
- border: 0;
627
- border-radius: 12px;
628
- background: var(--eds-action-disabled-background);
629
- cursor: pointer;
630
- transition: background-color 150ms ease-in-out;
1026
+ .ec-edit-card button.ec-icon-button:active,
1027
+ .ec-edit-card button.ec-icon-button:focus-visible {
1028
+ background: var(--eds-action-focus);
631
1029
  }
632
- .ec-json-switch input::after {
633
- content: '';
634
- position: absolute;
635
- top: 3px;
636
- left: 3px;
637
- width: 18px;
638
- height: 18px;
639
- border-radius: 50%;
640
- background: var(--eds-common-white, #fff);
641
- box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
642
- transition: translate 150ms ease-in-out;
1030
+ .ec-edit-card button.ec-icon-button:disabled {
1031
+ background: none;
1032
+ color: var(--eds-action-disabled);
643
1033
  }
644
- .ec-json-switch input:checked {
645
- background: var(--ec-accent);
1034
+ /* 카드 머리의 ↑ ↓ 삭제: EDS IconButton outlined · small 크기(30px)에 모서리 4px 사각형 (디자인 요청) */
1035
+ .ec-edit-card-head button.ec-icon-button,
1036
+ .ec-edit-card-head button.ec-icon-button.ec-danger {
1037
+ width: 30px;
1038
+ height: 30px;
1039
+ min-height: 30px;
1040
+ border: 1px solid var(--eds-surface-border);
1041
+ border-radius: 4px;
1042
+ }
1043
+ /* 자료 제목 · 안내 묶음: 맨 위 카드 하나. 여백 28px · 모서리 16px로 항목 카드와 구분하고, 제목 아래에 구분선.
1044
+ 칸 밑줄은 평소에 숨기고 (밑줄이 이어지는 번잡함) 마우스를 올리면 옅게, 초점이면 굵은 보라 밑줄 */
1045
+ .ec-edit-card.ec-edit-info {
1046
+ gap: 12px;
1047
+ padding: 28px;
1048
+ border-radius: 16px;
646
1049
  }
647
- .ec-json-switch input:checked::after {
648
- translate: 16px 0;
1050
+ .ec-edit-info > .ec-field-title {
1051
+ padding-bottom: 12px;
1052
+ border-bottom: 1px solid var(--eds-surface-border);
1053
+ }
1054
+ .ec-edit-info .ec-field-input {
1055
+ border-bottom-color: transparent;
1056
+ }
1057
+ .ec-edit-info .ec-field-input:hover:not(:focus) {
1058
+ border-bottom-color: var(--ec-edit-hover-line);
1059
+ }
1060
+
1061
+ /* 밑줄 칸: 보이는 라벨 대신 placeholder(+ aria-label)로 무슨 칸인지 알린다. 크기: title · question · body(기본).
1062
+ 의미가 자리로 드러나지 않는 칸(단위 · 값 등)은 위에 작은 라벨(.ec-field-label)을 둔다 */
1063
+ .ec-field {
1064
+ position: relative;
1065
+ display: flex;
1066
+ flex-direction: column;
1067
+ gap: 4px;
1068
+ min-width: 0;
1069
+ }
1070
+ .ec-field-label {
1071
+ color: var(--eds-text-primary);
1072
+ font-size: var(--eds-fs-body2);
1073
+ font-weight: var(--eds-fw-semibold);
1074
+ }
1075
+ /* 이름 뒤 "선택" (필수가 아닌 칸) */
1076
+ .ec-optional {
1077
+ margin-left: 6px;
1078
+ color: var(--eds-text-tertiary);
1079
+ font-weight: 400;
1080
+ }
1081
+ /* 밑줄 칸의 글은 12px 안쪽에서 시작하므로 위 라벨 · 아래 도움말도 같은 선에 맞춘다 */
1082
+ .ec-field > .ec-field-label,
1083
+ .ec-field > .ec-field-hint {
1084
+ padding-inline: 12px;
1085
+ }
1086
+ .ec-field-label .ec-required {
1087
+ color: var(--ec-no);
1088
+ }
1089
+ input.ec-field-input,
1090
+ textarea.ec-field-input,
1091
+ select.ec-field-input {
1092
+ width: 100%;
1093
+ padding: 8px 12px;
1094
+ border: 0;
1095
+ border-bottom: 1px solid var(--ec-border);
1096
+ border-radius: var(--ec-radius) var(--ec-radius) 0 0;
1097
+ background-color: transparent;
1098
+ color: var(--eds-text-primary);
1099
+ line-height: 1.5;
1100
+ transition:
1101
+ border-color 120ms ease,
1102
+ box-shadow 120ms ease;
1103
+ }
1104
+ .ec-field-input::placeholder {
1105
+ color: var(--eds-text-disabled);
1106
+ }
1107
+ .ec-field-input:hover {
1108
+ border-bottom-color: var(--ec-edit-hover-line);
1109
+ }
1110
+ .ec-field-input:focus {
1111
+ outline: none;
1112
+ border-bottom-color: transparent;
1113
+ box-shadow: inset 0 -2px 0 var(--ec-accent);
1114
+ }
1115
+ /* 비운 채 저장한 필수 칸 · 검사에 걸린 칸 */
1116
+ .ec-field-input[aria-invalid='true'] {
1117
+ border-bottom-color: transparent;
1118
+ box-shadow: inset 0 -2px 0 var(--ec-no);
1119
+ }
1120
+ /* 여러 줄 칸: 글에 맞춰 높이가 는다 */
1121
+ textarea.ec-field-input {
1122
+ resize: none;
1123
+ overflow: hidden;
1124
+ min-height: 0;
1125
+ field-sizing: content;
1126
+ }
1127
+ .ec-field-title .ec-field-input {
1128
+ font-size: var(--eds-fs-h6);
1129
+ font-weight: var(--eds-fw-bold);
1130
+ }
1131
+ .ec-field-question .ec-field-input {
1132
+ font-size: var(--eds-fs-subtitle2);
1133
+ font-weight: var(--eds-fw-semibold);
1134
+ }
1135
+ .ec-field-body .ec-field-input {
1136
+ font-size: var(--eds-fs-body2);
1137
+ color: var(--eds-text-secondary);
1138
+ }
1139
+ /* 글자 수: 칸에 초점이 있을 때만 칸 아래 오른쪽에 */
1140
+ .ec-field-count {
1141
+ position: absolute;
1142
+ top: 100%;
1143
+ right: 0;
1144
+ margin-top: 2px;
1145
+ visibility: hidden;
1146
+ color: var(--eds-text-secondary);
1147
+ font-size: var(--eds-fs-caption);
1148
+ }
1149
+ .ec-field:focus-within .ec-field-count {
1150
+ visibility: visible;
1151
+ }
1152
+ .ec-field-hint {
1153
+ margin: 0;
1154
+ color: var(--eds-text-secondary);
1155
+ font-size: var(--eds-fs-caption);
1156
+ word-break: keep-all;
1157
+ }
1158
+ .ec-field > .ec-error {
1159
+ padding: 0 12px;
1160
+ font-size: var(--eds-fs-caption);
1161
+ }
1162
+
1163
+ /* 이름이 붙은 묶음 (보기 · 정답 · 항목 목록): 머리줄은 이름 왼쪽, 조작(토글 등) 오른쪽 */
1164
+ .ec-section {
1165
+ display: flex;
1166
+ flex-direction: column;
1167
+ gap: 8px;
1168
+ min-width: 0;
1169
+ }
1170
+ .ec-section-head {
1171
+ display: flex;
1172
+ align-items: center;
1173
+ justify-content: space-between;
1174
+ gap: 12px;
1175
+ min-width: 0;
1176
+ }
1177
+ .ec-label {
1178
+ display: flex;
1179
+ align-items: center;
1180
+ gap: 8px;
1181
+ font-weight: var(--eds-fw-bold);
1182
+ }
1183
+ .ec-label-sub {
1184
+ color: var(--eds-text-secondary);
1185
+ font-size: var(--eds-fs-caption);
1186
+ font-weight: var(--eds-fw-medium);
1187
+ }
1188
+ /* 이름 옆 안내 (같은 줄, 좁으면 말줄임) */
1189
+ .ec-hint-inline {
1190
+ flex: 1;
1191
+ min-width: 0;
1192
+ overflow: hidden;
1193
+ color: var(--eds-text-secondary);
1194
+ font-size: var(--eds-fs-caption);
1195
+ font-weight: var(--eds-fw-medium);
1196
+ text-overflow: ellipsis;
1197
+ white-space: nowrap;
1198
+ }
1199
+
1200
+ /* 필요할 때만 여는 칸 (설명 · 해설 · 선택 칸): 닫혀 있으면 "이름 추가 +" 윤곽선 버튼만.
1201
+ 열리면 머리줄(아이콘 · 이름 · 안내 · 지우기) + 밑줄 칸. 지우기는 값을 비우고 닫는다 */
1202
+ .ec-reveal {
1203
+ display: flex;
1204
+ flex-direction: column;
1205
+ align-items: flex-start;
1206
+ gap: 4px;
1207
+ min-width: 0;
1208
+ }
1209
+ .ec-reveal-body {
1210
+ display: flex;
1211
+ flex-direction: column;
1212
+ align-self: stretch;
1213
+ gap: 4px;
1214
+ min-width: 0;
1215
+ }
1216
+ .ec-reveal-head {
1217
+ display: flex;
1218
+ align-items: center;
1219
+ gap: 8px;
1220
+ font-size: var(--eds-fs-body2);
1221
+ }
1222
+ .ec-reveal-head > svg {
1223
+ flex: none;
1224
+ color: var(--ec-accent);
1225
+ }
1226
+ .ec-reveal-head strong {
1227
+ flex: none;
1228
+ font-weight: var(--eds-fw-bold);
1229
+ }
1230
+ .ec-reveal-head > .ec-hint-inline {
1231
+ flex: 0 1 auto;
1232
+ }
1233
+ .ec-reveal-head > button:last-child {
1234
+ margin-left: auto;
1235
+ }
1236
+ /* "설명 추가 +": EDS Button outlined · secondary · small (13px / 600, 여백 4px 11px, 모서리 6px). 키트 button의 44px 높이를 푼다 */
1237
+ button.ec-reveal-button {
1238
+ display: inline-flex;
1239
+ align-items: center;
1240
+ gap: 6px;
1241
+ min-height: 0;
1242
+ padding: 4px 11px;
1243
+ border: 1px solid var(--eds-surface-border);
1244
+ border-radius: 6px;
1245
+ background: transparent;
1246
+ color: var(--eds-secondary-main);
1247
+ font-size: 13px;
1248
+ font-weight: var(--eds-fw-semibold);
1249
+ line-height: 22px;
1250
+ }
1251
+ @media (hover: hover) {
1252
+ button.ec-reveal-button:hover {
1253
+ border-color: var(--ec-edit-hover-line);
1254
+ background: var(--eds-action-hover);
1255
+ }
1256
+ }
1257
+ button.ec-reveal-button:focus-visible,
1258
+ button.ec-reveal-button:active {
1259
+ background: var(--eds-secondary-opacity04);
1260
+ }
1261
+ /* 칸 바로 아래 "설명 추가 +"는 칸에 붙여 둔다 */
1262
+ .ec-field + .ec-reveal {
1263
+ margin-top: -8px;
1264
+ }
1265
+
1266
+ /* 켜고 끄기: EDS Chip medium (32px 알약). 꺼짐 = 윤곽선 + 아이콘, 켜짐 = 옅은 보라 + 체크 (색만으로 알리지 않음).
1267
+ <label class="ec-toggle"><input type="checkbox"> <span class="ec-toggle-off">아이콘</span><span class="ec-toggle-on">체크</span> 이름</label> */
1268
+ .ec-toggle {
1269
+ position: relative;
1270
+ display: inline-flex;
1271
+ flex: none;
1272
+ align-items: center;
1273
+ gap: 7px;
1274
+ height: 32px;
1275
+ padding: 0 11px 0 8px;
1276
+ border: 1px solid var(--eds-surface-border);
1277
+ border-radius: 32px;
1278
+ background: transparent;
1279
+ color: var(--eds-text-primary);
1280
+ font-size: 13px;
1281
+ font-weight: var(--eds-fw-medium);
1282
+ line-height: 1.38;
1283
+ white-space: nowrap;
1284
+ cursor: pointer;
1285
+ user-select: none;
1286
+ }
1287
+ @media (hover: hover) {
1288
+ .ec-toggle:hover {
1289
+ background: var(--eds-action-hover);
1290
+ }
1291
+ }
1292
+ .ec-toggle input {
1293
+ position: absolute;
1294
+ width: 1px;
1295
+ height: 1px;
1296
+ opacity: 0;
1297
+ pointer-events: none;
1298
+ }
1299
+ .ec-toggle-on,
1300
+ .ec-toggle-off {
1301
+ display: inline-flex;
1302
+ }
1303
+ .ec-toggle-on,
1304
+ .ec-toggle:has(input:checked) .ec-toggle-off {
1305
+ display: none;
1306
+ }
1307
+ .ec-toggle:has(input:checked) .ec-toggle-on {
1308
+ display: inline-flex;
1309
+ }
1310
+ .ec-toggle:has(input:checked) {
1311
+ border-color: transparent;
1312
+ background: var(--ec-toggle-on-bg);
1313
+ color: var(--ec-toggle-on-fg);
1314
+ }
1315
+ .ec-toggle:has(input:focus-visible) {
1316
+ outline: 2px solid var(--ec-accent);
1317
+ outline-offset: 2px;
1318
+ }
1319
+
1320
+ /* 목록 (보기 · 짧은 글 · 숫자): 줄마다 손잡이 → 정답 표시 → 번호 → 밑줄 칸 → ✕. 끝에 회색 "+ 추가" */
1321
+ .ec-list {
1322
+ display: flex;
1323
+ flex-direction: column;
1324
+ gap: 8px;
1325
+ min-width: 0;
1326
+ }
1327
+ .ec-list-row {
1328
+ display: flex;
1329
+ align-items: center;
1330
+ gap: 6px;
1331
+ min-width: 0;
1332
+ border-radius: var(--ec-radius);
1333
+ transition: transform 150ms ease-in-out;
1334
+ }
1335
+ .ec-list-row > .ec-field,
1336
+ .ec-list-row > .ec-field-input {
1337
+ flex: 1 1 0;
1338
+ min-width: 0;
1339
+ }
1340
+ /* 끄는 줄 · 카드는 손가락을 바로 따라오고(전환 없음) 위에 뜬다 */
1341
+ .ec-list-row[data-dragging],
1342
+ .ec-edit-card[data-dragging] {
1343
+ position: relative;
1344
+ z-index: 1;
1345
+ transition: none;
1346
+ background: var(--eds-background-paper);
1347
+ box-shadow: var(--ec-shadow);
1348
+ }
1349
+ .ec-list-no {
1350
+ flex: none;
1351
+ width: 24px;
1352
+ text-align: center;
1353
+ color: var(--eds-text-tertiary);
1354
+ font-weight: var(--eds-fw-bold);
1355
+ }
1356
+ /* 정답으로 고른 줄: 밑줄을 보라색으로 (정답 표시와 함께) */
1357
+ .ec-list-row[data-correct] .ec-field-input {
1358
+ border-bottom-color: var(--ec-accent);
1359
+ }
1360
+ /* 끌기 손잡이 ⠿: 터치에서 화면이 스크롤되지 않게 touch-action: none */
1361
+ button.ec-handle {
1362
+ flex: none;
1363
+ width: 32px;
1364
+ min-height: 40px;
1365
+ padding: 0;
1366
+ border: 0;
1367
+ background: none;
1368
+ color: var(--eds-text-tertiary);
1369
+ font-size: 18px;
1370
+ cursor: grab;
1371
+ touch-action: none;
1372
+ }
1373
+ button.ec-handle:hover {
1374
+ background: var(--eds-action-hover);
1375
+ color: var(--eds-text-secondary);
1376
+ }
1377
+ [data-dragging] button.ec-handle {
1378
+ cursor: grabbing;
1379
+ }
1380
+ /* 데스크톱(마우스): 손잡이를 줄 밖 왼쪽 여백에 두고 줄에 올리거나 초점이 있을 때만 보인다. 터치 · 좁은 화면은 줄 안에 늘 */
1381
+ @media (hover: hover) and (pointer: fine) and (min-width: 768px) {
1382
+ .ec-list-row {
1383
+ position: relative;
1384
+ }
1385
+ .ec-list-row > button.ec-handle {
1386
+ position: absolute;
1387
+ left: -22px;
1388
+ top: 50%;
1389
+ width: 20px;
1390
+ margin-top: -20px;
1391
+ opacity: 0;
1392
+ transition: opacity 120ms ease-in-out;
1393
+ }
1394
+ .ec-list-row:hover > button.ec-handle,
1395
+ .ec-list-row:focus-within > button.ec-handle,
1396
+ .ec-list-row[data-dragging] > button.ec-handle {
1397
+ opacity: 1;
1398
+ }
1399
+ }
1400
+ /* 줄의 정답 표시: 보기 줄에서 바로 고른다 (단일 radio = 원, 복수 checkbox = 둥근 사각형). 누르는 영역 40px.
1401
+ 고르면 보라 채움 + 흰 체크 (체크는 mask라 글자색 토큰을 따른다) */
1402
+ .ec-answer-mark {
1403
+ display: flex;
1404
+ flex: none;
1405
+ align-items: center;
1406
+ justify-content: center;
1407
+ width: 40px;
1408
+ min-height: 40px;
1409
+ cursor: pointer;
1410
+ }
1411
+ .ec-answer-mark input {
1412
+ appearance: none;
1413
+ -webkit-appearance: none;
1414
+ width: 22px;
1415
+ height: 22px;
1416
+ margin: 0;
1417
+ padding: 0;
1418
+ border: 2px solid var(--eds-action-disabled);
1419
+ border-radius: 50%;
1420
+ background: var(--ec-edit-card) center / 14px no-repeat;
1421
+ cursor: pointer;
1422
+ }
1423
+ .ec-answer-mark input[type='checkbox'] {
1424
+ border-radius: 6px;
1425
+ }
1426
+ /* 체크 그림은 primary.contrast-text 색 (라이트 흰색 · 다크 검정): 그림 안 색이라 테마마다 하나씩 */
1427
+ .ec-answer-mark input:checked {
1428
+ border-color: var(--ec-accent);
1429
+ background-color: var(--ec-accent);
1430
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
1431
+ }
1432
+ :root[data-eds-theme='dark'] .ec-answer-mark input:checked {
1433
+ background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
1434
+ }
1435
+ .ec-answer-mark input:focus-visible {
1436
+ outline: 2px solid var(--ec-accent);
1437
+ outline-offset: 2px;
1438
+ }
1439
+ /* 목록 끝 "+ 보기 추가": EDS Button contained · color inherit · medium (회색 채움, 14px / 600, 모서리 8px, 40px) */
1440
+ button.ec-list-add {
1441
+ align-self: stretch;
1442
+ min-height: 0;
1443
+ padding: 8px 16px;
1444
+ border: 0;
1445
+ border-radius: 8px;
1446
+ background: var(--ec-fill);
1447
+ color: var(--eds-text-primary);
1448
+ }
1449
+ @media (hover: hover) {
1450
+ button.ec-list-add:hover {
1451
+ background: var(--ec-fill-hover);
1452
+ }
1453
+ }
1454
+ button.ec-list-add:focus-visible,
1455
+ button.ec-list-add:active {
1456
+ background: var(--ec-fill-hover);
1457
+ outline: 2px solid var(--ec-accent);
1458
+ outline-offset: 2px;
1459
+ }
1460
+ button.ec-list-add:disabled {
1461
+ background: var(--eds-action-disabled-background);
1462
+ color: var(--eds-action-disabled);
1463
+ }
1464
+ /* 카드를 더하는 "+ 문항 추가": 회색 점선 · 흰 바탕 · 모서리 12px, 열 너비 전체 (목록 안 회색 채움 추가와 구분) */
1465
+ button.ec-add {
1466
+ display: inline-flex;
1467
+ align-self: stretch;
1468
+ align-items: center;
1469
+ justify-content: center;
1470
+ gap: 6px;
1471
+ min-height: 44px;
1472
+ border: 1px dashed var(--eds-surface-border);
1473
+ border-radius: 12px;
1474
+ background: var(--ec-edit-card);
1475
+ color: var(--eds-text-secondary);
1476
+ }
1477
+ @media (hover: hover) {
1478
+ button.ec-add:hover {
1479
+ border-color: var(--ec-edit-hover-line);
1480
+ background: var(--ec-edit-card);
1481
+ color: var(--eds-text-primary);
1482
+ }
1483
+ }
1484
+
1485
+ /* 작은 윤곽선 버튼 (EDS Button outlined · secondary · small: 32px, 13px / 600, 모서리 6px): "다른 파일로 변경" 같은 보조 동작.
1486
+ .ec-block이면 열 너비 전체에 글은 왼쪽 ("+ 자막 추가"처럼 무엇을 더하는 자리) */
1487
+ button.ec-button-small {
1488
+ display: inline-flex;
1489
+ flex: none;
1490
+ align-items: center;
1491
+ gap: 6px;
1492
+ min-height: 32px;
1493
+ padding: 0 11px;
1494
+ border: 1px solid var(--eds-surface-border);
1495
+ border-radius: 6px;
1496
+ background: transparent;
1497
+ color: var(--eds-secondary-main);
1498
+ font-size: 13px;
1499
+ font-weight: var(--eds-fw-semibold);
1500
+ line-height: 22px;
1501
+ }
1502
+ @media (hover: hover) {
1503
+ button.ec-button-small:hover {
1504
+ border-color: var(--ec-edit-hover-line);
1505
+ background: var(--eds-action-hover);
1506
+ }
1507
+ }
1508
+ button.ec-button-small.ec-block {
1509
+ align-self: stretch;
1510
+ justify-content: flex-start;
1511
+ }
1512
+ button.ec-button-small svg {
1513
+ flex: none;
1514
+ width: 14px;
1515
+ height: 14px;
1516
+ }
1517
+
1518
+ /* 올린 파일 한 줄: 파일 아이콘 · 이름(굵게) · 크기 등(작게) · 오른쪽 "다른 파일로 변경". 흰 면 + 구분선 테두리 · 모서리 8px */
1519
+ .ec-file-bar {
1520
+ display: flex;
1521
+ align-items: center;
1522
+ gap: 8px;
1523
+ min-width: 0;
1524
+ min-height: 48px;
1525
+ padding: 8px 8px 8px 12px;
1526
+ border: 1px solid var(--eds-divider);
1527
+ border-radius: 8px;
1528
+ background: var(--ec-edit-box);
1529
+ }
1530
+ /* 아이콘 · 이름 · 크기를 한 줄 가운데에 맞춘다 (svg의 글자 기준선 아래 틈을 없애고 줄높이 20px) */
1531
+ .ec-file-bar > svg,
1532
+ .ec-file-icon {
1533
+ flex: none;
1534
+ color: var(--eds-text-tertiary);
1535
+ }
1536
+ .ec-file-icon {
1537
+ display: flex;
1538
+ align-items: center;
1539
+ }
1540
+ .ec-file-bar svg {
1541
+ display: block;
1542
+ }
1543
+ .ec-file-name {
1544
+ min-width: 0;
1545
+ overflow: hidden;
1546
+ font-weight: var(--eds-fw-semibold);
1547
+ line-height: 20px;
1548
+ text-overflow: ellipsis;
1549
+ white-space: nowrap;
1550
+ }
1551
+ .ec-file-meta {
1552
+ flex: none;
1553
+ margin-right: auto;
1554
+ color: var(--eds-text-tertiary);
1555
+ font-size: 13px;
1556
+ line-height: 20px;
1557
+ }
1558
+ /* 줄 안 "다른 파일로 변경": 테두리 없이 옅은 글자색 채움 (10%, 올리면 16%) */
1559
+ .ec-file-bar button.ec-button-small {
1560
+ border-color: transparent;
1561
+ background: color-mix(in srgb, var(--eds-text-primary) 10%, transparent);
1562
+ color: inherit;
1563
+ }
1564
+ @media (hover: hover) {
1565
+ .ec-file-bar button.ec-button-small:hover {
1566
+ border-color: transparent;
1567
+ background: color-mix(in srgb, var(--eds-text-primary) 16%, transparent);
1568
+ }
1569
+ }
1570
+
1571
+ /* 안내 한 줄 (ⓘ + 보조 글자): 화면 맨 위 "정답으로 고른 보기로 자동 채점합니다." 같은 상시 안내, 칸 아래 조건 목록.
1572
+ 아이콘은 info 색(.ec-info-line) 또는 글자색(.ec-info-list 안). 여러 줄은 <ul class="ec-info-list"><li>… */
1573
+ .ec-info-line,
1574
+ .ec-info-list > li {
1575
+ display: flex;
1576
+ align-items: flex-start;
1577
+ gap: 6px;
1578
+ margin: 0;
1579
+ color: var(--eds-text-tertiary);
1580
+ font-size: var(--eds-fs-body2);
1581
+ line-height: 1.4;
1582
+ word-break: keep-all;
1583
+ }
1584
+ .ec-info-line > svg,
1585
+ .ec-info-list > li > svg {
1586
+ flex: none;
1587
+ width: 16px;
1588
+ height: 16px;
1589
+ margin-top: 1px;
1590
+ }
1591
+ .ec-info-line > svg {
1592
+ color: var(--eds-info-main);
1593
+ }
1594
+ .ec-info-list {
1595
+ display: flex;
1596
+ flex-direction: column;
1597
+ gap: 2px;
1598
+ margin: 0;
1599
+ padding: 0;
1600
+ list-style: none;
1601
+ }
1602
+ .ec-info-list > li {
1603
+ font-size: var(--eds-fs-caption);
1604
+ }
1605
+ /* 강조 안내 상자 (옅은 보라 바탕 + 보라 ⓘ): 편집 방법처럼 먼저 알아야 하는 것 하나 */
1606
+ .ec-edit-notice {
1607
+ display: flex;
1608
+ align-items: flex-start;
1609
+ gap: 8px;
1610
+ margin: 0;
1611
+ padding: 10px 14px;
1612
+ border-radius: 8px;
1613
+ background: var(--ec-accent-bg);
1614
+ color: var(--eds-text-secondary);
1615
+ font-size: var(--eds-fs-body2);
1616
+ word-break: keep-all;
1617
+ }
1618
+ .ec-edit-notice > svg {
1619
+ flex: none;
1620
+ width: 16px;
1621
+ height: 16px;
1622
+ margin-top: 2px;
1623
+ color: var(--ec-accent);
1624
+ }
1625
+ /* 최소 · 최대 개수 같은 목록 아래 안내 */
1626
+ .ec-list-caption {
1627
+ margin: 0;
1628
+ color: var(--eds-text-tertiary);
1629
+ font-size: var(--eds-fs-caption);
1630
+ }
1631
+
1632
+ /* 스낵바 (EDS Snackbar · info): 지우기 · 바꾸기 뒤 "되돌리기"를 화면 아래 가운데에 잠깐. 저장 바 위로 올린다.
1633
+ showSnackbar()(lib/elice-content.js)가 body에 붙인다 */
1634
+ .ec-snackbar {
1635
+ position: fixed;
1636
+ left: 50%;
1637
+ bottom: 80px;
1638
+ z-index: 20;
1639
+ display: flex;
1640
+ align-items: center;
1641
+ max-width: min(480px, calc(100vw - 48px));
1642
+ padding: 6px 8px 6px 16px;
1643
+ transform: translateX(-50%);
1644
+ border-radius: 12px;
1645
+ background: var(--eds-background-snackbar);
1646
+ color: var(--ec-snackbar-fg);
1647
+ font-size: var(--eds-fs-body2);
1648
+ font-weight: var(--eds-fw-medium);
1649
+ line-height: 1.43;
1650
+ box-shadow: var(--ec-shadow);
1651
+ }
1652
+ .ec-snackbar-icon {
1653
+ display: inline-flex;
1654
+ margin-right: 8px;
1655
+ color: var(--eds-info-light);
1656
+ }
1657
+ .ec-snackbar-text {
1658
+ flex: 1;
1659
+ padding: 8px 0;
1660
+ }
1661
+ /* EDS Button text small · color inherit */
1662
+ button.ec-snackbar-action {
1663
+ flex: none;
1664
+ min-height: 0;
1665
+ margin-left: 16px;
1666
+ padding: 5px 12px;
1667
+ border: 0;
1668
+ border-radius: 6px;
1669
+ background: transparent;
1670
+ color: inherit;
1671
+ font-size: 13px;
1672
+ font-weight: var(--eds-fw-semibold);
1673
+ line-height: 22px;
1674
+ }
1675
+ button.ec-snackbar-action:hover,
1676
+ button.ec-snackbar-action:focus-visible {
1677
+ background: var(--eds-inverse-opacity03);
1678
+ }
1679
+ @media (max-width: 599.98px) {
1680
+ .ec-snackbar {
1681
+ left: 8px;
1682
+ right: 8px;
1683
+ max-width: none;
1684
+ transform: none;
1685
+ }
1686
+ }
1687
+
1688
+ /* 내용 편집기 (lib/elice-content-editor.js useContentEditor): 폼 보기 · 코드 보기 탭.
1689
+ 칸은 EDS OutlinedInput(위 input 규칙), 목록 줄 · 카드는 개발 가이드 5 UI 패턴(⠿ 손잡이 · 빨간 ✕ · 휴지통) */
1690
+ .ec-json {
1691
+ display: flex;
1692
+ flex-direction: column;
1693
+ gap: 16px;
1694
+ }
1695
+ .ec-json-note {
1696
+ padding: 10px 12px;
1697
+ border-radius: var(--ec-radius);
1698
+ background: var(--ec-info-bg);
1699
+ color: var(--ec-info);
1700
+ font-size: var(--eds-fs-body2);
1701
+ word-break: keep-all;
1702
+ }
1703
+ /* 탭: EDS ToggleButton 모양, 고른 쪽은 primary */
1704
+ .ec-json-tabs {
1705
+ display: inline-flex;
1706
+ align-self: flex-start;
1707
+ gap: 2px;
1708
+ padding: 2px;
1709
+ border: 1px solid var(--ec-border);
1710
+ border-radius: calc(var(--ec-radius) + 2px);
1711
+ }
1712
+ .ec-json-tabs button {
1713
+ min-height: 36px;
1714
+ padding: 4px 14px;
1715
+ border: 0;
1716
+ color: var(--ec-muted);
1717
+ }
1718
+ .ec-json-tabs button[aria-selected='true'] {
1719
+ background: var(--ec-accent-bg);
1720
+ color: var(--ec-accent);
1721
+ }
1722
+ .ec-json-form {
1723
+ display: flex;
1724
+ flex-direction: column;
1725
+ gap: 16px;
1726
+ }
1727
+ .ec-json-field {
1728
+ display: flex;
1729
+ flex-direction: column;
1730
+ gap: 6px;
1731
+ min-width: 0;
1732
+ }
1733
+ .ec-json-field > label,
1734
+ .ec-json-group > legend,
1735
+ .ec-json-list > legend {
1736
+ font-weight: var(--eds-fw-semibold);
1737
+ }
1738
+ .ec-json-required {
1739
+ color: var(--ec-no);
1740
+ }
1741
+ .ec-json-hint {
1742
+ color: var(--ec-muted);
1743
+ font-size: var(--eds-fs-caption);
1744
+ word-break: keep-all;
1745
+ }
1746
+ .ec-json-error {
1747
+ font-size: var(--eds-fs-caption);
1748
+ }
1749
+ .ec-json [aria-invalid='true'] {
1750
+ border-color: var(--ec-no);
1751
+ }
1752
+ /* 켜고 끄기: 체크박스를 스위치 모양으로 */
1753
+ .ec-json-switch {
1754
+ flex-direction: row;
1755
+ flex-wrap: wrap;
1756
+ align-items: center;
1757
+ gap: 10px;
1758
+ }
1759
+ .ec-json-switch input {
1760
+ appearance: none;
1761
+ position: relative;
1762
+ flex: none;
1763
+ width: 40px;
1764
+ height: 24px;
1765
+ padding: 0;
1766
+ border: 0;
1767
+ border-radius: 12px;
1768
+ background: var(--eds-action-disabled-background);
1769
+ cursor: pointer;
1770
+ transition: background-color 150ms ease-in-out;
1771
+ }
1772
+ .ec-json-switch input::after {
1773
+ content: '';
1774
+ position: absolute;
1775
+ top: 3px;
1776
+ left: 3px;
1777
+ width: 18px;
1778
+ height: 18px;
1779
+ border-radius: 50%;
1780
+ background: var(--eds-common-white, #fff);
1781
+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.3);
1782
+ transition: translate 150ms ease-in-out;
1783
+ }
1784
+ .ec-json-switch input:checked {
1785
+ background: var(--ec-accent);
1786
+ }
1787
+ .ec-json-switch input:checked::after {
1788
+ translate: 16px 0;
649
1789
  }
650
1790
  .ec-json-switch .ec-json-hint {
651
1791
  flex-basis: 100%;
@@ -866,6 +2006,44 @@ button.ec-json-add {
866
2006
  :root[data-eds-theme='dark'] .ec-json-str {
867
2007
  color: var(--eds-success-main);
868
2008
  }
2009
+ /* 폼 보기를 키트 편집 화면 모양으로 (흰 카드 · 밑줄 칸). 위의 .ec-json-* 기본 테두리 · 여백을 푼다 */
2010
+ .ec-json-group.ec-edit-card,
2011
+ .ec-json-list.ec-edit-card {
2012
+ gap: 12px;
2013
+ padding: 20px;
2014
+ border: 0;
2015
+ border-radius: 12px;
2016
+ }
2017
+ /* fieldset의 legend를 float으로 빼야 카드 여백 안 첫 줄(묶음 이름)이 된다 */
2018
+ .ec-json-group > legend,
2019
+ .ec-json-list > legend {
2020
+ float: left;
2021
+ width: 100%;
2022
+ padding: 0;
2023
+ margin: 0;
2024
+ font-size: var(--eds-fs-subtitle2);
2025
+ font-weight: var(--eds-fw-semibold);
2026
+ }
2027
+ .ec-json-card.ec-edit-card {
2028
+ gap: 12px;
2029
+ border: 0;
2030
+ background: var(--ec-edit-card);
2031
+ }
2032
+ .ec-json-card.ec-edit-card > .ec-json-card-head {
2033
+ padding: 0;
2034
+ border: 0;
2035
+ }
2036
+ .ec-json-card.ec-edit-card > .ec-json-card-body {
2037
+ gap: 16px;
2038
+ padding: 0;
2039
+ }
2040
+ .ec-json .ec-field-input[aria-invalid='true'] {
2041
+ border-color: transparent;
2042
+ }
2043
+ /* 줄 안 칸은 라벨을 숨기므로 칸만 */
2044
+ .ec-list-row > .ec-json-field {
2045
+ gap: 0;
2046
+ }
869
2047
  /* 모바일: 입력 글자 16px 규칙 (확대 방지) */
870
2048
  @media (max-width: 511.98px) {
871
2049
  .ec-json-code {
@@ -875,4 +2053,13 @@ button.ec-json-add {
875
2053
  .ec-json-card-body {
876
2054
  padding-inline: 12px;
877
2055
  }
2056
+ /* 편집 화면 카드는 좁은 화면에서 여백만 줄이고, 카드 안 칸은 머리와 같은 선에 */
2057
+ .ec-edit-card,
2058
+ .ec-json-group.ec-edit-card,
2059
+ .ec-json-list.ec-edit-card {
2060
+ padding: 16px;
2061
+ }
2062
+ .ec-json-card.ec-edit-card > .ec-json-card-body {
2063
+ padding-inline: 0;
2064
+ }
878
2065
  }