@platform-blocks/ui 0.2.0 → 0.3.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 (73) hide show
  1. package/README.md +23 -1
  2. package/lib/cjs/index.js +6915 -4498
  3. package/lib/cjs/index.js.map +1 -1
  4. package/lib/components/AutoComplete/types.d.ts +2 -0
  5. package/lib/components/Avatar/types.d.ts +3 -2
  6. package/lib/components/Badge/types.d.ts +4 -4
  7. package/lib/components/Blockquote/styles.d.ts +2 -1
  8. package/lib/components/Breadcrumbs/types.d.ts +2 -1
  9. package/lib/components/Calendar/types.d.ts +1 -0
  10. package/lib/components/Card/types.d.ts +1 -1
  11. package/lib/components/Carousel/types.d.ts +3 -2
  12. package/lib/components/Chip/types.d.ts +1 -1
  13. package/lib/components/ColorPicker/styles.d.ts +15 -1
  14. package/lib/components/ColorPicker/types.d.ts +4 -1
  15. package/lib/components/CopyButton/types.d.ts +3 -2
  16. package/lib/components/Dialog/Dialog.d.ts +1 -1
  17. package/lib/components/Dialog/types.d.ts +3 -0
  18. package/lib/components/Input/styles.d.ts +0 -24
  19. package/lib/components/Input/types.d.ts +2 -0
  20. package/lib/components/KeyCap/types.d.ts +9 -2
  21. package/lib/components/KeyboardAwareLayout/KeyboardAwareLayout.d.ts +4 -0
  22. package/lib/components/KeyboardAwareLayout/index.d.ts +3 -0
  23. package/lib/components/KeyboardAwareLayout/types.d.ts +26 -0
  24. package/lib/components/Knob/Knob.d.ts +6 -0
  25. package/lib/components/Knob/index.d.ts +2 -0
  26. package/lib/components/Knob/types.d.ts +65 -0
  27. package/lib/components/ListGroup/types.d.ts +11 -2
  28. package/lib/components/MenuItemButton/MenuItemButton.d.ts +2 -1
  29. package/lib/components/MonthPicker/types.d.ts +2 -2
  30. package/lib/components/NumberInput/types.d.ts +14 -0
  31. package/lib/components/Pagination/types.d.ts +10 -1
  32. package/lib/components/PinInput/types.d.ts +2 -0
  33. package/lib/components/Popover/Popover.d.ts +9 -3
  34. package/lib/components/Popover/index.d.ts +1 -1
  35. package/lib/components/Popover/styles.d.ts +1 -0
  36. package/lib/components/Popover/types.d.ts +2 -0
  37. package/lib/components/Ring/Ring.d.ts +8 -0
  38. package/lib/components/Ring/index.d.ts +3 -0
  39. package/lib/components/Ring/types.d.ts +75 -0
  40. package/lib/components/SegmentedControl/types.d.ts +8 -2
  41. package/lib/components/Select/Select.d.ts +0 -1
  42. package/lib/components/Select/Select.types.d.ts +33 -0
  43. package/lib/components/Spotlight/DirectSpotlightState.d.ts +1 -1
  44. package/lib/components/Spotlight/Spotlight.d.ts +1 -1
  45. package/lib/components/Spotlight/types.d.ts +3 -1
  46. package/lib/components/Stepper/types.d.ts +10 -2
  47. package/lib/components/TextArea/styles.d.ts +3 -33
  48. package/lib/components/TextArea/types.d.ts +2 -1
  49. package/lib/components/TimePicker/TimePicker.d.ts +1 -3
  50. package/lib/components/TimePickerInput/TimePickerInput.d.ts +3 -0
  51. package/lib/components/TimePickerInput/index.d.ts +2 -2
  52. package/lib/components/TimePickerInput/types.d.ts +3 -0
  53. package/lib/components/Timeline/types.d.ts +10 -2
  54. package/lib/components/Tree/types.d.ts +7 -0
  55. package/lib/components/index.d.ts +7 -1
  56. package/lib/components/optimized.d.ts +5 -0
  57. package/lib/components/types.d.ts +3 -0
  58. package/lib/core/hooks/usePopoverPositioning.d.ts +2 -5
  59. package/lib/core/keyboard/selection.d.ts +42 -0
  60. package/lib/core/providers/KeyboardManagerProvider.d.ts +45 -0
  61. package/lib/core/providers/index.d.ts +3 -1
  62. package/lib/core/theme/PlatformBlocksProvider.d.ts +14 -1
  63. package/lib/core/theme/componentSize.d.ts +10 -0
  64. package/lib/core/theme/index.d.ts +1 -0
  65. package/lib/core/theme/sizes.d.ts +2 -1
  66. package/lib/core/theme/types.d.ts +4 -2
  67. package/lib/esm/index.js +6905 -4496
  68. package/lib/esm/index.js.map +1 -1
  69. package/lib/index.d.ts +12 -1
  70. package/lib/utils/optionalDependencies.d.ts +17 -2
  71. package/lib/utils/optionalModule.d.ts +16 -0
  72. package/package.json +9 -8
  73. package/lib/components/Select/types.d.ts +0 -25
package/README.md CHANGED
@@ -35,4 +35,26 @@ export function App() {
35
35
  }
36
36
  ```
37
37
 
38
- Refer to the documentation site for component examples and API details.
38
+ Refer to the documentation site for component examples and API details. A dedicated “Keyboard Management” guide is available at `/keyboard` within the docs app.
39
+
40
+ ## Keyboard Management
41
+
42
+ Packages that render focusable inputs can opt into shared keyboard state by wrapping their tree in `KeyboardManagerProvider`. This unlocks the `useKeyboardManager()` hook and ensures components like `AutoComplete` and `Select` dismiss or refocus the keyboard consistently across web and native platforms.
43
+
44
+ ```tsx
45
+ import { KeyboardManagerProvider, KeyboardAwareLayout } from '@platform-blocks/ui';
46
+
47
+ export function App() {
48
+ return (
49
+ <KeyboardManagerProvider>
50
+ <KeyboardAwareLayout>
51
+ {/* form inputs */}
52
+ </KeyboardAwareLayout>
53
+ </KeyboardManagerProvider>
54
+ );
55
+ }
56
+ ```
57
+
58
+ `KeyboardAwareLayout` is optional but recommended for screens where the on-screen keyboard could obscure lower inputs. Components expose a `refocusAfterSelect` prop that lets you override the default dismissal behavior when selections complete.
59
+
60
+ For direct inputs, you can pass `keyboardFocusId` to make a field eligible for deferred refocus requests triggered via `KeyboardManagerProvider` (for example, when an overlay completes a selection and needs to restore focus to a specific input).