@syscore/ui-library 1.27.3 → 2.0.0-beta-publish-workflow-beta.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.
Files changed (168) hide show
  1. package/client/App.tsx +0 -2
  2. package/client/assets/alert/icon-clear.svg +4 -0
  3. package/client/assets/alert/icon-done.svg +3 -0
  4. package/client/assets/avatar-identity/photo.png +0 -0
  5. package/client/assets/avatar-identity/placeholder-icon.svg +8 -0
  6. package/client/assets/breadcrumb/icon-ellipsis.svg +5 -0
  7. package/client/assets/breadcrumb/icon-home.svg +3 -0
  8. package/client/assets/breadcrumb/icon-separator.svg +3 -0
  9. package/client/assets/button-v01/icon-back.svg +4 -0
  10. package/client/assets/button-v01/icon-check.svg +3 -0
  11. package/client/assets/button-v01/icon-close.svg +4 -0
  12. package/client/assets/button-v01/icon-delete.svg +3 -0
  13. package/client/assets/button-v01/icon-device.svg +3 -0
  14. package/client/assets/dropdown/icon-carrot-contract.svg +3 -0
  15. package/client/assets/dropdown/icon-carrot-expand.svg +3 -0
  16. package/client/assets/dropdown/icon-clear.svg +4 -0
  17. package/client/assets/dropdown/icon-enter.svg +3 -0
  18. package/client/components/icons/UtilityChangeType.tsx +21 -0
  19. package/client/components/ui/alert-dialog-panel.tsx +246 -0
  20. package/client/components/ui/alert-v02.tsx +214 -0
  21. package/client/components/ui/app-bar.tsx +299 -0
  22. package/client/components/ui/avatar-identity.tsx +122 -0
  23. package/client/components/ui/banner.tsx +108 -0
  24. package/client/components/ui/bottom-navigation.tsx +223 -0
  25. package/client/components/ui/breadcrumb-trail.tsx +170 -0
  26. package/client/components/ui/button-v01.tsx +238 -0
  27. package/client/components/ui/button.tsx +2 -0
  28. package/client/components/ui/card.tsx +108 -26
  29. package/client/components/ui/code-badge.tsx +62 -0
  30. package/client/components/ui/date-picker.tsx +188 -0
  31. package/client/components/ui/dropdown.tsx +448 -0
  32. package/client/components/ui/empty-state.tsx +197 -0
  33. package/client/components/ui/file-upload.tsx +214 -0
  34. package/client/components/ui/footer.tsx +179 -0
  35. package/client/components/ui/layout.tsx +1182 -0
  36. package/client/components/ui/pagination-v01.tsx +157 -0
  37. package/client/components/ui/password-field-v01.tsx +67 -0
  38. package/client/components/ui/search-field-v01.tsx +192 -0
  39. package/client/components/ui/section-heading.tsx +49 -0
  40. package/client/components/ui/sidebar.tsx +2 -3
  41. package/client/components/ui/stepper.tsx +148 -0
  42. package/client/components/ui/switch-v01.tsx +71 -0
  43. package/client/components/ui/system-bar.tsx +119 -0
  44. package/client/components/ui/table-v01.tsx +230 -0
  45. package/client/components/ui/tabs-v01.tsx +99 -0
  46. package/client/components/ui/tag-v02.tsx +113 -0
  47. package/client/components/ui/text-area-v01.tsx +33 -0
  48. package/client/components/ui/text-field-v01.tsx +108 -0
  49. package/client/components/ui/timeline.tsx +181 -0
  50. package/client/components/ui/toast-v01.tsx +206 -0
  51. package/client/components/ui/tooltip.tsx +264 -71
  52. package/client/global.css +9565 -4378
  53. package/client/storybook.css +125 -0
  54. package/client/ui/Accordion.stories.tsx +1 -1
  55. package/client/ui/AlertDialogPanel/AlertDialogPanel.stories.tsx +150 -0
  56. package/client/ui/AlertV02/AlertV02.stories.tsx +188 -0
  57. package/client/ui/AppBar/app-bar.stories.tsx +280 -0
  58. package/client/ui/AspectRatio.stories.tsx +1 -1
  59. package/client/ui/AvatarIdentity/AvatarIdentity.stories.tsx +77 -0
  60. package/client/ui/Banner/banner.stories.tsx +238 -0
  61. package/client/ui/BottomNavigation/bottom-navigation.stories.tsx +285 -0
  62. package/client/ui/BreadcrumbTrail/BreadcrumbTrail.stories.tsx +232 -0
  63. package/client/ui/Button.stories.tsx +1 -1
  64. package/client/ui/ButtonV01/ButtonV01.stories.tsx +417 -0
  65. package/client/ui/Calendar/Calendar.stories.tsx +1 -1
  66. package/client/ui/Card.stories.tsx +285 -168
  67. package/client/ui/Carousel/Carousel.stories.tsx +1 -1
  68. package/client/ui/Chart/Chart.stories.tsx +1 -1
  69. package/client/ui/Checkbox.stories.tsx +1 -1
  70. package/client/ui/Collapsible/Collapsible.stories.tsx +1 -1
  71. package/client/ui/Colors.stories.tsx +1 -1
  72. package/client/ui/Command/Command.stories.tsx +1 -1
  73. package/client/ui/ContextMenu/ContextMenu.stories.tsx +1 -1
  74. package/client/ui/DatePicker/DatePicker.stories.tsx +293 -0
  75. package/client/ui/Dialog.stories.tsx +1 -1
  76. package/client/ui/Drawer/Drawer.stories.tsx +1 -1
  77. package/client/ui/Dropdown/Dropdown.stories.tsx +205 -0
  78. package/client/ui/EmptyState/empty-state.stories.tsx +251 -0
  79. package/client/ui/FileUpload/FileUpload.stories.tsx +218 -0
  80. package/client/ui/Footer/footer.stories.tsx +194 -0
  81. package/client/ui/Form/Form.stories.tsx +1 -1
  82. package/client/ui/Hero.stories.tsx +1 -1
  83. package/client/ui/HoverCard/HoverCard.stories.tsx +1 -1
  84. package/client/ui/Icons.stories.tsx +1 -1
  85. package/client/ui/Input.stories.tsx +1 -1
  86. package/client/ui/InputOTP/InputOTP.stories.tsx +1 -1
  87. package/client/ui/Label.stories.tsx +1 -1
  88. package/client/ui/Layout/Center.stories.tsx +100 -0
  89. package/client/ui/Layout/Columns.stories.tsx +136 -0
  90. package/client/ui/Layout/Container.stories.tsx +104 -0
  91. package/client/ui/Layout/FormLayout.stories.tsx +144 -0
  92. package/client/ui/Layout/Grid.stories.tsx +158 -0
  93. package/client/ui/Layout/GridSpan.stories.tsx +75 -0
  94. package/client/ui/Layout/HStack.stories.tsx +128 -0
  95. package/client/ui/Layout/Layout.stories.tsx +287 -0
  96. package/client/ui/Layout/LayoutContent.stories.tsx +91 -0
  97. package/client/ui/Layout/LayoutFooter.stories.tsx +77 -0
  98. package/client/ui/Layout/LayoutHeader.stories.tsx +104 -0
  99. package/client/ui/Layout/LayoutPanel.stories.tsx +143 -0
  100. package/client/ui/Layout/Positioned.stories.tsx +113 -0
  101. package/client/ui/Layout/Section.stories.tsx +84 -0
  102. package/client/ui/Layout/ShowHide.stories.tsx +99 -0
  103. package/client/ui/Layout/Spacer.stories.tsx +149 -0
  104. package/client/ui/Layout/Stack.stories.tsx +69 -0
  105. package/client/ui/Layout/StackItem.stories.tsx +124 -0
  106. package/client/ui/Layout/VStack.stories.tsx +101 -0
  107. package/client/ui/Layout/controls.ts +33 -0
  108. package/client/ui/Layout/demo.tsx +37 -0
  109. package/client/ui/Menubar/Menubar.stories.tsx +1 -1
  110. package/client/ui/MobileNav.stories.tsx +1 -1
  111. package/client/ui/Navigation.stories.tsx +1 -1
  112. package/client/ui/NavigationMenu/NavigationMenu.stories.tsx +1 -1
  113. package/client/ui/PageHeader.stories.tsx +13 -13
  114. package/client/ui/Pagination/Pagination.stories.tsx +178 -98
  115. package/client/ui/Pagination/PaginationLegacy.stories.tsx +121 -0
  116. package/client/ui/Panel.stories.tsx +1 -1
  117. package/client/ui/Popover/Popover.stories.tsx +1 -1
  118. package/client/ui/Progress/Progress.stories.tsx +1 -1
  119. package/client/ui/RadioGroup/RadioGroup.stories.tsx +1 -1
  120. package/client/ui/Resizable/Resizable.stories.tsx +1 -1
  121. package/client/ui/ScrollArea/ScrollArea.stories.tsx +1 -1
  122. package/client/ui/SearchField/SearchField.stories.tsx +153 -0
  123. package/client/ui/{SearchField.stories.tsx → SearchField/SearchFieldLegacy.stories.tsx} +2 -2
  124. package/client/ui/SectionBadge.stories.tsx +1 -1
  125. package/client/ui/Select.stories.tsx +1 -1
  126. package/client/ui/Separator/Separator.stories.tsx +1 -1
  127. package/client/ui/Sheet/Sheet.stories.tsx +1 -1
  128. package/client/ui/Sidebar/Sidebar.stories.tsx +57 -8
  129. package/client/ui/Skeleton/Skeleton.stories.tsx +1 -1
  130. package/client/ui/Slider/Slider.stories.tsx +1 -1
  131. package/client/ui/StandardNavigation.stories.tsx +1 -1
  132. package/client/ui/Stepper/Stepper.stories.tsx +344 -0
  133. package/client/ui/Switch.stories.tsx +1 -1
  134. package/client/ui/SwitchV01/SwitchV01.stories.tsx +152 -0
  135. package/client/ui/SystemBar/system-bar.stories.tsx +179 -0
  136. package/client/ui/Table/TableV01.stories.tsx +256 -0
  137. package/client/ui/Tabs.stories.tsx +1 -1
  138. package/client/ui/TabsV01/TabsV01.stories.tsx +144 -0
  139. package/client/ui/Tag.stories.tsx +1 -1
  140. package/client/ui/TagV02/TagStatusV02.stories.tsx +132 -0
  141. package/client/ui/TagV02/TagV02.stories.tsx +142 -0
  142. package/client/ui/TextAreaV01/TextAreaV01.stories.tsx +146 -0
  143. package/client/ui/TextFieldV01/PasswordFieldV01.stories.tsx +161 -0
  144. package/client/ui/TextFieldV01/TextFieldV01.stories.tsx +160 -0
  145. package/client/ui/Textarea.stories.tsx +1 -1
  146. package/client/ui/Timeline/timeline.stories.tsx +404 -0
  147. package/client/ui/Toast/Toast.stories.tsx +1 -1
  148. package/client/ui/ToastV01/ToastV01.stories.tsx +201 -0
  149. package/client/ui/Toaster/Toaster.stories.tsx +1 -1
  150. package/client/ui/Toggle.stories.tsx +1 -1
  151. package/client/ui/Tooltip.stories.tsx +287 -114
  152. package/client/ui/Typography.stories.tsx +1 -1
  153. package/dist/index.cjs.js +1 -1
  154. package/dist/index.d.ts +649 -13
  155. package/dist/index.es.js +4401 -651
  156. package/package.json +1 -1
  157. package/client/components/ui/badge.tsx +0 -33
  158. package/client/components/ui/sonner.tsx +0 -26
  159. package/client/components/ui/toggle-group.tsx +0 -76
  160. package/client/ui/Alert/Alert.stories.tsx +0 -82
  161. package/client/ui/AlertDialog/AlertDialog.stories.tsx +0 -106
  162. package/client/ui/Avatar/Avatar.stories.tsx +0 -94
  163. package/client/ui/Badge/Badge.stories.tsx +0 -60
  164. package/client/ui/Breadcrumb/Breadcrumb.stories.tsx +0 -97
  165. package/client/ui/DropdownMenu/DropdownMenu.stories.tsx +0 -139
  166. package/client/ui/Sonner/Sonner.stories.tsx +0 -48
  167. package/client/ui/Table/Table.stories.tsx +0 -135
  168. package/client/ui/ToggleGroup/ToggleGroup.stories.tsx +0 -88
