@unkn0wndo3s/nova-design-system 0.1.0 → 0.2.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.
Files changed (143) hide show
  1. package/LICENSE.md +46 -46
  2. package/README.md +159 -165
  3. package/package.json +28 -28
  4. package/src/components/Button/_button.scss +36 -36
  5. package/src/components/Button/button.astro +14 -14
  6. package/src/components/Icons/Arrow2/Arrow2.astro +45 -45
  7. package/src/components/Icons/Arrow2/svgs/arrow2-16-down.svg +3 -3
  8. package/src/components/Icons/Arrow2/svgs/arrow2-16-left.svg +3 -3
  9. package/src/components/Icons/Arrow2/svgs/arrow2-16-right.svg +3 -3
  10. package/src/components/Icons/Arrow2/svgs/arrow2-16-up.svg +3 -3
  11. package/src/components/Icons/Arrow2/svgs/arrow2-24-down.svg +3 -3
  12. package/src/components/Icons/Arrow2/svgs/arrow2-24-left.svg +3 -3
  13. package/src/components/Icons/Arrow2/svgs/arrow2-24-right.svg +3 -3
  14. package/src/components/Icons/Arrow2/svgs/arrow2-24-up.svg +3 -3
  15. package/src/components/Icons/Arrow2/svgs/arrow2-32-down.svg +3 -3
  16. package/src/components/Icons/Arrow2/svgs/arrow2-32-left.svg +3 -3
  17. package/src/components/Icons/Arrow2/svgs/arrow2-32-right.svg +3 -3
  18. package/src/components/Icons/Arrow2/svgs/arrow2-32-up.svg +3 -3
  19. package/src/components/Icons/bin/bin.astro +26 -26
  20. package/src/components/Icons/bin/svgs/bin-16.svg +3 -3
  21. package/src/components/Icons/bin/svgs/bin-24.svg +3 -3
  22. package/src/components/Icons/bin/svgs/bin-32.svg +3 -3
  23. package/src/components/Icons/burger/burger.astro +26 -26
  24. package/src/components/Icons/burger/svgs/burger-16.svg +3 -3
  25. package/src/components/Icons/burger/svgs/burger-24.svg +3 -3
  26. package/src/components/Icons/burger/svgs/burger-32.svg +3 -3
  27. package/src/components/Icons/calendar/calendar.astro +26 -26
  28. package/src/components/Icons/calendar/svgs/calendar-16.svg +3 -3
  29. package/src/components/Icons/calendar/svgs/calendar-24.svg +3 -3
  30. package/src/components/Icons/calendar/svgs/calendar-32.svg +3 -3
  31. package/src/components/Icons/check/check.astro +26 -26
  32. package/src/components/Icons/check/svgs/check-16.svg +3 -3
  33. package/src/components/Icons/check/svgs/check-24.svg +3 -3
  34. package/src/components/Icons/check/svgs/check-32.svg +3 -3
  35. package/src/components/Icons/close/close.astro +27 -27
  36. package/src/components/Icons/close/svgs/close-16.svg +3 -3
  37. package/src/components/Icons/close/svgs/close-24.svg +3 -3
  38. package/src/components/Icons/close/svgs/close-32.svg +3 -3
  39. package/src/components/Icons/code/code.astro +26 -26
  40. package/src/components/Icons/code/svgs/code-16.svg +3 -3
  41. package/src/components/Icons/code/svgs/code-24.svg +3 -3
  42. package/src/components/Icons/code/svgs/code-32.svg +3 -3
  43. package/src/components/Icons/cube/cube.astro +26 -26
  44. package/src/components/Icons/cube/svgs/cube-16.svg +3 -3
  45. package/src/components/Icons/cube/svgs/cube-24.svg +3 -3
  46. package/src/components/Icons/cube/svgs/cube-32.svg +3 -3
  47. package/src/components/Icons/download/download.astro +26 -26
  48. package/src/components/Icons/download/svgs/download-16.svg +5 -5
  49. package/src/components/Icons/download/svgs/download-24.svg +4 -4
  50. package/src/components/Icons/download/svgs/download-32.svg +4 -4
  51. package/src/components/Icons/filter/filter.astro +26 -26
  52. package/src/components/Icons/filter/svgs/filter-16.svg +3 -3
  53. package/src/components/Icons/filter/svgs/filter-24.svg +3 -3
  54. package/src/components/Icons/filter/svgs/filter-32.svg +3 -3
  55. package/src/components/Icons/help/help.astro +26 -26
  56. package/src/components/Icons/help/svgs/help-16.svg +5 -5
  57. package/src/components/Icons/help/svgs/help-24.svg +5 -5
  58. package/src/components/Icons/help/svgs/help-32.svg +3 -3
  59. package/src/components/Icons/home/home.astro +26 -26
  60. package/src/components/Icons/home/svgs/home-16.svg +3 -3
  61. package/src/components/Icons/home/svgs/home-24.svg +3 -3
  62. package/src/components/Icons/home/svgs/home-32.svg +3 -3
  63. package/src/components/Icons/index.ts +25 -25
  64. package/src/components/Icons/link/link.astro +26 -26
  65. package/src/components/Icons/link/svgs/link-16.svg +3 -3
  66. package/src/components/Icons/link/svgs/link-24.svg +3 -3
  67. package/src/components/Icons/link/svgs/link-32.svg +3 -3
  68. package/src/components/Icons/minus/minus.astro +26 -26
  69. package/src/components/Icons/minus/svgs/minus-16.svg +3 -3
  70. package/src/components/Icons/minus/svgs/minus-24.svg +3 -3
  71. package/src/components/Icons/minus/svgs/minus-32.svg +3 -3
  72. package/src/components/Icons/more/more.astro +26 -26
  73. package/src/components/Icons/more/svgs/more-16.svg +3 -3
  74. package/src/components/Icons/more/svgs/more-24.svg +3 -3
  75. package/src/components/Icons/more/svgs/more-32.svg +3 -3
  76. package/src/components/Icons/overview/overview.astro +26 -26
  77. package/src/components/Icons/overview/svgs/overview-16.svg +3 -3
  78. package/src/components/Icons/overview/svgs/overview-24.svg +3 -3
  79. package/src/components/Icons/overview/svgs/overview-32.svg +3 -3
  80. package/src/components/Icons/plus/plus.astro +26 -26
  81. package/src/components/Icons/plus/svgs/plus-16.svg +3 -3
  82. package/src/components/Icons/plus/svgs/plus-24.svg +3 -3
  83. package/src/components/Icons/plus/svgs/plus-32.svg +3 -3
  84. package/src/components/Icons/profile/profile.astro +27 -27
  85. package/src/components/Icons/profile/svgs/profile-16.svg +3 -3
  86. package/src/components/Icons/profile/svgs/profile-24.svg +3 -3
  87. package/src/components/Icons/profile/svgs/profile-32.svg +3 -3
  88. package/src/components/Icons/search/search.astro +27 -27
  89. package/src/components/Icons/search/svgs/search-16.svg +3 -3
  90. package/src/components/Icons/search/svgs/search-24.svg +3 -3
  91. package/src/components/Icons/search/svgs/search-32.svg +3 -3
  92. package/src/components/Icons/settings/settings.astro +26 -26
  93. package/src/components/Icons/settings/svgs/settings-16.svg +3 -3
  94. package/src/components/Icons/settings/svgs/settings-24.svg +3 -3
  95. package/src/components/Icons/settings/svgs/settings-32.svg +3 -3
  96. package/src/components/Icons/share/share.astro +27 -27
  97. package/src/components/Icons/share/svgs/share-16.svg +3 -3
  98. package/src/components/Icons/share/svgs/share-24.svg +3 -3
  99. package/src/components/Icons/share/svgs/share-32.svg +3 -3
  100. package/src/components/Icons/shield/shield.astro +26 -26
  101. package/src/components/Icons/shield/svgs/shield-16.svg +3 -3
  102. package/src/components/Icons/shield/svgs/shield-24.svg +3 -3
  103. package/src/components/Icons/shield/svgs/shield-32.svg +3 -3
  104. package/src/components/Icons/sort/sort.astro +38 -38
  105. package/src/components/Icons/sort/svgs/sort-16-ascend.svg +4 -4
  106. package/src/components/Icons/sort/svgs/sort-16-default.svg +3 -3
  107. package/src/components/Icons/sort/svgs/sort-16-descend.svg +4 -4
  108. package/src/components/Icons/sort/svgs/sort-24-ascend.svg +4 -4
  109. package/src/components/Icons/sort/svgs/sort-24-default.svg +3 -3
  110. package/src/components/Icons/sort/svgs/sort-24-descend.svg +4 -4
  111. package/src/components/Icons/sort/svgs/sort-32-ascend.svg +4 -4
  112. package/src/components/Icons/sort/svgs/sort-32-default.svg +3 -3
  113. package/src/components/Icons/sort/svgs/sort-32-descend.svg +4 -4
  114. package/src/components/Icons/stats/stats.astro +26 -26
  115. package/src/components/Icons/stats/svgs/stats-16.svg +3 -3
  116. package/src/components/Icons/stats/svgs/stats-24.svg +3 -3
  117. package/src/components/Icons/stats/svgs/stats-32.svg +3 -3
  118. package/src/components/Icons/upload/svgs/upload-16.svg +3 -3
  119. package/src/components/Icons/upload/svgs/upload-24.svg +3 -3
  120. package/src/components/Icons/upload/svgs/upload-32.svg +3 -3
  121. package/src/components/Icons/upload/upload.astro +27 -27
  122. package/src/components/Link/_link.scss +29 -29
  123. package/src/components/Link/link.astro +15 -15
  124. package/src/components/ListItem/_listItem.scss +69 -20
  125. package/src/components/ListItem/listItem.astro +14 -14
  126. package/src/components/ListItem/listItemSubtitle.astro +6 -6
  127. package/src/components/ListItem/listItemTitle.astro +6 -6
  128. package/src/components/Notifications/_notification.scss +61 -61
  129. package/src/components/Notifications/notification.astro +22 -22
  130. package/src/components/Tabs/_tab.scss +32 -32
  131. package/src/components/Tabs/tab.astro +53 -53
  132. package/src/components/Tabs/tabContent.astro +20 -20
  133. package/src/components/Tabs/tabItem.astro +40 -40
  134. package/src/components/Toggle/_toggle.scss +33 -33
  135. package/src/components/Toggle/toggle.astro +61 -61
  136. package/src/components/index.ts +13 -10
  137. package/src/index.ts +1 -1
  138. package/src/layouts/Layout.astro +29 -29
  139. package/src/pages/index.astro +338 -338
  140. package/src/styles/index.scss +10 -10
  141. package/src/styles/tokens/_colors.scss +69 -69
  142. package/src/styles/tokens/_spacing.scss +32 -32
  143. package/src/styles/tokens/_typography.scss +50 -50
