@ivds/core 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +45 -0
- package/README.md +215 -0
- package/lib/all.css +6802 -0
- package/lib/all.min.css +1 -0
- package/lib/base/base.css +215 -0
- package/lib/base/base.min.css +1 -0
- package/lib/components/_breadcrumb-mixins.scss +173 -0
- package/lib/components/_button-mixin.scss +120 -0
- package/lib/components/_card-mixin.scss +196 -0
- package/lib/components/_checkbox-mixin.scss +208 -0
- package/lib/components/_footer-mixin.scss +385 -0
- package/lib/components/_header-mixin.scss +275 -0
- package/lib/components/_navigation-mixins.scss +270 -0
- package/lib/components/_notification-mixin.scss +239 -0
- package/lib/components/_pagination-mixins.scss +280 -0
- package/lib/components/_radio-button-mixin.scss +207 -0
- package/lib/components/_tag-mixin.scss +261 -0
- package/lib/components/_text-input-mixin.scss +203 -0
- package/lib/components/all.css +3005 -0
- package/lib/components/all.min.css +1 -0
- package/lib/components/breadcrumb/breadcrumb.css +141 -0
- package/lib/components/breadcrumb/breadcrumb.min.css +1 -0
- package/lib/components/button/button.css +221 -0
- package/lib/components/button/button.min.css +1 -0
- package/lib/components/card/card.css +236 -0
- package/lib/components/card/card.min.css +1 -0
- package/lib/components/checkbox/checkbox.css +305 -0
- package/lib/components/checkbox/checkbox.min.css +1 -0
- package/lib/components/footer/footer.css +466 -0
- package/lib/components/footer/footer.min.css +1 -0
- package/lib/components/header/header.css +274 -0
- package/lib/components/header/header.min.css +1 -0
- package/lib/components/navigation/navigation.css +214 -0
- package/lib/components/navigation/navigation.min.css +1 -0
- package/lib/components/notification/notification.css +253 -0
- package/lib/components/notification/notification.min.css +1 -0
- package/lib/components/pagination/pagination.css +221 -0
- package/lib/components/pagination/pagination.min.css +1 -0
- package/lib/components/radio-button/radio-button.css +326 -0
- package/lib/components/radio-button/radio-button.min.css +1 -0
- package/lib/components/tag/tag.css +367 -0
- package/lib/components/tag/tag.min.css +1 -0
- package/lib/components/text-input/text-input.css +243 -0
- package/lib/components/text-input/text-input.min.css +1 -0
- package/lib/icons/icon-arrow-left.css +139 -0
- package/lib/icons/icon-arrow-left.min.css +1 -0
- package/lib/icons/icon-arrow-right.css +139 -0
- package/lib/icons/icon-arrow-right.min.css +1 -0
- package/lib/icons/icon-check.css +139 -0
- package/lib/icons/icon-check.min.css +1 -0
- package/lib/icons/icon-close.css +140 -0
- package/lib/icons/icon-close.min.css +1 -0
- package/lib/icons/icon-error.css +140 -0
- package/lib/icons/icon-error.min.css +1 -0
- package/lib/icons/icon-info.css +140 -0
- package/lib/icons/icon-info.min.css +1 -0
- package/lib/icons/icon-success.css +139 -0
- package/lib/icons/icon-success.min.css +1 -0
- package/lib/icons/icon-warning.css +139 -0
- package/lib/icons/icon-warning.min.css +1 -0
- package/lib/icons/icons.css +1158 -0
- package/lib/icons/icons.min.css +1 -0
- package/lib/utils/_flex.scss +200 -0
- package/lib/utils/_grid.scss +211 -0
- package/lib/utils/_layout.scss +253 -0
- package/lib/utils/_spacing.scss +260 -0
- package/lib/utils/_typography.scss +111 -0
- package/lib/utils/utils.css +2434 -0
- package/lib/utils/utils.min.css +1 -0
- package/lib/utils-only.css +2801 -0
- package/lib/utils-only.min.css +1 -0
- package/lib/variables/variables.css +2 -0
- package/lib/variables/variables.min.css +0 -0
- package/package.json +194 -0
- package/src/__tests__/example.test.scss +12 -0
- package/src/accessibility.stories.js +416 -0
- package/src/all.scss +9 -0
- package/src/base/_layout.scss +97 -0
- package/src/base/_reset.scss +85 -0
- package/src/base/_typography.scss +105 -0
- package/src/base/base.scss +6 -0
- package/src/components/all.scss +22 -0
- package/src/components/breadcrumb/_breadcrumb-mixins.scss +173 -0
- package/src/components/breadcrumb/breadcrumb.scss +68 -0
- package/src/components/breadcrumb/breadcrumb.stories.js +483 -0
- package/src/components/button/__tests__/button-mixins.test.scss +35 -0
- package/src/components/button/_button-mixin.scss +120 -0
- package/src/components/button/button.scss +126 -0
- package/src/components/button/button.stories.js +364 -0
- package/src/components/card/__tests__/card-mixins.test.scss +36 -0
- package/src/components/card/_card-mixin.scss +196 -0
- package/src/components/card/card.scss +193 -0
- package/src/components/card/card.stories.js +635 -0
- package/src/components/checkbox/_checkbox-mixin.scss +208 -0
- package/src/components/checkbox/checkbox.scss +141 -0
- package/src/components/checkbox/checkbox.stories.js +303 -0
- package/src/components/footer/_footer-mixin.scss +385 -0
- package/src/components/footer/footer.scss +86 -0
- package/src/components/footer/footer.stories.js +740 -0
- package/src/components/header/_header-mixin.scss +275 -0
- package/src/components/header/header.scss +84 -0
- package/src/components/header/header.stories.js +450 -0
- package/src/components/navigation/_navigation-mixins.scss +270 -0
- package/src/components/navigation/navigation.scss +64 -0
- package/src/components/navigation/navigation.stories.js +410 -0
- package/src/components/notification/_notification-mixin.scss +239 -0
- package/src/components/notification/notification.scss +118 -0
- package/src/components/notification/notification.stories.js +378 -0
- package/src/components/overview.stories.js +473 -0
- package/src/components/pagination/_pagination-mixins.scss +280 -0
- package/src/components/pagination/pagination.scss +76 -0
- package/src/components/pagination/pagination.stories.js +729 -0
- package/src/components/radio-button/_radio-button-mixin.scss +207 -0
- package/src/components/radio-button/radio-button.scss +178 -0
- package/src/components/radio-button/radio-button.stories.js +379 -0
- package/src/components/tag/_tag-mixin.scss +261 -0
- package/src/components/tag/tag.scss +244 -0
- package/src/components/tag/tag.stories.js +482 -0
- package/src/components/text-input/_text-input-mixin.scss +203 -0
- package/src/components/text-input/text-input.scss +150 -0
- package/src/components/text-input/text-input.stories.js +723 -0
- package/src/icons/_icon.scss +121 -0
- package/src/icons/icon-arrow-left.scss +23 -0
- package/src/icons/icon-arrow-right.scss +23 -0
- package/src/icons/icon-check.scss +23 -0
- package/src/icons/icon-close.scss +24 -0
- package/src/icons/icon-error.scss +24 -0
- package/src/icons/icon-info.scss +24 -0
- package/src/icons/icon-success.scss +23 -0
- package/src/icons/icon-warning.scss +23 -0
- package/src/icons/icons.scss +12 -0
- package/src/icons/icons.stories.js +249 -0
- package/src/icons/svg/arrow-left.svg +3 -0
- package/src/icons/svg/arrow-right.svg +3 -0
- package/src/icons/svg/check.svg +3 -0
- package/src/icons/svg/close.svg +4 -0
- package/src/icons/svg/error.svg +5 -0
- package/src/icons/svg/info.svg +5 -0
- package/src/icons/svg/success.svg +4 -0
- package/src/icons/svg/warning.svg +5 -0
- package/src/utils/__tests__/utilities.test.scss +37 -0
- package/src/utils/_flex.scss +200 -0
- package/src/utils/_grid.scss +211 -0
- package/src/utils/_layout.scss +253 -0
- package/src/utils/_spacing.scss +260 -0
- package/src/utils/_typography.scss +111 -0
- package/src/utils/utils.scss +8 -0
- package/src/variables/_borders.scss +15 -0
- package/src/variables/_breakpoints.scss +11 -0
- package/src/variables/_colors.scss +97 -0
- package/src/variables/_shadows.scss +14 -0
- package/src/variables/_spacing.scss +24 -0
- package/src/variables/_typography.scss +47 -0
- package/src/variables/variables.scss +9 -0
|
@@ -0,0 +1,729 @@
|
|
|
1
|
+
// Pagination component stories for Storybook
|
|
2
|
+
// Showcases pagination patterns and navigation controls following Helsinki Design System patterns
|
|
3
|
+
|
|
4
|
+
import './pagination.scss';
|
|
5
|
+
|
|
6
|
+
export default {
|
|
7
|
+
title: 'Core/Pagination',
|
|
8
|
+
decorators: [(storyFn) => `<div style="padding: 1rem;">${storyFn()}</div>`],
|
|
9
|
+
parameters: {
|
|
10
|
+
docs: {
|
|
11
|
+
description: {
|
|
12
|
+
component: 'CSS-only pagination component using IVDS design tokens with orange primary color. Provides accessible navigation controls for paginated content with proper ARIA attributes and keyboard support, following Helsinki Design System patterns.'
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
a11y: {
|
|
16
|
+
config: {
|
|
17
|
+
rules: [
|
|
18
|
+
{
|
|
19
|
+
id: 'color-contrast',
|
|
20
|
+
enabled: true
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
id: 'focus-order-semantics',
|
|
24
|
+
enabled: true
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
id: 'aria-allowed-attr',
|
|
28
|
+
enabled: true
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
// Primary pagination
|
|
37
|
+
export const Primary = () => `
|
|
38
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
39
|
+
<ul class="ivds-pagination__list">
|
|
40
|
+
<li class="ivds-pagination__item">
|
|
41
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
42
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
43
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
44
|
+
</svg>
|
|
45
|
+
Previous
|
|
46
|
+
</a>
|
|
47
|
+
</li>
|
|
48
|
+
<li class="ivds-pagination__item">
|
|
49
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
50
|
+
</li>
|
|
51
|
+
<li class="ivds-pagination__item">
|
|
52
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page" aria-label="Current page, page 2">2</span>
|
|
53
|
+
</li>
|
|
54
|
+
<li class="ivds-pagination__item">
|
|
55
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
56
|
+
</li>
|
|
57
|
+
<li class="ivds-pagination__item">
|
|
58
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
59
|
+
Next
|
|
60
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
61
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
62
|
+
</svg>
|
|
63
|
+
</a>
|
|
64
|
+
</li>
|
|
65
|
+
</ul>
|
|
66
|
+
</nav>
|
|
67
|
+
`;
|
|
68
|
+
|
|
69
|
+
// Size variants
|
|
70
|
+
export const Sizes = () => `
|
|
71
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
72
|
+
<div>
|
|
73
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Small</h4>
|
|
74
|
+
<nav class="ivds-pagination ivds-pagination--small" aria-label="Small pagination">
|
|
75
|
+
<ul class="ivds-pagination__list">
|
|
76
|
+
<li class="ivds-pagination__item">
|
|
77
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
78
|
+
</li>
|
|
79
|
+
<li class="ivds-pagination__item">
|
|
80
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
81
|
+
</li>
|
|
82
|
+
<li class="ivds-pagination__item">
|
|
83
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
84
|
+
</li>
|
|
85
|
+
</ul>
|
|
86
|
+
</nav>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<div>
|
|
90
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Default</h4>
|
|
91
|
+
<nav class="ivds-pagination" aria-label="Default pagination">
|
|
92
|
+
<ul class="ivds-pagination__list">
|
|
93
|
+
<li class="ivds-pagination__item">
|
|
94
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
95
|
+
</li>
|
|
96
|
+
<li class="ivds-pagination__item">
|
|
97
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
98
|
+
</li>
|
|
99
|
+
<li class="ivds-pagination__item">
|
|
100
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
101
|
+
</li>
|
|
102
|
+
</ul>
|
|
103
|
+
</nav>
|
|
104
|
+
</div>
|
|
105
|
+
|
|
106
|
+
<div>
|
|
107
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Large</h4>
|
|
108
|
+
<nav class="ivds-pagination ivds-pagination--large" aria-label="Large pagination">
|
|
109
|
+
<ul class="ivds-pagination__list">
|
|
110
|
+
<li class="ivds-pagination__item">
|
|
111
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
112
|
+
</li>
|
|
113
|
+
<li class="ivds-pagination__item">
|
|
114
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
115
|
+
</li>
|
|
116
|
+
<li class="ivds-pagination__item">
|
|
117
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
118
|
+
</li>
|
|
119
|
+
</ul>
|
|
120
|
+
</nav>
|
|
121
|
+
</div>
|
|
122
|
+
</div>
|
|
123
|
+
`;
|
|
124
|
+
|
|
125
|
+
// Layout variants
|
|
126
|
+
export const Layouts = () => `
|
|
127
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
128
|
+
<div>
|
|
129
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Default (Spaced)</h4>
|
|
130
|
+
<nav class="ivds-pagination" aria-label="Default layout pagination">
|
|
131
|
+
<ul class="ivds-pagination__list">
|
|
132
|
+
<li class="ivds-pagination__item">
|
|
133
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
134
|
+
</li>
|
|
135
|
+
<li class="ivds-pagination__item">
|
|
136
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
137
|
+
</li>
|
|
138
|
+
<li class="ivds-pagination__item">
|
|
139
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
140
|
+
</li>
|
|
141
|
+
<li class="ivds-pagination__item">
|
|
142
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 4">4</a>
|
|
143
|
+
</li>
|
|
144
|
+
</ul>
|
|
145
|
+
</nav>
|
|
146
|
+
</div>
|
|
147
|
+
|
|
148
|
+
<div>
|
|
149
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Compact (Connected)</h4>
|
|
150
|
+
<nav class="ivds-pagination ivds-pagination--compact" aria-label="Compact layout pagination">
|
|
151
|
+
<ul class="ivds-pagination__list">
|
|
152
|
+
<li class="ivds-pagination__item">
|
|
153
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
154
|
+
</li>
|
|
155
|
+
<li class="ivds-pagination__item">
|
|
156
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
157
|
+
</li>
|
|
158
|
+
<li class="ivds-pagination__item">
|
|
159
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
160
|
+
</li>
|
|
161
|
+
<li class="ivds-pagination__item">
|
|
162
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 4">4</a>
|
|
163
|
+
</li>
|
|
164
|
+
</ul>
|
|
165
|
+
</nav>
|
|
166
|
+
</div>
|
|
167
|
+
|
|
168
|
+
<div>
|
|
169
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Rounded</h4>
|
|
170
|
+
<nav class="ivds-pagination ivds-pagination--rounded" aria-label="Rounded pagination">
|
|
171
|
+
<ul class="ivds-pagination__list">
|
|
172
|
+
<li class="ivds-pagination__item">
|
|
173
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
174
|
+
</li>
|
|
175
|
+
<li class="ivds-pagination__item">
|
|
176
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
177
|
+
</li>
|
|
178
|
+
<li class="ivds-pagination__item">
|
|
179
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
180
|
+
</li>
|
|
181
|
+
<li class="ivds-pagination__item">
|
|
182
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 4">4</a>
|
|
183
|
+
</li>
|
|
184
|
+
</ul>
|
|
185
|
+
</nav>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
`;
|
|
189
|
+
|
|
190
|
+
// Theme variants
|
|
191
|
+
export const Themes = () => `
|
|
192
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
193
|
+
<div>
|
|
194
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Default Theme</h4>
|
|
195
|
+
<nav class="ivds-pagination" aria-label="Default theme pagination">
|
|
196
|
+
<ul class="ivds-pagination__list">
|
|
197
|
+
<li class="ivds-pagination__item">
|
|
198
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
199
|
+
</li>
|
|
200
|
+
<li class="ivds-pagination__item">
|
|
201
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
202
|
+
</li>
|
|
203
|
+
<li class="ivds-pagination__item">
|
|
204
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
205
|
+
</li>
|
|
206
|
+
</ul>
|
|
207
|
+
</nav>
|
|
208
|
+
</div>
|
|
209
|
+
|
|
210
|
+
<div style="background-color: #1e293b; padding: 1rem; border-radius: 0.5rem;">
|
|
211
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #e2e8f0;">Dark Theme</h4>
|
|
212
|
+
<nav class="ivds-pagination ivds-pagination--theme-dark" aria-label="Dark theme pagination">
|
|
213
|
+
<ul class="ivds-pagination__list">
|
|
214
|
+
<li class="ivds-pagination__item">
|
|
215
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
216
|
+
</li>
|
|
217
|
+
<li class="ivds-pagination__item">
|
|
218
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
219
|
+
</li>
|
|
220
|
+
<li class="ivds-pagination__item">
|
|
221
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
222
|
+
</li>
|
|
223
|
+
</ul>
|
|
224
|
+
</nav>
|
|
225
|
+
</div>
|
|
226
|
+
|
|
227
|
+
<div>
|
|
228
|
+
<h4 style="margin-bottom: 0.5rem; font-size: 0.875rem; color: #6b7280;">Minimal Theme</h4>
|
|
229
|
+
<nav class="ivds-pagination ivds-pagination--theme-minimal" aria-label="Minimal theme pagination">
|
|
230
|
+
<ul class="ivds-pagination__list">
|
|
231
|
+
<li class="ivds-pagination__item">
|
|
232
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
233
|
+
</li>
|
|
234
|
+
<li class="ivds-pagination__item">
|
|
235
|
+
<span class="ivds-pagination__link ivds-pagination__link--active" aria-current="page">2</span>
|
|
236
|
+
</li>
|
|
237
|
+
<li class="ivds-pagination__item">
|
|
238
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
239
|
+
</li>
|
|
240
|
+
</ul>
|
|
241
|
+
</nav>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
`;
|
|
245
|
+
|
|
246
|
+
// Pagination with ellipsis
|
|
247
|
+
export const WithEllipsis = () => `
|
|
248
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
249
|
+
<ul class="ivds-pagination__list">
|
|
250
|
+
<li class="ivds-pagination__item">
|
|
251
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
252
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
253
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
254
|
+
</svg>
|
|
255
|
+
</a>
|
|
256
|
+
</li>
|
|
257
|
+
<li class="ivds-pagination__item">
|
|
258
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
259
|
+
</li>
|
|
260
|
+
<li class="ivds-pagination__item">
|
|
261
|
+
<span class="ivds-pagination__ellipsis" aria-hidden="true">…</span>
|
|
262
|
+
</li>
|
|
263
|
+
<li class="ivds-pagination__item">
|
|
264
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 8">8</a>
|
|
265
|
+
</li>
|
|
266
|
+
<li class="ivds-pagination__item">
|
|
267
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 9">9</a>
|
|
268
|
+
</li>
|
|
269
|
+
<li class="ivds-pagination__item">
|
|
270
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 10">10</span>
|
|
271
|
+
</li>
|
|
272
|
+
<li class="ivds-pagination__item">
|
|
273
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 11">11</a>
|
|
274
|
+
</li>
|
|
275
|
+
<li class="ivds-pagination__item">
|
|
276
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 12">12</a>
|
|
277
|
+
</li>
|
|
278
|
+
<li class="ivds-pagination__item">
|
|
279
|
+
<span class="ivds-pagination__ellipsis" aria-hidden="true">…</span>
|
|
280
|
+
</li>
|
|
281
|
+
<li class="ivds-pagination__item">
|
|
282
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 20">20</a>
|
|
283
|
+
</li>
|
|
284
|
+
<li class="ivds-pagination__item">
|
|
285
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
286
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
287
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
288
|
+
</svg>
|
|
289
|
+
</a>
|
|
290
|
+
</li>
|
|
291
|
+
</ul>
|
|
292
|
+
</nav>
|
|
293
|
+
`;
|
|
294
|
+
|
|
295
|
+
// Simple pagination (just prev/next)
|
|
296
|
+
export const Simple = () => `
|
|
297
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
298
|
+
<ul class="ivds-pagination__list">
|
|
299
|
+
<li class="ivds-pagination__item">
|
|
300
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
301
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
302
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
303
|
+
</svg>
|
|
304
|
+
Previous
|
|
305
|
+
</a>
|
|
306
|
+
</li>
|
|
307
|
+
<li class="ivds-pagination__item">
|
|
308
|
+
<span class="ivds-pagination__info">Page 5 of 20</span>
|
|
309
|
+
</li>
|
|
310
|
+
<li class="ivds-pagination__item">
|
|
311
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
312
|
+
Next
|
|
313
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
314
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
315
|
+
</svg>
|
|
316
|
+
</a>
|
|
317
|
+
</li>
|
|
318
|
+
</ul>
|
|
319
|
+
</nav>
|
|
320
|
+
`;
|
|
321
|
+
|
|
322
|
+
// Compact pagination
|
|
323
|
+
export const Compact = () => `
|
|
324
|
+
<nav class="ivds-pagination ivds-pagination--compact" aria-label="Pagination navigation">
|
|
325
|
+
<ul class="ivds-pagination__list">
|
|
326
|
+
<li class="ivds-pagination__item">
|
|
327
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
328
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
329
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
330
|
+
</svg>
|
|
331
|
+
</a>
|
|
332
|
+
</li>
|
|
333
|
+
<li class="ivds-pagination__item">
|
|
334
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
335
|
+
</li>
|
|
336
|
+
<li class="ivds-pagination__item">
|
|
337
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 2">2</span>
|
|
338
|
+
</li>
|
|
339
|
+
<li class="ivds-pagination__item">
|
|
340
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
341
|
+
</li>
|
|
342
|
+
<li class="ivds-pagination__item">
|
|
343
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 4">4</a>
|
|
344
|
+
</li>
|
|
345
|
+
<li class="ivds-pagination__item">
|
|
346
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 5">5</a>
|
|
347
|
+
</li>
|
|
348
|
+
<li class="ivds-pagination__item">
|
|
349
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
350
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
351
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
352
|
+
</svg>
|
|
353
|
+
</a>
|
|
354
|
+
</li>
|
|
355
|
+
</ul>
|
|
356
|
+
</nav>
|
|
357
|
+
`;
|
|
358
|
+
|
|
359
|
+
// First page state
|
|
360
|
+
export const FirstPage = () => `
|
|
361
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
362
|
+
<ul class="ivds-pagination__list">
|
|
363
|
+
<li class="ivds-pagination__item">
|
|
364
|
+
<span class="ivds-pagination__link ivds-pagination__link--disabled" aria-label="Previous page (disabled)">
|
|
365
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
366
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
367
|
+
</svg>
|
|
368
|
+
Previous
|
|
369
|
+
</span>
|
|
370
|
+
</li>
|
|
371
|
+
<li class="ivds-pagination__item">
|
|
372
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 1">1</span>
|
|
373
|
+
</li>
|
|
374
|
+
<li class="ivds-pagination__item">
|
|
375
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 2">2</a>
|
|
376
|
+
</li>
|
|
377
|
+
<li class="ivds-pagination__item">
|
|
378
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
379
|
+
</li>
|
|
380
|
+
<li class="ivds-pagination__item">
|
|
381
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
382
|
+
Next
|
|
383
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
384
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
385
|
+
</svg>
|
|
386
|
+
</a>
|
|
387
|
+
</li>
|
|
388
|
+
</ul>
|
|
389
|
+
</nav>
|
|
390
|
+
`;
|
|
391
|
+
|
|
392
|
+
// Last page state
|
|
393
|
+
export const LastPage = () => `
|
|
394
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
395
|
+
<ul class="ivds-pagination__list">
|
|
396
|
+
<li class="ivds-pagination__item">
|
|
397
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
398
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
399
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
400
|
+
</svg>
|
|
401
|
+
Previous
|
|
402
|
+
</a>
|
|
403
|
+
</li>
|
|
404
|
+
<li class="ivds-pagination__item">
|
|
405
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 8">8</a>
|
|
406
|
+
</li>
|
|
407
|
+
<li class="ivds-pagination__item">
|
|
408
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 9">9</a>
|
|
409
|
+
</li>
|
|
410
|
+
<li class="ivds-pagination__item">
|
|
411
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 10">10</span>
|
|
412
|
+
</li>
|
|
413
|
+
<li class="ivds-pagination__item">
|
|
414
|
+
<span class="ivds-pagination__link ivds-pagination__link--disabled" aria-label="Next page (disabled)">
|
|
415
|
+
Next
|
|
416
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
417
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
418
|
+
</svg>
|
|
419
|
+
</span>
|
|
420
|
+
</li>
|
|
421
|
+
</ul>
|
|
422
|
+
</nav>
|
|
423
|
+
`;
|
|
424
|
+
|
|
425
|
+
// Pagination with jump to first/last
|
|
426
|
+
export const WithFirstLast = () => `
|
|
427
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
428
|
+
<ul class="ivds-pagination__list">
|
|
429
|
+
<li class="ivds-pagination__item">
|
|
430
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--first" aria-label="Go to first page">
|
|
431
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
432
|
+
<polyline points="11,17 6,12 11,7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
433
|
+
<polyline points="18,17 13,12 18,7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
434
|
+
</svg>
|
|
435
|
+
First
|
|
436
|
+
</a>
|
|
437
|
+
</li>
|
|
438
|
+
<li class="ivds-pagination__item">
|
|
439
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
440
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
441
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
442
|
+
</svg>
|
|
443
|
+
</a>
|
|
444
|
+
</li>
|
|
445
|
+
<li class="ivds-pagination__item">
|
|
446
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 4">4</a>
|
|
447
|
+
</li>
|
|
448
|
+
<li class="ivds-pagination__item">
|
|
449
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 5">5</span>
|
|
450
|
+
</li>
|
|
451
|
+
<li class="ivds-pagination__item">
|
|
452
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 6">6</a>
|
|
453
|
+
</li>
|
|
454
|
+
<li class="ivds-pagination__item">
|
|
455
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
456
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
457
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
458
|
+
</svg>
|
|
459
|
+
</a>
|
|
460
|
+
</li>
|
|
461
|
+
<li class="ivds-pagination__item">
|
|
462
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--last" aria-label="Go to last page">
|
|
463
|
+
Last
|
|
464
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
465
|
+
<polyline points="13,17 18,12 13,7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
466
|
+
<polyline points="6,17 11,12 6,7" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
467
|
+
</svg>
|
|
468
|
+
</a>
|
|
469
|
+
</li>
|
|
470
|
+
</ul>
|
|
471
|
+
</nav>
|
|
472
|
+
`;
|
|
473
|
+
|
|
474
|
+
// Pagination with page size selector
|
|
475
|
+
export const WithPageSize = () => `
|
|
476
|
+
<div style="display: flex; flex-direction: column; gap: 1rem;">
|
|
477
|
+
<div style="display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem;">
|
|
478
|
+
<div style="display: flex; align-items: center; gap: 0.5rem;">
|
|
479
|
+
<label for="page-size" style="font-size: 0.875rem;">Items per page:</label>
|
|
480
|
+
<select id="page-size" style="padding: 0.25rem 0.5rem; border: 1px solid #d1d5db; border-radius: 0.25rem;">
|
|
481
|
+
<option value="10">10</option>
|
|
482
|
+
<option value="25" selected>25</option>
|
|
483
|
+
<option value="50">50</option>
|
|
484
|
+
<option value="100">100</option>
|
|
485
|
+
</select>
|
|
486
|
+
</div>
|
|
487
|
+
|
|
488
|
+
<div style="font-size: 0.875rem; color: #6b7280;">
|
|
489
|
+
Showing 26-50 of 247 results
|
|
490
|
+
</div>
|
|
491
|
+
</div>
|
|
492
|
+
|
|
493
|
+
<nav class="ivds-pagination" aria-label="Pagination navigation">
|
|
494
|
+
<ul class="ivds-pagination__list">
|
|
495
|
+
<li class="ivds-pagination__item">
|
|
496
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
497
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
498
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
499
|
+
</svg>
|
|
500
|
+
Previous
|
|
501
|
+
</a>
|
|
502
|
+
</li>
|
|
503
|
+
<li class="ivds-pagination__item">
|
|
504
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
505
|
+
</li>
|
|
506
|
+
<li class="ivds-pagination__item">
|
|
507
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 2">2</span>
|
|
508
|
+
</li>
|
|
509
|
+
<li class="ivds-pagination__item">
|
|
510
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
511
|
+
</li>
|
|
512
|
+
<li class="ivds-pagination__item">
|
|
513
|
+
<span class="ivds-pagination__ellipsis" aria-hidden="true">…</span>
|
|
514
|
+
</li>
|
|
515
|
+
<li class="ivds-pagination__item">
|
|
516
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 10">10</a>
|
|
517
|
+
</li>
|
|
518
|
+
<li class="ivds-pagination__item">
|
|
519
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
520
|
+
Next
|
|
521
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
522
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
523
|
+
</svg>
|
|
524
|
+
</a>
|
|
525
|
+
</li>
|
|
526
|
+
</ul>
|
|
527
|
+
</nav>
|
|
528
|
+
</div>
|
|
529
|
+
`;
|
|
530
|
+
|
|
531
|
+
// Mobile responsive pagination
|
|
532
|
+
export const MobileResponsive = () => `
|
|
533
|
+
<div style="max-width: 320px; border: 1px solid #e2e8f0; padding: 1rem; border-radius: 0.5rem;">
|
|
534
|
+
<h4 style="margin-bottom: 1rem; font-size: 0.875rem;">Mobile View (320px)</h4>
|
|
535
|
+
|
|
536
|
+
<nav class="ivds-pagination ivds-pagination--mobile" aria-label="Pagination navigation">
|
|
537
|
+
<ul class="ivds-pagination__list">
|
|
538
|
+
<li class="ivds-pagination__item">
|
|
539
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page">
|
|
540
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
541
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
542
|
+
</svg>
|
|
543
|
+
</a>
|
|
544
|
+
</li>
|
|
545
|
+
<li class="ivds-pagination__item">
|
|
546
|
+
<span class="ivds-pagination__info">3 / 15</span>
|
|
547
|
+
</li>
|
|
548
|
+
<li class="ivds-pagination__item">
|
|
549
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
550
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
551
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
552
|
+
</svg>
|
|
553
|
+
</a>
|
|
554
|
+
</li>
|
|
555
|
+
</ul>
|
|
556
|
+
</nav>
|
|
557
|
+
</div>
|
|
558
|
+
`;
|
|
559
|
+
|
|
560
|
+
// Accessibility example
|
|
561
|
+
export const AccessibilityFeatures = () => `
|
|
562
|
+
<div style="display: flex; flex-direction: column; gap: 2rem;">
|
|
563
|
+
<nav class="ivds-pagination" aria-label="Search results pagination" role="navigation">
|
|
564
|
+
<ul class="ivds-pagination__list">
|
|
565
|
+
<li class="ivds-pagination__item">
|
|
566
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--prev" aria-label="Go to previous page, page 2">
|
|
567
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
568
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
569
|
+
</svg>
|
|
570
|
+
Previous
|
|
571
|
+
</a>
|
|
572
|
+
</li>
|
|
573
|
+
<li class="ivds-pagination__item">
|
|
574
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 1">1</a>
|
|
575
|
+
</li>
|
|
576
|
+
<li class="ivds-pagination__item">
|
|
577
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 2">2</a>
|
|
578
|
+
</li>
|
|
579
|
+
<li class="ivds-pagination__item">
|
|
580
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page" aria-label="Current page, page 3">3</span>
|
|
581
|
+
</li>
|
|
582
|
+
<li class="ivds-pagination__item">
|
|
583
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 4">4</a>
|
|
584
|
+
</li>
|
|
585
|
+
<li class="ivds-pagination__item">
|
|
586
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 5">5</a>
|
|
587
|
+
</li>
|
|
588
|
+
<li class="ivds-pagination__item">
|
|
589
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page, page 4">
|
|
590
|
+
Next
|
|
591
|
+
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">
|
|
592
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
593
|
+
</svg>
|
|
594
|
+
</a>
|
|
595
|
+
</li>
|
|
596
|
+
</ul>
|
|
597
|
+
</nav>
|
|
598
|
+
|
|
599
|
+
<div style="padding: 1rem; background-color: #f8fafc; border-radius: 0.5rem;">
|
|
600
|
+
<h3>Accessibility Features</h3>
|
|
601
|
+
<ul style="margin-top: 1rem; line-height: 1.6;">
|
|
602
|
+
<li><strong>Semantic HTML:</strong> Uses proper nav, ul, li structure with role="navigation"</li>
|
|
603
|
+
<li><strong>ARIA Labels:</strong> Descriptive labels for all navigation links</li>
|
|
604
|
+
<li><strong>Current Page:</strong> aria-current="page" indicates active page</li>
|
|
605
|
+
<li><strong>Focus Management:</strong> Proper focus indicators and keyboard navigation</li>
|
|
606
|
+
<li><strong>Screen Reader Support:</strong> aria-hidden for decorative icons</li>
|
|
607
|
+
<li><strong>Context:</strong> Clear indication of current position and total pages</li>
|
|
608
|
+
</ul>
|
|
609
|
+
</div>
|
|
610
|
+
</div>
|
|
611
|
+
`;
|
|
612
|
+
|
|
613
|
+
// Usage examples
|
|
614
|
+
export const UsageExamples = () => `
|
|
615
|
+
<div style="display: flex; flex-direction: column; gap: 3rem;">
|
|
616
|
+
<div>
|
|
617
|
+
<h4 style="margin-bottom: 1rem;">Table Pagination</h4>
|
|
618
|
+
<div style="border: 1px solid #e2e8f0; border-radius: 0.5rem; overflow: hidden;">
|
|
619
|
+
<table style="width: 100%; border-collapse: collapse;">
|
|
620
|
+
<thead style="background-color: #f8fafc;">
|
|
621
|
+
<tr>
|
|
622
|
+
<th style="padding: 0.75rem; text-align: left; border-bottom: 1px solid #e2e8f0;">Name</th>
|
|
623
|
+
<th style="padding: 0.75rem; text-align: left; border-bottom: 1px solid #e2e8f0;">Email</th>
|
|
624
|
+
<th style="padding: 0.75rem; text-align: left; border-bottom: 1px solid #e2e8f0;">Role</th>
|
|
625
|
+
</tr>
|
|
626
|
+
</thead>
|
|
627
|
+
<tbody>
|
|
628
|
+
<tr>
|
|
629
|
+
<td style="padding: 0.75rem; border-bottom: 1px solid #e2e8f0;">John Doe</td>
|
|
630
|
+
<td style="padding: 0.75rem; border-bottom: 1px solid #e2e8f0;">john@example.com</td>
|
|
631
|
+
<td style="padding: 0.75rem; border-bottom: 1px solid #e2e8f0;">Admin</td>
|
|
632
|
+
</tr>
|
|
633
|
+
<tr>
|
|
634
|
+
<td style="padding: 0.75rem; border-bottom: 1px solid #e2e8f0;">Jane Smith</td>
|
|
635
|
+
<td style="padding: 0.75rem; border-bottom: 1px solid #e2e8f0;">jane@example.com</td>
|
|
636
|
+
<td style="padding: 0.75rem; border-bottom: 1px solid #e2e8f0;">User</td>
|
|
637
|
+
</tr>
|
|
638
|
+
<tr>
|
|
639
|
+
<td style="padding: 0.75rem;">Bob Johnson</td>
|
|
640
|
+
<td style="padding: 0.75rem;">bob@example.com</td>
|
|
641
|
+
<td style="padding: 0.75rem;">Editor</td>
|
|
642
|
+
</tr>
|
|
643
|
+
</tbody>
|
|
644
|
+
</table>
|
|
645
|
+
|
|
646
|
+
<div style="padding: 1rem; background-color: #f8fafc; border-top: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center;">
|
|
647
|
+
<div style="font-size: 0.875rem; color: #6b7280;">
|
|
648
|
+
Showing 1-3 of 47 users
|
|
649
|
+
</div>
|
|
650
|
+
|
|
651
|
+
<nav class="ivds-pagination ivds-pagination--compact" aria-label="User table pagination">
|
|
652
|
+
<ul class="ivds-pagination__list">
|
|
653
|
+
<li class="ivds-pagination__item">
|
|
654
|
+
<span class="ivds-pagination__link ivds-pagination__link--disabled" aria-label="Previous page (disabled)">
|
|
655
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
656
|
+
<polyline points="15,18 9,12 15,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
657
|
+
</svg>
|
|
658
|
+
</span>
|
|
659
|
+
</li>
|
|
660
|
+
<li class="ivds-pagination__item">
|
|
661
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page">1</span>
|
|
662
|
+
</li>
|
|
663
|
+
<li class="ivds-pagination__item">
|
|
664
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 2">2</a>
|
|
665
|
+
</li>
|
|
666
|
+
<li class="ivds-pagination__item">
|
|
667
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
668
|
+
</li>
|
|
669
|
+
<li class="ivds-pagination__item">
|
|
670
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">
|
|
671
|
+
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
672
|
+
<polyline points="9,18 15,12 9,6" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
|
|
673
|
+
</svg>
|
|
674
|
+
</a>
|
|
675
|
+
</li>
|
|
676
|
+
</ul>
|
|
677
|
+
</nav>
|
|
678
|
+
</div>
|
|
679
|
+
</div>
|
|
680
|
+
</div>
|
|
681
|
+
|
|
682
|
+
<div>
|
|
683
|
+
<h4 style="margin-bottom: 1rem;">Search Results Pagination</h4>
|
|
684
|
+
<div style="border: 1px solid #e2e8f0; border-radius: 0.5rem; padding: 1.5rem;">
|
|
685
|
+
<div style="margin-bottom: 1rem;">
|
|
686
|
+
<h5 style="margin-bottom: 0.5rem;">Search Results for "design system"</h5>
|
|
687
|
+
<p style="color: #6b7280; font-size: 0.875rem;">About 1,247 results (0.32 seconds)</p>
|
|
688
|
+
</div>
|
|
689
|
+
|
|
690
|
+
<div style="space-y: 1rem;">
|
|
691
|
+
<div style="margin-bottom: 1rem;">
|
|
692
|
+
<h6 style="color: #1d4ed8; margin-bottom: 0.25rem;">IVDS Design System Documentation</h6>
|
|
693
|
+
<p style="font-size: 0.875rem; color: #6b7280;">Complete guide to using the Ivoire Design System components and tokens...</p>
|
|
694
|
+
</div>
|
|
695
|
+
<div style="margin-bottom: 1rem;">
|
|
696
|
+
<h6 style="color: #1d4ed8; margin-bottom: 0.25rem;">Getting Started with Design Systems</h6>
|
|
697
|
+
<p style="font-size: 0.875rem; color: #6b7280;">Learn how to implement and maintain a design system in your organization...</p>
|
|
698
|
+
</div>
|
|
699
|
+
</div>
|
|
700
|
+
|
|
701
|
+
<nav class="ivds-pagination" aria-label="Search results pagination" style="margin-top: 2rem;">
|
|
702
|
+
<ul class="ivds-pagination__list">
|
|
703
|
+
<li class="ivds-pagination__item">
|
|
704
|
+
<span class="ivds-pagination__link ivds-pagination__link--disabled">Previous</span>
|
|
705
|
+
</li>
|
|
706
|
+
<li class="ivds-pagination__item">
|
|
707
|
+
<span class="ivds-pagination__link ivds-pagination__link--current" aria-current="page">1</span>
|
|
708
|
+
</li>
|
|
709
|
+
<li class="ivds-pagination__item">
|
|
710
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 2">2</a>
|
|
711
|
+
</li>
|
|
712
|
+
<li class="ivds-pagination__item">
|
|
713
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 3">3</a>
|
|
714
|
+
</li>
|
|
715
|
+
<li class="ivds-pagination__item">
|
|
716
|
+
<span class="ivds-pagination__ellipsis">…</span>
|
|
717
|
+
</li>
|
|
718
|
+
<li class="ivds-pagination__item">
|
|
719
|
+
<a href="#" class="ivds-pagination__link" aria-label="Go to page 25">25</a>
|
|
720
|
+
</li>
|
|
721
|
+
<li class="ivds-pagination__item">
|
|
722
|
+
<a href="#" class="ivds-pagination__link ivds-pagination__link--next" aria-label="Go to next page">Next</a>
|
|
723
|
+
</li>
|
|
724
|
+
</ul>
|
|
725
|
+
</nav>
|
|
726
|
+
</div>
|
|
727
|
+
</div>
|
|
728
|
+
</div>
|
|
729
|
+
`;
|