oneslash-design-system 2.15.0 → 2.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.
- package/README.md +6 -1
- package/dist/DESIGN.md +100 -73
- package/dist/cases/accept-invite/signed-in.d.ts +1 -0
- package/dist/cases/accept-invite/signed-in.jsx +57 -0
- package/dist/cases/accept-invite/signed-out.d.ts +1 -0
- package/dist/cases/accept-invite/signed-out.jsx +33 -0
- package/dist/cases/accept-invite.md +161 -0
- package/dist/cases/agent-asks-before-risky-action.md +1 -1
- package/dist/cases/agent-cancels-when-unanswered.md +1 -1
- package/dist/cases/agent-options/cards.d.ts +1 -0
- package/dist/cases/agent-options/cards.jsx +91 -0
- package/dist/cases/agent-options.md +168 -0
- package/dist/cases/agent-pending-reply/steps.d.ts +1 -0
- package/dist/cases/agent-pending-reply/steps.jsx +149 -0
- package/dist/cases/agent-pending-reply/streaming.d.ts +1 -0
- package/dist/cases/agent-pending-reply/streaming.jsx +146 -0
- package/dist/cases/agent-pending-reply.md +432 -0
- package/dist/cases/agent-plan-proposal/changes.d.ts +1 -0
- package/dist/cases/agent-plan-proposal/changes.jsx +224 -0
- package/dist/cases/agent-plan-proposal/steps.d.ts +1 -0
- package/dist/cases/agent-plan-proposal/steps.jsx +211 -0
- package/dist/cases/agent-plan-proposal.md +656 -0
- package/dist/cases/agent-question/choices.d.ts +1 -0
- package/dist/cases/agent-question/choices.jsx +132 -0
- package/dist/cases/agent-question/free-text.d.ts +1 -0
- package/dist/cases/agent-question/free-text.jsx +81 -0
- package/dist/cases/agent-question.md +338 -0
- package/dist/cases/agent-shows-sources.md +2 -2
- package/dist/cases/artifact-card/card.d.ts +1 -0
- package/dist/cases/artifact-card/card.jsx +45 -0
- package/dist/cases/artifact-card.md +103 -0
- package/dist/cases/auth-gate-loading/spinner-with-line.d.ts +1 -0
- package/dist/cases/auth-gate-loading/spinner-with-line.jsx +10 -0
- package/dist/cases/auth-gate-loading/spinner.d.ts +1 -0
- package/dist/cases/auth-gate-loading/spinner.jsx +10 -0
- package/dist/cases/auth-gate-loading.md +70 -0
- package/dist/cases/check-your-email/alert-on-login.d.ts +1 -0
- package/dist/cases/check-your-email/alert-on-login.jsx +78 -0
- package/dist/cases/check-your-email/page.d.ts +1 -0
- package/dist/cases/check-your-email/page.jsx +49 -0
- package/dist/cases/check-your-email.md +184 -0
- package/dist/cases/composer-limit/notice-with-action.d.ts +1 -0
- package/dist/cases/composer-limit/notice-with-action.jsx +87 -0
- package/dist/cases/composer-limit/notice.d.ts +1 -0
- package/dist/cases/composer-limit/notice.jsx +84 -0
- package/dist/cases/composer-limit.md +286 -0
- package/dist/cases/confirm-destructive-action/inline.d.ts +1 -0
- package/dist/cases/confirm-destructive-action/inline.jsx +69 -0
- package/dist/cases/confirm-destructive-action/modal.d.ts +1 -0
- package/dist/cases/confirm-destructive-action/modal.jsx +66 -0
- package/dist/cases/confirm-destructive-action.md +211 -0
- package/dist/cases/confirm-dialogs.md +36 -0
- package/dist/cases/conversation-starters/chips.d.ts +1 -0
- package/dist/cases/conversation-starters/chips.jsx +69 -0
- package/dist/cases/conversation-starters/none.d.ts +1 -0
- package/dist/cases/conversation-starters/none.jsx +45 -0
- package/dist/cases/conversation-starters.md +208 -0
- package/dist/cases/create-modal/quick.d.ts +1 -0
- package/dist/cases/create-modal/quick.jsx +80 -0
- package/dist/cases/create-modal/with-settings.d.ts +1 -0
- package/dist/cases/create-modal/with-settings.jsx +99 -0
- package/dist/cases/create-modal.md +244 -0
- package/dist/cases/device-login/popup.d.ts +1 -0
- package/dist/cases/device-login/popup.jsx +14 -0
- package/dist/cases/device-login/provider-first.d.ts +1 -0
- package/dist/cases/device-login/provider-first.jsx +98 -0
- package/dist/cases/device-login.md +171 -0
- package/dist/cases/email-confirmed/alert-on-login.d.ts +1 -0
- package/dist/cases/email-confirmed/alert-on-login.jsx +78 -0
- package/dist/cases/email-confirmed/page.d.ts +1 -0
- package/dist/cases/email-confirmed/page.jsx +21 -0
- package/dist/cases/email-confirmed.md +151 -0
- package/dist/cases/empty-list/region.d.ts +1 -0
- package/dist/cases/empty-list/region.jsx +13 -0
- package/dist/cases/empty-list/section.d.ts +1 -0
- package/dist/cases/empty-list/section.jsx +17 -0
- package/dist/cases/empty-list.md +77 -0
- package/dist/cases/empty-lists.md +35 -0
- package/dist/cases/empty-not-set-up/action.d.ts +1 -0
- package/dist/cases/empty-not-set-up/action.jsx +16 -0
- package/dist/cases/empty-not-set-up/pointer.d.ts +1 -0
- package/dist/cases/empty-not-set-up/pointer.jsx +13 -0
- package/dist/cases/empty-not-set-up.md +88 -0
- package/dist/cases/empty-search/clear-search.d.ts +1 -0
- package/dist/cases/empty-search/clear-search.jsx +29 -0
- package/dist/cases/empty-search.md +77 -0
- package/dist/cases/error-page/full-page.d.ts +1 -0
- package/dist/cases/error-page/full-page.jsx +19 -0
- package/dist/cases/error-page/in-shell.d.ts +1 -0
- package/dist/cases/error-page/in-shell.jsx +39 -0
- package/dist/cases/error-page.md +107 -0
- package/dist/cases/feedback-form/modal.d.ts +1 -0
- package/dist/cases/feedback-form/modal.jsx +89 -0
- package/dist/cases/feedback-form.md +139 -0
- package/dist/cases/forgot-password/in-place.d.ts +1 -0
- package/dist/cases/forgot-password/in-place.jsx +155 -0
- package/dist/cases/forgot-password/own-page.d.ts +1 -0
- package/dist/cases/forgot-password/own-page.jsx +99 -0
- package/dist/cases/forgot-password.md +328 -0
- package/dist/cases/form-errors.md +32 -0
- package/dist/cases/import-checklist/modal.d.ts +1 -0
- package/dist/cases/import-checklist/modal.jsx +125 -0
- package/dist/cases/import-checklist.md +188 -0
- package/dist/cases/inline-form-feedback/button-label.d.ts +1 -0
- package/dist/cases/inline-form-feedback/button-label.jsx +54 -0
- package/dist/cases/inline-form-feedback/inline-alert.d.ts +1 -0
- package/dist/cases/inline-form-feedback/inline-alert.jsx +49 -0
- package/dist/cases/inline-form-feedback/toast.d.ts +1 -0
- package/dist/cases/inline-form-feedback/toast.jsx +66 -0
- package/dist/cases/inline-form-feedback.md +237 -0
- package/dist/cases/invite-member/by-email.d.ts +1 -0
- package/dist/cases/invite-member/by-email.jsx +98 -0
- package/dist/cases/invite-member/by-link.d.ts +1 -0
- package/dist/cases/invite-member/by-link.jsx +122 -0
- package/dist/cases/invite-member.md +321 -0
- package/dist/cases/load-failure/inline.d.ts +1 -0
- package/dist/cases/load-failure/inline.jsx +52 -0
- package/dist/cases/load-failure/region.d.ts +1 -0
- package/dist/cases/load-failure/region.jsx +34 -0
- package/dist/cases/load-failure.md +155 -0
- package/dist/cases/log-out-confirm/modal.d.ts +1 -0
- package/dist/cases/log-out-confirm/modal.jsx +57 -0
- package/dist/cases/log-out-confirm.md +106 -0
- package/dist/cases/login-page/centered.jsx +10 -7
- package/dist/cases/login-page/email-only.jsx +11 -8
- package/dist/cases/login-page/provider-first.jsx +12 -9
- package/dist/cases/login-page/split.jsx +11 -8
- package/dist/cases/login-page.md +58 -41
- package/dist/cases/mention-list/in-composer.d.ts +1 -0
- package/dist/cases/mention-list/in-composer.jsx +169 -0
- package/dist/cases/mention-list.md +252 -0
- package/dist/cases/message-actions/hover-toolbar.d.ts +1 -0
- package/dist/cases/message-actions/hover-toolbar.jsx +229 -0
- package/dist/cases/message-actions/menu.d.ts +1 -0
- package/dist/cases/message-actions/menu.jsx +258 -0
- package/dist/cases/message-actions.md +651 -0
- package/dist/cases/message-attachments/in-composer.d.ts +1 -0
- package/dist/cases/message-attachments/in-composer.jsx +134 -0
- package/dist/cases/message-attachments/in-message.d.ts +1 -0
- package/dist/cases/message-attachments/in-message.jsx +46 -0
- package/dist/cases/message-attachments.md +310 -0
- package/dist/cases/message-composer/plain.d.ts +1 -0
- package/dist/cases/message-composer/plain.jsx +57 -0
- package/dist/cases/message-composer/with-tools.d.ts +1 -0
- package/dist/cases/message-composer/with-tools.jsx +182 -0
- package/dist/cases/message-composer.md +356 -0
- package/dist/cases/message-edit/in-place.d.ts +1 -0
- package/dist/cases/message-edit/in-place.jsx +99 -0
- package/dist/cases/message-edit.md +179 -0
- package/dist/cases/message-reactions/chips.d.ts +1 -0
- package/dist/cases/message-reactions/chips.jsx +118 -0
- package/dist/cases/message-reactions/quick-pick.d.ts +1 -0
- package/dist/cases/message-reactions/quick-pick.jsx +155 -0
- package/dist/cases/message-reactions.md +371 -0
- package/dist/cases/message-row/grouped.d.ts +1 -0
- package/dist/cases/message-row/grouped.jsx +56 -0
- package/dist/cases/message-row/person-and-agent.d.ts +1 -0
- package/dist/cases/message-row/person-and-agent.jsx +41 -0
- package/dist/cases/message-row.md +189 -0
- package/dist/cases/not-found-page/full-page.d.ts +1 -0
- package/dist/cases/not-found-page/full-page.jsx +16 -0
- package/dist/cases/not-found-page/in-shell.d.ts +1 -0
- package/dist/cases/not-found-page/in-shell.jsx +36 -0
- package/dist/cases/not-found-page.md +98 -0
- package/dist/cases/oauth-consent/simple.d.ts +1 -0
- package/dist/cases/oauth-consent/simple.jsx +73 -0
- package/dist/cases/oauth-consent/with-scope.d.ts +1 -0
- package/dist/cases/oauth-consent/with-scope.jsx +89 -0
- package/dist/cases/oauth-consent.md +233 -0
- package/dist/cases/rename/inline.d.ts +1 -0
- package/dist/cases/rename/inline.jsx +58 -0
- package/dist/cases/rename/modal.d.ts +1 -0
- package/dist/cases/rename/modal.jsx +70 -0
- package/dist/cases/rename.md +205 -0
- package/dist/cases/reply-feedback/thumbs.d.ts +1 -0
- package/dist/cases/reply-feedback/thumbs.jsx +191 -0
- package/dist/cases/reply-feedback/with-reason.d.ts +1 -0
- package/dist/cases/reply-feedback/with-reason.jsx +221 -0
- package/dist/cases/reply-feedback.md +552 -0
- package/dist/cases/reply-sources/cards.d.ts +1 -0
- package/dist/cases/reply-sources/cards.jsx +83 -0
- package/dist/cases/reply-sources/tag-only.d.ts +1 -0
- package/dist/cases/reply-sources/tag-only.jsx +45 -0
- package/dist/cases/reply-sources.md +247 -0
- package/dist/cases/route-loading/full-screen.d.ts +1 -0
- package/dist/cases/route-loading/full-screen.jsx +8 -0
- package/dist/cases/route-loading/region.d.ts +1 -0
- package/dist/cases/route-loading/region.jsx +26 -0
- package/dist/cases/route-loading.md +84 -0
- package/dist/cases/set-new-password/form.d.ts +1 -0
- package/dist/cases/set-new-password/form.jsx +130 -0
- package/dist/cases/set-new-password/invalid-link.d.ts +1 -0
- package/dist/cases/set-new-password/invalid-link.jsx +50 -0
- package/dist/cases/set-new-password.md +247 -0
- package/dist/cases/sign-up-page/centered.d.ts +1 -0
- package/dist/cases/sign-up-page/centered.jsx +124 -0
- package/dist/cases/sign-up-page/provider-first.d.ts +1 -0
- package/dist/cases/sign-up-page/provider-first.jsx +124 -0
- package/dist/cases/sign-up-page/split.d.ts +1 -0
- package/dist/cases/sign-up-page/split.jsx +134 -0
- package/dist/cases/sign-up-page.md +478 -0
- package/dist/cases/slash-command-list/in-composer.d.ts +1 -0
- package/dist/cases/slash-command-list/in-composer.jsx +162 -0
- package/dist/cases/slash-command-list.md +247 -0
- package/dist/cases/success-feedback.md +35 -0
- package/dist/cases/type-to-confirm/inline.d.ts +1 -0
- package/dist/cases/type-to-confirm/inline.jsx +69 -0
- package/dist/cases/type-to-confirm/modal.d.ts +1 -0
- package/dist/cases/type-to-confirm/modal.jsx +73 -0
- package/dist/cases/type-to-confirm.md +222 -0
- package/dist/cases/typing-and-status/line.d.ts +1 -0
- package/dist/cases/typing-and-status/line.jsx +50 -0
- package/dist/cases/typing-and-status.md +96 -0
- package/dist/cases/unsaved-changes-guard/discard.d.ts +1 -0
- package/dist/cases/unsaved-changes-guard/discard.jsx +81 -0
- package/dist/cases/unsaved-changes-guard/save-or-discard.d.ts +1 -0
- package/dist/cases/unsaved-changes-guard/save-or-discard.jsx +85 -0
- package/dist/cases/unsaved-changes-guard.md +239 -0
- package/dist/cases/upgrade-prompt/inline.d.ts +1 -0
- package/dist/cases/upgrade-prompt/inline.jsx +52 -0
- package/dist/cases/upgrade-prompt/modal.d.ts +1 -0
- package/dist/cases/upgrade-prompt/modal.jsx +43 -0
- package/dist/cases/upgrade-prompt.md +174 -0
- package/dist/cases.json +3138 -59
- package/dist/components/alert.d.ts +3 -1
- package/dist/components/alert.jsx +6 -4
- package/dist/components/button.d.ts +3 -2
- package/dist/components/button.jsx +9 -7
- package/dist/components/composer.d.ts +74 -0
- package/dist/components/composer.jsx +122 -0
- package/dist/components/emptyBox.d.ts +6 -1
- package/dist/components/emptyBox.jsx +4 -2
- package/dist/components/fileChip.d.ts +33 -0
- package/dist/components/fileChip.jsx +61 -0
- package/dist/components/heading.d.ts +2 -2
- package/dist/components/iconButton.d.ts +3 -3
- package/dist/components/iconButton.jsx +9 -7
- package/dist/components/layout.d.ts +7 -1
- package/dist/components/layout.jsx +5 -2
- package/dist/components/loadingScreen.d.ts +5 -1
- package/dist/components/loadingScreen.jsx +4 -2
- package/dist/components/menu.d.ts +21 -0
- package/dist/components/menu.jsx +27 -3
- package/dist/components/menuItem.d.ts +9 -1
- package/dist/components/menuItem.jsx +5 -4
- package/dist/components/message.d.ts +28 -0
- package/dist/components/message.jsx +25 -0
- package/dist/components/modal.d.ts +2 -1
- package/dist/components/modal.jsx +20 -8
- package/dist/components/paragraph.d.ts +3 -1
- package/dist/components/paragraph.jsx +2 -2
- package/dist/components/popover.d.ts +7 -1
- package/dist/components/popover.jsx +35 -9
- package/dist/components/radioGroup.d.ts +9 -1
- package/dist/components/radioGroup.jsx +20 -9
- package/dist/components/select.d.ts +2 -1
- package/dist/components/select.jsx +4 -2
- package/dist/components/sourceCard.d.ts +23 -0
- package/dist/components/sourceCard.jsx +56 -0
- package/dist/components/stepList.d.ts +17 -0
- package/dist/components/stepList.jsx +79 -0
- package/dist/components/tab.jsx +3 -2
- package/dist/components/tabsContainer.d.ts +4 -1
- package/dist/components/tabsContainer.jsx +7 -3
- package/dist/components/tag.d.ts +9 -1
- package/dist/components/tag.jsx +6 -4
- package/dist/components/textField.d.ts +5 -1
- package/dist/components/textField.jsx +7 -3
- package/dist/components/textarea.jsx +3 -18
- package/dist/components/toaster.d.ts +12 -0
- package/dist/components/toaster.jsx +103 -0
- package/dist/components/userImage.d.ts +9 -1
- package/dist/components/userImage.jsx +10 -3
- package/dist/internal/alert.d.ts +4 -0
- package/dist/internal/alert.js +6 -0
- package/dist/internal/autoGrow.d.ts +11 -0
- package/dist/internal/autoGrow.js +28 -0
- package/dist/internal/composer.d.ts +16 -0
- package/dist/internal/composer.js +18 -0
- package/dist/internal/menu.d.ts +6 -0
- package/dist/internal/menu.js +31 -0
- package/dist/internal/modal.d.ts +2 -0
- package/dist/internal/modal.js +21 -0
- package/dist/internal/toaster.d.ts +19 -0
- package/dist/internal/toaster.js +50 -0
- package/dist/native-mapping.json +38 -1
- package/dist/stories/Alert.stories.d.ts +1 -0
- package/dist/stories/Alert.stories.jsx +16 -0
- package/dist/stories/Button.stories.d.ts +1 -0
- package/dist/stories/Button.stories.jsx +17 -1
- package/dist/stories/Cases.generated.stories.d.ts +82 -0
- package/dist/stories/Cases.generated.stories.jsx +164 -0
- package/dist/stories/Composer.stories.d.ts +23 -0
- package/dist/stories/Composer.stories.jsx +121 -0
- package/dist/stories/EmptyBox.stories.d.ts +2 -0
- package/dist/stories/EmptyBox.stories.jsx +16 -0
- package/dist/stories/FileChip.stories.d.ts +7 -0
- package/dist/stories/FileChip.stories.jsx +35 -0
- package/dist/stories/Heading.stories.d.ts +6 -0
- package/dist/stories/Heading.stories.jsx +10 -0
- package/dist/stories/IconButton.stories.d.ts +1 -0
- package/dist/stories/IconButton.stories.jsx +18 -1
- package/dist/stories/LoadingScreen.stories.d.ts +1 -0
- package/dist/stories/LoadingScreen.stories.jsx +8 -0
- package/dist/stories/Menu.stories.d.ts +4 -0
- package/dist/stories/Menu.stories.jsx +46 -1
- package/dist/stories/MenuItem.stories.d.ts +1 -0
- package/dist/stories/MenuItem.stories.jsx +8 -0
- package/dist/stories/Message.stories.d.ts +10 -0
- package/dist/stories/Message.stories.jsx +77 -0
- package/dist/stories/Modal.stories.d.ts +2 -0
- package/dist/stories/Modal.stories.jsx +36 -0
- package/dist/stories/PageComponents.stories.d.ts +1 -0
- package/dist/stories/PageComponents.stories.jsx +21 -0
- package/dist/stories/RadioGroup.stories.d.ts +3 -0
- package/dist/stories/RadioGroup.stories.jsx +54 -1
- package/dist/stories/Select.stories.d.ts +1 -0
- package/dist/stories/Select.stories.jsx +14 -0
- package/dist/stories/SourceCard.stories.d.ts +8 -0
- package/dist/stories/SourceCard.stories.jsx +33 -0
- package/dist/stories/StepList.stories.d.ts +8 -0
- package/dist/stories/StepList.stories.jsx +35 -0
- package/dist/stories/TabsContainer.stories.d.ts +1 -0
- package/dist/stories/TabsContainer.stories.jsx +12 -0
- package/dist/stories/TextField.stories.d.ts +2 -0
- package/dist/stories/TextField.stories.jsx +22 -0
- package/dist/stories/Toaster.stories.d.ts +6 -0
- package/dist/stories/Toaster.stories.jsx +29 -0
- package/dist/stories/UserImage.stories.d.ts +2 -0
- package/dist/stories/UserImage.stories.jsx +19 -0
- package/package.json +4 -3
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// Modal's pure helpers, kept out of the public API (index.ts and the package exports do not reach internal/)
|
|
2
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
3
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
4
|
+
if (ar || !(i in from)) {
|
|
5
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
6
|
+
ar[i] = from[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
10
|
+
};
|
|
11
|
+
// Elements to try for the first focus, best first. 'body' puts the body's elements ahead of the
|
|
12
|
+
// panel's, so it falls back to 'first' when the body has none or none of them takes focus.
|
|
13
|
+
export function initialFocusCandidates(panelFocusables, bodyFocusables, initialFocus) {
|
|
14
|
+
if (initialFocus === void 0) { initialFocus = 'first'; }
|
|
15
|
+
return initialFocus === 'body' ? __spreadArray(__spreadArray([], bodyFocusables, true), panelFocusables, true) : panelFocusables;
|
|
16
|
+
}
|
|
17
|
+
// Which element gets focus when the panel opens
|
|
18
|
+
export function pickInitialFocus(panelFocusables, bodyFocusables, initialFocus) {
|
|
19
|
+
if (initialFocus === void 0) { initialFocus = 'first'; }
|
|
20
|
+
return initialFocusCandidates(panelFocusables, bodyFocusables, initialFocus)[0];
|
|
21
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { ToastInput } from '../components/toaster';
|
|
2
|
+
export type ToastItem = {
|
|
3
|
+
id: string;
|
|
4
|
+
type: NonNullable<ToastInput['type']>;
|
|
5
|
+
message: string;
|
|
6
|
+
secondMessage?: string;
|
|
7
|
+
duration: number | null;
|
|
8
|
+
};
|
|
9
|
+
export declare function addToast(state: ToastItem[], input: string | ToastInput, id: string): ToastItem[];
|
|
10
|
+
export declare function removeToast(state: ToastItem[], id: string): ToastItem[];
|
|
11
|
+
export declare function visibleToasts(state: ToastItem[]): ToastItem[];
|
|
12
|
+
type PauseState = {
|
|
13
|
+
hovered: boolean;
|
|
14
|
+
focused: boolean;
|
|
15
|
+
};
|
|
16
|
+
type PauseEvent = 'pointerEnter' | 'pointerLeave' | 'focus' | 'blur';
|
|
17
|
+
export declare function pauseReducer(state: PauseState, event: PauseEvent): PauseState;
|
|
18
|
+
export declare const isPaused: ({ hovered, focused }: PauseState) => boolean;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
13
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
14
|
+
if (ar || !(i in from)) {
|
|
15
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
16
|
+
ar[i] = from[i];
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
20
|
+
};
|
|
21
|
+
var DEFAULT_DURATION_MS = 5000;
|
|
22
|
+
var MAX_VISIBLE = 3;
|
|
23
|
+
// The longest delay setTimeout can hold; a longer one fires at once
|
|
24
|
+
var MAX_TIMEOUT_MS = Math.pow(2, 31) - 1;
|
|
25
|
+
// Pure helpers. The state lists toasts newest first.
|
|
26
|
+
export function addToast(state, input, id) {
|
|
27
|
+
var _a = typeof input === 'string' ? { message: input } : input, _b = _a.type, type = _b === void 0 ? 'default' : _b, message = _a.message, secondMessage = _a.secondMessage, duration = _a.duration;
|
|
28
|
+
var wanted = duration !== undefined ? duration : type === 'error' ? null : DEFAULT_DURATION_MS;
|
|
29
|
+
var item = { id: id, type: type, message: message, secondMessage: secondMessage, duration: wanted !== null && Number.isFinite(wanted) && wanted <= MAX_TIMEOUT_MS ? wanted : null };
|
|
30
|
+
return __spreadArray([item], state, true);
|
|
31
|
+
}
|
|
32
|
+
export function removeToast(state, id) {
|
|
33
|
+
return state.some(function (t) { return t.id === id; }) ? state.filter(function (t) { return t.id !== id; }) : state;
|
|
34
|
+
}
|
|
35
|
+
// The three oldest are shown, newest on top; the rest wait for room
|
|
36
|
+
export function visibleToasts(state) {
|
|
37
|
+
return state.slice(-MAX_VISIBLE);
|
|
38
|
+
}
|
|
39
|
+
export function pauseReducer(state, event) {
|
|
40
|
+
switch (event) {
|
|
41
|
+
case 'pointerEnter': return __assign(__assign({}, state), { hovered: true });
|
|
42
|
+
case 'pointerLeave': return __assign(__assign({}, state), { hovered: false });
|
|
43
|
+
case 'focus': return __assign(__assign({}, state), { focused: true });
|
|
44
|
+
case 'blur': return __assign(__assign({}, state), { focused: false });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
export var isPaused = function (_a) {
|
|
48
|
+
var hovered = _a.hovered, focused = _a.focused;
|
|
49
|
+
return hovered || focused;
|
|
50
|
+
};
|
package/dist/native-mapping.json
CHANGED
|
@@ -22,6 +22,12 @@
|
|
|
22
22
|
"swiftui": "`Toggle` (switch on iOS, `.toggleStyle(.checkbox)` on macOS)",
|
|
23
23
|
"compose": "`Checkbox`"
|
|
24
24
|
},
|
|
25
|
+
{
|
|
26
|
+
"ods": "composer",
|
|
27
|
+
"swiftui": "`TextField(_:text:axis: .vertical)` with `.lineLimit(1...6)` over a toolbar `HStack` of the tool `Button`s and a send `Button`",
|
|
28
|
+
"compose": "`OutlinedTextField` with `maxLines = 6` over a `Row` of the tool `IconButton`s and a send `IconButton`",
|
|
29
|
+
"note": "On iPhone and Android, Return adds a line and the send button sends. While an agent works, send becomes Stop."
|
|
30
|
+
},
|
|
25
31
|
{
|
|
26
32
|
"ods": "emptyBox",
|
|
27
33
|
"swiftui": "`ContentUnavailableView`",
|
|
@@ -40,6 +46,12 @@
|
|
|
40
46
|
"compose": "Not applicable: web page pattern",
|
|
41
47
|
"note": "In an app screen: an `Image` with a caption `Text` in the caption text style."
|
|
42
48
|
},
|
|
49
|
+
{
|
|
50
|
+
"ods": "fileChip",
|
|
51
|
+
"swiftui": "A capsule `Label` (`.labelStyle(.titleAndIcon)`) with the file icon, the name and size, and a `Button` with `xmark.circle.fill` to remove it",
|
|
52
|
+
"compose": "An `InputChip` with a `trailingIcon` that removes it",
|
|
53
|
+
"note": "An uploading chip gets a `ProgressView`; a failed one an alert symbol, not color alone. Say the state in the VoiceOver / TalkBack label."
|
|
54
|
+
},
|
|
43
55
|
{
|
|
44
56
|
"ods": "form",
|
|
45
57
|
"swiftui": "`Form`",
|
|
@@ -110,6 +122,12 @@
|
|
|
110
122
|
"compose": "`DropdownMenuItem`",
|
|
111
123
|
"note": "In a sidebar: a `List` row / `NavigationDrawerItem`."
|
|
112
124
|
},
|
|
125
|
+
{
|
|
126
|
+
"ods": "message",
|
|
127
|
+
"swiftui": "An `HStack` with `ODSAvatar` and a `VStack` of the header and the body",
|
|
128
|
+
"compose": "A `Row` with `OdsAvatar` and a `Column` of the header and the body",
|
|
129
|
+
"note": "SwiftUI and Compose have no message row. Mark an agent with `ODSTag` / `OdsTag` after its name."
|
|
130
|
+
},
|
|
113
131
|
{
|
|
114
132
|
"ods": "modal",
|
|
115
133
|
"swiftui": "`.sheet` or `.alert`",
|
|
@@ -153,7 +171,8 @@
|
|
|
153
171
|
{
|
|
154
172
|
"ods": "radioGroup",
|
|
155
173
|
"swiftui": "`Picker` (`.inline` on iOS, `.radioGroup` on macOS)",
|
|
156
|
-
"compose": "`RadioButton`s in a `Column` with `Modifier.selectableGroup()`"
|
|
174
|
+
"compose": "`RadioButton`s in a `Column` with `Modifier.selectableGroup()`",
|
|
175
|
+
"note": "`variant=\"card\"`: each option is a bordered card with the radio in it, a `Picker` with custom rows on iOS / selectable `Card`s with a `RadioButton` in a `selectableGroup` on Android."
|
|
157
176
|
},
|
|
158
177
|
{
|
|
159
178
|
"ods": "sectionIntro",
|
|
@@ -166,6 +185,18 @@
|
|
|
166
185
|
"swiftui": "`Picker` or `Menu`",
|
|
167
186
|
"compose": "`ExposedDropdownMenuBox`"
|
|
168
187
|
},
|
|
188
|
+
{
|
|
189
|
+
"ods": "sourceCard",
|
|
190
|
+
"swiftui": "`Link` or `Button` with a `Label` (icon, title) and the meta as a secondary line",
|
|
191
|
+
"compose": "A `Card` with `onClick`, or a `ListItem` with a leading `Icon`",
|
|
192
|
+
"note": "With no destination it is a plain `Label`, not a button."
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"ods": "stepList",
|
|
196
|
+
"swiftui": "A `List` of `Label`s with an SF Symbol per status (`circle`, `checkmark.circle.fill`, `xmark.circle.fill`, `minus.circle`); `ProgressView` for the running one",
|
|
197
|
+
"compose": "A `Column` of `ListItem`s with an `Icon` per status; `CircularProgressIndicator` for the running one",
|
|
198
|
+
"note": "Give each row a status text for VoiceOver / TalkBack, not color alone."
|
|
199
|
+
},
|
|
169
200
|
{
|
|
170
201
|
"ods": "surface",
|
|
171
202
|
"swiftui": "Not applicable: web page pattern",
|
|
@@ -235,6 +266,12 @@
|
|
|
235
266
|
"swiftui": "`Text(_:style:)` (`.relative`) or `Text(_:format:)` (`.dateTime`)",
|
|
236
267
|
"compose": "`Text` with `DateUtils.getRelativeTimeSpanString` or `DateTimeFormatter.ofLocalizedDateTime`"
|
|
237
268
|
},
|
|
269
|
+
{
|
|
270
|
+
"ods": "toaster",
|
|
271
|
+
"swiftui": "`ODSBanner` for an inline message; a system banner (a local notification) when the app is not in front",
|
|
272
|
+
"compose": "`Snackbar` in a `SnackbarHost`",
|
|
273
|
+
"note": "SwiftUI has no toast, so ODS adds none: show the message in the screen."
|
|
274
|
+
},
|
|
238
275
|
{
|
|
239
276
|
"ods": "tooltip",
|
|
240
277
|
"swiftui": "`.help`",
|
|
@@ -8,6 +8,7 @@ export declare const Warning: Story;
|
|
|
8
8
|
export declare const Error: Story;
|
|
9
9
|
export declare const Info: Story;
|
|
10
10
|
export declare const AutoDismiss: Story;
|
|
11
|
+
export declare const Persistent: Story;
|
|
11
12
|
export declare const InlineSuccess: Story;
|
|
12
13
|
export declare const InlineWarning: Story;
|
|
13
14
|
export declare const InlineError: Story;
|
|
@@ -66,6 +66,22 @@ export var AutoDismiss = {
|
|
|
66
66
|
showCloseButton: false,
|
|
67
67
|
},
|
|
68
68
|
};
|
|
69
|
+
// Stays until the page removes it, even with no close button
|
|
70
|
+
export var Persistent = {
|
|
71
|
+
render: function (args) { return <Alert {...args}/>; },
|
|
72
|
+
args: {
|
|
73
|
+
type: "warning",
|
|
74
|
+
message: "You are offline. Changes are saved on this device.",
|
|
75
|
+
variant: "inline",
|
|
76
|
+
showCloseButton: false,
|
|
77
|
+
autoDismiss: false,
|
|
78
|
+
},
|
|
79
|
+
decorators: [
|
|
80
|
+
function (Story) { return (<div style={{ maxWidth: "500px" }}>
|
|
81
|
+
<Story />
|
|
82
|
+
</div>); },
|
|
83
|
+
],
|
|
84
|
+
};
|
|
69
85
|
// Inline variant stories
|
|
70
86
|
var InlineAlertWrapper = function (args) {
|
|
71
87
|
var _a = useState(true), open = _a[0], setOpen = _a[1];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import React, { useRef } from "react";
|
|
2
2
|
import { ChevronDown, ChevronRight, ExternalLink, Plus, Star } from "lucide-react";
|
|
3
3
|
import Button from "../components/button";
|
|
4
4
|
var meta = {
|
|
@@ -199,3 +199,19 @@ export var FullWidth = {
|
|
|
199
199
|
<Button size="medium" type="primary" state="enabled" label="Link, fits content" href="/gallery"/>
|
|
200
200
|
</div>); },
|
|
201
201
|
};
|
|
202
|
+
// For tests/interactions.spec.ts: the ref reaches the <button> and the link, so focus can be moved to them
|
|
203
|
+
function FocusFromOutsideDemo() {
|
|
204
|
+
var buttonRef = useRef(null);
|
|
205
|
+
var linkRef = useRef(null);
|
|
206
|
+
return (<div style={{ display: "flex", gap: "16px", alignItems: "center" }}>
|
|
207
|
+
<Button ref={buttonRef} size="small" type="secondary" state="enabled" label="Stop"/>
|
|
208
|
+
<Button ref={linkRef} size="small" type="tertiary" state="enabled" label="New Project" href="/new"/>
|
|
209
|
+
<Button size="small" type="secondary" state="enabled" label="Focus Button" onClickButton={function () { var _a; return (_a = buttonRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }}/>
|
|
210
|
+
<Button size="small" type="secondary" state="enabled" label="Focus Link" onClickButton={function () { var _a; return (_a = linkRef.current) === null || _a === void 0 ? void 0 : _a.focus(); }}/>
|
|
211
|
+
</div>);
|
|
212
|
+
}
|
|
213
|
+
export var FocusFromOutside = {
|
|
214
|
+
// For tests/interactions.spec.ts only: hidden from the sidebar and the docs, and skipped by the visual gate
|
|
215
|
+
tags: ["!dev", "!autodocs", "test-only"],
|
|
216
|
+
render: function () { return <FocusFromOutsideDemo />; },
|
|
217
|
+
};
|
|
@@ -2,7 +2,89 @@ import type { Meta, StoryObj } from "@storybook/react";
|
|
|
2
2
|
declare const meta: Meta;
|
|
3
3
|
export default meta;
|
|
4
4
|
type Story = StoryObj;
|
|
5
|
+
export declare const AcceptInvite_SignedOut: Story;
|
|
6
|
+
export declare const AcceptInvite_SignedIn: Story;
|
|
7
|
+
export declare const AgentOptions_Cards: Story;
|
|
8
|
+
export declare const AgentPendingReply_Steps: Story;
|
|
9
|
+
export declare const AgentPendingReply_Streaming: Story;
|
|
10
|
+
export declare const AgentPlanProposal_Steps: Story;
|
|
11
|
+
export declare const AgentPlanProposal_Changes: Story;
|
|
12
|
+
export declare const AgentQuestion_Choices: Story;
|
|
13
|
+
export declare const AgentQuestion_FreeText: Story;
|
|
14
|
+
export declare const ArtifactCard_Card: Story;
|
|
15
|
+
export declare const AuthGateLoading_Spinner: Story;
|
|
16
|
+
export declare const AuthGateLoading_SpinnerWithLine: Story;
|
|
17
|
+
export declare const CheckYourEmail_Page: Story;
|
|
18
|
+
export declare const CheckYourEmail_AlertOnLogin: Story;
|
|
19
|
+
export declare const ComposerLimit_Notice: Story;
|
|
20
|
+
export declare const ComposerLimit_NoticeWithAction: Story;
|
|
21
|
+
export declare const ConfirmDestructiveAction_Modal: Story;
|
|
22
|
+
export declare const ConfirmDestructiveAction_Inline: Story;
|
|
23
|
+
export declare const ConversationStarters_Chips: Story;
|
|
24
|
+
export declare const ConversationStarters_None: Story;
|
|
25
|
+
export declare const CreateModal_Quick: Story;
|
|
26
|
+
export declare const CreateModal_WithSettings: Story;
|
|
27
|
+
export declare const DeviceLogin_ProviderFirst: Story;
|
|
28
|
+
export declare const DeviceLogin_Popup: Story;
|
|
29
|
+
export declare const EmailConfirmed_Page: Story;
|
|
30
|
+
export declare const EmailConfirmed_AlertOnLogin: Story;
|
|
31
|
+
export declare const EmptyList_Region: Story;
|
|
32
|
+
export declare const EmptyList_Section: Story;
|
|
33
|
+
export declare const EmptyNotSetUp_Action: Story;
|
|
34
|
+
export declare const EmptyNotSetUp_Pointer: Story;
|
|
35
|
+
export declare const EmptySearch_ClearSearch: Story;
|
|
36
|
+
export declare const ErrorPage_FullPage: Story;
|
|
37
|
+
export declare const ErrorPage_InShell: Story;
|
|
38
|
+
export declare const FeedbackForm_Modal: Story;
|
|
39
|
+
export declare const ForgotPassword_InPlace: Story;
|
|
40
|
+
export declare const ForgotPassword_OwnPage: Story;
|
|
41
|
+
export declare const ImportChecklist_Modal: Story;
|
|
42
|
+
export declare const InlineFormFeedback_ButtonLabel: Story;
|
|
43
|
+
export declare const InlineFormFeedback_InlineAlert: Story;
|
|
44
|
+
export declare const InlineFormFeedback_Toast: Story;
|
|
45
|
+
export declare const InviteMember_ByEmail: Story;
|
|
46
|
+
export declare const InviteMember_ByLink: Story;
|
|
47
|
+
export declare const LoadFailure_Region: Story;
|
|
48
|
+
export declare const LoadFailure_Inline: Story;
|
|
49
|
+
export declare const LogOutConfirm_Modal: Story;
|
|
5
50
|
export declare const LoginPage_Centered: Story;
|
|
6
51
|
export declare const LoginPage_Split: Story;
|
|
7
52
|
export declare const LoginPage_ProviderFirst: Story;
|
|
8
53
|
export declare const LoginPage_EmailOnly: Story;
|
|
54
|
+
export declare const MentionList_InComposer: Story;
|
|
55
|
+
export declare const MessageActions_HoverToolbar: Story;
|
|
56
|
+
export declare const MessageActions_Menu: Story;
|
|
57
|
+
export declare const MessageAttachments_InComposer: Story;
|
|
58
|
+
export declare const MessageAttachments_InMessage: Story;
|
|
59
|
+
export declare const MessageComposer_Plain: Story;
|
|
60
|
+
export declare const MessageComposer_WithTools: Story;
|
|
61
|
+
export declare const MessageEdit_InPlace: Story;
|
|
62
|
+
export declare const MessageReactions_Chips: Story;
|
|
63
|
+
export declare const MessageReactions_QuickPick: Story;
|
|
64
|
+
export declare const MessageRow_PersonAndAgent: Story;
|
|
65
|
+
export declare const MessageRow_Grouped: Story;
|
|
66
|
+
export declare const NotFoundPage_FullPage: Story;
|
|
67
|
+
export declare const NotFoundPage_InShell: Story;
|
|
68
|
+
export declare const OauthConsent_Simple: Story;
|
|
69
|
+
export declare const OauthConsent_WithScope: Story;
|
|
70
|
+
export declare const Rename_Modal: Story;
|
|
71
|
+
export declare const Rename_Inline: Story;
|
|
72
|
+
export declare const ReplyFeedback_Thumbs: Story;
|
|
73
|
+
export declare const ReplyFeedback_WithReason: Story;
|
|
74
|
+
export declare const ReplySources_Cards: Story;
|
|
75
|
+
export declare const ReplySources_TagOnly: Story;
|
|
76
|
+
export declare const RouteLoading_FullScreen: Story;
|
|
77
|
+
export declare const RouteLoading_Region: Story;
|
|
78
|
+
export declare const SetNewPassword_Form: Story;
|
|
79
|
+
export declare const SetNewPassword_InvalidLink: Story;
|
|
80
|
+
export declare const SignUpPage_Centered: Story;
|
|
81
|
+
export declare const SignUpPage_Split: Story;
|
|
82
|
+
export declare const SignUpPage_ProviderFirst: Story;
|
|
83
|
+
export declare const SlashCommandList_InComposer: Story;
|
|
84
|
+
export declare const TypeToConfirm_Modal: Story;
|
|
85
|
+
export declare const TypeToConfirm_Inline: Story;
|
|
86
|
+
export declare const TypingAndStatus_Line: Story;
|
|
87
|
+
export declare const UnsavedChangesGuard_SaveOrDiscard: Story;
|
|
88
|
+
export declare const UnsavedChangesGuard_Discard: Story;
|
|
89
|
+
export declare const UpgradePrompt_Modal: Story;
|
|
90
|
+
export declare const UpgradePrompt_Inline: Story;
|
|
@@ -1,12 +1,176 @@
|
|
|
1
1
|
// Generated from cases/ by npm run build. Do not edit.
|
|
2
2
|
import React from "react";
|
|
3
|
+
import AcceptInvite_SignedOutExample from "../cases/accept-invite/signed-out";
|
|
4
|
+
import AcceptInvite_SignedInExample from "../cases/accept-invite/signed-in";
|
|
5
|
+
import AgentOptions_CardsExample from "../cases/agent-options/cards";
|
|
6
|
+
import AgentPendingReply_StepsExample from "../cases/agent-pending-reply/steps";
|
|
7
|
+
import AgentPendingReply_StreamingExample from "../cases/agent-pending-reply/streaming";
|
|
8
|
+
import AgentPlanProposal_StepsExample from "../cases/agent-plan-proposal/steps";
|
|
9
|
+
import AgentPlanProposal_ChangesExample from "../cases/agent-plan-proposal/changes";
|
|
10
|
+
import AgentQuestion_ChoicesExample from "../cases/agent-question/choices";
|
|
11
|
+
import AgentQuestion_FreeTextExample from "../cases/agent-question/free-text";
|
|
12
|
+
import ArtifactCard_CardExample from "../cases/artifact-card/card";
|
|
13
|
+
import AuthGateLoading_SpinnerExample from "../cases/auth-gate-loading/spinner";
|
|
14
|
+
import AuthGateLoading_SpinnerWithLineExample from "../cases/auth-gate-loading/spinner-with-line";
|
|
15
|
+
import CheckYourEmail_PageExample from "../cases/check-your-email/page";
|
|
16
|
+
import CheckYourEmail_AlertOnLoginExample from "../cases/check-your-email/alert-on-login";
|
|
17
|
+
import ComposerLimit_NoticeExample from "../cases/composer-limit/notice";
|
|
18
|
+
import ComposerLimit_NoticeWithActionExample from "../cases/composer-limit/notice-with-action";
|
|
19
|
+
import ConfirmDestructiveAction_ModalExample from "../cases/confirm-destructive-action/modal";
|
|
20
|
+
import ConfirmDestructiveAction_InlineExample from "../cases/confirm-destructive-action/inline";
|
|
21
|
+
import ConversationStarters_ChipsExample from "../cases/conversation-starters/chips";
|
|
22
|
+
import ConversationStarters_NoneExample from "../cases/conversation-starters/none";
|
|
23
|
+
import CreateModal_QuickExample from "../cases/create-modal/quick";
|
|
24
|
+
import CreateModal_WithSettingsExample from "../cases/create-modal/with-settings";
|
|
25
|
+
import DeviceLogin_ProviderFirstExample from "../cases/device-login/provider-first";
|
|
26
|
+
import DeviceLogin_PopupExample from "../cases/device-login/popup";
|
|
27
|
+
import EmailConfirmed_PageExample from "../cases/email-confirmed/page";
|
|
28
|
+
import EmailConfirmed_AlertOnLoginExample from "../cases/email-confirmed/alert-on-login";
|
|
29
|
+
import EmptyList_RegionExample from "../cases/empty-list/region";
|
|
30
|
+
import EmptyList_SectionExample from "../cases/empty-list/section";
|
|
31
|
+
import EmptyNotSetUp_ActionExample from "../cases/empty-not-set-up/action";
|
|
32
|
+
import EmptyNotSetUp_PointerExample from "../cases/empty-not-set-up/pointer";
|
|
33
|
+
import EmptySearch_ClearSearchExample from "../cases/empty-search/clear-search";
|
|
34
|
+
import ErrorPage_FullPageExample from "../cases/error-page/full-page";
|
|
35
|
+
import ErrorPage_InShellExample from "../cases/error-page/in-shell";
|
|
36
|
+
import FeedbackForm_ModalExample from "../cases/feedback-form/modal";
|
|
37
|
+
import ForgotPassword_InPlaceExample from "../cases/forgot-password/in-place";
|
|
38
|
+
import ForgotPassword_OwnPageExample from "../cases/forgot-password/own-page";
|
|
39
|
+
import ImportChecklist_ModalExample from "../cases/import-checklist/modal";
|
|
40
|
+
import InlineFormFeedback_ButtonLabelExample from "../cases/inline-form-feedback/button-label";
|
|
41
|
+
import InlineFormFeedback_InlineAlertExample from "../cases/inline-form-feedback/inline-alert";
|
|
42
|
+
import InlineFormFeedback_ToastExample from "../cases/inline-form-feedback/toast";
|
|
43
|
+
import InviteMember_ByEmailExample from "../cases/invite-member/by-email";
|
|
44
|
+
import InviteMember_ByLinkExample from "../cases/invite-member/by-link";
|
|
45
|
+
import LoadFailure_RegionExample from "../cases/load-failure/region";
|
|
46
|
+
import LoadFailure_InlineExample from "../cases/load-failure/inline";
|
|
47
|
+
import LogOutConfirm_ModalExample from "../cases/log-out-confirm/modal";
|
|
3
48
|
import LoginPage_CenteredExample from "../cases/login-page/centered";
|
|
4
49
|
import LoginPage_SplitExample from "../cases/login-page/split";
|
|
5
50
|
import LoginPage_ProviderFirstExample from "../cases/login-page/provider-first";
|
|
6
51
|
import LoginPage_EmailOnlyExample from "../cases/login-page/email-only";
|
|
52
|
+
import MentionList_InComposerExample from "../cases/mention-list/in-composer";
|
|
53
|
+
import MessageActions_HoverToolbarExample from "../cases/message-actions/hover-toolbar";
|
|
54
|
+
import MessageActions_MenuExample from "../cases/message-actions/menu";
|
|
55
|
+
import MessageAttachments_InComposerExample from "../cases/message-attachments/in-composer";
|
|
56
|
+
import MessageAttachments_InMessageExample from "../cases/message-attachments/in-message";
|
|
57
|
+
import MessageComposer_PlainExample from "../cases/message-composer/plain";
|
|
58
|
+
import MessageComposer_WithToolsExample from "../cases/message-composer/with-tools";
|
|
59
|
+
import MessageEdit_InPlaceExample from "../cases/message-edit/in-place";
|
|
60
|
+
import MessageReactions_ChipsExample from "../cases/message-reactions/chips";
|
|
61
|
+
import MessageReactions_QuickPickExample from "../cases/message-reactions/quick-pick";
|
|
62
|
+
import MessageRow_PersonAndAgentExample from "../cases/message-row/person-and-agent";
|
|
63
|
+
import MessageRow_GroupedExample from "../cases/message-row/grouped";
|
|
64
|
+
import NotFoundPage_FullPageExample from "../cases/not-found-page/full-page";
|
|
65
|
+
import NotFoundPage_InShellExample from "../cases/not-found-page/in-shell";
|
|
66
|
+
import OauthConsent_SimpleExample from "../cases/oauth-consent/simple";
|
|
67
|
+
import OauthConsent_WithScopeExample from "../cases/oauth-consent/with-scope";
|
|
68
|
+
import Rename_ModalExample from "../cases/rename/modal";
|
|
69
|
+
import Rename_InlineExample from "../cases/rename/inline";
|
|
70
|
+
import ReplyFeedback_ThumbsExample from "../cases/reply-feedback/thumbs";
|
|
71
|
+
import ReplyFeedback_WithReasonExample from "../cases/reply-feedback/with-reason";
|
|
72
|
+
import ReplySources_CardsExample from "../cases/reply-sources/cards";
|
|
73
|
+
import ReplySources_TagOnlyExample from "../cases/reply-sources/tag-only";
|
|
74
|
+
import RouteLoading_FullScreenExample from "../cases/route-loading/full-screen";
|
|
75
|
+
import RouteLoading_RegionExample from "../cases/route-loading/region";
|
|
76
|
+
import SetNewPassword_FormExample from "../cases/set-new-password/form";
|
|
77
|
+
import SetNewPassword_InvalidLinkExample from "../cases/set-new-password/invalid-link";
|
|
78
|
+
import SignUpPage_CenteredExample from "../cases/sign-up-page/centered";
|
|
79
|
+
import SignUpPage_SplitExample from "../cases/sign-up-page/split";
|
|
80
|
+
import SignUpPage_ProviderFirstExample from "../cases/sign-up-page/provider-first";
|
|
81
|
+
import SlashCommandList_InComposerExample from "../cases/slash-command-list/in-composer";
|
|
82
|
+
import TypeToConfirm_ModalExample from "../cases/type-to-confirm/modal";
|
|
83
|
+
import TypeToConfirm_InlineExample from "../cases/type-to-confirm/inline";
|
|
84
|
+
import TypingAndStatus_LineExample from "../cases/typing-and-status/line";
|
|
85
|
+
import UnsavedChangesGuard_SaveOrDiscardExample from "../cases/unsaved-changes-guard/save-or-discard";
|
|
86
|
+
import UnsavedChangesGuard_DiscardExample from "../cases/unsaved-changes-guard/discard";
|
|
87
|
+
import UpgradePrompt_ModalExample from "../cases/upgrade-prompt/modal";
|
|
88
|
+
import UpgradePrompt_InlineExample from "../cases/upgrade-prompt/inline";
|
|
7
89
|
var meta = { title: "Cases" };
|
|
8
90
|
export default meta;
|
|
91
|
+
export var AcceptInvite_SignedOut = { render: function () { return <AcceptInvite_SignedOutExample />; } };
|
|
92
|
+
export var AcceptInvite_SignedIn = { render: function () { return <AcceptInvite_SignedInExample />; } };
|
|
93
|
+
export var AgentOptions_Cards = { render: function () { return <AgentOptions_CardsExample />; } };
|
|
94
|
+
export var AgentPendingReply_Steps = { render: function () { return <AgentPendingReply_StepsExample />; } };
|
|
95
|
+
export var AgentPendingReply_Streaming = { render: function () { return <AgentPendingReply_StreamingExample />; } };
|
|
96
|
+
export var AgentPlanProposal_Steps = { render: function () { return <AgentPlanProposal_StepsExample />; } };
|
|
97
|
+
export var AgentPlanProposal_Changes = { render: function () { return <AgentPlanProposal_ChangesExample />; } };
|
|
98
|
+
export var AgentQuestion_Choices = { render: function () { return <AgentQuestion_ChoicesExample />; } };
|
|
99
|
+
export var AgentQuestion_FreeText = { render: function () { return <AgentQuestion_FreeTextExample />; } };
|
|
100
|
+
export var ArtifactCard_Card = { render: function () { return <ArtifactCard_CardExample />; } };
|
|
101
|
+
export var AuthGateLoading_Spinner = { render: function () { return <AuthGateLoading_SpinnerExample />; } };
|
|
102
|
+
export var AuthGateLoading_SpinnerWithLine = { render: function () { return <AuthGateLoading_SpinnerWithLineExample />; } };
|
|
103
|
+
export var CheckYourEmail_Page = { render: function () { return <CheckYourEmail_PageExample />; } };
|
|
104
|
+
export var CheckYourEmail_AlertOnLogin = { render: function () { return <CheckYourEmail_AlertOnLoginExample />; } };
|
|
105
|
+
export var ComposerLimit_Notice = { render: function () { return <ComposerLimit_NoticeExample />; } };
|
|
106
|
+
export var ComposerLimit_NoticeWithAction = { render: function () { return <ComposerLimit_NoticeWithActionExample />; } };
|
|
107
|
+
export var ConfirmDestructiveAction_Modal = { render: function () { return <ConfirmDestructiveAction_ModalExample />; } };
|
|
108
|
+
export var ConfirmDestructiveAction_Inline = { render: function () { return <ConfirmDestructiveAction_InlineExample />; } };
|
|
109
|
+
export var ConversationStarters_Chips = { render: function () { return <ConversationStarters_ChipsExample />; } };
|
|
110
|
+
export var ConversationStarters_None = { render: function () { return <ConversationStarters_NoneExample />; } };
|
|
111
|
+
export var CreateModal_Quick = { render: function () { return <CreateModal_QuickExample />; } };
|
|
112
|
+
export var CreateModal_WithSettings = { render: function () { return <CreateModal_WithSettingsExample />; } };
|
|
113
|
+
export var DeviceLogin_ProviderFirst = { render: function () { return <DeviceLogin_ProviderFirstExample />; } };
|
|
114
|
+
export var DeviceLogin_Popup = { render: function () { return <DeviceLogin_PopupExample />; } };
|
|
115
|
+
export var EmailConfirmed_Page = { render: function () { return <EmailConfirmed_PageExample />; } };
|
|
116
|
+
export var EmailConfirmed_AlertOnLogin = { render: function () { return <EmailConfirmed_AlertOnLoginExample />; } };
|
|
117
|
+
export var EmptyList_Region = { render: function () { return <EmptyList_RegionExample />; } };
|
|
118
|
+
export var EmptyList_Section = { render: function () { return <EmptyList_SectionExample />; } };
|
|
119
|
+
export var EmptyNotSetUp_Action = { render: function () { return <EmptyNotSetUp_ActionExample />; } };
|
|
120
|
+
export var EmptyNotSetUp_Pointer = { render: function () { return <EmptyNotSetUp_PointerExample />; } };
|
|
121
|
+
export var EmptySearch_ClearSearch = { render: function () { return <EmptySearch_ClearSearchExample />; } };
|
|
122
|
+
export var ErrorPage_FullPage = { render: function () { return <ErrorPage_FullPageExample />; } };
|
|
123
|
+
export var ErrorPage_InShell = { render: function () { return <ErrorPage_InShellExample />; } };
|
|
124
|
+
export var FeedbackForm_Modal = { render: function () { return <FeedbackForm_ModalExample />; } };
|
|
125
|
+
export var ForgotPassword_InPlace = { render: function () { return <ForgotPassword_InPlaceExample />; } };
|
|
126
|
+
export var ForgotPassword_OwnPage = { render: function () { return <ForgotPassword_OwnPageExample />; } };
|
|
127
|
+
export var ImportChecklist_Modal = { render: function () { return <ImportChecklist_ModalExample />; } };
|
|
128
|
+
export var InlineFormFeedback_ButtonLabel = { render: function () { return <InlineFormFeedback_ButtonLabelExample />; } };
|
|
129
|
+
export var InlineFormFeedback_InlineAlert = { render: function () { return <InlineFormFeedback_InlineAlertExample />; } };
|
|
130
|
+
export var InlineFormFeedback_Toast = { render: function () { return <InlineFormFeedback_ToastExample />; } };
|
|
131
|
+
export var InviteMember_ByEmail = { render: function () { return <InviteMember_ByEmailExample />; } };
|
|
132
|
+
export var InviteMember_ByLink = { render: function () { return <InviteMember_ByLinkExample />; } };
|
|
133
|
+
export var LoadFailure_Region = { render: function () { return <LoadFailure_RegionExample />; } };
|
|
134
|
+
export var LoadFailure_Inline = { render: function () { return <LoadFailure_InlineExample />; } };
|
|
135
|
+
export var LogOutConfirm_Modal = { render: function () { return <LogOutConfirm_ModalExample />; } };
|
|
9
136
|
export var LoginPage_Centered = { render: function () { return <LoginPage_CenteredExample />; } };
|
|
10
137
|
export var LoginPage_Split = { render: function () { return <LoginPage_SplitExample />; } };
|
|
11
138
|
export var LoginPage_ProviderFirst = { render: function () { return <LoginPage_ProviderFirstExample />; } };
|
|
12
139
|
export var LoginPage_EmailOnly = { render: function () { return <LoginPage_EmailOnlyExample />; } };
|
|
140
|
+
export var MentionList_InComposer = { render: function () { return <MentionList_InComposerExample />; } };
|
|
141
|
+
export var MessageActions_HoverToolbar = { render: function () { return <MessageActions_HoverToolbarExample />; } };
|
|
142
|
+
export var MessageActions_Menu = { render: function () { return <MessageActions_MenuExample />; } };
|
|
143
|
+
export var MessageAttachments_InComposer = { render: function () { return <MessageAttachments_InComposerExample />; } };
|
|
144
|
+
export var MessageAttachments_InMessage = { render: function () { return <MessageAttachments_InMessageExample />; } };
|
|
145
|
+
export var MessageComposer_Plain = { render: function () { return <MessageComposer_PlainExample />; } };
|
|
146
|
+
export var MessageComposer_WithTools = { render: function () { return <MessageComposer_WithToolsExample />; } };
|
|
147
|
+
export var MessageEdit_InPlace = { render: function () { return <MessageEdit_InPlaceExample />; } };
|
|
148
|
+
export var MessageReactions_Chips = { render: function () { return <MessageReactions_ChipsExample />; } };
|
|
149
|
+
export var MessageReactions_QuickPick = { render: function () { return <MessageReactions_QuickPickExample />; } };
|
|
150
|
+
export var MessageRow_PersonAndAgent = { render: function () { return <MessageRow_PersonAndAgentExample />; } };
|
|
151
|
+
export var MessageRow_Grouped = { render: function () { return <MessageRow_GroupedExample />; } };
|
|
152
|
+
export var NotFoundPage_FullPage = { render: function () { return <NotFoundPage_FullPageExample />; } };
|
|
153
|
+
export var NotFoundPage_InShell = { render: function () { return <NotFoundPage_InShellExample />; } };
|
|
154
|
+
export var OauthConsent_Simple = { render: function () { return <OauthConsent_SimpleExample />; } };
|
|
155
|
+
export var OauthConsent_WithScope = { render: function () { return <OauthConsent_WithScopeExample />; } };
|
|
156
|
+
export var Rename_Modal = { render: function () { return <Rename_ModalExample />; } };
|
|
157
|
+
export var Rename_Inline = { render: function () { return <Rename_InlineExample />; } };
|
|
158
|
+
export var ReplyFeedback_Thumbs = { render: function () { return <ReplyFeedback_ThumbsExample />; } };
|
|
159
|
+
export var ReplyFeedback_WithReason = { render: function () { return <ReplyFeedback_WithReasonExample />; } };
|
|
160
|
+
export var ReplySources_Cards = { render: function () { return <ReplySources_CardsExample />; } };
|
|
161
|
+
export var ReplySources_TagOnly = { render: function () { return <ReplySources_TagOnlyExample />; } };
|
|
162
|
+
export var RouteLoading_FullScreen = { render: function () { return <RouteLoading_FullScreenExample />; } };
|
|
163
|
+
export var RouteLoading_Region = { render: function () { return <RouteLoading_RegionExample />; } };
|
|
164
|
+
export var SetNewPassword_Form = { render: function () { return <SetNewPassword_FormExample />; } };
|
|
165
|
+
export var SetNewPassword_InvalidLink = { render: function () { return <SetNewPassword_InvalidLinkExample />; } };
|
|
166
|
+
export var SignUpPage_Centered = { render: function () { return <SignUpPage_CenteredExample />; } };
|
|
167
|
+
export var SignUpPage_Split = { render: function () { return <SignUpPage_SplitExample />; } };
|
|
168
|
+
export var SignUpPage_ProviderFirst = { render: function () { return <SignUpPage_ProviderFirstExample />; } };
|
|
169
|
+
export var SlashCommandList_InComposer = { render: function () { return <SlashCommandList_InComposerExample />; } };
|
|
170
|
+
export var TypeToConfirm_Modal = { render: function () { return <TypeToConfirm_ModalExample />; } };
|
|
171
|
+
export var TypeToConfirm_Inline = { render: function () { return <TypeToConfirm_InlineExample />; } };
|
|
172
|
+
export var TypingAndStatus_Line = { render: function () { return <TypingAndStatus_LineExample />; } };
|
|
173
|
+
export var UnsavedChangesGuard_SaveOrDiscard = { render: function () { return <UnsavedChangesGuard_SaveOrDiscardExample />; } };
|
|
174
|
+
export var UnsavedChangesGuard_Discard = { render: function () { return <UnsavedChangesGuard_DiscardExample />; } };
|
|
175
|
+
export var UpgradePrompt_Modal = { render: function () { return <UpgradePrompt_ModalExample />; } };
|
|
176
|
+
export var UpgradePrompt_Inline = { render: function () { return <UpgradePrompt_InlineExample />; } };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from "@storybook/react";
|
|
2
|
+
import Composer from "../components/composer";
|
|
3
|
+
declare const meta: Meta<typeof Composer>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof Composer>;
|
|
6
|
+
export declare const Empty: Story;
|
|
7
|
+
export declare const WithText: Story;
|
|
8
|
+
export declare const WithTools: Story;
|
|
9
|
+
export declare const WithAttachments: Story;
|
|
10
|
+
export declare const Stop: Story;
|
|
11
|
+
export declare const Disabled: Story;
|
|
12
|
+
export declare const WithActions: Story;
|
|
13
|
+
interface ProbeArgs {
|
|
14
|
+
submitOnEnter: boolean;
|
|
15
|
+
canSubmit?: boolean;
|
|
16
|
+
disabled: boolean;
|
|
17
|
+
sending: boolean;
|
|
18
|
+
stop: boolean;
|
|
19
|
+
withActions: boolean;
|
|
20
|
+
takeEnter: boolean;
|
|
21
|
+
withAbove: boolean;
|
|
22
|
+
}
|
|
23
|
+
export declare const Probe: StoryObj<ProbeArgs>;
|