@ahrowe/ui 0.16.7 → 0.17.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 (79) hide show
  1. package/dist/esm/common/sticky/sticky.mjs +1 -1
  2. package/dist/esm/common/sticky/sticky.mjs.map +1 -1
  3. package/dist/esm/common/sticky/stickyStack.mjs +1 -1
  4. package/dist/esm/common/sticky/stickyStack.mjs.map +1 -1
  5. package/dist/index.cjs +1 -1
  6. package/dist/index.cjs.map +1 -1
  7. package/dist/mcp.js +11 -5
  8. package/dist/types/package/common/sticky/sticky.d.ts +1 -1
  9. package/dist/types/package/common/sticky/sticky.types.d.ts +5 -1
  10. package/dist/types/package/common/sticky/stickyStack.d.ts +5 -0
  11. package/docs/Accordion.md +2 -0
  12. package/docs/ActionButtons.md +2 -0
  13. package/docs/ActionIcon.md +2 -0
  14. package/docs/Alert.md +2 -0
  15. package/docs/AnimatedLogo.md +2 -0
  16. package/docs/AnimatedText.md +2 -0
  17. package/docs/Avatar.md +2 -0
  18. package/docs/Badge.md +2 -0
  19. package/docs/BodyEnd.md +2 -0
  20. package/docs/Breadcrumb.md +2 -0
  21. package/docs/Button.md +2 -0
  22. package/docs/ButtonGroup.md +2 -0
  23. package/docs/Card.md +2 -0
  24. package/docs/Carousel.md +2 -0
  25. package/docs/Checkbox.md +2 -0
  26. package/docs/Chip.md +2 -0
  27. package/docs/ColorPicker.md +2 -0
  28. package/docs/ConfigProvider.md +2 -0
  29. package/docs/ConfirmModal.md +2 -0
  30. package/docs/DatePicker.md +2 -0
  31. package/docs/Drawer.md +2 -0
  32. package/docs/DropZone.md +2 -0
  33. package/docs/Dropdown.md +2 -0
  34. package/docs/EmptyState.md +2 -0
  35. package/docs/ErrorBoundary.md +2 -0
  36. package/docs/Fab.md +2 -0
  37. package/docs/Flip.md +2 -0
  38. package/docs/FloatingMenu.md +2 -0
  39. package/docs/FormValidator.md +2 -0
  40. package/docs/FormValidatorGroup.md +2 -0
  41. package/docs/Icon.md +2 -0
  42. package/docs/IconPicker.md +2 -0
  43. package/docs/IdleManager.md +2 -0
  44. package/docs/InfiniteBlock.md +2 -0
  45. package/docs/Input.md +2 -0
  46. package/docs/InputDropdown.md +2 -0
  47. package/docs/InteractableDiv.md +2 -0
  48. package/docs/KanbanBoard.md +2 -0
  49. package/docs/KlipyPicker.md +2 -0
  50. package/docs/Modal.md +2 -0
  51. package/docs/NumberInput.md +2 -0
  52. package/docs/OptionPicker.md +2 -0
  53. package/docs/Overscroll.md +2 -0
  54. package/docs/Popover.md +2 -0
  55. package/docs/ProgressBar.md +2 -0
  56. package/docs/RadioGroup.md +2 -0
  57. package/docs/RevealLens.md +2 -0
  58. package/docs/Ripple.md +2 -0
  59. package/docs/RoomDrawer.md +2 -0
  60. package/docs/RoomViewer.md +2 -0
  61. package/docs/SearchInput.md +2 -0
  62. package/docs/SectionHeader.md +2 -0
  63. package/docs/Skeleton.md +2 -0
  64. package/docs/Slider.md +2 -0
  65. package/docs/SplitButton.md +2 -0
  66. package/docs/Stepper.md +2 -0
  67. package/docs/Sticky.md +25 -2
  68. package/docs/Switch.md +2 -0
  69. package/docs/TabHeader.md +2 -0
  70. package/docs/Textarea.md +2 -0
  71. package/docs/ThemeProvider.md +2 -0
  72. package/docs/Tilt.md +2 -0
  73. package/docs/TimeInput.md +2 -0
  74. package/docs/Timeline.md +2 -0
  75. package/docs/Toast.md +2 -0
  76. package/docs/Tooltip.md +2 -0
  77. package/docs/VirtualList.md +2 -0
  78. package/docs/Wizard.md +2 -0
  79. package/package.json +1 -1
package/docs/Stepper.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Step progress indicator for multi-step forms, onboarding flows, and checkout wizards. Shows completed, current, and upcoming steps, and (vertically) can expand a collapsible body under the active step.
4
4
 
5
+ **Keywords:** wizard steps, progress steps
6
+
5
7
  **Import:** `import { Stepper } from '@ahrowe/ui'`
6
8
  **Types:** `import type { StepperStep, StepperProps } from '@ahrowe/ui'`
7
9
 