@@ -1,115 +1,195 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react";
2
+ import { useState } from "react";
2
3
  import {
3
- Pagination,
4
- PaginationContent,
5
- PaginationEllipsis,
6
- PaginationItem,
7
- PaginationLink,
8
- PaginationNext,
9
- PaginationPrevious,
10
- } from "../../components/ui/pagination";
4
+ PaginationV01,
5
+ PaginationV01Ellipsis,
6
+ PaginationV01Next,
7
+ PaginationV01Page,
8
+ PaginationV01Previous,
9
+ type PaginationV01State,
10
+ } from "../../components/ui/pagination-v01";
11
+
12
+ /** Args for the playground stories: one row of parts, driven from Controls. */
13
+ type RowArgs = {
14
+ state: PaginationV01State;
15
+ page: string;
16
+ showPage: boolean;
17
+ showEllipsis: boolean;
18
+ previousLabel: string;
19
+ nextLabel: string;
20
+ };
11
21
 
12
22
  const meta = {
13
- title: "UI/Pagination",
14
- component: Pagination,
23
+ title: "Components/Pagination",
24
+ component: PaginationV01,
15
25
  tags: ["autodocs"],
16
26
  parameters: {
17
- layout: "padded",
27
+ layout: "centered",
28
+ docs: {
29
+ description: {
30
+ component: [
31
+ "Page navigation: Previous, Next, page number and ellipsis — each with a `default`, `active` and `disabled` state.",
32
+ "Existing `Draft/Pagination Legacy` (`Pagination`) is unchanged.",
33
+ "",
34
+ "---",
35
+ "",
36
+ "## Import",
37
+ "",
38
+ "```tsx",
39
+ `import {`,
40
+ ` PaginationV01,`,
41
+ ` PaginationV01Previous,`,
42
+ ` PaginationV01Page,`,
43
+ ` PaginationV01Ellipsis,`,
44
+ ` PaginationV01Next,`,
45
+ `} from "@syscore/ui-library"`,
46
+ "```",
47
+ "",
48
+ "## How to use",
49
+ "",
50
+ "```tsx",
51
+ "<PaginationV01>",
52
+ " <PaginationV01Previous onClick={goPrev} />",
53
+ " <PaginationV01Page>1</PaginationV01Page>",
54
+ " <PaginationV01Page current>2</PaginationV01Page>",
55
+ " <PaginationV01Ellipsis />",
56
+ " <PaginationV01Next onClick={goNext} />",
57
+ "</PaginationV01>",
58
+ "```",
59
+ "",
60
+ "| Part | Prop | Values | Default | Effect |",
61
+ "|------|------|--------|---------|--------|",
62
+ "| Previous / Next / Page / Ellipsis | `state` | `default` `active` `disabled` | `default` | Color / chrome |",
63
+ '| Page | `current` | boolean | `false` | Same as `state="active"` (cyan-50 fill, cyan-300 border) |',
64
+ ].join("\n"),
65
+ },
66
+ },
67
+ },
68
+ argTypes: {
69
+ state: {
70
+ control: "inline-radio",
71
+ options: ["default", "active", "disabled"],
72
+ description: "Applied to every part in the row.",
73
+ table: { defaultValue: { summary: "default" } },
74
+ },
75
+ page: {
76
+ control: "text",
77
+ description: "Label on the page-number part.",
78
+ table: { defaultValue: { summary: "1" } },
79
+ },
80
+ showPage: {
81
+ control: "boolean",
82
+ description: "Render the page-number part.",
83
+ },
84
+ showEllipsis: {
85
+ control: "boolean",
86
+ description: "Render the ellipsis part.",
87
+ },
88
+ previousLabel: { control: "text" },
89
+ nextLabel: { control: "text" },
90
+ },
91
+ args: {
92
+ state: "default",
93
+ page: "1",
94
+ showPage: true,
95
+ showEllipsis: true,
96
+ previousLabel: "Previous",
97
+ nextLabel: "Next",
18
98
  },
19
- } satisfies Meta<typeof Pagination>;
99
+ } satisfies Meta<RowArgs>;
20
100
 
