@thewhatmatters/wmds 0.2.0 → 0.3.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.
Files changed (134) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/CONSUMING.md +4 -4
  3. package/README.md +3 -3
  4. package/dist/styles.css +1 -1
  5. package/docs/component-contracts.md +1 -1
  6. package/docs/components.md +6 -6
  7. package/docs/exports.json +1 -13
  8. package/docs/patterns/components-avatar--dropdown-row.tsx +1 -1
  9. package/docs/patterns/components-badge--with-avatar.tsx +1 -1
  10. package/docs/patterns/components-button-button--destructive-action.tsx +1 -1
  11. package/docs/patterns/components-button-button--ghost-action.tsx +1 -1
  12. package/docs/patterns/components-button-button--inverse-action.tsx +1 -1
  13. package/docs/patterns/components-button-button--link-render.tsx +1 -1
  14. package/docs/patterns/components-button-button--multi-state-badge.tsx +1 -1
  15. package/docs/patterns/components-button-button--outline-mono.tsx +1 -1
  16. package/docs/patterns/components-button-button--primary-action.tsx +1 -1
  17. package/docs/patterns/components-button-button--row-hug.tsx +1 -1
  18. package/docs/patterns/components-button-button--row-layout.tsx +1 -1
  19. package/docs/patterns/components-button-button--secondary-action.tsx +1 -1
  20. package/docs/patterns/components-button-button--suggestion-pills.tsx +1 -1
  21. package/docs/patterns/components-button-button--with-count.tsx +1 -1
  22. package/docs/patterns/components-button-button--with-icon.tsx +1 -1
  23. package/docs/patterns/components-button-floatingactionbutton--vertical-actions.tsx +1 -1
  24. package/docs/patterns/components-calembed--pattern-skip-in-footer.tsx +1 -1
  25. package/docs/patterns/components-card-card--body-slot-occupancy-history.tsx +1 -1
  26. package/docs/patterns/components-card-card--headerless-media.tsx +1 -1
  27. package/docs/patterns/components-card-card--outlined-layout.tsx +1 -1
  28. package/docs/patterns/components-card-card--pinned-height.tsx +1 -1
  29. package/docs/patterns/components-card-selectablecard--selectable-cards-pattern.tsx +1 -1
  30. package/docs/patterns/components-chart--audience-activity-heatmap.tsx +1 -1
  31. package/docs/patterns/components-chart--cartesian-no-data-gaps.tsx +1 -1
  32. package/docs/patterns/components-chart--occupancy-history-in-card.tsx +1 -1
  33. package/docs/patterns/components-chart--occupancy-in-card.tsx +1 -1
  34. package/docs/patterns/components-chart--post-reach-distribution.tsx +1 -1
  35. package/docs/patterns/components-chart--ranked-audience-breakdown.tsx +1 -1
  36. package/docs/patterns/components-chart--unit-grid-composition.tsx +1 -1
  37. package/docs/patterns/components-chatqa--pattern-qa-with-reply.tsx +1 -1
  38. package/docs/patterns/components-checkbox-checkbox--default.tsx +1 -1
  39. package/docs/patterns/components-checkbox-checkbox--with-description.tsx +1 -1
  40. package/docs/patterns/components-checkbox-checkboxgroup--default.tsx +1 -1
  41. package/docs/patterns/components-dialog--alert-dialog-destructive.tsx +1 -1
  42. package/docs/patterns/components-dialog--default-dialog.tsx +1 -1
  43. package/docs/patterns/components-dialog--form-dialog.tsx +1 -1
  44. package/docs/patterns/components-displaycontrols--page-utilities.tsx +1 -1
  45. package/docs/patterns/components-field--horizontal-input.tsx +1 -1
  46. package/docs/patterns/components-field--horizontal-text-area.tsx +1 -1
  47. package/docs/patterns/components-field--multi-control.tsx +1 -1
  48. package/docs/patterns/components-footerreveal--marketing-hero-pattern.tsx +1 -1
  49. package/docs/patterns/components-footerreveal--marketing-hero-ruled-pattern.tsx +1 -1
  50. package/docs/patterns/components-footerreveal--marketing-hero-with-gallery-intro.tsx +1 -1
  51. package/docs/patterns/components-footerreveal--marketing-page-pattern.tsx +1 -1
  52. package/docs/patterns/components-footerreveal--ruled-grid-footer-pattern.tsx +1 -1
  53. package/docs/patterns/components-footerreveal--sequenced-marketing-hero.tsx +1 -1
  54. package/docs/patterns/components-herointro--two-line-intro.tsx +1 -1
  55. package/docs/patterns/components-herotilestack--marketing-hero-pattern.tsx +1 -1
  56. package/docs/patterns/components-herotilestack--marketing-hero-text-sequence.tsx +1 -1
  57. package/docs/patterns/components-herotilestack--marketing-hero-with-gallery-intro.tsx +1 -1
  58. package/docs/patterns/components-intakeconfirmation--booked-pattern.tsx +1 -1
  59. package/docs/patterns/components-intakeconfirmation--emailed-pattern.tsx +1 -1
  60. package/docs/patterns/components-intakeform--about-you-pattern.tsx +1 -1
  61. package/docs/patterns/components-intakemodal--intake-modal-pattern.tsx +1 -1
  62. package/docs/patterns/components-kbd--command-row.tsx +1 -1
  63. package/docs/patterns/components-kbd--numbered-choices.tsx +1 -1
  64. package/docs/patterns/components-kbd--shortcut.tsx +1 -1
  65. package/docs/patterns/components-moremenu--action-menu.tsx +1 -1
  66. package/docs/patterns/components-moremenu--in-card-header.tsx +1 -1
  67. package/docs/patterns/components-navlist--side-nav-settings.tsx +1 -1
  68. package/docs/patterns/components-pageheader--app-header-pattern.tsx +1 -1
  69. package/docs/patterns/components-pageheader--page-section-header.tsx +1 -1
  70. package/docs/patterns/components-pageheader--toolbar-header.tsx +1 -1
  71. package/docs/patterns/components-panel--end-detail-rail.tsx +1 -1
  72. package/docs/patterns/components-pillgroup--pill-group-pattern.tsx +1 -1
  73. package/docs/patterns/components-promptbar--pattern-marketing-composer.tsx +3 -3
  74. package/docs/patterns/components-promptbar--pattern-prompt-bar.tsx +1 -1
  75. package/docs/patterns/components-radio-radiogroup--default.tsx +1 -1
  76. package/docs/patterns/components-scrollhorizontal--project-gallery-pattern.tsx +1 -1
  77. package/docs/patterns/components-scrollhorizontal--with-intro.tsx +1 -1
  78. package/docs/patterns/components-sheet--bottom-sheet.tsx +1 -1
  79. package/docs/patterns/components-sheet--end-sheet.tsx +1 -1
  80. package/docs/patterns/components-sitenav--brand-and-cta.tsx +1 -1
  81. package/docs/patterns/components-sitenav--centered-links.tsx +1 -1
  82. package/docs/patterns/components-sitenav--compact.tsx +1 -1
  83. package/docs/patterns/components-sitenav--marketing-header.tsx +1 -1
  84. package/docs/patterns/components-sitenav--mega-menu.tsx +1 -1
  85. package/docs/patterns/components-stat--insights-row.tsx +1 -1
  86. package/docs/patterns/components-stepprogress--step-progress-pattern.tsx +1 -1
  87. package/docs/patterns/components-switch--default.tsx +1 -1
  88. package/docs/patterns/components-switch--settings-row.tsx +1 -1
  89. package/docs/patterns/components-tab--settings-pages.tsx +1 -1
  90. package/docs/patterns/components-taskrows--action-details.tsx +1 -1
  91. package/docs/patterns/components-taskrows--capsules.tsx +1 -1
  92. package/docs/patterns/components-taskrows--card-with-status-rows.tsx +1 -1
  93. package/docs/patterns/components-taskrows--controlled-expand.tsx +1 -1
  94. package/docs/patterns/components-taskrows--custom-slots.tsx +1 -1
  95. package/docs/patterns/components-taskrows--status-list.tsx +1 -1
  96. package/docs/patterns/components-taskrows--tag-chips.tsx +1 -1
  97. package/docs/patterns/components-textlink--external-destination.tsx +1 -1
  98. package/docs/patterns/components-textlink--inline-prose.tsx +1 -1
  99. package/docs/patterns/components-textlink--supporting-copy.tsx +1 -1
  100. package/docs/patterns/components-textsequence--default.tsx +1 -1
  101. package/docs/patterns/components-textsequence--reduced-motion.tsx +1 -1
  102. package/docs/patterns/components-textsequence--shapes.tsx +1 -1
  103. package/docs/patterns/components-toast--stacked-notifications.tsx +1 -1
  104. package/docs/patterns/components-tooltip--controlled.tsx +1 -1
  105. package/docs/patterns/components-tooltip--disabled-control.tsx +1 -1
  106. package/docs/patterns/components-tooltip--icon-action.tsx +1 -1
  107. package/docs/patterns/components-tooltip--keyboard-shortcut.tsx +1 -1
  108. package/docs/patterns/components-tooltip--placement.tsx +1 -1
  109. package/docs/patterns/foundations-scroll-fade--horizontal-rail.tsx +1 -1
  110. package/docs/patterns/foundations-scroll-fade--overflowing-list.tsx +1 -1
  111. package/docs/patterns/guides-chart-explorations--comparison-gallery.tsx +1 -1
  112. package/docs/patterns/guides-overlay-flows--notification-preferences.tsx +1 -1
  113. package/docs/patterns/guides-profile-typography--editorial-profile.tsx +1 -1
  114. package/docs/patterns/index.json +1 -153
  115. package/package.json +1 -1
  116. package/docs/patterns/sites-pitchkit-account-settings--account-settings-owner.tsx +0 -265
  117. package/docs/patterns/sites-pitchkit-creator-identity--creator-identity-owner-settings.tsx +0 -154
  118. package/docs/patterns/sites-pitchkit-creator-identity--creator-identity-public.tsx +0 -96
  119. package/docs/patterns/sites-pitchkit-insights-and-kit--creator-insights-loading.tsx +0 -1006
  120. package/docs/patterns/sites-pitchkit-insights-and-kit--creator-insights.tsx +0 -1031
  121. package/docs/patterns/sites-pitchkit-insights-and-kit--insufficient-audience-data.tsx +0 -1015
  122. package/docs/patterns/sites-pitchkit-insights-and-kit--insufficient-reach-and-audience-data.tsx +0 -1017
  123. package/docs/patterns/sites-pitchkit-insights-and-kit--insufficient-reach-data.tsx +0 -1033
  124. package/docs/patterns/sites-pitchkit-insights-and-kit--owner-pitch-kit.tsx +0 -838
  125. package/docs/patterns/sites-pitchkit-insights-and-kit--shareable-pitch-kit.tsx +0 -608
  126. package/docs/patterns/sites-pitchkit-intro--intro-owner.tsx +0 -161
  127. package/docs/patterns/sites-pitchkit-intro--intro-public.tsx +0 -111
  128. package/docs/patterns/sites-pitchkit-past-brands--past-brands-owner.tsx +0 -611
  129. package/docs/patterns/sites-pitchkit-past-brands--past-brands-public.tsx +0 -299
  130. package/docs/patterns/sites-pitchkit-theme-picker--theme-picker-owner.tsx +0 -832
  131. package/docs/patterns/sites-whatmatters-intake--start-a-project-pattern.tsx +0 -234
  132. package/docs/patterns/sites-whatmatters-marketing-landing--marketing-landing.tsx +0 -87
  133. package/docs/patterns/sites-whatmatters-prompt-chat--landing-to-chat.tsx +0 -899
  134. package/docs/patterns/sites-whatmatters-rfp-submitted--rfp-submitted.tsx +0 -302
