@iyulab/components 1.58.0 → 2.0.1
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/CHANGELOG.md +171 -0
- package/README.md +6 -4
- package/dist/_virtual/_glob-assets_raw/dark.css.e8ac080d.js +1 -1
- package/dist/_virtual/_glob-assets_raw/light.css.637cb2f8.js +1 -1
- package/dist/assets/locales/ar.json.js +5 -1
- package/dist/assets/locales/de.json.js +5 -1
- package/dist/assets/locales/en.json.js +5 -1
- package/dist/assets/locales/es.json.js +5 -1
- package/dist/assets/locales/fr.json.js +5 -1
- package/dist/assets/locales/id.json.js +5 -1
- package/dist/assets/locales/ja.json.js +5 -1
- package/dist/assets/locales/ko.json.js +5 -1
- package/dist/assets/locales/pt-BR.json.js +5 -1
- package/dist/assets/locales/ru.json.js +5 -1
- package/dist/assets/locales/th.json.js +5 -1
- package/dist/assets/locales/vi.json.js +5 -1
- package/dist/assets/locales/zh-CN.json.js +5 -1
- package/dist/assets/locales/zh-TW.json.js +5 -1
- package/dist/components/UElement.styles.js +2 -2
- package/dist/components/alert/UAlert.d.ts +12 -7
- package/dist/components/alert/UAlert.js +3 -3
- package/dist/components/alert/UAlert.styles.js +6 -23
- package/dist/components/badge/UBadge.d.ts +5 -5
- package/dist/components/badge/UBadge.js +3 -3
- package/dist/components/badge/UBadge.styles.js +4 -4
- package/dist/components/breadcrumb-item/UBreadcrumbItem.styles.js +1 -1
- package/dist/components/button/UButton.d.ts +32 -16
- package/dist/components/button/UButton.js +38 -5
- package/dist/components/button/UButton.styles.js +67 -50
- package/dist/components/button/forwarded-aria.d.ts +6 -0
- package/dist/components/button/forwarded-aria.js +15 -0
- package/dist/components/button-group/UButtonGroup.d.ts +4 -4
- package/dist/components/button-group/UButtonGroup.js +8 -8
- package/dist/components/button-group/UButtonGroup.styles.js +2 -2
- package/dist/components/calendar/UCalendar.styles.js +4 -3
- package/dist/components/calendar/date-text-controller.d.ts +5 -0
- package/dist/components/calendar/date-text-controller.js +7 -0
- package/dist/components/calendar/picker.styles.js +7 -2
- package/dist/components/card/UCard.d.ts +4 -3
- package/dist/components/card/UCard.js +3 -3
- package/dist/components/card/UCard.styles.js +2 -1
- package/dist/components/carousel/UCarousel.js +2 -2
- package/dist/components/carousel/UCarousel.styles.js +17 -6
- package/dist/components/checkbox/UCheckbox.d.ts +8 -9
- package/dist/components/checkbox/UCheckbox.js +3 -3
- package/dist/components/checkbox/UCheckbox.styles.js +22 -18
- package/dist/components/chip/UChip.d.ts +2 -2
- package/dist/components/chip/UChip.js +4 -4
- package/dist/components/copy-button/UCopyButton.d.ts +2 -2
- package/dist/components/copy-button/UCopyButton.js +4 -4
- package/dist/components/date-picker/UDatePicker.d.ts +3 -0
- package/dist/components/date-picker/UDatePicker.js +9 -4
- package/dist/components/date-picker/UDatePicker.styles.js +13 -2
- package/dist/components/date-range-picker/UDateRangePicker.d.ts +3 -0
- package/dist/components/date-range-picker/UDateRangePicker.js +8 -3
- package/dist/components/date-range-picker/UDateRangePicker.styles.js +13 -3
- package/dist/components/dialog/UDialog.js +1 -1
- package/dist/components/divider/UDivider.d.ts +3 -3
- package/dist/components/divider/UDivider.js +2 -2
- package/dist/components/divider/UDivider.styles.js +5 -5
- package/dist/components/drawer/UDrawer.js +1 -1
- package/dist/components/expander/UExpander.styles.js +2 -2
- package/dist/components/file-input/UFileInput.styles.js +5 -2
- package/dist/components/icon-button/UIconButton.d.ts +4 -3
- package/dist/components/icon-button/UIconButton.js +16 -6
- package/dist/components/icon-button/UIconButton.styles.js +2 -2
- package/dist/components/input/UInput.d.ts +12 -5
- package/dist/components/input/UInput.js +7 -4
- package/dist/components/input/UInput.styles.js +60 -30
- package/dist/components/menu/UMenu.d.ts +5 -4
- package/dist/components/menu/UMenu.js +3 -3
- package/dist/components/menu/UMenu.styles.js +1 -1
- package/dist/components/menu-item/UMenuItem.styles.js +1 -1
- package/dist/components/option/UOption.d.ts +1 -0
- package/dist/components/option/UOption.js +6 -3
- package/dist/components/option/UOption.styles.js +1 -1
- package/dist/components/progress-bar/UProgressBar.styles.js +11 -0
- package/dist/components/radio/URadio.d.ts +27 -6
- package/dist/components/radio/URadio.js +48 -12
- package/dist/components/radio/URadio.styles.js +47 -13
- package/dist/components/rating/URating.styles.js +5 -1
- package/dist/components/select/USelect.d.ts +9 -2
- package/dist/components/select/USelect.js +7 -2
- package/dist/components/select/USelect.styles.js +55 -26
- package/dist/components/slider/USlider.styles.js +4 -4
- package/dist/components/spinner/USpinner.styles.js +2 -0
- package/dist/components/split-panel/USplitPanel.styles.js +2 -1
- package/dist/components/steps/USteps.d.ts +57 -0
- package/dist/components/steps/USteps.js +58 -0
- package/dist/components/steps/USteps.styles.d.ts +1 -0
- package/dist/components/steps/USteps.styles.js +110 -0
- package/dist/components/switch/USwitch.styles.js +5 -3
- package/dist/components/tab/UTab.js +2 -2
- package/dist/components/tab/UTab.styles.js +1 -1
- package/dist/components/tab-panel/UTabPanel.d.ts +11 -2
- package/dist/components/tab-panel/UTabPanel.js +33 -5
- package/dist/components/tab-panel/UTabPanel.styles.js +29 -29
- package/dist/components/tag/UTag.d.ts +14 -6
- package/dist/components/tag/UTag.js +8 -3
- package/dist/components/tag/UTag.styles.js +33 -26
- package/dist/components/textarea/UTextarea.d.ts +9 -3
- package/dist/components/textarea/UTextarea.js +7 -2
- package/dist/components/textarea/UTextarea.styles.js +41 -22
- package/dist/components/tree-item/UTreeItem.styles.js +7 -5
- package/dist/index.d.ts +1 -0
- package/dist/index.js +2 -1
- package/dist/plugins/vite-plugin-react-wrapper.js +14 -5
- package/dist/react/UAlert.d.ts +4 -2
- package/dist/react/UAvatar.d.ts +4 -2
- package/dist/react/UBadge.d.ts +4 -2
- package/dist/react/UBreadcrumb.d.ts +4 -2
- package/dist/react/UBreadcrumbItem.d.ts +4 -2
- package/dist/react/UButton.d.ts +4 -2
- package/dist/react/UButtonGroup.d.ts +4 -2
- package/dist/react/UCard.d.ts +4 -2
- package/dist/react/UCarousel.d.ts +4 -2
- package/dist/react/UCheckbox.d.ts +4 -2
- package/dist/react/UChip.d.ts +4 -2
- package/dist/react/UCopyButton.d.ts +4 -2
- package/dist/react/UDatePicker.d.ts +4 -2
- package/dist/react/UDateRangePicker.d.ts +4 -2
- package/dist/react/UDialog.d.ts +4 -2
- package/dist/react/UDivider.d.ts +4 -2
- package/dist/react/UDrawer.d.ts +4 -2
- package/dist/react/UExpander.d.ts +4 -2
- package/dist/react/UField.d.ts +4 -2
- package/dist/react/UFileInput.d.ts +4 -2
- package/dist/react/UForm.d.ts +4 -2
- package/dist/react/UIcon.d.ts +4 -2
- package/dist/react/UIconButton.d.ts +4 -2
- package/dist/react/UInput.d.ts +4 -2
- package/dist/react/UMenu.d.ts +4 -2
- package/dist/react/UMenuItem.d.ts +4 -2
- package/dist/react/UOption.d.ts +4 -2
- package/dist/react/UPanel.d.ts +4 -2
- package/dist/react/UPopover.d.ts +4 -2
- package/dist/react/UProgressBar.d.ts +4 -2
- package/dist/react/UProgressRing.d.ts +4 -2
- package/dist/react/URadio.d.ts +4 -2
- package/dist/react/URating.d.ts +4 -2
- package/dist/react/USelect.d.ts +4 -2
- package/dist/react/USkeleton.d.ts +4 -2
- package/dist/react/USlider.d.ts +4 -2
- package/dist/react/USpinner.d.ts +4 -2
- package/dist/react/USplitPanel.d.ts +4 -2
- package/dist/react/USteps.d.ts +14 -0
- package/dist/react/USteps.js +10 -0
- package/dist/react/USwitch.d.ts +4 -2
- package/dist/react/UTab.d.ts +4 -2
- package/dist/react/UTabPanel.d.ts +4 -2
- package/dist/react/UTag.d.ts +4 -2
- package/dist/react/UText.d.ts +4 -2
- package/dist/react/UTextarea.d.ts +4 -2
- package/dist/react/UTooltip.d.ts +4 -2
- package/dist/react/UTree.d.ts +4 -2
- package/dist/react/UTreeItem.d.ts +4 -2
- package/dist/react/index.d.ts +1 -0
- package/dist/react/index.js +1 -0
- package/dist/styles/dark.css +42 -0
- package/dist/styles/light.css +44 -0
- package/dist/utilities/Dialog.d.ts +2 -2
- package/dist/utilities/Dialog.js +3 -3
- package/dist/utilities/Locale.d.ts +1 -1
- package/dist/utilities/Toast.d.ts +2 -2
- package/dist/utilities/Toast.js +1 -1
- package/dist/utilities/icons.d.ts +12 -3
- package/dist/utilities/icons.js +24 -6
- package/package.json +1 -1
- package/skills/iyulab-components/SKILL.md +3 -3
- package/skills/iyulab-components/references/components/alert.md +5 -5
- package/skills/iyulab-components/references/components/badge.md +3 -3
- package/skills/iyulab-components/references/components/button-group.md +3 -3
- package/skills/iyulab-components/references/components/button.md +34 -19
- package/skills/iyulab-components/references/components/card.md +3 -3
- package/skills/iyulab-components/references/components/checkbox.md +5 -5
- package/skills/iyulab-components/references/components/chip.md +2 -2
- package/skills/iyulab-components/references/components/copy-button.md +1 -1
- package/skills/iyulab-components/references/components/date-picker.md +1 -0
- package/skills/iyulab-components/references/components/date-range-picker.md +1 -0
- package/skills/iyulab-components/references/components/dialog.md +2 -2
- package/skills/iyulab-components/references/components/divider.md +2 -2
- package/skills/iyulab-components/references/components/drawer.md +1 -1
- package/skills/iyulab-components/references/components/field.md +1 -1
- package/skills/iyulab-components/references/components/icon-button.md +8 -2
- package/skills/iyulab-components/references/components/input.md +4 -2
- package/skills/iyulab-components/references/components/menu.md +1 -1
- package/skills/iyulab-components/references/components/radio.md +16 -4
- package/skills/iyulab-components/references/components/select.md +2 -1
- package/skills/iyulab-components/references/components/steps.md +66 -0
- package/skills/iyulab-components/references/components/tab-panel.md +10 -3
- package/skills/iyulab-components/references/components/tag.md +11 -7
- package/skills/iyulab-components/references/components/textarea.md +2 -1
- package/skills/iyulab-components/references/usage.md +1 -1
- package/skills/iyulab-components/references/utilities/dialog.md +2 -2
- package/skills/iyulab-components/references/utilities/icons.md +2 -2
- package/skills/iyulab-components/references/utilities/theme.md +9 -5
- package/skills/iyulab-components/references/utilities/toast.md +2 -2
|
@@ -46,8 +46,8 @@ var styles = css`
|
|
|
46
46
|
padding: 0;
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
/* Default +
|
|
50
|
-
:host([type="default"][
|
|
49
|
+
/* Default + Solid */
|
|
50
|
+
:host([type="default"][appearance="solid"]) ::slotted(u-option) {
|
|
51
51
|
--option-color-active: #fff;
|
|
52
52
|
--option-border-color-active: var(--radio-color);
|
|
53
53
|
--option-background-color-active: var(--radio-color);
|
|
@@ -57,7 +57,7 @@ var styles = css`
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/* Default + Outlined */
|
|
60
|
-
:host([type="default"][
|
|
60
|
+
:host([type="default"][appearance="outlined"]) ::slotted(u-option) {
|
|
61
61
|
--option-color-active: var(--radio-color-active);
|
|
62
62
|
--option-border-color-active: var(--radio-color);
|
|
63
63
|
--option-background-color-active: transparent;
|
|
@@ -66,8 +66,8 @@ var styles = css`
|
|
|
66
66
|
--option-background-color-active-interactive: transparent;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
/* Button +
|
|
70
|
-
:host([type="button"][
|
|
69
|
+
/* Button + Solid */
|
|
70
|
+
:host([type="button"][appearance="solid"]) ::slotted(u-option) {
|
|
71
71
|
--option-color-active: #fff;
|
|
72
72
|
--option-border-color-active: var(--radio-color);
|
|
73
73
|
--option-background-color-active: var(--radio-color);
|
|
@@ -77,7 +77,7 @@ var styles = css`
|
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
/* Button + Outlined */
|
|
80
|
-
:host([type="button"][
|
|
80
|
+
:host([type="button"][appearance="outlined"]) ::slotted(u-option) {
|
|
81
81
|
--option-color-active: var(--radio-color-active);
|
|
82
82
|
--option-border-color-active: var(--radio-color);
|
|
83
83
|
--option-background-color-active: transparent;
|
|
@@ -87,30 +87,64 @@ var styles = css`
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
/* === Button - Horizontal 배치 === */
|
|
90
|
-
:host([type="button"][orientation="horizontal"]) ::slotted(u-option:first-child) {
|
|
90
|
+
:host([type="button"]:not([appearance="soft"])[orientation="horizontal"]) ::slotted(u-option:first-child) {
|
|
91
91
|
border-radius: 0.35em 0 0 0.35em;
|
|
92
92
|
}
|
|
93
|
-
:host([type="button"][orientation="horizontal"]) ::slotted(u-option:last-child) {
|
|
93
|
+
:host([type="button"]:not([appearance="soft"])[orientation="horizontal"]) ::slotted(u-option:last-child) {
|
|
94
94
|
border-radius: 0 0.35em 0.35em 0;
|
|
95
95
|
}
|
|
96
|
-
:host([type="button"][orientation="horizontal"]) ::slotted(u-option:not(:last-child)) {
|
|
96
|
+
:host([type="button"]:not([appearance="soft"])[orientation="horizontal"]) ::slotted(u-option:not(:last-child)) {
|
|
97
97
|
border-right: 1px solid var(--u-neutral-300, #E0E0E0);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
100
|
/* === Button - Vertical 배치 === */
|
|
101
|
-
:host([type="button"][orientation="vertical"]) ::slotted(u-option) {
|
|
101
|
+
:host([type="button"]:not([appearance="soft"])[orientation="vertical"]) ::slotted(u-option) {
|
|
102
102
|
width: 100%;
|
|
103
103
|
justify-content: center;
|
|
104
104
|
}
|
|
105
|
-
:host([type="button"][orientation="vertical"]) ::slotted(u-option:first-child) {
|
|
105
|
+
:host([type="button"]:not([appearance="soft"])[orientation="vertical"]) ::slotted(u-option:first-child) {
|
|
106
106
|
border-radius: 0.35em 0.35em 0 0;
|
|
107
107
|
}
|
|
108
|
-
:host([type="button"][orientation="vertical"]) ::slotted(u-option:last-child) {
|
|
108
|
+
:host([type="button"]:not([appearance="soft"])[orientation="vertical"]) ::slotted(u-option:last-child) {
|
|
109
109
|
border-radius: 0 0 0.35em 0.35em;
|
|
110
110
|
}
|
|
111
|
-
:host([type="button"][orientation="vertical"]) ::slotted(u-option:not(:last-child)) {
|
|
111
|
+
:host([type="button"]:not([appearance="soft"])[orientation="vertical"]) ::slotted(u-option:not(:last-child)) {
|
|
112
112
|
border-bottom: 1px solid var(--u-neutral-300, #E0E0E0);
|
|
113
113
|
}
|
|
114
|
+
|
|
115
|
+
/* === Button + Soft — a segmented control ===
|
|
116
|
+
A quiet track; the picked segment rises onto the surface. No joined borders. */
|
|
117
|
+
:host([type="button"][appearance="soft"]) .container {
|
|
118
|
+
gap: 2px;
|
|
119
|
+
padding: 2px;
|
|
120
|
+
border-color: transparent;
|
|
121
|
+
border-radius: var(--u-radius-lg, 6px);
|
|
122
|
+
background-color: var(--u-bg-color-raised, #FAFAFA);
|
|
123
|
+
}
|
|
124
|
+
:host([type="button"][appearance="soft"]) ::slotted(u-option) {
|
|
125
|
+
justify-content: center;
|
|
126
|
+
border-color: transparent;
|
|
127
|
+
border-radius: var(--u-radius-md, 4px);
|
|
128
|
+
color: var(--u-txt-color-weak, #616161);
|
|
129
|
+
--option-border-color-interactive: transparent;
|
|
130
|
+
--option-color-active: var(--u-txt-color, #212121);
|
|
131
|
+
--option-border-color-active: transparent;
|
|
132
|
+
--option-background-color-active: var(--u-bg-color, #FFFFFF);
|
|
133
|
+
--option-color-active-interactive: var(--u-txt-color, #212121);
|
|
134
|
+
--option-border-color-active-interactive: transparent;
|
|
135
|
+
--option-background-color-active-interactive: var(--u-bg-color, #FFFFFF);
|
|
136
|
+
}
|
|
137
|
+
/* The segments' borders are transparent and u-option drops its own outline, so focus needs a
|
|
138
|
+
ring of its own — in a radiogroup focus moves with the selection, and without this the focused
|
|
139
|
+
segment shows no change at all (WCAG 2.4.7). */
|
|
140
|
+
:host([type="button"][appearance="soft"]) ::slotted(u-option:focus-visible) {
|
|
141
|
+
outline: 2px solid var(--u-focus-ring-color, #1565C0);
|
|
142
|
+
outline-offset: 1px;
|
|
143
|
+
}
|
|
144
|
+
:host([type="button"][appearance="soft"]) ::slotted(u-option[selected]) {
|
|
145
|
+
box-shadow: var(--u-shadow-sm, 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 1px rgba(0, 0, 0, 0.04));
|
|
146
|
+
font-weight: 600;
|
|
147
|
+
}
|
|
114
148
|
`;
|
|
115
149
|
//#endregion
|
|
116
150
|
export { styles };
|
|
@@ -32,13 +32,17 @@ var styles = css`
|
|
|
32
32
|
평점 위젯의 시각적 무게가 달라지고, 그것은 이 처방이 피하려는 것이다.
|
|
33
33
|
패딩이 늘면 중심 간 거리도 함께 벌어져 겹침도 생기지 않는다. */
|
|
34
34
|
padding: 0.16em;
|
|
35
|
+
/* 호스트 하한(--u-target-size, 미설정 = 0) — 글리프는 그대로, 상자만. */
|
|
36
|
+
box-sizing: border-box;
|
|
37
|
+
min-width: var(--u-target-size, 0px);
|
|
38
|
+
min-height: var(--u-target-size, 0px);
|
|
35
39
|
outline: none;
|
|
36
40
|
border-radius: 0.15em;
|
|
37
41
|
color: var(--rating-symbol-off-color);
|
|
38
42
|
transition: color var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1)), transform var(--u-duration-fast, 140ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
39
43
|
}
|
|
40
44
|
.symbol:focus-visible {
|
|
41
|
-
outline: 2px solid var(--u-
|
|
45
|
+
outline: 2px solid var(--u-focus-ring-color, #1565C0);
|
|
42
46
|
outline-offset: 2px;
|
|
43
47
|
}
|
|
44
48
|
:host(:not(:disabled):not([readonly])) .symbol:hover {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PropertyValues } from 'lit';
|
|
2
|
+
import { FieldAppearance, FieldSize } from '../input/UInput.js';
|
|
2
3
|
import { UFormControlElement } from '../UFormControlElement.js';
|
|
3
4
|
import { UPopover } from '../popover/UPopover.js';
|
|
4
|
-
export type SelectVariant = 'outlined' | 'filled' | 'underlined' | 'borderless';
|
|
5
5
|
/**
|
|
6
6
|
* 드롭다운 목록에서 값을 선택하는 폼 컨트롤 컴포넌트입니다.
|
|
7
7
|
* 단일 선택 및 다중 선택, 검색 기능을 지원합니다.
|
|
@@ -39,7 +39,14 @@ export type SelectVariant = 'outlined' | 'filled' | 'underlined' | 'borderless';
|
|
|
39
39
|
export declare class USelect extends UFormControlElement<string | string[]> {
|
|
40
40
|
static styles: import('lit').CSSResultGroup[];
|
|
41
41
|
/** 트리거 영역의 스타일 변형 */
|
|
42
|
-
|
|
42
|
+
/** 외형 정도 */
|
|
43
|
+
appearance: FieldAppearance;
|
|
44
|
+
/**
|
|
45
|
+
* 크기 — 버튼의 `size` 와 같은 세 단(`sm` 12px · `md` 기본 = `--u-density`(14px) · `lg` 16px).
|
|
46
|
+
* 상자 높이는 글자 크기에서 파생된다(1.5em 줄 + 필드 상자 여백 × 2 + 테두리) — 같은 `size` 의 버튼과
|
|
47
|
+
* 한 줄에 서도록. 테마는 필드 상자 토큰(`--u-field-padding-block`)으로 단마다 높이를 다듬는다.
|
|
48
|
+
*/
|
|
49
|
+
size: FieldSize;
|
|
43
50
|
/** 다중 선택 여부 */
|
|
44
51
|
multiple: boolean;
|
|
45
52
|
/** 검색 가능 여부 */
|
|
@@ -15,7 +15,8 @@ import { ifDefined } from "lit/directives/if-defined.js";
|
|
|
15
15
|
var USelect = class USelect extends UFormControlElement {
|
|
16
16
|
constructor(..._args) {
|
|
17
17
|
super(..._args);
|
|
18
|
-
this.
|
|
18
|
+
this.appearance = "outlined";
|
|
19
|
+
this.size = "md";
|
|
19
20
|
this.multiple = false;
|
|
20
21
|
this.searchable = false;
|
|
21
22
|
this.clearable = false;
|
|
@@ -334,7 +335,11 @@ var USelect = class USelect extends UFormControlElement {
|
|
|
334
335
|
__decorate([property({
|
|
335
336
|
type: String,
|
|
336
337
|
reflect: true
|
|
337
|
-
}), __decorateMetadata("design:type", Object)], USelect.prototype, "
|
|
338
|
+
}), __decorateMetadata("design:type", Object)], USelect.prototype, "appearance", void 0);
|
|
339
|
+
__decorate([property({
|
|
340
|
+
type: String,
|
|
341
|
+
reflect: true
|
|
342
|
+
}), __decorateMetadata("design:type", Object)], USelect.prototype, "size", void 0);
|
|
338
343
|
__decorate([property({
|
|
339
344
|
type: Boolean,
|
|
340
345
|
reflect: true
|
|
@@ -15,7 +15,6 @@ var styles = css`
|
|
|
15
15
|
display: var(--u-select-display, inline-block);
|
|
16
16
|
width: var(--u-select-width, auto);
|
|
17
17
|
color: var(--u-txt-color, #212121);
|
|
18
|
-
font-size: inherit;
|
|
19
18
|
font-family: var(--u-font-base);
|
|
20
19
|
}
|
|
21
20
|
|
|
@@ -23,12 +22,18 @@ var styles = css`
|
|
|
23
22
|
display: flex;
|
|
24
23
|
flex-direction: row;
|
|
25
24
|
align-items: center;
|
|
26
|
-
padding: 0.3em 0.6em;
|
|
25
|
+
padding: var(--u-field-padding-block, 0.3em) var(--u-field-padding-inline, 0.6em);
|
|
26
|
+
/* 호스트 하한(--u-target-size, 미설정 = 0) — 글자와 독립된 터치 하한. */
|
|
27
|
+
box-sizing: border-box;
|
|
28
|
+
min-height: var(--u-target-size, 0px);
|
|
27
29
|
border: 1px solid var(--u-input-border-color, #E0E0E0);
|
|
28
|
-
border-radius: 0.25em;
|
|
30
|
+
border-radius: var(--u-field-radius, 0.25em);
|
|
29
31
|
background-color: var(--u-input-bg-color, #FFFFFF);
|
|
30
32
|
transition: border-color var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1)), box-shadow var(--u-duration-normal, 220ms) var(--u-ease-standard, cubic-bezier(0.2, 0, 0, 1));
|
|
31
|
-
|
|
33
|
+
/* 잘라 내는 경계를 테두리 바깥선까지 — 호스트 하한(--u-target-size)으로 커진 접미 아이콘은 필드 높이를 채우고
|
|
34
|
+
테두리 1px 위까지 닿는다. 패딩 상자에서 자르면 그 1px 이 눌리지 않는다(hidden 은 여백을 받지 않는다). */
|
|
35
|
+
overflow: clip;
|
|
36
|
+
overflow-clip-margin: 1px;
|
|
32
37
|
user-select: none;
|
|
33
38
|
cursor: pointer;
|
|
34
39
|
}
|
|
@@ -53,34 +58,34 @@ var styles = css`
|
|
|
53
58
|
box-shadow: 0 0 0 1px var(--u-input-border-color-invalid, #C62828);
|
|
54
59
|
}
|
|
55
60
|
|
|
56
|
-
/* =====
|
|
57
|
-
:host([
|
|
61
|
+
/* ===== Appearance: soft (중립 틴트 면) ===== */
|
|
62
|
+
:host([appearance="soft"]) .container {
|
|
58
63
|
border: none;
|
|
59
|
-
border-radius: 0.25em 0.25em 0 0;
|
|
64
|
+
border-radius: var(--u-field-radius, 0.25em) var(--u-field-radius, 0.25em) 0 0;
|
|
60
65
|
border-bottom: 2px solid var(--u-input-border-color, #E0E0E0);
|
|
61
66
|
background-color: var(--u-neutral-200, #EEEEEE);
|
|
62
67
|
}
|
|
63
|
-
:host([
|
|
64
|
-
:host([
|
|
68
|
+
:host([appearance="soft"][readonly]) .container,
|
|
69
|
+
:host([appearance="soft"]:disabled) .container {
|
|
65
70
|
background-color: var(--u-bg-color-disabled, #FAFAFA);
|
|
66
71
|
border-bottom-color: var(--u-border-color-weak, #EEEEEE);
|
|
67
72
|
}
|
|
68
|
-
:host([
|
|
73
|
+
:host([appearance="soft"]:not([readonly]):not(:disabled)) .container:hover {
|
|
69
74
|
box-shadow: none;
|
|
70
75
|
background-color: var(--u-neutral-300, #E0E0E0);
|
|
71
76
|
border-bottom-color: var(--u-input-border-color-hover, #BDBDBD);
|
|
72
77
|
}
|
|
73
|
-
:host([
|
|
78
|
+
:host([appearance="soft"]:not([readonly]):not(:disabled)) .container:focus-within {
|
|
74
79
|
box-shadow: none;
|
|
75
80
|
border-bottom-color: var(--u-input-border-color-focus, #1565C0);
|
|
76
81
|
}
|
|
77
|
-
:host([
|
|
82
|
+
:host([appearance="soft"][invalid]:not([readonly]):not(:disabled)) .container {
|
|
78
83
|
box-shadow: none;
|
|
79
84
|
border-bottom-color: var(--u-input-border-color-invalid, #C62828);
|
|
80
85
|
}
|
|
81
86
|
|
|
82
|
-
/* =====
|
|
83
|
-
:host([
|
|
87
|
+
/* ===== Appearance: underlined ===== */
|
|
88
|
+
:host([appearance="underlined"]) .container {
|
|
84
89
|
border: none;
|
|
85
90
|
border-radius: var(--u-radius-none, 0);
|
|
86
91
|
background-color: transparent;
|
|
@@ -88,37 +93,43 @@ var styles = css`
|
|
|
88
93
|
padding-right: 0;
|
|
89
94
|
border-bottom: 1px solid var(--u-input-border-color, #E0E0E0);
|
|
90
95
|
}
|
|
91
|
-
:host([
|
|
92
|
-
:host([
|
|
96
|
+
:host([appearance="underlined"][readonly]) .container,
|
|
97
|
+
:host([appearance="underlined"]:disabled) .container {
|
|
93
98
|
background-color: transparent;
|
|
94
99
|
border-bottom-color: var(--u-border-color-weak, #EEEEEE);
|
|
95
100
|
}
|
|
96
|
-
:host([
|
|
101
|
+
:host([appearance="underlined"]:not([readonly]):not(:disabled)) .container:hover {
|
|
97
102
|
box-shadow: none;
|
|
98
103
|
border-bottom-color: var(--u-input-border-color-hover, #BDBDBD);
|
|
99
104
|
}
|
|
100
|
-
:host([
|
|
105
|
+
:host([appearance="underlined"]:not([readonly]):not(:disabled)) .container:focus-within {
|
|
101
106
|
box-shadow: none;
|
|
102
107
|
border-bottom-color: var(--u-input-border-color-focus, #1565C0);
|
|
103
108
|
border-bottom-width: 2px;
|
|
104
109
|
}
|
|
105
|
-
:host([
|
|
110
|
+
:host([appearance="underlined"][invalid]:not([readonly]):not(:disabled)) .container {
|
|
106
111
|
box-shadow: none;
|
|
107
112
|
border-bottom-color: var(--u-input-border-color-invalid, #C62828);
|
|
108
113
|
}
|
|
109
114
|
|
|
110
|
-
/* =====
|
|
111
|
-
:host([
|
|
115
|
+
/* ===== Appearance: plain (외형 없음) ===== */
|
|
116
|
+
:host([appearance="plain"]) .container {
|
|
112
117
|
border: none;
|
|
113
118
|
border-radius: var(--u-radius-none, 0);
|
|
114
119
|
background-color: transparent;
|
|
115
120
|
padding: 0;
|
|
116
121
|
box-shadow: none;
|
|
117
122
|
}
|
|
118
|
-
:host([
|
|
119
|
-
:host([
|
|
123
|
+
:host([appearance="plain"]:not([readonly]):not(:disabled)) .container:hover,
|
|
124
|
+
:host([appearance="plain"]:not([readonly]):not(:disabled)) .container:focus-within {
|
|
120
125
|
box-shadow: none;
|
|
121
126
|
}
|
|
127
|
+
/* 외형이 없어도 포커스는 보여야 한다(WCAG 2.4.7) — 쉬는 동안은 아무것도 그리지 않고, 포커스가
|
|
128
|
+
들어오면 링을 그린다. 깜박이는 캐럿만으로는 «어디에 포커스가 있는가» 를 알리기 어렵다. */
|
|
129
|
+
:host([appearance="plain"]:not(:disabled)) .container:focus-within {
|
|
130
|
+
outline: 2px solid var(--u-focus-ring-color, #1565C0);
|
|
131
|
+
outline-offset: 2px;
|
|
132
|
+
}
|
|
122
133
|
|
|
123
134
|
.count {
|
|
124
135
|
color: var(--u-txt-color-weak, #616161);
|
|
@@ -176,9 +187,14 @@ var styles = css`
|
|
|
176
187
|
위아래는 컨테이너 여백(0.3em) 쪽으로 넓힌다. 음수 여백이라 배치·트리거 높이는 그대로다 — 트리거의 줄은
|
|
177
188
|
1em 이라 세로 패딩만 주면 트리거가 8px 커진다. */
|
|
178
189
|
.suffix-item[role="button"] {
|
|
190
|
+
/* 받는 여백 = u-input 과 같은 식 — 글자 크기와 무관하게 ≥ 24px */
|
|
191
|
+
/* 호스트 하한(--u-target-size)이 있으면 상자가 그 값이 되도록 — 미설정이면 0 이라 종전 24px 그대로. */
|
|
192
|
+
--_target-pad: max(0.25em, calc(12px - 0.5em), calc(var(--u-target-size, 0px) / 2 - 0.5em));
|
|
179
193
|
box-sizing: content-box;
|
|
180
|
-
|
|
181
|
-
|
|
194
|
+
/* 오른쪽은 펼침 화살표와 종전처럼 0.25em 만 맞댄다 — 글자가 작아 늘어난 폭은 왼쪽(값 글자 쪽, 타깃 아님)으로 넓힌다.
|
|
195
|
+
16px 에서는 P = 0.25em 이라 종전 배치와 같다. */
|
|
196
|
+
margin: calc(-1 * var(--_target-pad)) -0.25em calc(-1 * var(--_target-pad)) calc(0.25em - var(--_target-pad));
|
|
197
|
+
padding: var(--_target-pad);
|
|
182
198
|
}
|
|
183
199
|
|
|
184
200
|
/* 드롭다운 패널 — 옵션 텍스트가 길어도 팝오버가 앵커보다 넓어지지 않도록 고정 너비로
|
|
@@ -200,12 +216,14 @@ var styles = css`
|
|
|
200
216
|
display: flex;
|
|
201
217
|
align-items: center;
|
|
202
218
|
gap: 0.4em;
|
|
203
|
-
padding: 0.3em 0.6em;
|
|
219
|
+
padding: var(--u-field-padding-block, 0.3em) var(--u-field-padding-inline, 0.6em);
|
|
204
220
|
color: var(--u-txt-color-weak, #616161);
|
|
205
221
|
border-bottom: 1px solid var(--u-border-color, #E0E0E0);
|
|
206
222
|
}
|
|
207
223
|
.search-input input {
|
|
208
224
|
all: unset;
|
|
225
|
+
/* 포인터를 받는 것은 이 입력이다 — 글자 크기와 무관하게 24px 이상(WCAG 2.5.8). */
|
|
226
|
+
min-block-size: max(24px, var(--u-target-size, 0px));
|
|
209
227
|
flex: 1;
|
|
210
228
|
min-width: 0;
|
|
211
229
|
line-height: 1.5;
|
|
@@ -213,6 +231,17 @@ var styles = css`
|
|
|
213
231
|
.search-input input::placeholder {
|
|
214
232
|
color: var(--u-txt-color-weak, #616161);
|
|
215
233
|
}
|
|
234
|
+
|
|
235
|
+
/* === Size — 버튼과 같은 세 단. md 는 주변 글자 크기를 상속하지 않는다(버튼과 높이가 갈렸다). === */
|
|
236
|
+
:host {
|
|
237
|
+
font-size: var(--u-density, 14px);
|
|
238
|
+
}
|
|
239
|
+
:host([size="sm"]) {
|
|
240
|
+
font-size: 12px;
|
|
241
|
+
}
|
|
242
|
+
:host([size="lg"]) {
|
|
243
|
+
font-size: 16px;
|
|
244
|
+
}
|
|
216
245
|
`;
|
|
217
246
|
//#endregion
|
|
218
247
|
export { styles };
|
|
@@ -35,7 +35,7 @@ var styles = css`
|
|
|
35
35
|
트랙 어디를 눌러도 값이 바뀐다. WCAG 2.2 SC 2.5.8 의 24px 하한은 그래서 여기에도 든다.
|
|
36
36
|
보이는 트랙(6px)·thumb 치수는 그대로이고, 늘어나는 것은 «잡히는 높이»뿐이다.
|
|
37
37
|
⚠주석에 백틱을 쓰지 말 것 — 태그드 템플릿이 그 자리에서 끝난다. */
|
|
38
|
-
height: max(var(--slider-thumb-size), 24px);
|
|
38
|
+
height: max(var(--slider-thumb-size), 24px, var(--u-target-size, 0px));
|
|
39
39
|
touch-action: none;
|
|
40
40
|
user-select: none;
|
|
41
41
|
-webkit-user-select: none;
|
|
@@ -79,8 +79,8 @@ var styles = css`
|
|
|
79
79
|
바꿔도 콘텐츠와 겹치지 않는다. */
|
|
80
80
|
display: grid;
|
|
81
81
|
place-items: center;
|
|
82
|
-
min-width: 24px;
|
|
83
|
-
min-height: 24px;
|
|
82
|
+
min-width: max(24px, var(--u-target-size, 0px));
|
|
83
|
+
min-height: max(24px, var(--u-target-size, 0px));
|
|
84
84
|
}
|
|
85
85
|
|
|
86
86
|
.thumb-content {
|
|
@@ -102,7 +102,7 @@ var styles = css`
|
|
|
102
102
|
box-shadow: var(--u-shadow-md, 0 2px 8px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.05));
|
|
103
103
|
}
|
|
104
104
|
.thumb:focus-visible .thumb-content {
|
|
105
|
-
box-shadow: 0 0 0
|
|
105
|
+
box-shadow: 0 0 0 2px var(--u-focus-ring-color, #1565C0);
|
|
106
106
|
}
|
|
107
107
|
|
|
108
108
|
/* 슬롯에 커스텀 엘리먼트가 들어오면 기본 스타일 제거 */
|
|
@@ -16,6 +16,8 @@ var styles = css`
|
|
|
16
16
|
:host([color="success"]) { --spinner-indicator-color: var(--u-success-color-strong, #1B5E20); }
|
|
17
17
|
:host([color="warning"]) { --spinner-indicator-color: var(--u-warning-color-strong, #8A4A00); }
|
|
18
18
|
:host([color="danger"]) { --spinner-indicator-color: var(--u-danger-color-strong, #C62828); }
|
|
19
|
+
/* neutral — 무채색(모든 컴포넌트에서 같은 뜻). 바탕 위 그래픽이라 3단 글자색(4.6:1)을 읽는다. */
|
|
20
|
+
:host([color="neutral"]) { --spinner-indicator-color: var(--u-txt-color-weaker, #757575); }
|
|
19
21
|
|
|
20
22
|
:host([color="blue"]) { --spinner-indicator-color: var(--u-blue-600, #1E88E5); }
|
|
21
23
|
:host([color="green"]) { --spinner-indicator-color: var(--u-green-600, #43A047); }
|
|
@@ -3,7 +3,8 @@ import { css } from "lit";
|
|
|
3
3
|
var styles = css`
|
|
4
4
|
:host {
|
|
5
5
|
--splitter-size: 4px;
|
|
6
|
-
--
|
|
6
|
+
/* 호스트 하한(--u-target-size)이 있으면 그 값 — 미설정이면 24px. */
|
|
7
|
+
--splitter-hit-size: max(24px, var(--u-target-size, 0px));
|
|
7
8
|
--splitter-color: var(--u-neutral-200, #EEEEEE);
|
|
8
9
|
--splitter-color-hover: var(--u-primary-color-weaker, #64B5F6);
|
|
9
10
|
--splitter-color-active: var(--u-primary-color-strong, #1565C0);
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UElement } from '../UElement.js';
|
|
2
|
+
/**
|
|
3
|
+
* 단계의 상태.
|
|
4
|
+
* - `complete` 끝난 단계
|
|
5
|
+
* - `current` 지금 단계 (하나)
|
|
6
|
+
* - `hold` 멈춘 단계 — 진행이 막혀 사람의 손이 필요하다
|
|
7
|
+
* - `upcoming` 아직 오지 않은 단계
|
|
8
|
+
*/
|
|
9
|
+
export type StepStatus = 'complete' | 'current' | 'hold' | 'upcoming';
|
|
10
|
+
export interface StepItem {
|
|
11
|
+
/** 단계 이름 */
|
|
12
|
+
label: string;
|
|
13
|
+
/** 이름 옆의 짧은 보조 문구 — 완료 날짜, 담당 등 */
|
|
14
|
+
description?: string;
|
|
15
|
+
/** 지정하면 `current` 로부터의 추론보다 우선한다 */
|
|
16
|
+
status?: StepStatus;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* 진행 단계를 한 줄로 보여 주는 **표시 전용** 컴포넌트입니다(마법사가 아니다 — 단계를 옮기는
|
|
20
|
+
* 동작은 소비자가 옆에 둔다). 여러 트랙(예: 제작·정산)은 인스턴스를 줄지어 둔다.
|
|
21
|
+
*
|
|
22
|
+
* 단계 상태는 `items[].status` 로 주거나, `current`(지금 단계의 번호)만 주면 앞은 `complete`,
|
|
23
|
+
* 뒤는 `upcoming` 으로 정해진다. 상태는 표식 모양으로도 갈린다(색만으로 구분하지 않는다):
|
|
24
|
+
* 완료 = 체크 · 지금 = 굵은 고리 · 보류 = 경고 면 · 예정 = 빈 고리.
|
|
25
|
+
* 보조기기에는 지금 단계를 `aria-current="step"` 으로, 완료·보류를 숨은 글자로 전한다.
|
|
26
|
+
*
|
|
27
|
+
* @csspart base - 바깥 상자
|
|
28
|
+
* @csspart label - 트랙 이름 (`label` 을 줄 때만)
|
|
29
|
+
* @csspart list - 단계 목록(`ol`)
|
|
30
|
+
* @csspart step - 단계 하나 — `step-complete`·`step-current`·`step-hold`·`step-upcoming` 도 함께 붙는다
|
|
31
|
+
* @csspart marker - 단계 표식(고리·체크)
|
|
32
|
+
* @csspart title - 단계 이름
|
|
33
|
+
* @csspart description - 단계 보조 문구
|
|
34
|
+
* @csspart connector - 단계 사이의 선
|
|
35
|
+
*
|
|
36
|
+
* @cssprop --steps-marker-size - 표식 지름 (기본 18px)
|
|
37
|
+
* @cssprop --steps-connector-color - 아직 지나지 않은 연결선 색
|
|
38
|
+
* @cssprop --steps-connector-done-color - 지나온 연결선·완료 표식 색
|
|
39
|
+
* @cssprop --steps-label-width - 트랙 이름 칸 폭 (기본 56px)
|
|
40
|
+
*/
|
|
41
|
+
export declare class USteps extends UElement {
|
|
42
|
+
static styles: import('lit').CSSResultGroup[];
|
|
43
|
+
/** 단계 목록 */
|
|
44
|
+
items: StepItem[];
|
|
45
|
+
/** 지금 단계의 번호(0부터). `items[].status` 가 없는 단계의 상태를 여기서 추론한다. */
|
|
46
|
+
current?: number;
|
|
47
|
+
/** 트랙 이름 — 여러 트랙을 줄지어 둘 때 앞머리에 보인다. 목록의 접근 가능한 이름이기도 하다. */
|
|
48
|
+
label?: string;
|
|
49
|
+
/** 단계의 실효 상태. */
|
|
50
|
+
statusOf(index: number): StepStatus;
|
|
51
|
+
protected render(): import('lit-html').TemplateResult<1>;
|
|
52
|
+
}
|
|
53
|
+
declare global {
|
|
54
|
+
interface HTMLElementTagNameMap {
|
|
55
|
+
'u-steps': USteps;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { UElement } from "../UElement.js";
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.152.0/helpers/esm/decorate.js";
|
|
4
|
+
import { Locale } from "../../utilities/Locale.js";
|
|
5
|
+
import { styles } from "./USteps.styles.js";
|
|
6
|
+
import { html, nothing } from "lit";
|
|
7
|
+
import { customElement, property } from "lit/decorators.js";
|
|
8
|
+
import { ifDefined } from "lit/directives/if-defined.js";
|
|
9
|
+
//#region src/components/steps/USteps.ts
|
|
10
|
+
var USteps = class USteps extends UElement {
|
|
11
|
+
constructor(..._args) {
|
|
12
|
+
super(..._args);
|
|
13
|
+
this.items = [];
|
|
14
|
+
}
|
|
15
|
+
static {
|
|
16
|
+
this.styles = [super.styles, styles];
|
|
17
|
+
}
|
|
18
|
+
/** 단계의 실효 상태. */
|
|
19
|
+
statusOf(index) {
|
|
20
|
+
const own = this.items[index]?.status;
|
|
21
|
+
if (own) return own;
|
|
22
|
+
if (this.current === void 0) return "upcoming";
|
|
23
|
+
if (index < this.current) return "complete";
|
|
24
|
+
if (index === this.current) return "current";
|
|
25
|
+
return "upcoming";
|
|
26
|
+
}
|
|
27
|
+
render() {
|
|
28
|
+
const last = this.items.length - 1;
|
|
29
|
+
return html`
|
|
30
|
+
<div class="base" part="base">
|
|
31
|
+
${this.label ? html`<span class="label" part="label" aria-hidden="true">${this.label}</span>` : nothing}
|
|
32
|
+
<ol class="list" part="list" aria-label=${ifDefined(this.label)}>
|
|
33
|
+
${this.items.map((item, i) => {
|
|
34
|
+
const status = this.statusOf(i);
|
|
35
|
+
const travelled = i < last && status === "complete";
|
|
36
|
+
return html`
|
|
37
|
+
<li class="step" part="step step-${status}" data-status=${status}
|
|
38
|
+
aria-current=${ifDefined(status === "current" ? "step" : void 0)}>
|
|
39
|
+
<span class="marker" part="marker" aria-hidden="true">${status === "complete" ? CHECK : nothing}</span>
|
|
40
|
+
<span class="title" part="title">${item.label}</span>
|
|
41
|
+
${item.description ? html`<span class="description" part="description">${item.description}</span>` : nothing}
|
|
42
|
+
${status === "complete" || status === "hold" ? html`<span class="sr-only">${Locale.getValue(status === "complete" ? "stepComplete" : "stepOnHold")}</span>` : nothing}
|
|
43
|
+
</li>
|
|
44
|
+
${i < last ? html`<li class="connector ${travelled ? "travelled" : ""}" part="connector" aria-hidden="true"></li>` : nothing}
|
|
45
|
+
`;
|
|
46
|
+
})}
|
|
47
|
+
</ol>
|
|
48
|
+
</div>
|
|
49
|
+
`;
|
|
50
|
+
}
|
|
51
|
+
};
|
|
52
|
+
__decorate([property({ attribute: false }), __decorateMetadata("design:type", Array)], USteps.prototype, "items", void 0);
|
|
53
|
+
__decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], USteps.prototype, "current", void 0);
|
|
54
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], USteps.prototype, "label", void 0);
|
|
55
|
+
USteps = __decorate([customElement("u-steps")], USteps);
|
|
56
|
+
var CHECK = html`<svg viewBox="0 0 12 12" width="10" height="10" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M2.5 6.2 5 8.5 9.5 3.5"/></svg>`;
|
|
57
|
+
//#endregion
|
|
58
|
+
export { USteps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
import { css } from "lit";
|
|
2
|
+
//#region src/components/steps/USteps.styles.ts
|
|
3
|
+
var styles = css`
|
|
4
|
+
:host {
|
|
5
|
+
display: block;
|
|
6
|
+
font-size: var(--u-text-label-size, 13px);
|
|
7
|
+
line-height: var(--u-text-label-leading, 1.5);
|
|
8
|
+
color: var(--u-txt-color-weaker, #757575);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.base {
|
|
12
|
+
display: flex;
|
|
13
|
+
align-items: center;
|
|
14
|
+
gap: var(--u-space-md, 12px);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.label {
|
|
18
|
+
flex: none;
|
|
19
|
+
width: var(--steps-label-width, 56px);
|
|
20
|
+
font-weight: var(--u-text-label-weight, 600);
|
|
21
|
+
color: var(--u-txt-color-weak, #616161);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.list {
|
|
25
|
+
flex: 1;
|
|
26
|
+
display: flex;
|
|
27
|
+
align-items: center;
|
|
28
|
+
min-width: 0;
|
|
29
|
+
margin: 0;
|
|
30
|
+
padding: 0;
|
|
31
|
+
list-style: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.step {
|
|
35
|
+
display: flex;
|
|
36
|
+
align-items: center;
|
|
37
|
+
gap: var(--u-space-xs, 6px);
|
|
38
|
+
white-space: nowrap;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.marker {
|
|
42
|
+
flex: none;
|
|
43
|
+
display: inline-grid;
|
|
44
|
+
place-items: center;
|
|
45
|
+
box-sizing: border-box;
|
|
46
|
+
width: var(--steps-marker-size, 18px);
|
|
47
|
+
height: var(--steps-marker-size, 18px);
|
|
48
|
+
border: 1.5px solid var(--u-border-color-strong, #BDBDBD);
|
|
49
|
+
border-radius: var(--u-radius-circle, 50%);
|
|
50
|
+
background: var(--u-bg-color, #FFFFFF);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.description {
|
|
54
|
+
color: var(--u-txt-color-weaker, #757575);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* 완료 — 지나온 색의 채운 체크, 이름은 한 단 물러선다 */
|
|
58
|
+
.step[data-status="complete"] {
|
|
59
|
+
color: var(--u-txt-color-weak, #616161);
|
|
60
|
+
}
|
|
61
|
+
.step[data-status="complete"] .marker {
|
|
62
|
+
border-color: var(--steps-connector-done-color, var(--u-txt-color-weak, #616161));
|
|
63
|
+
background: var(--steps-connector-done-color, var(--u-txt-color-weak, #616161));
|
|
64
|
+
color: var(--u-bg-color, #FFFFFF);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/* 지금 — 굵은 고리, 이름은 본문 잉크 */
|
|
68
|
+
.step[data-status="current"] {
|
|
69
|
+
color: var(--u-txt-color, #212121);
|
|
70
|
+
font-weight: var(--u-text-subtitle-weight, 600);
|
|
71
|
+
}
|
|
72
|
+
.step[data-status="current"] .marker {
|
|
73
|
+
border: calc(var(--steps-marker-size, 18px) * 0.28) solid var(--u-txt-color, #212121);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
/* 보류 — 경고 면이라 막힌 단계가 이웃보다 먼저 읽힌다 */
|
|
77
|
+
.step[data-status="hold"] {
|
|
78
|
+
color: var(--u-warning-color-strong, #8A4A00);
|
|
79
|
+
font-weight: var(--u-text-subtitle-weight, 600);
|
|
80
|
+
}
|
|
81
|
+
.step[data-status="hold"] .marker {
|
|
82
|
+
border-color: var(--u-warning-color-strong, #8A4A00);
|
|
83
|
+
background: var(--u-warning-bg-color, #FFF59D);
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.connector {
|
|
87
|
+
flex: 1;
|
|
88
|
+
min-width: 16px;
|
|
89
|
+
height: 1.5px;
|
|
90
|
+
margin: 0 var(--u-space-sm, 8px);
|
|
91
|
+
background: var(--steps-connector-color, var(--u-border-color, #E0E0E0));
|
|
92
|
+
}
|
|
93
|
+
.connector.travelled {
|
|
94
|
+
background: var(--steps-connector-done-color, var(--u-txt-color-weak, #616161));
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.sr-only {
|
|
98
|
+
position: absolute;
|
|
99
|
+
width: 1px;
|
|
100
|
+
height: 1px;
|
|
101
|
+
padding: 0;
|
|
102
|
+
margin: -1px;
|
|
103
|
+
overflow: hidden;
|
|
104
|
+
clip-path: inset(50%);
|
|
105
|
+
white-space: nowrap;
|
|
106
|
+
border: 0;
|
|
107
|
+
}
|
|
108
|
+
`;
|
|
109
|
+
//#endregion
|
|
110
|
+
export { styles };
|
|
@@ -24,7 +24,9 @@ var styles = css`
|
|
|
24
24
|
/* WCAG 2.2 SC 2.5.8 — 트랙(--switch-track-height)의 시각 치수는 그대로 두고
|
|
25
25
|
포인터 타깃만 24px 하한을 갖는다. UCheckbox 와 같은 처방이다.
|
|
26
26
|
⚠이 주석에 백틱을 쓰면 css 템플릿이 그 자리에서 끝난다(sweep 의 「css 백틱」). */
|
|
27
|
-
min-block-size: 24px;
|
|
27
|
+
min-block-size: max(24px, var(--u-target-size, 0px));
|
|
28
|
+
/* 호스트 하한(--u-target-size, 미설정 = 0)이 있으면 폭도 — 라벨 없는 단독 컨트롤이 그 값보다 좁다. */
|
|
29
|
+
min-inline-size: var(--u-target-size, 0px);
|
|
28
30
|
justify-content: center;
|
|
29
31
|
color: var(--u-txt-color, #212121);
|
|
30
32
|
font-size: inherit;
|
|
@@ -64,8 +66,8 @@ var styles = css`
|
|
|
64
66
|
}
|
|
65
67
|
input:focus-visible ~ .track {
|
|
66
68
|
box-shadow:
|
|
67
|
-
0 0 0 1px var(--u-
|
|
68
|
-
0 0 0 3px color-mix(in srgb, var(--u-
|
|
69
|
+
0 0 0 1px var(--u-focus-ring-color, #1565C0),
|
|
70
|
+
0 0 0 3px color-mix(in srgb, var(--u-focus-ring-color, #1565C0) 22%, transparent);
|
|
69
71
|
}
|
|
70
72
|
|
|
71
73
|
/* === 트랙 === */
|