package/docs/Sticky.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Pin a piece of content to the top of the viewport once the page scrolls past it — section headers, toolbars, filter bars, table headers. The content sticks while its original position is above the fold and releases the moment that position scrolls back into view. A placeholder preserves the original space, so nothing below jumps when it detaches.
4
4
 
5
+ **Keywords:** sticky header, pinned toolbar, scroll container, app shell, scrollable panel
6
+
5
7
  **Import:** `import { Sticky } from '@ahrowe/ui'`
6
8
 
7
9
  ```tsx
@@ -17,6 +19,23 @@ import { Sticky } from '@ahrowe/ui';
17
19
  <FilterBar />
18
20
  </Sticky>
19
21
 
22
+ // Stick below a header that isn't a Sticky itself — offset tracks its live height
23
+ const headerRef = useRef<HTMLElement>(null);
24
+ <header ref={headerRef}>...</header>
25
+ <Sticky offsetElement={headerRef}>
26
+ <FilterBar />
27
+ </Sticky>
28
+
29
+ // App-shell layout: a separately-scrollable content pane below a header that's
30
+ // outside that scroll container. Stick to the pane's own top edge instead of the
31
+ // browser viewport's, so it naturally stops below the header with no offset needed
32
+ <div style={{ height: '100vh', overflowY: 'auto' }}>
33
+ <Sticky stickToScrollParent offsetTop={0}>
34
+ <FilterBar />
35
+ </Sticky>
36
+ <Content />
37
+ </div>
38
+
20
39
  // React to the stuck state (e.g. add a shadow)
21
40
  <Sticky onStuckChange={(stuck) => setElevated(stuck)}>
22
41
  <Toolbar />
@@ -37,7 +56,9 @@ import { Sticky } from '@ahrowe/ui';
37
56
  </Sticky>
38
57
  ```
39
58
 
40
- **How it works:** while stuck, the content switches to `position: fixed` (measured to keep the same width and horizontal position) and a placeholder of the same height takes its place in the flow. It tracks scroll on the window *and* any ancestor scroll container, so it works inside scrollable panels too — it always pins to the top of the viewport (offset by `offsetTop`).
59
+ **How it works:** while stuck, the content switches to `position: fixed` (measured to keep the same width and horizontal position) and a placeholder of the same height takes its place in the flow. It tracks scroll on the window *and* any ancestor scroll container, so it works inside scrollable panels too. By default it pins to the top of the browser viewport (offset by `offsetTop`), regardless of any scroll container it's nested in — set `stickToScrollParent` to pin to that container's own top edge instead (see below).
60
+
61
+ **`stickToScrollParent`:** by default `Sticky` always pins relative to the browser viewport, which can overlap other fixed/pinned chrome (e.g. an app header) that sits outside the element's own scroll container. Set `stickToScrollParent` to pin relative to the nearest ancestor with its own scrollbar (`overflow-y: auto`/`scroll`/`overlay`) instead — found once on mount by walking up from the root. Falls back to the viewport if no scrollable ancestor is found. Combine with `offsetTop` for extra spacing from that container's top (e.g. its own internal header).
41
62
 
42
63
  **Stacking:** every mounted `Sticky` coordinates automatically, no extra markup needed. When more than one is stuck at the same time, a later one (in DOM order) that horizontally overlaps an earlier stuck one pins below it — `offsetTop` plus the overlapping ones' heights — instead of both landing on the same spot. Stickies that don't overlap horizontally (e.g. two half-width ones side by side under a full-width one) land at the same `top`, next to each other, rather than pushing each other down.
43
64
 
@@ -46,7 +67,9 @@ import { Sticky } from '@ahrowe/ui';
46
67
  | Prop | Type | Description |
47
68
  |------|------|-------------|
48
69
  | `children` | `ReactNode` | The content to make sticky |
49
- | `offsetTop` | `number` | Distance in px from the top of the viewport the content sticks to (default `0`) |
70
+ | `offsetTop` | `number` | Distance in px from the top of the viewport the content sticks to (default `0`). Ignored if `offsetElement` is set |
71
+ | `offsetElement` | `RefObject<HTMLElement \| null>` | Element to stick below (e.g. a fixed/pinned header outside this library) — its live height is used as the offset instead of a fixed `offsetTop` |
72
+ | `stickToScrollParent` | `boolean` | Stick to the top of the nearest scrollable ancestor instead of the browser viewport (default `false`). Falls back to the viewport if no scrollable ancestor is found |
50
73
  | `zIndex` | `number` | z-index applied while stuck (default `20`) |
51
74
  | `disabled` | `boolean` | Disable sticking — content stays in normal flow |
52
75
  | `onStuckChange` | `(isStuck: boolean) => void` | Fired whenever the stuck state flips |
package/docs/Switch.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Sliding boolean toggle — settings panels, feature flags, preference lists. Same shape as `Checkbox` but visually a track + thumb; prefer `Switch` when the effect is immediate (e.g. enabling a setting) and `Checkbox` for selections inside a form that gets submitted.
4
4
 
5
+ **Keywords:** toggle switch, on off switch
6
+
5
7
  **Import:** `import { Switch } from '@ahrowe/ui'`
