nexus-shared 1.1.4 → 1.1.6
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/package.json +16 -40
- package/src/api-services/preference-service.tsx +5 -0
- package/src/api-services/system-service.tsx +322 -0
- package/src/components/documents/button.tsx +136 -0
- package/src/components/documents/icon-box.tsx +92 -0
- package/src/components/documents/page-title.tsx +7 -0
- package/src/components/documents/tab-button.tsx +169 -0
- package/src/components/index.js +0 -0
- package/src/components/inputs/checkbox-input.tsx +66 -0
- package/src/components/inputs/input-box.tsx +45 -0
- package/src/components/inputs/input-element.tsx +65 -0
- package/src/components/inputs/input-form.tsx +50 -0
- package/src/components/inputs/input.tsx +181 -0
- package/src/components/inputs/number-input.tsx +108 -0
- package/src/components/inputs/radiobox-input.tsx +53 -0
- package/src/components/inputs/textarea-input.tsx +47 -0
- package/src/components/inputs/textbox-input.tsx +45 -0
- package/src/components/layouts/global-dialogbox.tsx +433 -0
- package/src/components/layouts/global-layout.tsx +63 -0
- package/src/components/layouts/layout-helpers.tsx +23 -0
- package/src/components/layouts/utility-menu.tsx +71 -0
- package/src/components/panels/theme-panel.tsx +44 -0
- package/src/helpers/bitwise-helpers.tsx +11 -0
- package/src/helpers/browser-helpers.tsx +73 -0
- package/src/helpers/datasource-helpers.tsx +99 -0
- package/src/helpers/element-helpers.tsx +57 -0
- package/src/helpers/input-helpers.tsx +24 -0
- package/src/helpers/string-helpers.tsx +28 -0
- package/src/helpers/utility-helpers.tsx +44 -0
- package/src/index.ts +0 -11
- package/src/interfaces/browser-interfaces.tsx +23 -0
- package/src/interfaces/button-interfaces.tsx +63 -0
- package/src/interfaces/datasource-interfaces.tsx +22 -0
- package/src/interfaces/datatable-interfaces.tsx +25 -0
- package/src/interfaces/dialogbox-interfaces.tsx +5 -0
- package/src/interfaces/http-interfaces.tsx +15 -0
- package/src/interfaces/icon-interfaces.tsx +126 -0
- package/src/interfaces/input-interfaces.tsx +360 -0
- package/src/interfaces/layout-interfaces.tsx +191 -0
- package/src/interfaces/menu-interfaces.tsx +36 -0
- package/src/interfaces/permission-interfaces.tsx +9 -0
- package/src/interfaces/storage-interfaces.tsx +3 -0
- package/src/interfaces/system-interfaces.tsx +22 -0
- package/src/interfaces/theme-interfaces.tsx +209 -0
- package/src/interfaces/type-interfaces.tsx +22 -0
- package/src/nexus-client.tsx +23 -0
- package/src/nexus.environments.tsx +34 -0
- package/src/services/loader-service.tsx +168 -0
- package/src/services/localstorage-service.tsx +45 -0
- package/src/services/theme-service.tsx +149 -0
- package/src/styles/nexus.animation.css +269 -0
- package/src/styles/nexus.core.css +119 -0
- package/src/styles/nexus.dialog.css +141 -0
- package/src/styles/nexus.icon.css +50 -0
- package/src/styles/nexus.input.css +207 -0
- package/src/styles/nexus.loader.css +11 -0
- package/src/styles/nexus.logic.css +18 -0
- package/src/styles/nexus.utility.css +347 -0
- package/dist/chunk-7GVFDWOS.js +0 -28
- package/dist/chunk-7GVFDWOS.js.map +0 -1
- package/dist/chunk-EW6K4PYI.js +0 -96
- package/dist/chunk-EW6K4PYI.js.map +0 -1
- package/dist/chunk-UMV7E2RN.js +0 -1
- package/dist/chunk-UMV7E2RN.js.map +0 -1
- package/dist/client.css +0 -119
- package/dist/client.css.map +0 -1
- package/dist/client.d.ts +0 -9
- package/dist/client.js +0 -7
- package/dist/client.js.map +0 -1
- package/dist/index.css +0 -207
- package/dist/index.css.map +0 -1
- package/dist/index.d.ts +0 -5
- package/dist/index.js +0 -12
- package/dist/index.js.map +0 -1
- package/dist/interface.d.ts +0 -9
- package/dist/interface.js +0 -2
- package/dist/interface.js.map +0 -1
- package/dist/nexus-list-DV45tcM0.d.ts +0 -24
- package/dist/server.css +0 -88
- package/dist/server.css.map +0 -1
- package/dist/server.d.ts +0 -9
- package/dist/server.js +0 -7
- package/dist/server.js.map +0 -1
- package/src/client/index.ts +0 -1
- package/src/client/nexus-selectable-list.css +0 -131
- package/src/client/nexus-selectable-list.tsx +0 -111
- package/src/client.ts +0 -7
- package/src/interface.ts +0 -5
- package/src/interfaces/index.ts +0 -6
- package/src/interfaces/nexus-base.ts +0 -5
- package/src/interfaces/nexus-list.ts +0 -24
- package/src/server/index.ts +0 -1
- package/src/server/nexus-stat-list.css +0 -92
- package/src/server/nexus-stat-list.tsx +0 -46
- package/src/server.ts +0 -8
package/dist/index.css
DELETED
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
/* src/server/nexus-stat-list.css */
|
|
2
|
-
.nexus-stat-list {
|
|
3
|
-
--nexus-stat-bg: #0f1419;
|
|
4
|
-
--nexus-stat-surface: #1a2332;
|
|
5
|
-
--nexus-stat-border: #2d3a4f;
|
|
6
|
-
--nexus-stat-accent: #3b82f6;
|
|
7
|
-
--nexus-stat-text: #e8edf4;
|
|
8
|
-
--nexus-stat-muted: #8b9cb3;
|
|
9
|
-
font-family:
|
|
10
|
-
system-ui,
|
|
11
|
-
-apple-system,
|
|
12
|
-
"Segoe UI",
|
|
13
|
-
sans-serif;
|
|
14
|
-
background: var(--nexus-stat-bg);
|
|
15
|
-
border: 1px solid var(--nexus-stat-border);
|
|
16
|
-
border-radius: 12px;
|
|
17
|
-
padding: 1.25rem 1.5rem;
|
|
18
|
-
color: var(--nexus-stat-text);
|
|
19
|
-
max-width: 28rem;
|
|
20
|
-
}
|
|
21
|
-
.nexus-stat-list__title {
|
|
22
|
-
margin: 0 0 1rem;
|
|
23
|
-
font-size: 1.125rem;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
letter-spacing: -0.02em;
|
|
26
|
-
color: var(--nexus-stat-text);
|
|
27
|
-
border-bottom: 2px solid var(--nexus-stat-accent);
|
|
28
|
-
padding-bottom: 0.5rem;
|
|
29
|
-
display: inline-block;
|
|
30
|
-
}
|
|
31
|
-
.nexus-stat-list__list {
|
|
32
|
-
list-style: none;
|
|
33
|
-
margin: 0;
|
|
34
|
-
padding: 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
gap: 0.5rem;
|
|
38
|
-
}
|
|
39
|
-
.nexus-stat-list__item {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
gap: 1rem;
|
|
44
|
-
padding: 0.75rem 1rem;
|
|
45
|
-
background: var(--nexus-stat-surface);
|
|
46
|
-
border-radius: 8px;
|
|
47
|
-
border: 1px solid transparent;
|
|
48
|
-
transition: border-color 0.15s ease;
|
|
49
|
-
}
|
|
50
|
-
.nexus-stat-list__item:hover {
|
|
51
|
-
border-color: var(--nexus-stat-border);
|
|
52
|
-
}
|
|
53
|
-
.nexus-stat-list__label-group {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
gap: 0.15rem;
|
|
57
|
-
min-width: 0;
|
|
58
|
-
}
|
|
59
|
-
.nexus-stat-list__label {
|
|
60
|
-
font-size: 0.9375rem;
|
|
61
|
-
font-weight: 500;
|
|
62
|
-
color: var(--nexus-stat-text);
|
|
63
|
-
}
|
|
64
|
-
.nexus-stat-list__description {
|
|
65
|
-
font-size: 0.8125rem;
|
|
66
|
-
color: var(--nexus-stat-muted);
|
|
67
|
-
line-height: 1.35;
|
|
68
|
-
}
|
|
69
|
-
.nexus-stat-list__value {
|
|
70
|
-
flex-shrink: 0;
|
|
71
|
-
font-size: 0.875rem;
|
|
72
|
-
font-weight: 600;
|
|
73
|
-
color: var(--nexus-stat-accent);
|
|
74
|
-
background: rgba(59, 130, 246, 0.12);
|
|
75
|
-
padding: 0.25rem 0.625rem;
|
|
76
|
-
border-radius: 6px;
|
|
77
|
-
}
|
|
78
|
-
.nexus-stat-list__empty {
|
|
79
|
-
margin: 0;
|
|
80
|
-
padding: 1.5rem;
|
|
81
|
-
text-align: center;
|
|
82
|
-
font-size: 0.875rem;
|
|
83
|
-
color: var(--nexus-stat-muted);
|
|
84
|
-
background: var(--nexus-stat-surface);
|
|
85
|
-
border-radius: 8px;
|
|
86
|
-
border: 1px dashed var(--nexus-stat-border);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
/* src/client/nexus-selectable-list.css */
|
|
90
|
-
.nexus-selectable-list {
|
|
91
|
-
--nexus-select-bg: #12101a;
|
|
92
|
-
--nexus-select-surface: #1e1b28;
|
|
93
|
-
--nexus-select-border: #3d3654;
|
|
94
|
-
--nexus-select-accent: #a855f7;
|
|
95
|
-
--nexus-select-accent-dim: rgba(168, 85, 247, 0.15);
|
|
96
|
-
--nexus-select-text: #f4f0fa;
|
|
97
|
-
--nexus-select-muted: #9d94b0;
|
|
98
|
-
font-family:
|
|
99
|
-
system-ui,
|
|
100
|
-
-apple-system,
|
|
101
|
-
"Segoe UI",
|
|
102
|
-
sans-serif;
|
|
103
|
-
background: var(--nexus-select-bg);
|
|
104
|
-
border: 1px solid var(--nexus-select-border);
|
|
105
|
-
border-radius: 12px;
|
|
106
|
-
padding: 1.25rem 1.5rem;
|
|
107
|
-
color: var(--nexus-select-text);
|
|
108
|
-
max-width: 32rem;
|
|
109
|
-
}
|
|
110
|
-
.nexus-selectable-list__header {
|
|
111
|
-
margin-bottom: 1rem;
|
|
112
|
-
}
|
|
113
|
-
.nexus-selectable-list__title {
|
|
114
|
-
margin: 0 0 0.75rem;
|
|
115
|
-
font-size: 1.125rem;
|
|
116
|
-
font-weight: 600;
|
|
117
|
-
letter-spacing: -0.02em;
|
|
118
|
-
}
|
|
119
|
-
.nexus-selectable-list__search {
|
|
120
|
-
width: 100%;
|
|
121
|
-
box-sizing: border-box;
|
|
122
|
-
padding: 0.625rem 0.875rem;
|
|
123
|
-
font-size: 0.875rem;
|
|
124
|
-
color: var(--nexus-select-text);
|
|
125
|
-
background: var(--nexus-select-surface);
|
|
126
|
-
border: 1px solid var(--nexus-select-border);
|
|
127
|
-
border-radius: 8px;
|
|
128
|
-
outline: none;
|
|
129
|
-
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
130
|
-
}
|
|
131
|
-
.nexus-selectable-list__search::placeholder {
|
|
132
|
-
color: var(--nexus-select-muted);
|
|
133
|
-
}
|
|
134
|
-
.nexus-selectable-list__search:focus {
|
|
135
|
-
border-color: var(--nexus-select-accent);
|
|
136
|
-
box-shadow: 0 0 0 3px var(--nexus-select-accent-dim);
|
|
137
|
-
}
|
|
138
|
-
.nexus-selectable-list__meta {
|
|
139
|
-
margin: 0.5rem 0 0;
|
|
140
|
-
font-size: 0.75rem;
|
|
141
|
-
color: var(--nexus-select-muted);
|
|
142
|
-
}
|
|
143
|
-
.nexus-selectable-list__list {
|
|
144
|
-
list-style: none;
|
|
145
|
-
margin: 0;
|
|
146
|
-
padding: 0;
|
|
147
|
-
display: flex;
|
|
148
|
-
flex-direction: column;
|
|
149
|
-
gap: 0.375rem;
|
|
150
|
-
max-height: 16rem;
|
|
151
|
-
overflow-y: auto;
|
|
152
|
-
}
|
|
153
|
-
.nexus-selectable-list__item {
|
|
154
|
-
display: block;
|
|
155
|
-
width: 100%;
|
|
156
|
-
text-align: left;
|
|
157
|
-
padding: 0.75rem 1rem;
|
|
158
|
-
font: inherit;
|
|
159
|
-
color: inherit;
|
|
160
|
-
background: var(--nexus-select-surface);
|
|
161
|
-
border: 1px solid transparent;
|
|
162
|
-
border-radius: 8px;
|
|
163
|
-
cursor: pointer;
|
|
164
|
-
transition: background 0.15s ease, border-color 0.15s ease;
|
|
165
|
-
}
|
|
166
|
-
.nexus-selectable-list__item:hover {
|
|
167
|
-
border-color: var(--nexus-select-border);
|
|
168
|
-
}
|
|
169
|
-
.nexus-selectable-list__item--selected {
|
|
170
|
-
background: var(--nexus-select-accent-dim);
|
|
171
|
-
border-color: var(--nexus-select-accent);
|
|
172
|
-
}
|
|
173
|
-
.nexus-selectable-list__label {
|
|
174
|
-
display: block;
|
|
175
|
-
font-size: 0.9375rem;
|
|
176
|
-
font-weight: 500;
|
|
177
|
-
}
|
|
178
|
-
.nexus-selectable-list__description {
|
|
179
|
-
display: block;
|
|
180
|
-
margin-top: 0.2rem;
|
|
181
|
-
font-size: 0.8125rem;
|
|
182
|
-
color: var(--nexus-select-muted);
|
|
183
|
-
line-height: 1.35;
|
|
184
|
-
}
|
|
185
|
-
.nexus-selectable-list__empty {
|
|
186
|
-
margin: 0;
|
|
187
|
-
padding: 1.25rem;
|
|
188
|
-
text-align: center;
|
|
189
|
-
font-size: 0.875rem;
|
|
190
|
-
color: var(--nexus-select-muted);
|
|
191
|
-
background: var(--nexus-select-surface);
|
|
192
|
-
border-radius: 8px;
|
|
193
|
-
}
|
|
194
|
-
.nexus-selectable-list__detail {
|
|
195
|
-
margin-top: 1rem;
|
|
196
|
-
padding: 0.875rem 1rem;
|
|
197
|
-
background: var(--nexus-select-surface);
|
|
198
|
-
border-left: 3px solid var(--nexus-select-accent);
|
|
199
|
-
border-radius: 0 8px 8px 0;
|
|
200
|
-
font-size: 0.8125rem;
|
|
201
|
-
line-height: 1.5;
|
|
202
|
-
}
|
|
203
|
-
.nexus-selectable-list__detail strong {
|
|
204
|
-
color: var(--nexus-select-accent);
|
|
205
|
-
font-weight: 600;
|
|
206
|
-
}
|
|
207
|
-
/*# sourceMappingURL=index.css.map */
|
package/dist/index.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server/nexus-stat-list.css","../src/client/nexus-selectable-list.css"],"sourcesContent":[".nexus-stat-list {\r\n --nexus-stat-bg: #0f1419;\r\n --nexus-stat-surface: #1a2332;\r\n --nexus-stat-border: #2d3a4f;\r\n --nexus-stat-accent: #3b82f6;\r\n --nexus-stat-text: #e8edf4;\r\n --nexus-stat-muted: #8b9cb3;\r\n\r\n font-family: system-ui, -apple-system, \"Segoe UI\", sans-serif;\r\n background: var(--nexus-stat-bg);\r\n border: 1px solid var(--nexus-stat-border);\r\n border-radius: 12px;\r\n padding: 1.25rem 1.5rem;\r\n color: var(--nexus-stat-text);\r\n max-width: 28rem;\r\n}\r\n\r\n.nexus-stat-list__title {\r\n margin: 0 0 1rem;\r\n font-size: 1.125rem;\r\n font-weight: 600;\r\n letter-spacing: -0.02em;\r\n color: var(--nexus-stat-text);\r\n border-bottom: 2px solid var(--nexus-stat-accent);\r\n padding-bottom: 0.5rem;\r\n display: inline-block;\r\n}\r\n\r\n.nexus-stat-list__list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n}\r\n\r\n.nexus-stat-list__item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 1rem;\r\n padding: 0.75rem 1rem;\r\n background: var(--nexus-stat-surface);\r\n border-radius: 8px;\r\n border: 1px solid transparent;\r\n transition: border-color 0.15s ease;\r\n}\r\n\r\n.nexus-stat-list__item:hover {\r\n border-color: var(--nexus-stat-border);\r\n}\r\n\r\n.nexus-stat-list__label-group {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.15rem;\r\n min-width: 0;\r\n}\r\n\r\n.nexus-stat-list__label {\r\n font-size: 0.9375rem;\r\n font-weight: 500;\r\n color: var(--nexus-stat-text);\r\n}\r\n\r\n.nexus-stat-list__description {\r\n font-size: 0.8125rem;\r\n color: var(--nexus-stat-muted);\r\n line-height: 1.35;\r\n}\r\n\r\n.nexus-stat-list__value {\r\n flex-shrink: 0;\r\n font-size: 0.875rem;\r\n font-weight: 600;\r\n color: var(--nexus-stat-accent);\r\n background: rgba(59, 130, 246, 0.12);\r\n padding: 0.25rem 0.625rem;\r\n border-radius: 6px;\r\n}\r\n\r\n.nexus-stat-list__empty {\r\n margin: 0;\r\n padding: 1.5rem;\r\n text-align: center;\r\n font-size: 0.875rem;\r\n color: var(--nexus-stat-muted);\r\n background: var(--nexus-stat-surface);\r\n border-radius: 8px;\r\n border: 1px dashed var(--nexus-stat-border);\r\n}\r\n",".nexus-selectable-list {\r\n --nexus-select-bg: #12101a;\r\n --nexus-select-surface: #1e1b28;\r\n --nexus-select-border: #3d3654;\r\n --nexus-select-accent: #a855f7;\r\n --nexus-select-accent-dim: rgba(168, 85, 247, 0.15);\r\n --nexus-select-text: #f4f0fa;\r\n --nexus-select-muted: #9d94b0;\r\n\r\n font-family: system-ui, -apple-system, \"Segoe UI\", sans-serif;\r\n background: var(--nexus-select-bg);\r\n border: 1px solid var(--nexus-select-border);\r\n border-radius: 12px;\r\n padding: 1.25rem 1.5rem;\r\n color: var(--nexus-select-text);\r\n max-width: 32rem;\r\n}\r\n\r\n.nexus-selectable-list__header {\r\n margin-bottom: 1rem;\r\n}\r\n\r\n.nexus-selectable-list__title {\r\n margin: 0 0 0.75rem;\r\n font-size: 1.125rem;\r\n font-weight: 600;\r\n letter-spacing: -0.02em;\r\n}\r\n\r\n.nexus-selectable-list__search {\r\n width: 100%;\r\n box-sizing: border-box;\r\n padding: 0.625rem 0.875rem;\r\n font-size: 0.875rem;\r\n color: var(--nexus-select-text);\r\n background: var(--nexus-select-surface);\r\n border: 1px solid var(--nexus-select-border);\r\n border-radius: 8px;\r\n outline: none;\r\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\r\n}\r\n\r\n.nexus-selectable-list__search::placeholder {\r\n color: var(--nexus-select-muted);\r\n}\r\n\r\n.nexus-selectable-list__search:focus {\r\n border-color: var(--nexus-select-accent);\r\n box-shadow: 0 0 0 3px var(--nexus-select-accent-dim);\r\n}\r\n\r\n.nexus-selectable-list__meta {\r\n margin: 0.5rem 0 0;\r\n font-size: 0.75rem;\r\n color: var(--nexus-select-muted);\r\n}\r\n\r\n.nexus-selectable-list__list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.375rem;\r\n max-height: 16rem;\r\n overflow-y: auto;\r\n}\r\n\r\n.nexus-selectable-list__item {\r\n display: block;\r\n width: 100%;\r\n text-align: left;\r\n padding: 0.75rem 1rem;\r\n font: inherit;\r\n color: inherit;\r\n background: var(--nexus-select-surface);\r\n border: 1px solid transparent;\r\n border-radius: 8px;\r\n cursor: pointer;\r\n transition:\r\n background 0.15s ease,\r\n border-color 0.15s ease;\r\n}\r\n\r\n.nexus-selectable-list__item:hover {\r\n border-color: var(--nexus-select-border);\r\n}\r\n\r\n.nexus-selectable-list__item--selected {\r\n background: var(--nexus-select-accent-dim);\r\n border-color: var(--nexus-select-accent);\r\n}\r\n\r\n.nexus-selectable-list__label {\r\n display: block;\r\n font-size: 0.9375rem;\r\n font-weight: 500;\r\n}\r\n\r\n.nexus-selectable-list__description {\r\n display: block;\r\n margin-top: 0.2rem;\r\n font-size: 0.8125rem;\r\n color: var(--nexus-select-muted);\r\n line-height: 1.35;\r\n}\r\n\r\n.nexus-selectable-list__empty {\r\n margin: 0;\r\n padding: 1.25rem;\r\n text-align: center;\r\n font-size: 0.875rem;\r\n color: var(--nexus-select-muted);\r\n background: var(--nexus-select-surface);\r\n border-radius: 8px;\r\n}\r\n\r\n.nexus-selectable-list__detail {\r\n margin-top: 1rem;\r\n padding: 0.875rem 1rem;\r\n background: var(--nexus-select-surface);\r\n border-left: 3px solid var(--nexus-select-accent);\r\n border-radius: 0 8px 8px 0;\r\n font-size: 0.8125rem;\r\n line-height: 1.5;\r\n}\r\n\r\n.nexus-selectable-list__detail strong {\r\n color: var(--nexus-select-accent);\r\n font-weight: 600;\r\n}\r\n"],"mappings":"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","names":[]}
|
package/dist/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { NexusBaseProps } from './interface.js';
|
|
2
|
-
export { N as NexusListItem, a as NexusSelectableListProps, b as NexusStatListProps } from './nexus-list-DV45tcM0.js';
|
|
3
|
-
export { NexusStatList } from './server.js';
|
|
4
|
-
export { NexusSelectableList } from './client.js';
|
|
5
|
-
import 'react/jsx-runtime';
|
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/dist/interface.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export { N as NexusListItem, a as NexusSelectableListProps, b as NexusStatListProps } from './nexus-list-DV45tcM0.js';
|
|
2
|
-
|
|
3
|
-
/** Base props shared across Nexus packages */
|
|
4
|
-
interface NexusBaseProps {
|
|
5
|
-
id?: string;
|
|
6
|
-
className?: string;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export type { NexusBaseProps };
|
package/dist/interface.js
DELETED
package/dist/interface.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/** Single row/item used by Nexus list components */
|
|
2
|
-
interface NexusListItem {
|
|
3
|
-
id: string;
|
|
4
|
-
label: string;
|
|
5
|
-
description?: string;
|
|
6
|
-
value?: string | number;
|
|
7
|
-
}
|
|
8
|
-
/** Props for the server-rendered stat list */
|
|
9
|
-
interface NexusStatListProps {
|
|
10
|
-
title: string;
|
|
11
|
-
items: NexusListItem[];
|
|
12
|
-
emptyMessage?: string;
|
|
13
|
-
className?: string;
|
|
14
|
-
}
|
|
15
|
-
/** Props for the client-side selectable & filterable list */
|
|
16
|
-
interface NexusSelectableListProps {
|
|
17
|
-
title: string;
|
|
18
|
-
items: NexusListItem[];
|
|
19
|
-
placeholder?: string;
|
|
20
|
-
emptyMessage?: string;
|
|
21
|
-
className?: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type { NexusListItem as N, NexusSelectableListProps as a, NexusStatListProps as b };
|
package/dist/server.css
DELETED
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/* src/server/nexus-stat-list.css */
|
|
2
|
-
.nexus-stat-list {
|
|
3
|
-
--nexus-stat-bg: #0f1419;
|
|
4
|
-
--nexus-stat-surface: #1a2332;
|
|
5
|
-
--nexus-stat-border: #2d3a4f;
|
|
6
|
-
--nexus-stat-accent: #3b82f6;
|
|
7
|
-
--nexus-stat-text: #e8edf4;
|
|
8
|
-
--nexus-stat-muted: #8b9cb3;
|
|
9
|
-
font-family:
|
|
10
|
-
system-ui,
|
|
11
|
-
-apple-system,
|
|
12
|
-
"Segoe UI",
|
|
13
|
-
sans-serif;
|
|
14
|
-
background: var(--nexus-stat-bg);
|
|
15
|
-
border: 1px solid var(--nexus-stat-border);
|
|
16
|
-
border-radius: 12px;
|
|
17
|
-
padding: 1.25rem 1.5rem;
|
|
18
|
-
color: var(--nexus-stat-text);
|
|
19
|
-
max-width: 28rem;
|
|
20
|
-
}
|
|
21
|
-
.nexus-stat-list__title {
|
|
22
|
-
margin: 0 0 1rem;
|
|
23
|
-
font-size: 1.125rem;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
letter-spacing: -0.02em;
|
|
26
|
-
color: var(--nexus-stat-text);
|
|
27
|
-
border-bottom: 2px solid var(--nexus-stat-accent);
|
|
28
|
-
padding-bottom: 0.5rem;
|
|
29
|
-
display: inline-block;
|
|
30
|
-
}
|
|
31
|
-
.nexus-stat-list__list {
|
|
32
|
-
list-style: none;
|
|
33
|
-
margin: 0;
|
|
34
|
-
padding: 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
flex-direction: column;
|
|
37
|
-
gap: 0.5rem;
|
|
38
|
-
}
|
|
39
|
-
.nexus-stat-list__item {
|
|
40
|
-
display: flex;
|
|
41
|
-
align-items: center;
|
|
42
|
-
justify-content: space-between;
|
|
43
|
-
gap: 1rem;
|
|
44
|
-
padding: 0.75rem 1rem;
|
|
45
|
-
background: var(--nexus-stat-surface);
|
|
46
|
-
border-radius: 8px;
|
|
47
|
-
border: 1px solid transparent;
|
|
48
|
-
transition: border-color 0.15s ease;
|
|
49
|
-
}
|
|
50
|
-
.nexus-stat-list__item:hover {
|
|
51
|
-
border-color: var(--nexus-stat-border);
|
|
52
|
-
}
|
|
53
|
-
.nexus-stat-list__label-group {
|
|
54
|
-
display: flex;
|
|
55
|
-
flex-direction: column;
|
|
56
|
-
gap: 0.15rem;
|
|
57
|
-
min-width: 0;
|
|
58
|
-
}
|
|
59
|
-
.nexus-stat-list__label {
|
|
60
|
-
font-size: 0.9375rem;
|
|
61
|
-
font-weight: 500;
|
|
62
|
-
color: var(--nexus-stat-text);
|
|
63
|
-
}
|
|
64
|
-
.nexus-stat-list__description {
|
|
65
|
-
font-size: 0.8125rem;
|
|
66
|
-
color: var(--nexus-stat-muted);
|
|
67
|
-
line-height: 1.35;
|
|
68
|
-
}
|
|
69
|
-
.nexus-stat-list__value {
|
|
70
|
-
flex-shrink: 0;
|
|
71
|
-
font-size: 0.875rem;
|
|
72
|
-
font-weight: 600;
|
|
73
|
-
color: var(--nexus-stat-accent);
|
|
74
|
-
background: rgba(59, 130, 246, 0.12);
|
|
75
|
-
padding: 0.25rem 0.625rem;
|
|
76
|
-
border-radius: 6px;
|
|
77
|
-
}
|
|
78
|
-
.nexus-stat-list__empty {
|
|
79
|
-
margin: 0;
|
|
80
|
-
padding: 1.5rem;
|
|
81
|
-
text-align: center;
|
|
82
|
-
font-size: 0.875rem;
|
|
83
|
-
color: var(--nexus-stat-muted);
|
|
84
|
-
background: var(--nexus-stat-surface);
|
|
85
|
-
border-radius: 8px;
|
|
86
|
-
border: 1px dashed var(--nexus-stat-border);
|
|
87
|
-
}
|
|
88
|
-
/*# sourceMappingURL=server.css.map */
|
package/dist/server.css.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/server/nexus-stat-list.css"],"sourcesContent":[".nexus-stat-list {\r\n --nexus-stat-bg: #0f1419;\r\n --nexus-stat-surface: #1a2332;\r\n --nexus-stat-border: #2d3a4f;\r\n --nexus-stat-accent: #3b82f6;\r\n --nexus-stat-text: #e8edf4;\r\n --nexus-stat-muted: #8b9cb3;\r\n\r\n font-family: system-ui, -apple-system, \"Segoe UI\", sans-serif;\r\n background: var(--nexus-stat-bg);\r\n border: 1px solid var(--nexus-stat-border);\r\n border-radius: 12px;\r\n padding: 1.25rem 1.5rem;\r\n color: var(--nexus-stat-text);\r\n max-width: 28rem;\r\n}\r\n\r\n.nexus-stat-list__title {\r\n margin: 0 0 1rem;\r\n font-size: 1.125rem;\r\n font-weight: 600;\r\n letter-spacing: -0.02em;\r\n color: var(--nexus-stat-text);\r\n border-bottom: 2px solid var(--nexus-stat-accent);\r\n padding-bottom: 0.5rem;\r\n display: inline-block;\r\n}\r\n\r\n.nexus-stat-list__list {\r\n list-style: none;\r\n margin: 0;\r\n padding: 0;\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.5rem;\r\n}\r\n\r\n.nexus-stat-list__item {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n gap: 1rem;\r\n padding: 0.75rem 1rem;\r\n background: var(--nexus-stat-surface);\r\n border-radius: 8px;\r\n border: 1px solid transparent;\r\n transition: border-color 0.15s ease;\r\n}\r\n\r\n.nexus-stat-list__item:hover {\r\n border-color: var(--nexus-stat-border);\r\n}\r\n\r\n.nexus-stat-list__label-group {\r\n display: flex;\r\n flex-direction: column;\r\n gap: 0.15rem;\r\n min-width: 0;\r\n}\r\n\r\n.nexus-stat-list__label {\r\n font-size: 0.9375rem;\r\n font-weight: 500;\r\n color: var(--nexus-stat-text);\r\n}\r\n\r\n.nexus-stat-list__description {\r\n font-size: 0.8125rem;\r\n color: var(--nexus-stat-muted);\r\n line-height: 1.35;\r\n}\r\n\r\n.nexus-stat-list__value {\r\n flex-shrink: 0;\r\n font-size: 0.875rem;\r\n font-weight: 600;\r\n color: var(--nexus-stat-accent);\r\n background: rgba(59, 130, 246, 0.12);\r\n padding: 0.25rem 0.625rem;\r\n border-radius: 6px;\r\n}\r\n\r\n.nexus-stat-list__empty {\r\n margin: 0;\r\n padding: 1.5rem;\r\n text-align: center;\r\n font-size: 0.875rem;\r\n color: var(--nexus-stat-muted);\r\n background: var(--nexus-stat-surface);\r\n border-radius: 8px;\r\n border: 1px dashed var(--nexus-stat-border);\r\n}\r\n"],"mappings":";AAAA,CAAC;AACC,mBAAiB;AACjB,wBAAsB;AACtB,uBAAqB;AACrB,uBAAqB;AACrB,qBAAmB;AACnB,sBAAoB;AAEpB;AAAA,IAAa,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE,UAAU;AAAA,IAAE;AACnD,cAAY,IAAI;AAChB,UAAQ,IAAI,MAAM,IAAI;AACtB,iBAAe;AACf,WAAS,QAAQ;AACjB,SAAO,IAAI;AACX,aAAW;AACb;AAEA,CAAC;AACC,UAAQ,EAAE,EAAE;AACZ,aAAW;AACX,eAAa;AACb,kBAAgB;AAChB,SAAO,IAAI;AACX,iBAAe,IAAI,MAAM,IAAI;AAC7B,kBAAgB;AAChB,WAAS;AACX;AAEA,CAAC;AACC,cAAY;AACZ,UAAQ;AACR,WAAS;AACT,WAAS;AACT,kBAAgB;AAChB,OAAK;AACP;AAEA,CAAC;AACC,WAAS;AACT,eAAa;AACb,mBAAiB;AACjB,OAAK;AACL,WAAS,QAAQ;AACjB,cAAY,IAAI;AAChB,iBAAe;AACf,UAAQ,IAAI,MAAM;AAClB,cAAY,aAAa,MAAM;AACjC;AAEA,CAZC,qBAYqB;AACpB,gBAAc,IAAI;AACpB;AAEA,CAAC;AACC,WAAS;AACT,kBAAgB;AAChB,OAAK;AACL,aAAW;AACb;AAEA,CAAC;AACC,aAAW;AACX,eAAa;AACb,SAAO,IAAI;AACb;AAEA,CAAC;AACC,aAAW;AACX,SAAO,IAAI;AACX,eAAa;AACf;AAEA,CAAC;AACC,eAAa;AACb,aAAW;AACX,eAAa;AACb,SAAO,IAAI;AACX,cAAY,KAAK,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE;AAC/B,WAAS,QAAQ;AACjB,iBAAe;AACjB;AAEA,CAAC;AACC,UAAQ;AACR,WAAS;AACT,cAAY;AACZ,aAAW;AACX,SAAO,IAAI;AACX,cAAY,IAAI;AAChB,iBAAe;AACf,UAAQ,IAAI,OAAO,IAAI;AACzB;","names":[]}
|
package/dist/server.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { b as NexusStatListProps } from './nexus-list-DV45tcM0.js';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Server component — renders a read-only list of labeled items with optional values.
|
|
6
|
-
*/
|
|
7
|
-
declare function NexusStatList({ title, items, emptyMessage, className, }: NexusStatListProps): react_jsx_runtime.JSX.Element;
|
|
8
|
-
|
|
9
|
-
export { NexusStatList };
|
package/dist/server.js
DELETED
package/dist/server.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
package/src/client/index.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { NexusSelectableList } from "./nexus-selectable-list";
|
|
@@ -1,131 +0,0 @@
|
|
|
1
|
-
.nexus-selectable-list {
|
|
2
|
-
--nexus-select-bg: #12101a;
|
|
3
|
-
--nexus-select-surface: #1e1b28;
|
|
4
|
-
--nexus-select-border: #3d3654;
|
|
5
|
-
--nexus-select-accent: #a855f7;
|
|
6
|
-
--nexus-select-accent-dim: rgba(168, 85, 247, 0.15);
|
|
7
|
-
--nexus-select-text: #f4f0fa;
|
|
8
|
-
--nexus-select-muted: #9d94b0;
|
|
9
|
-
|
|
10
|
-
font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
|
|
11
|
-
background: var(--nexus-select-bg);
|
|
12
|
-
border: 1px solid var(--nexus-select-border);
|
|
13
|
-
border-radius: 12px;
|
|
14
|
-
padding: 1.25rem 1.5rem;
|
|
15
|
-
color: var(--nexus-select-text);
|
|
16
|
-
max-width: 32rem;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.nexus-selectable-list__header {
|
|
20
|
-
margin-bottom: 1rem;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
.nexus-selectable-list__title {
|
|
24
|
-
margin: 0 0 0.75rem;
|
|
25
|
-
font-size: 1.125rem;
|
|
26
|
-
font-weight: 600;
|
|
27
|
-
letter-spacing: -0.02em;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.nexus-selectable-list__search {
|
|
31
|
-
width: 100%;
|
|
32
|
-
box-sizing: border-box;
|
|
33
|
-
padding: 0.625rem 0.875rem;
|
|
34
|
-
font-size: 0.875rem;
|
|
35
|
-
color: var(--nexus-select-text);
|
|
36
|
-
background: var(--nexus-select-surface);
|
|
37
|
-
border: 1px solid var(--nexus-select-border);
|
|
38
|
-
border-radius: 8px;
|
|
39
|
-
outline: none;
|
|
40
|
-
transition: border-color 0.15s ease, box-shadow 0.15s ease;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.nexus-selectable-list__search::placeholder {
|
|
44
|
-
color: var(--nexus-select-muted);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
.nexus-selectable-list__search:focus {
|
|
48
|
-
border-color: var(--nexus-select-accent);
|
|
49
|
-
box-shadow: 0 0 0 3px var(--nexus-select-accent-dim);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.nexus-selectable-list__meta {
|
|
53
|
-
margin: 0.5rem 0 0;
|
|
54
|
-
font-size: 0.75rem;
|
|
55
|
-
color: var(--nexus-select-muted);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.nexus-selectable-list__list {
|
|
59
|
-
list-style: none;
|
|
60
|
-
margin: 0;
|
|
61
|
-
padding: 0;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-direction: column;
|
|
64
|
-
gap: 0.375rem;
|
|
65
|
-
max-height: 16rem;
|
|
66
|
-
overflow-y: auto;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.nexus-selectable-list__item {
|
|
70
|
-
display: block;
|
|
71
|
-
width: 100%;
|
|
72
|
-
text-align: left;
|
|
73
|
-
padding: 0.75rem 1rem;
|
|
74
|
-
font: inherit;
|
|
75
|
-
color: inherit;
|
|
76
|
-
background: var(--nexus-select-surface);
|
|
77
|
-
border: 1px solid transparent;
|
|
78
|
-
border-radius: 8px;
|
|
79
|
-
cursor: pointer;
|
|
80
|
-
transition:
|
|
81
|
-
background 0.15s ease,
|
|
82
|
-
border-color 0.15s ease;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.nexus-selectable-list__item:hover {
|
|
86
|
-
border-color: var(--nexus-select-border);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
.nexus-selectable-list__item--selected {
|
|
90
|
-
background: var(--nexus-select-accent-dim);
|
|
91
|
-
border-color: var(--nexus-select-accent);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
.nexus-selectable-list__label {
|
|
95
|
-
display: block;
|
|
96
|
-
font-size: 0.9375rem;
|
|
97
|
-
font-weight: 500;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.nexus-selectable-list__description {
|
|
101
|
-
display: block;
|
|
102
|
-
margin-top: 0.2rem;
|
|
103
|
-
font-size: 0.8125rem;
|
|
104
|
-
color: var(--nexus-select-muted);
|
|
105
|
-
line-height: 1.35;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.nexus-selectable-list__empty {
|
|
109
|
-
margin: 0;
|
|
110
|
-
padding: 1.25rem;
|
|
111
|
-
text-align: center;
|
|
112
|
-
font-size: 0.875rem;
|
|
113
|
-
color: var(--nexus-select-muted);
|
|
114
|
-
background: var(--nexus-select-surface);
|
|
115
|
-
border-radius: 8px;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
.nexus-selectable-list__detail {
|
|
119
|
-
margin-top: 1rem;
|
|
120
|
-
padding: 0.875rem 1rem;
|
|
121
|
-
background: var(--nexus-select-surface);
|
|
122
|
-
border-left: 3px solid var(--nexus-select-accent);
|
|
123
|
-
border-radius: 0 8px 8px 0;
|
|
124
|
-
font-size: 0.8125rem;
|
|
125
|
-
line-height: 1.5;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.nexus-selectable-list__detail strong {
|
|
129
|
-
color: var(--nexus-select-accent);
|
|
130
|
-
font-weight: 600;
|
|
131
|
-
}
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
|
|
3
|
-
import { useMemo, useState } from "react";
|
|
4
|
-
import type { NexusSelectableListProps } from "../interfaces/nexus-list";
|
|
5
|
-
import "./nexus-selectable-list.css";
|
|
6
|
-
|
|
7
|
-
/**
|
|
8
|
-
* Client component — filterable list with selection and detail preview.
|
|
9
|
-
*/
|
|
10
|
-
export function NexusSelectableList({
|
|
11
|
-
title,
|
|
12
|
-
items,
|
|
13
|
-
placeholder = "Filter items…",
|
|
14
|
-
emptyMessage = "No matching items.",
|
|
15
|
-
className,
|
|
16
|
-
}: NexusSelectableListProps) {
|
|
17
|
-
const [query, setQuery] = useState("");
|
|
18
|
-
const [selectedId, setSelectedId] = useState<string | null>(
|
|
19
|
-
items[0]?.id ?? null,
|
|
20
|
-
);
|
|
21
|
-
|
|
22
|
-
const filtered = useMemo(() => {
|
|
23
|
-
const q = query.trim().toLowerCase();
|
|
24
|
-
if (!q) return items;
|
|
25
|
-
return items.filter(
|
|
26
|
-
(item) =>
|
|
27
|
-
item.label.toLowerCase().includes(q) ||
|
|
28
|
-
item.description?.toLowerCase().includes(q),
|
|
29
|
-
);
|
|
30
|
-
}, [items, query]);
|
|
31
|
-
|
|
32
|
-
const selected = items.find((item) => item.id === selectedId) ?? null;
|
|
33
|
-
const rootClass = className
|
|
34
|
-
? `nexus-selectable-list ${className}`
|
|
35
|
-
: "nexus-selectable-list";
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<section
|
|
39
|
-
className={rootClass}
|
|
40
|
-
aria-labelledby="nexus-selectable-list-title"
|
|
41
|
-
>
|
|
42
|
-
<div className="nexus-selectable-list__header">
|
|
43
|
-
<h2 id="nexus-selectable-list-title" className="nexus-selectable-list__title">
|
|
44
|
-
{title}
|
|
45
|
-
</h2>
|
|
46
|
-
<input
|
|
47
|
-
type="search"
|
|
48
|
-
className="nexus-selectable-list__search"
|
|
49
|
-
placeholder={placeholder}
|
|
50
|
-
value={query}
|
|
51
|
-
onChange={(e) => setQuery(e.target.value)}
|
|
52
|
-
aria-label={`Filter ${title}`}
|
|
53
|
-
/>
|
|
54
|
-
<p className="nexus-selectable-list__meta">
|
|
55
|
-
Showing {filtered.length} of {items.length}
|
|
56
|
-
</p>
|
|
57
|
-
</div>
|
|
58
|
-
|
|
59
|
-
{filtered.length === 0 ? (
|
|
60
|
-
<p className="nexus-selectable-list__empty">{emptyMessage}</p>
|
|
61
|
-
) : (
|
|
62
|
-
<ul
|
|
63
|
-
className="nexus-selectable-list__list"
|
|
64
|
-
role="listbox"
|
|
65
|
-
aria-label={title}
|
|
66
|
-
>
|
|
67
|
-
{filtered.map((item) => {
|
|
68
|
-
const isSelected = item.id === selectedId;
|
|
69
|
-
const itemClass = isSelected
|
|
70
|
-
? "nexus-selectable-list__item nexus-selectable-list__item--selected"
|
|
71
|
-
: "nexus-selectable-list__item";
|
|
72
|
-
|
|
73
|
-
return (
|
|
74
|
-
<li key={item.id} role="presentation">
|
|
75
|
-
<button
|
|
76
|
-
type="button"
|
|
77
|
-
role="option"
|
|
78
|
-
aria-selected={isSelected}
|
|
79
|
-
className={itemClass}
|
|
80
|
-
onClick={() => setSelectedId(item.id)}
|
|
81
|
-
>
|
|
82
|
-
<span className="nexus-selectable-list__label">
|
|
83
|
-
{item.label}
|
|
84
|
-
</span>
|
|
85
|
-
{item.description ? (
|
|
86
|
-
<span className="nexus-selectable-list__description">
|
|
87
|
-
{item.description}
|
|
88
|
-
</span>
|
|
89
|
-
) : null}
|
|
90
|
-
</button>
|
|
91
|
-
</li>
|
|
92
|
-
);
|
|
93
|
-
})}
|
|
94
|
-
</ul>
|
|
95
|
-
)}
|
|
96
|
-
|
|
97
|
-
{selected ? (
|
|
98
|
-
<div className="nexus-selectable-list__detail">
|
|
99
|
-
<strong>{selected.label}</strong>
|
|
100
|
-
{selected.description ? <> — {selected.description}</> : null}
|
|
101
|
-
{selected.value !== undefined && selected.value !== null ? (
|
|
102
|
-
<>
|
|
103
|
-
<br />
|
|
104
|
-
Value: <strong>{selected.value}</strong>
|
|
105
|
-
</>
|
|
106
|
-
) : null}
|
|
107
|
-
</div>
|
|
108
|
-
) : null}
|
|
109
|
-
</section>
|
|
110
|
-
);
|
|
111
|
-
}
|
package/src/client.ts
DELETED
package/src/interface.ts
DELETED
package/src/interfaces/index.ts
DELETED