@suphark/ui 0.27.0 → 0.28.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 (48) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +2 -1
  3. package/package.json +1 -1
  4. package/src/components/app-shell/app-shell.tsx +11 -2
  5. package/src/components/app-shell/organization-switcher.tsx +1 -1
  6. package/src/components/app-shell/user-menu.tsx +1 -1
  7. package/src/components/data-table/data-table-column-header.tsx +1 -1
  8. package/src/components/data-table/data-table-faceted-filter.tsx +1 -1
  9. package/src/components/data-table/data-table-pagination.tsx +9 -4
  10. package/src/components/data-table/data-table-row-actions.tsx +24 -12
  11. package/src/components/data-table/data-table-view-option.tsx +1 -1
  12. package/src/components/data-table/data-table.tsx +3 -1
  13. package/src/components/design-system/sections/hero-specimen.tsx +1 -1
  14. package/src/components/design-system/sections/showcase-data-display.tsx +1 -1
  15. package/src/components/design-system/sections/showcase-feedback.tsx +1 -1
  16. package/src/components/design-system/sections/showcase-forms.tsx +1 -1
  17. package/src/components/design-system/sections/showcase-guidelines-recipes.tsx +1 -1
  18. package/src/components/design-system/sections/showcase-overlays-navigation.tsx +1 -1
  19. package/src/components/design-system/sections/showcase-overview.tsx +1 -1
  20. package/src/components/design-system/sections/showcase-primitives.tsx +1 -1
  21. package/src/components/pwa/pwa-install-card.tsx +1 -1
  22. package/src/components/shared/action-form.tsx +1 -1
  23. package/src/components/shared/activity-feed.tsx +114 -0
  24. package/src/components/shared/button/base/action-button.tsx +8 -3
  25. package/src/components/shared/button/base/link-button.tsx +3 -1
  26. package/src/components/shared/button/button.tsx +8 -1
  27. package/src/components/shared/button/copy-button.tsx +1 -1
  28. package/src/components/shared/button/floating-save-button.tsx +1 -1
  29. package/src/components/shared/combobox.tsx +1 -1
  30. package/src/components/shared/date/date-range-picker.tsx +1 -1
  31. package/src/components/shared/dropzone.tsx +1 -1
  32. package/src/components/shared/env-snippet.tsx +1 -1
  33. package/src/components/shared/filter-bar.tsx +1 -1
  34. package/src/components/shared/form/date-time-picker.tsx +1 -1
  35. package/src/components/shared/form/form-field-combobox.tsx +1 -1
  36. package/src/components/shared/form/form-field-select.tsx +1 -1
  37. package/src/components/shared/form-dialog.tsx +1 -1
  38. package/src/components/shared/inline-edit.tsx +175 -0
  39. package/src/components/shared/language/language-switch.tsx +1 -1
  40. package/src/components/shared/layout/error-state.tsx +2 -1
  41. package/src/components/shared/multi-select-combobox.tsx +1 -1
  42. package/src/components/shared/selection-bar.tsx +94 -0
  43. package/src/components/shared/selection-button.tsx +1 -1
  44. package/src/components/shared/simple-table.tsx +51 -2
  45. package/src/components/shared/simple-tabs.tsx +54 -13
  46. package/src/components/shared/step-form.tsx +1 -1
  47. package/src/components/shared/ui-text.tsx +47 -0
  48. package/src/index.ts +11 -0
