@thewhatmatters/wmds 0.4.2 → 0.4.3
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 +24 -0
- package/CONSUMING.md +2 -2
- package/bin/wmds-check.mjs +108 -10
- package/dist/components/organisms/ChatDock/ChatDock.d.ts +9 -18
- package/dist/components/organisms/ChatDock/ChatDock.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/ChatDock.js +411 -411
- package/dist/components/organisms/ChatDock/ChatDockGate.d.ts +19 -9
- package/dist/components/organisms/ChatDock/ChatDockGate.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/ChatDockGate.js +152 -123
- package/dist/components/organisms/ChatDock/chatDockGateContext.d.ts +11 -0
- package/dist/components/organisms/ChatDock/chatDockGateContext.d.ts.map +1 -0
- package/dist/components/organisms/ChatDock/chatDockGateContext.js +9 -0
- package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts +15 -10
- package/dist/components/organisms/ChatDock/chatDockGateStyles.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/chatDockGateStyles.js +3 -3
- package/dist/components/organisms/ChatDock/chatDockStyles.d.ts +10 -4
- package/dist/components/organisms/ChatDock/chatDockStyles.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/chatDockStyles.js +9 -6
- package/dist/components/organisms/ChatDock/chatDockViewport.d.ts +6 -0
- package/dist/components/organisms/ChatDock/chatDockViewport.d.ts.map +1 -1
- package/dist/components/organisms/ChatDock/chatDockViewport.js +14 -1
- package/dist/components/organisms/Dialog/Dialog.js +34 -34
- package/dist/components/organisms/Sheet/Sheet.js +38 -38
- package/dist/components/organisms/Toast/Toast.d.ts.map +1 -1
- package/dist/components/organisms/Toast/Toast.js +11 -5
- package/dist/lib/dialogOverlay.d.ts +5 -0
- package/dist/lib/dialogOverlay.d.ts.map +1 -1
- package/dist/lib/dialogOverlay.js +29 -15
- package/dist/styles.css +1 -1
- package/docs/component-contracts.md +4 -2
- package/docs/components.md +5 -5
- package/docs/exports.json +1 -1
- package/docs/patterns/components-accordion--flush.tsx +1 -1
- package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
- package/docs/patterns/components-badge--outline-tags.tsx +1 -1
- package/docs/patterns/components-badge--with-avatar.tsx +1 -1
- package/docs/patterns/components-breadcrumb--editorial.tsx +1 -1
- package/docs/patterns/components-breadcrumb--long-path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--path.tsx +1 -1
- package/docs/patterns/components-breadcrumb--router-links.tsx +1 -1
- package/docs/patterns/components-button-button--copy-button.tsx +1 -1
- package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
- package/docs/patterns/components-button-button--external-link.tsx +1 -1
- package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
- package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
- package/docs/patterns/components-button-button--link-render.tsx +1 -1
- package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
- package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
- package/docs/patterns/components-button-button--primary-action.tsx +1 -1
- package/docs/patterns/components-button-button--row-hug.tsx +1 -1
- package/docs/patterns/components-button-button--row-layout.tsx +1 -1
- package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
- package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
- package/docs/patterns/components-button-button--with-count.tsx +1 -1
- package/docs/patterns/components-button-button--with-icon.tsx +1 -1
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
- package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
- package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
- package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
- package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
- package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
- package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-chat-dock.tsx +1 -1
- package/docs/patterns/components-chatdock--pattern-start-project-gate.tsx +54 -11
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-count.tsx +1 -1
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
- package/docs/patterns/components-checkbox-checkboxgroup--option-counts.tsx +1 -1
- package/docs/patterns/components-descriptionlist--details.tsx +1 -1
- package/docs/patterns/components-descriptionlist--post-metadata.tsx +1 -1
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
- package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
- package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
- package/docs/patterns/components-field--horizontal-input.tsx +1 -1
- package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
- package/docs/patterns/components-field--multi-control.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
- package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
- package/docs/patterns/components-indexlist--post-index.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
- package/docs/patterns/components-kbd--command-row.tsx +1 -1
- package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
- package/docs/patterns/components-kbd--shortcut.tsx +1 -1
- package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
- package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
- package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
- package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
- package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
- package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
- package/docs/patterns/components-prose--article-body.tsx +1 -1
- package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
- package/docs/patterns/components-sectioncaption--column-caption.tsx +1 -1
- package/docs/patterns/components-sectioncaption--with-action.tsx +1 -1
- package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
- package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
- package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
- package/docs/patterns/components-sitenav--compact.tsx +1 -1
- package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
- package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
- package/docs/patterns/components-stat--insights-row.tsx +1 -1
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
- package/docs/patterns/components-switch--default.tsx +1 -1
- package/docs/patterns/components-switch--settings-row.tsx +1 -1
- package/docs/patterns/components-tab--settings-pages.tsx +1 -1
- package/docs/patterns/components-taskrows--action-details.tsx +1 -1
- package/docs/patterns/components-taskrows--capsules.tsx +1 -1
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
- package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
- package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
- package/docs/patterns/components-taskrows--status-list.tsx +1 -1
- package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
- package/docs/patterns/components-textlink--external-destination.tsx +1 -1
- package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
- package/docs/patterns/components-textlink--quiet-title.tsx +1 -1
- package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
- package/docs/patterns/components-textsequence--default.tsx +1 -1
- package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
- package/docs/patterns/components-textsequence--shapes.tsx +1 -1
- package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
- package/docs/patterns/components-tooltip--controlled.tsx +1 -1
- package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
- package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
- package/docs/patterns/components-tooltip--placement.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
- package/docs/patterns/guides-filter-panel--filtered-index.tsx +41 -17
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
- package/docs/patterns/guides-post-page--post-page.tsx +34 -4
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
- package/docs/patterns/index.json +1 -1
- package/package.json +1 -1
|
@@ -4,18 +4,20 @@ export interface ChatDockGateLabels {
|
|
|
4
4
|
previous: string;
|
|
5
5
|
/** Header control on one step. Default: "Next step". */
|
|
6
6
|
next: string;
|
|
7
|
-
/** Header close. Default: "Close". */
|
|
7
|
+
/** Header close outside **ChatDock**. Inside it the close folds the window and takes **ChatDock**'s `labels.close`. Default: "Close". */
|
|
8
8
|
close: string;
|
|
9
9
|
/** Footer close. Default: "Cancel". */
|
|
10
10
|
cancel: string;
|
|
11
11
|
/** Footer primary action. Default: "Next". */
|
|
12
12
|
continue: string;
|
|
13
|
+
/** Shown over the footer while `pending`. Default: "Sending…". */
|
|
14
|
+
pending: string;
|
|
13
15
|
/** Where the visitor is, between the header controls. Default: "2 of 4". */
|
|
14
16
|
progress: (step: number, stepCount: number) => string;
|
|
15
17
|
}
|
|
16
18
|
export declare const chatDockGateDefaultLabels: ChatDockGateLabels;
|
|
17
19
|
export interface ChatDockGateProps {
|
|
18
|
-
/** The step's title. It also names the gate for screen readers. */
|
|
20
|
+
/** The step's title — the window's header while the gate is up. It also names the gate for screen readers. */
|
|
19
21
|
title: string;
|
|
20
22
|
/** One line under the title. */
|
|
21
23
|
subtitle?: string;
|
|
@@ -26,27 +28,35 @@ export interface ChatDockGateProps {
|
|
|
26
28
|
/** Back one step. The control is disabled on the first step. */
|
|
27
29
|
onPrevious: () => void;
|
|
28
30
|
/**
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
+
* The footer's primary action — on one step, or on the last step an action such as "Send" or
|
|
32
|
+
* "Try again" (`continueLabel`). The header's next control moves on one step, so it is disabled on
|
|
33
|
+
* the last step. Leave it out on a step that ends another way (for example booking a call).
|
|
31
34
|
*/
|
|
32
35
|
onNext?: () => void;
|
|
33
36
|
/** Whether the visitor can move on from this step. Default: true. */
|
|
34
37
|
canContinue?: boolean;
|
|
35
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Leaves the gate — the footer's Cancel. Inside **ChatDock** the header's close and Escape fold the
|
|
40
|
+
* window instead and keep the gate, with its progress, for when it reopens.
|
|
41
|
+
*/
|
|
36
42
|
onClose: () => void;
|
|
37
43
|
/** Footer start — for example **CalEmbed.Skip** on a booking step. */
|
|
38
44
|
footerStart?: ReactNode;
|
|
39
45
|
/** This step's primary label, for example "Send". Default: `labels.continue`. */
|
|
40
46
|
continueLabel?: string;
|
|
47
|
+
/** The step's action is running — for example sending the form. Shows `labels.pending` over the footer and disables the step controls. */
|
|
48
|
+
pending?: boolean;
|
|
49
|
+
/** The step's action failed — a line over the footer, announced. Keep the visitor's answers, and offer a retry through `onNext`. */
|
|
50
|
+
error?: ReactNode;
|
|
41
51
|
labels?: Partial<ChatDockGateLabels>;
|
|
42
52
|
/** The step's content. Change it with `step`; the body slides between steps. */
|
|
43
53
|
children: ReactNode;
|
|
44
54
|
}
|
|
45
55
|
/**
|
|
46
|
-
* A multi-step form
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
56
|
+
* A multi-step form that takes over the chat window — pass it as **ChatDock**'s `gate`. While it is
|
|
57
|
+
* up the window is the form: one header with the step's title and subtitle, previous, progress, next,
|
|
58
|
+
* and close; the step in a body that scrolls; Cancel and the primary action pinned to the window's
|
|
59
|
+
* bottom edge. The header's close and Escape fold the window and keep the gate; Cancel leaves it.
|
|
50
60
|
*/
|
|
51
61
|
export declare const ChatDockGate: import("react").ForwardRefExoticComponent<ChatDockGateProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
62
|
//# sourceMappingURL=ChatDockGate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatDockGate.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/ChatDockGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ChatDockGate.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/ChatDockGate.tsx"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AA4Bf,MAAM,WAAW,kBAAkB;IACjC,8DAA8D;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,wDAAwD;IACxD,IAAI,EAAE,MAAM,CAAC;IACb,yIAAyI;IACzI,KAAK,EAAE,MAAM,CAAC;IACd,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,8CAA8C;IAC9C,QAAQ,EAAE,MAAM,CAAC;IACjB,kEAAkE;IAClE,OAAO,EAAE,MAAM,CAAC;IAChB,4EAA4E;IAC5E,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAC;CACvD;AAED,eAAO,MAAM,yBAAyB,EAAE,kBAQvC,CAAC;AAEF,MAAM,WAAW,iBAAiB;IAChC,8GAA8G;IAC9G,KAAK,EAAE,MAAM,CAAC;IACd,gCAAgC;IAChC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gCAAgC;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,gCAAgC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,qEAAqE;IACrE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,sEAAsE;IACtE,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,iFAAiF;IACjF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,0IAA0I;IAC1I,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,oIAAoI;IACpI,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC,kBAAkB,CAAC,CAAC;IACrC,gFAAgF;IAChF,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;GAKG;AACH,eAAO,MAAM,YAAY,8GA8LvB,CAAC"}
|
|
@@ -2,160 +2,189 @@
|
|
|
2
2
|
import { motionTransitionProp as e } from "../../../lib/motion.js";
|
|
3
3
|
import { Button as t } from "../../atoms/Button/Button.js";
|
|
4
4
|
import { IconButton as n } from "../../atoms/IconButton/IconButton.js";
|
|
5
|
-
import { cardSubtitleClasses as
|
|
6
|
-
import { Card as
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
5
|
+
import { cardSubtitleClasses as ee, cardTitleClasses as te } from "../../molecules/Card/cardStyles.js";
|
|
6
|
+
import { Card as r } from "../../molecules/Card/Card.js";
|
|
7
|
+
import { overlayPanelFooterHairlineClasses as ne, overlayPanelHeaderClasses as i, overlayPanelHeaderDelineatedInnerClasses as a, overlayPanelHeaderHairlineClasses as o } from "../Dialog/dialogStyles.js";
|
|
8
|
+
import { useChatDockGateWindow as s } from "./chatDockGateContext.js";
|
|
9
|
+
import { useChatDockReducedMotion as c, useChatDockWide as l } from "./chatDockViewport.js";
|
|
10
|
+
import { chatDockGateBodyClasses as u, chatDockGateCardClasses as d, chatDockGateClasses as f, chatDockGateErrorClasses as p, chatDockGateFooterActionsClasses as m, chatDockGateFooterBlockClasses as h, chatDockGateFooterRowClasses as g, chatDockGateOccupantClasses as _, chatDockGatePendingClasses as v, chatDockGateProgressClasses as re } from "./chatDockGateStyles.js";
|
|
11
|
+
import { forwardRef as y, useContext as ie, useId as b, useLayoutEffect as ae, useRef as oe, useState as x } from "react";
|
|
12
|
+
import { ChevronLeft as se, ChevronRight as ce, X as S } from "lucide-react";
|
|
13
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
14
|
+
import { AnimatePresence as E, MotionConfigContext as D, motion as O } from "motion/react";
|
|
13
15
|
//#region src/components/organisms/ChatDock/ChatDockGate.tsx
|
|
14
|
-
var
|
|
16
|
+
var k = {
|
|
15
17
|
previous: "Previous step",
|
|
16
18
|
next: "Next step",
|
|
17
19
|
close: "Close",
|
|
18
20
|
cancel: "Cancel",
|
|
19
21
|
continue: "Next",
|
|
22
|
+
pending: "Sending…",
|
|
20
23
|
progress: (e, t) => `${e} of ${t}`
|
|
21
|
-
},
|
|
22
|
-
let
|
|
23
|
-
...
|
|
24
|
-
...
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
let Y =
|
|
28
|
-
|
|
29
|
-
let e =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
t.disconnect();
|
|
34
|
-
};
|
|
35
|
-
}, []);
|
|
36
|
-
let Z = e("fast"), ae = e("medium"), Q = W ? 0 : 16, oe = {
|
|
24
|
+
}, A = y(function({ title: y, subtitle: A, step: j, stepCount: M, onPrevious: N, onNext: P, canContinue: F = !0, onClose: I, footerStart: L, continueLabel: R, pending: z = !1, error: B, labels: V, children: le }, H) {
|
|
25
|
+
let U = {
|
|
26
|
+
...k,
|
|
27
|
+
...V
|
|
28
|
+
}, W = b(), G = b(), ue = l(), K = s(), { reducedMotion: de } = ie(D), fe = c(de), [q, pe] = x(j), [J, me] = x(1);
|
|
29
|
+
j !== q && (me(j > q ? 1 : -1), pe(j));
|
|
30
|
+
let Y = oe(null);
|
|
31
|
+
ae(() => {
|
|
32
|
+
let e = Y.current?.querySelector("[data-chat-dock-gate-body]");
|
|
33
|
+
e != null && (e.scrollTop = 0);
|
|
34
|
+
}, [j]);
|
|
35
|
+
let X = e("fast"), Z = fe ? 0 : 16, Q = {
|
|
37
36
|
enter: (e) => ({
|
|
38
37
|
opacity: 0,
|
|
39
|
-
x: e *
|
|
38
|
+
x: e * Z
|
|
40
39
|
}),
|
|
41
40
|
center: {
|
|
42
41
|
opacity: 1,
|
|
43
42
|
x: 0,
|
|
44
|
-
transition:
|
|
43
|
+
transition: X
|
|
45
44
|
},
|
|
46
45
|
exit: (e) => ({
|
|
47
46
|
opacity: 0,
|
|
48
|
-
x: -e *
|
|
49
|
-
transition:
|
|
47
|
+
x: -e * Z,
|
|
48
|
+
transition: X
|
|
50
49
|
})
|
|
51
|
-
}, $ =
|
|
52
|
-
function
|
|
53
|
-
e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(),
|
|
50
|
+
}, $ = ue ? "sm" : "md", he = P != null && F && j < M && !z, ge = K?.closeWindow ?? I;
|
|
51
|
+
function _e(e) {
|
|
52
|
+
K != null || e.key !== "Escape" || e.defaultPrevented || (e.preventDefault(), I());
|
|
54
53
|
}
|
|
55
|
-
return /* @__PURE__ */
|
|
54
|
+
return /* @__PURE__ */ w("div", {
|
|
56
55
|
ref: (e) => {
|
|
57
|
-
Y.current = e, typeof
|
|
56
|
+
Y.current = e, typeof H == "function" ? H(e) : H != null && (H.current = e);
|
|
58
57
|
},
|
|
59
|
-
className:
|
|
58
|
+
className: f,
|
|
60
59
|
role: "group",
|
|
61
|
-
"aria-labelledby":
|
|
62
|
-
"aria-describedby":
|
|
60
|
+
"aria-labelledby": W,
|
|
61
|
+
"aria-describedby": A == null ? void 0 : G,
|
|
62
|
+
"aria-busy": z || void 0,
|
|
63
63
|
tabIndex: -1,
|
|
64
64
|
"data-chat-dock-gate-focus": "",
|
|
65
|
-
"data-step":
|
|
66
|
-
onKeyDown:
|
|
67
|
-
children: /* @__PURE__ */
|
|
65
|
+
"data-step": j,
|
|
66
|
+
onKeyDown: _e,
|
|
67
|
+
children: /* @__PURE__ */ T(r, {
|
|
68
68
|
as: "section",
|
|
69
|
-
shape: "
|
|
69
|
+
shape: "flush",
|
|
70
70
|
padding: "none",
|
|
71
|
-
variant: "
|
|
72
|
-
|
|
71
|
+
variant: "ghost",
|
|
72
|
+
headerless: !1,
|
|
73
|
+
bodyTerminal: !1,
|
|
74
|
+
className: d,
|
|
73
75
|
children: [
|
|
74
|
-
/* @__PURE__ */
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
className:
|
|
78
|
-
children:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
76
|
+
/* @__PURE__ */ T("div", {
|
|
77
|
+
className: `${i} w-full`,
|
|
78
|
+
children: [/* @__PURE__ */ w(r.Header, {
|
|
79
|
+
className: a,
|
|
80
|
+
start: /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("h2", {
|
|
81
|
+
id: W,
|
|
82
|
+
className: te,
|
|
83
|
+
children: y
|
|
84
|
+
}), A == null ? null : /* @__PURE__ */ w("p", {
|
|
85
|
+
id: G,
|
|
86
|
+
className: ee,
|
|
87
|
+
children: A
|
|
88
|
+
})] }),
|
|
89
|
+
end: /* @__PURE__ */ T(C, { children: [
|
|
90
|
+
/* @__PURE__ */ w(n, {
|
|
91
|
+
size: $,
|
|
92
|
+
icon: /* @__PURE__ */ w(se, {}),
|
|
93
|
+
"aria-label": U.previous,
|
|
94
|
+
disabled: j <= 1 || z,
|
|
95
|
+
onClick: N
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ w("span", {
|
|
98
|
+
className: re,
|
|
99
|
+
"aria-live": "polite",
|
|
100
|
+
children: U.progress(j, M)
|
|
101
|
+
}),
|
|
102
|
+
/* @__PURE__ */ w(n, {
|
|
103
|
+
size: $,
|
|
104
|
+
icon: /* @__PURE__ */ w(ce, {}),
|
|
105
|
+
"aria-label": U.next,
|
|
106
|
+
disabled: !he,
|
|
107
|
+
onClick: P
|
|
108
|
+
}),
|
|
109
|
+
/* @__PURE__ */ w(n, {
|
|
110
|
+
size: $,
|
|
111
|
+
icon: /* @__PURE__ */ w(S, {}),
|
|
112
|
+
"aria-label": K?.closeLabel ?? U.close,
|
|
113
|
+
onClick: ge
|
|
114
|
+
})
|
|
115
|
+
] })
|
|
116
|
+
}), /* @__PURE__ */ w("hr", {
|
|
117
|
+
className: o,
|
|
118
|
+
"aria-hidden": "true"
|
|
119
|
+
})]
|
|
120
|
+
}),
|
|
121
|
+
/* @__PURE__ */ w(r.Body, {
|
|
122
|
+
className: u,
|
|
123
|
+
"data-chat-dock-gate-body": "",
|
|
124
|
+
children: /* @__PURE__ */ w(E, {
|
|
125
|
+
mode: "wait",
|
|
126
|
+
initial: !1,
|
|
127
|
+
custom: J,
|
|
128
|
+
onExitComplete: () => {
|
|
129
|
+
let e = Y.current;
|
|
130
|
+
e != null && !e.contains(document.activeElement) && e.focus({ preventScroll: !0 });
|
|
131
|
+
},
|
|
132
|
+
children: /* @__PURE__ */ w(O.div, {
|
|
133
|
+
className: _,
|
|
134
|
+
custom: J,
|
|
135
|
+
variants: Q,
|
|
136
|
+
initial: "enter",
|
|
137
|
+
animate: "center",
|
|
138
|
+
exit: "exit",
|
|
139
|
+
children: le
|
|
140
|
+
}, j)
|
|
141
|
+
})
|
|
142
|
+
}),
|
|
143
|
+
/* @__PURE__ */ T("div", {
|
|
144
|
+
className: h,
|
|
145
|
+
children: [
|
|
146
|
+
/* @__PURE__ */ w("hr", {
|
|
147
|
+
className: ne,
|
|
148
|
+
"aria-hidden": "true"
|
|
96
149
|
}),
|
|
97
|
-
/* @__PURE__ */
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
150
|
+
/* @__PURE__ */ w("div", {
|
|
151
|
+
role: "status",
|
|
152
|
+
children: z ? /* @__PURE__ */ w("p", {
|
|
153
|
+
className: v,
|
|
154
|
+
children: U.pending
|
|
155
|
+
}) : null
|
|
103
156
|
}),
|
|
104
|
-
/* @__PURE__ */
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
157
|
+
!z && B != null ? /* @__PURE__ */ w("p", {
|
|
158
|
+
className: p,
|
|
159
|
+
role: "alert",
|
|
160
|
+
children: B
|
|
161
|
+
}) : null,
|
|
162
|
+
/* @__PURE__ */ T(r.Footer, {
|
|
163
|
+
className: g,
|
|
164
|
+
children: [L, /* @__PURE__ */ T("div", {
|
|
165
|
+
className: m,
|
|
166
|
+
children: [/* @__PURE__ */ w(t, {
|
|
167
|
+
role: "secondary",
|
|
168
|
+
size: $,
|
|
169
|
+
type: "button",
|
|
170
|
+
disabled: z,
|
|
171
|
+
onClick: I,
|
|
172
|
+
children: U.cancel
|
|
173
|
+
}), P == null ? null : /* @__PURE__ */ w(t, {
|
|
174
|
+
role: "primary",
|
|
175
|
+
size: $,
|
|
176
|
+
type: "button",
|
|
177
|
+
disabled: !F || z,
|
|
178
|
+
onClick: P,
|
|
179
|
+
children: R ?? U.continue
|
|
180
|
+
})]
|
|
181
|
+
})]
|
|
109
182
|
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
/* @__PURE__ */ x(i.Body, { children: /* @__PURE__ */ x(T.div, {
|
|
113
|
-
className: te,
|
|
114
|
-
initial: !1,
|
|
115
|
-
animate: { height: re ?? "auto" },
|
|
116
|
-
transition: W ? { duration: 0 } : ae,
|
|
117
|
-
children: /* @__PURE__ */ x("div", {
|
|
118
|
-
ref: X,
|
|
119
|
-
children: /* @__PURE__ */ x(C, {
|
|
120
|
-
mode: "wait",
|
|
121
|
-
initial: !1,
|
|
122
|
-
custom: q,
|
|
123
|
-
onExitComplete: () => {
|
|
124
|
-
let e = Y.current;
|
|
125
|
-
e != null && !e.contains(document.activeElement) && e.focus({ preventScroll: !0 });
|
|
126
|
-
},
|
|
127
|
-
children: /* @__PURE__ */ x(T.div, {
|
|
128
|
-
className: l,
|
|
129
|
-
custom: q,
|
|
130
|
-
variants: oe,
|
|
131
|
-
initial: "enter",
|
|
132
|
-
animate: "center",
|
|
133
|
-
exit: "exit",
|
|
134
|
-
children: L
|
|
135
|
-
}, O)
|
|
136
|
-
})
|
|
137
|
-
})
|
|
138
|
-
}) }),
|
|
139
|
-
/* @__PURE__ */ S(i.Footer, { children: [P, /* @__PURE__ */ S("div", {
|
|
140
|
-
className: c,
|
|
141
|
-
children: [/* @__PURE__ */ x(t, {
|
|
142
|
-
role: "secondary",
|
|
143
|
-
size: $,
|
|
144
|
-
type: "button",
|
|
145
|
-
onClick: N,
|
|
146
|
-
children: z.cancel
|
|
147
|
-
}), j == null ? null : /* @__PURE__ */ x(t, {
|
|
148
|
-
role: "primary",
|
|
149
|
-
size: $,
|
|
150
|
-
type: "button",
|
|
151
|
-
disabled: !M,
|
|
152
|
-
onClick: j,
|
|
153
|
-
children: F ?? z.continue
|
|
154
|
-
})]
|
|
155
|
-
})] })
|
|
183
|
+
]
|
|
184
|
+
})
|
|
156
185
|
]
|
|
157
186
|
})
|
|
158
187
|
});
|
|
159
188
|
});
|
|
160
189
|
//#endregion
|
|
161
|
-
export {
|
|
190
|
+
export { A as ChatDockGate, k as chatDockGateDefaultLabels };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** What **ChatDock** hands the gate in its window. */
|
|
2
|
+
export interface ChatDockGateContextValue {
|
|
3
|
+
/** Folds the window. The gate stays, with its progress, for when the window reopens. */
|
|
4
|
+
closeWindow: () => void;
|
|
5
|
+
/** Name of the gate's header close — **ChatDock**'s `labels.close`. */
|
|
6
|
+
closeLabel: string;
|
|
7
|
+
}
|
|
8
|
+
export declare const ChatDockGateContext: import("react").Context<ChatDockGateContextValue | null>;
|
|
9
|
+
/** The window the gate fills, or `null` outside **ChatDock**. */
|
|
10
|
+
export declare function useChatDockGateWindow(): ChatDockGateContextValue | null;
|
|
11
|
+
//# sourceMappingURL=chatDockGateContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chatDockGateContext.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockGateContext.ts"],"names":[],"mappings":"AAEA,sDAAsD;AACtD,MAAM,WAAW,wBAAwB;IACvC,wFAAwF;IACxF,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,uEAAuE;IACvE,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,eAAO,MAAM,mBAAmB,0DAAuD,CAAC;AAExF,iEAAiE;AACjE,wBAAgB,qBAAqB,IAAI,wBAAwB,GAAG,IAAI,CAEvE"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createContext as e, useContext as t } from "react";
|
|
3
|
+
//#region src/components/organisms/ChatDock/chatDockGateContext.ts
|
|
4
|
+
var n = e(null);
|
|
5
|
+
function r() {
|
|
6
|
+
return t(n);
|
|
7
|
+
}
|
|
8
|
+
//#endregion
|
|
9
|
+
export { n as ChatDockGateContext, r as useChatDockGateWindow };
|
|
@@ -1,16 +1,21 @@
|
|
|
1
|
-
/**
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
/** Clips the body while it eases to the next step's height; never shrinks, so a tall step scrolls the body. */
|
|
9
|
-
export declare const chatDockGateStepClasses = "shrink-0 overflow-hidden";
|
|
10
|
-
/** One step on the body occupant — the inset well, as in **Card** layout bodies. */
|
|
1
|
+
/** The gate — fills the chat window, and takes focus (ChatDock moves focus here). */
|
|
2
|
+
export declare const chatDockGateClasses = "flex h-full min-h-0 flex-col outline-none";
|
|
3
|
+
/** The flush Card shell, as tall as the window, so the body scrolls between the header and the footer. */
|
|
4
|
+
export declare const chatDockGateCardClasses = "h-full min-h-0";
|
|
5
|
+
/** The step body — takes the height the header and footer leave, and scrolls. */
|
|
6
|
+
export declare const chatDockGateBodyClasses = "overscroll-contain";
|
|
7
|
+
/** One step, on the window surface — lined up with the header and footer at 16px. */
|
|
11
8
|
export declare const chatDockGateOccupantClasses: string;
|
|
12
9
|
/** "2 of 4" between the header controls. */
|
|
13
10
|
export declare const chatDockGateProgressClasses: string;
|
|
11
|
+
/** The footer block: the hairline, then the pending or error line, then the actions. */
|
|
12
|
+
export declare const chatDockGateFooterBlockClasses = "flex w-full shrink-0 flex-col";
|
|
13
|
+
/** The footer row under its hairline. */
|
|
14
|
+
export declare const chatDockGateFooterRowClasses = "pt-3";
|
|
14
15
|
/** Cancel and the primary action, at the end of the footer. */
|
|
15
16
|
export declare const chatDockGateFooterActionsClasses = "ml-auto flex items-center gap-2";
|
|
17
|
+
/** While the step's action runs — muted caption over the actions. */
|
|
18
|
+
export declare const chatDockGatePendingClasses: string;
|
|
19
|
+
/** The step's action failed — error caption over the actions. */
|
|
20
|
+
export declare const chatDockGateErrorClasses: string;
|
|
16
21
|
//# sourceMappingURL=chatDockGateStyles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatDockGateStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockGateStyles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chatDockGateStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockGateStyles.ts"],"names":[],"mappings":"AAIA,qFAAqF;AACrF,eAAO,MAAM,mBAAmB,8CAA8C,CAAC;AAE/E,0GAA0G;AAC1G,eAAO,MAAM,uBAAuB,mBAAmB,CAAC;AAExD,iFAAiF;AACjF,eAAO,MAAM,uBAAuB,uBAAuB,CAAC;AAE5D,qFAAqF;AACrF,eAAO,MAAM,2BAA2B,QAAsE,CAAC;AAE/G,4CAA4C;AAC5C,eAAO,MAAM,2BAA2B,QAAiE,CAAC;AAE1G,wFAAwF;AACxF,eAAO,MAAM,8BAA8B,kCAAkC,CAAC;AAE9E,yCAAyC;AACzC,eAAO,MAAM,4BAA4B,SAAS,CAAC;AAEnD,+DAA+D;AAC/D,eAAO,MAAM,gCAAgC,oCAAoC,CAAC;AAElF,qEAAqE;AACrE,eAAO,MAAM,0BAA0B,QAAoF,CAAC;AAE5H,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,QAAoF,CAAC"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { cn as e } from "../../../lib/cn.js";
|
|
3
3
|
import { typographyClass as t } from "../../../lib/typography.js";
|
|
4
|
-
import { cardLayoutBodyOccupantInsetXClasses as n,
|
|
4
|
+
import { cardLayoutBodyOccupantInsetXClasses as n, cardLayoutSectionInsetXClasses as r } from "../../molecules/Card/cardStyles.js";
|
|
5
5
|
//#region src/components/organisms/ChatDock/chatDockGateStyles.ts
|
|
6
|
-
var i = "flex
|
|
6
|
+
var i = "flex h-full min-h-0 flex-col outline-none", a = "h-full min-h-0", o = "overscroll-contain", s = e(n, "flex flex-col gap-3 pb-1"), c = e(t("caption"), "px-1 text-muted tabular-nums"), l = "flex w-full shrink-0 flex-col", u = "pt-3", d = "ml-auto flex items-center gap-2", f = e(r, t("caption"), "pt-3 text-muted"), p = e(r, t("caption"), "pt-3 text-error");
|
|
7
7
|
//#endregion
|
|
8
|
-
export { a as chatDockGateCardClasses, i as chatDockGateClasses,
|
|
8
|
+
export { o as chatDockGateBodyClasses, a as chatDockGateCardClasses, i as chatDockGateClasses, p as chatDockGateErrorClasses, d as chatDockGateFooterActionsClasses, l as chatDockGateFooterBlockClasses, u as chatDockGateFooterRowClasses, s as chatDockGateOccupantClasses, f as chatDockGatePendingClasses, c as chatDockGateProgressClasses };
|
|
@@ -12,6 +12,10 @@ export type ChatDockPlacement = (typeof chatDockPlacements)[number];
|
|
|
12
12
|
export declare const chatDockRootClasses: Record<ChatDockPlacement, string>;
|
|
13
13
|
/** While the window is on screen, phones lift the dock above **SiteNav**: the window fills the screen. */
|
|
14
14
|
export declare const chatDockRootRaisedClasses = "max-md:z-[60]";
|
|
15
|
+
/** While a gate fills the window, the dock and its scrim sit above **SiteNav** on every screen. */
|
|
16
|
+
export declare const chatDockRootModalClasses = "z-[60]";
|
|
17
|
+
/** The scrim behind a gate — the `--color-overlay` token over the whole page. A click on it folds the window. */
|
|
18
|
+
export declare const chatDockScrimClasses = "pointer-events-auto fixed inset-0 bg-overlay";
|
|
15
19
|
/** The dock's column — the page grid narrowed to the composer width. */
|
|
16
20
|
export declare const chatDockGridClasses = "grid-page [--grid-max:40rem]";
|
|
17
21
|
/** The dock: suggestion pills, the window behind the composer, and the composer. */
|
|
@@ -82,10 +86,12 @@ export declare const chatDockFollowUpRowClasses = "flex min-h-11 md:min-h-9";
|
|
|
82
86
|
export declare const chatDockFollowUpsComposerClasses: string;
|
|
83
87
|
/** The composer — on top of the window, in the same place whether the window is open or not. */
|
|
84
88
|
export declare const chatDockComposerClasses = "relative";
|
|
85
|
-
/**
|
|
86
|
-
export declare const
|
|
87
|
-
/**
|
|
88
|
-
|
|
89
|
+
/** The conversation or the composer once it has faded out behind a gate: kept in place, out of reach. */
|
|
90
|
+
export declare const chatDockComposerHiddenClasses = "invisible";
|
|
91
|
+
/**
|
|
92
|
+
* The gate's layer — the whole window. On phones the footer clears the home indicator.
|
|
93
|
+
*/
|
|
94
|
+
export declare const chatDockGateLayerClasses: Record<ChatDockPlacement, string>;
|
|
89
95
|
/**
|
|
90
96
|
* The brand mark at the start of the resting composer. It folds to nothing while the window is open
|
|
91
97
|
* (the header shows the mark), so the field starts where a composer without a mark starts.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatDockStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockStyles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,8BAA+B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAIjE,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,+CAA+C,CAAC;AAEhF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAIhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAO/B,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAOnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,yFAAyF,CAAC;AAEnI;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAIjC,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,+BAA+B,QAAyC,CAAC;AAEtF,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,oCAAoC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAKvC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AAExE,+IAA+I;AAC/I,eAAO,MAAM,2BAA2B,6CAA6C,CAAC;AAEtF,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,QAA4D,CAAC;AAElG,+GAA+G;AAC/G,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,QAGzC,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,eAAO,MAAM,8BAA8B,qBAAqB,CAAC;AAEjE,6GAA6G;AAC7G,eAAO,MAAM,8BAA8B,wBAAwB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE,4GAA4G;AAC5G,eAAO,MAAM,gCAAgC,QAAsE,CAAC;AAEpH,gGAAgG;AAChG,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,
|
|
1
|
+
{"version":3,"file":"chatDockStyles.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockStyles.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,kBAAkB,8BAA+B,CAAC;AAE/D;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAIjE,CAAC;AAEF,0GAA0G;AAC1G,eAAO,MAAM,yBAAyB,kBAAkB,CAAC;AAEzD,mGAAmG;AACnG,eAAO,MAAM,wBAAwB,WAAW,CAAC;AAEjD,iHAAiH;AACjH,eAAO,MAAM,oBAAoB,iDAAiD,CAAC;AAEnF,wEAAwE;AACxE,eAAO,MAAM,mBAAmB,iCAAiC,CAAC;AAElE,oFAAoF;AACpF,eAAO,MAAM,mBAAmB,+CAA+C,CAAC;AAEhF,8EAA8E;AAC9E,eAAO,MAAM,wBAAwB,UAAU,CAAC;AAEhD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAIhC,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,QAO/B,CAAC;AAIF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAOnE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,yFAAyF,CAAC;AAEnI;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAIjC,CAAC;AAEF,iDAAiD;AACjD,eAAO,MAAM,+BAA+B,QAAyC,CAAC;AAEtF,4EAA4E;AAC5E,eAAO,MAAM,oBAAoB,oCAAoC,CAAC;AAEtE;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,QAKvC,CAAC;AAEF,mFAAmF;AACnF,eAAO,MAAM,kCAAkC,wBAAwB,CAAC;AAExE,+IAA+I;AAC/I,eAAO,MAAM,2BAA2B,6CAA6C,CAAC;AAEtF,qDAAqD;AACrD,eAAO,MAAM,wBAAwB,QAA4D,CAAC;AAElG,+GAA+G;AAC/G,eAAO,MAAM,0BAA0B,QAGtC,CAAC;AAEF,eAAO,MAAM,uBAAuB,QAGnC,CAAC;AAEF,4EAA4E;AAC5E,eAAO,MAAM,6BAA6B,QAGzC,CAAC;AAEF,kEAAkE;AAClE,eAAO,MAAM,mCAAmC,QAG/C,CAAC;AAEF,eAAO,MAAM,8BAA8B,qBAAqB,CAAC;AAEjE,6GAA6G;AAC7G,eAAO,MAAM,8BAA8B,wBAAwB,CAAC;AAEpE;;;GAGG;AACH,eAAO,MAAM,0BAA0B,6BAA6B,CAAC;AAErE,4GAA4G;AAC5G,eAAO,MAAM,gCAAgC,QAAsE,CAAC;AAEpH,gGAAgG;AAChG,eAAO,MAAM,uBAAuB,aAAa,CAAC;AAElD,yGAAyG;AACzG,eAAO,MAAM,6BAA6B,cAAc,CAAC;AAEzD;;GAEG;AACH,eAAO,MAAM,wBAAwB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAGtE,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,mBAAmB,0CAA0C,CAAC;AAE3E,+FAA+F;AAC/F,eAAO,MAAM,yBAAyB,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAGvE,CAAC;AAEF,4FAA4F;AAC5F,eAAO,MAAM,iCAAiC,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAG/E,CAAC"}
|
|
@@ -7,15 +7,18 @@ import { cardLayoutSectionInsetXClasses as r } from "../../molecules/Card/cardSt
|
|
|
7
7
|
var i = ["fixed", "inline"], a = {
|
|
8
8
|
fixed: "pointer-events-none fixed inset-x-0 bottom-[var(--chat-dock-vv-bottom,0px)] z-40 pb-[max(1rem,env(safe-area-inset-bottom))]",
|
|
9
9
|
inline: "relative flex min-h-[32rem] w-full flex-col justify-end"
|
|
10
|
-
}, o = "max-md:z-[60]", s = "grid-page [--grid-max:40rem]",
|
|
11
|
-
fixed: e(
|
|
12
|
-
inline: e(
|
|
13
|
-
},
|
|
10
|
+
}, o = "max-md:z-[60]", s = "z-[60]", c = "pointer-events-auto fixed inset-0 bg-overlay", l = "grid-page [--grid-max:40rem]", u = "pointer-events-auto relative col-span-full", d = "group", f = e("absolute inset-x-0 bottom-full flex flex-wrap justify-center gap-2 pb-3", "invisible group-hover:visible transition-[visibility]", n("fast")), p = e("inline-flex translate-y-2 opacity-0", "group-hover:translate-y-0 group-hover:opacity-100", "group-hover:[transition-delay:calc(var(--motion-stagger)*var(--chat-dock-pill-index,0))]", "motion-reduce:translate-y-0", "transition-[opacity,transform]", n("fast")), m = "overflow-hidden bg-surface font-sans text-fg shadow-soft-card", h = {
|
|
11
|
+
fixed: e(m, "fixed inset-x-0 top-[var(--chat-dock-vv-top,0px)] bottom-[var(--chat-dock-vv-bottom,0px)] rounded-none", "md:absolute md:top-auto md:bottom-0"),
|
|
12
|
+
inline: e(m, "absolute inset-x-0 bottom-0")
|
|
13
|
+
}, g = "flex h-full flex-col gap-3 pt-4 pb-[calc(var(--chat-dock-composer,3.25rem)+0.75rem)]", _ = e(r, "flex min-h-0 flex-1 flex-col gap-4 overflow-y-auto overscroll-contain pb-2", "outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-focus-ring"), v = e(t("body"), "text-fg"), y = "group/reply flex flex-col gap-1", b = e("flex min-h-11 items-center gap-1 md:min-h-9", "[@media(hover:hover)]:group-[:not(:hover,:focus-within)]/reply:opacity-0", "transition-[opacity,visibility]", n("fast")), x = "invisible opacity-0", S = "-ms-3 flex items-center gap-1 md:-ms-2.5", C = e(t("caption"), "text-muted tabular-nums"), w = e(t("body"), "ml-auto max-w-[85%] rounded-[var(--radius-card-body)] bg-brand-tint px-3.5 py-2 text-fg"), T = e(t("caption"), "flex items-center gap-2 text-muted"), E = e(r, "flex shrink-0 flex-col gap-1 border-t border-border pt-3"), D = e(t("body"), "flex min-w-0 items-center gap-3 text-muted"), O = "min-w-0 truncate", k = "-mt-2 flex flex-col", A = "flex min-h-11 md:min-h-9", j = e(r, "flex shrink-0 flex-wrap gap-2"), M = "relative", N = "invisible", P = {
|
|
14
|
+
fixed: "absolute inset-0 flex flex-col max-md:pb-[env(safe-area-inset-bottom,0px)]",
|
|
15
|
+
inline: "absolute inset-0 flex flex-col"
|
|
16
|
+
}, F = "flex h-9 items-center overflow-hidden", I = {
|
|
14
17
|
fixed: e(t("caption"), "pt-2 text-center text-muted md:pb-3"),
|
|
15
18
|
inline: e(t("caption"), "pt-2 pb-3 text-center text-muted")
|
|
16
|
-
},
|
|
19
|
+
}, L = {
|
|
17
20
|
fixed: "md:h-4",
|
|
18
21
|
inline: "h-4"
|
|
19
22
|
};
|
|
20
23
|
//#endregion
|
|
21
|
-
export {
|
|
24
|
+
export { v as chatDockAssistantMessageClasses, M as chatDockComposerClasses, L as chatDockComposerFootSpacerClasses, N as chatDockComposerHiddenClasses, I as chatDockDisclaimerClasses, u as chatDockDockClasses, d as chatDockDockHoverClasses, A as chatDockFollowUpRowClasses, j as chatDockFollowUpsComposerClasses, k as chatDockFollowUpsInlineClasses, P as chatDockGateLayerClasses, l as chatDockGridClasses, F as chatDockMarkClasses, p as chatDockPillClasses, f as chatDockPillsClasses, i as chatDockPlacements, b as chatDockReplyActionsClasses, x as chatDockReplyActionsPendingClasses, S as chatDockReplyButtonsClasses, y as chatDockReplyClasses, C as chatDockReplyMetaClasses, a as chatDockRootClasses, s as chatDockRootModalClasses, o as chatDockRootRaisedClasses, c as chatDockScrimClasses, O as chatDockSuggestionLabelClasses, E as chatDockSuggestionListClasses, D as chatDockSuggestionRowContentClasses, T as chatDockThinkingClasses, _ as chatDockThreadClasses, w as chatDockUserMessageClasses, h as chatDockWindowClasses, g as chatDockWindowContentClasses };
|
|
@@ -18,4 +18,10 @@ export declare function chatDockVisibleArea(layoutHeight: number, visual: {
|
|
|
18
18
|
} | null | undefined): ChatDockVisibleArea;
|
|
19
19
|
/** The visible area while `active` (the phone window is on screen); zero otherwise. */
|
|
20
20
|
export declare function useChatDockVisibleArea(active: boolean): ChatDockVisibleArea;
|
|
21
|
+
/**
|
|
22
|
+
* Reduced motion, from the reader's setting or `MotionConfig reducedMotion="always"`. The server and
|
|
23
|
+
* the hydration render read the setting as off, so the closed window's inline style matches the
|
|
24
|
+
* server's; it switches right after. Closed, the window is hidden, so the switch never shows.
|
|
25
|
+
*/
|
|
26
|
+
export declare function useChatDockReducedMotion(config: string | undefined): boolean;
|
|
21
27
|
//# sourceMappingURL=chatDockViewport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"chatDockViewport.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockViewport.ts"],"names":[],"mappings":"AAEA,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,2GAA2G;AAC3G,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAa1E;AAMD,2GAA2G;AAC3G,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,yFAAyF;AACzF,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/D,mBAAmB,CAKrB;AAOD,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB,CAK3E"}
|
|
1
|
+
{"version":3,"file":"chatDockViewport.d.ts","sourceRoot":"","sources":["../../../../src/components/organisms/ChatDock/chatDockViewport.ts"],"names":[],"mappings":"AAEA,wGAAwG;AACxG,eAAO,MAAM,iBAAiB,uBAAuB,CAAC;AAEtD,2GAA2G;AAC3G,wBAAgB,yBAAyB,CAAC,QAAQ,EAAE,MAAM,IAAI,GAAG,MAAM,IAAI,CAa1E;AAMD,2GAA2G;AAC3G,wBAAgB,eAAe,IAAI,OAAO,CAEzC;AAED,yFAAyF;AACzF,MAAM,WAAW,mBAAmB;IAClC,0FAA0F;IAC1F,GAAG,EAAE,MAAM,CAAC;IACZ,sCAAsC;IACtC,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,gFAAgF;AAChF,wBAAgB,mBAAmB,CACjC,YAAY,EAAE,MAAM,EACpB,MAAM,EAAE;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,GAAG,SAAS,GAC/D,mBAAmB,CAKrB;AAOD,uFAAuF;AACvF,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,OAAO,GAAG,mBAAmB,CAK3E;AAeD;;;;GAIG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAG5E"}
|
|
@@ -42,5 +42,18 @@ function s(t) {
|
|
|
42
42
|
bottom: a ?? 0
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
+
var c = "(prefers-reduced-motion: reduce)";
|
|
46
|
+
function l(e) {
|
|
47
|
+
if (typeof window.matchMedia != "function") return () => void 0;
|
|
48
|
+
let t = window.matchMedia(c);
|
|
49
|
+
return t.addEventListener("change", e), () => t.removeEventListener("change", e);
|
|
50
|
+
}
|
|
51
|
+
function u() {
|
|
52
|
+
return typeof window.matchMedia == "function" && window.matchMedia(c).matches;
|
|
53
|
+
}
|
|
54
|
+
function d(t) {
|
|
55
|
+
let n = e(l, u, () => !1);
|
|
56
|
+
return t === "always" || t !== "never" && n;
|
|
57
|
+
}
|
|
45
58
|
//#endregion
|
|
46
|
-
export { a as chatDockVisibleArea, t as chatDockWideQuery, n as subscribeChatDockViewport, s as useChatDockVisibleArea, i as useChatDockWide };
|
|
59
|
+
export { a as chatDockVisibleArea, t as chatDockWideQuery, n as subscribeChatDockViewport, d as useChatDockReducedMotion, s as useChatDockVisibleArea, i as useChatDockWide };
|