@@ -1,338 +1,338 @@
1
- ---
2
- import Layout from '../layouts/Layout.astro';
3
- import Notification from '../components/Notifications/notification.astro';
4
- import Toggle from '../components/Toggle/toggle.astro';
5
- import Tab from '../components/Tabs/tab.astro';
6
- import TabItem from '../components/Tabs/tabItem.astro';
7
- import TabContent from '../components/Tabs/tabContent.astro';
8
- import Button from '../components/Button/button.astro';
9
- import Link from '../components/Link/link.astro';
10
- import ListItem from '../components/ListItem/listItem.astro';
11
- import ListItemTitle from '../components/ListItem/listItemTitle.astro';
12
- import ListItemSubtitle from '../components/ListItem/listItemSubtitle.astro';
13
- import {
14
- Arrow2Icon, BinIcon, BurgerIcon, CalendarIcon, CheckIcon, CloseIcon,
15
- CodeIcon, CubeIcon, DownloadIcon, FilterIcon, HelpIcon, HomeIcon,
16
- LinkIcon, MinusIcon, MoreIcon, OverviewIcon, PlusIcon, ProfileIcon,
17
- SearchIcon, SettingsIcon, ShareIcon, ShieldIcon, SortIcon, StatsIcon,
18
- UploadIcon,
19
- } from '../components/Icons/index.ts';
20
-
21
- const initialChecked = true;
22
- ---
23
-
24
- <Layout>
25
- <main>
26
- <h1>Nova Design System</h1>
27
- <section>
28
- <h2>List Item</h2>
29
- <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
30
- <ListItem>
31
- <ListItemTitle>List Item Title</ListItemTitle>
32
- <ListItemSubtitle>List Item Subtitle</ListItemSubtitle>
33
- </ListItem>
34
- </div>
35
- </section>
36
- <section>
37
- <h2>Link</h2>
38
- <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
39
- <Link url="https://example.com">Example Link</Link>
40
- <Link url="https://example.com" blank={true}>Example Link (opens in new tab)</Link>
41
- </div>
42
- </section>
43
- <section>
44
- <h2>Button</h2>
45
- <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
46
- <Button type="primary">Primary Button</Button>
47
- <Button type="secondary">Secondary Button</Button>
48
- <Button type="primary" disabled>disabled</Button>
49
- </div>
50
- </section>
51
- <section>
52
- <h2>Tabs</h2>
53
- <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
54
- <Tab id="my-tab" defaultActive="images">
55
- <TabItem id="images">images</TabItem>
56
- <TabItem id="videos">Videos</TabItem>
57
- <TabItem id="docs">Documents</TabItem>
58
- </Tab>
59
- <TabContent id="my-tab" itemId="images">
60
- <p>my images</p>
61
- </TabContent>
62
-
63
- <TabContent id="my-tab" itemId="videos">
64
- <p>Video player here</p>
65
- </TabContent>
66
-
67
- <TabContent id="my-tab" itemId="docs">
68
- <p>Document list here</p>
69
- </TabContent>
70
- </div>
71
- </section>
72
- <section>
73
- <h2>Toggle</h2>
74
- <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
75
- <Toggle data-checked={initialChecked} data-name="notifications" id="my-toggle" />
76
- <p id="toggle-state">State: {initialChecked ? 'Checked' : 'Unchecked'}</p>
77
- </div>
78
- </section>
79
- <section>
80
- <h2>Notifications — Error / Warning / Success / Info</h2>
81
- <div style="max-width: 400px; display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
82
- <Notification type="error">
83
- An error occurred during the operation. Please try again.
84
- </Notification>
85
- <Notification type="success">
86
- The operation was completed successfully.
87
- </Notification>
88
- <Notification type="warning">
89
- A warning occurred during the operation. Please check the details.
90
- </Notification>
91
- <Notification type="info">
92
- Information about the operation.
93
- </Notification>
94
- </div>
95
- </section>
96
- <section>
97
- <h2>Icon — 16 / 24 / 32</h2>
98
- <div class="icon-grid">
99
- <div class="icon-row">
100
- <Arrow2Icon size={16} orientation="up" />
101
- <Arrow2Icon size={16} orientation="right" />
102
- <Arrow2Icon size={16} orientation="down" />
103
- <Arrow2Icon size={16} orientation="left" />
104
- </div>
105
- <div class="icon-row">
106
- <Arrow2Icon size={24} orientation="up" />
107
- <Arrow2Icon size={24} orientation="right" />
108
- <Arrow2Icon size={24} orientation="down" />
109
- <Arrow2Icon size={24} orientation="left" />
110
- </div>
111
- <div class="icon-row">
112
- <Arrow2Icon size={32} orientation="up" />
113
- <Arrow2Icon size={32} orientation="right" />
114
- <Arrow2Icon size={32} orientation="down" />
115
- <Arrow2Icon size={32} orientation="left" />
116
- </div>
117
- <div class="icon-row">
118
- <ProfileIcon size={16} />
119
- <ProfileIcon size={24} />
120
- <ProfileIcon size={32} />
121
- </div>
122
- <div class="icon-row">
123
- <ShareIcon size={16} />
124
- <ShareIcon size={24} />
125
- <ShareIcon size={32} />
126
- </div>
127
- <div class="icon-row">
128
- <SearchIcon size={16} />
129
- <SearchIcon size={24} />
130
- <SearchIcon size={32} />
131
- </div>
132
- <div class="icon-row">
133
- <CloseIcon size={16} />
134
- <CloseIcon size={24} />
135
- <CloseIcon size={32} />
136
- </div>
137
- <div class="icon-row">
138
- <UploadIcon size={16} />
139
- <UploadIcon size={24} />
140
- <UploadIcon size={32} />
141
- </div>
142
- <div class="icon-row">
143
- <BinIcon size={16} />
144
- <BinIcon size={24} />
145
- <BinIcon size={32} />
146
- </div>
147
- <div class="icon-row">
148
- <BurgerIcon size={16} />
149
- <BurgerIcon size={24} />
150
- <BurgerIcon size={32} />
151
- </div>
152
- <div class="icon-row">
153
- <CalendarIcon size={16} />
154
- <CalendarIcon size={24} />
155
- <CalendarIcon size={32} />
156
- </div>
157
- <div class="icon-row">
158
- <CheckIcon size={16} />
159
- <CheckIcon size={24} />
160
- <CheckIcon size={32} />
161
- </div>
162
- <div class="icon-row">
163
- <CodeIcon size={16} />
164
- <CodeIcon size={24} />
165
- <CodeIcon size={32} />
166
- </div>
167
- <div class="icon-row">
168
- <CubeIcon size={16} />
169
- <CubeIcon size={24} />
170
- <CubeIcon size={32} />
171
- </div>
172
- <div class="icon-row">
173
- <DownloadIcon size={16} />
174
- <DownloadIcon size={24} />
175
- <DownloadIcon size={32} />
176
- </div>
177
- <div class="icon-row">
178
- <FilterIcon size={16} />
179
- <FilterIcon size={24} />
180
- <FilterIcon size={32} />
181
- </div>
182
- <div class="icon-row">
183
- <HelpIcon size={16} />
184
- <HelpIcon size={24} />
185
- <HelpIcon size={32} />
186
- </div>
187
- <div class="icon-row">
188
- <HomeIcon size={16} />
189
- <HomeIcon size={24} />
190
- <HomeIcon size={32} />
191
- </div>
192
- <div class="icon-row">
193
- <LinkIcon size={16} />
194
- <LinkIcon size={24} />
195
- <LinkIcon size={32} />
196
- </div>
197
- <div class="icon-row">
198
- <MinusIcon size={16} />
199
- <MinusIcon size={24} />
200
- <MinusIcon size={32} />
201
- </div>
202
- <div class="icon-row">
203
- <MoreIcon size={16} />
204
- <MoreIcon size={24} />
205
- <MoreIcon size={32} />
206
- </div>
207
- <div class="icon-row">
208
- <OverviewIcon size={16} />
209
- <OverviewIcon size={24} />
210
- <OverviewIcon size={32} />
211
- </div>
212
- <div class="icon-row">
213
- <PlusIcon size={16} />
214
- <PlusIcon size={24} />
215
- <PlusIcon size={32} />
216
- </div>
217
- <div class="icon-row">
218
- <SettingsIcon size={16} />
219
- <SettingsIcon size={24} />
220
- <SettingsIcon size={32} />
221
- </div>
222
- <div class="icon-row">
223
- <ShieldIcon size={16} />
224
- <ShieldIcon size={24} />
225
- <ShieldIcon size={32} />
226
- </div>
227
- <div class="icon-row">
228
- <SortIcon size={16} variant="default" />
229
- <SortIcon size={16} variant="ascend" />
230
- <SortIcon size={16} variant="descend" />
231
- <SortIcon size={24} variant="default" />
232
- <SortIcon size={24} variant="ascend" />
233
- <SortIcon size={24} variant="descend" />
234
- <SortIcon size={32} variant="default" />
235
- <SortIcon size={32} variant="ascend" />
236
- <SortIcon size={32} variant="descend" />
237
- </div>
238
- <div class="icon-row">
239
- <StatsIcon size={16} />
240
- <StatsIcon size={24} />
241
- <StatsIcon size={32} />
242
- </div>
243
- </div>
244
- </section>
245
- </main>
246
- </Layout>
247
-
248
- <script>
249
- const toggle = document.getElementById('my-toggle') as any;
250
- const stateLabel = document.getElementById('toggle-state');
251
-
252
- // Défaut: thème sombre
253
- if (!document.documentElement.hasAttribute('data-theme')) {
254
- document.documentElement.setAttribute('data-theme', 'dark');
255
- }
256
- if (stateLabel) stateLabel.textContent = 'Thème : Sombre';
257
-
258
- toggle?.addEventListener('change', (e: CustomEvent) => {
259
- const { checked } = e.detail;
260
-
261
- if (checked) {
262
- document.documentElement.setAttribute('data-theme', 'dark');
263
- if (stateLabel) stateLabel.textContent = 'Thème : Sombre';
264
- } else {
265
- document.documentElement.setAttribute('data-theme', 'light');
266
- if (stateLabel) stateLabel.textContent = 'Thème : Clair';
267
- }
268
- });
269
- </script>
270
-
271
- <style lang="scss" scoped>
272
-
273
- body {
274
- background-color: var(--nds-background);
275
- color: var(--nds-text);
276
- }
277
-
278
- main {
279
- max-width: 900px;
280
- margin: 0 auto;
281
- padding: var(--nds-spacing-xl) var(--nds-spacing-md);
282
- }
283
-
284
- h1 {
285
- font-size: var(--nds-type-h1-size);
286
- font-weight: var(--nds-type-h1-weight);
287
- line-height: var(--nds-type-h1-line-height);
288
- letter-spacing: var(--nds-type-h1-letter-spacing);
289
- margin-bottom: var(--nds-spacing-xl);
290
- }
291
-
292
- h2 {
293
- font-size: var(--nds-type-h2-size);
294
- font-weight: var(--nds-type-h2-weight);
295
- line-height: var(--nds-type-h2-line-height);
296
- letter-spacing: var(--nds-type-h2-letter-spacing);
297
- color: var(--nds-text-muted);
298
- margin-bottom: var(--nds-spacing-md);
299
- }
300
-
301
- section {
302
- margin-bottom: var(--nds-spacing-2xl);
303
- }
304
-
305
- .row {
306
- display: flex;
307
- flex-wrap: wrap;
308
- align-items: center;
309
- gap: var(--nds-spacing-sm);
310
- }
311
-
312
- .icon-grid {
313
- display: flex;
314
- flex-direction: column;
315
- gap: var(--nds-spacing-xs);
316
- }
317
-
318
- .icon-row {
319
- display: flex;
320
- align-items: center;
321
- gap: var(--nds-spacing-lg);
322
- color: var(--nds-text);
323
- }
324
-
325
- .icon-name {
326
- font-size: var(--nds-type-body-small-size);
327
- color: var(--nds-text-muted);
328
- width: 100px;
329
- flex-shrink: 0;
330
- }
331
-
332
- .icon-sizes {
333
- display: flex;
334
- align-items: center;
335
- gap: var(--nds-spacing-md);
336
- color: var(--nds-default);
337
- }
338
- </style>
1
+ ---
2
+ import Layout from '../layouts/Layout.astro';
3
+ import Notification from '../components/Notifications/notification.astro';
4
+ import Toggle from '../components/Toggle/toggle.astro';
5
+ import Tab from '../components/Tabs/tab.astro';
6
+ import TabItem from '../components/Tabs/tabItem.astro';
7
+ import TabContent from '../components/Tabs/tabContent.astro';
8
+ import Button from '../components/Button/button.astro';
9
+ import Link from '../components/Link/link.astro';
10
+ import ListItem from '../components/ListItem/listItem.astro';
11
+ import ListItemTitle from '../components/ListItem/listItemTitle.astro';
12
+ import ListItemSubtitle from '../components/ListItem/listItemSubtitle.astro';
13
+ import {
14
+ Arrow2Icon, BinIcon, BurgerIcon, CalendarIcon, CheckIcon, CloseIcon,
15
+ CodeIcon, CubeIcon, DownloadIcon, FilterIcon, HelpIcon, HomeIcon,
16
+ LinkIcon, MinusIcon, MoreIcon, OverviewIcon, PlusIcon, ProfileIcon,
17
+ SearchIcon, SettingsIcon, ShareIcon, ShieldIcon, SortIcon, StatsIcon,
18
+ UploadIcon,
19
+ } from '../components/Icons/index.ts';
20
+
21
+ const initialChecked = true;
22
+ ---
23
+
24
+ <Layout>
25
+ <main>
26
+ <h1>Nova Design System</h1>
27
+ <section>
28
+ <h2>List Item</h2>
29
+ <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
30
+ <ListItem>
31
+ <ListItemTitle>List Item Title</ListItemTitle>
32
+ <ListItemSubtitle>List Item Subtitle</ListItemSubtitle>
33
+ </ListItem>
34
+ </div>
35
+ </section>
36
+ <section>
37
+ <h2>Link</h2>
38
+ <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
39
+ <Link url="https://example.com">Example Link</Link>
40
+ <Link url="https://example.com" blank={true}>Example Link (opens in new tab)</Link>
41
+ </div>
42
+ </section>
43
+ <section>
44
+ <h2>Button</h2>
45
+ <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
46
+ <Button type="primary">Primary Button</Button>
47
+ <Button type="secondary">Secondary Button</Button>
48
+ <Button type="primary" disabled>disabled</Button>
49
+ </div>
50
+ </section>
51
+ <section>
52
+ <h2>Tabs</h2>
53
+ <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
54
+ <Tab id="my-tab" defaultActive="images">
55
+ <TabItem id="images">images</TabItem>
56
+ <TabItem id="videos">Videos</TabItem>
57
+ <TabItem id="docs">Documents</TabItem>
58
+ </Tab>
59
+ <TabContent id="my-tab" itemId="images">
60
+ <p>my images</p>
61
+ </TabContent>
62
+
63
+ <TabContent id="my-tab" itemId="videos">
64
+ <p>Video player here</p>
65
+ </TabContent>
66
+
67
+ <TabContent id="my-tab" itemId="docs">
68
+ <p>Document list here</p>
69
+ </TabContent>
70
+ </div>
71
+ </section>
72
+ <section>
73
+ <h2>Toggle</h2>
74
+ <div style="display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
75
+ <Toggle data-checked={initialChecked} data-name="notifications" id="my-toggle" />
76
+ <p id="toggle-state">State: {initialChecked ? 'Checked' : 'Unchecked'}</p>
77
+ </div>
78
+ </section>
79
+ <section>
80
+ <h2>Notifications — Error / Warning / Success / Info</h2>
81
+ <div style="max-width: 400px; display: flex; flex-direction: column; gap: var(--nds-spacing-md);">
82
+ <Notification type="error">
83
+ An error occurred during the operation. Please try again.
84
+ </Notification>
85
+ <Notification type="success">
86
+ The operation was completed successfully.
87
+ </Notification>
88
+ <Notification type="warning">
89
+ A warning occurred during the operation. Please check the details.
90
+ </Notification>
91
+ <Notification type="info">
92
+ Information about the operation.
93
+ </Notification>
94
+ </div>
95
+ </section>
96
+ <section>
97
+ <h2>Icon — 16 / 24 / 32</h2>
98
+ <div class="icon-grid">
99
+ <div class="icon-row">
100
+ <Arrow2Icon size={16} orientation="up" />
101
+ <Arrow2Icon size={16} orientation="right" />
102
+ <Arrow2Icon size={16} orientation="down" />
103
+ <Arrow2Icon size={16} orientation="left" />
104
+ </div>
105
+ <div class="icon-row">
106
+ <Arrow2Icon size={24} orientation="up" />
107
+ <Arrow2Icon size={24} orientation="right" />
108
+ <Arrow2Icon size={24} orientation="down" />
109
+ <Arrow2Icon size={24} orientation="left" />
110
+ </div>
111
+ <div class="icon-row">
112
+ <Arrow2Icon size={32} orientation="up" />
113
+ <Arrow2Icon size={32} orientation="right" />
114
+ <Arrow2Icon size={32} orientation="down" />
115
+ <Arrow2Icon size={32} orientation="left" />
116
+ </div>
117
+ <div class="icon-row">
118
+ <ProfileIcon size={16} />
119
+ <ProfileIcon size={24} />
120
+ <ProfileIcon size={32} />
121
+ </div>
122
+ <div class="icon-row">
123
+ <ShareIcon size={16} />
124
+ <ShareIcon size={24} />
125
+ <ShareIcon size={32} />
126
+ </div>
127
+ <div class="icon-row">
128
+ <SearchIcon size={16} />
129
+ <SearchIcon size={24} />
130
+ <SearchIcon size={32} />
131
+ </div>
132
+ <div class="icon-row">
133
+ <CloseIcon size={16} />
134
+ <CloseIcon size={24} />
135
+ <CloseIcon size={32} />
136
+ </div>
137
+ <div class="icon-row">
138
+ <UploadIcon size={16} />
139
+ <UploadIcon size={24} />
140
+ <UploadIcon size={32} />
141
+ </div>
142
+ <div class="icon-row">
143
+ <BinIcon size={16} />
144
+ <BinIcon size={24} />
145
+ <BinIcon size={32} />
146
+ </div>
147
+ <div class="icon-row">
148
+ <BurgerIcon size={16} />
149
+ <BurgerIcon size={24} />
150
+ <BurgerIcon size={32} />
151
+ </div>
152
+ <div class="icon-row">
153
+ <CalendarIcon size={16} />
154
+ <CalendarIcon size={24} />
155
+ <CalendarIcon size={32} />
156
+ </div>
157
+ <div class="icon-row">
158
+ <CheckIcon size={16} />
159
+ <CheckIcon size={24} />
160
+ <CheckIcon size={32} />
161
+ </div>
162
+ <div class="icon-row">
163
+ <CodeIcon size={16} />
164
+ <CodeIcon size={24} />
165
+ <CodeIcon size={32} />
166
+ </div>
167
+ <div class="icon-row">
168
+ <CubeIcon size={16} />
169
+ <CubeIcon size={24} />
170
+ <CubeIcon size={32} />
171
+ </div>
172
+ <div class="icon-row">
173
+ <DownloadIcon size={16} />
174
+ <DownloadIcon size={24} />
175
+ <DownloadIcon size={32} />
176
+ </div>
177
+ <div class="icon-row">
178
+ <FilterIcon size={16} />
179
+ <FilterIcon size={24} />
180
+ <FilterIcon size={32} />
181
+ </div>
182
+ <div class="icon-row">
183
+ <HelpIcon size={16} />
184
+ <HelpIcon size={24} />
185
+ <HelpIcon size={32} />
186
+ </div>
187
+ <div class="icon-row">
188
+ <HomeIcon size={16} />
189
+ <HomeIcon size={24} />
190
+ <HomeIcon size={32} />
191
+ </div>
192
+ <div class="icon-row">
193
+ <LinkIcon size={16} />
194
+ <LinkIcon size={24} />
195
+ <LinkIcon size={32} />
196
+ </div>
197
+ <div class="icon-row">
198
+ <MinusIcon size={16} />
199
+ <MinusIcon size={24} />
200
+ <MinusIcon size={32} />
201
+ </div>
202
+ <div class="icon-row">
203
+ <MoreIcon size={16} />
204
+ <MoreIcon size={24} />
205
+ <MoreIcon size={32} />
206
+ </div>
207
+ <div class="icon-row">
208
+ <OverviewIcon size={16} />
209
+ <OverviewIcon size={24} />
210
+ <OverviewIcon size={32} />
211
+ </div>
212
+ <div class="icon-row">
213
+ <PlusIcon size={16} />
214
+ <PlusIcon size={24} />
215
+ <PlusIcon size={32} />
216
+ </div>
217
+ <div class="icon-row">
218
+ <SettingsIcon size={16} />
219
+ <SettingsIcon size={24} />
220
+ <SettingsIcon size={32} />
221
+ </div>
222
+ <div class="icon-row">
223
+ <ShieldIcon size={16} />
224
+ <ShieldIcon size={24} />
225
+ <ShieldIcon size={32} />
226
+ </div>
227
+ <div class="icon-row">
228
+ <SortIcon size={16} variant="default" />
229
+ <SortIcon size={16} variant="ascend" />
230
+ <SortIcon size={16} variant="descend" />
231
+ <SortIcon size={24} variant="default" />
232
+ <SortIcon size={24} variant="ascend" />
233
+ <SortIcon size={24} variant="descend" />
234
+ <SortIcon size={32} variant="default" />
235
+ <SortIcon size={32} variant="ascend" />
236
+ <SortIcon size={32} variant="descend" />
237
+ </div>
238
+ <div class="icon-row">
239
+ <StatsIcon size={16} />
240
+ <StatsIcon size={24} />
241
+ <StatsIcon size={32} />
242
+ </div>
243
+ </div>
244
+ </section>
245
+ </main>
246
+ </Layout>
247
+
248
+ <script>
249
+ const toggle = document.getElementById('my-toggle') as any;
250
+ const stateLabel = document.getElementById('toggle-state');
251
+
252
+ // Défaut: thème sombre
253
+ if (!document.documentElement.hasAttribute('data-theme')) {
254
+ document.documentElement.setAttribute('data-theme', 'dark');
255
+ }
256
+ if (stateLabel) stateLabel.textContent = 'Thème : Sombre';
257
+
258
+ toggle?.addEventListener('change', (e: CustomEvent) => {
259
+ const { checked } = e.detail;
260
+
261
+ if (checked) {
262
+ document.documentElement.setAttribute('data-theme', 'dark');
263
+ if (stateLabel) stateLabel.textContent = 'Thème : Sombre';
264
+ } else {
265
+ document.documentElement.setAttribute('data-theme', 'light');
266
+ if (stateLabel) stateLabel.textContent = 'Thème : Clair';
267
+ }
268
+ });
269
+ </script>
270
+
271
+ <style lang="scss" scoped>
272
+
273
+ body {
274
+ background-color: var(--nds-background);
275
+ color: var(--nds-text);
276
+ }
277
+
278
+ main {
279
+ max-width: 900px;
280
+ margin: 0 auto;
281
+ padding: var(--nds-spacing-xl) var(--nds-spacing-md);
282
+ }
283
+
284
+ h1 {
285
+ font-size: var(--nds-type-h1-size);
286
+ font-weight: var(--nds-type-h1-weight);
287
+ line-height: var(--nds-type-h1-line-height);
288
+ letter-spacing: var(--nds-type-h1-letter-spacing);
289
+ margin-bottom: var(--nds-spacing-xl);
290
+ }
291
+
292
+ h2 {
293
+ font-size: var(--nds-type-h2-size);
294
+ font-weight: var(--nds-type-h2-weight);
295
+ line-height: var(--nds-type-h2-line-height);
296
+ letter-spacing: var(--nds-type-h2-letter-spacing);
297
+ color: var(--nds-text-muted);
298
+ margin-bottom: var(--nds-spacing-md);
299
+ }
300
+
301
+ section {
302
+ margin-bottom: var(--nds-spacing-2xl);
303
+ }
304
+
305
+ .row {
306
+ display: flex;
307
+ flex-wrap: wrap;
308
+ align-items: center;
309
+ gap: var(--nds-spacing-sm);
310
+ }
311
+
312
+ .icon-grid {
313
+ display: flex;
314
+ flex-direction: column;
315
+ gap: var(--nds-spacing-xs);
316
+ }
317
+
318
+ .icon-row {
319
+ display: flex;
320
+ align-items: center;
321
+ gap: var(--nds-spacing-lg);
322
+ color: var(--nds-text);
323
+ }
324
+
325
+ .icon-name {
326
+ font-size: var(--nds-type-body-small-size);
327
+ color: var(--nds-text-muted);
328
+ width: 100px;
329
+ flex-shrink: 0;
330
+ }
331
+
332
+ .icon-sizes {
333
+ display: flex;
334
+ align-items: center;
335
+ gap: var(--nds-spacing-md);
336
+ color: var(--nds-default);
337
+ }
338
+ </style>