21
101
  export default meta;
102
+ type Story = StoryObj<RowArgs>;
22
103
 
23
- type Story = StoryObj<typeof meta>;
104
+ function Parts({
105
+ state,
106
+ page = "1",
107
+ showPage = true,
108
+ showEllipsis = true,
109
+ previousLabel = "Previous",
110
+ nextLabel = "Next",
111
+ }: Partial<RowArgs> & { state: PaginationV01State }) {
112
+ return (
113
+ <div className="sb-pagination-spec">
114
+ <PaginationV01Previous state={state}>
115
+ {previousLabel}
116
+ </PaginationV01Previous>
117
+ {showPage ? (
118
+ <PaginationV01Page state={state}>{page}</PaginationV01Page>
119
+ ) : null}
120
+ {showEllipsis ? <PaginationV01Ellipsis state={state} /> : null}
121
+ <PaginationV01Next state={state}>{nextLabel}</PaginationV01Next>
122
+ </div>
123
+ );
124
+ }
24
125
 
25
- export const Default: Story = {
26
- render: () => (
27
- <Pagination>
28
- <PaginationContent>
29
- <PaginationItem>
30
- <PaginationPrevious href="#" />
31
- </PaginationItem>
32
- <PaginationItem>
33
- <PaginationLink href="#">1</PaginationLink>
34
- </PaginationItem>
35
- <PaginationItem>
36
- <PaginationLink href="#" isActive>
37
- 2
38
- </PaginationLink>
39
- </PaginationItem>
40
- <PaginationItem>
41
- <PaginationLink href="#">3</PaginationLink>
42
- </PaginationItem>
43
- <PaginationItem>
44
- <PaginationEllipsis />
45
- </PaginationItem>
46
- <PaginationItem>
47
- <PaginationNext href="#" />
48
- </PaginationItem>
49
- </PaginationContent>
50
- </Pagination>
51
- ),
52
- };
126
+ const stateStory = (state: PaginationV01State): Story => ({
127
+ args: { state },
128
+ parameters: {
129
+ docs: {
130
+ description: {
131
+ story:
132
+ "Previous, page number, ellipsis, Next. Use `showPage` / `showEllipsis` to drop a part and `page` to change the number.",
133
+ },
134
+ },
135
+ },
136
+ render: (args) => <Parts {...args} />,
137
+ });
138
+
139
+ export const Default: Story = stateStory("default");
140
+
141
+ export const Active: Story = stateStory("active");
142
+
143
+ export const Disabled: Story = stateStory("disabled");
53
144
 