@@ -20,6 +20,23 @@ export interface UiText {
20
20
  confirmTitle?: string;
21
21
  /** RowActions/ConfirmActionButton: action โยน error (optional — ค่าเริ่มต้น "ดำเนินการไม่สำเร็จ") */
22
22
  actionFailed?: string;
23
+ /** InlineEdit: ปุ่มดินสอ (optional — "แก้ไข") */
24
+ edit?: string;
25
+ /** SelectionBar (optional) — `selected` ใช้ `{count}` */
26
+ selection?: Partial<{ selected: string; clear: string }>;
27
+ /** DataTable (optional) — `rowsSelected` ใช้ `{selected}`/`{total}`, `pageOf` ใช้ `{page}`/`{pages}` */
28
+ table?: Partial<{
29
+ rowsPerPage: string;
30
+ pageOf: string;
31
+ rowsSelected: string;
32
+ noResults: string;
33
+ deleteTitle: string;
34
+ /** ใช้ `{name}` และ `{resource}` (ชื่อชนิดข้อมูลที่ส่งมาทาง `resourceName`) */
35
+ deleteDescription: string;
36
+ deleting: string;
37
+ deleted: string;
38
+ delete: string;
39
+ }>;
23
40
  /** DialogsProvider: ปุ่มปิดของ alert (optional — ค่าเริ่มต้น "ตกลง") */
24
41
  ok?: string;
25
42
  /** DialogsProvider: หัวกล่อง alert (optional — ค่าเริ่มต้น "แจ้งให้ทราบ") */
@@ -43,6 +60,8 @@ export interface UiText {
43
60
  switcher?: Partial<{ choose: string; organization: string }>;
44
61
  /** UserMenu: aria-label ปุ่มเปิดเมนู (optional — "เมนูผู้ใช้") */
45
62
  userMenu?: string;
63
+ /** AppShell: ปุ่มย่อ/ขยายเมนูข้าง (optional — "ย่อ/ขยายเมนู") */
64
+ toggleSidebar?: string;
46
65
  /** UserMenu: ปุ่มออกจากระบบ (optional — "ออกจากระบบ") */
47
66
  signOut?: string;
48
67
  /** ThemeMenuItems: หัวกลุ่ม + ตัวเลือก (optional) */
@@ -133,6 +152,19 @@ export const UI_TEXT_TH: UiText = {
133
152
  confirm: "ยืนยัน",
134
153
  confirmTitle: "ยืนยันการทำรายการ",
135
154
  actionFailed: "ดำเนินการไม่สำเร็จ",
155
+ edit: "แก้ไข",
156
+ selection: { selected: "เลือก {count} รายการ", clear: "ล้างการเลือก" },
157
+ table: {
158
+ rowsPerPage: "แถวต่อหน้า",
159
+ pageOf: "หน้า {page} จาก {pages}",
160
+ rowsSelected: "เลือก {selected} จาก {total} แถว",
161
+ noResults: "ไม่พบข้อมูล",
162
+ deleteTitle: "ยืนยันการลบ",
163
+ deleteDescription: "ลบ{resource} “{name}” แล้วกู้คืนไม่ได้",
164
+ deleting: "กำลังลบ{resource} “{name}”…",
165
+ deleted: "ลบ{resource} “{name}” แล้ว",
166
+ delete: "ลบ",
167
+ },
136
168
  ok: "ตกลง",
137
169
  alertTitle: "แจ้งให้ทราบ",
138
170
  promptTitle: "กรอกข้อมูล",
@@ -148,6 +180,7 @@ export const UI_TEXT_TH: UiText = {
148
180
  },
149
181
  switcher: { choose: "เลือกองค์กร", organization: "องค์กร" },
150
182
  userMenu: "เมนูผู้ใช้",
183
+ toggleSidebar: "ย่อ/ขยายเมนู",
151
184
  signOut: "ออกจากระบบ",
152
185
  theme: { label: "ธีม", light: "สว่าง", dark: "มืด", system: "ตามระบบ" },
153
186
  sectionNav: { tabs: "แท็บย่อย" },
@@ -230,6 +263,19 @@ export const UI_TEXT_EN: UiText = {
230
263
  confirm: "Confirm",
231
264
  confirmTitle: "Please confirm",
232
265
  actionFailed: "Action failed",
266
+ edit: "Edit",
267
+ selection: { selected: "{count} selected", clear: "Clear selection" },
268
+ table: {
269
+ rowsPerPage: "Rows per page",
270
+ pageOf: "Page {page} of {pages}",
271
+ rowsSelected: "{selected} of {total} row(s) selected",
272
+ noResults: "No results",
273
+ deleteTitle: "Are you sure?",
274
+ deleteDescription: "Deleting{resource} “{name}” cannot be undone",
275
+ deleting: "Deleting{resource} “{name}”…",
276
+ deleted: "“{name}”{resource} deleted",
277
+ delete: "Delete",
278
+ },
233
279
  ok: "OK",
234
280
  alertTitle: "Notice",
235
281
  promptTitle: "Input required",
@@ -245,6 +291,7 @@ export const UI_TEXT_EN: UiText = {
245
291
  },
246
292
  switcher: { choose: "Choose organization", organization: "Organization" },
247
293
  userMenu: "User menu",
294
+ toggleSidebar: "Toggle sidebar",
248
295
  signOut: "Sign out",
249
296
  theme: { label: "Theme", light: "Light", dark: "Dark", system: "System" },
250
297
  sectionNav: { tabs: "Section tabs" },
package/src/index.ts CHANGED
@@ -19,6 +19,11 @@ export {
19
19
  type ActionMenuCommand,
20
20
  type ActionMenuItem,
21
21
  } from "./components/shared/action-menu";
22
+ export {
23
+ ActivityFeed,
24
+ type ActivityItem,
25
+ type ActivityTone,
26
+ } from "./components/shared/activity-feed";
22
27
  export { AuthLayout, type AuthLayoutProps } from "./components/shared/auth-layout";
23
28
  export {
24
29
  AuthDivider,
@@ -144,6 +149,7 @@ export {
144
149
  } from "./components/shared/icon-picker";
145
150
  export { InfoHint } from "./components/shared/info-hint";
146
151
  export { Initials, initialsOf } from "./components/shared/initials";
152
+ export { InlineEdit, type InlineEditProps } from "./components/shared/inline-edit";
147
153
  export {
148
154
  LanguageMenuItems,
149
155
  type LanguageOption,
@@ -192,6 +198,11 @@ export { type SaveState, SaveStatus, type SaveStatusText } from "./components/sh
192
198
  export { SecretReveal } from "./components/shared/secret-reveal";
193
199
  export { SectionCard } from "./components/shared/section-card";
194
200
  export { SegmentedControl, type SegmentedOption } from "./components/shared/segmented-control";
201
+ export {
202
+ type SelectionAction,
203
+ SelectionBar,
204
+ type SelectionBarProps,
205
+ } from "./components/shared/selection-bar";
195
206
  export { SelectionButton } from "./components/shared/selection-button";
196
207
  export { SettingsLayout, type SettingsSection } from "./components/shared/settings-layout";
197
208
  export { DangerZone, SettingsRow, SwitchRow } from "./components/shared/settings-row";