@crewlethq/ui 0.75.3 → 0.76.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 +15 -1
- package/dist/AgentHandoffPanel/index.js +4 -4
- package/dist/AppShell/index.js +3 -3
- package/dist/ArrangeList/index.js +4 -4
- package/dist/ArtifactBar/index.js +6 -6
- package/dist/ArtifactCard/index.js +4 -4
- package/dist/ArtifactPanel/index.js +1 -1
- package/dist/AttachmentChip/index.js +3 -3
- package/dist/AvatarPicker/index.js +7 -7
- package/dist/BriefCard/index.js +4 -4
- package/dist/Canvas/index.js +2 -2
- package/dist/CanvasBoard/index.js +4 -4
- package/dist/CanvasToolbar/index.js +3 -3
- package/dist/ChangeList/index.js +3 -3
- package/dist/Checkbox/index.js +3 -3
- package/dist/ChoiceButtons/ChoiceButtons.d.ts +10 -3
- package/dist/ChoiceButtons/index.js +1 -1
- package/dist/{ChoiceButtons-3MJQAHHA.css → ChoiceButtons-T3GG6VLG.css} +44 -48
- package/dist/ChoiceCards/ChoiceCards.d.ts +80 -0
- package/dist/ChoiceCards/index.d.ts +3 -0
- package/dist/ChoiceCards/index.js +3 -0
- package/dist/ChoiceCards-HAGJMK6Q.css +318 -0
- package/dist/ChoiceList/ChoiceList.d.ts +10 -1
- package/dist/ChoiceList/index.js +1 -1
- package/dist/{ChoiceList-Q772QLFX.css → ChoiceList-JN4PPNFW.css} +22 -1
- package/dist/ColorField/index.js +3 -3
- package/dist/Combobox/index.js +3 -3
- package/dist/CommandPalette/index.js +3 -3
- package/dist/CommentThread/index.js +5 -5
- package/dist/Composer/index.js +3 -3
- package/dist/ConfirmField/index.js +3 -3
- package/dist/ContrastBadge/index.js +3 -3
- package/dist/ContrastHelp/index.js +5 -5
- package/dist/DataGrid/index.js +4 -4
- package/dist/DataTable/index.js +5 -5
- package/dist/DataView/index.js +8 -8
- package/dist/DatasetSource/index.js +3 -3
- package/dist/DateTimePicker/index.js +2 -2
- package/dist/DeepWorkCard/index.js +5 -5
- package/dist/DocTabsEditor/index.js +4 -4
- package/dist/EditingStatus/index.js +2 -2
- package/dist/{Editor-OLFAUSUA.js → Editor-BXOWAV46.js} +3 -3
- package/dist/EntityList/index.js +4 -4
- package/dist/HuePicker/index.js +6 -6
- package/dist/InlineEditor/index.js +3 -3
- package/dist/Input/index.js +2 -2
- package/dist/{Input-GEFFMKBS.css → Input-WSMB7JG2.css} +6 -1
- package/dist/LinkInterstitial/index.js +1 -1
- package/dist/ListInput/index.js +3 -3
- package/dist/LogoSlot/index.js +4 -4
- package/dist/MarkdownEditor/index.js +6 -6
- package/dist/Menu/index.js +2 -2
- package/dist/MergeConflicts/index.js +6 -6
- package/dist/Modal/index.js +1 -1
- package/dist/OpenInAppCard/index.js +5 -5
- package/dist/OrgTable/index.js +1 -1
- package/dist/PresenterView/index.js +1 -1
- package/dist/PricingCard/index.js +3 -3
- package/dist/PrincipalPicker/index.js +4 -4
- package/dist/ProposalCard/index.js +8 -8
- package/dist/RefusalCard/index.js +4 -4
- package/dist/ResultTableCard/index.js +4 -4
- package/dist/ReviewList/index.js +3 -3
- package/dist/RichEditor/index.js +1 -1
- package/dist/RunChip/index.js +3 -3
- package/dist/SegmentedControl/index.js +5 -5
- package/dist/SettingsTable/index.js +2 -2
- package/dist/SetupWizard/SetupWizard.d.ts +25 -7
- package/dist/SetupWizard/index.js +3 -3
- package/dist/{SetupWizard-WDOFFNIM.css → SetupWizard-2SUMQEWU.css} +126 -4
- package/dist/ShareDialog/index.js +2 -2
- package/dist/SheetColumnEditor/index.js +9 -9
- package/dist/SheetGrid/index.js +5 -5
- package/dist/SidePanel/index.js +1 -1
- package/dist/SlideFilmstrip/index.js +3 -3
- package/dist/StatusCard/index.js +3 -3
- package/dist/StatusDot/StatusDot.d.ts +7 -0
- package/dist/StatusDot/index.js +1 -1
- package/dist/{StatusDot-7OMCQCZF.css → StatusDot-FJND3CZY.css} +9 -2
- package/dist/Stepper/index.js +2 -2
- package/dist/{Stepper-32INSYF7.css → Stepper-YQBNYCIS.css} +31 -8
- package/dist/Switcher/index.js +3 -3
- package/dist/TableCells/index.js +3 -3
- package/dist/Tabs/index.js +4 -4
- package/dist/Tag/index.js +2 -2
- package/dist/TagsInput/index.js +4 -4
- package/dist/ThemeGallery/index.js +3 -3
- package/dist/ThemeSwitcher/index.js +6 -6
- package/dist/TimeRangePicker/index.js +7 -7
- package/dist/TimeWindowPicker/index.js +3 -3
- package/dist/TreeCanvas/index.js +3 -3
- package/dist/TreeGrid/index.js +1 -1
- package/dist/ValueField/index.js +4 -4
- package/dist/VersionCompare/index.js +6 -6
- package/dist/{chunk-3N36CYTU.js → chunk-2PIH6JHJ.js} +1 -1
- package/dist/{chunk-HDF4OGVD.js → chunk-2STOSJT3.js} +3 -3
- package/dist/{chunk-P64MIA7C.js → chunk-3JXX5S3Z.js} +2 -2
- package/dist/{chunk-UHW7EXWQ.js → chunk-45M73G5A.js} +1 -1
- package/dist/{chunk-5JPID3YI.js → chunk-57AKYFML.js} +1 -1
- package/dist/{chunk-4KSCGXLJ.js → chunk-5BOFC5OP.js} +2 -2
- package/dist/{chunk-SAUIIBNA.js → chunk-5CEQ3HLH.js} +1 -1
- package/dist/{chunk-VLGGLLKH.js → chunk-624X3RVA.js} +1 -1
- package/dist/{chunk-LWFOX3PB.js → chunk-63GBSOLU.js} +1 -1
- package/dist/{chunk-IQQSMK4E.js → chunk-6EWNMSS4.js} +1 -1
- package/dist/{chunk-7IW3P6FH.js → chunk-6G6WHTC7.js} +1 -1
- package/dist/{chunk-JXJNX7QQ.js → chunk-6LXS3X7A.js} +1 -1
- package/dist/{chunk-NQABJAUY.js → chunk-6RW2MUTY.js} +15 -8
- package/dist/{chunk-ZD52GKKS.js → chunk-6THG44LI.js} +2 -2
- package/dist/{chunk-KWLH45YC.js → chunk-7PJFUQMY.js} +1 -1
- package/dist/{chunk-5M64E3HV.js → chunk-ADGNISEI.js} +2 -2
- package/dist/{chunk-WQRSZMN4.js → chunk-BBD7PTBG.js} +1 -1
- package/dist/{chunk-PYJLHHYF.js → chunk-BKXUZCZX.js} +1 -1
- package/dist/{chunk-6RTYHTT7.js → chunk-CFTBESST.js} +1 -1
- package/dist/{chunk-WIATRXEJ.js → chunk-CYQBDZ6M.js} +1 -1
- package/dist/{chunk-ZKIEOWR6.js → chunk-D7G2QGET.js} +1 -1
- package/dist/{chunk-K2RJO72E.js → chunk-DSMQTED5.js} +3 -3
- package/dist/{chunk-OXEWUAND.js → chunk-E35HYQMK.js} +1 -1
- package/dist/{chunk-DCQ2VTBB.js → chunk-FB3TCNQP.js} +2 -2
- package/dist/{chunk-ODAZIKZF.js → chunk-FQI62PIZ.js} +2 -2
- package/dist/{chunk-IU5J6BY5.js → chunk-GHQG4VZA.js} +3 -3
- package/dist/{chunk-PIAGTZY3.js → chunk-GPFYITOF.js} +1 -1
- package/dist/{chunk-R6K62EXV.js → chunk-H22SR76M.js} +1 -1
- package/dist/{chunk-IO374IX6.js → chunk-HQOEAUDJ.js} +1 -1
- package/dist/{chunk-HKSQ7QHF.js → chunk-HWPP22XG.js} +4 -4
- package/dist/{chunk-ILF6KVNK.js → chunk-HZDI2CCS.js} +2 -2
- package/dist/{chunk-ZSRRCXUD.js → chunk-I3G5FJ54.js} +1 -1
- package/dist/{chunk-5NFYTQK2.js → chunk-IPBSCJIZ.js} +3 -3
- package/dist/{chunk-GAT75MN4.js → chunk-IQMWMT4V.js} +2 -2
- package/dist/{chunk-GT2OG2XM.js → chunk-JMTBK55P.js} +2 -2
- package/dist/{chunk-VDIKDCNE.js → chunk-JQEXAH7G.js} +1 -1
- package/dist/{chunk-SQ7GYC4K.js → chunk-KL6A7JGH.js} +1 -1
- package/dist/{chunk-TQCSQRKQ.js → chunk-LCZULGMB.js} +1 -1
- package/dist/{chunk-EAR2F5OA.js → chunk-LMQG3VPG.js} +1 -1
- package/dist/chunk-MKFEVHSR.js +83 -0
- package/dist/{chunk-W7OJKHVR.js → chunk-MP7DGKB6.js} +1 -1
- package/dist/{chunk-DO4J4TBZ.js → chunk-NKBKQEKS.js} +1 -1
- package/dist/{chunk-USO73ZJM.js → chunk-OCGIQGYJ.js} +2 -2
- package/dist/{chunk-5U2CYMFU.js → chunk-OOLMTUCO.js} +1 -1
- package/dist/{chunk-YUHKRRWO.js → chunk-OWHETZIU.js} +1 -1
- package/dist/{chunk-4OX2WVXO.js → chunk-PMBJMNBX.js} +1 -1
- package/dist/{chunk-OXB45TG2.js → chunk-RIAPCEB5.js} +2 -2
- package/dist/{chunk-HJBHP66O.js → chunk-RJWO2PC5.js} +2 -2
- package/dist/{chunk-NTQPJJAN.js → chunk-RTMNULTL.js} +1 -1
- package/dist/{chunk-C3SCONKY.js → chunk-RVSNBUIU.js} +4 -2
- package/dist/{chunk-SRDZVY5M.js → chunk-SK5SLGZH.js} +1 -1
- package/dist/{chunk-CMTLQOJY.js → chunk-T24HBEU6.js} +1 -1
- package/dist/{chunk-EEVATVP5.js → chunk-TJIBTHWJ.js} +2 -2
- package/dist/{chunk-GAUBP247.js → chunk-TKUAGWNR.js} +1 -1
- package/dist/{chunk-HMOGLAXY.js → chunk-TPCBPGSB.js} +1 -1
- package/dist/{chunk-CFXDWGQI.js → chunk-TPIMOGOZ.js} +1 -1
- package/dist/{chunk-HDLUG3MA.js → chunk-UY3FWQWG.js} +2 -2
- package/dist/{chunk-RQHN4J5P.js → chunk-UYF2B2TH.js} +1 -1
- package/dist/{chunk-I5OIKDX2.js → chunk-VERJCAJ4.js} +1 -1
- package/dist/{chunk-PKVWCKS2.js → chunk-VG3SIJ3M.js} +1 -1
- package/dist/{chunk-BAHLBMCH.js → chunk-WK4FQPYW.js} +2 -2
- package/dist/{chunk-4RKTZSEW.js → chunk-WL4TC4YZ.js} +1 -1
- package/dist/{chunk-SBHAKX2T.js → chunk-X5FKORDM.js} +72 -9
- package/dist/{chunk-4DL2BQJE.js → chunk-YL7AR6PR.js} +1 -1
- package/dist/{chunk-TF74KS36.js → chunk-YQDRJZ5J.js} +1 -1
- package/dist/{chunk-7OFVR7X4.js → chunk-ZKLEAK7M.js} +1 -1
- package/dist/{chunk-OUUHIA3B.js → chunk-ZMIVQGAB.js} +4 -4
- package/dist/{chunk-352FPJ2Q.js → chunk-ZW5SRQ5M.js} +1 -1
- package/dist/generated/index.d.ts +1 -0
- package/dist/generated/index.js +94 -93
- package/dist/index.js +94 -93
- package/dist/styles.css +565 -70
- package/package.json +3 -3
- package/dist/{chunk-SWLVR54P.js → chunk-HPI5J6AR.js} +1 -1
- package/dist/{chunk-EMCVX5FY.js → chunk-OBPINJNO.js} +1 -1
- package/dist/{chunk-KNAHKQD4.js → chunk-OQG4P5KU.js} +1 -1
- /package/dist/{chunk-TWM6G2I2.js → chunk-PCBPDMNU.js} +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useThemePreference, useDensityPreference } from './chunk-Z24ZUSTX.js';
|
|
2
|
-
import { SegmentedControl } from './chunk-
|
|
2
|
+
import { SegmentedControl } from './chunk-BKXUZCZX.js';
|
|
3
3
|
import { SunGlyph, MonitorGlyph, MoonGlyph } from '@crewlethq/icons/glyphs';
|
|
4
4
|
import { jsx } from 'react/jsx-runtime';
|
|
5
5
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Select } from './chunk-VK45YJLH.js';
|
|
2
2
|
import { today, shiftMonth, CalendarGrid, compareDays } from './chunk-EE3DJMSQ.js';
|
|
3
3
|
import { Popover } from './chunk-KHJIEPZV.js';
|
|
4
|
-
import { Input } from './chunk-
|
|
4
|
+
import { Input } from './chunk-FB3TCNQP.js';
|
|
5
5
|
import { Button } from './chunk-DGXZ635L.js';
|
|
6
6
|
import { isComposing } from './chunk-H5XTJ7GJ.js';
|
|
7
|
-
import { useFocusModality } from './chunk-NUZHC6MM.js';
|
|
8
7
|
import { IconButton } from './chunk-UAUP6XGK.js';
|
|
8
|
+
import { useFocusModality } from './chunk-NUZHC6MM.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
10
10
|
import './TimeWindowPicker-YZPKNZZI.css';
|
|
11
11
|
import { useMemo, useState, useRef, useId, useEffect } from 'react';
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { StatusDot } from './chunk-
|
|
1
|
+
import { StatusDot } from './chunk-CYQBDZ6M.js';
|
|
2
2
|
import { Spinner } from './chunk-XSPCITPN.js';
|
|
3
3
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
4
4
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
5
|
-
import './Stepper-
|
|
5
|
+
import './Stepper-YQBNYCIS.css';
|
|
6
6
|
import './StepList-A4YVU4JI.css';
|
|
7
7
|
import { CircleCheckGlyph, CircleAlertGlyph, LockGlyph, CircleStopGlyph, ClockGlyph, CheckGlyph, TriangleAlertGlyph } from '@crewlethq/icons/glyphs';
|
|
8
8
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
2
2
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
3
|
-
import './ChoiceButtons-
|
|
3
|
+
import './ChoiceButtons-T3GG6VLG.css';
|
|
4
4
|
import { useId } from 'react';
|
|
5
|
+
import { CheckGlyph } from '@crewlethq/icons/glyphs';
|
|
5
6
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
6
7
|
|
|
7
8
|
function ChoiceButtons({
|
|
@@ -65,7 +66,8 @@ function ChoiceButtons({
|
|
|
65
66
|
isRecommended ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
66
67
|
" ",
|
|
67
68
|
/* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__note", children: recommendedLabel })
|
|
68
|
-
] }) : null
|
|
69
|
+
] }) : null,
|
|
70
|
+
isChosen ? /* @__PURE__ */ jsx("span", { className: "crewlet-choice-buttons__check", "aria-hidden": "true", children: /* @__PURE__ */ jsx(CheckGlyph, {}) }) : null
|
|
69
71
|
]
|
|
70
72
|
},
|
|
71
73
|
option.value
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { normalizeHex, parseColourInput } from './chunk-7W3LYIOC.js';
|
|
2
|
-
import { FormField, Input, InputAffix } from './chunk-
|
|
2
|
+
import { FormField, Input, InputAffix } from './chunk-FB3TCNQP.js';
|
|
3
3
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
4
4
|
import './ColorField-2OIOWT3Z.css';
|
|
5
5
|
import { useId, useState } from 'react';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useReorder } from './chunk-MPVMB2DV.js';
|
|
2
|
-
import { Input } from './chunk-
|
|
3
|
-
import { Menu } from './chunk-
|
|
2
|
+
import { Input } from './chunk-FB3TCNQP.js';
|
|
3
|
+
import { Menu } from './chunk-OQG4P5KU.js';
|
|
4
4
|
import { IconButton } from './chunk-UAUP6XGK.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Switch } from './chunk-3XDT5ZWL.js';
|
|
2
2
|
import { useReorder } from './chunk-MPVMB2DV.js';
|
|
3
|
-
import { Checkbox } from './chunk-
|
|
3
|
+
import { Checkbox } from './chunk-LMQG3VPG.js';
|
|
4
4
|
import { IconButton } from './chunk-UAUP6XGK.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SlideStage } from './chunk-RMEBFYL7.js';
|
|
2
2
|
import { useReorder } from './chunk-MPVMB2DV.js';
|
|
3
3
|
import { Kbd, isApplePlatform } from './chunk-ANTAQAR4.js';
|
|
4
|
-
import { Menu } from './chunk-
|
|
4
|
+
import { Menu } from './chunk-OQG4P5KU.js';
|
|
5
5
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
7
|
import './SlideFilmstrip-BLGBCLEU.css';
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
2
|
-
import { Menu } from './chunk-
|
|
2
|
+
import { Menu } from './chunk-OQG4P5KU.js';
|
|
3
3
|
import { PeekContext, AsideContext, ResizeHandle, clampSize } from './chunk-PIYJNCN7.js';
|
|
4
4
|
import { HIT_AREA_CLASS } from './chunk-2YTOOH3A.js';
|
|
5
5
|
import { focusables, useModalLayer, isComposing, layerCount } from './chunk-H5XTJ7GJ.js';
|
|
6
|
-
import { returnFocus } from './chunk-NUZHC6MM.js';
|
|
7
6
|
import { IconButton } from './chunk-UAUP6XGK.js';
|
|
7
|
+
import { returnFocus } from './chunk-NUZHC6MM.js';
|
|
8
8
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
9
9
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
10
10
|
import './HitArea-QUOS6ZDJ.css';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Link } from './chunk-QF5UNP4T.js';
|
|
2
|
-
import { Tag } from './chunk-
|
|
2
|
+
import { Tag } from './chunk-VERJCAJ4.js';
|
|
3
3
|
import { RelativeTime } from './chunk-EJNJMHQG.js';
|
|
4
4
|
import { EmptyValue } from './chunk-RE3FBGQQ.js';
|
|
5
5
|
import { Avatar } from './chunk-KTIQSSME.js';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { useListbox } from './chunk-7KHM2FZH.js';
|
|
2
|
-
import { Tag } from './chunk-
|
|
2
|
+
import { Tag } from './chunk-VERJCAJ4.js';
|
|
3
3
|
import { announce } from './chunk-2G355KDJ.js';
|
|
4
4
|
import { isComposing } from './chunk-H5XTJ7GJ.js';
|
|
5
|
-
import { useFocusModality } from './chunk-NUZHC6MM.js';
|
|
6
5
|
import { IconButton } from './chunk-UAUP6XGK.js';
|
|
6
|
+
import { useFocusModality } from './chunk-NUZHC6MM.js';
|
|
7
7
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
8
8
|
import './TagsInput-MZXEHKJD.css';
|
|
9
9
|
import { forwardRef, useState, useRef, useId, useImperativeHandle, useEffect, useMemo, useLayoutEffect } from 'react';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { Stepper } from './chunk-
|
|
1
|
+
import { Stepper } from './chunk-RJWO2PC5.js';
|
|
2
2
|
import { PageHeader } from './chunk-FPDIHEM4.js';
|
|
3
3
|
import { Disclosure } from './chunk-222VILSP.js';
|
|
4
4
|
import { useHeadingLevel, nextHeadingLevel, headingTag, HeadingLevelProvider } from './chunk-PQADV6P6.js';
|
|
5
5
|
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
6
6
|
import { cx } from './chunk-ODEQTPFM.js';
|
|
7
|
-
import './SetupWizard-
|
|
8
|
-
import { useId, useRef, useEffect, createElement } from 'react';
|
|
7
|
+
import './SetupWizard-2SUMQEWU.css';
|
|
8
|
+
import { useId, useRef, useState, useEffect, useCallback, createElement } from 'react';
|
|
9
9
|
import { breakpoint } from '@crewlethq/tokens';
|
|
10
10
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
11
11
|
|
|
@@ -14,6 +14,16 @@ var LABELS = {
|
|
|
14
14
|
asideToggle: "Preview"
|
|
15
15
|
};
|
|
16
16
|
var PHONE = `(width < ${breakpoint.phone})`;
|
|
17
|
+
var STILL_ROW = { overflows: false, left: false, right: false };
|
|
18
|
+
function stepRowOf(scroller) {
|
|
19
|
+
const steps = scroller.querySelectorAll("li");
|
|
20
|
+
if (steps.length === 0) return STILL_ROW;
|
|
21
|
+
const box = scroller.getBoundingClientRect();
|
|
22
|
+
const boxes = [...steps].map((step) => step.getBoundingClientRect());
|
|
23
|
+
const left = Math.min(...boxes.map((r) => r.left)) < box.left - 0.5;
|
|
24
|
+
const right = Math.max(...boxes.map((r) => r.right)) > box.right + 0.5;
|
|
25
|
+
return { overflows: scroller.scrollWidth > scroller.clientWidth + 0.5 || left || right, left, right };
|
|
26
|
+
}
|
|
17
27
|
function SetupWizard({
|
|
18
28
|
title,
|
|
19
29
|
headingLevel,
|
|
@@ -31,6 +41,7 @@ function SetupWizard({
|
|
|
31
41
|
aside,
|
|
32
42
|
asideLabel,
|
|
33
43
|
footer,
|
|
44
|
+
primaryAction,
|
|
34
45
|
footerStart,
|
|
35
46
|
wide = false,
|
|
36
47
|
labels,
|
|
@@ -45,12 +56,35 @@ function SetupWizard({
|
|
|
45
56
|
const contentLevel = nextHeadingLevel(stepLevel);
|
|
46
57
|
const headingId = useId();
|
|
47
58
|
const headingRef = useRef(null);
|
|
59
|
+
const stepsRef = useRef(null);
|
|
60
|
+
const [row, setRow] = useState(STILL_ROW);
|
|
48
61
|
const shown = useRef(current);
|
|
49
62
|
useEffect(() => {
|
|
50
63
|
if (shown.current === current) return;
|
|
51
64
|
shown.current = current;
|
|
52
65
|
headingRef.current?.focus();
|
|
53
66
|
}, [current]);
|
|
67
|
+
const measure = useCallback(() => {
|
|
68
|
+
const scroller = stepsRef.current;
|
|
69
|
+
if (!scroller) return;
|
|
70
|
+
const next = stepRowOf(scroller);
|
|
71
|
+
setRow((was) => was.overflows === next.overflows && was.left === next.left && was.right === next.right ? was : next);
|
|
72
|
+
}, []);
|
|
73
|
+
useEffect(() => {
|
|
74
|
+
if (!phone) return;
|
|
75
|
+
const scroller = stepsRef.current;
|
|
76
|
+
const here = scroller?.querySelector('[aria-current="step"]')?.closest("li");
|
|
77
|
+
if (!scroller || !here) return;
|
|
78
|
+
const box = scroller.getBoundingClientRect();
|
|
79
|
+
const step2 = here.getBoundingClientRect();
|
|
80
|
+
scroller.scrollLeft += step2.left + step2.width / 2 - (box.left + box.width / 2);
|
|
81
|
+
measure();
|
|
82
|
+
}, [phone, current, measure]);
|
|
83
|
+
useEffect(() => {
|
|
84
|
+
if (!phone) return;
|
|
85
|
+
window.addEventListener("resize", measure);
|
|
86
|
+
return () => window.removeEventListener("resize", measure);
|
|
87
|
+
}, [phone, measure]);
|
|
54
88
|
if (aside !== void 0 && aside !== null && !asideLabel) {
|
|
55
89
|
throw new TypeError("SetupWizard needs an asideLabel with an aside: it names the aside\u2019s landmark");
|
|
56
90
|
}
|
|
@@ -95,12 +129,38 @@ function SetupWizard({
|
|
|
95
129
|
)
|
|
96
130
|
] }),
|
|
97
131
|
/* @__PURE__ */ jsxs("nav", { className: "crewlet-setup-wizard__rail", "aria-label": stepsLabel, children: [
|
|
98
|
-
phone && step ? /* @__PURE__ */ jsxs(
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
132
|
+
phone && step ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
133
|
+
/* @__PURE__ */ jsxs("p", { className: "crewlet-setup-wizard__position", children: [
|
|
134
|
+
text.progress(position + 1, steps.length),
|
|
135
|
+
/* @__PURE__ */ jsx("span", { "aria-hidden": "true", children: " \xB7 " }),
|
|
136
|
+
/* @__PURE__ */ jsx("span", { className: "crewlet-setup-wizard__position-step", children: step.label })
|
|
137
|
+
] }),
|
|
138
|
+
/* @__PURE__ */ jsx(
|
|
139
|
+
"span",
|
|
140
|
+
{
|
|
141
|
+
className: "crewlet-setup-wizard__progress",
|
|
142
|
+
"aria-hidden": "true",
|
|
143
|
+
style: { "--crewlet-setup-wizard-progress": String((position + 1) / steps.length) }
|
|
144
|
+
}
|
|
145
|
+
)
|
|
102
146
|
] }) : null,
|
|
103
|
-
|
|
147
|
+
phone ? (
|
|
148
|
+
// A ROW THAT OVERFLOWS IS A SCROLLER THE KEYBOARD CAN REACH: it
|
|
149
|
+
// takes focus and a name only while it hides steps, since a pill
|
|
150
|
+
// that only labels its step takes no focus of its own.
|
|
151
|
+
/* @__PURE__ */ jsx(
|
|
152
|
+
"div",
|
|
153
|
+
{
|
|
154
|
+
ref: stepsRef,
|
|
155
|
+
className: "crewlet-setup-wizard__steps",
|
|
156
|
+
"data-fade-left": row.left ? "" : void 0,
|
|
157
|
+
"data-fade-right": row.right ? "" : void 0,
|
|
158
|
+
onScroll: measure,
|
|
159
|
+
...row.overflows ? { tabIndex: 0, role: "group", "aria-label": stepsLabel } : {},
|
|
160
|
+
children: stepper
|
|
161
|
+
}
|
|
162
|
+
)
|
|
163
|
+
) : stepper
|
|
104
164
|
] }),
|
|
105
165
|
/* @__PURE__ */ jsxs("section", { className: "crewlet-setup-wizard__content", "aria-labelledby": headingId, children: [
|
|
106
166
|
createElement(
|
|
@@ -114,7 +174,10 @@ function SetupWizard({
|
|
|
114
174
|
asideBlock === null ? null : phone ? /* @__PURE__ */ jsx(Disclosure, { className: "crewlet-setup-wizard__preview", title: text.asideToggle, headingLevel: stepLevel, children: asideBlock }) : asideBlock,
|
|
115
175
|
/* @__PURE__ */ jsxs("footer", { className: "crewlet-setup-wizard__footer", children: [
|
|
116
176
|
footerStart ? /* @__PURE__ */ jsx("div", { className: "crewlet-setup-wizard__footer-start", children: footerStart }) : null,
|
|
117
|
-
/* @__PURE__ */
|
|
177
|
+
/* @__PURE__ */ jsxs("div", { className: "crewlet-setup-wizard__footer-end", children: [
|
|
178
|
+
footer,
|
|
179
|
+
primaryAction ? /* @__PURE__ */ jsx("span", { className: "crewlet-setup-wizard__primary", children: primaryAction }) : null
|
|
180
|
+
] })
|
|
118
181
|
] })
|
|
119
182
|
] })
|
|
120
183
|
}
|
|
@@ -3,7 +3,7 @@ import { useListbox, useOptionKeys } from './chunk-7KHM2FZH.js';
|
|
|
3
3
|
import { Popover } from './chunk-KHJIEPZV.js';
|
|
4
4
|
import { KeyChip, highlightMatch } from './chunk-HBDA76EZ.js';
|
|
5
5
|
import { Skeleton } from './chunk-BRLZXYPA.js';
|
|
6
|
-
import { Input } from './chunk-
|
|
6
|
+
import { Input } from './chunk-FB3TCNQP.js';
|
|
7
7
|
import { announce } from './chunk-2G355KDJ.js';
|
|
8
8
|
import { useMediaMatch } from './chunk-RTPQDNW3.js';
|
|
9
9
|
import { focusables, isComposing } from './chunk-H5XTJ7GJ.js';
|
|
@@ -4,7 +4,7 @@ import { RelativeTime } from './chunk-EJNJMHQG.js';
|
|
|
4
4
|
import { Card } from './chunk-4AUTALJA.js';
|
|
5
5
|
import { AvatarStack } from './chunk-BT3GB7HC.js';
|
|
6
6
|
import { ArtifactKindGround } from './chunk-NHLNHH4J.js';
|
|
7
|
-
import { Checkbox } from './chunk-
|
|
7
|
+
import { Checkbox } from './chunk-LMQG3VPG.js';
|
|
8
8
|
import { ArtifactAccessGlyph } from './chunk-DOY3KC6I.js';
|
|
9
9
|
import { ArtifactKindGlyph } from './chunk-RSKW25Y5.js';
|
|
10
10
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Select } from './chunk-VK45YJLH.js';
|
|
2
2
|
import { SHEET_LABELS, SHEET_COLUMN_TYPES, optionHue, retypeColumn } from './chunk-LFSIKGRQ.js';
|
|
3
|
-
import { HueSwatch } from './chunk-
|
|
3
|
+
import { HueSwatch } from './chunk-SK5SLGZH.js';
|
|
4
4
|
import { NODE_HUES, NODE_HUE_NAMES } from './chunk-AYKXMIOR.js';
|
|
5
|
-
import { Checkbox } from './chunk-
|
|
5
|
+
import { Checkbox } from './chunk-LMQG3VPG.js';
|
|
6
6
|
import { Kbd } from './chunk-ANTAQAR4.js';
|
|
7
|
-
import { FormField, Input } from './chunk-
|
|
8
|
-
import { Menu } from './chunk-
|
|
7
|
+
import { FormField, Input } from './chunk-FB3TCNQP.js';
|
|
8
|
+
import { Menu } from './chunk-OQG4P5KU.js';
|
|
9
9
|
import { Button } from './chunk-DGXZ635L.js';
|
|
10
10
|
import { IconButton } from './chunk-UAUP6XGK.js';
|
|
11
11
|
import { VisuallyHidden } from './chunk-UT6CW3C7.js';
|
|
@@ -47,6 +47,7 @@ export * from '../Charts/index.js';
|
|
|
47
47
|
export * from '../ChatThread/index.js';
|
|
48
48
|
export * from '../Checkbox/index.js';
|
|
49
49
|
export * from '../ChoiceButtons/index.js';
|
|
50
|
+
export * from '../ChoiceCards/index.js';
|
|
50
51
|
export * from '../ChoiceList/index.js';
|
|
51
52
|
export * from '../CodeBlock/index.js';
|
|
52
53
|
export * from '../ColorChip/index.js';
|