@ihabdevteam/core 0.42.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components.cjs.js +178 -178
- package/dist/components.esm.css +5 -5
- package/dist/hooks.cjs.js +1 -1
- package/dist/ihabdevteam-core.cjs.js +184 -184
- package/dist/ihabdevteam-core.d.ts +1 -1
- package/dist/packages/core/src/components/Calendar.js +2 -1
- package/dist/packages/core/src/components/Dropdown.css +0 -11
- package/dist/packages/core/src/components/FilterPanel.css +0 -5
- package/dist/packages/core/src/components/Footer.css +0 -6
- package/dist/packages/core/src/components/Header.css +0 -17
- package/dist/packages/core/src/components/LandingBottomSticky.js +2 -1
- package/dist/packages/core/src/components/Loader.css +0 -32
- package/dist/packages/core/src/components/Panel.css +2 -16
- package/dist/packages/core/src/components/PaymentPlan.css +0 -61
- package/dist/packages/core/src/components/Popup/DeviceListPopup.css +0 -55
- package/dist/packages/core/src/components/Popup/LoadTablePopup.js +2 -1
- package/dist/packages/core/src/components/Popup/Popup.css +0 -6
- package/dist/packages/core/src/components/Popup/SaveTablePopup.css +0 -9
- package/dist/packages/core/src/components/Popup/TrainingResultPopup.css +0 -34
- package/dist/packages/core/src/components/SoundCompass.css +0 -8
- package/dist/packages/core/src/components/Table.css +0 -21
- package/dist/packages/core/src/components/Toolbar.css +0 -8
- package/dist/packages/core/src/components/Tooltip/MenuTooltip.css +0 -19
- package/dist/packages/core/src/components/Tooltip/Tooltip.css +0 -17
- package/dist/packages/core/src/components/Training/CategoryIcon.css +0 -22
- package/dist/packages/core/src/components/Training/TrainingBlock.css +0 -7
- package/dist/packages/core/src/components/Training/TrainingCard.css +0 -42
- package/dist/packages/core/src/components/Training/TrainingStep.css +0 -118
- package/dist/packages/core/src/components/Training/TrainingStepTitle.css +0 -6
- package/dist/packages/core/src/utils/pressable.d.ts +23 -0
- package/dist/packages/core/src/utils/pressable.js +32 -0
- package/dist/packages/core/src/version.d.ts +1 -1
- package/dist/packages/core/src/version.js +1 -1
- package/dist/utils.cjs.js +1 -1
- package/package.json +1 -1
|
@@ -16,12 +16,6 @@
|
|
|
16
16
|
gap: 10px;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
|
-
/* Ensure individual buttons behave like inline blocks when wrapped */
|
|
20
|
-
.training-list__item {
|
|
21
|
-
display: inline-block;
|
|
22
|
-
vertical-align: top;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
19
|
.training-block__more {
|
|
26
20
|
display: flex;
|
|
27
21
|
justify-content: center;
|
|
@@ -30,4 +24,3 @@
|
|
|
30
24
|
|
|
31
25
|
.training-blocks--top-spaced { margin-top: 18px; }
|
|
32
26
|
|
|
33
|
-
|
|
@@ -104,28 +104,6 @@
|
|
|
104
104
|
padding-inline: 12px;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
.training-card__type {
|
|
108
|
-
display: inline-block;
|
|
109
|
-
padding: 2px 8px;
|
|
110
|
-
border-radius: var(--radius-full);
|
|
111
|
-
font-size: 11px;
|
|
112
|
-
font-weight: 600;
|
|
113
|
-
color: var(--badge-color, var(--color-main));
|
|
114
|
-
background: color-mix(in srgb, var(--badge-color, var(--color-main)) 10%, transparent);
|
|
115
|
-
border: 1px solid color-mix(in srgb, var(--badge-color, var(--color-main)) 25%, transparent);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.training-card__tags {
|
|
119
|
-
display: flex;
|
|
120
|
-
flex-wrap: wrap;
|
|
121
|
-
gap: 5px;
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
.training-card__tag {
|
|
125
|
-
color: var(--color-main);
|
|
126
|
-
font-size: 11px;
|
|
127
|
-
}
|
|
128
|
-
|
|
129
107
|
.training-card__words {
|
|
130
108
|
display: flex;
|
|
131
109
|
flex-wrap: wrap;
|
|
@@ -133,17 +111,6 @@
|
|
|
133
111
|
align-content: flex-start;
|
|
134
112
|
}
|
|
135
113
|
|
|
136
|
-
.training-card__word {
|
|
137
|
-
display: inline-block;
|
|
138
|
-
padding: 2px 8px;
|
|
139
|
-
border-radius: var(--radius-full);
|
|
140
|
-
font-size: 11px;
|
|
141
|
-
color: var(--color-darkGray);
|
|
142
|
-
background: var(--color-deepWhite);
|
|
143
|
-
border: 1px solid var(--color-whiteLine);
|
|
144
|
-
white-space: nowrap;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
114
|
.training-card__footer {
|
|
148
115
|
display: flex;
|
|
149
116
|
align-items: center;
|
|
@@ -167,12 +134,3 @@
|
|
|
167
134
|
align-items: center;
|
|
168
135
|
gap: 4px;
|
|
169
136
|
}
|
|
170
|
-
|
|
171
|
-
.training-card__count {
|
|
172
|
-
display: inline-flex;
|
|
173
|
-
align-items: center;
|
|
174
|
-
gap: 3px;
|
|
175
|
-
color: var(--color-lightGray);
|
|
176
|
-
font-size: 11px;
|
|
177
|
-
white-space: nowrap;
|
|
178
|
-
}
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
overflow: visible;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
11
|
.training-step {
|
|
13
12
|
display: flex;
|
|
14
13
|
flex-direction: row;
|
|
@@ -19,9 +18,6 @@
|
|
|
19
18
|
flex-wrap: nowrap; /* prevent internal wrapping */
|
|
20
19
|
overflow: visible
|
|
21
20
|
}
|
|
22
|
-
|
|
23
|
-
/* shared content & body layout */
|
|
24
|
-
.training-step__body,
|
|
25
21
|
.training-step__content {
|
|
26
22
|
flex: 1 1 auto;
|
|
27
23
|
display: flex;
|
|
@@ -33,14 +29,6 @@
|
|
|
33
29
|
}
|
|
34
30
|
|
|
35
31
|
.training-step__content { gap: var(--spacing-m); min-width: 0; }
|
|
36
|
-
|
|
37
|
-
.training-step__controls {
|
|
38
|
-
width: 100%; /* Make each step fill parent width and allow children to shrink */
|
|
39
|
-
box-sizing: border-box;
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
gap: 10px;
|
|
43
|
-
}
|
|
44
32
|
|
|
45
33
|
/* Ensure step titles are left-aligned and use base typography */
|
|
46
34
|
.training-step__title {
|
|
@@ -49,74 +37,6 @@
|
|
|
49
37
|
color: var(--text, #0b2b35);
|
|
50
38
|
}
|
|
51
39
|
|
|
52
|
-
/* audio panel tweaks inside the step to make it visually centered */
|
|
53
|
-
/* Allow content area to shrink in narrow containers */
|
|
54
|
-
.training-step__body .audio-player {
|
|
55
|
-
width: 100%;
|
|
56
|
-
display: flex;
|
|
57
|
-
justify-content: center;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.training-step__body .audio-player__panel {
|
|
61
|
-
width: 100%;
|
|
62
|
-
padding: 18px 20px;
|
|
63
|
-
border-radius: var(--radius-card);
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
/* Controls column (right side) reserved for future actions; keep compact */
|
|
67
|
-
.training-step__controls.compact {
|
|
68
|
-
width: 72px;
|
|
69
|
-
display: flex;
|
|
70
|
-
align-items: center;
|
|
71
|
-
justify-content: center;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/* Confirm step specifics */
|
|
75
|
-
.training-step__confirm-sentence {
|
|
76
|
-
background: var(--color-white);
|
|
77
|
-
border-radius: var(--radius-card);
|
|
78
|
-
padding: var(--spacing-m);
|
|
79
|
-
border: 1px solid rgba(0,0,0,0.04);
|
|
80
|
-
box-shadow: var(--shadow-card);
|
|
81
|
-
color: var(--text, #0b2b35);
|
|
82
|
-
max-width: 100%;
|
|
83
|
-
height:200px;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
/* center the confirm sentence text both horizontally and vertically */
|
|
87
|
-
.training-step__confirm-sentence {
|
|
88
|
-
display: flex;
|
|
89
|
-
align-items: center;
|
|
90
|
-
justify-content: center;
|
|
91
|
-
text-align: center;
|
|
92
|
-
word-break: keep-all;
|
|
93
|
-
overflow-wrap: anywhere;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
.training-step__controls.expanded {
|
|
97
|
-
width: 100%;
|
|
98
|
-
align-items: stretch;
|
|
99
|
-
max-height: 420px;
|
|
100
|
-
overflow-y: auto;
|
|
101
|
-
padding-bottom: 6px;
|
|
102
|
-
scrollbar-width: none;
|
|
103
|
-
-ms-overflow-style: none;
|
|
104
|
-
}
|
|
105
|
-
.training-step__controls.expanded::-webkit-scrollbar { display: none; }
|
|
106
|
-
|
|
107
|
-
.training-step__controls .training-step__title {
|
|
108
|
-
color: var(--muted, #70858a);
|
|
109
|
-
}
|
|
110
|
-
|
|
111
|
-
.training-step__answer-button {
|
|
112
|
-
padding: 10px 14px;
|
|
113
|
-
border-radius: var(--radius-s);
|
|
114
|
-
border: 1px solid rgba(0,0,0,0.06);
|
|
115
|
-
background: var(--color-white);
|
|
116
|
-
cursor: pointer;
|
|
117
|
-
flex: 0 0 auto;
|
|
118
|
-
}
|
|
119
|
-
|
|
120
40
|
.training-step__buttons {
|
|
121
41
|
display: flex;
|
|
122
42
|
flex-direction: row;
|
|
@@ -155,35 +75,12 @@
|
|
|
155
75
|
align-items: center;
|
|
156
76
|
}
|
|
157
77
|
|
|
158
|
-
/* remove stacked margin rule */
|
|
159
|
-
.training-step__answer-button + .training-step__answer-button { margin-top: 0 }
|
|
160
|
-
|
|
161
|
-
/* multi-select confirm button wrapper */
|
|
162
|
-
.training-step__multi-confirm {
|
|
163
|
-
display: flex;
|
|
164
|
-
justify-content: flex-end;
|
|
165
|
-
width: 100%;
|
|
166
|
-
margin-top: var(--margin-content, 12px);
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
/* 스크롤바 완전 숨김 (스크롤 기능은 유지) */
|
|
170
|
-
.training-step__controls::-webkit-scrollbar { display: none; }
|
|
171
|
-
.training-step__controls {
|
|
172
|
-
scrollbar-width: none;
|
|
173
|
-
-ms-overflow-style: none;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
78
|
@media (max-width: 640px) {
|
|
177
|
-
.training-step__body .audio-player__panel { padding: 14px; border-radius: var(--radius-card); }
|
|
178
|
-
.training-step__controls.compact { width: 48px }
|
|
179
79
|
/* keep row layout on small screens; allow horizontal scroll instead of wrapping */
|
|
180
80
|
.training-step { flex-direction: row; gap: 10px }
|
|
181
81
|
}
|
|
182
82
|
|
|
183
83
|
@media (max-width: 720px) {
|
|
184
|
-
.training-step__controls.expanded { gap: 8px }
|
|
185
|
-
.training-step__answer-button { padding: 9px 12px }
|
|
186
|
-
.training-step__confirm-sentence { padding: var(--spacing-s); }
|
|
187
84
|
}
|
|
188
85
|
|
|
189
86
|
.training-step__cards {
|
|
@@ -201,25 +98,10 @@
|
|
|
201
98
|
}
|
|
202
99
|
}
|
|
203
100
|
|
|
204
|
-
.training-step__block {
|
|
205
|
-
display: flex;
|
|
206
|
-
flex-direction: column;
|
|
207
|
-
gap: var(--spacing-s);
|
|
208
|
-
width: 100%;
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
.training-step__block--row {
|
|
212
|
-
display: flex;
|
|
213
|
-
flex-direction: row;
|
|
214
|
-
gap: var(--spacing-s);
|
|
215
|
-
align-items: center;
|
|
216
|
-
}
|
|
217
|
-
|
|
218
101
|
.training-step__listen-sticky {
|
|
219
102
|
width: 100%;
|
|
220
103
|
}
|
|
221
104
|
|
|
222
|
-
|
|
223
105
|
/* Polyfill fallback: when JS marks a step with .training-step--has-nested */
|
|
224
106
|
.training-step.training-step--has-nested .training-step__content {
|
|
225
107
|
margin-bottom: 100px;
|
|
@@ -21,11 +21,6 @@
|
|
|
21
21
|
transition: color 140ms ease, opacity 140ms ease;
|
|
22
22
|
opacity: 1;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
.training-step__title-row .training-step__title .title-extra {
|
|
27
|
-
margin-left: var(--spacing-xs);
|
|
28
|
-
}
|
|
29
24
|
.training-step__title-row .title-controls {
|
|
30
25
|
display: flex;
|
|
31
26
|
gap: 6px;
|
|
@@ -52,7 +47,6 @@
|
|
|
52
47
|
justify-content: center;
|
|
53
48
|
}
|
|
54
49
|
|
|
55
|
-
|
|
56
50
|
/* State modifiers */
|
|
57
51
|
/* Disable pointer events on the title text for disabled/done state but
|
|
58
52
|
keep the title controls (buttons) interactive. Previously the rule
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **단추가 아닌 것을 눌리게 만든다** — `role` · `tabIndex` · Enter/Space 한 벌.
|
|
3
|
+
*
|
|
4
|
+
* `<div onClick>` 은 마우스로만 된다. 키보드로는 닿지도 눌리지도 않고, 낭독기는
|
|
5
|
+
* 그것이 누를 수 있는 것인 줄도 모른다. 눈으로는 멀쩡해 보여서 안 드러난다.
|
|
6
|
+
*
|
|
7
|
+
* 코어를 훑어 그런 자리 넷을 찾았다(단어표 불러오기의 카드·줄, 달력의 방문 표시,
|
|
8
|
+
* 랜딩 바닥 띠). 넷이 같은 여섯 줄을 각자 적는 대신 여기 한 벌만 둔다 — 고칠 일이
|
|
9
|
+
* 생기면 한 곳만 고친다.
|
|
10
|
+
*
|
|
11
|
+
* **누를 것이 없으면 아무것도 안 붙인다.** `onPress` 가 없는데 `tabIndex` 만 붙으면
|
|
12
|
+
* 아무 일도 안 하는 자리에 Tab 이 멈춘다.
|
|
13
|
+
*
|
|
14
|
+
* 진짜 `<button>` 을 쓸 수 있으면 그쪽이 낫다. 이건 이미 `<div>`·`<li>` 로 짜인
|
|
15
|
+
* 자리를 **모양을 안 바꾸고** 눌리게 만드는 길이다.
|
|
16
|
+
*/
|
|
17
|
+
export declare function pressable<E extends {
|
|
18
|
+
key: string;
|
|
19
|
+
preventDefault: () => void;
|
|
20
|
+
}>(onPress?: (e: E) => void, 옵션?: {
|
|
21
|
+
role?: 'button' | 'option';
|
|
22
|
+
selected?: boolean;
|
|
23
|
+
}): {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* **단추가 아닌 것을 눌리게 만든다** — `role` · `tabIndex` · Enter/Space 한 벌.
|
|
3
|
+
*
|
|
4
|
+
* `<div onClick>` 은 마우스로만 된다. 키보드로는 닿지도 눌리지도 않고, 낭독기는
|
|
5
|
+
* 그것이 누를 수 있는 것인 줄도 모른다. 눈으로는 멀쩡해 보여서 안 드러난다.
|
|
6
|
+
*
|
|
7
|
+
* 코어를 훑어 그런 자리 넷을 찾았다(단어표 불러오기의 카드·줄, 달력의 방문 표시,
|
|
8
|
+
* 랜딩 바닥 띠). 넷이 같은 여섯 줄을 각자 적는 대신 여기 한 벌만 둔다 — 고칠 일이
|
|
9
|
+
* 생기면 한 곳만 고친다.
|
|
10
|
+
*
|
|
11
|
+
* **누를 것이 없으면 아무것도 안 붙인다.** `onPress` 가 없는데 `tabIndex` 만 붙으면
|
|
12
|
+
* 아무 일도 안 하는 자리에 Tab 이 멈춘다.
|
|
13
|
+
*
|
|
14
|
+
* 진짜 `<button>` 을 쓸 수 있으면 그쪽이 낫다. 이건 이미 `<div>`·`<li>` 로 짜인
|
|
15
|
+
* 자리를 **모양을 안 바꾸고** 눌리게 만드는 길이다.
|
|
16
|
+
*/
|
|
17
|
+
export function pressable(onPress, 옵션) {
|
|
18
|
+
if (!onPress)
|
|
19
|
+
return {};
|
|
20
|
+
return {
|
|
21
|
+
role: 옵션?.role ?? 'button',
|
|
22
|
+
tabIndex: 0,
|
|
23
|
+
...(옵션?.selected === undefined ? {} : { 'aria-selected': 옵션.selected }),
|
|
24
|
+
onKeyDown: (e) => {
|
|
25
|
+
if (e.key !== 'Enter' && e.key !== ' ')
|
|
26
|
+
return;
|
|
27
|
+
/* Space 는 그냥 두면 화면이 굴러간다 — 누름으로 바꾼다 */
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
onPress(e);
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
}
|