@@ -1,161 +0,0 @@
1
- // @thewhatmatters/wmds@0.2.0 · Pattern — intro (owner)
2
- // Storybook: Sites/PitchKit/Intro → Pattern — intro (owner) (?path=/story/sites-pitchkit-intro--intro-owner)
3
- // Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
4
-
5
- import { useState } from "react";
6
- import { Avatar, Button, Chip, TextArea } from "@thewhatmatters/wmds";
7
-
8
- const compactNumber = new Intl.NumberFormat("en", {
9
- notation: "compact",
10
- maximumFractionDigits: 1,
11
- });
12
-
13
- const PITCHKIT_INTRO_SOFT_LIMIT = 160;
14
- const PITCHKIT_INTRO_HARD_LIMIT = 280;
15
-
16
- function pitchKitIntroIsEmpty(intro: string) {
17
- return intro.trim().length === 0;
18
- }
19
-
20
- function pitchKitIntroStatus(intro: string): "warning" | "error" | undefined {
21
- const length = intro.length;
22
- if (length >= PITCHKIT_INTRO_HARD_LIMIT) return "error";
23
- if (length >= PITCHKIT_INTRO_SOFT_LIMIT) return "warning";
24
- return undefined;
25
- }
26
-
27
-
28
- export interface PitchKitCreatorIdentity {
29
- displayName?: string;
30
- /** Without the @ — shown as @handle, shared as /k/[handle]. */
31
- handle: string;
32
- profilePictureUrl?: string;
33
- followersCount?: number;
34
- professionalAccount?: "Business" | "Creator";
35
- connected?: boolean;
36
- lastSyncedLabel?: string;
37
- }
38
-
39
- function CreatorIdentityStrip({
40
- identity,
41
- nameAs = "h1",
42
- showProfessionalChip = false,
43
- }: {
44
- identity: PitchKitCreatorIdentity;
45
- nameAs?: "h1" | "p";
46
- showProfessionalChip?: boolean;
47
- }) {
48
- const NameTag = nameAs;
49
- const avatarName = identity.displayName ?? identity.handle;
50
- const handleLabel = `@${identity.handle}`;
51
- const followerLabel =
52
- identity.followersCount == null
53
- ? null
54
- : `${compactNumber.format(identity.followersCount)} followers`;
55
- const meta = [handleLabel, followerLabel].filter(Boolean).join(" · ");
56
- const showTitleRow =
57
- identity.displayName != null ||
58
- (showProfessionalChip && identity.professionalAccount != null);
59
-
60
- return (
61
- <div className="flex flex-wrap items-center gap-4">
62
- <Avatar
63
- name={avatarName}
64
- src={identity.profilePictureUrl}
65
- size="lg"
66
- />
67
- <div className="flex min-w-0 flex-col gap-1">
68
- {showTitleRow ? (
69
- <div className="flex flex-wrap items-center gap-2">
70
- {identity.displayName != null ? (
71
- <NameTag className="type-heading-2 text-fg">
72
- {identity.displayName}
73
- </NameTag>
74
- ) : null}
75
- {showProfessionalChip && identity.professionalAccount != null ? (
76
- <Chip readOnly size="sm">
77
- {identity.professionalAccount}
78
- </Chip>
79
- ) : null}
80
- </div>
81
- ) : null}
82
- <p className="type-body text-fg text-muted">{meta}</p>
83
- </div>
84
- </div>
85
- );
86
- }
87
-
88
-
89
- function OwnerIntroEditor({
90
- intro,
91
- onIntroChange,
92
- }: {
93
- intro: string;
94
- onIntroChange: (intro: string) => void;
95
- }) {
96
- const [editing, setEditing] = useState(!pitchKitIntroIsEmpty(intro));
97
-
98
- if (pitchKitIntroIsEmpty(intro) && !editing) {
99
- return (
100
- <Button role="ghost" onClick={() => setEditing(true)}>
101
- Add an intro
102
- </Button>
103
- );
104
- }
105
-
106
- return (
107
- <TextArea
108
- label="Intro"
109
- description="Shown on your Pitchkit. This is not your Instagram bio."
110
- placeholder="What you create and who you create it for"
111
- value={intro}
112
- maxLength={PITCHKIT_INTRO_HARD_LIMIT}
113
- status={pitchKitIntroStatus(intro)}
114
- rows={4}
115
- onChange={(event) => onIntroChange(event.target.value)}
116
- />
117
- );
118
- }
119
-
120
- export function IntroOwnerPage({
121
- identity,
122
- intro,
123
- onIntroChange,
124
- }: {
125
- identity: PitchKitCreatorIdentity;
126
- intro: string;
127
- onIntroChange: (intro: string) => void;
128
- }) {
129
- return (
130
- <main className="grid-page min-h-screen bg-body [--grid-column-gap:8px] [--grid-max:1140px] [padding-bottom:44px]">
131
- <div className="band pb-4">
132
- <header className="col-span-full grid grid-cols-[1fr_auto_1fr] items-center gap-3">
133
- <span className="type-heading-4 text-fg text-fg">PitchKit</span>
134
- <span />
135
- <span className="justify-self-end">
136
- <Avatar
137
- name={identity.displayName ?? identity.handle}
138
- src={identity.profilePictureUrl}
139
- size="md"
140
- />
141
- </span>
142
- </header>
143
- </div>
144
-
145
- <div className="band pt-6 sm:pt-8">
146
- <div className="band min-w-0 gap-y-6 sm:gap-y-8">
147
- <section className="col-span-full border-b border-border pb-6">
148
- <div className="flex min-w-0 flex-col gap-3">
149
- <CreatorIdentityStrip
150
- identity={identity}
151
- nameAs="h1"
152
- showProfessionalChip
153
- />
154
- <OwnerIntroEditor intro={intro} onIntroChange={onIntroChange} />
155
- </div>
156
- </section>
157
- </div>
158
- </div>
159
- </main>
160
- );
161
- }
@@ -1,111 +0,0 @@
1
- // @thewhatmatters/wmds@0.2.0 · Pattern — intro (public)
2
- // Storybook: Sites/PitchKit/Intro → Pattern — intro (public) (?path=/story/sites-pitchkit-intro--intro-public)
3
- // Show code — copy verbatim and keep this header; upgrades find pasted patterns by it.
4
-
5
- import { Avatar, Chip } from "@thewhatmatters/wmds";
6
-
7
- const compactNumber = new Intl.NumberFormat("en", {
8
- notation: "compact",
9
- maximumFractionDigits: 1,
10
- });
11
-
12
- function pitchKitIntroIsEmpty(intro: string) {
13
- return intro.trim().length === 0;
14
- }
15
-
16
-
17
- export interface PitchKitCreatorIdentity {
18
- displayName?: string;
19
- /** Without the @ — shown as @handle, shared as /k/[handle]. */
20
- handle: string;
21
- profilePictureUrl?: string;
22
- followersCount?: number;
23
- professionalAccount?: "Business" | "Creator";
24
- connected?: boolean;
25
- lastSyncedLabel?: string;
26
- }
27
-
28
- function CreatorIdentityStrip({
29
- identity,
30
- nameAs = "h1",
31
- showProfessionalChip = false,
32
- }: {
33
- identity: PitchKitCreatorIdentity;
34
- nameAs?: "h1" | "p";
35
- showProfessionalChip?: boolean;
36
- }) {
37
- const NameTag = nameAs;
38
- const avatarName = identity.displayName ?? identity.handle;
39
- const handleLabel = `@${identity.handle}`;
40
- const followerLabel =
41
- identity.followersCount == null
42
- ? null
43
- : `${compactNumber.format(identity.followersCount)} followers`;
44
- const meta = [handleLabel, followerLabel].filter(Boolean).join(" · ");
45
- const showTitleRow =
46
- identity.displayName != null ||
47
- (showProfessionalChip && identity.professionalAccount != null);
48
-
49
- return (
50
- <div className="flex flex-wrap items-center gap-4">
51
- <Avatar
52
- name={avatarName}
53
- src={identity.profilePictureUrl}
54
- size="lg"
55
- />
56
- <div className="flex min-w-0 flex-col gap-1">
57
- {showTitleRow ? (
58
- <div className="flex flex-wrap items-center gap-2">
59
- {identity.displayName != null ? (
60
- <NameTag className="type-heading-2 text-fg">
61
- {identity.displayName}
62
- </NameTag>
63
- ) : null}
64
- {showProfessionalChip && identity.professionalAccount != null ? (
65
- <Chip readOnly size="sm">
66
- {identity.professionalAccount}
67
- </Chip>
68
- ) : null}
69
- </div>
70
- ) : null}
71
- <p className="type-body text-fg text-muted">{meta}</p>
72
- </div>
73
- </div>
74
- );
75
- }
76
-
77
-
78
- export function IntroPublicPage({
79
- identity,
80
- intro,
81
- }: {
82
- identity: PitchKitCreatorIdentity;
83
- intro: string;
84
- }) {
85
- return (
86
- <main className="grid-page min-h-screen bg-body [--grid-column-gap:8px] [--grid-max:1140px] [padding-bottom:44px]">
87
- <div className="band pb-4">
88
- <header className="col-span-full grid grid-cols-[1fr_auto_1fr] items-center gap-3">
89
- <span className="type-heading-4 text-fg text-fg">PitchKit</span>
90
- </header>
91
- </div>
92
-
93
- <div className="band pt-6 sm:pt-8">
94
- <div className="band min-w-0 gap-y-6 sm:gap-y-8">
95
- <section className="col-span-full border-b border-border pb-6">
96
- <div className="flex min-w-0 flex-col gap-3">
97
- <CreatorIdentityStrip
98
- identity={identity}
99
- nameAs="h1"
100
- showProfessionalChip
101
- />
102
- {pitchKitIntroIsEmpty(intro) ? null : (
103
- <p className="type-body text-fg text-fg">{intro}</p>
104
- )}
105
- </div>
106
- </section>
107
- </div>
108
- </div>
109
- </main>
110
- );
111
- }