newtui 2.0.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/LICENSE +202 -0
- package/README.md +53 -0
- package/cli/index.js +137 -0
- package/dist/index.js +1408 -0
- package/package.json +70 -0
- package/registry/html/components/attachment.css +42 -0
- package/registry/html/components/attachment.html +8 -0
- package/registry/html/components/avatar.css +32 -0
- package/registry/html/components/avatar.html +3 -0
- package/registry/html/components/badge.css +39 -0
- package/registry/html/components/badge.html +3 -0
- package/registry/html/components/bot-command-card.css +67 -0
- package/registry/html/components/bot-command-card.html +17 -0
- package/registry/html/components/button.css +98 -0
- package/registry/html/components/button.html +5 -0
- package/registry/html/components/card.css +20 -0
- package/registry/html/components/card.html +4 -0
- package/registry/html/components/channel-topic.css +35 -0
- package/registry/html/components/channel-topic.html +8 -0
- package/registry/html/components/code-block.css +25 -0
- package/registry/html/components/code-block.html +2 -0
- package/registry/html/components/context-menu.css +46 -0
- package/registry/html/components/context-menu.html +14 -0
- package/registry/html/components/cooldown-bar.css +33 -0
- package/registry/html/components/cooldown-bar.html +9 -0
- package/registry/html/components/divider.css +18 -0
- package/registry/html/components/divider.html +1 -0
- package/registry/html/components/dropdown.css +50 -0
- package/registry/html/components/dropdown.html +17 -0
- package/registry/html/components/embed.css +65 -0
- package/registry/html/components/embed.html +14 -0
- package/registry/html/components/empty-state.css +26 -0
- package/registry/html/components/empty-state.html +5 -0
- package/registry/html/components/form-fields.css +85 -0
- package/registry/html/components/form-fields.html +20 -0
- package/registry/html/components/kbd-tag.css +18 -0
- package/registry/html/components/kbd-tag.html +1 -0
- package/registry/html/components/member-list.css +32 -0
- package/registry/html/components/member-list.html +13 -0
- package/registry/html/components/mention.css +36 -0
- package/registry/html/components/mention.html +3 -0
- package/registry/html/components/message-group.css +50 -0
- package/registry/html/components/message-group.html +20 -0
- package/registry/html/components/modal.css +37 -0
- package/registry/html/components/modal.html +17 -0
- package/registry/html/components/modal.js +10 -0
- package/registry/html/components/notif-badge.css +28 -0
- package/registry/html/components/notif-badge.html +13 -0
- package/registry/html/components/pagination.css +57 -0
- package/registry/html/components/pagination.html +16 -0
- package/registry/html/components/permission.css +64 -0
- package/registry/html/components/permission.html +33 -0
- package/registry/html/components/progress.css +29 -0
- package/registry/html/components/progress.html +6 -0
- package/registry/html/components/reaction.css +33 -0
- package/registry/html/components/reaction.html +14 -0
- package/registry/html/components/reply-preview.css +35 -0
- package/registry/html/components/reply-preview.html +4 -0
- package/registry/html/components/role-tag.css +19 -0
- package/registry/html/components/role-tag.html +3 -0
- package/registry/html/components/scrollbar.css +26 -0
- package/registry/html/components/scrollbar.html +7 -0
- package/registry/html/components/select-menu.css +72 -0
- package/registry/html/components/select-menu.html +19 -0
- package/registry/html/components/server-banner.css +58 -0
- package/registry/html/components/server-banner.html +21 -0
- package/registry/html/components/skeleton.css +40 -0
- package/registry/html/components/skeleton.html +7 -0
- package/registry/html/components/slash-command.css +16 -0
- package/registry/html/components/slash-command.html +3 -0
- package/registry/html/components/spoiler.css +22 -0
- package/registry/html/components/spoiler.html +8 -0
- package/registry/html/components/stage-banner.css +46 -0
- package/registry/html/components/stage-banner.html +22 -0
- package/registry/html/components/status-indicator.css +85 -0
- package/registry/html/components/status-indicator.html +4 -0
- package/registry/html/components/tabs.css +28 -0
- package/registry/html/components/tabs.html +7 -0
- package/registry/html/components/tabs.js +12 -0
- package/registry/html/components/timeline.css +63 -0
- package/registry/html/components/timeline.html +26 -0
- package/registry/html/components/toast.css +37 -0
- package/registry/html/components/toast.html +7 -0
- package/registry/html/components/toast.js +16 -0
- package/registry/html/components/token-field.css +10 -0
- package/registry/html/components/token-field.html +18 -0
- package/registry/html/components/token-field.js +17 -0
- package/registry/html/components/tooltip.css +26 -0
- package/registry/html/components/tooltip.html +8 -0
- package/registry/html/components/typing-indicator.css +45 -0
- package/registry/html/components/typing-indicator.html +4 -0
- package/registry/html/components/user-profile.css +67 -0
- package/registry/html/components/user-profile.html +30 -0
- package/registry/html/components/voice-channel.css +57 -0
- package/registry/html/components/voice-channel.html +13 -0
- package/registry/html/registry.json +279 -0
- package/registry/html/tokens.css +64 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div class="newt-dropdown" role="menu">
|
|
2
|
+
<div class="newt-dropdown__item newt-dropdown__item--active" role="menuitem">
|
|
3
|
+
<span class="newt-dropdown__icon" aria-hidden="true">⚡</span>
|
|
4
|
+
<div>
|
|
5
|
+
<div class="newt-dropdown__label">Option label</div>
|
|
6
|
+
<div class="newt-dropdown__desc">Option description</div>
|
|
7
|
+
</div>
|
|
8
|
+
</div>
|
|
9
|
+
<div class="newt-dropdown__divider"></div>
|
|
10
|
+
<div class="newt-dropdown__item" role="menuitem">
|
|
11
|
+
<span class="newt-dropdown__icon" aria-hidden="true">⚙</span>
|
|
12
|
+
<div>
|
|
13
|
+
<div class="newt-dropdown__label">Another option</div>
|
|
14
|
+
<div class="newt-dropdown__desc">Description</div>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/* newt-ui · Embed (Discord message embed) */
|
|
2
|
+
|
|
3
|
+
.newt-embed {
|
|
4
|
+
display: flex;
|
|
5
|
+
background: var(--newt-bg-elevated);
|
|
6
|
+
border-radius: var(--newt-radius-md);
|
|
7
|
+
border-left: 4px solid var(--newt-brand);
|
|
8
|
+
max-width: 520px;
|
|
9
|
+
overflow: hidden;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.newt-embed__body {
|
|
13
|
+
padding: 12px 16px;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 8px;
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.newt-embed__eyebrow {
|
|
22
|
+
font-size: 12px;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
color: var(--newt-text-secondary);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.newt-embed__title {
|
|
28
|
+
font-size: 16px;
|
|
29
|
+
font-weight: 600;
|
|
30
|
+
color: var(--newt-text-link);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.newt-embed__description {
|
|
34
|
+
font-size: 14px;
|
|
35
|
+
line-height: 20px;
|
|
36
|
+
color: var(--newt-text-secondary);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.newt-embed__fields {
|
|
40
|
+
display: grid;
|
|
41
|
+
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
|
|
42
|
+
gap: 8px;
|
|
43
|
+
margin-top: 4px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.newt-embed__field-name {
|
|
47
|
+
font-size: 13px;
|
|
48
|
+
font-weight: 600;
|
|
49
|
+
color: var(--newt-text-primary);
|
|
50
|
+
margin-bottom: 2px;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
.newt-embed__field-value {
|
|
54
|
+
font-size: 13px;
|
|
55
|
+
color: var(--newt-text-secondary);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.newt-embed__footer {
|
|
59
|
+
display: flex;
|
|
60
|
+
align-items: center;
|
|
61
|
+
gap: 8px;
|
|
62
|
+
font-size: 12px;
|
|
63
|
+
color: var(--newt-text-muted);
|
|
64
|
+
margin-top: 4px;
|
|
65
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<div class="newt-embed">
|
|
2
|
+
<div class="newt-embed__body">
|
|
3
|
+
<div class="newt-embed__eyebrow">Source · category</div>
|
|
4
|
+
<div class="newt-embed__title">Embed title</div>
|
|
5
|
+
<div class="newt-embed__description">Embed description text goes here.</div>
|
|
6
|
+
<div class="newt-embed__fields">
|
|
7
|
+
<div>
|
|
8
|
+
<div class="newt-embed__field-name">Field</div>
|
|
9
|
+
<div class="newt-embed__field-value">Value</div>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="newt-embed__footer">Footer text · Just now</div>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/* newt-ui · Empty State */
|
|
2
|
+
|
|
3
|
+
.newt-empty-state {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
align-items: center;
|
|
7
|
+
text-align: center;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
padding: 40px 20px;
|
|
10
|
+
color: var(--newt-text-muted);
|
|
11
|
+
}
|
|
12
|
+
.newt-empty-state__icon {
|
|
13
|
+
font-size: 40px;
|
|
14
|
+
margin-bottom: 4px;
|
|
15
|
+
opacity: 0.6;
|
|
16
|
+
}
|
|
17
|
+
.newt-empty-state__title {
|
|
18
|
+
font-size: 16px;
|
|
19
|
+
font-weight: 600;
|
|
20
|
+
color: var(--newt-text-primary);
|
|
21
|
+
}
|
|
22
|
+
.newt-empty-state__desc {
|
|
23
|
+
font-size: 14px;
|
|
24
|
+
max-width: 320px;
|
|
25
|
+
line-height: 1.5;
|
|
26
|
+
}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/* newt-ui · Input / Form Controls */
|
|
2
|
+
|
|
3
|
+
.newt-field {
|
|
4
|
+
display: flex;
|
|
5
|
+
flex-direction: column;
|
|
6
|
+
gap: 8px;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.newt-label {
|
|
10
|
+
font-size: 12px;
|
|
11
|
+
font-weight: 700;
|
|
12
|
+
text-transform: uppercase;
|
|
13
|
+
letter-spacing: 0.02em;
|
|
14
|
+
color: var(--newt-text-secondary);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.newt-input,
|
|
18
|
+
.newt-textarea,
|
|
19
|
+
.newt-select {
|
|
20
|
+
background: var(--newt-bg-input);
|
|
21
|
+
border: 1px solid var(--newt-border);
|
|
22
|
+
border-radius: var(--newt-radius-sm);
|
|
23
|
+
color: var(--newt-text-primary);
|
|
24
|
+
font-size: 14px;
|
|
25
|
+
font-family: var(--newt-font-sans);
|
|
26
|
+
padding: 10px 12px;
|
|
27
|
+
transition: border-color var(--newt-duration-fast) var(--newt-ease);
|
|
28
|
+
width: 100%;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.newt-input:focus,
|
|
32
|
+
.newt-textarea:focus,
|
|
33
|
+
.newt-select:focus {
|
|
34
|
+
outline: none;
|
|
35
|
+
border-color: var(--newt-brand);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.newt-input::placeholder,
|
|
39
|
+
.newt-textarea::placeholder {
|
|
40
|
+
color: var(--newt-text-muted);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.newt-textarea {
|
|
44
|
+
resize: vertical;
|
|
45
|
+
min-height: 80px;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.newt-help {
|
|
49
|
+
font-size: 12px;
|
|
50
|
+
color: var(--newt-text-muted);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
/* Toggle / Switch */
|
|
54
|
+
.newt-switch {
|
|
55
|
+
position: relative;
|
|
56
|
+
display: inline-flex;
|
|
57
|
+
width: 40px;
|
|
58
|
+
height: 24px;
|
|
59
|
+
border-radius: var(--newt-radius-full);
|
|
60
|
+
background: var(--newt-bg-elevated);
|
|
61
|
+
border: 1px solid var(--newt-border);
|
|
62
|
+
cursor: pointer;
|
|
63
|
+
transition: background var(--newt-duration-base) var(--newt-ease);
|
|
64
|
+
flex-shrink: 0;
|
|
65
|
+
}
|
|
66
|
+
.newt-switch__thumb {
|
|
67
|
+
position: absolute;
|
|
68
|
+
top: 2px;
|
|
69
|
+
left: 2px;
|
|
70
|
+
width: 18px;
|
|
71
|
+
height: 18px;
|
|
72
|
+
border-radius: 50%;
|
|
73
|
+
background: var(--newt-text-muted);
|
|
74
|
+
transition:
|
|
75
|
+
transform var(--newt-duration-base) var(--newt-ease),
|
|
76
|
+
background var(--newt-duration-base) var(--newt-ease);
|
|
77
|
+
}
|
|
78
|
+
.newt-switch--on {
|
|
79
|
+
background: var(--newt-online);
|
|
80
|
+
border-color: var(--newt-online);
|
|
81
|
+
}
|
|
82
|
+
.newt-switch--on .newt-switch__thumb {
|
|
83
|
+
transform: translateX(16px);
|
|
84
|
+
background: #fff;
|
|
85
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="newt-field">
|
|
2
|
+
<label class="newt-label" for="newt-input-example">Label</label>
|
|
3
|
+
<input
|
|
4
|
+
class="newt-input"
|
|
5
|
+
id="newt-input-example"
|
|
6
|
+
type="text"
|
|
7
|
+
placeholder="Placeholder"
|
|
8
|
+
/>
|
|
9
|
+
<span class="newt-help">Helper text</span>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<div
|
|
13
|
+
class="row"
|
|
14
|
+
style="display: flex; align-items: center; justify-content: space-between"
|
|
15
|
+
>
|
|
16
|
+
<span>Toggle label</span>
|
|
17
|
+
<div class="newt-switch" role="switch" aria-checked="false" tabindex="0">
|
|
18
|
+
<div class="newt-switch__thumb"></div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/* newt-ui · Keyboard Shortcut Tag */
|
|
2
|
+
|
|
3
|
+
.newt-kbd {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
min-width: 20px;
|
|
8
|
+
height: 20px;
|
|
9
|
+
padding: 0 6px;
|
|
10
|
+
font-family: var(--newt-font-mono);
|
|
11
|
+
font-size: 11px;
|
|
12
|
+
font-weight: 600;
|
|
13
|
+
color: var(--newt-text-secondary);
|
|
14
|
+
background: var(--newt-bg-base);
|
|
15
|
+
border: 1px solid var(--newt-border);
|
|
16
|
+
border-radius: var(--newt-radius-sm);
|
|
17
|
+
box-shadow: 0 1px 0 var(--newt-border);
|
|
18
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<span class="newt-kbd">Ctrl</span><span class="newt-kbd">K</span>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* newt-ui · Member List Item */
|
|
2
|
+
|
|
3
|
+
.newt-member {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 10px;
|
|
7
|
+
padding: 6px 8px;
|
|
8
|
+
border-radius: var(--newt-radius-sm);
|
|
9
|
+
cursor: pointer;
|
|
10
|
+
transition: background var(--newt-duration-fast) var(--newt-ease);
|
|
11
|
+
}
|
|
12
|
+
.newt-member:hover {
|
|
13
|
+
background: var(--newt-bg-hover);
|
|
14
|
+
}
|
|
15
|
+
.newt-member__info {
|
|
16
|
+
display: flex;
|
|
17
|
+
flex-direction: column;
|
|
18
|
+
line-height: 1.2;
|
|
19
|
+
min-width: 0;
|
|
20
|
+
}
|
|
21
|
+
.newt-member__name {
|
|
22
|
+
font-size: 14px;
|
|
23
|
+
font-weight: 500;
|
|
24
|
+
color: var(--newt-text-primary);
|
|
25
|
+
}
|
|
26
|
+
.newt-member__role {
|
|
27
|
+
font-size: 12px;
|
|
28
|
+
color: var(--newt-text-muted);
|
|
29
|
+
}
|
|
30
|
+
.newt-member__name--colored {
|
|
31
|
+
color: var(--newt-brand);
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<div class="newt-member">
|
|
2
|
+
<div class="newt-status">
|
|
3
|
+
<div class="newt-avatar newt-avatar--sm">A</div>
|
|
4
|
+
<div class="newt-status__dot newt-status__dot--online"></div>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="newt-member__info">
|
|
7
|
+
<span class="newt-member__name">username</span>
|
|
8
|
+
<span class="newt-member__role">Role</span>
|
|
9
|
+
</div>
|
|
10
|
+
<span class="newt-role-tag" style="margin-left: auto"
|
|
11
|
+
><span class="newt-role-tag__dot"></span>TAG</span
|
|
12
|
+
>
|
|
13
|
+
</div>
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/* newt-ui · Mention Chip */
|
|
2
|
+
|
|
3
|
+
.newt-mention {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 2px;
|
|
7
|
+
padding: 0 4px;
|
|
8
|
+
border-radius: var(--newt-radius-sm);
|
|
9
|
+
font-weight: 500;
|
|
10
|
+
font-size: 14px;
|
|
11
|
+
cursor: pointer;
|
|
12
|
+
transition: background var(--newt-duration-fast) var(--newt-ease);
|
|
13
|
+
}
|
|
14
|
+
.newt-mention--user {
|
|
15
|
+
background: rgba(88, 101, 242, 0.15);
|
|
16
|
+
color: #b3baff;
|
|
17
|
+
}
|
|
18
|
+
.newt-mention--user:hover {
|
|
19
|
+
background: rgba(88, 101, 242, 0.3);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.newt-mention--channel {
|
|
23
|
+
background: rgba(148, 155, 164, 0.15);
|
|
24
|
+
color: var(--newt-text-link);
|
|
25
|
+
}
|
|
26
|
+
.newt-mention--channel:hover {
|
|
27
|
+
background: rgba(148, 155, 164, 0.25);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.newt-mention--role {
|
|
31
|
+
background: rgba(240, 178, 50, 0.15);
|
|
32
|
+
color: #f3b95f;
|
|
33
|
+
}
|
|
34
|
+
.newt-mention--role:hover {
|
|
35
|
+
background: rgba(240, 178, 50, 0.25);
|
|
36
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/* newt-ui · Message Group */
|
|
2
|
+
|
|
3
|
+
.newt-message-group {
|
|
4
|
+
display: flex;
|
|
5
|
+
gap: 16px;
|
|
6
|
+
padding: 4px 0;
|
|
7
|
+
}
|
|
8
|
+
.newt-message-group:hover {
|
|
9
|
+
background: rgba(0, 0, 0, 0.06);
|
|
10
|
+
}
|
|
11
|
+
.newt-message-group__body {
|
|
12
|
+
flex: 1;
|
|
13
|
+
min-width: 0;
|
|
14
|
+
}
|
|
15
|
+
.newt-message-group__header {
|
|
16
|
+
display: flex;
|
|
17
|
+
align-items: baseline;
|
|
18
|
+
gap: 8px;
|
|
19
|
+
margin-bottom: 4px;
|
|
20
|
+
}
|
|
21
|
+
.newt-message-group__author {
|
|
22
|
+
font-size: 15px;
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
color: var(--newt-text-primary);
|
|
25
|
+
}
|
|
26
|
+
.newt-message-group__author--bot {
|
|
27
|
+
font-size: 10px;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
background: var(--newt-brand);
|
|
30
|
+
color: #fff;
|
|
31
|
+
padding: 1px 4px;
|
|
32
|
+
border-radius: 3px;
|
|
33
|
+
text-transform: uppercase;
|
|
34
|
+
letter-spacing: 0.02em;
|
|
35
|
+
}
|
|
36
|
+
.newt-message-group__time {
|
|
37
|
+
font-size: 11px;
|
|
38
|
+
color: var(--newt-text-muted);
|
|
39
|
+
}
|
|
40
|
+
.newt-message-group__content {
|
|
41
|
+
font-size: 15px;
|
|
42
|
+
color: var(--newt-text-secondary);
|
|
43
|
+
line-height: 1.5;
|
|
44
|
+
}
|
|
45
|
+
.newt-message-group__reactions {
|
|
46
|
+
display: flex;
|
|
47
|
+
flex-wrap: wrap;
|
|
48
|
+
gap: 4px;
|
|
49
|
+
margin-top: 6px;
|
|
50
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<div class="newt-message-group">
|
|
2
|
+
<div class="newt-status">
|
|
3
|
+
<div class="newt-avatar">U</div>
|
|
4
|
+
<div class="newt-status__dot newt-status__dot--online"></div>
|
|
5
|
+
</div>
|
|
6
|
+
<div class="newt-message-group__body">
|
|
7
|
+
<div class="newt-message-group__header">
|
|
8
|
+
<span class="newt-message-group__author">username</span>
|
|
9
|
+
<span class="newt-message-group__author--bot">BOT</span>
|
|
10
|
+
<span class="newt-message-group__time">Today at 14:23</span>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="newt-message-group__content">Message content goes here.</div>
|
|
13
|
+
<div class="newt-message-group__reactions">
|
|
14
|
+
<button class="newt-reaction" aria-pressed="false">
|
|
15
|
+
<span aria-hidden="true">👍</span
|
|
16
|
+
><span class="newt-reaction__count">1</span>
|
|
17
|
+
</button>
|
|
18
|
+
</div>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/* newt-ui · Modal */
|
|
2
|
+
|
|
3
|
+
.newt-modal-overlay {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: 0;
|
|
6
|
+
background: rgba(0, 0, 0, 0.6);
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 100;
|
|
11
|
+
}
|
|
12
|
+
.newt-modal {
|
|
13
|
+
background: var(--newt-bg-elevated);
|
|
14
|
+
border-radius: var(--newt-radius-lg);
|
|
15
|
+
width: 440px;
|
|
16
|
+
max-width: 90vw;
|
|
17
|
+
box-shadow: var(--newt-shadow-elevation-high);
|
|
18
|
+
}
|
|
19
|
+
.newt-modal__header {
|
|
20
|
+
padding: 16px 16px 0;
|
|
21
|
+
font-size: 20px;
|
|
22
|
+
font-weight: 600;
|
|
23
|
+
}
|
|
24
|
+
.newt-modal__body {
|
|
25
|
+
padding: 16px;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
color: var(--newt-text-secondary);
|
|
28
|
+
line-height: 20px;
|
|
29
|
+
}
|
|
30
|
+
.newt-modal__footer {
|
|
31
|
+
padding: 16px;
|
|
32
|
+
background: var(--newt-bg-surface);
|
|
33
|
+
border-radius: 0 0 var(--newt-radius-lg) var(--newt-radius-lg);
|
|
34
|
+
display: flex;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
gap: 8px;
|
|
37
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<div class="newt-modal-overlay" data-newt-modal>
|
|
2
|
+
<div
|
|
3
|
+
class="newt-modal"
|
|
4
|
+
role="dialog"
|
|
5
|
+
aria-modal="true"
|
|
6
|
+
aria-labelledby="newt-modal-title"
|
|
7
|
+
>
|
|
8
|
+
<div class="newt-modal__header" id="newt-modal-title">Modal title</div>
|
|
9
|
+
<div class="newt-modal__body">Modal body content goes here.</div>
|
|
10
|
+
<div class="newt-modal__footer">
|
|
11
|
+
<button class="newt-btn newt-btn--secondary" data-newt-modal-close>
|
|
12
|
+
Cancel
|
|
13
|
+
</button>
|
|
14
|
+
<button class="newt-btn newt-btn--danger">Confirm</button>
|
|
15
|
+
</div>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
document.querySelectorAll("[data-newt-modal]").forEach((overlay) => {
|
|
2
|
+
overlay.addEventListener("click", (e) => {
|
|
3
|
+
if (e.target === overlay || e.target.closest("[data-newt-modal-close]")) {
|
|
4
|
+
overlay.remove()
|
|
5
|
+
}
|
|
6
|
+
})
|
|
7
|
+
document.addEventListener("keydown", (e) => {
|
|
8
|
+
if (e.key === "Escape") overlay.remove()
|
|
9
|
+
})
|
|
10
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* newt-ui · Notification Badge */
|
|
2
|
+
|
|
3
|
+
.newt-notif-badge {
|
|
4
|
+
display: inline-flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: center;
|
|
7
|
+
min-width: 16px;
|
|
8
|
+
height: 16px;
|
|
9
|
+
padding: 0 4px;
|
|
10
|
+
background: var(--newt-dnd);
|
|
11
|
+
color: #fff;
|
|
12
|
+
font-size: 11px;
|
|
13
|
+
font-weight: 700;
|
|
14
|
+
border-radius: var(--newt-radius-full);
|
|
15
|
+
border: 2px solid var(--newt-bg-base);
|
|
16
|
+
line-height: 1;
|
|
17
|
+
}
|
|
18
|
+
.newt-notif-badge--mention {
|
|
19
|
+
background: var(--newt-dnd);
|
|
20
|
+
}
|
|
21
|
+
.newt-notif-badge--unread {
|
|
22
|
+
width: 8px;
|
|
23
|
+
height: 8px;
|
|
24
|
+
min-width: unset;
|
|
25
|
+
padding: 0;
|
|
26
|
+
border-radius: 50%;
|
|
27
|
+
background: var(--newt-text-primary);
|
|
28
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<!-- Count badge (position: absolute on parent) -->
|
|
2
|
+
<div style="position: relative; display: inline-block">
|
|
3
|
+
<div class="newt-avatar">U</div>
|
|
4
|
+
<div
|
|
5
|
+
class="newt-notif-badge"
|
|
6
|
+
style="position: absolute; top: -4px; right: -4px"
|
|
7
|
+
>
|
|
8
|
+
3
|
|
9
|
+
</div>
|
|
10
|
+
</div>
|
|
11
|
+
|
|
12
|
+
<!-- Unread dot -->
|
|
13
|
+
<div class="newt-notif-badge newt-notif-badge--unread"></div>
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/* newt-ui · Pagination / Load More */
|
|
2
|
+
|
|
3
|
+
.newt-pagination {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
gap: 4px;
|
|
7
|
+
}
|
|
8
|
+
.newt-pagination__btn {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
min-width: 32px;
|
|
13
|
+
height: 32px;
|
|
14
|
+
padding: 0 8px;
|
|
15
|
+
font-size: 13px;
|
|
16
|
+
font-weight: 500;
|
|
17
|
+
color: var(--newt-text-secondary);
|
|
18
|
+
background: var(--newt-bg-elevated);
|
|
19
|
+
border: 1px solid var(--newt-border);
|
|
20
|
+
border-radius: var(--newt-radius-sm);
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
.newt-pagination__btn:hover {
|
|
24
|
+
background: var(--newt-bg-hover);
|
|
25
|
+
color: var(--newt-text-primary);
|
|
26
|
+
}
|
|
27
|
+
.newt-pagination__btn--active {
|
|
28
|
+
background: var(--newt-brand);
|
|
29
|
+
color: #fff;
|
|
30
|
+
border-color: var(--newt-brand);
|
|
31
|
+
}
|
|
32
|
+
.newt-pagination__btn:disabled {
|
|
33
|
+
opacity: 0.4;
|
|
34
|
+
cursor: not-allowed;
|
|
35
|
+
}
|
|
36
|
+
.newt-pagination__ellipsis {
|
|
37
|
+
color: var(--newt-text-muted);
|
|
38
|
+
font-size: 13px;
|
|
39
|
+
padding: 0 4px;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.newt-load-more {
|
|
43
|
+
display: flex;
|
|
44
|
+
align-items: center;
|
|
45
|
+
justify-content: center;
|
|
46
|
+
gap: 10px;
|
|
47
|
+
padding: 12px;
|
|
48
|
+
color: var(--newt-text-muted);
|
|
49
|
+
font-size: 13px;
|
|
50
|
+
}
|
|
51
|
+
.newt-load-more::before,
|
|
52
|
+
.newt-load-more::after {
|
|
53
|
+
content: "";
|
|
54
|
+
flex: 1;
|
|
55
|
+
height: 1px;
|
|
56
|
+
background: var(--newt-border);
|
|
57
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<div class="newt-pagination" role="navigation" aria-label="Pagination">
|
|
2
|
+
<button class="newt-pagination__btn" aria-label="Previous page">‹</button>
|
|
3
|
+
<button
|
|
4
|
+
class="newt-pagination__btn newt-pagination__btn--active"
|
|
5
|
+
aria-current="page"
|
|
6
|
+
>
|
|
7
|
+
1
|
|
8
|
+
</button>
|
|
9
|
+
<button class="newt-pagination__btn">2</button>
|
|
10
|
+
<button class="newt-pagination__btn">3</button>
|
|
11
|
+
<button class="newt-pagination__btn" aria-label="Next page">›</button>
|
|
12
|
+
</div>
|
|
13
|
+
|
|
14
|
+
<div class="newt-load-more">
|
|
15
|
+
<button class="newt-btn newt-btn--secondary newt-btn--sm">Load more</button>
|
|
16
|
+
</div>
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* newt-ui · Permission Row */
|
|
2
|
+
|
|
3
|
+
.newt-permission {
|
|
4
|
+
display: flex;
|
|
5
|
+
align-items: center;
|
|
6
|
+
justify-content: space-between;
|
|
7
|
+
padding: 10px 0;
|
|
8
|
+
border-bottom: 1px solid var(--newt-border);
|
|
9
|
+
}
|
|
10
|
+
.newt-permission:last-child {
|
|
11
|
+
border-bottom: none;
|
|
12
|
+
}
|
|
13
|
+
.newt-permission__info {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
gap: 2px;
|
|
17
|
+
}
|
|
18
|
+
.newt-permission__name {
|
|
19
|
+
font-size: 14px;
|
|
20
|
+
font-weight: 500;
|
|
21
|
+
color: var(--newt-text-primary);
|
|
22
|
+
}
|
|
23
|
+
.newt-permission__desc {
|
|
24
|
+
font-size: 12px;
|
|
25
|
+
color: var(--newt-text-muted);
|
|
26
|
+
}
|
|
27
|
+
.newt-permission__states {
|
|
28
|
+
display: flex;
|
|
29
|
+
gap: 4px;
|
|
30
|
+
background: var(--newt-bg-base);
|
|
31
|
+
border-radius: var(--newt-radius-sm);
|
|
32
|
+
padding: 2px;
|
|
33
|
+
}
|
|
34
|
+
.newt-permission__state {
|
|
35
|
+
width: 28px;
|
|
36
|
+
height: 28px;
|
|
37
|
+
display: flex;
|
|
38
|
+
align-items: center;
|
|
39
|
+
justify-content: center;
|
|
40
|
+
border-radius: var(--newt-radius-sm);
|
|
41
|
+
border: none;
|
|
42
|
+
background: transparent;
|
|
43
|
+
color: var(--newt-text-muted);
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
font-size: 14px;
|
|
46
|
+
transition:
|
|
47
|
+
background var(--newt-duration-fast) var(--newt-ease),
|
|
48
|
+
color var(--newt-duration-fast) var(--newt-ease);
|
|
49
|
+
}
|
|
50
|
+
.newt-permission__state:hover {
|
|
51
|
+
color: var(--newt-text-secondary);
|
|
52
|
+
}
|
|
53
|
+
.newt-permission__state--deny.newt-permission__state--active {
|
|
54
|
+
background: rgba(242, 63, 66, 0.15);
|
|
55
|
+
color: var(--newt-dnd);
|
|
56
|
+
}
|
|
57
|
+
.newt-permission__state--inherit.newt-permission__state--active {
|
|
58
|
+
background: var(--newt-bg-elevated);
|
|
59
|
+
color: var(--newt-text-secondary);
|
|
60
|
+
}
|
|
61
|
+
.newt-permission__state--allow.newt-permission__state--active {
|
|
62
|
+
background: rgba(35, 165, 90, 0.15);
|
|
63
|
+
color: var(--newt-online);
|
|
64
|
+
}
|