@ship-ui/core 0.22.14 → 0.22.16

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 (73) hide show
  1. package/README.md +46 -0
  2. package/assets/mcp/components.json +605 -4
  3. package/bin/src/scanner.zig +9 -18
  4. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs +17 -2
  5. package/fesm2022/ship-ui-core-sh-form-field-experimental.mjs.map +1 -1
  6. package/fesm2022/ship-ui-core-ship-a11y-keybindings.mjs +442 -0
  7. package/fesm2022/ship-ui-core-ship-a11y-keybindings.mjs.map +1 -0
  8. package/fesm2022/ship-ui-core-ship-accordion.mjs +1 -0
  9. package/fesm2022/ship-ui-core-ship-accordion.mjs.map +1 -1
  10. package/fesm2022/ship-ui-core-ship-alert.mjs +3 -2
  11. package/fesm2022/ship-ui-core-ship-alert.mjs.map +1 -1
  12. package/fesm2022/ship-ui-core-ship-blueprint.mjs +23 -10
  13. package/fesm2022/ship-ui-core-ship-blueprint.mjs.map +1 -1
  14. package/fesm2022/ship-ui-core-ship-checkbox.mjs +16 -14
  15. package/fesm2022/ship-ui-core-ship-checkbox.mjs.map +1 -1
  16. package/fesm2022/ship-ui-core-ship-color-picker.mjs +3 -1
  17. package/fesm2022/ship-ui-core-ship-color-picker.mjs.map +1 -1
  18. package/fesm2022/ship-ui-core-ship-datepicker.mjs +67 -33
  19. package/fesm2022/ship-ui-core-ship-datepicker.mjs.map +1 -1
  20. package/fesm2022/ship-ui-core-ship-dialog.mjs +14 -5
  21. package/fesm2022/ship-ui-core-ship-dialog.mjs.map +1 -1
  22. package/fesm2022/ship-ui-core-ship-divider.mjs +4 -2
  23. package/fesm2022/ship-ui-core-ship-divider.mjs.map +1 -1
  24. package/fesm2022/ship-ui-core-ship-editor.mjs +2673 -0
  25. package/fesm2022/ship-ui-core-ship-editor.mjs.map +1 -0
  26. package/fesm2022/ship-ui-core-ship-icon.mjs +2 -2
  27. package/fesm2022/ship-ui-core-ship-icon.mjs.map +1 -1
  28. package/fesm2022/ship-ui-core-ship-list.mjs +4 -2
  29. package/fesm2022/ship-ui-core-ship-list.mjs.map +1 -1
  30. package/fesm2022/ship-ui-core-ship-menu.mjs +8 -5
  31. package/fesm2022/ship-ui-core-ship-menu.mjs.map +1 -1
  32. package/fesm2022/ship-ui-core-ship-popover.mjs +14 -5
  33. package/fesm2022/ship-ui-core-ship-popover.mjs.map +1 -1
  34. package/fesm2022/ship-ui-core-ship-progress-bar.mjs +5 -1
  35. package/fesm2022/ship-ui-core-ship-progress-bar.mjs.map +1 -1
  36. package/fesm2022/ship-ui-core-ship-radio.mjs +16 -14
  37. package/fesm2022/ship-ui-core-ship-radio.mjs.map +1 -1
  38. package/fesm2022/ship-ui-core-ship-select.mjs +9 -9
  39. package/fesm2022/ship-ui-core-ship-select.mjs.map +1 -1
  40. package/fesm2022/ship-ui-core-ship-sidenav.mjs +2 -2
  41. package/fesm2022/ship-ui-core-ship-sidenav.mjs.map +1 -1
  42. package/fesm2022/ship-ui-core-ship-spinner.mjs +3 -1
  43. package/fesm2022/ship-ui-core-ship-spinner.mjs.map +1 -1
  44. package/fesm2022/ship-ui-core-ship-spotlight.mjs +77 -24
  45. package/fesm2022/ship-ui-core-ship-spotlight.mjs.map +1 -1
  46. package/fesm2022/ship-ui-core-ship-table.mjs +517 -138
  47. package/fesm2022/ship-ui-core-ship-table.mjs.map +1 -1
  48. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs +2 -2
  49. package/fesm2022/ship-ui-core-ship-theme-toggle.mjs.map +1 -1
  50. package/fesm2022/ship-ui-core-ship-toggle-card.mjs +24 -3
  51. package/fesm2022/ship-ui-core-ship-toggle-card.mjs.map +1 -1
  52. package/fesm2022/ship-ui-core-ship-toggle.mjs +16 -14
  53. package/fesm2022/ship-ui-core-ship-toggle.mjs.map +1 -1
  54. package/fesm2022/ship-ui-core-ship-tree.mjs +2 -2
  55. package/fesm2022/ship-ui-core-ship-tree.mjs.map +1 -1
  56. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs +2 -2
  57. package/fesm2022/ship-ui-core-ship-virtual-scroll.mjs.map +1 -1
  58. package/fesm2022/ship-ui-core.mjs +36 -23
  59. package/fesm2022/ship-ui-core.mjs.map +1 -1
  60. package/package.json +33 -2
  61. package/types/ship-ui-core-sh-form-field-experimental.d.ts +2 -0
  62. package/types/ship-ui-core-ship-a11y-keybindings.d.ts +102 -0
  63. package/types/ship-ui-core-ship-blueprint.d.ts +2 -1
  64. package/types/ship-ui-core-ship-checkbox.d.ts +2 -1
  65. package/types/ship-ui-core-ship-datepicker.d.ts +2 -0
  66. package/types/ship-ui-core-ship-editor.d.ts +168 -0
  67. package/types/ship-ui-core-ship-radio.d.ts +2 -1
  68. package/types/ship-ui-core-ship-spotlight.d.ts +1 -1
  69. package/types/ship-ui-core-ship-table.d.ts +13 -1
  70. package/types/ship-ui-core-ship-toggle-card.d.ts +1 -0
  71. package/types/ship-ui-core-ship-toggle.d.ts +2 -1
  72. package/types/ship-ui-core.d.ts +3 -0
  73. package/bin/ship-fg-scanner +0 -0