54
- export const Extended: Story = {
145
+ export const AllVariants: Story = {
146
+ name: "All variants",
147
+ parameters: { controls: { disable: true } },
55
148
  render: () => (
56
- <Pagination>
57
- <PaginationContent>
58
- <PaginationItem>
59
- <PaginationPrevious href="#" />
60
- </PaginationItem>
61
- {[1, 2, 3, 4, 5, 6, 7, 8].map((page) => (
62
- <PaginationItem key={page}>
63
- <PaginationLink href="#" isActive={page === 3}>
64
- {page}
65
- </PaginationLink>
66
- </PaginationItem>
67
- ))}
68
- <PaginationItem>
69
- <PaginationEllipsis />
70
- </PaginationItem>
71
- <PaginationItem>
72
- <PaginationNext href="#" />
73
- </PaginationItem>
74
- </PaginationContent>
75
- </Pagination>
149
+ <div className="sb-pagination-matrix">
150
+ {(["default", "active", "disabled"] as const).map((state) => (
151
+ <div key={state} className="sb-pagination-row">
152
+ <span className="sb-pagination-label font-mazzardSoft">{state}</span>
153
+ <Parts state={state} />
154
+ </div>
155
+ ))}
156
+ </div>
76
157
  ),
77
158
  };
78
159
 
79
- export const WithEllipsis: Story = {
80
- render: () => (
81
- <Pagination>
82
- <PaginationContent>
83
- <PaginationItem>
84
- <PaginationPrevious href="#" />
85
- </PaginationItem>
86
- <PaginationItem>
87
- <PaginationLink href="#">1</PaginationLink>
88
- </PaginationItem>
89
- <PaginationItem>
90
- <PaginationEllipsis />
91
- </PaginationItem>
92
- <PaginationItem>
93
- <PaginationLink href="#">10</PaginationLink>
94
- </PaginationItem>
95
- <PaginationItem>
96
- <PaginationLink href="#" isActive>
97
- 11
98
- </PaginationLink>
99
- </PaginationItem>
100
- <PaginationItem>
101
- <PaginationLink href="#">12</PaginationLink>
102
- </PaginationItem>
103
- <PaginationItem>
104
- <PaginationEllipsis />
105
- </PaginationItem>
106
- <PaginationItem>
107
- <PaginationLink href="#">20</PaginationLink>
108
- </PaginationItem>
109
- <PaginationItem>
110
- <PaginationNext href="#" />
111
- </PaginationItem>
112
- </PaginationContent>
113
- </Pagination>
114
- ),
160
+ export const InABar: Story = {
161
+ name: "In a bar",
162
+ parameters: { controls: { disable: true } },
163
+ render: function InABarStory() {
164
+ const [page, setPage] = useState(2);
165
+ const last = 12;
166
+ return (
167
+ <PaginationV01>
168
+ <PaginationV01Previous
169
+ state={page === 1 ? "disabled" : "default"}
170
+ onClick={() => setPage((p) => Math.max(1, p - 1))}
171
+ />
172
+ <PaginationV01Page current={page === 1} onClick={() => setPage(1)}>
173
+ 1
174
+ </PaginationV01Page>
175
+ {page > 3 ? <PaginationV01Ellipsis /> : null}
176
+ {page !== 1 && page !== last ? (
177
+ <PaginationV01Page current onClick={() => setPage(page)}>
178
+ {page}
179
+ </PaginationV01Page>
180
+ ) : null}
181
+ {page < last - 2 ? <PaginationV01Ellipsis /> : null}
182
+ <PaginationV01Page
183
+ current={page === last}
184
+ onClick={() => setPage(last)}
185
+ >
186
+ {last}
187
+ </PaginationV01Page>
188
+ <PaginationV01Next
189
+ state={page === last ? "disabled" : "default"}
190
+ onClick={() => setPage((p) => Math.min(last, p + 1))}
191
+ />
192
+ </PaginationV01>
193
+ );
194
+ },
115
195
  };
@@ -0,0 +1,121 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import {
3
+ Pagination,
4
+ PaginationContent,
5
+ PaginationEllipsis,
6
+ PaginationItem,
7
+ PaginationLink,
8
+ PaginationNext,
9
+ PaginationPrevious,
10
+ } from "../../components/ui/pagination";
11
+
12
+ const meta = {
13
+ title: "Draft/Pagination Legacy",
14
+ component: Pagination,
15
+ tags: ["autodocs"],
16
+ parameters: {
17
+ layout: "padded",
18
+ docs: {
19
+ description: {
20
+ component:
21
+ "Previous pagination (shadcn). Unchanged. New work should use `PaginationV01` under Components/Pagination.",
22
+ },
23
+ },
24
+ },
25
+ } satisfies Meta<typeof Pagination>;
26
+
27
+ export default meta;
28
+
29
+ type Story = StoryObj<typeof meta>;
30
+
31
+ export const Default: Story = {
32
+ render: () => (
33
+ <Pagination>
34
+ <PaginationContent>
35
+ <PaginationItem>
36
+ <PaginationPrevious href="#" />
37
+ </PaginationItem>
38
+ <PaginationItem>
39
+ <PaginationLink href="#">1</PaginationLink>
40
+ </PaginationItem>
41
+ <PaginationItem>
42
+ <PaginationLink href="#" isActive>
43
+ 2
44
+ </PaginationLink>
45
+ </PaginationItem>
46
+ <PaginationItem>
47
+ <PaginationLink href="#">3</PaginationLink>
48
+ </PaginationItem>
49
+ <PaginationItem>
50
+ <PaginationEllipsis />
51
+ </PaginationItem>
52
+ <PaginationItem>
53
+ <PaginationNext href="#" />
54
+ </PaginationItem>
55
+ </PaginationContent>
56
+ </Pagination>
57
+ ),
58
+ };
59
+
60
+ export const Extended: Story = {
61
+ render: () => (
62
+ <Pagination>
63
+ <PaginationContent>
64
+ <PaginationItem>
65
+ <PaginationPrevious href="#" />
66
+ </PaginationItem>
67
+ {[1, 2, 3, 4, 5, 6, 7, 8].map((page) => (
68
+ <PaginationItem key={page}>
69
+ <PaginationLink href="#" isActive={page === 3}>
70
+ {page}
71
+ </PaginationLink>
72
+ </PaginationItem>
73
+ ))}
74
+ <PaginationItem>
75
+ <PaginationEllipsis />
76
+ </PaginationItem>
77
+ <PaginationItem>
78
+ <PaginationNext href="#" />
79
+ </PaginationItem>
80
+ </PaginationContent>
81
+ </Pagination>
82
+ ),
83
+ };
84
+
85
+ export const WithEllipsis: Story = {
86
+ render: () => (
87
+ <Pagination>
88
+ <PaginationContent>
89
+ <PaginationItem>
90
+ <PaginationPrevious href="#" />
91
+ </PaginationItem>
92
+ <PaginationItem>
93
+ <PaginationLink href="#">1</PaginationLink>
94
+ </PaginationItem>
95
+ <PaginationItem>
96
+ <PaginationEllipsis />
97
+ </PaginationItem>
98
+ <PaginationItem>
99
+ <PaginationLink href="#">10</PaginationLink>
100
+ </PaginationItem>
101
+ <PaginationItem>
102
+ <PaginationLink href="#" isActive>
103
+ 11
104
+ </PaginationLink>
105
+ </PaginationItem>
106
+ <PaginationItem>
107
+ <PaginationLink href="#">12</PaginationLink>
108
+ </PaginationItem>
109
+ <PaginationItem>
110
+ <PaginationEllipsis />
111
+ </PaginationItem>
112
+ <PaginationItem>
113
+ <PaginationLink href="#">20</PaginationLink>
114
+ </PaginationItem>
115
+ <PaginationItem>
116
+ <PaginationNext href="#" />
117
+ </PaginationItem>
118
+ </PaginationContent>
119
+ </Pagination>
120
+ ),
121
+ };
@@ -544,7 +544,7 @@ export const ExploreSidePanel = {
544
544
  };
545
545
 
546
546
  const meta = {
547
- title: "Review/Panel",
547
+ title: "Components/Panel",
548
548
  component: ExploreSidePanelView,
549
549
  tags: ["autodocs"],
550
550
  parameters: {
@@ -8,7 +8,7 @@ import { Button } from "../../components/ui/button";
8
8
  import { useState } from "react";
9
9
 
10
10
  const meta = {
11
- title: "UI/Popover",
11
+ title: "Draft/Popover",
12
12
  component: Popover,
13
13
  tags: ["autodocs"],
14
14
  parameters: {
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Progress } from "../../components/ui/progress";
3
3
 
4
4
  const meta = {
5
- title: "UI/Progress",
5
+ title: "Components/Progress",
6
6
  component: Progress,
7
7
  tags: ["autodocs"],
8
8
  parameters: {
@@ -4,7 +4,7 @@ import { Label } from "../../components/ui/label";
4
4
  import { useState } from "react";
5
5
 
6
6
  const meta = {
7
- title: "UI/RadioGroup",
7
+ title: "Components/RadioGroup",
8
8
  component: RadioGroup,
9
9
  tags: ["autodocs"],
10
10
  parameters: {
@@ -6,7 +6,7 @@ import {
6
6
  } from "../../components/ui/resizable";
7
7
 
8
8
  const meta = {
9
- title: "UI/Resizable",
9
+ title: "Draft/Resizable",
10
10
  component: ResizablePanelGroup,
11
11
  tags: ["autodocs"],
12
12
  parameters: {
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { ScrollArea } from "../../components/ui/scroll-area";
3
3
 
4
4
  const meta = {
5
- title: "UI/ScrollArea",
5
+ title: "Draft/ScrollArea",
6
6
  component: ScrollArea,
7
7
  tags: ["autodocs"],
8
8
  parameters: {
@@ -0,0 +1,153 @@
1
+ import type { Meta, StoryObj } from "@storybook/react";
2
+ import { useState } from "react";
3
+ import {
4
+ SearchFieldV01,
5
+ type SearchFieldV01Props,
6
+ type SearchFieldV01State,
7
+ } from "../../components/ui/search-field-v01";
8
+
9
+ const meta = {
10
+ title: "Components/SearchField",
11
+ component: SearchFieldV01,
12
+ tags: ["autodocs"],
13
+ parameters: {
14
+ layout: "centered",
15
+ docs: {
16
+ description: {
17
+ component: [
18
+ "Search input with inline typeahead and a clear button.",
19
+ "",
20
+ "```tsx",
21
+ `import { SearchFieldV01 } from "@syscore/ui-library"`,
22
+ "",
23
+ '<SearchFieldV01 placeholder="Search projects" onClear={clear} />',
24
+ "```",
25
+ "",
26
+ "The state is derived from focus and value, so you normally pass nothing:",
27
+ "",
28
+ "| | empty | has value |",
29
+ "|---|---|---|",
30
+ "| **blurred** | search icon + placeholder | value + clear button |",
31
+ "| **focused** | cyan border, icon hidden | cyan border, typeahead + Enter |",
32
+ "",
33
+ "Pass `state` only to pin one for a spec or a screenshot.",
34
+ "",
35
+ "| Prop | Values | Default |",
36
+ "|------|--------|---------|",
37
+ "| `state` | `default` \\| `focus` \\| `active` \\| `filled` \\| `disabled` | derived |",
38
+ "| `suggestion` | inline typeahead remainder shown after the value | — |",
39
+ "| `onClear` | shows the clear button once there is a value | — |",
40
+ "| `placeholder` | `string` | `Placeholder` |",
41
+ "",
42
+ "Anything else is forwarded to the `<input>`.",
43
+ ].join("\n"),
44
+ },
45
+ },
46
+ },
47
+ argTypes: {
48
+ state: {
49
+ control: "inline-radio",
50
+ options: ["default", "focus", "active", "filled", "disabled"],
51
+ },
52
+ placeholder: { control: "text" },
53
+ suggestion: { control: "text" },
54
+ value: { control: "text" },
55
+ onClear: { table: { disable: true } },
56
+ containerClassName: { table: { disable: true } },
57
+ },
58
+ args: {
59
+ placeholder: "Placeholder",
60
+ },
61
+ } satisfies Meta<typeof SearchFieldV01>;
62
+
63
+ export default meta;
64
+ type Story = StoryObj<typeof meta>;
65
+
66
+ const STATES: SearchFieldV01State[] = [
67
+ "default",
68
+ "focus",
69
+ "active",
70
+ "filled",
71
+ "disabled",
72
+ ];
73
+
74
+ /** Each story pins one state so every variant is visible without interacting. */
75
+ const stateArgs: Record<SearchFieldV01State, Partial<SearchFieldV01Props>> = {
76
+ default: {},
77
+ focus: {},
78
+ active: { value: "Entry", suggestion: "typeahead" },
79
+ filled: { value: "Entry" },
80
+ disabled: {},
81
+ };
82
+
83
+ export const Default: Story = {
84
+ args: { state: "default" },
85
+ };
86
+
87
+ export const Focus: Story = {
88
+ args: { state: "focus" },
89
+ };
90
+
91
+ export const Active: Story = {
92
+ args: { state: "active", value: "Entry", suggestion: "typeahead" },
93
+ };
94
+
95
+ export const Filled: Story = {
96
+ args: { state: "filled", value: "Entry", onClear: () => {} },
97
+ };
98
+
99
+ export const Disabled: Story = {
100
+ args: { state: "disabled" },
101
+ };
102
+
103
+ export const AllVariants: Story = {
104
+ name: "All variants",
105
+ parameters: {
106
+ controls: { disable: true },
107
+ docs: {
108
+ description: {
109
+ story: "Every state, one row each.",
110
+ },
111
+ },
112
+ },
113
+ render: () => (
114
+ <div className="sb-searchfield-matrix">
115
+ {STATES.map((state) => (
116
+ <div key={state} className="sb-searchfield-row">
117
+ <span className="sb-searchfield-label font-mazzardSoft">{state}</span>
118
+ <SearchFieldV01
119
+ state={state}
120
+ placeholder="Placeholder"
121
+ onClear={() => {}}
122
+ {...stateArgs[state]}
123
+ />
124
+ </div>
125
+ ))}
126
+ </div>
127
+ ),
128
+ };
129
+
130
+ export const Interactive: Story = {
131
+ name: "Interactive",
132
+ parameters: {
133
+ controls: { disable: true },
134
+ docs: {
135
+ description: {
136
+ story:
137
+ "No pinned `state` — focus it, type, and blur to move through default, focus, active and filled.",
138
+ },
139
+ },
140
+ },
141
+ render: function InteractiveField() {
142
+ const [value, setValue] = useState("");
143
+ return (
144
+ <SearchFieldV01
145
+ value={value}
146
+ suggestion={value === "Ent" ? "ry" : undefined}
147
+ placeholder="Placeholder"
148
+ onChange={(event) => setValue(event.target.value)}
149
+ onClear={() => setValue("")}
150
+ />
151
+ );
152
+ },
153
+ };
@@ -1,8 +1,8 @@
1
1
  import type { Meta, StoryObj } from "@storybook/react";
2
- import { SearchField } from "../components/ui/search";
2
+ import { SearchField } from "../../components/ui/search";
3
3
 
4
4
  const meta = {
5
- title: "Review/SearchField",
5
+ title: "Draft/SearchField Legacy",
6
6
  component: SearchField,
7
7
  tags: ["autodocs"],
8
8
  parameters: {
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { SectionBadge } from "../components/ui/section-badge";
3
3
 
4
4
  const meta = {
5
- title: "Review/SectionBadge",
5
+ title: "Components/SectionBadge",
6
6
  component: SectionBadge,
7
7
  tags: ["autodocs"],
8
8
  parameters: {
@@ -9,7 +9,7 @@ import {
9
9
  import { useState } from "react";
10
10
 
11
11
  const meta = {
12
- title: "Review/Select",
12
+ title: "Components/Select",
13
13
  component: Select,
14
14
  tags: ["autodocs"],
15
15
  parameters: {
@@ -2,7 +2,7 @@ import type { Meta, StoryObj } from "@storybook/react";
2
2
  import { Separator } from "../../components/ui/separator";
3
3
 
4
4
  const meta = {
5
- title: "UI/Separator",
5
+ title: "Components/Separator",
6
6
  component: Separator,
7
7
  tags: ["autodocs"],
8
8
  parameters: {
@@ -12,7 +12,7 @@ import { Button } from "../../components/ui/button";
12
12
  import { useState } from "react";
13
13
 
14
14
  const meta = {
15
- title: "UI/Sheet",
15
+ title: "Components/Sheet",
16
16
  component: Sheet,
17
17
  tags: ["autodocs"],
18
18
  parameters: {