@thewhatmatters/wmds 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +53 -0
- package/CONSUMING.md +352 -0
- package/LICENSE +21 -0
- package/README.md +65 -0
- package/bin/wmds-check.mjs +173 -0
- package/dist/cluster.css +14 -0
- package/dist/collapse.css +24 -0
- package/dist/colors.css +282 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts +22 -0
- package/dist/components/atoms/Avatar/Avatar.d.ts.map +1 -0
- package/dist/components/atoms/Avatar/Avatar.js +52 -0
- package/dist/components/atoms/Avatar/avatarStyles.d.ts +23 -0
- package/dist/components/atoms/Avatar/avatarStyles.d.ts.map +1 -0
- package/dist/components/atoms/Avatar/avatarStyles.js +48 -0
- package/dist/components/atoms/Badge/Badge.d.ts +47 -0
- package/dist/components/atoms/Badge/Badge.d.ts.map +1 -0
- package/dist/components/atoms/Badge/Badge.js +68 -0
- package/dist/components/atoms/Badge/BadgeIcon.d.ts +7 -0
- package/dist/components/atoms/Badge/BadgeIcon.d.ts.map +1 -0
- package/dist/components/atoms/Badge/BadgeIcon.js +14 -0
- package/dist/components/atoms/Badge/BadgeSegmentCount.d.ts +6 -0
- package/dist/components/atoms/Badge/BadgeSegmentCount.d.ts.map +1 -0
- package/dist/components/atoms/Badge/BadgeSegmentCount.js +13 -0
- package/dist/components/atoms/Badge/badgeStyles.d.ts +37 -0
- package/dist/components/atoms/Badge/badgeStyles.d.ts.map +1 -0
- package/dist/components/atoms/Badge/badgeStyles.js +46 -0
- package/dist/components/atoms/Button/Button.d.ts +77 -0
- package/dist/components/atoms/Button/Button.d.ts.map +1 -0
- package/dist/components/atoms/Button/Button.js +138 -0
- package/dist/components/atoms/Button/ButtonBadge.d.ts +5 -0
- package/dist/components/atoms/Button/ButtonBadge.d.ts.map +1 -0
- package/dist/components/atoms/Button/ButtonBadge.js +14 -0
- package/dist/components/atoms/Button/ButtonIcon.d.ts +8 -0
- package/dist/components/atoms/Button/ButtonIcon.d.ts.map +1 -0
- package/dist/components/atoms/Button/ButtonIcon.js +14 -0
- package/dist/components/atoms/Button/ButtonSpinner.d.ts +6 -0
- package/dist/components/atoms/Button/ButtonSpinner.d.ts.map +1 -0
- package/dist/components/atoms/Button/ButtonSpinner.js +13 -0
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts +23 -0
- package/dist/components/atoms/Button/ButtonStatusButton.d.ts.map +1 -0
- package/dist/components/atoms/Button/ButtonStatusButton.js +43 -0
- package/dist/components/atoms/Button/ButtonStatusContent.d.ts +10 -0
- package/dist/components/atoms/Button/ButtonStatusContent.d.ts.map +1 -0
- package/dist/components/atoms/Button/ButtonStatusContent.js +92 -0
- package/dist/components/atoms/Button/buttonStatusMotion.d.ts +40 -0
- package/dist/components/atoms/Button/buttonStatusMotion.d.ts.map +1 -0
- package/dist/components/atoms/Button/buttonStatusMotion.js +100 -0
- package/dist/components/atoms/Button/buttonStatusStyles.d.ts +21 -0
- package/dist/components/atoms/Button/buttonStatusStyles.d.ts.map +1 -0
- package/dist/components/atoms/Button/buttonStatusStyles.js +39 -0
- package/dist/components/atoms/Button/buttonStyles.d.ts +47 -0
- package/dist/components/atoms/Button/buttonStyles.d.ts.map +1 -0
- package/dist/components/atoms/Button/buttonStyles.js +54 -0
- package/dist/components/atoms/Checkbox/Checkbox.d.ts +31 -0
- package/dist/components/atoms/Checkbox/Checkbox.d.ts.map +1 -0
- package/dist/components/atoms/Checkbox/Checkbox.js +101 -0
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts +37 -0
- package/dist/components/atoms/Checkbox/checkboxStyles.d.ts.map +1 -0
- package/dist/components/atoms/Checkbox/checkboxStyles.js +42 -0
- package/dist/components/atoms/IconButton/IconButton.d.ts +49 -0
- package/dist/components/atoms/IconButton/IconButton.d.ts.map +1 -0
- package/dist/components/atoms/IconButton/IconButton.js +84 -0
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts +17 -0
- package/dist/components/atoms/IconButton/iconButtonStyles.d.ts.map +1 -0
- package/dist/components/atoms/IconButton/iconButtonStyles.js +13 -0
- package/dist/components/atoms/Input/Input.d.ts +37 -0
- package/dist/components/atoms/Input/Input.d.ts.map +1 -0
- package/dist/components/atoms/Input/Input.js +105 -0
- package/dist/components/atoms/Input/inputShellStyles.d.ts +99 -0
- package/dist/components/atoms/Input/inputShellStyles.d.ts.map +1 -0
- package/dist/components/atoms/Input/inputShellStyles.js +119 -0
- package/dist/components/atoms/Kbd/Kbd.d.ts +18 -0
- package/dist/components/atoms/Kbd/Kbd.d.ts.map +1 -0
- package/dist/components/atoms/Kbd/Kbd.js +15 -0
- package/dist/components/atoms/Kbd/kbdStyles.d.ts +5 -0
- package/dist/components/atoms/Kbd/kbdStyles.d.ts.map +1 -0
- package/dist/components/atoms/Kbd/kbdStyles.js +8 -0
- package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts +21 -0
- package/dist/components/atoms/Kbd/useKbdChoiceKeys.d.ts.map +1 -0
- package/dist/components/atoms/Kbd/useKbdChoiceKeys.js +18 -0
- package/dist/components/atoms/Radio/Radio.d.ts +26 -0
- package/dist/components/atoms/Radio/Radio.d.ts.map +1 -0
- package/dist/components/atoms/Radio/Radio.js +84 -0
- package/dist/components/atoms/Radio/radioStyles.d.ts +28 -0
- package/dist/components/atoms/Radio/radioStyles.d.ts.map +1 -0
- package/dist/components/atoms/Radio/radioStyles.js +36 -0
- package/dist/components/atoms/RiveHand/RiveHand.d.ts +44 -0
- package/dist/components/atoms/RiveHand/RiveHand.d.ts.map +1 -0
- package/dist/components/atoms/RiveHand/RiveHand.js +254 -0
- package/dist/components/atoms/RiveHand/riveHandUtils.d.ts +168 -0
- package/dist/components/atoms/RiveHand/riveHandUtils.d.ts.map +1 -0
- package/dist/components/atoms/RiveHand/riveHandUtils.js +123 -0
- package/dist/components/atoms/Skeleton/Skeleton.d.ts +28 -0
- package/dist/components/atoms/Skeleton/Skeleton.d.ts.map +1 -0
- package/dist/components/atoms/Skeleton/Skeleton.js +32 -0
- package/dist/components/atoms/Skeleton/skeletonStyles.d.ts +23 -0
- package/dist/components/atoms/Skeleton/skeletonStyles.d.ts.map +1 -0
- package/dist/components/atoms/Skeleton/skeletonStyles.js +30 -0
- package/dist/components/atoms/Status/Status.d.ts +40 -0
- package/dist/components/atoms/Status/Status.d.ts.map +1 -0
- package/dist/components/atoms/Status/Status.js +84 -0
- package/dist/components/atoms/Status/statusDotStyles.d.ts +10 -0
- package/dist/components/atoms/Status/statusDotStyles.d.ts.map +1 -0
- package/dist/components/atoms/Status/statusDotStyles.js +17 -0
- package/dist/components/atoms/Status/statusRingStyles.d.ts +12 -0
- package/dist/components/atoms/Status/statusRingStyles.d.ts.map +1 -0
- package/dist/components/atoms/Status/statusRingStyles.js +6 -0
- package/dist/components/atoms/Switch/Switch.d.ts +27 -0
- package/dist/components/atoms/Switch/Switch.d.ts.map +1 -0
- package/dist/components/atoms/Switch/Switch.js +109 -0
- package/dist/components/atoms/Switch/switchStyles.d.ts +36 -0
- package/dist/components/atoms/Switch/switchStyles.d.ts.map +1 -0
- package/dist/components/atoms/Switch/switchStyles.js +39 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts +37 -0
- package/dist/components/atoms/TextArea/TextArea.d.ts.map +1 -0
- package/dist/components/atoms/TextArea/TextArea.js +115 -0
- package/dist/components/atoms/TextArea/textareaShellStyles.d.ts +41 -0
- package/dist/components/atoms/TextArea/textareaShellStyles.d.ts.map +1 -0
- package/dist/components/atoms/TextArea/textareaShellStyles.js +71 -0
- package/dist/components/atoms/TextLink/TextLink.d.ts +14 -0
- package/dist/components/atoms/TextLink/TextLink.d.ts.map +1 -0
- package/dist/components/atoms/TextLink/TextLink.js +26 -0
- package/dist/components/atoms/TextLink/textLinkStyles.d.ts +3 -0
- package/dist/components/atoms/TextLink/textLinkStyles.d.ts.map +1 -0
- package/dist/components/atoms/TextLink/textLinkStyles.js +6 -0
- package/dist/components/atoms/TextSequenceShape/TextSequenceShape.d.ts +21 -0
- package/dist/components/atoms/TextSequenceShape/TextSequenceShape.d.ts.map +1 -0
- package/dist/components/atoms/TextSequenceShape/TextSequenceShape.js +175 -0
- package/dist/components/atoms/TextSequenceShape/textSequenceShapeStyles.d.ts +28 -0
- package/dist/components/atoms/TextSequenceShape/textSequenceShapeStyles.d.ts.map +1 -0
- package/dist/components/atoms/TextSequenceShape/textSequenceShapeStyles.js +39 -0
- package/dist/components/atoms/Tooltip/Tooltip.d.ts +63 -0
- package/dist/components/atoms/Tooltip/Tooltip.d.ts.map +1 -0
- package/dist/components/atoms/Tooltip/Tooltip.js +82 -0
- package/dist/components/atoms/Tooltip/tooltipStyles.d.ts +4 -0
- package/dist/components/atoms/Tooltip/tooltipStyles.d.ts.map +1 -0
- package/dist/components/atoms/Tooltip/tooltipStyles.js +15 -0
- package/dist/components/atoms/inputShared/InputStatusBanner.d.ts +13 -0
- package/dist/components/atoms/inputShared/InputStatusBanner.d.ts.map +1 -0
- package/dist/components/atoms/inputShared/InputStatusBanner.js +24 -0
- package/dist/components/atoms/inputShared/InputTrailingAffordance.d.ts +8 -0
- package/dist/components/atoms/inputShared/InputTrailingAffordance.d.ts.map +1 -0
- package/dist/components/atoms/inputShared/InputTrailingAffordance.js +26 -0
- package/dist/components/molecules/Accordion/Accordion.d.ts +36 -0
- package/dist/components/molecules/Accordion/Accordion.d.ts.map +1 -0
- package/dist/components/molecules/Accordion/Accordion.js +82 -0
- package/dist/components/molecules/Accordion/accordionStyles.d.ts +45 -0
- package/dist/components/molecules/Accordion/accordionStyles.d.ts.map +1 -0
- package/dist/components/molecules/Accordion/accordionStyles.js +12 -0
- package/dist/components/molecules/CalEmbed/CalEmbed.d.ts +58 -0
- package/dist/components/molecules/CalEmbed/CalEmbed.d.ts.map +1 -0
- package/dist/components/molecules/CalEmbed/CalEmbed.js +50 -0
- package/dist/components/molecules/CalEmbed/calEmbedStyles.d.ts +5 -0
- package/dist/components/molecules/CalEmbed/calEmbedStyles.d.ts.map +1 -0
- package/dist/components/molecules/CalEmbed/calEmbedStyles.js +5 -0
- package/dist/components/molecules/Card/Card.d.ts +53 -0
- package/dist/components/molecules/Card/Card.d.ts.map +1 -0
- package/dist/components/molecules/Card/Card.js +72 -0
- package/dist/components/molecules/Card/cardStyles.d.ts +82 -0
- package/dist/components/molecules/Card/cardStyles.d.ts.map +1 -0
- package/dist/components/molecules/Card/cardStyles.js +60 -0
- package/dist/components/molecules/ChatQa/ChatQa.d.ts +25 -0
- package/dist/components/molecules/ChatQa/ChatQa.d.ts.map +1 -0
- package/dist/components/molecules/ChatQa/ChatQa.js +23 -0
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts +9 -0
- package/dist/components/molecules/ChatQa/chatQaStyles.d.ts.map +1 -0
- package/dist/components/molecules/ChatQa/chatQaStyles.js +5 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts +29 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.d.ts.map +1 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroup.js +76 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroupContext.d.ts +14 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroupContext.d.ts.map +1 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroupContext.js +17 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts +12 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.d.ts.map +1 -0
- package/dist/components/molecules/CheckboxGroup/CheckboxGroupItem.js +23 -0
- package/dist/components/molecules/CheckboxGroup/checkboxGroupStyles.d.ts +16 -0
- package/dist/components/molecules/CheckboxGroup/checkboxGroupStyles.d.ts.map +1 -0
- package/dist/components/molecules/CheckboxGroup/checkboxGroupStyles.js +15 -0
- package/dist/components/molecules/Chip/Chip.d.ts +32 -0
- package/dist/components/molecules/Chip/Chip.d.ts.map +1 -0
- package/dist/components/molecules/Chip/Chip.js +116 -0
- package/dist/components/molecules/Chip/ChipFilterGroup.d.ts +30 -0
- package/dist/components/molecules/Chip/ChipFilterGroup.d.ts.map +1 -0
- package/dist/components/molecules/Chip/ChipFilterGroup.js +45 -0
- package/dist/components/molecules/Chip/chipStyles.d.ts +12 -0
- package/dist/components/molecules/Chip/chipStyles.d.ts.map +1 -0
- package/dist/components/molecules/Chip/chipStyles.js +23 -0
- package/dist/components/molecules/DisplayControls/DisplayControls.d.ts +27 -0
- package/dist/components/molecules/DisplayControls/DisplayControls.d.ts.map +1 -0
- package/dist/components/molecules/DisplayControls/DisplayControls.js +76 -0
- package/dist/components/molecules/DisplayControls/displayControlsState.d.ts +6 -0
- package/dist/components/molecules/DisplayControls/displayControlsState.d.ts.map +1 -0
- package/dist/components/molecules/DisplayControls/displayControlsState.js +18 -0
- package/dist/components/molecules/DisplayControls/displayControlsStyles.d.ts +4 -0
- package/dist/components/molecules/DisplayControls/displayControlsStyles.d.ts.map +1 -0
- package/dist/components/molecules/DisplayControls/displayControlsStyles.js +5 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts +9 -0
- package/dist/components/molecules/Dropdown/Dropdown.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/Dropdown.js +10 -0
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts +23 -0
- package/dist/components/molecules/Dropdown/DropdownItem.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/DropdownItem.js +36 -0
- package/dist/components/molecules/Dropdown/DropdownMenu.d.ts +10 -0
- package/dist/components/molecules/Dropdown/DropdownMenu.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/DropdownMenu.js +14 -0
- package/dist/components/molecules/Dropdown/dropdownMenuPosition.d.ts +25 -0
- package/dist/components/molecules/Dropdown/dropdownMenuPosition.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/dropdownMenuPosition.js +56 -0
- package/dist/components/molecules/Dropdown/dropdownStyles.d.ts +31 -0
- package/dist/components/molecules/Dropdown/dropdownStyles.d.ts.map +1 -0
- package/dist/components/molecules/Dropdown/dropdownStyles.js +8 -0
- package/dist/components/molecules/Field/Field.d.ts +25 -0
- package/dist/components/molecules/Field/Field.d.ts.map +1 -0
- package/dist/components/molecules/Field/Field.js +80 -0
- package/dist/components/molecules/Field/fieldStyles.d.ts +16 -0
- package/dist/components/molecules/Field/fieldStyles.d.ts.map +1 -0
- package/dist/components/molecules/Field/fieldStyles.js +11 -0
- package/dist/components/molecules/FloatingActionButton/FloatingActionButton.d.ts +22 -0
- package/dist/components/molecules/FloatingActionButton/FloatingActionButton.d.ts.map +1 -0
- package/dist/components/molecules/FloatingActionButton/FloatingActionButton.js +135 -0
- package/dist/components/molecules/FloatingActionButton/floatingActionButtonStyles.d.ts +9 -0
- package/dist/components/molecules/FloatingActionButton/floatingActionButtonStyles.d.ts.map +1 -0
- package/dist/components/molecules/FloatingActionButton/floatingActionButtonStyles.js +7 -0
- package/dist/components/molecules/HeroIntro/HeroIntro.d.ts +32 -0
- package/dist/components/molecules/HeroIntro/HeroIntro.d.ts.map +1 -0
- package/dist/components/molecules/HeroIntro/HeroIntro.js +24 -0
- package/dist/components/molecules/HeroIntro/heroIntroStyles.d.ts +30 -0
- package/dist/components/molecules/HeroIntro/heroIntroStyles.d.ts.map +1 -0
- package/dist/components/molecules/HeroIntro/heroIntroStyles.js +5 -0
- package/dist/components/molecules/IntakeForm/IntakeForm.d.ts +30 -0
- package/dist/components/molecules/IntakeForm/IntakeForm.d.ts.map +1 -0
- package/dist/components/molecules/IntakeForm/IntakeForm.js +137 -0
- package/dist/components/molecules/IntakeForm/intakeFormStyles.d.ts +3 -0
- package/dist/components/molecules/IntakeForm/intakeFormStyles.d.ts.map +1 -0
- package/dist/components/molecules/IntakeForm/intakeFormStyles.js +5 -0
- package/dist/components/molecules/NavList/NavList.d.ts +55 -0
- package/dist/components/molecules/NavList/NavList.d.ts.map +1 -0
- package/dist/components/molecules/NavList/NavList.js +103 -0
- package/dist/components/molecules/NavList/navListStyles.d.ts +15 -0
- package/dist/components/molecules/NavList/navListStyles.d.ts.map +1 -0
- package/dist/components/molecules/NavList/navListStyles.js +11 -0
- package/dist/components/molecules/PageHeader/PageHeader.d.ts +24 -0
- package/dist/components/molecules/PageHeader/PageHeader.d.ts.map +1 -0
- package/dist/components/molecules/PageHeader/PageHeader.js +43 -0
- package/dist/components/molecules/PageHeader/pageHeaderStyles.d.ts +9 -0
- package/dist/components/molecules/PageHeader/pageHeaderStyles.d.ts.map +1 -0
- package/dist/components/molecules/PageHeader/pageHeaderStyles.js +20 -0
- package/dist/components/molecules/PillGroup/PillGroup.d.ts +31 -0
- package/dist/components/molecules/PillGroup/PillGroup.d.ts.map +1 -0
- package/dist/components/molecules/PillGroup/PillGroup.js +53 -0
- package/dist/components/molecules/PillGroup/pillGroupStyles.d.ts +13 -0
- package/dist/components/molecules/PillGroup/pillGroupStyles.d.ts.map +1 -0
- package/dist/components/molecules/PillGroup/pillGroupStyles.js +7 -0
- package/dist/components/molecules/PromptBar/PromptBar.d.ts +33 -0
- package/dist/components/molecules/PromptBar/PromptBar.d.ts.map +1 -0
- package/dist/components/molecules/PromptBar/PromptBar.js +56 -0
- package/dist/components/molecules/PromptBar/promptBarStyles.d.ts +24 -0
- package/dist/components/molecules/PromptBar/promptBarStyles.d.ts.map +1 -0
- package/dist/components/molecules/PromptBar/promptBarStyles.js +6 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts +34 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.d.ts.map +1 -0
- package/dist/components/molecules/RadioGroup/RadioGroup.js +76 -0
- package/dist/components/molecules/RadioGroup/RadioGroupContext.d.ts +16 -0
- package/dist/components/molecules/RadioGroup/RadioGroupContext.d.ts.map +1 -0
- package/dist/components/molecules/RadioGroup/RadioGroupContext.js +23 -0
- package/dist/components/molecules/RadioGroup/RadioGroupItem.d.ts +12 -0
- package/dist/components/molecules/RadioGroup/RadioGroupItem.d.ts.map +1 -0
- package/dist/components/molecules/RadioGroup/RadioGroupItem.js +21 -0
- package/dist/components/molecules/RadioGroup/radioGroupStyles.d.ts +16 -0
- package/dist/components/molecules/RadioGroup/radioGroupStyles.d.ts.map +1 -0
- package/dist/components/molecules/RadioGroup/radioGroupStyles.js +15 -0
- package/dist/components/molecules/Search/Search.d.ts +24 -0
- package/dist/components/molecules/Search/Search.d.ts.map +1 -0
- package/dist/components/molecules/Search/Search.js +33 -0
- package/dist/components/molecules/Search/searchStyles.d.ts +10 -0
- package/dist/components/molecules/Search/searchStyles.d.ts.map +1 -0
- package/dist/components/molecules/Search/searchStyles.js +15 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControl.d.ts +25 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControl.d.ts.map +1 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControl.js +36 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControlContext.d.ts +16 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControlContext.d.ts.map +1 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControlContext.js +18 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControlItem.d.ts +25 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControlItem.d.ts.map +1 -0
- package/dist/components/molecules/SegmentedControl/SegmentedControlItem.js +55 -0
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts +31 -0
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.d.ts.map +1 -0
- package/dist/components/molecules/SegmentedControl/segmentedControlStyles.js +28 -0
- package/dist/components/molecules/Select/Select.d.ts +34 -0
- package/dist/components/molecules/Select/Select.d.ts.map +1 -0
- package/dist/components/molecules/Select/Select.js +161 -0
- package/dist/components/molecules/Select/selectMenuPosition.d.ts +11 -0
- package/dist/components/molecules/Select/selectMenuPosition.d.ts.map +1 -0
- package/dist/components/molecules/Select/selectMenuPosition.js +14 -0
- package/dist/components/molecules/Select/selectStyles.d.ts +21 -0
- package/dist/components/molecules/Select/selectStyles.d.ts.map +1 -0
- package/dist/components/molecules/Select/selectStyles.js +21 -0
- package/dist/components/molecules/SelectableCard/SelectableCard.d.ts +33 -0
- package/dist/components/molecules/SelectableCard/SelectableCard.d.ts.map +1 -0
- package/dist/components/molecules/SelectableCard/SelectableCard.js +84 -0
- package/dist/components/molecules/SelectableCard/selectableCardStyles.d.ts +14 -0
- package/dist/components/molecules/SelectableCard/selectableCardStyles.d.ts.map +1 -0
- package/dist/components/molecules/SelectableCard/selectableCardStyles.js +7 -0
- package/dist/components/molecules/Stat/Stat.d.ts +47 -0
- package/dist/components/molecules/Stat/Stat.d.ts.map +1 -0
- package/dist/components/molecules/Stat/Stat.js +76 -0
- package/dist/components/molecules/Stat/statStyles.d.ts +23 -0
- package/dist/components/molecules/Stat/statStyles.d.ts.map +1 -0
- package/dist/components/molecules/Stat/statStyles.js +37 -0
- package/dist/components/molecules/StepProgress/StepProgress.d.ts +21 -0
- package/dist/components/molecules/StepProgress/StepProgress.d.ts.map +1 -0
- package/dist/components/molecules/StepProgress/StepProgress.js +44 -0
- package/dist/components/molecules/StepProgress/stepProgressStyles.d.ts +7 -0
- package/dist/components/molecules/StepProgress/stepProgressStyles.d.ts.map +1 -0
- package/dist/components/molecules/StepProgress/stepProgressStyles.js +7 -0
- package/dist/components/molecules/TaskRows/TaskRows.d.ts +67 -0
- package/dist/components/molecules/TaskRows/TaskRows.d.ts.map +1 -0
- package/dist/components/molecules/TaskRows/TaskRows.js +164 -0
- package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts +32 -0
- package/dist/components/molecules/TaskRows/taskRowsStyles.d.ts.map +1 -0
- package/dist/components/molecules/TaskRows/taskRowsStyles.js +16 -0
- package/dist/components/molecules/TextSequence/TextSequence.d.ts +47 -0
- package/dist/components/molecules/TextSequence/TextSequence.d.ts.map +1 -0
- package/dist/components/molecules/TextSequence/TextSequence.js +242 -0
- package/dist/components/molecules/TextSequence/textSequenceStyles.d.ts +10 -0
- package/dist/components/molecules/TextSequence/textSequenceStyles.d.ts.map +1 -0
- package/dist/components/molecules/TextSequence/textSequenceStyles.js +5 -0
- package/dist/components/organisms/Chart/Chart.d.ts +76 -0
- package/dist/components/organisms/Chart/Chart.d.ts.map +1 -0
- package/dist/components/organisms/Chart/Chart.js +152 -0
- package/dist/components/organisms/Chart/ChartCartesian.d.ts +54 -0
- package/dist/components/organisms/Chart/ChartCartesian.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartCartesian.js +479 -0
- package/dist/components/organisms/Chart/ChartDistributionStrip.d.ts +24 -0
- package/dist/components/organisms/Chart/ChartDistributionStrip.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartDistributionStrip.js +156 -0
- package/dist/components/organisms/Chart/ChartHeatmap.d.ts +24 -0
- package/dist/components/organisms/Chart/ChartHeatmap.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartHeatmap.js +163 -0
- package/dist/components/organisms/Chart/ChartHoverTooltip.d.ts +13 -0
- package/dist/components/organisms/Chart/ChartHoverTooltip.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartHoverTooltip.js +29 -0
- package/dist/components/organisms/Chart/ChartLegend.d.ts +13 -0
- package/dist/components/organisms/Chart/ChartLegend.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartLegend.js +30 -0
- package/dist/components/organisms/Chart/ChartLoading.d.ts +12 -0
- package/dist/components/organisms/Chart/ChartLoading.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartLoading.js +24 -0
- package/dist/components/organisms/Chart/ChartRankedBars.d.ts +18 -0
- package/dist/components/organisms/Chart/ChartRankedBars.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartRankedBars.js +52 -0
- package/dist/components/organisms/Chart/ChartTooltipContent.d.ts +19 -0
- package/dist/components/organisms/Chart/ChartTooltipContent.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartTooltipContent.js +36 -0
- package/dist/components/organisms/Chart/ChartUnitGrid.d.ts +17 -0
- package/dist/components/organisms/Chart/ChartUnitGrid.d.ts.map +1 -0
- package/dist/components/organisms/Chart/ChartUnitGrid.js +95 -0
- package/dist/components/organisms/Chart/chartCartesianContext.d.ts +50 -0
- package/dist/components/organisms/Chart/chartCartesianContext.d.ts.map +1 -0
- package/dist/components/organisms/Chart/chartCartesianContext.js +18 -0
- package/dist/components/organisms/Chart/chartCartesianGaps.d.ts +74 -0
- package/dist/components/organisms/Chart/chartCartesianGaps.d.ts.map +1 -0
- package/dist/components/organisms/Chart/chartCartesianGaps.js +92 -0
- package/dist/components/organisms/Chart/chartCartesianMotion.d.ts +11 -0
- package/dist/components/organisms/Chart/chartCartesianMotion.d.ts.map +1 -0
- package/dist/components/organisms/Chart/chartCartesianMotion.js +15 -0
- package/dist/components/organisms/Chart/chartExploration.d.ts +8 -0
- package/dist/components/organisms/Chart/chartExploration.d.ts.map +1 -0
- package/dist/components/organisms/Chart/chartExploration.js +31 -0
- package/dist/components/organisms/Chart/chartSegmentedBarMotion.d.ts +12 -0
- package/dist/components/organisms/Chart/chartSegmentedBarMotion.d.ts.map +1 -0
- package/dist/components/organisms/Chart/chartSegmentedBarMotion.js +9 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts +93 -0
- package/dist/components/organisms/Chart/chartStyles.d.ts.map +1 -0
- package/dist/components/organisms/Chart/chartStyles.js +11 -0
- package/dist/components/organisms/Confetti/Confetti.d.ts +35 -0
- package/dist/components/organisms/Confetti/Confetti.d.ts.map +1 -0
- package/dist/components/organisms/Confetti/Confetti.js +96 -0
- package/dist/components/organisms/Confetti/confettiPhysics.d.ts +116 -0
- package/dist/components/organisms/Confetti/confettiPhysics.d.ts.map +1 -0
- package/dist/components/organisms/Confetti/confettiPhysics.js +121 -0
- package/dist/components/organisms/Confetti/confettiStyles.d.ts +3 -0
- package/dist/components/organisms/Confetti/confettiStyles.d.ts.map +1 -0
- package/dist/components/organisms/Confetti/confettiStyles.js +5 -0
- package/dist/components/organisms/Dialog/AlertDialog.d.ts +31 -0
- package/dist/components/organisms/Dialog/AlertDialog.d.ts.map +1 -0
- package/dist/components/organisms/Dialog/AlertDialog.js +80 -0
- package/dist/components/organisms/Dialog/Dialog.d.ts +54 -0
- package/dist/components/organisms/Dialog/Dialog.d.ts.map +1 -0
- package/dist/components/organisms/Dialog/Dialog.js +158 -0
- package/dist/components/organisms/Dialog/DialogContext.d.ts +22 -0
- package/dist/components/organisms/Dialog/DialogContext.d.ts.map +1 -0
- package/dist/components/organisms/Dialog/DialogContext.js +25 -0
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts +21 -0
- package/dist/components/organisms/Dialog/OverlayPanelHeader.d.ts.map +1 -0
- package/dist/components/organisms/Dialog/OverlayPanelHeader.js +50 -0
- package/dist/components/organisms/Dialog/dialogStyles.d.ts +66 -0
- package/dist/components/organisms/Dialog/dialogStyles.d.ts.map +1 -0
- package/dist/components/organisms/Dialog/dialogStyles.js +24 -0
- package/dist/components/organisms/FooterReveal/FooterReveal.d.ts +78 -0
- package/dist/components/organisms/FooterReveal/FooterReveal.d.ts.map +1 -0
- package/dist/components/organisms/FooterReveal/FooterReveal.js +208 -0
- package/dist/components/organisms/FooterReveal/FooterRevealRuled.d.ts +40 -0
- package/dist/components/organisms/FooterReveal/FooterRevealRuled.d.ts.map +1 -0
- package/dist/components/organisms/FooterReveal/FooterRevealRuled.js +120 -0
- package/dist/components/organisms/FooterReveal/footerRevealAt.d.ts +8 -0
- package/dist/components/organisms/FooterReveal/footerRevealAt.d.ts.map +1 -0
- package/dist/components/organisms/FooterReveal/footerRevealAt.js +7 -0
- package/dist/components/organisms/FooterReveal/footerRevealStyles.d.ts +142 -0
- package/dist/components/organisms/FooterReveal/footerRevealStyles.d.ts.map +1 -0
- package/dist/components/organisms/FooterReveal/footerRevealStyles.js +12 -0
- package/dist/components/organisms/FooterReveal/footerRevealWordmark.d.ts +37 -0
- package/dist/components/organisms/FooterReveal/footerRevealWordmark.d.ts.map +1 -0
- package/dist/components/organisms/FooterReveal/footerRevealWordmark.js +51 -0
- package/dist/components/organisms/HeroTileStack/HeroTileStack.d.ts +62 -0
- package/dist/components/organisms/HeroTileStack/HeroTileStack.d.ts.map +1 -0
- package/dist/components/organisms/HeroTileStack/HeroTileStack.js +257 -0
- package/dist/components/organisms/HeroTileStack/heroTileScatter.d.ts +120 -0
- package/dist/components/organisms/HeroTileStack/heroTileScatter.d.ts.map +1 -0
- package/dist/components/organisms/HeroTileStack/heroTileScatter.js +83 -0
- package/dist/components/organisms/HeroTileStack/heroTileStackStyles.d.ts +33 -0
- package/dist/components/organisms/HeroTileStack/heroTileStackStyles.d.ts.map +1 -0
- package/dist/components/organisms/HeroTileStack/heroTileStackStyles.js +11 -0
- package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.d.ts +33 -0
- package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.d.ts.map +1 -0
- package/dist/components/organisms/IntakeConfirmation/IntakeConfirmation.js +77 -0
- package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.d.ts +22 -0
- package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.d.ts.map +1 -0
- package/dist/components/organisms/IntakeConfirmation/intakeConfirmationStyles.js +25 -0
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts +33 -0
- package/dist/components/organisms/IntakeModal/IntakeModal.d.ts.map +1 -0
- package/dist/components/organisms/IntakeModal/IntakeModal.js +108 -0
- package/dist/components/organisms/IntakeModal/intakeModalStyles.d.ts +14 -0
- package/dist/components/organisms/IntakeModal/intakeModalStyles.d.ts.map +1 -0
- package/dist/components/organisms/IntakeModal/intakeModalStyles.js +7 -0
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts +28 -0
- package/dist/components/organisms/MoreMenu/MoreMenu.d.ts.map +1 -0
- package/dist/components/organisms/MoreMenu/MoreMenu.js +133 -0
- package/dist/components/organisms/MoreMenu/moreMenuStyles.d.ts +3 -0
- package/dist/components/organisms/MoreMenu/moreMenuStyles.d.ts.map +1 -0
- package/dist/components/organisms/MoreMenu/moreMenuStyles.js +5 -0
- package/dist/components/organisms/Panel/Panel.d.ts +40 -0
- package/dist/components/organisms/Panel/Panel.d.ts.map +1 -0
- package/dist/components/organisms/Panel/Panel.js +135 -0
- package/dist/components/organisms/Panel/PanelContext.d.ts +19 -0
- package/dist/components/organisms/Panel/PanelContext.d.ts.map +1 -0
- package/dist/components/organisms/Panel/PanelContext.js +25 -0
- package/dist/components/organisms/Panel/panelStyles.d.ts +17 -0
- package/dist/components/organisms/Panel/panelStyles.d.ts.map +1 -0
- package/dist/components/organisms/Panel/panelStyles.js +25 -0
- package/dist/components/organisms/ScrollHorizontal/ScrollHorizontal.d.ts +74 -0
- package/dist/components/organisms/ScrollHorizontal/ScrollHorizontal.d.ts.map +1 -0
- package/dist/components/organisms/ScrollHorizontal/ScrollHorizontal.js +163 -0
- package/dist/components/organisms/ScrollHorizontal/ScrollHorizontalIntro.d.ts +41 -0
- package/dist/components/organisms/ScrollHorizontal/ScrollHorizontalIntro.d.ts.map +1 -0
- package/dist/components/organisms/ScrollHorizontal/ScrollHorizontalIntro.js +40 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalIntroContext.d.ts +3 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalIntroContext.d.ts.map +1 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalIntroContext.js +6 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalMath.d.ts +167 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalMath.d.ts.map +1 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalMath.js +136 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalStyles.d.ts +84 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalStyles.d.ts.map +1 -0
- package/dist/components/organisms/ScrollHorizontal/scrollHorizontalStyles.js +79 -0
- package/dist/components/organisms/Sheet/Sheet.d.ts +44 -0
- package/dist/components/organisms/Sheet/Sheet.d.ts.map +1 -0
- package/dist/components/organisms/Sheet/Sheet.js +152 -0
- package/dist/components/organisms/Sheet/SheetContext.d.ts +20 -0
- package/dist/components/organisms/Sheet/SheetContext.d.ts.map +1 -0
- package/dist/components/organisms/Sheet/SheetContext.js +25 -0
- package/dist/components/organisms/Sheet/sheetStyles.d.ts +30 -0
- package/dist/components/organisms/Sheet/sheetStyles.d.ts.map +1 -0
- package/dist/components/organisms/Sheet/sheetStyles.js +72 -0
- package/dist/components/organisms/SiteNav/SiteNav.d.ts +170 -0
- package/dist/components/organisms/SiteNav/SiteNav.d.ts.map +1 -0
- package/dist/components/organisms/SiteNav/SiteNav.js +536 -0
- package/dist/components/organisms/SiteNav/siteNavStyles.d.ts +128 -0
- package/dist/components/organisms/SiteNav/siteNavStyles.d.ts.map +1 -0
- package/dist/components/organisms/SiteNav/siteNavStyles.js +25 -0
- package/dist/components/organisms/SiteNav/useSiteNavCollapse.d.ts +18 -0
- package/dist/components/organisms/SiteNav/useSiteNavCollapse.d.ts.map +1 -0
- package/dist/components/organisms/SiteNav/useSiteNavCollapse.js +34 -0
- package/dist/components/organisms/Tab/Tab.d.ts +27 -0
- package/dist/components/organisms/Tab/Tab.d.ts.map +1 -0
- package/dist/components/organisms/Tab/Tab.js +223 -0
- package/dist/components/organisms/Tab/tabOverflow.d.ts +14 -0
- package/dist/components/organisms/Tab/tabOverflow.d.ts.map +1 -0
- package/dist/components/organisms/Tab/tabOverflow.js +26 -0
- package/dist/components/organisms/Tab/tabStyles.d.ts +16 -0
- package/dist/components/organisms/Tab/tabStyles.d.ts.map +1 -0
- package/dist/components/organisms/Tab/tabStyles.js +17 -0
- package/dist/components/organisms/Toast/Toast.d.ts +17 -0
- package/dist/components/organisms/Toast/Toast.d.ts.map +1 -0
- package/dist/components/organisms/Toast/Toast.js +150 -0
- package/dist/components/organisms/Toast/toastStore.d.ts +41 -0
- package/dist/components/organisms/Toast/toastStore.d.ts.map +1 -0
- package/dist/components/organisms/Toast/toastStore.js +60 -0
- package/dist/components/organisms/Toast/toastStyles.d.ts +11 -0
- package/dist/components/organisms/Toast/toastStyles.d.ts.map +1 -0
- package/dist/components/organisms/Toast/toastStyles.js +21 -0
- package/dist/files/geist-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/files/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/files/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/files/geist-latin-wght-normal.woff2 +0 -0
- package/dist/files/geist-mono-cyrillic-ext-wght-normal.woff2 +0 -0
- package/dist/files/geist-mono-cyrillic-wght-normal.woff2 +0 -0
- package/dist/files/geist-mono-latin-ext-wght-normal.woff2 +0 -0
- package/dist/files/geist-mono-latin-wght-normal.woff2 +0 -0
- package/dist/files/geist-mono-symbols2-wght-normal.woff2 +0 -0
- package/dist/files/geist-mono-vietnamese-wght-normal.woff2 +0 -0
- package/dist/files/geist-vietnamese-wght-normal.woff2 +0 -0
- package/dist/fonts.css +124 -0
- package/dist/grid.css +214 -0
- package/dist/index.d.ts +73 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +122 -0
- package/dist/lib/GridOverlay.d.ts +23 -0
- package/dist/lib/GridOverlay.d.ts.map +1 -0
- package/dist/lib/GridOverlay.js +78 -0
- package/dist/lib/backgroundPatterns.d.ts +27 -0
- package/dist/lib/backgroundPatterns.d.ts.map +1 -0
- package/dist/lib/backgroundPatterns.js +21 -0
- package/dist/lib/chartSampleData.d.ts +20 -0
- package/dist/lib/chartSampleData.d.ts.map +1 -0
- package/dist/lib/chartTheme.d.ts +367 -0
- package/dist/lib/chartTheme.d.ts.map +1 -0
- package/dist/lib/chartTheme.js +329 -0
- package/dist/lib/clusterScale.d.ts +48 -0
- package/dist/lib/clusterScale.d.ts.map +1 -0
- package/dist/lib/clusterScale.js +48 -0
- package/dist/lib/cn.d.ts +3 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +7 -0
- package/dist/lib/compositionAudit.d.ts +59 -0
- package/dist/lib/compositionAudit.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.d.ts +7 -0
- package/dist/lib/dialogOverlay.d.ts.map +1 -0
- package/dist/lib/dialogOverlay.js +41 -0
- package/dist/lib/displayCascade.d.ts +27 -0
- package/dist/lib/displayCascade.d.ts.map +1 -0
- package/dist/lib/gridOverlayUtils.d.ts +34 -0
- package/dist/lib/gridOverlayUtils.d.ts.map +1 -0
- package/dist/lib/gridOverlayUtils.js +43 -0
- package/dist/lib/insetWell.d.ts +19 -0
- package/dist/lib/insetWell.d.ts.map +1 -0
- package/dist/lib/insetWell.js +5 -0
- package/dist/lib/motion.d.ts +81 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/motion.js +119 -0
- package/dist/lib/segmentedControl.d.ts +9 -0
- package/dist/lib/segmentedControl.d.ts.map +1 -0
- package/dist/lib/segmentedControl.js +6 -0
- package/dist/lib/semanticVariants.d.ts +5 -0
- package/dist/lib/semanticVariants.d.ts.map +1 -0
- package/dist/lib/shadows.d.ts +17 -0
- package/dist/lib/shadows.d.ts.map +1 -0
- package/dist/lib/storyCopySource.d.ts +16 -0
- package/dist/lib/storyCopySource.d.ts.map +1 -0
- package/dist/lib/tableLayout/index.d.ts +4 -0
- package/dist/lib/tableLayout/index.d.ts.map +1 -0
- package/dist/lib/tableLayout/tableLayout.d.ts +24 -0
- package/dist/lib/tableLayout/tableLayout.d.ts.map +1 -0
- package/dist/lib/tableLayout/tableMeasurer.d.ts +21 -0
- package/dist/lib/tableLayout/tableMeasurer.d.ts.map +1 -0
- package/dist/lib/tableLayout/useTableLayout.d.ts +6 -0
- package/dist/lib/tableLayout/useTableLayout.d.ts.map +1 -0
- package/dist/lib/typography.d.ts +93 -0
- package/dist/lib/typography.d.ts.map +1 -0
- package/dist/lib/typography.js +170 -0
- package/dist/lib/useScrollThreshold.d.ts +22 -0
- package/dist/lib/useScrollThreshold.d.ts.map +1 -0
- package/dist/lib/useScrollThreshold.js +29 -0
- package/dist/lib/viewports.d.ts +120 -0
- package/dist/lib/viewports.d.ts.map +1 -0
- package/dist/motion.css +73 -0
- package/dist/patterns.css +37 -0
- package/dist/scrollFade.css +380 -0
- package/dist/shape.css +8 -0
- package/dist/sources.css +70 -0
- package/dist/stateColors.css +73 -0
- package/dist/styles.css +2 -0
- package/dist/theme.css +200 -0
- package/dist/typography.css +224 -0
- package/docs/README.md +27 -0
- package/docs/component-contracts.md +27 -0
- package/docs/components.md +61 -0
- package/docs/consumer-agents.md +34 -0
- package/docs/exports.json +803 -0
- package/docs/patterns/components-avatar--dropdown-row.tsx +20 -0
- package/docs/patterns/components-badge--with-avatar.tsx +28 -0
- package/docs/patterns/components-button-button--destructive-action.tsx +7 -0
- package/docs/patterns/components-button-button--ghost-action.tsx +7 -0
- package/docs/patterns/components-button-button--inverse-action.tsx +7 -0
- package/docs/patterns/components-button-button--link-render.tsx +14 -0
- package/docs/patterns/components-button-button--multi-state-badge.tsx +16 -0
- package/docs/patterns/components-button-button--outline-mono.tsx +10 -0
- package/docs/patterns/components-button-button--primary-action.tsx +7 -0
- package/docs/patterns/components-button-button--row-hug.tsx +15 -0
- package/docs/patterns/components-button-button--row-layout.tsx +14 -0
- package/docs/patterns/components-button-button--secondary-action.tsx +7 -0
- package/docs/patterns/components-button-button--suggestion-pills.tsx +17 -0
- package/docs/patterns/components-button-button--with-count.tsx +9 -0
- package/docs/patterns/components-button-button--with-icon.tsx +22 -0
- package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +22 -0
- package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +25 -0
- package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +44 -0
- package/docs/patterns/components-card-card--headerless-media.tsx +23 -0
- package/docs/patterns/components-card-card--outlined-layout.tsx +16 -0
- package/docs/patterns/components-card-card--pinned-height.tsx +39 -0
- package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +48 -0
- package/docs/patterns/components-chart--audience-activity-heatmap.tsx +26 -0
- package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +25 -0
- package/docs/patterns/components-chart--occupancy-history-in-card.tsx +44 -0
- package/docs/patterns/components-chart--occupancy-in-card.tsx +49 -0
- package/docs/patterns/components-chart--post-reach-distribution.tsx +21 -0
- package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +16 -0
- package/docs/patterns/components-chart--unit-grid-composition.tsx +22 -0
- package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +25 -0
- package/docs/patterns/components-checkbox-checkbox--default.tsx +17 -0
- package/docs/patterns/components-checkbox-checkbox--with-description.tsx +18 -0
- package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +21 -0
- package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +28 -0
- package/docs/patterns/components-dialog--default-dialog.tsx +39 -0
- package/docs/patterns/components-dialog--form-dialog.tsx +41 -0
- package/docs/patterns/components-displaycontrols--page-utilities.tsx +36 -0
- package/docs/patterns/components-field--horizontal-input.tsx +9 -0
- package/docs/patterns/components-field--horizontal-text-area.tsx +9 -0
- package/docs/patterns/components-field--multi-control.tsx +10 -0
- package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +94 -0
- package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +121 -0
- package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +114 -0
- package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +76 -0
- package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +42 -0
- package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +123 -0
- package/docs/patterns/components-herointro--two-line-intro.tsx +15 -0
- package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +72 -0
- package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +84 -0
- package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +92 -0
- package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +20 -0
- package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +13 -0
- package/docs/patterns/components-intakeform--about-you-pattern.tsx +12 -0
- package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +32 -0
- package/docs/patterns/components-kbd--command-row.tsx +13 -0
- package/docs/patterns/components-kbd--numbered-choices.tsx +53 -0
- package/docs/patterns/components-kbd--shortcut.tsx +11 -0
- package/docs/patterns/components-moremenu--action-menu.tsx +36 -0
- package/docs/patterns/components-moremenu--in-card-header.tsx +72 -0
- package/docs/patterns/components-navlist--side-nav-settings.tsx +58 -0
- package/docs/patterns/components-pageheader--app-header-pattern.tsx +40 -0
- package/docs/patterns/components-pageheader--page-section-header.tsx +20 -0
- package/docs/patterns/components-pageheader--toolbar-header.tsx +37 -0
- package/docs/patterns/components-panel--end-detail-rail.tsx +65 -0
- package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +22 -0
- package/docs/patterns/components-promptbar--pattern-marketing-composer.tsx +37 -0
- package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +20 -0
- package/docs/patterns/components-radio-radiogroup--default.tsx +21 -0
- package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +22 -0
- package/docs/patterns/components-scrollhorizontal--with-intro.tsx +42 -0
- package/docs/patterns/components-sheet--bottom-sheet.tsx +40 -0
- package/docs/patterns/components-sheet--end-sheet.tsx +33 -0
- package/docs/patterns/components-sitenav--brand-and-cta.tsx +17 -0
- package/docs/patterns/components-sitenav--centered-links.tsx +20 -0
- package/docs/patterns/components-sitenav--compact.tsx +24 -0
- package/docs/patterns/components-sitenav--marketing-header.tsx +80 -0
- package/docs/patterns/components-sitenav--mega-menu.tsx +51 -0
- package/docs/patterns/components-stat--insights-row.tsx +28 -0
- package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +9 -0
- package/docs/patterns/components-switch--default.tsx +17 -0
- package/docs/patterns/components-switch--settings-row.tsx +19 -0
- package/docs/patterns/components-tab--settings-pages.tsx +21 -0
- package/docs/patterns/components-taskrows--action-details.tsx +40 -0
- package/docs/patterns/components-taskrows--capsules.tsx +14 -0
- package/docs/patterns/components-taskrows--card-with-status-rows.tsx +30 -0
- package/docs/patterns/components-taskrows--controlled-expand.tsx +31 -0
- package/docs/patterns/components-taskrows--custom-slots.tsx +21 -0
- package/docs/patterns/components-taskrows--status-list.tsx +23 -0
- package/docs/patterns/components-taskrows--tag-chips.tsx +19 -0
- package/docs/patterns/components-textlink--external-destination.tsx +9 -0
- package/docs/patterns/components-textlink--inline-prose.tsx +9 -0
- package/docs/patterns/components-textlink--supporting-copy.tsx +9 -0
- package/docs/patterns/components-textsequence--default.tsx +16 -0
- package/docs/patterns/components-textsequence--reduced-motion.tsx +16 -0
- package/docs/patterns/components-textsequence--shapes.tsx +40 -0
- package/docs/patterns/components-toast--stacked-notifications.tsx +31 -0
- package/docs/patterns/components-tooltip--controlled.tsx +20 -0
- package/docs/patterns/components-tooltip--disabled-control.tsx +20 -0
- package/docs/patterns/components-tooltip--icon-action.tsx +21 -0
- package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +17 -0
- package/docs/patterns/components-tooltip--placement.tsx +12 -0
- package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +24 -0
- package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +25 -0
- package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +78 -0
- package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +140 -0
- package/docs/patterns/guides-profile-typography--editorial-profile.tsx +81 -0
- package/docs/patterns/index.json +1006 -0
- package/docs/patterns/sites-pitchkit-account-settings--account-settings-owner.tsx +265 -0
- package/docs/patterns/sites-pitchkit-creator-identity--creator-identity-owner-settings.tsx +154 -0
- package/docs/patterns/sites-pitchkit-creator-identity--creator-identity-public.tsx +96 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--creator-insights-loading.tsx +1006 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--creator-insights.tsx +1031 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--insufficient-audience-data.tsx +1015 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--insufficient-reach-and-audience-data.tsx +1017 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--insufficient-reach-data.tsx +1033 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--owner-pitch-kit.tsx +838 -0
- package/docs/patterns/sites-pitchkit-insights-and-kit--shareable-pitch-kit.tsx +608 -0
- package/docs/patterns/sites-pitchkit-intro--intro-owner.tsx +161 -0
- package/docs/patterns/sites-pitchkit-intro--intro-public.tsx +111 -0
- package/docs/patterns/sites-pitchkit-past-brands--past-brands-owner.tsx +611 -0
- package/docs/patterns/sites-pitchkit-past-brands--past-brands-public.tsx +299 -0
- package/docs/patterns/sites-pitchkit-theme-picker--theme-picker-owner.tsx +832 -0
- package/docs/patterns/sites-whatmatters-intake--start-a-project-pattern.tsx +234 -0
- package/docs/patterns/sites-whatmatters-marketing-landing--marketing-landing.tsx +87 -0
- package/docs/patterns/sites-whatmatters-prompt-chat--landing-to-chat.tsx +899 -0
- package/docs/patterns/sites-whatmatters-rfp-submitted--rfp-submitted.tsx +302 -0
- package/package.json +123 -0
- package/public/rive/CREDITS.md +13 -0
- package/public/rive/interactive-icon-set.riv +0 -0
|
@@ -0,0 +1,899 @@
|
|
|
1
|
+
// @thewhatmatters/wmds@0.2.0 · Pattern — landing to chat
|
|
2
|
+
// Storybook: Sites/WhatMatters/Prompt chat → Pattern — landing to chat (?path=/story/sites-whatmatters-prompt-chat--landing-to-chat)
|
|
3
|
+
// Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
|
|
4
|
+
|
|
5
|
+
import { useCallback, useEffect, useLayoutEffect, useRef, useState, type MouseEvent } from "react";
|
|
6
|
+
import { Check, ChevronDown, ChevronLeft, ChevronRight, Copy, LoaderCircle, Sparkle, Sparkles, ThumbsDown, ThumbsUp, X } from "lucide-react";
|
|
7
|
+
import { motion, useReducedMotion, type Transition } from "motion/react";
|
|
8
|
+
import {
|
|
9
|
+
Button,
|
|
10
|
+
CalEmbed,
|
|
11
|
+
Card,
|
|
12
|
+
cardLayoutBodyOccupantInsetXClasses,
|
|
13
|
+
cardLayoutBodyOccupantWellClasses,
|
|
14
|
+
cardSubtitleClasses,
|
|
15
|
+
cardTitleClasses,
|
|
16
|
+
ChatQa,
|
|
17
|
+
Checkbox,
|
|
18
|
+
ConfettiProvider,
|
|
19
|
+
IconButton,
|
|
20
|
+
IntakeConfirmation,
|
|
21
|
+
IntakeForm,
|
|
22
|
+
intakeAboutEmpty,
|
|
23
|
+
Kbd,
|
|
24
|
+
PillGroup,
|
|
25
|
+
PromptBar,
|
|
26
|
+
SiteNav,
|
|
27
|
+
TextLink,
|
|
28
|
+
motionBeatSeconds,
|
|
29
|
+
motionBlurReveal,
|
|
30
|
+
motionStaggerSeconds,
|
|
31
|
+
motionTransitionProp,
|
|
32
|
+
readMotionDurationSeconds,
|
|
33
|
+
useKbdChoiceKeys,
|
|
34
|
+
type ChatQaPair,
|
|
35
|
+
type IntakeAboutValues,
|
|
36
|
+
intakeDetailsMax,
|
|
37
|
+
isIntakeAboutValid,
|
|
38
|
+
} from "@thewhatmatters/wmds";
|
|
39
|
+
|
|
40
|
+
const pageClasses = "flex h-[100svh] min-h-0 w-full flex-col overflow-hidden bg-body";
|
|
41
|
+
const columnClasses = "flex min-h-0 w-full flex-1 flex-col overflow-hidden [--grid-max:40rem]";
|
|
42
|
+
const stageClasses = "grid-page min-h-0 w-full flex-1 overflow-y-auto !py-0";
|
|
43
|
+
const landingClasses = "place-content-center";
|
|
44
|
+
const headlineClasses =
|
|
45
|
+
"col-span-full type-display-2 !font-normal text-balance text-center text-brand";
|
|
46
|
+
const threadClasses = "col-span-full flex w-full min-w-0 flex-col items-start gap-6 pt-6";
|
|
47
|
+
const userClasses =
|
|
48
|
+
"ml-auto max-w-full rounded-full bg-fill-selected px-4 py-2 type-body text-fg";
|
|
49
|
+
const replyClasses = "w-full type-body text-fg";
|
|
50
|
+
const replyBlockClasses =
|
|
51
|
+
"group/reply w-full outline-none [&[data-actions=open]]:outline-none";
|
|
52
|
+
const traceClasses = "flex w-full flex-col items-start gap-2";
|
|
53
|
+
const traceBodyClasses =
|
|
54
|
+
"flex w-full flex-col items-start gap-2 border-l border-border-control py-0.5 pl-3";
|
|
55
|
+
const traceLineClasses = "flex items-center gap-2 type-supporting text-muted";
|
|
56
|
+
const thoughtLabelClasses = "type-supporting text-muted";
|
|
57
|
+
const traceIconClasses = "size-4 shrink-0 text-muted";
|
|
58
|
+
const traceSpinClasses = "size-4 shrink-0 animate-spin text-muted";
|
|
59
|
+
const traceChevronClasses = "size-4 shrink-0 text-muted";
|
|
60
|
+
const actionsClasses =
|
|
61
|
+
"flex items-center gap-1 opacity-0 pointer-events-none transition-opacity duration-fast ease-standard group-hover/reply:opacity-100 group-hover/reply:pointer-events-auto group-focus-within/reply:opacity-100 group-focus-within/reply:pointer-events-auto group-data-[actions=open]/reply:opacity-100 group-data-[actions=open]/reply:pointer-events-auto";
|
|
62
|
+
const followUpsClasses = "flex w-full flex-col gap-2";
|
|
63
|
+
const followUpClasses = "w-full";
|
|
64
|
+
const barClasses = "grid-page w-full shrink-0 !pt-0 !pb-6";
|
|
65
|
+
const composerClasses = "col-span-full";
|
|
66
|
+
const startGateCardClasses = "h-[411px]";
|
|
67
|
+
const startGateOccupantClasses = "flex min-h-full w-full flex-col gap-3 py-3";
|
|
68
|
+
const startGateStepClasses = "type-supporting text-muted px-1 tabular-nums";
|
|
69
|
+
const startGateOptionsClasses = "flex w-full flex-col";
|
|
70
|
+
const startGateOptionClasses =
|
|
71
|
+
"flex w-full items-center gap-3 border-b border-border py-3 last:border-b-0";
|
|
72
|
+
const startGateOptionNumberClasses = "shrink-0";
|
|
73
|
+
const startOptions = [
|
|
74
|
+
{ value: "brand", label: "Brand identity", description: "Name, mark, and a system you can actually use.", number: 1 },
|
|
75
|
+
{ value: "website", label: "Website", description: "A site that explains the work and earns the next conversation.", number: 2 },
|
|
76
|
+
{ value: "product", label: "Product design", description: "Flows, screens, and the details in between.", number: 3 },
|
|
77
|
+
{ value: "system", label: "Design system", description: "Components, tokens, and the rules that keep them honest.", number: 4 },
|
|
78
|
+
] as const;
|
|
79
|
+
const startBudgets = [
|
|
80
|
+
{ value: "under-10", label: "<$10k", emphasis: "solid" },
|
|
81
|
+
{ value: "10-25", label: "$10–25k", emphasis: "solid" },
|
|
82
|
+
{ value: "25-50", label: "$25–50k", emphasis: "solid" },
|
|
83
|
+
{ value: "50-plus", label: "$50k+", emphasis: "solid" },
|
|
84
|
+
{ value: "unsure", label: "Not sure yet", emphasis: "muted" },
|
|
85
|
+
] as const;
|
|
86
|
+
type IntakeStep = 1 | 2 | 3 | 4;
|
|
87
|
+
type IntakePhase =
|
|
88
|
+
| { kind: "step"; step: IntakeStep }
|
|
89
|
+
| { kind: "done"; variant: "booked" | "emailed" };
|
|
90
|
+
const startGateCopy: Record<IntakeStep, { title: string; subtitle: string }> = {
|
|
91
|
+
1: { title: "Name the work", subtitle: "What are we making?" },
|
|
92
|
+
2: { title: "What's the budget?", subtitle: "A range is enough. We can tighten it after the first conversation." },
|
|
93
|
+
3: { title: "About you", subtitle: "A few sentences is enough. We'll reply to the email you leave here." },
|
|
94
|
+
4: { title: "Book a call", subtitle: "Pick a time, or skip this and we'll write to you instead." },
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
function canContinueStart(
|
|
98
|
+
step: IntakeStep,
|
|
99
|
+
needs: readonly string[],
|
|
100
|
+
budget: string | null,
|
|
101
|
+
about: IntakeAboutValues,
|
|
102
|
+
) {
|
|
103
|
+
if (step === 1) return needs.length > 0;
|
|
104
|
+
if (step === 2) return budget != null;
|
|
105
|
+
if (step === 3) return isIntakeAboutValid(about, intakeDetailsMax);
|
|
106
|
+
return false;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
const headline = "What should we make?";
|
|
110
|
+
const sampleReply =
|
|
111
|
+
"Brand, product, and the sites that explain them. The studio notes cover how a project starts.";
|
|
112
|
+
type ReplyPart = { kind: "word"; text: string } | { kind: "source"; text: string; href: string };
|
|
113
|
+
const replyParts: ReplyPart[] = [
|
|
114
|
+
{ kind: "word", text: "Brand," },
|
|
115
|
+
{ kind: "word", text: "product," },
|
|
116
|
+
{ kind: "word", text: "and" },
|
|
117
|
+
{ kind: "word", text: "the" },
|
|
118
|
+
{ kind: "word", text: "sites" },
|
|
119
|
+
{ kind: "word", text: "that" },
|
|
120
|
+
{ kind: "word", text: "explain" },
|
|
121
|
+
{ kind: "word", text: "them." },
|
|
122
|
+
{ kind: "word", text: "The" },
|
|
123
|
+
{ kind: "source", text: "studio notes", href: "/notes" },
|
|
124
|
+
{ kind: "word", text: "cover" },
|
|
125
|
+
{ kind: "word", text: "how" },
|
|
126
|
+
{ kind: "word", text: "a" },
|
|
127
|
+
{ kind: "word", text: "project" },
|
|
128
|
+
{ kind: "word", text: "starts." },
|
|
129
|
+
];
|
|
130
|
+
const followUps = [
|
|
131
|
+
"What does a brand engagement include?",
|
|
132
|
+
"How do you start a product design?",
|
|
133
|
+
];
|
|
134
|
+
function thoughtForLabel(seconds: number) {
|
|
135
|
+
const n = Math.max(1, Math.floor(seconds));
|
|
136
|
+
return n === 1 ? "Thought for 1 second" : "Thought for " + n + " seconds";
|
|
137
|
+
}
|
|
138
|
+
// Trace choreography in --motion-beat units: a step every 3 beats, the spinner for 2, a 13-beat hold.
|
|
139
|
+
const traceBeats = { step: 3, spin: 2, hold: 13 };
|
|
140
|
+
const traceSteps = ["Read the brief", "Name the brand", "Check the product site", "Find the studio notes"];
|
|
141
|
+
type Point = { top: number; left: number };
|
|
142
|
+
|
|
143
|
+
function partDelay(index: number, reduce: boolean, settleSeconds: number, staggerSeconds: number) {
|
|
144
|
+
if (reduce || index <= 0) return 0;
|
|
145
|
+
let time = 0;
|
|
146
|
+
for (let i = 0; i < index; i += 1) {
|
|
147
|
+
const part = replyParts[i];
|
|
148
|
+
const next = replyParts[i + 1];
|
|
149
|
+
const hold = part?.kind === "source" || next?.kind === "source";
|
|
150
|
+
time += hold ? settleSeconds : staggerSeconds;
|
|
151
|
+
}
|
|
152
|
+
return time;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
function intakeQaPairs(
|
|
156
|
+
needs: readonly string[],
|
|
157
|
+
budget: string | null,
|
|
158
|
+
about: IntakeAboutValues,
|
|
159
|
+
outcome: "booked" | "emailed",
|
|
160
|
+
): ChatQaPair[] {
|
|
161
|
+
const needsAnswer = startOptions
|
|
162
|
+
.filter((option) => needs.includes(option.value))
|
|
163
|
+
.map((option) => option.label)
|
|
164
|
+
.join(", ");
|
|
165
|
+
const budgetAnswer = startBudgets.find((option) => option.value === budget)?.label ?? "";
|
|
166
|
+
const aboutAnswer = [about.name.trim(), about.company.trim()].filter((part) => part.length > 0).join(", ");
|
|
167
|
+
const followUpAnswer = outcome === "booked" ? "Booked a call" : "Email me";
|
|
168
|
+
return [
|
|
169
|
+
{ question: "What are we making?", answer: needsAnswer },
|
|
170
|
+
{ question: "What's the budget?", answer: budgetAnswer },
|
|
171
|
+
{ question: "About you", answer: aboutAnswer },
|
|
172
|
+
{ question: "How should we follow up?", answer: followUpAnswer },
|
|
173
|
+
].filter((pair) => pair.answer.length > 0);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
type Turn =
|
|
177
|
+
| { id: number; kind: "prompt"; prompt: string }
|
|
178
|
+
| { id: number; kind: "intake"; pairs: ChatQaPair[] };
|
|
179
|
+
|
|
180
|
+
function IntakeExchange({
|
|
181
|
+
pairs,
|
|
182
|
+
latest,
|
|
183
|
+
reduce,
|
|
184
|
+
onFollowUp,
|
|
185
|
+
onReplyGrown,
|
|
186
|
+
}: {
|
|
187
|
+
pairs: readonly ChatQaPair[];
|
|
188
|
+
latest: boolean;
|
|
189
|
+
reduce: boolean;
|
|
190
|
+
onFollowUp: (value: string) => void;
|
|
191
|
+
onReplyGrown: () => void;
|
|
192
|
+
}) {
|
|
193
|
+
const fast = motionTransitionProp("fast");
|
|
194
|
+
const [mark, setMark] = useState<"up" | "down" | null>(null);
|
|
195
|
+
const [streamDone, setStreamDone] = useState(reduce);
|
|
196
|
+
const [actionsOpen, setActionsOpen] = useState(false);
|
|
197
|
+
const settleSeconds = readMotionDurationSeconds("fast");
|
|
198
|
+
const staggerSeconds = motionStaggerSeconds();
|
|
199
|
+
|
|
200
|
+
useEffect(() => {
|
|
201
|
+
if (!actionsOpen) return;
|
|
202
|
+
const onPointerDown = (event: PointerEvent) => {
|
|
203
|
+
const target = event.target;
|
|
204
|
+
if (!(target instanceof Node)) return;
|
|
205
|
+
const block = (target as Element).closest?.("[data-reply-actions]");
|
|
206
|
+
if (block != null) return;
|
|
207
|
+
setActionsOpen(false);
|
|
208
|
+
};
|
|
209
|
+
window.addEventListener("pointerdown", onPointerDown);
|
|
210
|
+
return () => window.removeEventListener("pointerdown", onPointerDown);
|
|
211
|
+
}, [actionsOpen]);
|
|
212
|
+
|
|
213
|
+
useEffect(() => {
|
|
214
|
+
if (streamDone) return;
|
|
215
|
+
const last = replyParts.length - 1;
|
|
216
|
+
const wait = (partDelay(last, reduce, settleSeconds, staggerSeconds) + settleSeconds) * 1000;
|
|
217
|
+
const timer = window.setTimeout(() => setStreamDone(true), wait);
|
|
218
|
+
return () => window.clearTimeout(timer);
|
|
219
|
+
}, [reduce, streamDone, settleSeconds, staggerSeconds]);
|
|
220
|
+
|
|
221
|
+
useLayoutEffect(() => {
|
|
222
|
+
onReplyGrown();
|
|
223
|
+
}, [streamDone, onReplyGrown]);
|
|
224
|
+
|
|
225
|
+
function copyReply() {
|
|
226
|
+
if (typeof navigator === "undefined" || navigator.clipboard == null) return;
|
|
227
|
+
void navigator.clipboard.writeText(sampleReply).catch(() => undefined);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
return (
|
|
231
|
+
<>
|
|
232
|
+
<ChatQa pairs={pairs} />
|
|
233
|
+
<div
|
|
234
|
+
className={replyBlockClasses}
|
|
235
|
+
data-reply-actions=""
|
|
236
|
+
data-actions={actionsOpen ? "open" : undefined}
|
|
237
|
+
onClick={() => {
|
|
238
|
+
if (typeof window === "undefined") return;
|
|
239
|
+
if (!window.matchMedia("(hover: none)").matches) return;
|
|
240
|
+
setActionsOpen(true);
|
|
241
|
+
}}
|
|
242
|
+
>
|
|
243
|
+
<p className={replyClasses} aria-busy={streamDone ? undefined : true}>
|
|
244
|
+
{replyParts.map((part, index) => (
|
|
245
|
+
<ReplyWord
|
|
246
|
+
key={part.kind + "-" + index}
|
|
247
|
+
part={part}
|
|
248
|
+
index={index}
|
|
249
|
+
reduce={reduce}
|
|
250
|
+
delay={partDelay(index, reduce, settleSeconds, staggerSeconds)}
|
|
251
|
+
settle={fast}
|
|
252
|
+
onDone={index === replyParts.length - 1 ? () => setStreamDone(true) : undefined}
|
|
253
|
+
/>
|
|
254
|
+
))}
|
|
255
|
+
</p>
|
|
256
|
+
{streamDone ? (
|
|
257
|
+
<div className={actionsClasses}>
|
|
258
|
+
<IconButton aria-label="Copy reply" size="sm" icon={<Copy />} onClick={copyReply} />
|
|
259
|
+
<IconButton
|
|
260
|
+
aria-label="Mark this reply helpful"
|
|
261
|
+
size="sm"
|
|
262
|
+
icon={<ThumbsUp />}
|
|
263
|
+
aria-pressed={mark === "up"}
|
|
264
|
+
onClick={() => setMark((current) => (current === "up" ? null : "up"))}
|
|
265
|
+
/>
|
|
266
|
+
<IconButton
|
|
267
|
+
aria-label="Mark this reply not helpful"
|
|
268
|
+
size="sm"
|
|
269
|
+
icon={<ThumbsDown />}
|
|
270
|
+
aria-pressed={mark === "down"}
|
|
271
|
+
onClick={() => setMark((current) => (current === "down" ? null : "down"))}
|
|
272
|
+
/>
|
|
273
|
+
</div>
|
|
274
|
+
) : null}
|
|
275
|
+
</div>
|
|
276
|
+
{streamDone && latest ? (
|
|
277
|
+
<div className={followUpsClasses}>
|
|
278
|
+
{followUps.map((next) => (
|
|
279
|
+
<Button key={next} role="outline" emphasis="quiet" align="start" size="md" type="button" className={followUpClasses} onClick={() => onFollowUp(next)}>
|
|
280
|
+
{next}
|
|
281
|
+
</Button>
|
|
282
|
+
))}
|
|
283
|
+
</div>
|
|
284
|
+
) : null}
|
|
285
|
+
</>
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
function Exchange({
|
|
290
|
+
prompt,
|
|
291
|
+
arrived = false,
|
|
292
|
+
latest,
|
|
293
|
+
reduce,
|
|
294
|
+
onFollowUp,
|
|
295
|
+
onReplyGrown,
|
|
296
|
+
}: {
|
|
297
|
+
prompt: string;
|
|
298
|
+
/** The prompt came with the page (`initialPrompt`): it is already there, so it does not fade in. */
|
|
299
|
+
arrived?: boolean;
|
|
300
|
+
latest: boolean;
|
|
301
|
+
reduce: boolean;
|
|
302
|
+
onFollowUp: (value: string) => void;
|
|
303
|
+
onReplyGrown: () => void;
|
|
304
|
+
}) {
|
|
305
|
+
const fast = motionTransitionProp("fast");
|
|
306
|
+
const [mark, setMark] = useState<"up" | "down" | null>(null);
|
|
307
|
+
const [revealed, setRevealed] = useState(reduce ? traceSteps.length : 0);
|
|
308
|
+
const [resolved, setResolved] = useState(reduce ? traceSteps.length : 0);
|
|
309
|
+
const [traceOpen, setTraceOpen] = useState(false);
|
|
310
|
+
const [replyReady, setReplyReady] = useState(reduce);
|
|
311
|
+
const [streamDone, setStreamDone] = useState(reduce);
|
|
312
|
+
const [actionsOpen, setActionsOpen] = useState(false);
|
|
313
|
+
const [thoughtSeconds, setThoughtSeconds] = useState(1);
|
|
314
|
+
|
|
315
|
+
useEffect(() => {
|
|
316
|
+
if (reduce || replyReady) return;
|
|
317
|
+
const timer = window.setInterval(() => setThoughtSeconds((current) => current + 1), 1000);
|
|
318
|
+
return () => window.clearInterval(timer);
|
|
319
|
+
}, [reduce, replyReady]);
|
|
320
|
+
|
|
321
|
+
useEffect(() => {
|
|
322
|
+
if (reduce) return;
|
|
323
|
+
const beatMs = motionBeatSeconds(traceBeats.step) * 1000;
|
|
324
|
+
const spinMs = motionBeatSeconds(traceBeats.spin) * 1000;
|
|
325
|
+
const timers: number[] = [];
|
|
326
|
+
for (let index = 1; index <= traceSteps.length; index += 1) {
|
|
327
|
+
timers.push(window.setTimeout(() => setRevealed(index), index * beatMs));
|
|
328
|
+
timers.push(window.setTimeout(() => setResolved(index), index * beatMs + spinMs));
|
|
329
|
+
}
|
|
330
|
+
timers.push(window.setTimeout(() => {
|
|
331
|
+
setTraceOpen(false);
|
|
332
|
+
setReplyReady(true);
|
|
333
|
+
}, motionBeatSeconds(traceSteps.length * traceBeats.step + traceBeats.hold) * 1000));
|
|
334
|
+
return () => {
|
|
335
|
+
for (const timer of timers) window.clearTimeout(timer);
|
|
336
|
+
};
|
|
337
|
+
}, [reduce]);
|
|
338
|
+
|
|
339
|
+
const settleSeconds = readMotionDurationSeconds("fast");
|
|
340
|
+
const staggerSeconds = motionStaggerSeconds();
|
|
341
|
+
|
|
342
|
+
useEffect(() => {
|
|
343
|
+
if (!replyReady || streamDone) return;
|
|
344
|
+
const last = replyParts.length - 1;
|
|
345
|
+
const wait = (partDelay(last, reduce, settleSeconds, staggerSeconds) + settleSeconds) * 1000;
|
|
346
|
+
const timer = window.setTimeout(() => setStreamDone(true), wait);
|
|
347
|
+
return () => window.clearTimeout(timer);
|
|
348
|
+
}, [replyReady, reduce, streamDone, settleSeconds, staggerSeconds]);
|
|
349
|
+
|
|
350
|
+
useEffect(() => {
|
|
351
|
+
if (!actionsOpen) return;
|
|
352
|
+
const onPointerDown = (event: PointerEvent) => {
|
|
353
|
+
const target = event.target;
|
|
354
|
+
if (!(target instanceof Node)) return;
|
|
355
|
+
const block = (target as Element).closest?.("[data-reply-actions]");
|
|
356
|
+
if (block != null) return;
|
|
357
|
+
setActionsOpen(false);
|
|
358
|
+
};
|
|
359
|
+
window.addEventListener("pointerdown", onPointerDown);
|
|
360
|
+
return () => window.removeEventListener("pointerdown", onPointerDown);
|
|
361
|
+
}, [actionsOpen]);
|
|
362
|
+
|
|
363
|
+
useLayoutEffect(() => {
|
|
364
|
+
if (!replyReady) return;
|
|
365
|
+
onReplyGrown();
|
|
366
|
+
}, [replyReady, streamDone, onReplyGrown]);
|
|
367
|
+
|
|
368
|
+
function copyReply() {
|
|
369
|
+
if (typeof navigator === "undefined" || navigator.clipboard == null) return;
|
|
370
|
+
void navigator.clipboard.writeText(sampleReply).catch(() => undefined);
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
return (
|
|
374
|
+
<>
|
|
375
|
+
<motion.p
|
|
376
|
+
className={userClasses}
|
|
377
|
+
initial={reduce || arrived ? false : { opacity: 0 }}
|
|
378
|
+
animate={{ opacity: 1 }}
|
|
379
|
+
transition={reduce ? { duration: 0 } : fast}
|
|
380
|
+
>
|
|
381
|
+
{prompt}
|
|
382
|
+
</motion.p>
|
|
383
|
+
{replyReady ? null : (
|
|
384
|
+
<div className={traceClasses} aria-busy="true">
|
|
385
|
+
<Button layout="row" width="hug" role="ghost" type="button" aria-expanded={traceOpen} onClick={() => setTraceOpen((current) => !current)}>
|
|
386
|
+
<Sparkle className={traceIconClasses} strokeWidth={2} aria-hidden />
|
|
387
|
+
<span className={thoughtLabelClasses}>{thoughtForLabel(thoughtSeconds)}</span>
|
|
388
|
+
<ChevronDown className={traceChevronClasses + (traceOpen ? " rotate-180" : "")} strokeWidth={2} aria-hidden />
|
|
389
|
+
</Button>
|
|
390
|
+
{traceOpen ? (
|
|
391
|
+
<div className={traceBodyClasses}>
|
|
392
|
+
{traceSteps.slice(0, revealed).map((step, index) => (
|
|
393
|
+
<motion.div
|
|
394
|
+
key={step}
|
|
395
|
+
className={traceLineClasses}
|
|
396
|
+
{...motionBlurReveal(reduce)}
|
|
397
|
+
transition={reduce ? { duration: 0 } : fast}
|
|
398
|
+
>
|
|
399
|
+
{index < resolved ? (
|
|
400
|
+
<Check className={traceIconClasses} strokeWidth={2} aria-hidden />
|
|
401
|
+
) : (
|
|
402
|
+
<LoaderCircle className={traceSpinClasses} strokeWidth={2} aria-hidden />
|
|
403
|
+
)}
|
|
404
|
+
{step}
|
|
405
|
+
</motion.div>
|
|
406
|
+
))}
|
|
407
|
+
</div>
|
|
408
|
+
) : null}
|
|
409
|
+
</div>
|
|
410
|
+
)}
|
|
411
|
+
{replyReady ? (
|
|
412
|
+
<>
|
|
413
|
+
<div
|
|
414
|
+
className={replyBlockClasses}
|
|
415
|
+
data-reply-actions=""
|
|
416
|
+
data-actions={actionsOpen ? "open" : undefined}
|
|
417
|
+
onClick={() => {
|
|
418
|
+
if (typeof window === "undefined") return;
|
|
419
|
+
if (!window.matchMedia("(hover: none)").matches) return;
|
|
420
|
+
setActionsOpen(true);
|
|
421
|
+
}}
|
|
422
|
+
>
|
|
423
|
+
<p className={replyClasses} aria-busy={streamDone ? undefined : true}>
|
|
424
|
+
{replyParts.map((part, index) => (
|
|
425
|
+
<ReplyWord
|
|
426
|
+
key={part.kind + "-" + index}
|
|
427
|
+
part={part}
|
|
428
|
+
index={index}
|
|
429
|
+
reduce={reduce}
|
|
430
|
+
delay={partDelay(index, reduce, settleSeconds, staggerSeconds)}
|
|
431
|
+
settle={fast}
|
|
432
|
+
onDone={index === replyParts.length - 1 ? () => setStreamDone(true) : undefined}
|
|
433
|
+
/>
|
|
434
|
+
))}
|
|
435
|
+
</p>
|
|
436
|
+
{streamDone ? (
|
|
437
|
+
<div className={actionsClasses}>
|
|
438
|
+
<IconButton aria-label="Copy reply" size="sm" icon={<Copy />} onClick={copyReply} />
|
|
439
|
+
<IconButton
|
|
440
|
+
aria-label="Mark this reply helpful"
|
|
441
|
+
size="sm"
|
|
442
|
+
icon={<ThumbsUp />}
|
|
443
|
+
aria-pressed={mark === "up"}
|
|
444
|
+
onClick={() => setMark((current) => (current === "up" ? null : "up"))}
|
|
445
|
+
/>
|
|
446
|
+
<IconButton
|
|
447
|
+
aria-label="Mark this reply not helpful"
|
|
448
|
+
size="sm"
|
|
449
|
+
icon={<ThumbsDown />}
|
|
450
|
+
aria-pressed={mark === "down"}
|
|
451
|
+
onClick={() => setMark((current) => (current === "down" ? null : "down"))}
|
|
452
|
+
/>
|
|
453
|
+
</div>
|
|
454
|
+
) : null}
|
|
455
|
+
</div>
|
|
456
|
+
{streamDone && latest ? (
|
|
457
|
+
<div className={followUpsClasses}>
|
|
458
|
+
{followUps.map((next) => (
|
|
459
|
+
<Button key={next} role="outline" emphasis="quiet" align="start" size="md" type="button" className={followUpClasses} onClick={() => onFollowUp(next)}>
|
|
460
|
+
{next}
|
|
461
|
+
</Button>
|
|
462
|
+
))}
|
|
463
|
+
</div>
|
|
464
|
+
) : null}
|
|
465
|
+
</>
|
|
466
|
+
) : null}
|
|
467
|
+
</>
|
|
468
|
+
);
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function StartGate({
|
|
472
|
+
phase,
|
|
473
|
+
needs,
|
|
474
|
+
onNeedsChange,
|
|
475
|
+
budget,
|
|
476
|
+
onBudgetChange,
|
|
477
|
+
about,
|
|
478
|
+
onAboutChange,
|
|
479
|
+
onCancel,
|
|
480
|
+
onBack,
|
|
481
|
+
onNext,
|
|
482
|
+
onBooked,
|
|
483
|
+
onEmailed,
|
|
484
|
+
onDone,
|
|
485
|
+
}: {
|
|
486
|
+
phase: IntakePhase;
|
|
487
|
+
needs: readonly string[];
|
|
488
|
+
onNeedsChange: (values: string[]) => void;
|
|
489
|
+
budget: string | null;
|
|
490
|
+
onBudgetChange: (value: string) => void;
|
|
491
|
+
about: IntakeAboutValues;
|
|
492
|
+
onAboutChange: (values: IntakeAboutValues) => void;
|
|
493
|
+
onCancel: () => void;
|
|
494
|
+
onBack: () => void;
|
|
495
|
+
onNext: () => void;
|
|
496
|
+
onBooked: () => void;
|
|
497
|
+
onEmailed: () => void;
|
|
498
|
+
onDone: () => void;
|
|
499
|
+
}) {
|
|
500
|
+
const step: IntakeStep = phase.kind === "step" ? phase.step : 4;
|
|
501
|
+
const copy = startGateCopy[step];
|
|
502
|
+
const atStart = phase.kind !== "step" || phase.step <= 1;
|
|
503
|
+
const hideContinue = phase.kind === "done" || (phase.kind === "step" && phase.step === 4);
|
|
504
|
+
const hideFooter = phase.kind === "done";
|
|
505
|
+
const continueDisabled =
|
|
506
|
+
phase.kind !== "step" || !canContinueStart(phase.step, needs, budget, about);
|
|
507
|
+
const stepOneOpen = phase.kind === "step" && phase.step === 1;
|
|
508
|
+
|
|
509
|
+
function toggleNeed(value: string, checked: boolean) {
|
|
510
|
+
if (checked) {
|
|
511
|
+
onNeedsChange([...needs, value]);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
onNeedsChange(needs.filter((item) => item !== value));
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
useKbdChoiceKeys({
|
|
518
|
+
enabled: stepOneOpen,
|
|
519
|
+
choices: Object.fromEntries(
|
|
520
|
+
startOptions.map((option) => [
|
|
521
|
+
String(option.number),
|
|
522
|
+
() => toggleNeed(option.value, !needs.includes(option.value)),
|
|
523
|
+
]),
|
|
524
|
+
),
|
|
525
|
+
});
|
|
526
|
+
|
|
527
|
+
return (
|
|
528
|
+
<Card shape="rounded" padding="none" variant="surface" aria-label={copy.title} className={startGateCardClasses}>
|
|
529
|
+
<Card.Header
|
|
530
|
+
start={
|
|
531
|
+
phase.kind === "done" ? (
|
|
532
|
+
<h2 className={cardTitleClasses}>Start a project</h2>
|
|
533
|
+
) : (
|
|
534
|
+
<>
|
|
535
|
+
<h2 className={cardTitleClasses}>{copy.title}</h2>
|
|
536
|
+
<p className={cardSubtitleClasses}>{copy.subtitle}</p>
|
|
537
|
+
</>
|
|
538
|
+
)
|
|
539
|
+
}
|
|
540
|
+
end={
|
|
541
|
+
<>
|
|
542
|
+
{phase.kind === "step" ? (
|
|
543
|
+
<>
|
|
544
|
+
<IconButton aria-label="Previous step" size="sm" icon={<ChevronLeft />} disabled={atStart} onClick={onBack} />
|
|
545
|
+
<span className={startGateStepClasses}>{step} of 4</span>
|
|
546
|
+
<IconButton aria-label="Next step" size="sm" icon={<ChevronRight />} disabled={hideContinue || continueDisabled} onClick={onNext} />
|
|
547
|
+
</>
|
|
548
|
+
) : null}
|
|
549
|
+
<IconButton aria-label="Close starter" size="sm" icon={<X />} onClick={onCancel} />
|
|
550
|
+
</>
|
|
551
|
+
}
|
|
552
|
+
/>
|
|
553
|
+
<Card.Body>
|
|
554
|
+
<div className={cardLayoutBodyOccupantWellClasses + " " + cardLayoutBodyOccupantInsetXClasses + " " + startGateOccupantClasses}>
|
|
555
|
+
{phase.kind === "done" ? <IntakeConfirmation variant={phase.variant} onDone={onDone} /> : null}
|
|
556
|
+
{phase.kind === "step" && phase.step === 1 ? (
|
|
557
|
+
<div className={startGateOptionsClasses} role="group" aria-label={copy.subtitle}>
|
|
558
|
+
{startOptions.map((option) => (
|
|
559
|
+
<div key={option.value} className={startGateOptionClasses}>
|
|
560
|
+
<Checkbox
|
|
561
|
+
className="min-w-0 flex-1"
|
|
562
|
+
size="md"
|
|
563
|
+
label={option.label}
|
|
564
|
+
description={option.description}
|
|
565
|
+
checked={needs.includes(option.value)}
|
|
566
|
+
onChange={(event) => toggleNeed(option.value, event.target.checked)}
|
|
567
|
+
/>
|
|
568
|
+
<Kbd className={startGateOptionNumberClasses} aria-label={"Press " + option.number}>
|
|
569
|
+
{option.number}
|
|
570
|
+
</Kbd>
|
|
571
|
+
</div>
|
|
572
|
+
))}
|
|
573
|
+
</div>
|
|
574
|
+
) : null}
|
|
575
|
+
{phase.kind === "step" && phase.step === 2 ? (
|
|
576
|
+
<PillGroup aria-label="Budget" value={budget} onValueChange={onBudgetChange}>
|
|
577
|
+
{startBudgets.map((option) => (
|
|
578
|
+
<PillGroup.Item key={option.value} value={option.value} emphasis={option.emphasis}>
|
|
579
|
+
{option.label}
|
|
580
|
+
</PillGroup.Item>
|
|
581
|
+
))}
|
|
582
|
+
</PillGroup>
|
|
583
|
+
) : null}
|
|
584
|
+
{phase.kind === "step" && phase.step === 3 ? (
|
|
585
|
+
<IntakeForm values={about} onChange={onAboutChange} />
|
|
586
|
+
) : null}
|
|
587
|
+
{phase.kind === "step" && phase.step === 4 ? (
|
|
588
|
+
<CalEmbed skip={false}>
|
|
589
|
+
<Button role="primary" type="button" onClick={onBooked}>Confirm this time</Button>
|
|
590
|
+
</CalEmbed>
|
|
591
|
+
) : null}
|
|
592
|
+
</div>
|
|
593
|
+
</Card.Body>
|
|
594
|
+
{hideFooter ? null : (
|
|
595
|
+
<Card.Footer>
|
|
596
|
+
{phase.kind === "step" && phase.step === 4 ? (
|
|
597
|
+
<CalEmbed.Skip onSkip={onEmailed} />
|
|
598
|
+
) : null}
|
|
599
|
+
<div className="ml-auto flex items-center gap-2">
|
|
600
|
+
<Button role="secondary" size="md" type="button" onClick={onCancel}>Cancel</Button>
|
|
601
|
+
{hideContinue ? null : (
|
|
602
|
+
<Button role="primary" size="md" type="button" disabled={continueDisabled} onClick={onNext}>Next</Button>
|
|
603
|
+
)}
|
|
604
|
+
</div>
|
|
605
|
+
</Card.Footer>
|
|
606
|
+
)}
|
|
607
|
+
</Card>
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* `initialPrompt` hands off from the marketing composer: read it from the URL (`/ask?q=…`)
|
|
613
|
+
* and the page opens on that first exchange instead of the landing headline.
|
|
614
|
+
*/
|
|
615
|
+
export function AskWhatMatters({ initialPrompt }: { initialPrompt?: string } = {}) {
|
|
616
|
+
const reduce = useReducedMotion() === true;
|
|
617
|
+
const travel = motionTransitionProp("medium");
|
|
618
|
+
const fieldRef = useRef<HTMLTextAreaElement>(null);
|
|
619
|
+
const headlineRef = useRef<HTMLHeadingElement>(null);
|
|
620
|
+
const stageRef = useRef<HTMLElement>(null);
|
|
621
|
+
const threadRef = useRef<HTMLDivElement>(null);
|
|
622
|
+
const composerRef = useRef<HTMLDivElement>(null);
|
|
623
|
+
const stickToEnd = useRef(true);
|
|
624
|
+
const [startGateOpen, setStartGateOpen] = useState(false);
|
|
625
|
+
const [startPhase, setStartPhase] = useState<IntakePhase>({ kind: "step", step: 1 });
|
|
626
|
+
const [startNeeds, setStartNeeds] = useState<string[]>([]);
|
|
627
|
+
const [startBudget, setStartBudget] = useState<string | null>(null);
|
|
628
|
+
const [startAbout, setStartAbout] = useState<IntakeAboutValues>(intakeAboutEmpty);
|
|
629
|
+
const suppressScroll = useRef(false);
|
|
630
|
+
const nextId = useRef(1);
|
|
631
|
+
const [draft, setDraft] = useState("");
|
|
632
|
+
const [turns, setTurns] = useState<Turn[]>(() => {
|
|
633
|
+
const first = initialPrompt?.trim();
|
|
634
|
+
return first ? [{ id: 0, kind: "prompt", prompt: first }] : [];
|
|
635
|
+
});
|
|
636
|
+
const [headlineExit, setHeadlineExit] = useState<Point | null>(null);
|
|
637
|
+
const [composerSpace, setComposerSpace] = useState(0);
|
|
638
|
+
const chatting = turns.length > 0;
|
|
639
|
+
|
|
640
|
+
const scrollStageToEnd = useCallback(() => {
|
|
641
|
+
const stage = stageRef.current;
|
|
642
|
+
if (stage == null || !stickToEnd.current) return;
|
|
643
|
+
const before = stage.scrollTop;
|
|
644
|
+
suppressScroll.current = true;
|
|
645
|
+
stage.scrollTop = stage.scrollHeight;
|
|
646
|
+
if (stage.scrollTop === before) suppressScroll.current = false;
|
|
647
|
+
}, []);
|
|
648
|
+
|
|
649
|
+
useLayoutEffect(() => {
|
|
650
|
+
const composer = composerRef.current;
|
|
651
|
+
if (composer == null) return;
|
|
652
|
+
const apply = () => {
|
|
653
|
+
const stage = stageRef.current;
|
|
654
|
+
const height = composer.offsetHeight;
|
|
655
|
+
const composerBottom = composer.getBoundingClientRect().bottom;
|
|
656
|
+
const bottoms = [stage, stage?.parentElement]
|
|
657
|
+
.filter((node) => node instanceof HTMLElement)
|
|
658
|
+
.map((node) => node.getBoundingClientRect().bottom);
|
|
659
|
+
if (typeof window !== "undefined") bottoms.push(window.innerHeight);
|
|
660
|
+
const tail = bottoms.reduce((extra, bottom) => Math.max(extra, bottom - composerBottom), 0);
|
|
661
|
+
const next = Math.ceil(height + Math.max(0, tail));
|
|
662
|
+
setComposerSpace((current) => (current === next ? current : next));
|
|
663
|
+
};
|
|
664
|
+
apply();
|
|
665
|
+
if (typeof ResizeObserver === "undefined") return;
|
|
666
|
+
const observer = new ResizeObserver(apply);
|
|
667
|
+
observer.observe(composer);
|
|
668
|
+
const stage = stageRef.current;
|
|
669
|
+
if (stage != null) observer.observe(stage);
|
|
670
|
+
if (stage?.parentElement != null) observer.observe(stage.parentElement);
|
|
671
|
+
return () => observer.disconnect();
|
|
672
|
+
}, []);
|
|
673
|
+
|
|
674
|
+
useEffect(() => {
|
|
675
|
+
const stage = stageRef.current;
|
|
676
|
+
if (stage == null) return;
|
|
677
|
+
const onScroll = () => {
|
|
678
|
+
if (suppressScroll.current) {
|
|
679
|
+
suppressScroll.current = false;
|
|
680
|
+
return;
|
|
681
|
+
}
|
|
682
|
+
const distance = stage.scrollHeight - stage.clientHeight - stage.scrollTop;
|
|
683
|
+
stickToEnd.current = distance <= 4;
|
|
684
|
+
};
|
|
685
|
+
stage.addEventListener("scroll", onScroll, { passive: true });
|
|
686
|
+
return () => stage.removeEventListener("scroll", onScroll);
|
|
687
|
+
}, []);
|
|
688
|
+
|
|
689
|
+
useEffect(() => {
|
|
690
|
+
const thread = threadRef.current;
|
|
691
|
+
if (thread == null || typeof ResizeObserver === "undefined") return;
|
|
692
|
+
const observer = new ResizeObserver(() => {
|
|
693
|
+
scrollStageToEnd();
|
|
694
|
+
});
|
|
695
|
+
observer.observe(thread);
|
|
696
|
+
return () => observer.disconnect();
|
|
697
|
+
}, [chatting, scrollStageToEnd]);
|
|
698
|
+
|
|
699
|
+
useLayoutEffect(() => {
|
|
700
|
+
scrollStageToEnd();
|
|
701
|
+
}, [turns.length, composerSpace, scrollStageToEnd]);
|
|
702
|
+
|
|
703
|
+
function closeStartGate() {
|
|
704
|
+
setStartGateOpen(false);
|
|
705
|
+
setStartPhase({ kind: "step", step: 1 });
|
|
706
|
+
setStartNeeds([]);
|
|
707
|
+
setStartBudget(null);
|
|
708
|
+
setStartAbout(intakeAboutEmpty);
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
function openStartGate() {
|
|
712
|
+
setStartPhase({ kind: "step", step: 1 });
|
|
713
|
+
setStartNeeds([]);
|
|
714
|
+
setStartBudget(null);
|
|
715
|
+
setStartAbout(intakeAboutEmpty);
|
|
716
|
+
setStartGateOpen(true);
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
function goHome() {
|
|
720
|
+
setTurns([]);
|
|
721
|
+
setDraft("");
|
|
722
|
+
setHeadlineExit(null);
|
|
723
|
+
closeStartGate();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
function onBrandClick(event: MouseEvent<HTMLDivElement>) {
|
|
727
|
+
const target = event.target;
|
|
728
|
+
if (!(target instanceof Element)) return;
|
|
729
|
+
const home = target.closest("a[aria-label='WhatMatters']");
|
|
730
|
+
if (home == null) return;
|
|
731
|
+
event.preventDefault();
|
|
732
|
+
goHome();
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
function send(value: string) {
|
|
736
|
+
const text = value.trim();
|
|
737
|
+
if (text.length === 0) return;
|
|
738
|
+
stickToEnd.current = true;
|
|
739
|
+
const fromLanding = turns.length === 0;
|
|
740
|
+
const title = headlineRef.current?.getBoundingClientRect();
|
|
741
|
+
const id = nextId.current;
|
|
742
|
+
nextId.current += 1;
|
|
743
|
+
setDraft("");
|
|
744
|
+
setTurns((current) => [...current, { id, kind: "prompt", prompt: text }]);
|
|
745
|
+
if (reduce || !fromLanding || title == null) {
|
|
746
|
+
setHeadlineExit(null);
|
|
747
|
+
return;
|
|
748
|
+
}
|
|
749
|
+
setHeadlineExit({ top: title.top, left: title.left });
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function finishStartGate() {
|
|
753
|
+
const outcome = startPhase.kind === "done" ? startPhase.variant : "emailed";
|
|
754
|
+
const pairs = intakeQaPairs(startNeeds, startBudget, startAbout, outcome);
|
|
755
|
+
stickToEnd.current = true;
|
|
756
|
+
const id = nextId.current;
|
|
757
|
+
nextId.current += 1;
|
|
758
|
+
setTurns((current) => [...current, { id, kind: "intake", pairs }]);
|
|
759
|
+
closeStartGate();
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
return (
|
|
763
|
+
<ConfettiProvider>
|
|
764
|
+
<div className={pageClasses}>
|
|
765
|
+
{chatting ? (
|
|
766
|
+
<div onClick={onBrandClick}>
|
|
767
|
+
<SiteNav
|
|
768
|
+
start={<SiteNav.Brand href="/" aria-label="WhatMatters" icon={<Sparkles />} />}
|
|
769
|
+
middle={
|
|
770
|
+
<SiteNav.Links>
|
|
771
|
+
<SiteNav.Link href="/product" current>Product</SiteNav.Link>
|
|
772
|
+
<SiteNav.Link href="/pricing">Pricing</SiteNav.Link>
|
|
773
|
+
<SiteNav.Link href="/customers">Customers</SiteNav.Link>
|
|
774
|
+
</SiteNav.Links>
|
|
775
|
+
}
|
|
776
|
+
end={
|
|
777
|
+
<>
|
|
778
|
+
<Button role="ghost" size="sm" render={<a href="/signin" />} className="whitespace-nowrap">Sign in</Button>
|
|
779
|
+
<Button role="primary" size="sm" type="button" className="whitespace-nowrap" onClick={openStartGate}>Start Project</Button>
|
|
780
|
+
</>
|
|
781
|
+
}
|
|
782
|
+
mobile={
|
|
783
|
+
<>
|
|
784
|
+
<SiteNav.MobileLink href="/product" current>Product</SiteNav.MobileLink>
|
|
785
|
+
<SiteNav.MobileLink href="/pricing">Pricing</SiteNav.MobileLink>
|
|
786
|
+
<SiteNav.MobileLink href="/customers">Customers</SiteNav.MobileLink>
|
|
787
|
+
</>
|
|
788
|
+
}
|
|
789
|
+
/>
|
|
790
|
+
</div>
|
|
791
|
+
) : null}
|
|
792
|
+
<div className={columnClasses}>
|
|
793
|
+
<main ref={stageRef} className={chatting ? stageClasses : stageClasses + " " + landingClasses}>
|
|
794
|
+
{chatting ? (
|
|
795
|
+
<div ref={threadRef} className={threadClasses} style={{ paddingBottom: composerSpace }}>
|
|
796
|
+
{turns.map((turn, index) =>
|
|
797
|
+
turn.kind === "intake" ? (
|
|
798
|
+
<IntakeExchange
|
|
799
|
+
key={turn.id}
|
|
800
|
+
pairs={turn.pairs}
|
|
801
|
+
latest={index === turns.length - 1}
|
|
802
|
+
reduce={reduce}
|
|
803
|
+
onFollowUp={send}
|
|
804
|
+
onReplyGrown={scrollStageToEnd}
|
|
805
|
+
/>
|
|
806
|
+
) : (
|
|
807
|
+
<Exchange
|
|
808
|
+
key={turn.id}
|
|
809
|
+
prompt={turn.prompt}
|
|
810
|
+
arrived={turn.id === 0}
|
|
811
|
+
latest={index === turns.length - 1}
|
|
812
|
+
reduce={reduce}
|
|
813
|
+
onFollowUp={send}
|
|
814
|
+
onReplyGrown={scrollStageToEnd}
|
|
815
|
+
/>
|
|
816
|
+
),
|
|
817
|
+
)}
|
|
818
|
+
</div>
|
|
819
|
+
) : (
|
|
820
|
+
<h1 ref={headlineRef} className={headlineClasses}>{headline}</h1>
|
|
821
|
+
)}
|
|
822
|
+
</main>
|
|
823
|
+
<div className={barClasses}>
|
|
824
|
+
<div ref={composerRef} className={composerClasses}>
|
|
825
|
+
{startGateOpen ? (
|
|
826
|
+
<StartGate
|
|
827
|
+
phase={startPhase}
|
|
828
|
+
needs={startNeeds}
|
|
829
|
+
onNeedsChange={setStartNeeds}
|
|
830
|
+
budget={startBudget}
|
|
831
|
+
onBudgetChange={setStartBudget}
|
|
832
|
+
about={startAbout}
|
|
833
|
+
onAboutChange={setStartAbout}
|
|
834
|
+
onCancel={closeStartGate}
|
|
835
|
+
onBack={() => {
|
|
836
|
+
if (startPhase.kind !== "step" || startPhase.step <= 1) return;
|
|
837
|
+
setStartPhase({ kind: "step", step: (startPhase.step - 1) as IntakeStep });
|
|
838
|
+
}}
|
|
839
|
+
onNext={() => {
|
|
840
|
+
if (startPhase.kind !== "step") return;
|
|
841
|
+
if (!canContinueStart(startPhase.step, startNeeds, startBudget, startAbout)) return;
|
|
842
|
+
if (startPhase.step >= 4) return;
|
|
843
|
+
setStartPhase({ kind: "step", step: (startPhase.step + 1) as IntakeStep });
|
|
844
|
+
}}
|
|
845
|
+
onBooked={() => setStartPhase({ kind: "done", variant: "booked" })}
|
|
846
|
+
onEmailed={() => setStartPhase({ kind: "done", variant: "emailed" })}
|
|
847
|
+
onDone={finishStartGate}
|
|
848
|
+
/>
|
|
849
|
+
) : (
|
|
850
|
+
<PromptBar ref={fieldRef} value={draft} onValueChange={setDraft} onSend={send} />
|
|
851
|
+
)}
|
|
852
|
+
</div>
|
|
853
|
+
</div>
|
|
854
|
+
</div>
|
|
855
|
+
{headlineExit != null ? (
|
|
856
|
+
<motion.p
|
|
857
|
+
aria-hidden
|
|
858
|
+
className={headlineClasses + " pointer-events-none fixed z-10 m-0"}
|
|
859
|
+
style={{ top: headlineExit.top, left: headlineExit.left }}
|
|
860
|
+
initial={{ opacity: 1, y: 0 }}
|
|
861
|
+
animate={{ opacity: 0, y: -12 }}
|
|
862
|
+
transition={travel}
|
|
863
|
+
onAnimationComplete={() => setHeadlineExit(null)}
|
|
864
|
+
>
|
|
865
|
+
{headline}
|
|
866
|
+
</motion.p>
|
|
867
|
+
) : null}
|
|
868
|
+
</div>
|
|
869
|
+
</ConfettiProvider>
|
|
870
|
+
);
|
|
871
|
+
}
|
|
872
|
+
|
|
873
|
+
function ReplyWord({
|
|
874
|
+
part,
|
|
875
|
+
index,
|
|
876
|
+
reduce,
|
|
877
|
+
delay,
|
|
878
|
+
settle,
|
|
879
|
+
onDone,
|
|
880
|
+
}: {
|
|
881
|
+
part: ReplyPart;
|
|
882
|
+
index: number;
|
|
883
|
+
reduce: boolean;
|
|
884
|
+
delay: number;
|
|
885
|
+
settle: Transition;
|
|
886
|
+
onDone?: () => void;
|
|
887
|
+
}) {
|
|
888
|
+
return (
|
|
889
|
+
<motion.span
|
|
890
|
+
className="inline"
|
|
891
|
+
{...motionBlurReveal(reduce)}
|
|
892
|
+
transition={reduce ? { duration: 0 } : { ...settle, delay }}
|
|
893
|
+
onAnimationComplete={onDone}
|
|
894
|
+
>
|
|
895
|
+
{index > 0 ? " " : null}
|
|
896
|
+
{part.kind === "source" ? <TextLink href={part.href}>{part.text}</TextLink> : part.text}
|
|
897
|
+
</motion.span>
|
|
898
|
+
);
|
|
899
|
+
}
|