6
8
 
7
9
  ```tsx
package/docs/TabHeader.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** A horizontal row of tabs to switch between sibling views or sections — settings panels, dashboards, detail pages. Each tab carries an icon plus an optional title and subtitle.
4
4
 
5
+ **Keywords:** tabs navigation, tab bar
6
+
5
7
  **Import:** `import { TabHeader } from '@ahrowe/ui'`
6
8
 
7
9
  **Mobile behaviour:** On narrow screens (≤ 640px) only the active tab keeps its title and subtitle; every other tab collapses to just its icon.
package/docs/Textarea.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Multiline text input — comments, descriptions, notes, code snippets, long-form content. Same API as `Input` but pre-configured for multiline.
4
4
 
5
+ **Keywords:** multiline field, comment box, text area
6
+
5
7
  **Import:** `import { Textarea } from '@ahrowe/ui'`
6
8
 
7
9
  ```tsx
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Required wrapper for the entire component library. Injects all CSS custom properties as inline styles so every component inside can use theme variables. Place it at or near the root of your app.
4
4
 
5
+ **Keywords:** theming, dark mode
6
+
5
7
  **Import:** `import { ThemeProvider } from '@ahrowe/ui'`
6
8
  **Types:** `import type { Theme, ThemeVariables } from '@ahrowe/ui'`
7
9
 
package/docs/Tilt.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Wrap content that should tilt toward the cursor in 3D. Pointer position drives a `rotateX`/`rotateY` tilt that flattens out near the center and ramps up (with an eased, non-linear curve) toward the edges. Use it for clean UI polish, like a row of pricing/plan cards that each tilt independently on hover, or as a low-level primitive for custom animation, like a hand of cards that all react to one shared cursor. Compose with `Flip` for a card that both tilts and flips.
4
4
 
5
+ **Keywords:** hover tilt effect, parallax card
6
+
5
7
  **Import:** `import { Tilt, TiltGroup } from '@ahrowe/ui'`
6
8
  **Types:** `import type { TiltProps, TiltHandle, TiltGroupProps } from '@ahrowe/ui'`
7
9
 
package/docs/TimeInput.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Time-of-day selection — appointment times, opening hours, shift starts, reminders. Built on top of `Input`: the user can **type** the time directly (`1430` → `14:30`) or pick it on a **Material-style clock dial**. Renders as a text input with a floating label by default; can also be inline or modal, mirroring `DatePicker`.
4
4
 
5
+ **Keywords:** time picker, clock input
6
+
5
7
  **Import:** `import { TimeInput } from '@ahrowe/ui'`
6
8
 
7
9
  The value is a `"HH:MM"` 24-hour string (e.g. `"09:30"`) everywhere — also when `use24Hour={false}` is set (that flag only changes the dial UI, not the stored value).
package/docs/Timeline.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** A vertical list of dated events, connected by a line, for audit logs, activity feeds, order status history, and deploy logs. Each entry can carry a title, timestamp, description, an icon or status colour, and arbitrary extra content.
4
4
 
5
+ **Keywords:** history log
6
+
5
7
  **Import:** `import { Timeline, TimelineAlignment, TimelineItemStatus } from '@ahrowe/ui'`
6
8
  **Types:** `import type { TimelineItem, TimelineProps } from '@ahrowe/ui'`
7
9
 
package/docs/Toast.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Non-blocking notifications — save confirmations, error alerts, info messages, warnings. Toasts appear in a corner of the screen and auto-dismiss after a configurable duration.
4
4
 
5
+ **Keywords:** snackbar, notification popup
6
+
5
7
  **Import:** `import { ToastProvider, showToast } from '@ahrowe/ui'`
6
8
  **Types:** `import type { ToastOptions, ToastType, ToastPosition } from '@ahrowe/ui'`
7
9
 
package/docs/Tooltip.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Contextual help, info icons, field explanations, error pointers.
4
4
 
5
+ **Keywords:** hint, help text, info bubble
6
+
5
7
  **Import:** `import { Tooltip } from '@ahrowe/ui'`
6
8
 
7
9
  ```tsx
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Efficiently render large lists or tables — thousands of rows rendered with a virtualised scroll window so only visible rows are in the DOM. Supports column definitions, row selection, multi-select, column visibility toggling, and infinite scroll.
4
4
 
5
+ **Keywords:** data table, virtualized table
6
+
5
7
  **Import:** `import { VirtualList } from '@ahrowe/ui'`
6
8
  **Types:** `import type { VirtualListProps, VirtualListColumn, VirtualListHandle } from '@ahrowe/ui'`
7
9
 
package/docs/Wizard.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  **When to use:** Animated step container for multi-step forms and flows. Handles slide transitions between steps. Pair with `Stepper` for a progress indicator.
4
4
 
5
+ **Keywords:** step flow
6
+
5
7
  **Import:** `import { Wizard } from '@ahrowe/ui'`
6
8
 
7
9
  ```tsx
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ahrowe/ui",
3
- "version": "0.16.7",
3
+ "version": "0.17.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },