@ember-joinery/test-support 0.0.0-stage → 1.1.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.
- package/CHANGELOG.md +574 -0
- package/LICENSE.md +9 -0
- package/NOTICE +532 -0
- package/README.md +356 -2
- package/addon-main.cjs +4 -0
- package/dist/-private/checkable.d.ts +21 -0
- package/dist/-private/checkable.d.ts.map +1 -0
- package/dist/-private/checkable.js +80 -0
- package/dist/-private/control.d.ts +18 -0
- package/dist/-private/control.d.ts.map +1 -0
- package/dist/-private/control.js +55 -0
- package/dist/-private/menu.d.ts +145 -0
- package/dist/-private/menu.d.ts.map +1 -0
- package/dist/-private/menu.js +322 -0
- package/dist/-private/overlay.d.ts +9 -0
- package/dist/-private/overlay.d.ts.map +1 -0
- package/dist/-private/overlay.js +39 -0
- package/dist/-private/showing.d.ts +7 -0
- package/dist/-private/showing.d.ts.map +1 -0
- package/dist/-private/showing.js +10 -0
- package/dist/-private/size.d.ts +10 -0
- package/dist/-private/size.d.ts.map +1 -0
- package/dist/-private/size.js +24 -0
- package/dist/-private/tree.d.ts +34 -0
- package/dist/-private/tree.d.ts.map +1 -0
- package/dist/-private/tree.js +80 -0
- package/dist/accordion.d.ts +62 -0
- package/dist/accordion.d.ts.map +1 -0
- package/dist/accordion.js +112 -0
- package/dist/alert-dialog.d.ts +24 -0
- package/dist/alert-dialog.d.ts.map +1 -0
- package/dist/alert-dialog.js +37 -0
- package/dist/alert.d.ts +27 -0
- package/dist/alert.d.ts.map +1 -0
- package/dist/alert.js +43 -0
- package/dist/app-shell.d.ts +43 -0
- package/dist/app-shell.d.ts.map +1 -0
- package/dist/app-shell.js +78 -0
- package/dist/aspect-ratio.d.ts +21 -0
- package/dist/aspect-ratio.d.ts.map +1 -0
- package/dist/aspect-ratio.js +30 -0
- package/dist/attachment.d.ts +86 -0
- package/dist/attachment.d.ts.map +1 -0
- package/dist/attachment.js +156 -0
- package/dist/avatar.d.ts +65 -0
- package/dist/avatar.d.ts.map +1 -0
- package/dist/avatar.js +106 -0
- package/dist/badge.d.ts +29 -0
- package/dist/badge.d.ts.map +1 -0
- package/dist/badge.js +49 -0
- package/dist/breadcrumb.d.ts +36 -0
- package/dist/breadcrumb.d.ts.map +1 -0
- package/dist/breadcrumb.js +80 -0
- package/dist/bubble.d.ts +56 -0
- package/dist/bubble.d.ts.map +1 -0
- package/dist/bubble.js +94 -0
- package/dist/button-group.d.ts +34 -0
- package/dist/button-group.d.ts.map +1 -0
- package/dist/button-group.js +62 -0
- package/dist/button.d.ts +37 -0
- package/dist/button.d.ts.map +1 -0
- package/dist/button.js +77 -0
- package/dist/calendar.d.ts +115 -0
- package/dist/calendar.d.ts.map +1 -0
- package/dist/calendar.js +276 -0
- package/dist/card.d.ts +31 -0
- package/dist/card.d.ts.map +1 -0
- package/dist/card.js +49 -0
- package/dist/checkbox.d.ts +46 -0
- package/dist/checkbox.d.ts.map +1 -0
- package/dist/checkbox.js +84 -0
- package/dist/child.d.ts +29 -0
- package/dist/child.d.ts.map +1 -0
- package/dist/child.js +27 -0
- package/dist/collapsible.d.ts +44 -0
- package/dist/collapsible.d.ts.map +1 -0
- package/dist/collapsible.js +83 -0
- package/dist/color-scheme.d.ts +44 -0
- package/dist/color-scheme.d.ts.map +1 -0
- package/dist/color-scheme.js +123 -0
- package/dist/combobox.d.ts +114 -0
- package/dist/combobox.d.ts.map +1 -0
- package/dist/combobox.js +293 -0
- package/dist/command.d.ts +92 -0
- package/dist/command.d.ts.map +1 -0
- package/dist/command.js +183 -0
- package/dist/context-menu.d.ts +37 -0
- package/dist/context-menu.d.ts.map +1 -0
- package/dist/context-menu.js +59 -0
- package/dist/date-picker.d.ts +48 -0
- package/dist/date-picker.d.ts.map +1 -0
- package/dist/date-picker.js +136 -0
- package/dist/dialog.d.ts +64 -0
- package/dist/dialog.d.ts.map +1 -0
- package/dist/dialog.js +142 -0
- package/dist/drawer.d.ts +63 -0
- package/dist/drawer.d.ts.map +1 -0
- package/dist/drawer.js +136 -0
- package/dist/dropdown-menu.d.ts +35 -0
- package/dist/dropdown-menu.d.ts.map +1 -0
- package/dist/dropdown-menu.js +49 -0
- package/dist/empty.d.ts +29 -0
- package/dist/empty.d.ts.map +1 -0
- package/dist/empty.js +47 -0
- package/dist/field.d.ts +86 -0
- package/dist/field.d.ts.map +1 -0
- package/dist/field.js +150 -0
- package/dist/file-drop.d.ts +74 -0
- package/dist/file-drop.d.ts.map +1 -0
- package/dist/file-drop.js +137 -0
- package/dist/focus.d.ts +54 -0
- package/dist/focus.d.ts.map +1 -0
- package/dist/focus.js +174 -0
- package/dist/harness.d.ts +90 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +189 -0
- package/dist/heading.d.ts +16 -0
- package/dist/heading.d.ts.map +1 -0
- package/dist/heading.js +19 -0
- package/dist/hero.d.ts +21 -0
- package/dist/hero.d.ts.map +1 -0
- package/dist/hero.js +28 -0
- package/dist/hover-card.d.ts +46 -0
- package/dist/hover-card.d.ts.map +1 -0
- package/dist/hover-card.js +85 -0
- package/dist/icon.d.ts +10 -0
- package/dist/icon.d.ts.map +1 -0
- package/dist/icon.js +13 -0
- package/dist/index.d.ts +98 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +99 -0
- package/dist/input-group.d.ts +55 -0
- package/dist/input-group.d.ts.map +1 -0
- package/dist/input-group.js +103 -0
- package/dist/input-otp.d.ts +103 -0
- package/dist/input-otp.d.ts.map +1 -0
- package/dist/input-otp.js +293 -0
- package/dist/input.d.ts +53 -0
- package/dist/input.d.ts.map +1 -0
- package/dist/input.js +90 -0
- package/dist/inspector.d.ts +47 -0
- package/dist/inspector.d.ts.map +1 -0
- package/dist/inspector.js +97 -0
- package/dist/item.d.ts +63 -0
- package/dist/item.d.ts.map +1 -0
- package/dist/item.js +104 -0
- package/dist/kbd.d.ts +28 -0
- package/dist/kbd.d.ts.map +1 -0
- package/dist/kbd.js +36 -0
- package/dist/keys.d.ts +20 -0
- package/dist/keys.d.ts.map +1 -0
- package/dist/keys.js +32 -0
- package/dist/label.d.ts +24 -0
- package/dist/label.d.ts.map +1 -0
- package/dist/label.js +39 -0
- package/dist/layers.d.ts +42 -0
- package/dist/layers.d.ts.map +1 -0
- package/dist/layers.js +70 -0
- package/dist/link.d.ts +44 -0
- package/dist/link.d.ts.map +1 -0
- package/dist/link.js +60 -0
- package/dist/marker.d.ts +42 -0
- package/dist/marker.d.ts.map +1 -0
- package/dist/marker.js +73 -0
- package/dist/menubar.d.ts +76 -0
- package/dist/menubar.d.ts.map +1 -0
- package/dist/menubar.js +139 -0
- package/dist/message-scroller.d.ts +101 -0
- package/dist/message-scroller.d.ts.map +1 -0
- package/dist/message-scroller.js +215 -0
- package/dist/message.d.ts +48 -0
- package/dist/message.d.ts.map +1 -0
- package/dist/message.js +72 -0
- package/dist/native-form.d.ts +44 -0
- package/dist/native-form.d.ts.map +1 -0
- package/dist/native-form.js +111 -0
- package/dist/native-select.d.ts +56 -0
- package/dist/native-select.d.ts.map +1 -0
- package/dist/native-select.js +100 -0
- package/dist/navigation-bar.d.ts +30 -0
- package/dist/navigation-bar.d.ts.map +1 -0
- package/dist/navigation-bar.js +52 -0
- package/dist/navigation-menu.d.ts +97 -0
- package/dist/navigation-menu.d.ts.map +1 -0
- package/dist/navigation-menu.js +207 -0
- package/dist/navigation-stack.d.ts +36 -0
- package/dist/navigation-stack.d.ts.map +1 -0
- package/dist/navigation-stack.js +67 -0
- package/dist/observers.d.ts +21 -0
- package/dist/observers.d.ts.map +1 -0
- package/dist/observers.js +34 -0
- package/dist/page.d.ts +38 -0
- package/dist/page.d.ts.map +1 -0
- package/dist/page.js +68 -0
- package/dist/pagination.d.ts +39 -0
- package/dist/pagination.d.ts.map +1 -0
- package/dist/pagination.js +71 -0
- package/dist/pointer.d.ts +38 -0
- package/dist/pointer.d.ts.map +1 -0
- package/dist/pointer.js +82 -0
- package/dist/popover.d.ts +50 -0
- package/dist/popover.d.ts.map +1 -0
- package/dist/popover.js +90 -0
- package/dist/progress.d.ts +38 -0
- package/dist/progress.d.ts.map +1 -0
- package/dist/progress.js +81 -0
- package/dist/pull-to-refresh.d.ts +40 -0
- package/dist/pull-to-refresh.d.ts.map +1 -0
- package/dist/pull-to-refresh.js +65 -0
- package/dist/questionnaire.d.ts +117 -0
- package/dist/questionnaire.d.ts.map +1 -0
- package/dist/questionnaire.js +240 -0
- package/dist/radio-group.d.ts +53 -0
- package/dist/radio-group.d.ts.map +1 -0
- package/dist/radio-group.js +95 -0
- package/dist/rating.d.ts +67 -0
- package/dist/rating.d.ts.map +1 -0
- package/dist/rating.js +160 -0
- package/dist/resizable.d.ts +76 -0
- package/dist/resizable.d.ts.map +1 -0
- package/dist/resizable.js +138 -0
- package/dist/routing.d.ts +36 -0
- package/dist/routing.d.ts.map +1 -0
- package/dist/routing.js +50 -0
- package/dist/roving-focus.d.ts +38 -0
- package/dist/roving-focus.d.ts.map +1 -0
- package/dist/roving-focus.js +60 -0
- package/dist/scroll-area.d.ts +58 -0
- package/dist/scroll-area.d.ts.map +1 -0
- package/dist/scroll-area.js +153 -0
- package/dist/scroller.d.ts +41 -0
- package/dist/scroller.d.ts.map +1 -0
- package/dist/scroller.js +65 -0
- package/dist/select.d.ts +98 -0
- package/dist/select.d.ts.map +1 -0
- package/dist/select.js +203 -0
- package/dist/selectors.d.ts +44 -0
- package/dist/selectors.d.ts.map +1 -0
- package/dist/selectors.js +63 -0
- package/dist/send-pointer.d.ts +17 -0
- package/dist/send-pointer.d.ts.map +1 -0
- package/dist/send-pointer.js +35 -0
- package/dist/separator.d.ts +26 -0
- package/dist/separator.d.ts.map +1 -0
- package/dist/separator.js +40 -0
- package/dist/shadowed.d.ts +55 -0
- package/dist/shadowed.d.ts.map +1 -0
- package/dist/shadowed.js +97 -0
- package/dist/sheet.d.ts +14 -0
- package/dist/sheet.d.ts.map +1 -0
- package/dist/sheet.js +15 -0
- package/dist/sidebar.d.ts +159 -0
- package/dist/sidebar.d.ts.map +1 -0
- package/dist/sidebar.js +299 -0
- package/dist/skeleton.d.ts +18 -0
- package/dist/skeleton.d.ts.map +1 -0
- package/dist/skeleton.js +25 -0
- package/dist/slider.d.ts +66 -0
- package/dist/slider.d.ts.map +1 -0
- package/dist/slider.js +155 -0
- package/dist/spinner.d.ts +10 -0
- package/dist/spinner.d.ts.map +1 -0
- package/dist/spinner.js +13 -0
- package/dist/split-view.d.ts +77 -0
- package/dist/split-view.d.ts.map +1 -0
- package/dist/split-view.js +145 -0
- package/dist/status-bar.d.ts +25 -0
- package/dist/status-bar.d.ts.map +1 -0
- package/dist/status-bar.js +42 -0
- package/dist/sticky-footer.d.ts +33 -0
- package/dist/sticky-footer.d.ts.map +1 -0
- package/dist/sticky-footer.js +65 -0
- package/dist/switch.d.ts +44 -0
- package/dist/switch.d.ts.map +1 -0
- package/dist/switch.js +77 -0
- package/dist/tab-bar.d.ts +38 -0
- package/dist/tab-bar.d.ts.map +1 -0
- package/dist/tab-bar.js +78 -0
- package/dist/table.d.ts +41 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +100 -0
- package/dist/tabs.d.ts +66 -0
- package/dist/tabs.d.ts.map +1 -0
- package/dist/tabs.js +149 -0
- package/dist/test-hooks.d.ts +9 -0
- package/dist/test-hooks.d.ts.map +1 -0
- package/dist/test-hooks.js +1 -0
- package/dist/textarea.d.ts +47 -0
- package/dist/textarea.d.ts.map +1 -0
- package/dist/textarea.js +78 -0
- package/dist/title-bar.d.ts +43 -0
- package/dist/title-bar.d.ts.map +1 -0
- package/dist/title-bar.js +74 -0
- package/dist/toaster.d.ts +172 -0
- package/dist/toaster.d.ts.map +1 -0
- package/dist/toaster.js +307 -0
- package/dist/toggle-group.d.ts +51 -0
- package/dist/toggle-group.d.ts.map +1 -0
- package/dist/toggle-group.js +97 -0
- package/dist/toggle.d.ts +21 -0
- package/dist/toggle.d.ts.map +1 -0
- package/dist/toggle.js +26 -0
- package/dist/toolbar.d.ts +40 -0
- package/dist/toolbar.d.ts.map +1 -0
- package/dist/toolbar.js +67 -0
- package/dist/tooltip.d.ts +48 -0
- package/dist/tooltip.d.ts.map +1 -0
- package/dist/tooltip.js +91 -0
- package/dist/trace.d.ts +118 -0
- package/dist/trace.d.ts.map +1 -0
- package/dist/trace.js +196 -0
- package/dist/translator.d.ts +34 -0
- package/dist/translator.d.ts.map +1 -0
- package/dist/translator.js +75 -0
- package/dist/window-frame.d.ts +40 -0
- package/dist/window-frame.d.ts.map +1 -0
- package/dist/window-frame.js +66 -0
- package/dist/zoetrope.d.ts +51 -0
- package/dist/zoetrope.d.ts.map +1 -0
- package/dist/zoetrope.js +94 -0
- package/package.json +68 -3
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
# @ember-joinery/test-support
|
|
2
|
+
|
|
3
|
+
## 1.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9728270: `AppShell`: the frame of an app. It yields a header, a sidebar, the content, an aside and a
|
|
8
|
+
footer, each a landmark, and starts with a link that skips to the content. `@layout="alt"` runs
|
|
9
|
+
the sidebar the full height, and `@fullscreen` makes only the content scroll, below bars that
|
|
10
|
+
are materials. `AppShellHarness` drives it.
|
|
11
|
+
- 9728270: Inspector is a new component: a pane after the content it inspects, as SwiftUI's `.inspector()`. A narrow inspector shows the pane in a sheet. `InspectorHarness` drives it.
|
|
12
|
+
- 9728270: `NavigationBar` is new: the bar at the top of a screen on a phone, with `Leading`, `Title` and `Trailing` parts and a large title (`NavigationBarLargeTitle`) that scrolls under the bar. `NavigationBarHarness` drives it.
|
|
13
|
+
- 9728270: `NavigationStack` is new: push and pop navigation where the nested routes are the stack, with a back button, a view transition for each change of depth, and an edge swipe that goes back in an installed app. `NavigationStackHarness` drives it.
|
|
14
|
+
- 9728270: `Page`: one screen of an app. Its header has a nav, a title, a description, actions and a
|
|
15
|
+
footer row for tabs, over a body. `@variant="settings"` keeps the body in a readable column,
|
|
16
|
+
and a sticky header is a material. `PageHarness` drives it.
|
|
17
|
+
- 9728270: A new component, `PullToRefresh`: it wraps scrolling content and calls `@onRefresh` when a touch or a pen pulls the content down from the top. It yields `refresh` and `isRefreshing` for a button, and a live region announces the refresh. `PullToRefreshHarness` drives it.
|
|
18
|
+
- 9728270: SplitView is a new component: two or three resizable columns (a sidebar, an optional content list and a detail), as SwiftUI's `NavigationSplitView`. A narrow view shows one column at a time. `SplitViewHarness` drives it.
|
|
19
|
+
- 9728270: A new component, `StatusBar`: the bar at the bottom of a window, with `Leading`, `Center`, `Trailing` and `Item` parts. `Item @live={{true}}` is a polite live region. `StatusBarHarness` reads it.
|
|
20
|
+
- 9728270: A new component, `TabBar`: the tab bar of a phone or tablet app, a `<nav>` of links with `aria-current="page"` on the current one. It has a `bar` and a `floating` variant, a `top` placement, badges, a `Search` part, an `Accessory` part, and `@minimizeOnScroll`. `TabBarHarness` drives it.
|
|
21
|
+
- 9728270: A new component, `TitleBar`: the bar at the top of a window, after the macOS window toolbar. It has `unified`, `unified-compact` and `expanded` variants, `Leading`, `Title`, `Center`, `Trailing`, `Toolbar` and `TrafficLights` parts, a drag region (`app-region`), room for the native window controls (`@controls="start"` or `"overlay"`), and an inactive look while the window has no focus. `TitleBarHarness` reads it.
|
|
22
|
+
- 9728270: `Toolbar`: the WAI-ARIA toolbar. Its controls share one tab stop and the arrow keys move
|
|
23
|
+
between them. It has groups, a separator, a spacer, and `Leading`, `Center` and `Trailing`
|
|
24
|
+
thirds for a window's toolbar. `ToolbarHarness` drives it.
|
|
25
|
+
- 9728270: A new component, `WindowFrame`: a frame that looks and behaves as a desktop window, with `TitleBar`, `Sidebar`, `Body` and `StatusBar` regions. It has `window`, `settings`, `panel` and `hud` variants, `@fill` for the root of an Electron, Tauri or installed PWA app, and `@fullHeightSidebar`. `WindowFrameHarness` reads it.
|
|
26
|
+
|
|
27
|
+
## 1.0.1
|
|
28
|
+
|
|
29
|
+
No changes in this release.
|
|
30
|
+
|
|
31
|
+
## 1.0.0
|
|
32
|
+
|
|
33
|
+
### Major Changes
|
|
34
|
+
|
|
35
|
+
- a73065d: The first release of Joinery's core packages: `@ember-joinery/primitives` (headless behaviour
|
|
36
|
+
and utilities), `@ember-joinery/ember` (the styled components and their compiled CSS) and
|
|
37
|
+
`@ember-joinery/test-support` (a harness for each of them).
|
|
38
|
+
|
|
39
|
+
### Minor Changes
|
|
40
|
+
|
|
41
|
+
- a73065d: `Accordion` is shadcn's Accordion, and `@ember-joinery/primitives/accordion` the headless one
|
|
42
|
+
under it, Radix's, covering ember-primitives' too: `@type="single"` (optionally `@collapsible`) or
|
|
43
|
+
`"multiple"`, controlled (`@value`, `@onValueChange`) or not (`@defaultValue`), disabled items or
|
|
44
|
+
a disabled accordion, each item a heading with a trigger (`aria-expanded`, `aria-controls`) and a
|
|
45
|
+
content region labelled by it, and the arrow keys, Home and End between triggers, by
|
|
46
|
+
`@orientation` and direction. The styled trigger draws upstream's chevrons (`@icon` and
|
|
47
|
+
`@openIcon` replace them), and the content animates from its measured height.
|
|
48
|
+
`AccordionState` and `AccordionItemState` hold the behaviour for components built on it.
|
|
49
|
+
`@ember-joinery/test-support` adds `AccordionHarness`.
|
|
50
|
+
- a73065d: `AlertDialog` is shadcn's Alert Dialog: Trigger, Content (`@size`: `default` or `sm`), Header,
|
|
51
|
+
Footer, Media, Title, Description, and Action and Cancel Buttons; Cancel has focus when it
|
|
52
|
+
opens, and a press outside doesn't close it. `@ember-joinery/test-support` adds
|
|
53
|
+
`AlertDialogHarness`.
|
|
54
|
+
- a73065d: `Alert` is shadcn's callout, with the `alert` role and a typed `@variant` (`default` or
|
|
55
|
+
`destructive`). It yields its parts, `Title`, `Description` and `Action`, each taking `@as`,
|
|
56
|
+
and a modifier for each (`<h3 {{a.title}}>`) to make your own element that part.
|
|
57
|
+
`@ember-joinery/test-support` adds `AlertHarness`.
|
|
58
|
+
- a73065d: `@ember-joinery/primitives/aspect-ratio` is Radix's AspectRatio: content held to `@ratio`,
|
|
59
|
+
with only the styles that hold it, set through the CSSOM. `AspectRatio` in
|
|
60
|
+
`@ember-joinery/ember` is shadcn's, on it. `@ember-joinery/test-support` adds
|
|
61
|
+
`AspectRatioHarness`.
|
|
62
|
+
- a73065d: `Attachment` is shadcn's Attachment: a file or image in a chat composer, a message thread or an
|
|
63
|
+
upload list, with `@state` (`idle`, `uploading`, `processing`, `error`, `done`), `@size`
|
|
64
|
+
(`default`, `sm`, `xs`), `@orientation` (`horizontal`, `vertical`), `@as`, and its parts,
|
|
65
|
+
yielded as components and modifiers (`Media` with `@variant`, `Content`, `Title`,
|
|
66
|
+
`Description`, `Actions`, `Action`, a ghost `icon-xs` Button by default, and `Trigger`, a button
|
|
67
|
+
or link over the whole card below the actions). `AttachmentGroup` lays attachments out in a row
|
|
68
|
+
that scrolls across and snaps. `@ember-joinery/test-support` adds `AttachmentHarness` and
|
|
69
|
+
`AttachmentGroupHarness`.
|
|
70
|
+
- a73065d: `Avatar` is shadcn's Avatar, with `@size` and its `Image`, `Fallback` and `Badge` parts, and
|
|
71
|
+
`AvatarGroup` with its `Count`. It is built on `@ember-joinery/primitives/avatar`, ember-primitives'
|
|
72
|
+
and Radix's headless Avatar: the image renders once it has loaded, the fallback shows until
|
|
73
|
+
then (after `@delayMs`) and if it fails, the URL goes on the image or the avatar, and the
|
|
74
|
+
avatar yields where its image is; `ImageLoader` loads an image off the page, and tests wait for
|
|
75
|
+
it. `@ember-joinery/test-support` adds `AvatarHarness` and `AvatarGroupHarness`.
|
|
76
|
+
- a73065d: `Badge` is shadcn's Badge, with a typed `@variant` (`default`, `secondary`, `destructive`,
|
|
77
|
+
`outline`, `ghost` or `link`), `@as` for another tag, and an `asBadge` modifier for your own
|
|
78
|
+
elements and components (`<LinkTo {{asBadge}}>`); `badgeClasses()` and `badgeAttributes()`
|
|
79
|
+
return what both render. `@ember-joinery/test-support` adds `BadgeHarness`.
|
|
80
|
+
- a73065d: `@ember-joinery/primitives/breadcrumb` is ember-primitives' Breadcrumb: a named `nav` around an
|
|
81
|
+
ordered list, yielding a `Separator` that assistive technology skips
|
|
82
|
+
(`breadcrumbSeparatorAria()`). `Breadcrumb` in `@ember-joinery/ember` is shadcn's, yielding
|
|
83
|
+
`List`, `Item`, `Link`, `Page`, `Separator` (lucide's chevron, mirrored right to left, or your
|
|
84
|
+
block or `@icon`) and `Ellipsis`, each also a modifier (`<LinkTo {{b.link}}>`).
|
|
85
|
+
`@ember-joinery/test-support` adds `BreadcrumbHarness`, which drives both.
|
|
86
|
+
- a73065d: `Bubble` is shadcn's Bubble: a message's surface, with its seven `@variant`s, `@align`, `@as`,
|
|
87
|
+
and its parts, yielded as components and modifiers: `Content` (`@as="button"` or `"a"`, or the
|
|
88
|
+
`content` modifier on a `LinkTo`, makes the bubble a button or a link) and `Reactions`
|
|
89
|
+
(`@side`, `@align`). `BubbleGroup` stacks consecutive bubbles from one sender.
|
|
90
|
+
`@ember-joinery/test-support` adds `BubbleHarness` and `BubbleGroupHarness`.
|
|
91
|
+
- a73065d: `ButtonGroup` is shadcn's Button Group: buttons joined into one control, in a row or a column
|
|
92
|
+
(`@orientation`), with its `Separator` (its ARIA the primitives' `separatorAria()`) and `Text`
|
|
93
|
+
parts; `buttonGroupClasses()` returns what it renders. `@ember-joinery/test-support` adds `ButtonGroupHarness`.
|
|
94
|
+
- a73065d: `Button` is shadcn's Button, with typed `@variant` and `@size`, `@as` for another tag, and a
|
|
95
|
+
`asButton` modifier for your own elements and components (`<LinkTo {{asButton}}>`);
|
|
96
|
+
`buttonClasses()` and `buttonAttributes()` return what both render. `@ember-joinery/test-support`
|
|
97
|
+
adds `ButtonHarness`.
|
|
98
|
+
- a73065d: `Calendar` is shadcn's Calendar, with Joinery's own date picking in place of React DayPicker
|
|
99
|
+
and no date library: `@mode` `single`, `multiple` or `range` (`@value`, `@defaultValue` and
|
|
100
|
+
`@onValueChange`, a `Date`, `Date[]` or `{ from, to }`), month and year dropdowns
|
|
101
|
+
(`@captionLayout`), several months, `@disabled`, `@hidden` and `@modifiers` matchers, week
|
|
102
|
+
numbers, outside days, fixed weeks, and the date grid's keys, right to left too. Names,
|
|
103
|
+
numbers and the week's first day come from Intl in `@locale`; `@calendar` and `@numerals` show
|
|
104
|
+
any calendar Intl knows, such as the Persian one. A `<:day>` block draws what each day shows.
|
|
105
|
+
`@ember-joinery/primitives/calendar` is the headless one, with `CalendarState` and its date
|
|
106
|
+
helpers, and `@ember-joinery/test-support` adds `CalendarHarness`.
|
|
107
|
+
- a73065d: `Card` is shadcn's card, with `@size` (`default` or `sm`) and the `--card-spacing` variable for
|
|
108
|
+
its spacing. It yields its parts, `Header`, `Title`, `Description`, `Action`, `Content` and
|
|
109
|
+
`Footer`, each taking `@as`, and a modifier for each (`<LinkTo {{c.title}}>`).
|
|
110
|
+
`@ember-joinery/test-support` adds `CardHarness`.
|
|
111
|
+
- a73065d: `Checkbox` is shadcn's Checkbox, on Radix's: `@checked`, `@defaultChecked` and
|
|
112
|
+
`@onCheckedChange` (controlled or not), the `'indeterminate'` state (`aria-checked="mixed"`),
|
|
113
|
+
`@disabled`, `@required`, and `@icon` and `@indeterminateIcon` to replace its marks. In a form, a
|
|
114
|
+
hidden native checkbox beside it submits its `name` and `value`, and a reset restores it.
|
|
115
|
+
`@ember-joinery/primitives/checkbox` is the headless one, with its `Indicator`, and
|
|
116
|
+
`@ember-joinery/test-support` adds `CheckboxHarness`.
|
|
117
|
+
- a73065d: `Collapsible` is shadcn's Collapsible, and `@ember-joinery/primitives/collapsible` the headless
|
|
118
|
+
one under it, Radix's: a trigger (`aria-expanded`, `aria-controls`) that shows and hides content,
|
|
119
|
+
controlled (`@open`, `@onOpenChange`) or not (`@defaultOpen`), with a yielded `trigger` modifier
|
|
120
|
+
for your own element (`<Button {{c.trigger}}>`). The content stays in the document, `hidden`
|
|
121
|
+
while closed, animates out through `Presence`, and is measured into
|
|
122
|
+
`--radix-collapsible-content-height` and `-width`; `CollapsibleState` holds the behaviour for
|
|
123
|
+
components built on it. Joinery's base keeps a part that is `hidden` hidden whatever `display`
|
|
124
|
+
a class gives it, as Tailwind's preflight does, so content laid out with `flex` stays out of the
|
|
125
|
+
way while closed. `Presence` now also yields `isExiting`. `@ember-joinery/test-support` adds
|
|
126
|
+
`CollapsibleHarness`.
|
|
127
|
+
- a73065d: `Combobox` is shadcn's Combobox, on Base UI's: `<Combobox @items={{…}} as |c|>` yields Input
|
|
128
|
+
(in its input group, with `@showTrigger`, `@showClear`, `@groupClass` for the group, and
|
|
129
|
+
an `Addon` it yields for an icon beside the input),
|
|
130
|
+
Trigger, TriggerIcon, Clear, Value, Content, List, Item, Group, Label, Collection, Empty,
|
|
131
|
+
Separator, Chips, Chip and ChipsInput. Typing filters `@items` (an `Intl.Collator` match anywhere in the label, or your
|
|
132
|
+
own `@filter`, or `@filter={{null}}` for results filtered elsewhere) and the arrow keys
|
|
133
|
+
highlight an item while focus stays in the input; `@multiple` shows the chosen items as chips,
|
|
134
|
+
`@autoHighlight` highlights the first match, and the input can sit inside the popup behind a
|
|
135
|
+
trigger of your own. `@ember-joinery/primitives/combobox` is the headless one, and
|
|
136
|
+
`@ember-joinery/test-support` adds `ComboboxHarness`.
|
|
137
|
+
- a73065d: `ContextMenu` is shadcn's Context Menu, on Radix's: a right click on `<c.Trigger>` (or a long
|
|
138
|
+
press by touch or pen) opens its content at the pointer, in place of the browser's own menu. Its
|
|
139
|
+
content, items, checkbox and radio items, labels, separators, shortcuts and submenus are the
|
|
140
|
+
Dropdown Menu's, with `context-menu` in their classes and slots, and `{{c.trigger}}` makes your
|
|
141
|
+
own element the trigger, styled as `<c.Trigger>` is. `@onOpenChange` tells you when
|
|
142
|
+
it opens and closes. `@ember-joinery/primitives/context-menu` is the headless one, and
|
|
143
|
+
`@ember-joinery/test-support` adds `ContextMenuHarness`, with `open(point)` for a right click and
|
|
144
|
+
`longPress()`.
|
|
145
|
+
- a73065d: `DatePickerHarness` drives a date picker, shadcn's composition of a `Popover` and a `Calendar`
|
|
146
|
+
(there is no date picker component of its own): a `PopoverHarness` with the `calendar` in its
|
|
147
|
+
content and the trigger's `text`, and `pick(day)`, `pickRange(from, to)` and `showMonth(day)`,
|
|
148
|
+
which open the popover, go to the day's month (by the month and year dropdowns where the
|
|
149
|
+
calendar has them, else the previous and next buttons) and press the day. `pickRange()` picks
|
|
150
|
+
just that range whatever range the calendar holds, pressing `from` until the range starts and
|
|
151
|
+
ends there before it presses `to`, and throws when the calendar won't take the range.
|
|
152
|
+
The guide's Date Picker page ports every upstream example: the demo, basic, a range over two
|
|
153
|
+
months, a date of birth, an input, a time picker, natural language and right to left.
|
|
154
|
+
|
|
155
|
+
An Input Group addon's margin for a button directly in it (each style's `has-[>button]` rule)
|
|
156
|
+
now also reaches a button inside a Popover's, Tooltip's, Hover Card's, Dialog's, Sheet's,
|
|
157
|
+
Drawer's, Select's or menu's root, which renders an element (display: contents) where Radix's
|
|
158
|
+
renders none: a date picker's calendar button, or a tooltip's or dropdown's button in an addon,
|
|
159
|
+
sits where upstream's does. `build-css.mjs` declares a `style-<name>` variant for each style,
|
|
160
|
+
which a component's hand-written rule uses to restate a sheet's per-style utilities.
|
|
161
|
+
|
|
162
|
+
- a73065d: `Dialog` is shadcn's Dialog: Trigger, Content (with its overlay and a close button,
|
|
163
|
+
`@showCloseButton`, `@closeLabel` and `@closeIcon`), Header, Footer (`@showCloseButton`), Title,
|
|
164
|
+
Description and Close, with the `trigger` and `close` modifiers for your own elements.
|
|
165
|
+
`@ember-joinery/test-support` adds `DialogHarness`, which follows the content into the top layer.
|
|
166
|
+
- a73065d: `Drawer` is shadcn's Drawer, on the headless one in `@ember-joinery/primitives/drawer`: a panel
|
|
167
|
+
from any edge of the screen (`@direction`), with upstream's handle, header, footer, title and
|
|
168
|
+
description, and vaul's snap points, nested drawers and scaled background. `joinery.css` (and
|
|
169
|
+
every style) ships vaul 1.1.2's CSS, which slides it in and out, with twins for right to left.
|
|
170
|
+
`@ember-joinery/test-support` adds `DrawerHarness`, a `DialogHarness` that drags the drawer
|
|
171
|
+
(`drag()`, `swipe()`, `tapHandle()`) and reads its `direction`, `side`, `activeSnapPoint`,
|
|
172
|
+
`offset` and `isDragging`.
|
|
173
|
+
- a73065d: `DropdownMenu` is shadcn's Dropdown Menu, on Radix's: `<DropdownMenu as |m|>` yields Trigger,
|
|
174
|
+
Content, Group, Label, Item (`@variant`, `@inset`, `@onSelect`), LinkItem, CheckboxItem,
|
|
175
|
+
RadioGroup, Separator, Shortcut, Sub (its Trigger and Content) and Portal, a `trigger` modifier
|
|
176
|
+
for your own Button (`<Button {{m.trigger}}>`), and `item` and `checkboxItem` modifiers that
|
|
177
|
+
style your own element as an item (a radio group's `item` and a submenu's `trigger` do the same
|
|
178
|
+
for theirs). The content is a menu in the top layer, below its trigger and
|
|
179
|
+
lined up with its start: the arrow keys, Home, End and typing move between its items, Enter or a
|
|
180
|
+
click selects one, Escape or a press outside closes it, and focus goes back to the trigger.
|
|
181
|
+
Submenus open on hover or the arrow pointing into them, and stay open while the pointer crosses
|
|
182
|
+
other items on its way there; as Radix's, a submenu closes (`@onOpenChange(false)`) when the
|
|
183
|
+
menu it is in closes or it goes away. Every part but LinkItem (always an `<a>`) takes `@as`.
|
|
184
|
+
Modal by default, it keeps focus and the pointer in the menu and makes the page inert. Its
|
|
185
|
+
state is `@open`/`@defaultOpen`/`@onOpenChange`, and it takes ember-primitives' Menu's
|
|
186
|
+
positioning arguments too: `<DropdownMenu @placement="top-end">` places its content, alignment
|
|
187
|
+
and all.
|
|
188
|
+
`@ember-joinery/primitives/dropdown-menu` is the headless one, covering ember-primitives' Menu
|
|
189
|
+
(also exported as `Menu`), and `@ember-joinery/test-support` adds `DropdownMenuHarness`, which
|
|
190
|
+
finds items by their text and opens submenus with `sub()`.
|
|
191
|
+
- a73065d: `Empty` is shadcn's empty state. It yields its parts, `Header`, `Media` (with `@variant`,
|
|
192
|
+
`default` or `icon`), `Title`, `Description` and `Content`, each taking `@as`, and a modifier
|
|
193
|
+
for each (`<img {{e.media}}>`). `@ember-joinery/test-support` adds `EmptyHarness`.
|
|
194
|
+
- a73065d: `Field` is shadcn's Field family: `Field` (`@orientation` `vertical`, `horizontal` or
|
|
195
|
+
`responsive`, `@invalid`, `@disabled`), `FieldSet`, `FieldLegend` (`@variant`), `FieldGroup`,
|
|
196
|
+
`FieldContent`, `FieldLabel`, `FieldTitle`, `FieldDescription`, `FieldSeparator` and
|
|
197
|
+
`FieldError` (its block, or `@errors`: one message, or a list of distinct ones), with an `as…`
|
|
198
|
+
modifier for each part that has nothing of its own to render. `@ember-joinery/test-support`
|
|
199
|
+
adds `FieldHarness`, `FieldSetHarness` and `FieldGroupHarness`. A radio group's items now name
|
|
200
|
+
their group's `id` (the caller's own, when they give one) in `data-test-jn-owner`, so
|
|
201
|
+
`RadioGroupHarness` finds them inside a Field or a label around them, and the checkable
|
|
202
|
+
harnesses count a control in a disabled `<fieldset>` as disabled.
|
|
203
|
+
- a73065d: `FileDrop` and `DocumentFileDrop` are ember-primitives': a zone to drop files on or press to pick
|
|
204
|
+
them, and a way to take files dropped anywhere on the page, filtered by `@accept` as the file
|
|
205
|
+
picker filters them. `@ember-joinery/primitives/file-drop` has the headless ones (with
|
|
206
|
+
`@disabled`, and `accepts`, `filesFrom`, `hasFiles` and `DragState` for a target of your own);
|
|
207
|
+
`@ember-joinery/ember`'s FileDrop is a dashed drop zone, and its DocumentFileDrop covers the page
|
|
208
|
+
with an overlay while files are dragged over it. `@ember-joinery/test-support` adds
|
|
209
|
+
`FileDropHarness`, `DocumentFileDropHarness`, and `dragFilesOver`, `dragFilesAway` and
|
|
210
|
+
`dropFiles`.
|
|
211
|
+
- a73065d: `HoverCard` is shadcn's Hover Card, on Radix's: it opens once the pointer has rested on its
|
|
212
|
+
trigger for `@openDelay` (or the trigger has focus), below it, centred and 4px off, and closes
|
|
213
|
+
`@closeDelay` after the pointer leaves both, staying open while text in it is selected; a touch
|
|
214
|
+
doesn't open it. `@ember-joinery/primitives/hover-card` is the headless one, and
|
|
215
|
+
`@ember-joinery/test-support` adds `HoverCardHarness`.
|
|
216
|
+
- 17c5b5c: Joinery's built-in strings can be translated. `@ember-joinery/primitives/i18n` declares the msgid
|
|
217
|
+
contract's `Message` and `Translator`, with `format()` (English: a `plural` by `values.count`, and
|
|
218
|
+
`{name}` placeholders), `translate(context, message, values?)`, which uses the app's
|
|
219
|
+
`translator:main` when it registers one and English otherwise, and `t`, the same for a
|
|
220
|
+
template. Every string the primitives show is a message in `@ember-joinery/primitives/messages`
|
|
221
|
+
(`joinery.<component>.<name>`) and goes through the translator; an argument still wins. Joined
|
|
222
|
+
strings are one message each (`Value {index} of {count}`, `Today, {date}, selected`, `Notifications
|
|
223
|
+
{hotkey}`), so a translation orders the words. A calendar's and a combobox's `@locale` default to
|
|
224
|
+
the translator's. `defaultSliderThumbLabel` takes an optional context, and `CalendarState` an
|
|
225
|
+
optional third argument, the component, for the same. `@ember-joinery/test-support` adds
|
|
226
|
+
`setupTranslator(hooks, translator)` and `pseudoTranslator`, a pseudo-locale that wraps every
|
|
227
|
+
string it translates.
|
|
228
|
+
- a73065d: `Icon` draws `lucide` icons, imported one at a time (`<Icon @icon={{ArrowUp}} />`), decorative
|
|
229
|
+
unless given `@label`. `@ember-joinery/test-support` adds `IconHarness`.
|
|
230
|
+
- a73065d: `InputGroup` is shadcn's Input Group: one input or textarea with addons beside, above or below
|
|
231
|
+
it, drawn as one field. It yields its `Input`, `Textarea`, `Addon` (`@align`), `Button` (`@size`,
|
|
232
|
+
`@variant`) and `Text`, each also a modifier for an element of your own, and `g.control` marks
|
|
233
|
+
a control of your own as the group's. `@ember-joinery/test-support` adds `InputGroupHarness`.
|
|
234
|
+
- a73065d: `InputOTP` is shadcn's Input OTP, yielding its `Group`, `Slot` and `Separator`, on a new
|
|
235
|
+
`@ember-joinery/primitives/input-otp`: the `input-otp` library's one invisible native input under
|
|
236
|
+
slots you render, which also covers ember-primitives' `OTP`. Its code is controlled or not
|
|
237
|
+
(`@value`, `@defaultValue`, `@onValueChange`), `@pattern` (`REGEXP_ONLY_DIGITS` and the rest)
|
|
238
|
+
refuses what it doesn't match, every paste goes through `@pasteTransformer`, `@onComplete` hears
|
|
239
|
+
a complete code, `@autoSubmit` submits its form, and a browser's autofill of a code it was sent
|
|
240
|
+
fills it at once. Right to left, its arrow keys follow the slots, which run from the right.
|
|
241
|
+
`@ember-joinery/test-support` adds `InputOTPHarness`, which types, deletes, moves the caret,
|
|
242
|
+
clicks, pastes and autofills as a browser does, and ember-primitives' `fillOTP`.
|
|
243
|
+
- a73065d: `Input` is shadcn's Input: a native `<input>` with `@value`, `@defaultValue` and
|
|
244
|
+
`@onValueChange`, and an `asInput` modifier for an input of your own; `inputClasses()` and
|
|
245
|
+
`inputAttributes()` return what both render. `@ember-joinery/test-support` adds `InputHarness`.
|
|
246
|
+
- a73065d: `Item` is shadcn's Item, with typed `@variant` and `@size`, `@as`, an `asItem` modifier for your
|
|
247
|
+
own elements and components (`<LinkTo {{asItem}}>`), and its parts, yielded and exported
|
|
248
|
+
(`ItemMedia`, `ItemContent`, `ItemTitle`, `ItemDescription`, `ItemActions`, `ItemHeader`,
|
|
249
|
+
`ItemFooter`); `itemClasses()` and `itemAttributes()` return what it renders. `ItemGroup` is a
|
|
250
|
+
list of items, with a `Separator`, also exported as `ItemSeparator`, whose ARIA is the
|
|
251
|
+
primitives' `separatorAria()`. `@ember-joinery/test-support` adds `ItemHarness` and
|
|
252
|
+
`ItemGroupHarness`.
|
|
253
|
+
- a73065d: `Kbd` and `KbdGroup` are shadcn's keyboard keys: a styled `<kbd>`, and a `<kbd>` of them for a
|
|
254
|
+
shortcut, each with `@as`. `@ember-joinery/test-support` adds `KbdHarness` and
|
|
255
|
+
`KbdGroupHarness`.
|
|
256
|
+
- a73065d: `@ember-joinery/primitives/label` is Radix's Label: a native `<label>` whose text a double
|
|
257
|
+
click doesn't select (`preventLabelSelection`, for an element of your own). `Label` in
|
|
258
|
+
`@ember-joinery/ember` is shadcn's, on it, with an `asLabel` modifier, and dims beside a
|
|
259
|
+
disabled `peer` control. `@ember-joinery/test-support` adds `LabelHarness`.
|
|
260
|
+
- a73065d: `Marker` is shadcn's Marker: an inline status, note, bordered row or labelled separator in a
|
|
261
|
+
conversation, with `@variant`, `@as`, an `asMarker` modifier for your own elements and components
|
|
262
|
+
(`<LinkTo {{asMarker}}>`), and its parts, yielded and exported (`MarkerIcon`, which is hidden
|
|
263
|
+
from assistive technology, and `MarkerContent`); `markerClasses()` and `markerAttributes()`
|
|
264
|
+
return what it renders, as upstream's `markerVariants`. `@ember-joinery/test-support` adds
|
|
265
|
+
`MarkerHarness`.
|
|
266
|
+
- a73065d: `Menubar` is shadcn's Menubar, on Radix's: `<Menubar as |bar|><bar.Menu as |m|>` yields a
|
|
267
|
+
Trigger and a Content placed as upstream's (below the trigger, at its start, 4px before it and
|
|
268
|
+
8px off), with the Dropdown Menu's items, checkbox and radio items, labels, separators,
|
|
269
|
+
shortcuts and submenus in the menubar's classes and slots, and `trigger`, `item` and
|
|
270
|
+
`checkboxItem` modifiers for your own elements. Its triggers share one tab stop: the arrow keys
|
|
271
|
+
move between them, Enter, Space or ArrowDown open a menu on its first item, and while one is
|
|
272
|
+
open ArrowLeft and ArrowRight (flipped right to left) and the pointer move to the others. Which
|
|
273
|
+
menu is open is `@value`/`@defaultValue`/`@onValueChange`. `@ember-joinery/primitives/menubar`
|
|
274
|
+
is the headless one, and `@ember-joinery/test-support` adds `MenubarHarness`, whose `menu(label)`
|
|
275
|
+
has a Dropdown Menu harness's members for each menu.
|
|
276
|
+
- a73065d: `MessageScrollerProvider` is shadcn's Message Scroller: a chat transcript's scroll container that
|
|
277
|
+
opens a saved transcript at the start, the end or the last anchored turn (`@defaultScrollPosition`,
|
|
278
|
+
hidden until it gets there), settles a new `@scrollAnchor` turn near the top with a peek of the
|
|
279
|
+
one before (`@scrollPreviousItemPeek`), follows a streamed reply at the end with `@autoScroll`
|
|
280
|
+
until the reader scrolls away, keeps the reader's row in place when history is prepended, and
|
|
281
|
+
jumps to any row. It yields its styled parts (`Root`, `Viewport`, `Content`, `Item`, `Button`,
|
|
282
|
+
`Visibility`), the commands (`scrollToMessage`, `scrollToEnd`, `scrollToStart`) and the scroll
|
|
283
|
+
state (`scrollable`); the parts are exported on their own too (`MessageScroller`,
|
|
284
|
+
`MessageScrollerItem`…). `@ember-joinery/primitives/message-scroller` is the headless scroller,
|
|
285
|
+
`@shadcn/react`'s, with `MessageScrollerConsumer` and the `messageScrollerButton` modifier. Its
|
|
286
|
+
button, as upstream's, keeps a `tabindex` of your own while it is active, and a click listener of
|
|
287
|
+
yours runs first and can stop the scroll with `preventDefault()`; the styled one takes `@as`.
|
|
288
|
+
`@ember-joinery/test-support` adds `MessageScrollerHarness`.
|
|
289
|
+
- a73065d: `Message` is shadcn's Message: one row of a conversation, with `@align` (`start` or `end`),
|
|
290
|
+
`@as`, and its parts, yielded as components and modifiers (`Avatar`, `Content`, `Header`,
|
|
291
|
+
`Footer`). `MessageGroup` stacks consecutive messages from one sender.
|
|
292
|
+
`@ember-joinery/test-support` adds `MessageHarness` and `MessageGroupHarness`.
|
|
293
|
+
- a73065d: `NativeForm` is ember-primitives' Form, renamed so it can't clash with Formwright's `<Form>`: a
|
|
294
|
+
native `<form>` whose `@onChange` hears its data as an object on every input and on submit.
|
|
295
|
+
`dataFromEvent` reads the same object out of any form's event, converting numbers, dates,
|
|
296
|
+
checkboxes, radios, selects and files as form-data-utils does, and takes Joinery's button
|
|
297
|
+
controls in through their hidden inputs. `@ember-joinery/test-support` adds
|
|
298
|
+
`NativeFormHarness`, whose `pressEnter` submits the form from a field as the browser does.
|
|
299
|
+
- a73065d: `NativeSelect` is shadcn's Native Select: the browser's own `<select>` with a chevron (`@icon`),
|
|
300
|
+
typed `@size`, `@value`, `@defaultValue` and `@onValueChange`, yielding its `Option` and
|
|
301
|
+
`OptGroup` parts. `@ember-joinery/test-support` adds `NativeSelectHarness`.
|
|
302
|
+
- a73065d: `NavigationMenu` is shadcn's Navigation Menu, on Radix's: a `<nav>` whose `n.List` holds
|
|
303
|
+
`n.Item`s, each a `n.Link` or an `item.Trigger` and its `item.Content`. A trigger opens its
|
|
304
|
+
content on a click, or when the pointer rests on it (at once while another was just open); the
|
|
305
|
+
contents show in a viewport below the list that takes the open one's size and slides each in
|
|
306
|
+
from its trigger's side (`data-motion`), or below their own triggers with `@viewport={{false}}`.
|
|
307
|
+
Tab goes from an open trigger into its links and on, and the arrow keys, Home and End move
|
|
308
|
+
between triggers and links, for a trigger of your own (`{{item.trigger}}`) as for `item.Trigger`.
|
|
309
|
+
`n.Indicator` follows the open trigger, `n.Viewport` places the viewport yourself with
|
|
310
|
+
`@viewport={{false}}`, and `navigationMenuTriggerStyle()` gives a link the trigger's look, its
|
|
311
|
+
padding over the link's, as upstream's tailwind-merge gives it. Its state is
|
|
312
|
+
`@value`/`@defaultValue`/`@onValueChange`. `@ember-joinery/primitives/navigation-menu` is the
|
|
313
|
+
headless one, with `List`, `Item`, `Link`, `Indicator` and `Viewport`, and
|
|
314
|
+
`@ember-joinery/test-support` adds `NavigationMenuHarness`.
|
|
315
|
+
- a73065d: `Pagination` is shadcn's: a named `nav` yielding `Content`, `Item`, `Link` (`@isActive`,
|
|
316
|
+
`@size`), `Previous` and `Next` (`@text`, `@label`, `@icon`) and `Ellipsis`. Its links are
|
|
317
|
+
Buttons, ghost or, for the current page, outline with `aria-current="page"`; the `link`,
|
|
318
|
+
`previous` and `next` modifiers make a router's link one, and `paginationLinkClasses()` and
|
|
319
|
+
`paginationLinkAttributes()` return what they render. `@ember-joinery/test-support` adds
|
|
320
|
+
`PaginationHarness`.
|
|
321
|
+
- a73065d: `Popover` is shadcn's Popover, on Radix's: `<Popover as |p|>` yields Trigger, Anchor, Content,
|
|
322
|
+
Header, Title, Description, Close and Arrow, and a `trigger` modifier for your own Button
|
|
323
|
+
(`<Button {{p.trigger}}>`). The content is in the top layer while open, placed against its
|
|
324
|
+
trigger (centred, 4px off, flipping to stay in view), closed by Escape or a press outside, with
|
|
325
|
+
focus moving in and back; `@modal` keeps focus and the pointer inside, and hides the rest of
|
|
326
|
+
the page from assistive technology and stops it scrolling. Its state is
|
|
327
|
+
`@open`/`@defaultOpen`/`@onOpenChange`. `@ember-joinery/primitives/popover` is the headless
|
|
328
|
+
one, covering ember-primitives' Popover (`@placement`, `@offsetOptions`, `@flipOptions`,
|
|
329
|
+
`@shiftOptions`, `@middleware`, `@strategy`, and the `reference`, `setReference`, `arrow` and
|
|
330
|
+
`data` yields), and `@ember-joinery/test-support` adds `PopoverHarness`.
|
|
331
|
+
- a73065d: `@ember-joinery/primitives/command` adds `Command`, cmdk's command menu, headless: typing filters
|
|
332
|
+
the items with cmdk's command score (or `@filter`) and shows the best first, groups and
|
|
333
|
+
separators hide with nothing to show, Empty shows when nothing matches, and the arrows, Home and
|
|
334
|
+
End, Ctrl+N/J/P/K and Alt+arrow move the selection while focus stays in the input; Enter clicks
|
|
335
|
+
the selected item. It covers ember-primitives' CommandPalette too: `@search` and
|
|
336
|
+
`@onSearchChange`, `@onSelect`, `@hotkey` and `@onOpen`, link items, and a `role="status"` that
|
|
337
|
+
announces the result count (`@resultsText`). `CommandDialog` puts a Command in a modal dialog,
|
|
338
|
+
with a `@hotkey` that opens and closes it. `@ember-joinery/test-support` adds `CommandHarness`
|
|
339
|
+
and `CommandDialogHarness`.
|
|
340
|
+
- a73065d: ember-primitives' components that shadcn has no counterpart for, one subpath export each:
|
|
341
|
+
`scroller` (`Scroller`, which yields `scrollToTop`, `scrollToBottom`, `scrollToLeft`,
|
|
342
|
+
`scrollToRight`, `scrollToStart` and `scrollToEnd`), `zoetrope` (`Zoetrope`: a row that scrolls a
|
|
343
|
+
page at a time, instantly for reduced motion, right to left too, and without trapping Tab),
|
|
344
|
+
`hero` (`Hero`), `sticky-footer` (`StickyFooter`), `link` (`Link`, active-aware, with
|
|
345
|
+
`aria-current` and `data-active`), `external-link` (`ExternalLink`), `heading` (`Heading`, whose
|
|
346
|
+
level comes from the sections around it, and `getSectionHeadingLevel`), `incremental-each`
|
|
347
|
+
(`IncrementalEach`, which renders a long list a batch at a time) and `shadowed` (`Shadowed`, a
|
|
348
|
+
shadow root, with `@includeStyles`). The layouts bring their own rules, in `@layer joinery`, with
|
|
349
|
+
nothing to import; an app with CSS layers of its own names `joinery` ahead of them, as
|
|
350
|
+
joinery.css and the Tailwind setup do, for its layers to win. `@ember-joinery/test-support` adds `ScrollerHarness`, `ZoetropeHarness`,
|
|
351
|
+
`HeroHarness`, `StickyFooterHarness`, `LinkHarness`, `ExternalLinkHarness`, `HeadingHarness` and
|
|
352
|
+
`ShadowedHarness`, ember-primitives' shadow DOM helpers (`findInShadow`, `findShadow`,
|
|
353
|
+
`findInFirstShadow`, `hasShadowRoot`), and `data-test-jn-wrapper`: a component that wraps your
|
|
354
|
+
content marks its root with it, and the parts inside belong to the component around it.
|
|
355
|
+
- a73065d: Focus, one subpath export each, ported from Radix and covering what ember-primitives gets from
|
|
356
|
+
tabster, with nothing to set up: `focus-scope` (`FocusScope`, `{{focusScope}}` and
|
|
357
|
+
`createFocusScope`: focus moves in, can be trapped or loop, and returns when the scope goes;
|
|
358
|
+
scopes stack, and trapped ones add focus guards), `roving-focus` (`RovingFocusGroup` and
|
|
359
|
+
`RovingFocus`: one tab stop, the arrow keys, Home and End, right to left, loop, a remembered and
|
|
360
|
+
an active item, a controlled tab stop), `typeahead` (`{{typeahead}}`, `Typeahead`,
|
|
361
|
+
`getNextMatch`) and `focus` (`focusable` queries, `focusFirst`, `focusElement`, and
|
|
362
|
+
`{{restoreFocus}}`, which keeps focus from falling to `<body>` when its element is removed).
|
|
363
|
+
`@ember-joinery/test-support` adds `tab()`, `tabOrder()`, `pressKey()`, `typeKeys()` and
|
|
364
|
+
`RovingFocusGroupHarness`.
|
|
365
|
+
- a73065d: The primitives' foundations, one subpath export each: `controllable-state` (Radix's
|
|
366
|
+
controlled-or-uncontrolled pattern, as `controllable(this, 'open', false)`), `id` (`idFor`, the
|
|
367
|
+
ids a component's parts share; one-off ids use Ember's own `uniqueId`), `direction`
|
|
368
|
+
(`DirectionProvider` and `getDirection`), `as` and `part` (the `@as` tag swap and the part
|
|
369
|
+
modifiers that let any element, `LinkTo` included, be a part), `presence` (keeps a part mounted
|
|
370
|
+
through its exit animation), `visually-hidden` (`VisuallyHidden` and `{{visuallyHidden}}`),
|
|
371
|
+
`keys` (`Key` and `KeyCombo`), `color-scheme` (system, light or dark, saved, synced across tabs,
|
|
372
|
+
applied to `<html>`; replaces next-themes) and `service` (one instance per owner, for app-wide
|
|
373
|
+
state that tests must not share). `@ember-joinery/test-support` adds `KeyHarness`,
|
|
374
|
+
`KeyComboHarness` and `setupColorScheme`.
|
|
375
|
+
- a73065d: Layering, anchoring, portals and dismissal, one subpath export each. `layer`: `{{topLayer}}`
|
|
376
|
+
puts an element in the browser's top layer with the Popover API (`popover="manual"`, or `auto`
|
|
377
|
+
for the browser's light dismiss), nested layers always above their parents. `anchor`:
|
|
378
|
+
`anchorTo`, `FloatingUI` and `anchor()` place an element against another with CSS anchor
|
|
379
|
+
positioning where the browser has it and Floating UI (offset, flip, shift, size, arrow, hide)
|
|
380
|
+
otherwise or when `globalThis.JOINERY_ANCHOR_FALLBACK` is set, taking both Radix's Popper
|
|
381
|
+
arguments and ember-primitives' floating-ui ones, setting `data-side`, `data-align` and the
|
|
382
|
+
`--jn-anchor-*` custom properties; with ember-primitives' `exposeMetadata` and `flipTo`
|
|
383
|
+
middleware. `dismiss`: the dismiss stack (`{{dismissable}}`, `{{dismissableBranch}}`,
|
|
384
|
+
`registerDismissable`), as Radix's `DismissableLayer`: Escape closes only the top layer, and
|
|
385
|
+
pointers and focus outside close the layers they leave, nested layers counting as inside their
|
|
386
|
+
parents. `portal`: ember-primitives' `Portal`, `PortalTargets`, `PortalTarget` and `wormhole`,
|
|
387
|
+
with `<body>` as Radix's default target. `@ember-joinery/test-support` adds `press`,
|
|
388
|
+
`pressOutside`, `pressEscape`, `isInTopLayer`, `placementOf` and `setupAnchorFallback`.
|
|
389
|
+
- a73065d: ember-primitives' app utilities, one subpath export each: `store` (`createStore`, one instance
|
|
390
|
+
per context, owner or none, with `findOwner` and `isOwner`), `service` (now also `(service "router")` for a
|
|
391
|
+
registered service, and `asyncService` for one loaded on demand), `head` (`InHead`),
|
|
392
|
+
`body-class` (`{{bodyClass}}`), `iframe` (`inIframe`, `notInIframe`), `load` (a component that
|
|
393
|
+
loads another), `qp` (`qp`, `withQP`, `castToBoolean`), `link-helper` (the `link` helper:
|
|
394
|
+
external, active, and a routed click, with `isExternalLink`, `isActiveLink` and
|
|
395
|
+
`dynamicSegments`), `proper-links` (`@properLinks`, `setupProperLinks`,
|
|
396
|
+
`shouldHandle`), `viewport` (`viewport()` and `InViewport`), `on-resize` (`{{onResize}}`),
|
|
397
|
+
`resize-observer` (`resizeObserver()` and `ignoreROError`), `dom-context` (`Provide` and `Consume`) and `narrowing` (`isString`,
|
|
398
|
+
`isElement`, `isNewable`, `isNonNullableObject`, `Newable`). `@ember-joinery/test-support` adds `setupRouting` and
|
|
399
|
+
`getRouter`, and `waitForObservers` and `scrollIntoView` for what the observers report.
|
|
400
|
+
- a73065d: `@ember-joinery/primitives/progress` is ember-primitives' and Radix's Progress: a
|
|
401
|
+
`progressbar` with its value, max and `@getValueLabel` text in ARIA and data attributes,
|
|
402
|
+
indeterminate without a value, clamping out-of-range values, and yielding an `Indicator` and
|
|
403
|
+
the value, percent and state; `resolveProgress()` returns what it renders. `Progress` in
|
|
404
|
+
`@ember-joinery/ember` is shadcn's, on it, and announces its value, which upstream's leaves off.
|
|
405
|
+
`@ember-joinery/test-support` adds `ProgressHarness`.
|
|
406
|
+
- a73065d: `Questionnaire` is shadcn's Questionnaire: a multi-step native form of single-choice,
|
|
407
|
+
multiple-choice, freeform and skippable questions, with progress, validation (its own, or yours
|
|
408
|
+
through `@invalid` and `@message`), navigation buttons that show where they apply, letter or
|
|
409
|
+
number shortcuts, the keyboard of upstream's (arrows between answers and items, flipped right to
|
|
410
|
+
left; `Enter` and `Meta+Enter` to confirm), a controlled or uncontrolled active item
|
|
411
|
+
(`@item`, `@defaultItem`, `@onItemChange`; an item that no longer applies gives way to the
|
|
412
|
+
first, and `@onItemChange` hears it), controlled or default answers (a freeform `Input` takes
|
|
413
|
+
`@value` and `@onValueChange`), a reset that puts them back, development warnings where `@items`
|
|
414
|
+
and the rendered items part, `@as` on every part, and the navigation buttons as modifiers
|
|
415
|
+
(`{{q.next}}`). Its behaviour is `@ember-joinery/primitives/questionnaire`, @shadcn/react's headless
|
|
416
|
+
Questionnaire, whose state classes put their parts on any element, so a card's or a dialog's
|
|
417
|
+
title can be the question (`{{i.title}}`). `@ember-joinery/test-support` adds
|
|
418
|
+
`QuestionnaireHarness`.
|
|
419
|
+
- a73065d: `RadioGroup` is shadcn's Radio Group, on Radix's: it yields its `Item`s, which share one tab
|
|
420
|
+
stop, and an arrow key moves focus and the choice, going round (`@loop`) and flipping right to
|
|
421
|
+
left. `@value`, `@defaultValue` and `@onValueChange`, `@disabled` on the group or an item,
|
|
422
|
+
`@required`, `@orientation`, and `@formName` for the hidden native radios it submits in a form.
|
|
423
|
+
`@ember-joinery/primitives/radio-group` is the headless one, and `@ember-joinery/test-support`
|
|
424
|
+
adds `RadioGroupHarness`.
|
|
425
|
+
- a73065d: `Rating` is ember-primitives' Rating: a `<fieldset role="radiogroup">` of native radios,
|
|
426
|
+
controlled or not (`@value`, `@defaultValue`, `@onValueChange`), with `@max`, half ratings
|
|
427
|
+
through `@step`, `@readonly`, a display-only mode (`@interactive={{false}}`) that summarises
|
|
428
|
+
itself, and its strings as arguments (`@itemLabel`, `@summary`).
|
|
429
|
+
`@ember-joinery/primitives/rating` is the headless one, whose block lays it out with `Stars`,
|
|
430
|
+
`Item` and `Range`; `@ember-joinery/ember`'s draws lucide's Star in shadcn's terms, in three
|
|
431
|
+
sizes, with half stars. `@ember-joinery/test-support` adds `RatingHarness`, which reads each
|
|
432
|
+
item's state (`stars`) and its icon's text (`starTexts`), and picks a value between the items on
|
|
433
|
+
a range or number input.
|
|
434
|
+
- a73065d: `ResizablePanelGroup`, `ResizablePanel` and `ResizableHandle` are shadcn's Resizable: panel
|
|
435
|
+
groups side by side or stacked, nested, with handles a pointer drags and the keyboard moves (APG's
|
|
436
|
+
window splitter), sizes in percent, pixels or font units, collapsible panels, and a layout to save
|
|
437
|
+
(`@defaultLayout`, `@onLayoutChanged`). They sit on `Resizable`, `ResizablePanel` and
|
|
438
|
+
`ResizableHandle` from `@ember-joinery/primitives/resizable`, which follow react-resizable-panels'
|
|
439
|
+
API and cover ember-primitives' `Resizable`. `@ember-joinery/test-support` adds
|
|
440
|
+
`ResizableHarness`, and `sendPointer()` for real pointer events.
|
|
441
|
+
- a73065d: `ScrollArea` and `ScrollBar` are shadcn's Scroll Area: native scrolling with scrollbars of the
|
|
442
|
+
style's drawing, which show while the pointer is over the area (`@type` for `scroll`, `auto` or
|
|
443
|
+
`always`). They sit on `ScrollArea` from `@ember-joinery/primitives/scroll-area`, Radix's, with
|
|
444
|
+
its viewport, scrollbars, thumbs and corner as parts. `@ember-joinery/test-support` adds
|
|
445
|
+
`ScrollAreaHarness`.
|
|
446
|
+
- a73065d: `Select` is shadcn's Select, on Radix's: `<Select as |s|>` yields Trigger (`@size`), Value
|
|
447
|
+
(`@placeholder`), Content, Group, Label, Item, Separator and Arrow, and a `trigger` modifier.
|
|
448
|
+
The list opens over its trigger with the chosen option on the value (`item-aligned`, the
|
|
449
|
+
default) or below it (`@position="popper"`), with scroll buttons while it scrolls, typeahead on
|
|
450
|
+
the closed trigger and in the list, focus kept inside and the rest of the page inert while it
|
|
451
|
+
is open, a hidden native `<select>` named `@formName` in a form, and a trigger a Field sizes
|
|
452
|
+
as it does upstream's. Its state is
|
|
453
|
+
`@value`/`@defaultValue`/`@onValueChange` and `@open`/`@defaultOpen`/`@onOpenChange`.
|
|
454
|
+
`@ember-joinery/primitives/select` is the headless one, and `@ember-joinery/test-support`
|
|
455
|
+
adds `SelectHarness`.
|
|
456
|
+
- a73065d: `@ember-joinery/primitives/separator` is ember-primitives' and Radix's Separator: an `<hr>` by
|
|
457
|
+
default or any tag with `@as`, `@orientation`, and `@decorative` (`role="none"` and
|
|
458
|
+
`aria-hidden`); `separatorAria()` returns its ARIA. `Separator` in `@ember-joinery/ember` is
|
|
459
|
+
shadcn's, on it (a decorative `div` unless told otherwise), with an `asSeparator` modifier.
|
|
460
|
+
`@ember-joinery/test-support` adds `SeparatorHarness`.
|
|
461
|
+
- a73065d: `Sheet` is shadcn's Sheet: a Dialog whose Content comes in from an edge of the screen (`@side`:
|
|
462
|
+
`top`, `right`, `bottom` or `left`). `@ember-joinery/test-support` adds `SheetHarness`.
|
|
463
|
+
- a73065d: `SidebarProvider` is shadcn's Sidebar: `<SidebarProvider as |sidebar|>` yields the `Sidebar`
|
|
464
|
+
(`@side`, `@variant` of `sidebar`, `floating` or `inset`, and `@collapsible` of `offcanvas`,
|
|
465
|
+
`icon` or `none`), its Header, Content, Footer, Group (Label, Action, Content), Menu (Item,
|
|
466
|
+
Button, Action, Badge, Skeleton, Sub, SubItem, SubButton), Input, Separator, Rail, Inset and
|
|
467
|
+
Trigger, a modifier for each part (`<LinkTo {{sidebar.menuButton isActive=true}}>`), and what
|
|
468
|
+
upstream's `useSidebar()` returns (`state`, `open`, `setOpen`, `openMobile`, `setOpenMobile`,
|
|
469
|
+
`isMobile`, `toggleSidebar`). Its state is its own (`@defaultOpen`) or yours (`@open`,
|
|
470
|
+
`@onOpenChange`); the trigger, the rail and ⌘B/Ctrl+B (`@keyboardShortcut`) toggle it; each
|
|
471
|
+
change is kept in upstream's `sidebar_state` cookie, which `sidebarStateFromCookie()` reads back;
|
|
472
|
+
and below 768px wide (`@mobileBreakpoint`, measured in the window it renders in) it is a Sheet
|
|
473
|
+
with its own open state. A menu button's `@tooltip` names it while the sidebar is collapsed to
|
|
474
|
+
its icons. The trigger adds `aria-expanded`, which upstream's lacks, and keeps a ghost Button's
|
|
475
|
+
resting look while the sidebar is open. Slid off the screen (`offcanvas`), the sidebar hides
|
|
476
|
+
its items from the Tab key and screen readers, which upstream's leaves focusable off the
|
|
477
|
+
screen, and focus inside it goes to the trigger as it closes. `<UseSidebar as |sidebar|>` yields
|
|
478
|
+
the same from the nearest provider around it, as upstream's `useSidebar()` does, so a routed
|
|
479
|
+
page reaches the sidebar without its block params.
|
|
480
|
+
`@ember-joinery/test-support` adds `SidebarHarness`, `SidebarMenuButtonHarness` and
|
|
481
|
+
`SidebarMenuSubButtonHarness`. A floating part's content now also sees Radix Popper's own
|
|
482
|
+
custom properties (`--radix-popper-anchor-width` and the rest), which upstream's sidebar
|
|
483
|
+
examples size their menus by.
|
|
484
|
+
- a73065d: `Skeleton` is shadcn's loading placeholder: a pulsing, rounded block in `--muted`, sized with
|
|
485
|
+
classes or CSS of your own, with `@as`. `@ember-joinery/test-support` adds `SkeletonHarness`.
|
|
486
|
+
- a73065d: `Slider` is shadcn's Slider, on a new headless `Slider` in `@ember-joinery/primitives/slider`
|
|
487
|
+
(Radix's, covering ember-primitives' too): one `role="slider"` thumb per value, ranges and
|
|
488
|
+
multiple thumbs that pass each other (`@minStepsBetweenThumbs` keeps them apart), a `@step`
|
|
489
|
+
array that snaps to its values, vertical and inverted sliders, right to left through logical
|
|
490
|
+
edges, the APG keys, the pointer, `@onValueCommit`, `@getThumbLabel`, and hidden form inputs
|
|
491
|
+
with `@fieldName`. `@ember-joinery/test-support` adds `SliderHarness`.
|
|
492
|
+
- a73065d: `Spinner` is shadcn's loading indicator: lucide's `loader-circle`, turning, with the `status`
|
|
493
|
+
role, `@label` (`Loading` by default) and `@icon` to turn another icon.
|
|
494
|
+
`@ember-joinery/test-support` adds `SpinnerHarness`.
|
|
495
|
+
- a73065d: `Switch` is shadcn's Switch, on Radix's, in its `default` and `sm` sizes: `@checked`,
|
|
496
|
+
`@defaultChecked` and `@onCheckedChange`, `@disabled` and `@required`, and a block that renders
|
|
497
|
+
inside the thumb (an icon, say). In a form, a hidden native checkbox beside it submits its
|
|
498
|
+
`name` and `value`. `@ember-joinery/primitives/switch` is the headless one, covering
|
|
499
|
+
ember-primitives' `Switch`, with a `Thumb` you render yourself, and
|
|
500
|
+
`@ember-joinery/test-support` adds `SwitchHarness`.
|
|
501
|
+
- a73065d: `Table` is shadcn's responsive table: a native `<table>` in a container that scrolls it
|
|
502
|
+
sideways, yielding `Header`, `Body`, `Footer`, `Row`, `Head`, `Cell` and `Caption`, each also a
|
|
503
|
+
modifier for an element of your own (`<tr {{t.row}}>`), each taking `@as`. While the table is
|
|
504
|
+
wider than its container and has nothing to focus, the container joins the tab order, so the
|
|
505
|
+
keyboard can scroll it. `@ember-joinery/test-support` adds `TableHarness`.
|
|
506
|
+
- a73065d: `Tabs` is shadcn's Tabs (`t.List` with `@variant="default"` or `"line"`, `t.Trigger`,
|
|
507
|
+
`t.Content`, and `@orientation="vertical"`), on a new headless `Tabs` and `TabsState` in
|
|
508
|
+
`@ember-joinery/primitives/tabs`, which covers ember-primitives' Tabs too: controlled or not
|
|
509
|
+
(`@value`, `@defaultValue`, and `@onValueChange`, which also hears the value before), the first
|
|
510
|
+
tab selected when no value is given, automatic or manual activation, one tab stop with the arrow
|
|
511
|
+
keys along the orientation (flipped right to left, wrapping unless `@loop={{false}}`), link tabs
|
|
512
|
+
on `<a href>` or `LinkTo` that focus never selects, and the `t.list`, `t.trigger` and
|
|
513
|
+
`t.content` modifiers for your own elements. `@ember-joinery/test-support` adds `TabsHarness`.
|
|
514
|
+
- a73065d: The harness base: `Harness` finds a component by `data-test-jn` and `data-test-jn-name` on
|
|
515
|
+
every read, reaches its parts through `data-test-jn-part` (following `data-test-jn-owner` into
|
|
516
|
+
the top layer and portals), and fails clearly when pointed at another component. `@child`
|
|
517
|
+
declares child harnesses, created once and kept, with legacy or standard decorators; `find()`
|
|
518
|
+
and `findAll()` make one-off lookups; and `selectors` and `attributes` cover the
|
|
519
|
+
`data-test-jn-*` attributes.
|
|
520
|
+
- a73065d: `Textarea` is shadcn's Textarea: a native `<textarea>` that grows with its text, with `@value`,
|
|
521
|
+
`@defaultValue` and `@onValueChange`, and an `asTextarea` modifier for a textarea of your own.
|
|
522
|
+
`@ember-joinery/test-support` adds `TextareaHarness`.
|
|
523
|
+
- a73065d: Toasts, as shadcn's Sonner: sonner 2.0.7 ported. `@ember-joinery/primitives/toast` has
|
|
524
|
+
`toast()` with sonner's methods (`success`, `info`, `warning`, `error`, `loading`, `message`,
|
|
525
|
+
`custom`, `promise`, `dismiss`, `getHistory`, `getToasts`), kept per owner in a `Toasts`
|
|
526
|
+
service so each app and each test has its own (`toastsFor(this)`), and a headless `Toaster`
|
|
527
|
+
with sonner's arguments, markup and data attributes: positions, the stack (three visible,
|
|
528
|
+
expanding on hover, keyboard focus or Alt+T), timers that pause, swipe to dismiss, rich colours,
|
|
529
|
+
close, action and cancel buttons. A new toast reaches the Toasters a microtask later, as
|
|
530
|
+
sonner's does, so `toast()` can be called while a page renders, and `toast.dismiss()` takes
|
|
531
|
+
what `toast.promise()` returns (`{ id, unwrap }`) as well as an id. Its lists are in the top
|
|
532
|
+
layer, so toasts show above dialogs, and are dismissable branches. `@ember-joinery/ember` adds
|
|
533
|
+
`Toaster`, upstream's: lucide's icons, the popover tokens and the theme's radius, a theme that
|
|
534
|
+
follows `.dark`, and sonner's CSS in `joinery.css`; it exports `toast` and `toastsFor` too.
|
|
535
|
+
`@ember-joinery/test-support` adds `ToasterHarness`, `ToastHarness` and `setupToaster(hooks)`.
|
|
536
|
+
sonner's MIT notice is in `NOTICE` and in the built JavaScript and CSS that carry its code.
|
|
537
|
+
- a73065d: `ToggleGroup` is shadcn's Toggle Group (`@type="single"` or `"multiple"`, `@variant`, `@size`,
|
|
538
|
+
`@spacing` and `@orientation` for every item), on a new headless `ToggleGroup` and
|
|
539
|
+
`ToggleGroupState` in `@ember-joinery/primitives/toggle-group`: one tab stop with the arrow keys
|
|
540
|
+
moving between items, radios in a single group and toggle buttons in a multiple one, and an
|
|
541
|
+
item modifier, `g.item`, for your own elements. `@ember-joinery/test-support` adds
|
|
542
|
+
`ToggleGroupHarness`.
|
|
543
|
+
- a73065d: `Toggle` is shadcn's Toggle, with typed `@variant` and `@size`, on a new headless `Toggle` in
|
|
544
|
+
`@ember-joinery/primitives/toggle` (`aria-pressed` and `data-state`, controlled with `@pressed`
|
|
545
|
+
or not with `@defaultPressed`); the `asToggle` modifier makes your own element a toggle, and
|
|
546
|
+
`toggleClasses()` and `toggleAttributes()` return its look. `@ember-joinery/test-support` adds
|
|
547
|
+
`ToggleHarness`.
|
|
548
|
+
- a73065d: `Tooltip` and `TooltipProvider` are shadcn's, on Radix's: a tooltip opens when the pointer
|
|
549
|
+
rests on its trigger (at once by default, as in shadcn's provider) or on focus, describes the
|
|
550
|
+
trigger through `aria-describedby`, lets the pointer cross onto it, and closes on blur, a
|
|
551
|
+
press, Escape or the pointer leaving; it draws its arrow. A provider's tooltips share its
|
|
552
|
+
`@delayDuration`, and the next opens at once just after one closed; tooltips need no provider.
|
|
553
|
+
`@ember-joinery/primitives/tooltip` is the headless pair, and `@ember-joinery/test-support`
|
|
554
|
+
adds `TooltipHarness` and the `hover()` and `unhover()` pointer helpers.
|
|
555
|
+
- a73065d: `Trace` is shadcn's Trace, the building block for reasoning, tool calls and sources: a list of
|
|
556
|
+
`TraceLine`s (an icon, a title, a description, and `@status` `running`, `error` or `pending`,
|
|
557
|
+
which colours, dims or shimmers it), whose parts are yielded and exported (`TraceIcon`,
|
|
558
|
+
`TraceTitle`, `TraceDescription`), and `TraceCollapsible`, a row that expands, with its trigger
|
|
559
|
+
(a chevron after the line that turns as it opens, which `@icon` replaces) and its content,
|
|
560
|
+
controlled (`@open`, `@onOpenChange`) or not (`@defaultOpen`). A trace styles any link or
|
|
561
|
+
trigger that wraps a line, a Dialog's, Sheet's, Drawer's, Popover's or menu's trigger included
|
|
562
|
+
(through the root those render, which upstream's Radix roots don't). `@ember-joinery/test-support`
|
|
563
|
+
adds `TraceHarness`, `TraceLineHarness` and `TraceCollapsibleHarness`.
|
|
564
|
+
|
|
565
|
+
### Patch Changes
|
|
566
|
+
|
|
567
|
+
- a53c07b: Type checks in package source use `@sindresorhus/is` (`isString`, `isFunction`, …) instead of `typeof`, and a lint rule keeps it that way. `@sindresorhus/is` is a new runtime dependency, so `ember-joinery add` now installs it into the app for most components, `icon` included. `isNumber` rejects `NaN`, so a `NaN` reaching a numeric check now takes the non-number branch.
|
|
568
|
+
- a73065d: `CollapsibleHarness` finds content that sits inside another component, as upstream's settings
|
|
569
|
+
panel puts its `CollapsibleContent` inside a `FieldGroup`: when the content isn't among its own
|
|
570
|
+
parts, `content` (and with it `isShown`, `text` and `controlsContent`) is the element the
|
|
571
|
+
trigger's `aria-controls` names.
|
|
572
|
+
- a73065d: Every package's tarball carries Joinery's `LICENSE.md` and `NOTICE`, with the licences and
|
|
573
|
+
notices of what it ports (shadcn/ui, ember-primitives, sonner, recharts and the rest), copied in
|
|
574
|
+
from the repository's root by the package's `prepack`.
|
package/LICENSE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Joe Gaudet
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
|
6
|
+
|
|
7
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|