package/README.md CHANGED
@@ -118,6 +118,52 @@ The library includes high-quality TextMate snippets for all components, includin
118
118
  To use them in VS Code, you can add a link to the snippets file in your `.vscode/settings.json` or copy the content to your project's snippets. The file is located at:
119
119
  `./node_modules/@ship-ui/core/snippets/ship-ui.code-snippets`
120
120
 
121
+ ## Keyboard Accessibility (A11y)
122
+
123
+ ShipUI includes a robust global keybindings service `ShipA11yKeybindingsService` that manages default keyboard shortcuts for all interactive components (such as selects, datepickers, menus, tabs, and dialogs) with full support for WASD alternatives and macOS custom formatting.
124
+
125
+ ### Default Keybinding Actions
126
+ * **Datepicker**: Prev/Next Month (`PageUp` / `PageDown`), Prev/Next Year (`Shift+PageUp` / `Shift+PageDown`), Start/End Month (`Home` / `End`), Move focus (`ArrowRight, d`, `ArrowLeft, a`, `ArrowDown, s`, `ArrowUp, w`).
127
+ * **Selection Groups (Tabs, Steppers, Button Groups)**: Navigate (`ArrowRight, ArrowDown, d, s`, `ArrowLeft, ArrowUp, a, w`), Select (`Enter, space`).
128
+ * **Select**: Navigate (`ArrowDown, s`, `ArrowUp, w`), Select (`Enter, space`), Close (`Escape`).
129
+ * **Menu**: Navigate (`ArrowDown, s`, `ArrowUp, w`), Submenus (`ArrowRight, d`, `ArrowLeft, a`), Select (`Enter, space`).
130
+ * **Spotlight**: Navigate (`ArrowDown, s`, `ArrowUp, w`), Open spotlight (`ctrlOrCmd+k`).
131
+ * **Dialogs & Popovers**: Close (`Escape`).
132
+ * **Form Controls (Checkbox, Toggle, Radio)**: Toggle/Select (`Enter, space`).
133
+ * **Table**: Sort column (`Enter, space`).
134
+ * **Blueprint**: Cancel connection drag (`Escape`).
135
+ * **Editor Toolbar**: Navigate items (`ArrowRight, ArrowDown`, `ArrowLeft, ArrowUp`), Jump (`Home`, `End`).
136
+
137
+ ### Overriding Keybindings Globally
138
+ You can customize or override any of these keybindings globally in your application using the `SHIP_A11Y_KEYBINDINGS_OVERRIDE` token in your app configuration:
139
+
140
+ ```typescript
141
+ import { ApplicationConfig } from '@angular/core';
142
+ import { SHIP_A11Y_KEYBINDINGS_OVERRIDE } from '@ship-ui/core/ship-a11y-keybindings';
143
+
144
+ export const appConfig: ApplicationConfig = {
145
+ providers: [
146
+ {
147
+ provide: SHIP_A11Y_KEYBINDINGS_OVERRIDE,
148
+ useValue: {
149
+ // Change spotlight search shortcut to cmd+p / ctrl+p
150
+ 'spotlight.open': 'ctrlOrCmd+p',
151
+ // Change datepicker controls to custom mappings
152
+ 'datepicker.day-next': 'ArrowRight, l',
153
+ 'datepicker.day-prev': 'ArrowLeft, h',
154
+ }
155
+ }
156
+ ]
157
+ };
158
+ ```
159
+
160
+ ### Keybinding Syntax
161
+ * Support multiple key combinations using comma-separated notation (e.g. `'ArrowRight, d'`).
162
+ * Modifier combinations are specified with `+`, such as `'ctrl+shift+k'`.
163
+ * Use `ctrlOrCmd` to automatically bind to `Command` on macOS and `Control` on Windows/Linux/ChromeOS.
164
+ * Standard keys like `Enter`, `space` (all lowercase), `Escape`, `ArrowUp`, `PageUp`, etc. are fully supported.
165
+ * If a component needs keybinding checking manually, inject `ShipA11yKeybindingsService` and check `this.keybindings.matches(event, 'action.name')`.
166
+
121
167
  ## Follow our progress
122
168
 
123
169
  We have a [todos](documents/todos.md) file where we try keep track of features/bugs/blockers currently in pipeline etc