@iyulab/modern-app 0.9.0 โ 0.11.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/CHANGELOG.md +82 -0
- package/LICENSE +1 -1
- package/dist/components/ActionBar.d.ts +45 -0
- package/dist/components/ActionBar.js +32 -0
- package/dist/components/ActionBar.styles.d.ts +1 -0
- package/dist/components/ActionBar.styles.js +71 -0
- package/dist/components/EmptyState.d.ts +7 -1
- package/dist/components/GroupBox.styles.js +26 -0
- package/dist/components/PageHeader.styles.js +12 -3
- package/dist/components/SidebarButton.js +12 -10
- package/dist/components/SidebarButton.styles.js +4 -3
- package/dist/components/SidebarGroup.js +22 -14
- package/dist/components/SidebarGroup.styles.js +8 -3
- package/dist/components/SidebarLink.js +12 -10
- package/dist/components/SidebarLink.styles.js +8 -3
- package/dist/components/SidebarSection.styles.js +14 -6
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -2
- package/dist/internals/nav-icon.d.ts +19 -0
- package/dist/internals/nav-icon.js +4 -0
- package/dist/layouts/SidebarLayout.styles.js +10 -3
- package/package.json +4 -3
- package/skills/modern-app/SKILL.md +14 -0
- package/skills/modern-app/references/components/action-bar.md +38 -0
- package/skills/modern-app/references/components/empty-state.md +43 -0
- package/skills/modern-app/references/components/group-box.md +41 -0
- package/skills/modern-app/references/components/info-field.md +45 -0
- package/skills/modern-app/references/components/info-section.md +35 -0
- package/skills/modern-app/references/components/page-header.md +46 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,87 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.11.0] - 2026-08-04
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- ๐ด**`u-action-bar[sticky]` ๊ฐ ๋ถ๋ชจ ๋ฐ์ผ๋ก ๋์ณค๋ค โ ๊ฐ๋ก ์คํฌ๋กค๋ฐ๊ฐ ์๊ธฐ๊ณ ์ฃผ ์ก์
์ด ์๋ ธ๋ค.**
|
|
8
|
+
์ข์ฐ ์์ ๋ง์ง(`margin: 0 calc(-1 * var(--u-space-md))`)์ผ๋ก ยซ๊ฐ์ฅ์๋ฆฌ๊น์งยป ๋๋ฆฌ๊ณ ์์๋๋ฐ,
|
|
9
|
+
๊ทธ๊ฒ์ ***๋ถ๋ชจ๊ฐ ์ ํํ ๊ทธ๋งํผ์ ๊ฐ๋ก ํจ๋ฉ์ ๊ฐ๊ณ ์๋ค***๋ ๊ฐ์ ์ด๋ค. ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋น์์
|
|
10
|
+
์ฌ๋ฐฑ์ ์ ์๋ ์๋ค โ ์์ ๋ง์ง์ ์ ๊ฑฐํ๊ณ ์ธ๋ก ํจ๋ฉ๋ง ๋จ๊ฒผ๋ค.
|
|
11
|
+
์ค์ธก: 1034px ๋ทฐํฌํธ์์ ์ฐ์ธก 12px ์ด๊ณผ โ ์ ์ฅ ๋ฒํผ ํด๋ฆฌํ.
|
|
12
|
+
|
|
13
|
+
### Added
|
|
14
|
+
|
|
15
|
+
- ๐ด**๋ด๋น๊ฒ์ด์
ํญ๋ชฉ์ ์์ด์ฝ์ด ์๊ฑฐ๋ ํด์์ ์คํจํ๋ฉด ๊ธฐ๋ณธ ์์ด์ฝ(ํ๋ธ)์ ๊ทธ๋ฆฐ๋ค.**
|
|
16
|
+
์ฌ์ด๋๋ฐ๊ฐ ์ ํ๋ฉด ๋ผ๋ฒจ์ด ์จ๊ณ ์์ด์ฝ๋ง ๋จ๋๋ฐ, ๊ทธ ์์ด์ฝ์ด ์์ผ๋ฉด ๊ทธ ๋ฉ๋ด๋ **๋์ด๋ง ์๊ณ
|
|
17
|
+
์๋ฌด๊ฒ๋ ์๋ ๋น ์ค**์ด ๋์ด ***๊ทธ ํ๋ฉด์ผ๋ก ๊ฐ ์๋จ์ด ํต์งธ๋ก ์ฌ๋ผ์ง๋ค.***
|
|
18
|
+
โ ยซ์ด๋ฆ์ด ์์ ๋ยป๋ง ๋ง์ผ๋ฉด ๋ถ์กฑํ๋ค โ ์ค์ธก ์ฌ๋ก๋ *์ด๋ฆ์ ์๋๋ฐ ํ์ผ์ด ์๋* ์ชฝ์ด์๋ค.
|
|
19
|
+
๊ทธ๋์ ํด๋ฐฑ์ `u-icon` ์ **ํด์ ์คํจ ์ง์ **์ ๊ฑธ๋ฆฐ๋ค(`u-icon[fallback]`, `@iyulab/components`).
|
|
20
|
+
ํด๋ฐฑ SVG ๋ **์ธ๋ผ์ธ**์ด๋ค โ ๋ค์ ๋คํธ์ํฌ์ ์์กดํ๋ฉด ๊ฐ์ ์คํจ๊ฐ ์ฌํ๋๋ค.
|
|
21
|
+
|
|
22
|
+
๐ด**๊ทธ๋ฆฌ๊ณ ๊ทธ ํด๋ฐฑ์ด ํธ์ถ๋ถ ์
์ค ๋์๋ง ๊ฑธ๋ ค ์์๋ค** โ `u-sidebar-group` ์
|
|
23
|
+
`?hidden` ์ผ๋ก ํด๋ฐฑ์ ๋ฌด๋ ฅํํ ์ฑ์๊ณ , ์ ํ ์ํ์์๋ ๋ผ๋ฒจ๊ณผ ์บ๋ฟ๋ ํจ๊ป ์จ์ผ๋ฏ๋ก
|
|
24
|
+
***๊ทธ๋ฃน ๋ฒํผ์ด ํต์งธ๋ก ๋น์ด ์์๋ค.*** ์ธ ์ข
๋ฅ๋ฅผ ํ ๋ชฉ๋ก์ผ๋ก ๋๋ ํ๊ท 7๊ฑด์ ์ ์คํ๋ค
|
|
25
|
+
(์ข
์ ์๋ ์ด ์ถ์ ํ
์คํธ๊ฐ **0๊ฑด**์ด์๊ณ , ๊ทธ๋์ ๋๋ฝ์ด ์กฐ์ฉํ๋ค).
|
|
26
|
+
|
|
27
|
+
### Documentation
|
|
28
|
+
|
|
29
|
+
- ๐ด**LOB ํ๋ฆฌ๋ฏธํฐ๋ธ 6์ข
์ด ์คํฌ ๋ฌธ์์ ์์ ์์๋ค** โ `u-page-header`ยท`u-group-box`ยท
|
|
30
|
+
`u-info-section`ยท`u-info-field`ยท`u-empty-state`ยท`u-action-bar`. ์ฌ์ฏ ๋ค `index.ts` ์์
|
|
31
|
+
**๊ณต๊ฐ**๋๊ณ ํ๋ฉด์ด ๊ทธ๊ฒ์ผ๋ก ์๋๋ฐ, ์คํฌ์ `app.load()` ์ค์ ๋ง ์ค๋ช
ํ๊ณ ์์๋ค.
|
|
32
|
+
์คํฌ์ ์๋น์(๊ทธ๋ฆฌ๊ณ ์์ด์ ํธ)๊ฐ API ๋ฅผ ์ฐพ๋ ์๋ฆฌ์ด๋ฏ๋ก **๊ฑฐ๊ธฐ ์์ผ๋ฉด ์๋ ๊ฒ๊ณผ ๊ฐ๋ค.**
|
|
33
|
+
โ `references/components/*.md` ์ฌ์ฏ๊ณผ ๋ชฉ์ฐจ ์ ์ ๋ํ๋ค.
|
|
34
|
+
|
|
35
|
+
### Changed
|
|
36
|
+
|
|
37
|
+
- **์
ธ ํฌ๋กฌ์ ํ์ดํฌ๊ฐ ๋์์ธ ํ ํฐ ์ค์ผ์ผ์ ๋จ์ ์ฝ๋๋ค**(`--u-text-*`).
|
|
38
|
+
์ข
์ ์๋ ์ฌ์ด๋๋ฐ ๊ณ์ด 5๊ฐ ํ์ผ์ด **20๊ฑด ์ ๋ถ ๋ฆฌํฐ๋ด**์ด์๊ณ , ๊ฐ์ ํจํค์ง์ ์ฝํ
์ธ
|
|
39
|
+
ํ๋ฆฌ๋ฏธํฐ๋ธ(`u-page-header`ยท`u-group-box`ยท`u-info-field`ยท`u-empty-state`)๋ **23๊ฑด ์ ๋ถ
|
|
40
|
+
ํ ํฐ**์ด์๋ค โ ์ค์ผ์ผ์ด ์๋๋ฐ ์
ธ์๋ ๋ฟ์ง ์๋ ์ํ์๋ค.
|
|
41
|
+
๋จ ๋ฐฐ์ ์ ๊ด์ธก๊ฐ ๊ทผ์ฌ๊ฐ ์๋๋ผ **์ฉ๋**๋ก ํ๋ค: ์ฑ ์ ๋ชฉ โ `subtitle` ยท ์น์
์ ๋ชฉ โ
|
|
42
|
+
`overline` ยท ์น์
๋ถ์ โ `caption` ยท ๋ด๋น ํญ๋ชฉ โ `label`.
|
|
43
|
+
|
|
44
|
+
โ **์๋น์ ์ํฅ โ ์ฌ์ด๋๋ฐ ๊ธ์๊ฐ ๋ฐ๋๋ค**: ๋ด๋น ํญ๋ชฉ `14px/500` โ `13px/600`(์๊ณ ๊ตต๊ฒ),
|
|
45
|
+
์ฑ ์ ๋ชฉ `18px/700` โ `16px/600`, ์น์
์ ๋ชฉ `12px` โ `11px`.
|
|
46
|
+
โ
**๋ฐฐ์น๋ ๋ฐ๋์ง ์๋๋ค** โ ๋ด๋น ํ ๋์ด(๋ผ๋ฒจ ์ค ๋ฐ์ค 19.5px๊ฐ 20px ์์ด์ฝ ์๋์ ๋ค์ด๊ฐ๋ค)์
|
|
47
|
+
ํค๋ ์ ๋ชฉ ์ค ๋ฐ์ค(16 ร 1.5 = 24px, ์ข
์ `line-height` ์ ๋์ผ)๋ฅผ ์ค์ธก์ผ๋ก ๊ณ ์ ํ๋ค.
|
|
48
|
+
โ **์์ด์ฝ ํฌ๊ธฐ๋ ํ์ดํฌ๊ฐ ์๋๋ค** โ `u-icon`ยท`.caret`ยท`.logo`ยท`.toggler` ์ `font-size` ๋
|
|
49
|
+
๋ํ ํฌ๊ธฐ๋ผ ๊ทธ๋๋ก ๋์๋ค.
|
|
50
|
+
|
|
51
|
+
### Added
|
|
52
|
+
|
|
53
|
+
- **`u-action-bar` โ ์์ธยทํธ์ง ํ๋ฉด์ ํธํฐ ์ก์
๋ฐ.** ์ด์ R4 ์ ์์ฌ์๋ค.
|
|
54
|
+
|
|
55
|
+
```html
|
|
56
|
+
<u-action-bar sticky>
|
|
57
|
+
<u-button slot="danger" color="danger" variant="ghost">์ญ์ </u-button>
|
|
58
|
+
<u-button variant="ghost">์ทจ์</u-button>
|
|
59
|
+
<u-button color="primary">์ ์ฅ</u-button>
|
|
60
|
+
</u-action-bar>
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**์ํ ์ก์
์ ์ผ์ชฝ ๋, ์ฃผ ์ก์
์ ์ค๋ฅธ์ชฝ ๋** โ ๊ฐ์ ๋ฌด๋ฆฌ์ ๋๋ฉด ยซ์ ์ฅยป์ ๋๋ฅด๋ ค๋ค
|
|
64
|
+
ยซ์ญ์ ยป๋ฅผ ๋๋ฅธ๋ค. **๊ฑฐ๋ฆฌ๊ฐ ์์ ์ฅ์น**์ด๋ฏ๋ก ์ด ๋ถ๋ฆฌ๋ ์ทจํฅ์ด ์๋๋ผ ๊ธฐ๋ฅ์ด๋ค.
|
|
65
|
+
์ข์์ง๋ฉด ๋ ๋ฌด๋ฆฌ๊ฐ ๊ฐ์ ํ ์ค์ ๊ฐ๊ณ **์ฃผ ์ก์
์ด ์๋ก** ์จ๋ค(์์ง ์์น์ ์ํ ์ก์
์
|
|
66
|
+
๋์ง ์๊ธฐ ์ํด์๋ค). `sticky` ๋ก ์คํฌ๋กค ์ปจํ
์ด๋ ํ๋จ์ ๊ณ ์ ํ๋ค.
|
|
67
|
+
|
|
68
|
+
### Changed
|
|
69
|
+
|
|
70
|
+
- ๐ด**์ ํ ๊ธฐ์ค์ด ยซํ๋ฉดยป์์ ยซ์๊ธฐ ํญยป์ผ๋ก ๋ฐ๋์๋ค** โ `u-page-header` ยท `u-group-box`.
|
|
71
|
+
|
|
72
|
+
์ข
์ ์๋ `@media (max-width: โฆ)` ์๊ณ , ๊ทธ๋ฌ๋ฉด ์ด ํ๋ฆฌ๋ฏธํฐ๋ธ๋ค์ด **์๊ธฐ๊ฐ ์ผ๋ง๋ ์ข์์ง์
|
|
73
|
+
๋ฌด๊ดํ๊ฒ** ์ ํ๋ค: ์ฌ์ด๋๋ฐ๊ฐ ์ด๋ ค ๋ณธ๋ฌธ์ด 500px ์ธ 1280px ํ๋ฉด์์๋ ์ ํ์ง ์๊ณ , ๋์
|
|
74
|
+
๋ณธ๋ฌธ์ ๊ฐ์ง ์ข์ ํ๋ฉด์์๋ ๋ถํ์ํ๊ฒ ์ ํ๋ค. ์ปดํฌ๋ํธ๊ฐ ์ค์ค๋ก ํ๋จํ ์ ์๋ ๊ฒ์
|
|
75
|
+
**์๊ธฐ ์ปจํ
์ด๋ ํญ**๋ฟ์ด๋ค โ `@container` ๋ก ์ฎ๊ฒผ๋ค(`container-type: inline-size`).
|
|
76
|
+
|
|
77
|
+
โ **์๊ฐ ๋ณํ๊ฐ ์์ ์ ์๋ค** โ ์ข์ ์ปฌ๋ผ ์์ ํ์ด์ง ํค๋๋ ์ด์ ์ ํ๊ณ (์ข
์ ์๋ ํ๋ฉด์ด
|
|
78
|
+
๋์ผ๋ฉด ์ ํ์ง ์์๋ค), ๋์ ๋ณธ๋ฌธ์ ๊ฐ์ง ํ๋ธ๋ฆฟ์์๋ ์ ํ์ง ์๋๋ค(์ข
์ ์๋ ์ ํ๋ค).
|
|
79
|
+
|
|
80
|
+
- **`u-group-box` ์ ํค๋ ํด๋ฐ๊ฐ ์ข์ ๋ ์ ๋ชฉ ์๋๋ก ๋ด๋ ค๊ฐ๋ค**(์ปจํ
์ด๋ 480px ์ดํ).
|
|
81
|
+
์ ๋ชฉ๊ณผ ํด๋ฐ๊ฐ ํ ์ค์ ๋จ์ผ๋ฉด ์ ๋ชฉ์ ์๋ฆฌ๊ณ ์
๋ ฅ์ ์๊ฐ๋ฝ๋ณด๋ค ์ข์์ง๋ค โ ์ด์ R4 ๊ฐ
|
|
82
|
+
*"์ข์ ํ๋ฉด์์ ์ ํ๋ ๊ท์น์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ ํ๋ค"* ๋ก ์๊ตฌํ ์๋ฆฌ๋ค.
|
|
83
|
+
|
|
84
|
+
|
|
3
85
|
## [0.9.0] - 2026-08-03
|
|
4
86
|
|
|
5
87
|
> **LOB ๋ ์ด์์ ํ๋ฆฌ๋ฏธํฐ๋ธ ์ ์ค.** ์ด ํจํค์ง๋ ์ข
์ ์ **์
ธ ๋ฐ๊นฅ ๊ป๋ฐ๊ธฐ**(์ฌ์ด๋๋ฐยท๋ผ์ฐํ
ยท
|
package/LICENSE
CHANGED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { StyledElement } from '../internals/StyledElement.js';
|
|
2
|
+
type ElementParts = 'host' | 'danger' | 'main';
|
|
3
|
+
/**
|
|
4
|
+
* ํธํฐ ์ก์
๋ฐ โ ์์ธยทํธ์ง ํ๋ฉด ๋งจ ์๋์ ๊ฐ์ ๊ณจ๊ฒฉ.
|
|
5
|
+
*
|
|
6
|
+
* โ
**์ ์ด๊ฒ์ด ๋ผ์ด๋ธ๋ฌ๋ฆฌ์ ์๋**: ํ๋ฉด๋ง๋ค ์์ผ๋ก ์ง๋ฉด โดยซ์ ์ฅยป์ ์์น๊ฐ ํ๋ฉด๋ง๋ค
|
|
7
|
+
* ๋ฌ๋ผ์ง๊ณ โต์ํ ์ก์
(์ญ์ )์ด ์ฃผ ์ก์
**์์** ๋์ฌ ์ค์กฐ์์ ๋ถ๋ฅด๊ณ โถ๊ธด ํผ์์
|
|
8
|
+
* ๋ฒํผ์ ์ฐพ์ ๋๊น์ง ์คํฌ๋กคํด์ผ ํ๋ค. ์
๋ค ๊ฐ๋ณ๋ก๋ ์ฌ์ํด ๋ณด์ด์ง๋ง **์ค์กฐ์์
|
|
9
|
+
* ๋๋๋ฆด ์ ์๋ค.**
|
|
10
|
+
*
|
|
11
|
+
* ```html
|
|
12
|
+
* <u-action-bar sticky>
|
|
13
|
+
* <u-button slot="danger" color="danger" variant="ghost">์ญ์ </u-button>
|
|
14
|
+
* <u-button variant="ghost">์ทจ์</u-button>
|
|
15
|
+
* <u-button color="primary">์ ์ฅ</u-button>
|
|
16
|
+
* </u-action-bar>
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* ๋ฐฐ์น ๊ท์น: **์ํ ์ก์
์ ์ผ์ชฝ ๋, ์ฃผ ์ก์
์ ์ค๋ฅธ์ชฝ ๋** โ ๊ฑฐ๋ฆฌ๊ฐ ์์ ์ฅ์น๋ค.
|
|
20
|
+
* ์ข์์ง๋ฉด ๋ ๋ฌด๋ฆฌ๊ฐ ๊ฐ์ ํ ์ค์ ๊ฐ๊ณ **์ฃผ ์ก์
์ด ์๋ก** ์จ๋ค(์์ง ์์น์ ์ํ ์ก์
์
|
|
21
|
+
* ๋์ง ์๊ธฐ ์ํด์๋ค).
|
|
22
|
+
*
|
|
23
|
+
* ์ค๋ฒ๋ผ์ด๋: `part`(hostยทdangerยทmain) + slot ์นํ.
|
|
24
|
+
*/
|
|
25
|
+
export declare class ActionBar extends StyledElement<ElementParts> {
|
|
26
|
+
static styles: import('lit').CSSResultGroup[];
|
|
27
|
+
/**
|
|
28
|
+
* ํ๋ฉด ํ๋จ์ ๊ณ ์ ํ๋ค(`position: sticky`).
|
|
29
|
+
* โ ์คํฌ๋กค ์ปจํ
์ด๋ ์์์๋ง ์๋ฏธ๊ฐ ์๋ค โ ๋ถ๋ชจ๊ฐ `overflow: auto` ์ฌ์ผ ํ๋ค.
|
|
30
|
+
*/
|
|
31
|
+
sticky: boolean;
|
|
32
|
+
/**
|
|
33
|
+
* ์ํ ์ก์
์ฌ๋กฏ ๋ฐฐ์ ์ํ.
|
|
34
|
+
* โ
CSS `:has()` ๋ก๋ ์ ์ ์๋ค โ `<slot>` ์์ ์ด ์์์ด๋ผ ํญ์ ์ฐธ์ด๋ค
|
|
35
|
+
* (`internals/slotted.ts` ์ฐธ์กฐ). ๋น ๋ํผ๊ฐ ๋จ์ผ๋ฉด ์ฃผ ์ก์
์ด ๊ฐ์ด๋ฐ๋ก ๋ฐ๋ฆฐ๋ค.
|
|
36
|
+
*/
|
|
37
|
+
private hasDanger;
|
|
38
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
39
|
+
}
|
|
40
|
+
declare global {
|
|
41
|
+
interface HTMLElementTagNameMap {
|
|
42
|
+
'u-action-bar': ActionBar;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
|
+
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
|
+
import { slotHasContent as r } from "../internals/slotted.js";
|
|
5
|
+
import { styles as i } from "./ActionBar.styles.js";
|
|
6
|
+
import { html as a } from "lit";
|
|
7
|
+
import { customElement as o, property as s, state as c } from "lit/decorators.js";
|
|
8
|
+
//#region src/components/ActionBar.ts
|
|
9
|
+
var l = class extends n {
|
|
10
|
+
constructor(...e) {
|
|
11
|
+
super(...e), this.sticky = !1, this.hasDanger = !1;
|
|
12
|
+
}
|
|
13
|
+
static {
|
|
14
|
+
this.styles = [super.styles, i];
|
|
15
|
+
}
|
|
16
|
+
render() {
|
|
17
|
+
return a`
|
|
18
|
+
<div class="danger ${this.hasDanger ? "" : "empty"}" part="danger">
|
|
19
|
+
<slot name="danger"
|
|
20
|
+
@slotchange=${(e) => this.hasDanger = r(e.target)}
|
|
21
|
+
></slot>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="main" part="main"><slot></slot></div>
|
|
24
|
+
`;
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
t([s({
|
|
28
|
+
type: Boolean,
|
|
29
|
+
reflect: !0
|
|
30
|
+
}), e("design:type", Object)], l.prototype, "sticky", void 0), t([c(), e("design:type", Object)], l.prototype, "hasDanger", void 0), l = t([o("u-action-bar")], l);
|
|
31
|
+
//#endregion
|
|
32
|
+
export { l as ActionBar };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const styles: import('lit').CSSResult;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { css as e } from "lit";
|
|
2
|
+
//#region src/components/ActionBar.styles.ts
|
|
3
|
+
var t = e`
|
|
4
|
+
:host {
|
|
5
|
+
display: flex;
|
|
6
|
+
align-items: center;
|
|
7
|
+
gap: var(--u-space-sm, 8px);
|
|
8
|
+
padding: var(--u-space-md, 12px) 0;
|
|
9
|
+
/* ์๊ธฐ ํญ์ผ๋ก ์ ํ๋ค โ ์๋ ์ง์์ ๊ธฐ์ค. ํ๋ฉด ํญ์ด ์๋๋ผ ์๊ธฐ ์ํฉ์ ๋ณธ๋ค.
|
|
10
|
+
โ **์ปจํ
์ด๋๋ ยซ์์ยป์ ์ํ ๊ฒ์ด๋ค** โ @container ์์์ :host ์์ ์ ๊ฒจ๋ฅํ๋ฉด
|
|
11
|
+
๊ทธ ์ง์๋ ์ด ํธ์คํธ๊ฐ ์๋๋ผ **๋ฐ๊นฅ์ ๋ค๋ฅธ ์ปจํ
์ด๋**๋ฅผ ๋ณธ๋ค(์ค์ธก์ผ๋ก ๋ฐ์๋ค:
|
|
12
|
+
360px ์์ ์ ํ์ง ์์๋ค). ๊ทธ๋์ ์ค๋ฐ๊ฟ ์์ฒด๋ ์ฌ๊ธฐ์ ํญ์ ํ์ฉํ๊ณ , ์ข์ ๋์
|
|
13
|
+
ยซํญ ์ฑ์ฐ๊ธฐยป๋ง ์์ ๊ท์น์ผ๋ก ๊ฑด๋ค. */
|
|
14
|
+
flex-wrap: wrap;
|
|
15
|
+
container-type: inline-size;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* ์ํ ์ก์
(์ญ์ ๋ฑ)์ **์ผ์ชฝ ๋**, ์ฃผ ์ก์
์ ์ค๋ฅธ์ชฝ ๋.
|
|
19
|
+
โ
๊ฐ์ ๋ฌด๋ฆฌ์ ๋๋ฉด ยซ์ ์ฅยป์ ๋๋ฅด๋ ค๋ค ยซ์ญ์ ยป๋ฅผ ๋๋ฅธ๋ค โ ๊ฑฐ๋ฆฌ๊ฐ ์์ ์ฅ์น๋ค.
|
|
20
|
+
์ด์(R4)์ด *"์ํ ์ก์
์ ์๊ฐ์ ์ผ๋ก ๋ถ๋ฆฌ"* ๋ก ์๊ตฌํ ๊ฒ์ด ์ด ๋ฐฐ์น๋ค. */
|
|
21
|
+
.danger {
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
gap: var(--u-space-sm, 8px);
|
|
25
|
+
margin-right: auto;
|
|
26
|
+
}
|
|
27
|
+
/* ๋น ์ฌ๋กฏ ๋ํผ๋ ์ ๋๋ค โ ์ฌ๋กฏ ๋ฐฐ์ ์ slotchange ๋ก ์ถ์ ํ๋ค(internals/slotted.ts).
|
|
28
|
+
โ CSS :has() ๋ก๋ ๋ชป ํ๋ค: <slot> ์์ ์ด ์์์ด๋ผ :has(*) ๊ฐ ํญ์ ์ฐธ์ด๋ค. */
|
|
29
|
+
.danger.empty {
|
|
30
|
+
display: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.main {
|
|
34
|
+
display: flex;
|
|
35
|
+
align-items: center;
|
|
36
|
+
gap: var(--u-space-sm, 8px);
|
|
37
|
+
margin-left: auto;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/* ํ๋ฉด ํ๋จ์ ๊ณ ์ โ ๊ธด ํผ์์ ์ ์ฅ ๋ฒํผ์ ์ฐพ์ ์คํฌ๋กคํ์ง ์์๋ ๋๋ค.
|
|
41
|
+
|
|
42
|
+
๐ด**์์ ๋ง์ง์ผ๋ก ยซ๊ฐ์ฅ์๋ฆฌ๊น์ง ๋๋ฆฌ๋ยป ๊ฒ์ ํ์ง ์๋๋ค.** ์ฒซ ํ์ด
|
|
43
|
+
margin: 0 calc(-1 * var(--u-space-md, 12px)) ๋ก ์ข์ฐ๋ฅผ ๋๊ฒผ๋๋ฐ, ๊ทธ๊ฒ์
|
|
44
|
+
***๋ถ๋ชจ๊ฐ ์ ํํ ๊ทธ๋งํผ์ ๊ฐ๋ก ํจ๋ฉ์ ๊ฐ๊ณ ์๋ค***๊ณ ๊ฐ์ ํ๋ ๊ฒ์ด๋ค. ์ค์ธก์์
|
|
45
|
+
๊ทธ ๊ฐ์ ์ด ๊นจ์ก๋ค โ ์ํ ํ๋ฉด์์ ์ข์ฐ 12px ์ฉ ๋์ณ **๊ฐ๋ก ์คํฌ๋กค๋ฐ๊ฐ ์๊ธฐ๊ณ
|
|
46
|
+
์ฃผ ์ก์
(์ ์ฅ)์ด ์๋ ธ๋ค.** ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์๋น์์ ์ฌ๋ฐฑ์ ์ ์๋ ์๋ค.
|
|
47
|
+
โ ์ด ์ฃผ์์ ๋ฐฑํฑ์ ์ฐ์ง ๋ง ๊ฒ โ css ํ๊ทธ๋ ํ
ํ๋ฆฟ์ ๊ทธ ์๋ฆฌ์์ ๋๋ธ๋ค. */
|
|
48
|
+
:host([sticky]) {
|
|
49
|
+
position: sticky;
|
|
50
|
+
bottom: 0;
|
|
51
|
+
background-color: var(--u-bg-color, #FFFFFF);
|
|
52
|
+
border-top: 1px solid var(--u-border-color-weak, #EEEEEE);
|
|
53
|
+
padding: var(--u-space-md, 12px) 0;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* ์ข์ ๋: ๋ ๋ฌด๋ฆฌ๊ฐ ๊ฐ์ ํ ์ค์ ์ฐจ์งํ๊ณ ์ฃผ ์ก์
์ด ์๋ก ์จ๋ค.
|
|
57
|
+
โ ์ฃผ ์ก์
์ ์๋์ ๋๋ฉด ์ํ ์ก์
์ด ์์ง ์์น์ ์จ๋ค โ ์์๋ฅผ ๋ค์ง๋ ์ด์ ๋ค. */
|
|
58
|
+
@container (max-width: 420px) {
|
|
59
|
+
.main {
|
|
60
|
+
order: -1;
|
|
61
|
+
width: 100%;
|
|
62
|
+
margin-left: 0;
|
|
63
|
+
}
|
|
64
|
+
.danger {
|
|
65
|
+
width: 100%;
|
|
66
|
+
margin-right: 0;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
`;
|
|
70
|
+
//#endregion
|
|
71
|
+
export { t as styles };
|
|
@@ -17,7 +17,13 @@ type ElementParts = 'host' | 'icon' | 'title' | 'description' | 'actions';
|
|
|
17
17
|
* <u-empty-state variant="no-results"></u-empty-state>
|
|
18
18
|
* ```
|
|
19
19
|
*
|
|
20
|
-
*
|
|
20
|
+
* โ **๊ธฐ๋ณธ ๋ฌธ๊ตฌ๋ ์์ด๋ค** โ ์ด ํจํค์ง๋ ๋ฒ์ฉ ์ธต์ด๋ผ ํน์ ์ธ์ด๋ฅผ ๊ธฐ๋ณธ๊ฐ์ผ๋ก ๊ฐ์ง ์ ์๋ค.
|
|
21
|
+
* ํ๊ตญ์ด๋ `registerLocale('ko', โฆ)` ๋ก ์๋น์๊ฐ ๋ฑ๋กํ๊ณ , ํ๋ฉด๋ณ๋ก ๋ฎ์ผ๋ ค๋ฉด
|
|
22
|
+
* `title`ยท`description` ์ ์ค๋ค.
|
|
23
|
+
*
|
|
24
|
+
* โ
์ด ์ค์ ยซํ๊ตญ์ด๋คยป๋ผ๊ณ ์ ํ ์์๊ณ **๊ฐ์ ํ์ผ์ `locale` ํ๋กํผํฐ ์ฃผ์์ด ยซ์์ด๋คยป๋ผ๊ณ
|
|
25
|
+
* ๋งํ๊ณ ์์๋ค** โ ๋ก์ผ์ผ ์ด์ฃผ(0.9.0) ๋ ํด๋์ค ์ฃผ์๋ง ๋ก์ ๊ฒ์ด๋ค. ์ด JSDoc ์
|
|
26
|
+
* `dist/**.d.ts` ๋ก ๊ฒ์๋๋ฏ๋ก, ์๋น์๋ **์ฌ์ค๊ณผ ๋ฐ๋์ธ ๋ฌธ์ฅ**์ ์ฝ๊ณ ์์๋ค.
|
|
21
27
|
*/
|
|
22
28
|
export declare class EmptyState extends StyledElement<ElementParts> {
|
|
23
29
|
static styles: import('lit').CSSResultGroup[];
|
|
@@ -3,6 +3,10 @@ import { css as e } from "lit";
|
|
|
3
3
|
var t = e`
|
|
4
4
|
:host {
|
|
5
5
|
display: block;
|
|
6
|
+
/* ์๋ @container ์ง์์ ๊ธฐ์ค โ ์นด๋๋ ยซํ๋ฉดยป์ด ์๋๋ผ ยซ์๊ธฐ ํญยป์ผ๋ก ์ ํ๋ค.
|
|
7
|
+
์ฌ์ด๋๋ฐ๊ฐ ์ด๋ฆฐ 1280px ํ๋ฉด์ ์ข์ ๋ณธ๋ฌธ์์๋, ๋์ ๋ณธ๋ฌธ์ ๊ฐ์ง ํ๋ธ๋ฆฟ์์๋
|
|
8
|
+
๊ฐ์ ํ๋จ์ ํ๋ ค๋ฉด ๊ธฐ์ค์ด ์๊ธฐ ํญ์ด์ด์ผ ํ๋ค. */
|
|
9
|
+
container-type: inline-size;
|
|
6
10
|
background-color: var(--u-panel-bg-color, #FFFFFF);
|
|
7
11
|
border: 1px solid var(--u-border-color-weak, #EEEEEE);
|
|
8
12
|
/* ๋ฉด(surface) ๋จ โ ์ปจํธ๋กค๊ณผ ๊ฐ์ ๋ฐ๊ฒฝ์ ์ฐ๋ฉด ํฐ ์ฌ๊ฐํ์ด ๊ฐ์ ธ ๋ณด์ธ๋ค. */
|
|
@@ -55,8 +59,30 @@ var t = e`
|
|
|
55
59
|
display: none;
|
|
56
60
|
}
|
|
57
61
|
|
|
62
|
+
/* ๐ด**๋ณธ๋ฌธ์ ์ธ๋ก ํ๋ฆ์ด๊ณ , ๊ทธ ๋ฆฌ๋ฌ์ ์ฌ๊ธฐ์ ์ ํ๋ค.**
|
|
63
|
+
์ข
์ ์๋ padding ๋ง ์์ด ๋ธ๋ก ์์์ด **๊ฐ๊ฒฉ ์์ด ๋ถ์๊ณ **, ๊ทธ๋ณด๋ค ๋์๊ฒ๋
|
|
64
|
+
shrink-to-fit ์์๋ค์ด ๊ฐ์ ๋ค๋ฅธ ํญ์ผ๋ก ์์ **์ผ์ชฝ ๋์ด ์ด๊ธ๋ฌ๋ค**(์ค์ธก: ์๋ฆผ ๋ท์
|
|
65
|
+
๋๋ํ ๋๋ฉด ๊ณ๋จ์ฒ๋ผ ๋ด๋ ค๊ฐ๋ค). ์๋น์๊ฐ ๊ทธ๊ฒ์ ๊ณ ์น๋ ค๋ฉด ์๊ธฐ CSS ๋ฅผ ์ฐ๊ฒ ๋๊ณ ,
|
|
66
|
+
๊ทธ ์๊ฐ ์ด ํจํค์ง๊ฐ ์กด์ฌํ๋ ์ด์ ๊ฐ ์ฌ๋ผ์ง๋ค.
|
|
67
|
+
โ flex column + gap. ์์์ ํญ์ ์ฑ์ฐ๊ณ ๊ฐ๊ฒฉ์ ํ ํฐ์ด ์ ํ๋ค. */
|
|
58
68
|
.body {
|
|
59
69
|
padding: var(--u-space-xl, 20px);
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
gap: var(--u-space-md, 12px);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/* ์ข์ ๋: ํค๋์ ํด๋ฐ(๊ฒ์ยทํํฐ)๊ฐ ์ ๋ชฉ ์๋๋ก ๋ด๋ ค๊ฐ๊ณ ํญ์ ์ฑ์ด๋ค.
|
|
76
|
+
โ **์ ๋ชฉ๊ณผ ํด๋ฐ๊ฐ ํ ์ค์ ๋จ์ผ๋ฉด ๋ ๋ค ์ฝํ์ง ์๋๋ค** โ ์ ๋ชฉ์ ์๋ฆฌ๊ณ ์
๋ ฅ์
|
|
77
|
+
์๊ฐ๋ฝ๋ณด๋ค ์ข์์ง๋ค. ์ด์(R4)์ด *"์ข์ ํ๋ฉด์์ ์ ํ๋ ๊ท์น์ ๋ผ์ด๋ธ๋ฌ๋ฆฌ๊ฐ ์ ํ๋ค"*
|
|
78
|
+
๋ก ์๊ตฌํ ๊ฒ์ด ์ด ์๋ฆฌ๋ค. 480px ๋ ยซ์ ๋ชฉ + ์
๋ ฅยป์ด ํจ๊ป ์ค ์ ์๋ ํํ์ด๋ค. */
|
|
79
|
+
@container (max-width: 480px) {
|
|
80
|
+
.header {
|
|
81
|
+
flex-wrap: wrap;
|
|
82
|
+
}
|
|
83
|
+
.actions {
|
|
84
|
+
width: 100%;
|
|
85
|
+
}
|
|
60
86
|
}
|
|
61
87
|
/* ํ๋ฅผ ์นด๋ ๊ฐ์ฅ์๋ฆฌ๊น์ง ๋ถ์ผ ๋. ํค๋๊ฐ ์์ผ๋ฉด ์ ์ฌ๋ฐฑ๋ง ๋จ๊ธด๋ค โ
|
|
62
88
|
0 ์ผ๋ก ๋ง๋ค๋ฉด ์ ๋ชฉ๊ณผ ํ๊ฐ ๋ถ์ด ์ฝ๊ธฐ ์ด๋ ค์์ง๋ค. */
|
|
@@ -7,6 +7,8 @@ var t = e`
|
|
|
7
7
|
gap: var(--u-space-md, 12px);
|
|
8
8
|
flex-wrap: wrap;
|
|
9
9
|
margin-bottom: var(--u-space-2xl, 24px);
|
|
10
|
+
/* ์๋ @container ์ง์์ ๊ธฐ์ค โ ์ด ์ปดํฌ๋ํธ๋ ยซํ๋ฉดยป์ด ์๋๋ผ ยซ์๊ธฐ ํญยป์ผ๋ก ์ ํ๋ค. */
|
|
11
|
+
container-type: inline-size;
|
|
10
12
|
}
|
|
11
13
|
|
|
12
14
|
.heading {
|
|
@@ -76,9 +78,16 @@ var t = e`
|
|
|
76
78
|
display: none;
|
|
77
79
|
}
|
|
78
80
|
|
|
79
|
-
/*
|
|
80
|
-
โ
์ค๋ฅธ์ชฝ ์ ๋ ฌ์ ์ ์งํ๋ฉด ์๊ฐ๋ฝ์ด ๋ฟ๊ธฐ ์ด๋ ค์ด ์ชฝ์ผ๋ก ๋ชฐ๋ฆฐ๋ค.
|
|
81
|
-
|
|
81
|
+
/* ์ข์ ๋: ์ก์
์ด ์ ๋ชฉ ์๋๋ก ๋ด๋ ค๊ฐ๊ณ **์ผ์ชฝ ์ ๋ ฌ**์ด ๋๋ค.
|
|
82
|
+
โ
์ค๋ฅธ์ชฝ ์ ๋ ฌ์ ์ ์งํ๋ฉด ์๊ฐ๋ฝ์ด ๋ฟ๊ธฐ ์ด๋ ค์ด ์ชฝ์ผ๋ก ๋ชฐ๋ฆฐ๋ค.
|
|
83
|
+
|
|
84
|
+
๐ด**ยซํ๋ฉดยป์ด ์๋๋ผ ยซ์๊ธฐ ํญยป์ ๋ณธ๋ค(@container).** ์ข
์ ์๋ @media ์๊ณ , ๊ทธ๋ฌ๋ฉด
|
|
85
|
+
์ด ํ๋ฆฌ๋ฏธํฐ๋ธ๊ฐ **์๊ธฐ๊ฐ ์ผ๋ง๋ ์ข์์ง์ ๋ฌด๊ดํ๊ฒ** ์ ํ๋ค โ ์
ธ ์์์ ์ฌ์ด๋๋ฐ๊ฐ ์ด๋ ค
|
|
86
|
+
๋ณธ๋ฌธ์ด 500px ์ธ 1280px ํ๋ฉด์์๋ ์ ํ์ง ์๊ณ , ๋ฐ๋๋ก ๋์ ๋ณธ๋ฌธ์ ๊ฐ์ง ์ข์ ํ๋ฉด์์๋
|
|
87
|
+
๋ถํ์ํ๊ฒ ์ ํ๋ค. ์ปดํฌ๋ํธ๊ฐ ์ค์ค๋ก ํ๋จํ ์ ์๋ ๊ฒ์ **์๊ธฐ ์ปจํ
์ด๋ ํญ**๋ฟ์ด๋ค.
|
|
88
|
+
โ container-type: inline-size ๋ ์ธ๋ผ์ธ ์ถ containment ๋ฅผ ๋ง๋ ๋ค โ ์ด ํธ์คํธ๋ ๋ธ๋ก
|
|
89
|
+
๋ ๋ฒจ์ด๊ณ ์์์ด ํธ์คํธ ํญ์ ๊ธฐ๋๋ฏ๋ก ๋ฌดํดํ๋ค(ํญ๋ณ ํ๊ท ํ
์คํธ๊ฐ ๊ฐ์ํ๋ค). */
|
|
90
|
+
@container (max-width: 640px) {
|
|
82
91
|
.actions {
|
|
83
92
|
margin-left: 0;
|
|
84
93
|
width: 100%;
|
|
@@ -1,23 +1,25 @@
|
|
|
1
1
|
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
2
|
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { DEFAULT_NAV_ICON as r } from "../internals/nav-icon.js";
|
|
5
|
+
import { styles as i } from "./SidebarButton.styles.js";
|
|
6
|
+
import { html as a } from "lit";
|
|
7
|
+
import { customElement as o, property as s } from "lit/decorators.js";
|
|
7
8
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
8
9
|
//#region src/components/SidebarButton.ts
|
|
9
|
-
var
|
|
10
|
+
var c = class extends n {
|
|
10
11
|
constructor(...e) {
|
|
11
12
|
super(...e), this.compact = !1;
|
|
12
13
|
}
|
|
13
14
|
static {
|
|
14
|
-
this.styles = [super.styles,
|
|
15
|
+
this.styles = [super.styles, i];
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
17
|
-
return
|
|
18
|
+
return a`
|
|
18
19
|
<button part="base" ?compact=${this.compact}>
|
|
19
|
-
<u-icon part="icon"
|
|
20
|
+
<u-icon part="icon"
|
|
20
21
|
.name=${this.icon}
|
|
22
|
+
.fallback=${r}
|
|
21
23
|
></u-icon>
|
|
22
24
|
<span part="label" ?hidden=${this.compact}>
|
|
23
25
|
${this.label}
|
|
@@ -26,9 +28,9 @@ var s = class extends n {
|
|
|
26
28
|
`;
|
|
27
29
|
}
|
|
28
30
|
};
|
|
29
|
-
t([
|
|
31
|
+
t([s({
|
|
30
32
|
type: Boolean,
|
|
31
33
|
reflect: !0
|
|
32
|
-
}), e("design:type", Object)],
|
|
34
|
+
}), e("design:type", Object)], c.prototype, "compact", void 0), t([s({ type: String }), e("design:type", String)], c.prototype, "icon", void 0), t([s({ type: String }), e("design:type", Object)], c.prototype, "label", void 0), c = t([o("u-sidebar-button")], c);
|
|
33
35
|
//#endregion
|
|
34
|
-
export {
|
|
36
|
+
export { c as SidebarButton };
|
|
@@ -45,11 +45,12 @@ var t = e`
|
|
|
45
45
|
font-size: 20px;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
+
/* โ
SidebarLink ์ ๊ฐ์ ์๋ฆฌยท๊ฐ์ ๋จ(label). ๋ ๊ณณ์ด ์ด๊ธ๋๋ฉด ๋ชฉ๋ก์ด ๊ณ๋จ์ด ๋๋ค. */
|
|
48
49
|
span {
|
|
49
50
|
flex: 1;
|
|
50
|
-
font-size:
|
|
51
|
-
font-weight:
|
|
52
|
-
line-height:
|
|
51
|
+
font-size: var(--u-text-label-size, 13px);
|
|
52
|
+
font-weight: var(--u-text-label-weight, 600);
|
|
53
|
+
line-height: var(--u-text-label-leading, 1.5);
|
|
53
54
|
white-space: nowrap;
|
|
54
55
|
overflow: hidden;
|
|
55
56
|
text-overflow: ellipsis;
|
|
@@ -1,29 +1,37 @@
|
|
|
1
1
|
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
2
|
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
4
|
+
import { DEFAULT_NAV_ICON as r } from "../internals/nav-icon.js";
|
|
5
|
+
import { SidebarLink as i } from "./SidebarLink.js";
|
|
6
|
+
import { styles as a } from "./SidebarGroup.styles.js";
|
|
7
|
+
import { html as o } from "lit";
|
|
8
|
+
import { customElement as s, property as c } from "lit/decorators.js";
|
|
8
9
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
9
10
|
//#region src/components/SidebarGroup.ts
|
|
10
|
-
var
|
|
11
|
+
var l = class extends n {
|
|
11
12
|
constructor(...e) {
|
|
12
13
|
super(...e), this.compact = !1, this.selected = !1, this.collapsed = !0, this.handleButtonClick = (e) => {
|
|
13
|
-
this.compact ? ((this.shadowRoot?.querySelector("slot")?.assignedElements({ flatten: !0 }).find((e) => e instanceof
|
|
14
|
+
this.compact ? ((this.shadowRoot?.querySelector("slot")?.assignedElements({ flatten: !0 }).find((e) => e instanceof i))?.renderRoot.querySelector("u-link"))?.click() : this.collapsed = !this.collapsed;
|
|
14
15
|
};
|
|
15
16
|
}
|
|
16
17
|
static {
|
|
17
|
-
this.styles = [super.styles,
|
|
18
|
+
this.styles = [super.styles, a];
|
|
18
19
|
}
|
|
19
20
|
render() {
|
|
20
|
-
return
|
|
21
|
+
return o`
|
|
21
22
|
<button part="header"
|
|
22
23
|
?compact=${this.compact}
|
|
23
24
|
?selected=${this.selected}
|
|
24
25
|
@click=${this.handleButtonClick}>
|
|
25
|
-
|
|
26
|
+
<!--
|
|
27
|
+
โ ?hidden ์ ๊ฑธ์ง ์๋๋ค. ์ ํ ์ํ์์๋ ๋ผ๋ฒจ๊ณผ ์บ๋ฟ์ด ๋ชจ๋ ์จ์ผ๋ฏ๋ก,
|
|
28
|
+
์์ด์ฝ๊น์ง ์จ๊ธฐ๋ฉด **๋ฒํผ์ด ํต์งธ๋ก ๋น์ด ๋๋ฅผ ๊ฒ์ด ์์ด์ง๋ค** โ ์ด๊ฒ์ด
|
|
29
|
+
SidebarLinkยทSidebarButton ์์ ํด๋ฐฑ์ ๋์
ํ ๋ฐ๋ก ๊ทธ ๊ฒฐํจ์ด๊ณ , ์ด ์๋ฆฌ๋ง
|
|
30
|
+
๋น ์ ธ ์์๋ค.
|
|
31
|
+
-->
|
|
32
|
+
<u-icon class="icon" part="icon"
|
|
26
33
|
.name=${this.icon}
|
|
34
|
+
.fallback=${r}
|
|
27
35
|
></u-icon>
|
|
28
36
|
<span class="label" part="label" ?hidden=${this.compact}>
|
|
29
37
|
${this.label}
|
|
@@ -42,15 +50,15 @@ var c = class extends n {
|
|
|
42
50
|
`;
|
|
43
51
|
}
|
|
44
52
|
};
|
|
45
|
-
t([
|
|
53
|
+
t([c({
|
|
46
54
|
type: Boolean,
|
|
47
55
|
reflect: !0
|
|
48
|
-
}), e("design:type", Boolean)],
|
|
56
|
+
}), e("design:type", Boolean)], l.prototype, "compact", void 0), t([c({
|
|
49
57
|
type: Boolean,
|
|
50
58
|
reflect: !0
|
|
51
|
-
}), e("design:type", Boolean)],
|
|
59
|
+
}), e("design:type", Boolean)], l.prototype, "selected", void 0), t([c({
|
|
52
60
|
type: Boolean,
|
|
53
61
|
reflect: !0
|
|
54
|
-
}), e("design:type", Boolean)],
|
|
62
|
+
}), e("design:type", Boolean)], l.prototype, "collapsed", void 0), t([c({ type: String }), e("design:type", String)], l.prototype, "icon", void 0), t([c({ type: String }), e("design:type", Object)], l.prototype, "label", void 0), l = t([s("u-sidebar-group")], l);
|
|
55
63
|
//#endregion
|
|
56
|
-
export {
|
|
64
|
+
export { l as SidebarGroup };
|
|
@@ -53,11 +53,16 @@ var t = e`
|
|
|
53
53
|
font-size: 20px;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/*
|
|
57
|
+
* โ
๊ทธ๋ฃน๋ ์์ ๋งํฌ์ ๊ฐ์ label ๋จ์ด๋ค. ์ข
์ ์๋ ๊ตต๊ธฐ๋ก ์๊ณ๋ฅผ ๋์ง๋ง(600 vs 500),
|
|
58
|
+
* ์์์ ์ด๋ฏธ **32px ๋ค์ฌ์ฐ๊ธฐ + 2px ๋ ์ผ + ์บ๋ฟ**์ผ๋ก ๊ฐ๋ฆฐ๋ค โ ๊ตต๊ธฐ ํ ๋จ์ ์๊ณ์
|
|
59
|
+
* ๋ ์ฐ๋ฉด ์ค์ผ์ผ ๋ฐ์ ๋ค์ฏ ๋ฒ์งธ ๊ฐ์ด ์๊ธด๋ค. ์๊ณ๋ ๋ฐฐ์น๊ฐ ์ง๊ณ ๋จ์ ์ฉ๋๊ฐ ์ง๋ค.
|
|
60
|
+
*/
|
|
56
61
|
.label {
|
|
57
62
|
flex: 1;
|
|
58
|
-
font-size:
|
|
59
|
-
line-height:
|
|
60
|
-
font-weight: 600;
|
|
63
|
+
font-size: var(--u-text-label-size, 13px);
|
|
64
|
+
line-height: var(--u-text-label-leading, 1.5);
|
|
65
|
+
font-weight: var(--u-text-label-weight, 600);
|
|
61
66
|
overflow: hidden;
|
|
62
67
|
white-space: nowrap;
|
|
63
68
|
text-overflow: ellipsis;
|
|
@@ -1,24 +1,26 @@
|
|
|
1
1
|
import e from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorateMetadata.js";
|
|
2
2
|
import t from "../_virtual/_@oxc-project_runtime@0.142.0/helpers/esm/decorate.js";
|
|
3
3
|
import { StyledElement as n } from "../internals/StyledElement.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
4
|
+
import { DEFAULT_NAV_ICON as r } from "../internals/nav-icon.js";
|
|
5
|
+
import { styles as i } from "./SidebarLink.styles.js";
|
|
6
|
+
import { html as a } from "lit";
|
|
7
|
+
import { customElement as o, property as s } from "lit/decorators.js";
|
|
7
8
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
8
9
|
//#region src/components/SidebarLink.ts
|
|
9
|
-
var
|
|
10
|
+
var c = class extends n {
|
|
10
11
|
constructor(...e) {
|
|
11
12
|
super(...e), this.selected = !1, this.compact = !1;
|
|
12
13
|
}
|
|
13
14
|
static {
|
|
14
|
-
this.styles = [super.styles,
|
|
15
|
+
this.styles = [super.styles, i];
|
|
15
16
|
}
|
|
16
17
|
render() {
|
|
17
|
-
return
|
|
18
|
+
return a`
|
|
18
19
|
<u-link .href=${this.href || "#"}>
|
|
19
20
|
<div class="container" part="base" ?compact=${this.compact}>
|
|
20
|
-
<u-icon part="icon"
|
|
21
|
+
<u-icon part="icon"
|
|
21
22
|
.name=${this.icon}
|
|
23
|
+
.fallback=${r}
|
|
22
24
|
></u-icon>
|
|
23
25
|
<span part="label" ?hidden=${this.compact}>
|
|
24
26
|
${this.label}
|
|
@@ -28,9 +30,9 @@ var s = class extends n {
|
|
|
28
30
|
`;
|
|
29
31
|
}
|
|
30
32
|
};
|
|
31
|
-
t([
|
|
33
|
+
t([s({
|
|
32
34
|
type: Boolean,
|
|
33
35
|
reflect: !0
|
|
34
|
-
}), e("design:type", Object)],
|
|
36
|
+
}), e("design:type", Object)], c.prototype, "selected", void 0), t([s({ type: Boolean }), e("design:type", Object)], c.prototype, "compact", void 0), t([s({ type: String }), e("design:type", String)], c.prototype, "icon", void 0), t([s({ type: String }), e("design:type", Object)], c.prototype, "label", void 0), t([s({ type: String }), e("design:type", String)], c.prototype, "href", void 0), t([s({ type: String }), e("design:type", Object)], c.prototype, "pattern", void 0), c = t([o("u-sidebar-link")], c);
|
|
35
37
|
//#endregion
|
|
36
|
-
export {
|
|
38
|
+
export { c as SidebarLink };
|
|
@@ -50,11 +50,16 @@ var t = e`
|
|
|
50
50
|
font-size: 20px;
|
|
51
51
|
}
|
|
52
52
|
|
|
53
|
+
/*
|
|
54
|
+
* โ
๋ด๋น ํญ๋ชฉ์ ยซ๋์์ ์งง์ ์ด๋ฆยป = label ๋จ์ด๋ค(์ฉ๋ ๋ฐฐ์ โ DL-157-4).
|
|
55
|
+
* โ ํ ๋์ด๋ ๋ฐ๋์ง ์๋๋ค: 13 x 1.5 = 19.5px < ์์ด์ฝ 20px ์ด๋ผ ํ์ ์ก๋ ๊ฒ์
|
|
56
|
+
* ์ฌ์ ํ ์์ด์ฝ์ด๋ค. ์ ํ ์ฌ์ด๋๋ฐ(์์ด์ฝ๋ง)์ ํผ์น ์ฌ์ด๋๋ฐ์ ํ ๋์ด๊ฐ ๊ฐ์์ผ ํ๋ค.
|
|
57
|
+
*/
|
|
53
58
|
span {
|
|
54
59
|
flex: 1;
|
|
55
|
-
font-size:
|
|
56
|
-
line-height:
|
|
57
|
-
font-weight:
|
|
60
|
+
font-size: var(--u-text-label-size, 13px);
|
|
61
|
+
line-height: var(--u-text-label-leading, 1.5);
|
|
62
|
+
font-weight: var(--u-text-label-weight, 600);
|
|
58
63
|
white-space: nowrap;
|
|
59
64
|
overflow: hidden;
|
|
60
65
|
text-overflow: ellipsis;
|
|
@@ -19,20 +19,28 @@ var t = e`
|
|
|
19
19
|
ํ
์คํธ ๋จ์ --u-txt-color-weak ํ๋๋ฟ์ด๊ณ ๊ทธ ๊ฐ์ ํฐ ๋ฐฐ๊ฒฝ์์ 2.68:1 ์ด๋ผ
|
|
20
20
|
WCAG AA(4.5:1)์ ๋ฏธ๋ฌํ๋ค. ํํ ๋ ๊ฐ์ 6.19:1 ยท 4.61:1 ๋ก ํต๊ณผํ๋ค.
|
|
21
21
|
โ ์ญํ ์ธต์ AA ๋ฅผ ๋๋ ๋ณด์กฐ ํ
์คํธ ๋จ์ด ์๊ธฐ๋ฉด ๊ทธ๋ ์ฎ๊ธด๋ค. */
|
|
22
|
+
/*
|
|
23
|
+
* โ
ํฌ๊ธฐยท๊ตต๊ธฐยท์๊ฐ์ ์ค์ผ์ผ์ ๋จ์ผ๋ก ์ฎ๊ฒผ๋ค(์ฉ๋ ๋ฐฐ์ โ DL-157-4). ์ ์ฃผ์์ **์**์
|
|
24
|
+
* ๋ํ ๊ฒ์ด๊ณ ๊ทธ๋๋ก ์ ํจํ๋ค: ๋ ์์ ์ฌ์ ํ ํ๋ ํธ๋ฅผ ์ง์ ์ฝ๋๋ค.
|
|
25
|
+
* โ overline ์ ๋๋ฌธ์ ๋ณํ์ ๋ถ์ด์ง ์๋๋ค โ ์ด ์ค์ ellipsis ๊ฐ ์์ด ์๋ฆผ์ด ๋๊ณ ,
|
|
26
|
+
* ์น์
์ด๋ฆ์ ์๋น์๊ฐ ์ด ๊ธ์๋ค(CJK ์๋ ํจ๊ณผ๋ ์๋ค).
|
|
27
|
+
*/
|
|
22
28
|
.title {
|
|
23
29
|
color: var(--u-neutral-700, #616161);
|
|
24
|
-
font-size:
|
|
25
|
-
font-weight: 700;
|
|
26
|
-
|
|
30
|
+
font-size: var(--u-text-overline-size, 11px);
|
|
31
|
+
font-weight: var(--u-text-overline-weight, 700);
|
|
32
|
+
line-height: var(--u-text-overline-leading, 1.45);
|
|
33
|
+
letter-spacing: var(--u-text-overline-tracking, 0.06em);
|
|
27
34
|
white-space: nowrap;
|
|
28
35
|
overflow: hidden;
|
|
29
36
|
text-overflow: ellipsis;
|
|
30
37
|
}
|
|
31
|
-
|
|
38
|
+
|
|
32
39
|
.subtitle {
|
|
33
40
|
color: var(--u-neutral-600, #757575);
|
|
34
|
-
font-size:
|
|
35
|
-
font-weight:
|
|
41
|
+
font-size: var(--u-text-caption-size, 12px);
|
|
42
|
+
font-weight: var(--u-text-caption-weight, 400);
|
|
43
|
+
line-height: var(--u-text-caption-leading, 1.5);
|
|
36
44
|
}
|
|
37
45
|
|
|
38
46
|
.items {
|
package/dist/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ export { GroupBox } from './components/GroupBox.js';
|
|
|
9
9
|
export { InfoSection } from './components/InfoSection.js';
|
|
10
10
|
export { InfoField, isBlank } from './components/InfoField.js';
|
|
11
11
|
export { EmptyState } from './components/EmptyState.js';
|
|
12
|
+
export { ActionBar } from './components/ActionBar.js';
|
|
12
13
|
export { registerLocale, setDefaultLocale, getLocaleStrings, getDefaultLocale, } from './internals/locale.js';
|
|
13
14
|
export type { ModernAppLocaleStrings } from './internals/locale.js';
|
|
14
15
|
export { app };
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,8 @@ import { GroupBox as s } from "./components/GroupBox.js";
|
|
|
6
6
|
import { InfoSection as c } from "./components/InfoSection.js";
|
|
7
7
|
import { InfoField as l, isBlank as u } from "./components/InfoField.js";
|
|
8
8
|
import { EmptyState as d } from "./components/EmptyState.js";
|
|
9
|
+
import { ActionBar as f } from "./components/ActionBar.js";
|
|
9
10
|
//#region src/index.ts
|
|
10
|
-
var
|
|
11
|
+
var p = e;
|
|
11
12
|
//#endregion
|
|
12
|
-
export { d as EmptyState, s as GroupBox, l as InfoField, c as InfoSection, o as PageHeader, e as app,
|
|
13
|
+
export { f as ActionBar, d as EmptyState, s as GroupBox, l as InfoField, c as InfoSection, o as PageHeader, e as app, p as default, t as filterSidebarItems, n as getDefaultLocale, r as getLocaleStrings, u as isBlank, i as registerLocale, a as setDefaultLocale };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ๋ด๋น๊ฒ์ด์
ํญ๋ชฉ์ **๊ธฐ๋ณธ ์์ด์ฝ** โ ์์ด์ฝ์ด ์๊ฑฐ๋ ํด์์ ์คํจํ์ ๋ ๋์ ๊ทธ๋ฆฐ๋ค.
|
|
3
|
+
*
|
|
4
|
+
* ๐ด**์ ํ์ํ๊ฐ โ ยซ์ ๋ณด์ธ๋คยป๊ฐ ยซ๋๋ฅผ ์ ์๋คยป๊ฐ ๋๋ ์๋ฆฌ๋ค.**
|
|
5
|
+
* ์ฌ์ด๋๋ฐ๊ฐ ์ ํ๋ฉด(`compact`) ๋ผ๋ฒจ์ด ์จ๊ณ ์์ด์ฝ๋ง ๋จ๋๋ค. ๊ทธ ์์ด์ฝ์ด ์์ผ๋ฉด ๊ทธ ๋ฉ๋ด๋
|
|
6
|
+
* **๋์ด๋ง ์๊ณ ์๋ฌด๊ฒ๋ ์๋ ๋น ์ค**์ด ๋์ด, ์ฌ์ฉ์๊ฐ ๊ทธ ํ๋ฉด์ผ๋ก ๊ฐ ์๋จ์ด ํต์งธ๋ก ์ฌ๋ผ์ง๋ค.
|
|
7
|
+
* ์ค์ธก์ผ๋ก ๋ฐ์๋ค โ ์ํ์ `Items` ๋ฉ๋ด๊ฐ `icon: 'table'` ์ ์ ์ธํ๋๋ฐ ๊ทธ ํ์ผ์ด ์์ด
|
|
8
|
+
* ์์ด์ฝ์ด ๊ทธ๋ ค์ง์ง ์์๊ณ , ์ ์ผ๋ฉด ๊ณ ๋ฅผ ์ ์์๋ค.
|
|
9
|
+
*
|
|
10
|
+
* โ **ยซ์ด๋ฆ์ด ์์ ๋ยป๋ง ๋ง์ผ๋ฉด ๋ถ์กฑํ๋ค.** ์ค์ ์ฌ๋ก๋ *์ด๋ฆ์ ์๋๋ฐ ํด์์ด ์คํจํ* ์ชฝ์ด์๋ค
|
|
11
|
+
* (404 ยท ํ์ฑ ์คํจ). ๊ทธ๋์ ํด๋ฐฑ์ `u-icon` ์ **ํด์ ์คํจ ์ง์ **์ ๊ฑธ๋ ค ์๋ค(`fallback` ์์ฑ).
|
|
12
|
+
*
|
|
13
|
+
* โ **์ด SVG ๋ ์ธ๋ผ์ธ์ด๋ค โ ํ์ผ์ ๋ฐ์์ค์ง ์๋๋ค.** ํด๋ฐฑ์ด ๋ค์ ๋คํธ์ํฌ์ ์์กดํ๋ฉด
|
|
14
|
+
* *"์์ด์ฝ ํด๋์ ์๋ฌด๊ฒ๋ ์๋ ์๋น์"* ์๊ฒ ๊ฐ์ ์คํจ๊ฐ ๊ทธ๋๋ก ์ฌํ๋๋ค.
|
|
15
|
+
*
|
|
16
|
+
* ๋ชจ์์ **ํ๋ธ**๋ค โ ํน์ ์๋ฏธ๋ฅผ ์ฃผ์ฅํ์ง ์์ผ๋ฉด์ ยซํญ๋ชฉยป์ ๋ปํ๋ ์ค๋ฆฝ ๊ธฐํธ์ด๊ณ ,
|
|
17
|
+
* ์ด ๋ฆฌํฌ์ ๋ค๋ฅธ ์์ด์ฝ๊ณผ ๊ฐ์ ๊ณ์ด(Bootstrap Icons, 16 viewBox, `currentColor` fill)์ด๋ค.
|
|
18
|
+
*/
|
|
19
|
+
export declare const DEFAULT_NAV_ICON = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M8.186 1.113a.5.5 0 0 0-.372 0L1.846 3.5 8 5.961 14.154 3.5zM15 4.239l-6.5 2.6v7.922l6.5-2.6V4.24zM7.5 14.762V6.838L1 4.239v7.923zM7.443.184a1.5 1.5 0 0 1 1.114 0l7.129 2.852A.5.5 0 0 1 16 3.5v8.662a1 1 0 0 1-.629.928l-7.185 2.874a.5.5 0 0 1-.372 0L.63 13.09a1 1 0 0 1-.63-.928V3.5a.5.5 0 0 1 .314-.464z\"/></svg>";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/internals/nav-icon.ts
|
|
2
|
+
var e = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 16 16\"><path d=\"M8.186 1.113a.5.5 0 0 0-.372 0L1.846 3.5 8 5.961 14.154 3.5zM15 4.239l-6.5 2.6v7.922l6.5-2.6V4.24zM7.5 14.762V6.838L1 4.239v7.923zM7.443.184a1.5 1.5 0 0 1 1.114 0l7.129 2.852A.5.5 0 0 1 16 3.5v8.662a1 1 0 0 1-.629.928l-7.185 2.874a.5.5 0 0 1-.372 0L.63 13.09a1 1 0 0 1-.63-.928V3.5a.5.5 0 0 1 .314-.464z\"/></svg>";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { e as DEFAULT_NAV_ICON };
|
|
@@ -29,12 +29,19 @@ var t = e`
|
|
|
29
29
|
object-fit: contain;
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
/*
|
|
33
|
+
* โ
๋จ ๋ฐฐ์ ์ ยซ๊ด์ธก๊ฐ ๊ทผ์ฌยป๊ฐ ์๋๋ผ ยซ์ฉ๋ยป๋ก ํ๋ค(DL-157-4) โ ์ด ์๋ฆฌ๋ ์ฑ์ ์ ๋ชฉ์ด๋ค.
|
|
34
|
+
* ์ข
์ 18px ์ ์ค์ผ์ผ์ ์๋ ๊ฐ์ด์๊ณ , ๊ฐ์ ํ์ ์ ์ด๋ฏธ u-dialogยทu-drawer ์ ๋ชฉ์
|
|
35
|
+
* ๋ด๋ฆฐ ์ ์ด ์๋ค(L2-3, 18px โ subtitle).
|
|
36
|
+
* โ ์ค ๋ฐ์ค๋ ๋ฐ๋์ง ์๋๋ค: 16 x 1.5 = 24px = ์ข
์ line-height. ํค๋ ๋์ด ๋ถ๋ณ.
|
|
37
|
+
*/
|
|
32
38
|
.title {
|
|
33
39
|
flex: 1;
|
|
34
40
|
color: var(--u-txt-color, #212121);
|
|
35
|
-
font-size:
|
|
36
|
-
line-height:
|
|
37
|
-
font-weight:
|
|
41
|
+
font-size: var(--u-text-subtitle-size, 16px);
|
|
42
|
+
line-height: var(--u-text-subtitle-leading, 1.5);
|
|
43
|
+
font-weight: var(--u-text-subtitle-weight, 600);
|
|
44
|
+
letter-spacing: var(--u-text-subtitle-tracking, 0);
|
|
38
45
|
white-space: nowrap;
|
|
39
46
|
overflow: hidden;
|
|
40
47
|
text-overflow: ellipsis;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iyulab/modern-app",
|
|
3
3
|
"description": "web-framework by iyulab based on lit-element",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"iyulab",
|
|
7
7
|
"web-framework",
|
|
@@ -37,8 +37,9 @@
|
|
|
37
37
|
"test": "vitest run",
|
|
38
38
|
"test:watch": "vitest",
|
|
39
39
|
"start": "vite",
|
|
40
|
-
"build": "vite build",
|
|
41
|
-
"test:browser": "vitest run --project=browser"
|
|
40
|
+
"build": "npm run typecheck && vite build",
|
|
41
|
+
"test:browser": "vitest run --project=browser",
|
|
42
|
+
"typecheck": "tsc --noEmit"
|
|
42
43
|
},
|
|
43
44
|
"dependencies": {
|
|
44
45
|
"@iyulab/components": "^1.21.0",
|
|
@@ -214,6 +214,20 @@ Sidebar states: `'default'` | `'slim'` | `'modal'` | `'mobile'` | `'mobile-open'
|
|
|
214
214
|
|
|
215
215
|
---
|
|
216
216
|
|
|
217
|
+
## LOB primitives
|
|
218
|
+
|
|
219
|
+
Screen-building components this package registers. They exist so the same skeleton is not
|
|
220
|
+
re-assembled per screen โ that is where a product stops looking like one product.
|
|
221
|
+
|
|
222
|
+
- [`u-page-header`](./references/components/page-header.md) โ Screen header: back link, title, subtitle, status and action slots
|
|
223
|
+
- [`u-group-box`](./references/components/group-box.md) โ Titled card with trailing header actions; the unit detail screens are built from
|
|
224
|
+
- [`u-info-section`](./references/components/info-section.md) โ Responsive grid for label/value pairs; container width picks the column count
|
|
225
|
+
- [`u-info-field`](./references/components/info-field.md) โ Read-only label/value pair that keeps "not set" and "zero" distinct
|
|
226
|
+
- [`u-empty-state`](./references/components/empty-state.md) โ Empty list or empty search, worded differently because they are different facts
|
|
227
|
+
- [`u-action-bar`](./references/components/action-bar.md) โ Closing action row with a separated destructive group
|
|
228
|
+
|
|
229
|
+
---
|
|
230
|
+
|
|
217
231
|
## Full `AppConfig` reference
|
|
218
232
|
|
|
219
233
|
See [references/api.md](./references/api.md) for all TypeScript interfaces.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# u-action-bar
|
|
2
|
+
|
|
3
|
+
**Tag:** `u-action-bar`
|
|
4
|
+
|
|
5
|
+
The row of actions that closes a form or a detail screen: primary actions on the leading edge,
|
|
6
|
+
destructive ones separated on the trailing edge.
|
|
7
|
+
|
|
8
|
+
```html
|
|
9
|
+
<u-action-bar sticky>
|
|
10
|
+
<u-button variant="solid">Save</u-button>
|
|
11
|
+
<u-button variant="outline">Cancel</u-button>
|
|
12
|
+
<u-button slot="danger" color="danger">Delete</u-button>
|
|
13
|
+
</u-action-bar>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Slots
|
|
17
|
+
|
|
18
|
+
| Name | Description |
|
|
19
|
+
|------|-------------|
|
|
20
|
+
| *(default)* | Primary actions |
|
|
21
|
+
| `danger` | Destructive actions, pushed to the trailing edge |
|
|
22
|
+
|
|
23
|
+
## Properties
|
|
24
|
+
|
|
25
|
+
| Property | Type | Default | Reflect | Description |
|
|
26
|
+
|----------|------|---------|---------|-------------|
|
|
27
|
+
| `sticky` | `boolean` | `false` | โ | Pin to the bottom of the scroll container |
|
|
28
|
+
|
|
29
|
+
## CSS Parts
|
|
30
|
+
|
|
31
|
+
| Part | Description |
|
|
32
|
+
|------|-------------|
|
|
33
|
+
| `main` | Primary action group |
|
|
34
|
+
| `danger` | Destructive action group |
|
|
35
|
+
|
|
36
|
+
โ `sticky` adds **vertical** padding only. It deliberately does not stretch to the container
|
|
37
|
+
edges with negative margins โ that would assume the parent has exactly that much horizontal
|
|
38
|
+
padding, and when the assumption is wrong the bar overflows and clips its own buttons.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# u-empty-state
|
|
2
|
+
|
|
3
|
+
**Tag:** `u-empty-state`
|
|
4
|
+
|
|
5
|
+
Shown when a list or a search comes back with nothing.
|
|
6
|
+
|
|
7
|
+
๐ด **"there is no data" and "no results matched" are different facts.** The first means
|
|
8
|
+
*nothing has been created yet* and the next action is **create**. The second means *nothing
|
|
9
|
+
matches these conditions* and the next action is **change the filter**. Show the same wording
|
|
10
|
+
for both and a user with a filter still applied reads it as *"my data disappeared"*.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<u-empty-state variant="no-data" title="No orders yet">
|
|
14
|
+
<u-button slot="actions">New order</u-button>
|
|
15
|
+
</u-empty-state>
|
|
16
|
+
|
|
17
|
+
<u-empty-state variant="no-results"></u-empty-state>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Slots
|
|
21
|
+
|
|
22
|
+
| Name | Description |
|
|
23
|
+
|------|-------------|
|
|
24
|
+
| `icon` | Replaces the built-in icon |
|
|
25
|
+
| `actions` | Next-step buttons |
|
|
26
|
+
|
|
27
|
+
## Properties
|
|
28
|
+
|
|
29
|
+
| Property | Type | Default | Reflect | Description |
|
|
30
|
+
|----------|------|---------|---------|-------------|
|
|
31
|
+
| `variant` | `'no-data'\|'no-results'` | `'no-data'` | | Which fact is being shown; changes the default wording |
|
|
32
|
+
| `title` | `string` | `''` | | Override the default title |
|
|
33
|
+
| `description` | `string` | `''` | | Override the default description |
|
|
34
|
+
| `locale` | `string` | `''` | | Locale tag override for built-in strings |
|
|
35
|
+
|
|
36
|
+
## CSS Parts
|
|
37
|
+
|
|
38
|
+
| Part | Description |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| `icon` ยท `title` ยท `description` ยท `actions` | The four regions |
|
|
41
|
+
|
|
42
|
+
โ Default wording is **English** โ register others with `registerLocale('ko', โฆ)`, or pass
|
|
43
|
+
`title`/`description` per screen.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# u-group-box
|
|
2
|
+
|
|
3
|
+
**Tag:** `u-group-box`
|
|
4
|
+
|
|
5
|
+
A titled card โ the unit LOB detail screens are built from.
|
|
6
|
+
|
|
7
|
+
`u-card` gives you a surface. What actually repeats on these screens is *surface + title +
|
|
8
|
+
trailing actions*, and assembling that by hand is how title sizes, padding, and dividers end
|
|
9
|
+
up different on every screen.
|
|
10
|
+
|
|
11
|
+
```html
|
|
12
|
+
<u-group-box title="Receivables">
|
|
13
|
+
<a slot="actions" href="/receivables">Payments</a>
|
|
14
|
+
โฆbodyโฆ
|
|
15
|
+
</u-group-box>
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The body is a flex column with token spacing, so block children get vertical rhythm and share
|
|
19
|
+
a left edge without any consumer CSS.
|
|
20
|
+
|
|
21
|
+
## Slots
|
|
22
|
+
|
|
23
|
+
| Name | Description |
|
|
24
|
+
|------|-------------|
|
|
25
|
+
| *(default)* | Body content |
|
|
26
|
+
| `actions` | Trailing controls in the header |
|
|
27
|
+
|
|
28
|
+
## Properties
|
|
29
|
+
|
|
30
|
+
| Property | Type | Default | Reflect | Description |
|
|
31
|
+
|----------|------|---------|---------|-------------|
|
|
32
|
+
| `title` | `string` | `''` | | Header title |
|
|
33
|
+
| `divider` | `boolean` | `false` | | Rule between header and body. Off by default โ many rules make a screen noisy |
|
|
34
|
+
| `flush` | `boolean` | `false` | | Remove body padding, for tables and lists that draw their own edges |
|
|
35
|
+
|
|
36
|
+
## CSS Parts
|
|
37
|
+
|
|
38
|
+
| Part | Description |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| `header` ยท `title` ยท `actions` | Header row |
|
|
41
|
+
| `body` | Body wrapper |
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# u-info-field
|
|
2
|
+
|
|
3
|
+
**Tag:** `u-info-field`
|
|
4
|
+
|
|
5
|
+
A read-only label/value pair.
|
|
6
|
+
|
|
7
|
+
๐ด **"not set yet" and "zero" are different facts.**
|
|
8
|
+
|
|
9
|
+
```
|
|
10
|
+
null ยท undefined ยท '' โ blank placeholder (โ)
|
|
11
|
+
0 ยท false ยท '0' โ rendered as-is
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Leaving that rule to whoever writes the screen guarantees it drifts. It has: an order with
|
|
15
|
+
*quantity 0* and an order whose *quantity had not been decided* rendered identically as `โ`,
|
|
16
|
+
and those are different states of the business. So the component owns the rule.
|
|
17
|
+
|
|
18
|
+
```html
|
|
19
|
+
<u-info-field label="Quantity" .value=${order.quantity} numeric></u-info-field>
|
|
20
|
+
<u-info-field label="Customer">Acme Printing</u-info-field> <!-- slot wins over value -->
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Slots
|
|
24
|
+
|
|
25
|
+
| Name | Description |
|
|
26
|
+
|------|-------------|
|
|
27
|
+
| *(default)* | Value content; takes precedence over `value` |
|
|
28
|
+
|
|
29
|
+
## Properties
|
|
30
|
+
|
|
31
|
+
| Property | Type | Default | Reflect | Description |
|
|
32
|
+
|----------|------|---------|---------|-------------|
|
|
33
|
+
| `label` | `string` | `''` | | Field label |
|
|
34
|
+
| `value` | `unknown` | โ | | Value; property only (`attribute: false`) |
|
|
35
|
+
| `blank` | `string` | `'โ'` | | Placeholder for null/undefined/empty โ **not** for `0` or `false` |
|
|
36
|
+
| `numeric` | `boolean` | `false` | | Right-align with tabular figures so digits line up vertically |
|
|
37
|
+
|
|
38
|
+
โ `numeric` earns its keep in **tables**, where columns of figures are compared by eye. On a
|
|
39
|
+
lone field it just pushes the value away from its label.
|
|
40
|
+
|
|
41
|
+
## CSS Parts
|
|
42
|
+
|
|
43
|
+
| Part | Description |
|
|
44
|
+
|------|-------------|
|
|
45
|
+
| `label` ยท `value` | The two elements |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# u-info-section
|
|
2
|
+
|
|
3
|
+
**Tag:** `u-info-section`
|
|
4
|
+
|
|
5
|
+
Responsive grid for `u-info-field` pairs.
|
|
6
|
+
|
|
7
|
+
**You do not count the columns.** Hand-built label/value grids usually hardcode a column count
|
|
8
|
+
per screen, which then breaks only at tablet width โ on a screen nobody opens, so it stays
|
|
9
|
+
broken. Here the **container width** decides (`auto-fit`, not media queries), so the same
|
|
10
|
+
markup works inside a side panel.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<u-info-section>
|
|
14
|
+
<u-info-field label="Part" value="Standard"></u-info-field>
|
|
15
|
+
<u-info-field label="Quantity" .value=${0} numeric></u-info-field>
|
|
16
|
+
</u-info-section>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Slots
|
|
20
|
+
|
|
21
|
+
| Name | Description |
|
|
22
|
+
|------|-------------|
|
|
23
|
+
| *(default)* | `u-info-field` elements |
|
|
24
|
+
|
|
25
|
+
## Properties
|
|
26
|
+
|
|
27
|
+
| Property | Type | Default | Reflect | Description |
|
|
28
|
+
|----------|------|---------|---------|-------------|
|
|
29
|
+
| `min` | `number` | `160` | | Minimum column width in px. Raise it for domains with long labels |
|
|
30
|
+
|
|
31
|
+
## CSS Parts
|
|
32
|
+
|
|
33
|
+
| Part | Description |
|
|
34
|
+
|------|-------------|
|
|
35
|
+
| `grid` | Grid container |
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# u-page-header
|
|
2
|
+
|
|
3
|
+
**Tag:** `u-page-header`
|
|
4
|
+
|
|
5
|
+
The same skeleton at the top of every LOB screen: optional back link, title, subtitle,
|
|
6
|
+
a status slot, and an actions slot.
|
|
7
|
+
|
|
8
|
+
Hand-rolling this per screen is where a product stops looking like one product โ title sizes
|
|
9
|
+
drift, action alignment goes slightly off, and the narrow-viewport rule gets forgotten on the
|
|
10
|
+
screens nobody opens.
|
|
11
|
+
|
|
12
|
+
```html
|
|
13
|
+
<u-page-header title="Order G-2026-I-0629" subtitle="Received 2026-02-24" back="/orders">
|
|
14
|
+
<span slot="status"><u-tag color="success">Confirmed</u-tag></span>
|
|
15
|
+
<span slot="actions"><u-button>Edit</u-button></span>
|
|
16
|
+
</u-page-header>
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Slots
|
|
20
|
+
|
|
21
|
+
| Name | Description |
|
|
22
|
+
|------|-------------|
|
|
23
|
+
| `status` | Badge or tag beside the title |
|
|
24
|
+
| `actions` | Buttons on the trailing edge |
|
|
25
|
+
|
|
26
|
+
## Properties
|
|
27
|
+
|
|
28
|
+
| Property | Type | Default | Reflect | Description |
|
|
29
|
+
|----------|------|---------|---------|-------------|
|
|
30
|
+
| `title` | `string` | `''` | | Page title |
|
|
31
|
+
| `subtitle` | `string` | โ | | Secondary line under the title |
|
|
32
|
+
| `back` | `string` | โ | | Back-link href; renders a back affordance before the title |
|
|
33
|
+
| `backLabel` | `string` | `''` | | Back-link text (`back-label`). Empty falls back to the locale registry, then English |
|
|
34
|
+
| `locale` | `string` | `''` | | Locale tag override for built-in strings |
|
|
35
|
+
|
|
36
|
+
## CSS Parts
|
|
37
|
+
|
|
38
|
+
| Part | Description |
|
|
39
|
+
|------|-------------|
|
|
40
|
+
| `back` | Back link |
|
|
41
|
+
| `heading` | Title + subtitle wrapper |
|
|
42
|
+
| `title` ยท `subtitle` | Text elements |
|
|
43
|
+
| `status` ยท `actions` | Slot wrappers |
|
|
44
|
+
|
|
45
|
+
โ Built-in strings default to **English** โ this package is a generic layer and cannot pick a
|
|
46
|
+
language. Register others with `registerLocale('ko', { back: '๋ค๋ก' })`.
|