From 636a48d135d25825a30db46878240bd3b50d01a8 Mon Sep 17 00:00:00 2001
From: Nora Krantz <75342690+nkrantz@users.noreply.github.com>
Date: Tue, 22 Oct 2024 13:27:55 -0400
Subject: [PATCH] chore: update status pattern (#4110)
* chore: update status pattern
* chore: feedback from pr
* chore: more feedback
* chore: more feedback again
* chore: another round of feedback and name change
---
.../ObjectStatusPatternExamples.tsx | 669 ++++++++++++++++++
.../StatusPatternExamples.tsx | 444 ------------
.../{status => object-status}/index.mdx | 416 ++++++-----
3 files changed, 867 insertions(+), 662 deletions(-)
create mode 100644 packages/paste-website/src/component-examples/ObjectStatusPatternExamples.tsx
delete mode 100644 packages/paste-website/src/component-examples/StatusPatternExamples.tsx
rename packages/paste-website/src/pages/patterns/{status => object-status}/index.mdx (65%)
diff --git a/packages/paste-website/src/component-examples/ObjectStatusPatternExamples.tsx b/packages/paste-website/src/component-examples/ObjectStatusPatternExamples.tsx
new file mode 100644
index 0000000000..7a96d494c0
--- /dev/null
+++ b/packages/paste-website/src/component-examples/ObjectStatusPatternExamples.tsx
@@ -0,0 +1,669 @@
+import { Box } from "@twilio-paste/box";
+import { ProcessDisabledIcon } from "@twilio-paste/icons/esm/ProcessDisabledIcon";
+import { ProcessDraftIcon } from "@twilio-paste/icons/esm/ProcessDraftIcon";
+import { ProcessErrorIcon } from "@twilio-paste/icons/esm/ProcessErrorIcon";
+import { ProcessInProgressIcon } from "@twilio-paste/icons/esm/ProcessInProgressIcon";
+import { ProcessNeutralIcon } from "@twilio-paste/icons/esm/ProcessNeutralIcon";
+import { ProcessSuccessIcon } from "@twilio-paste/icons/esm/ProcessSuccessIcon";
+import { ProcessWarningIcon } from "@twilio-paste/icons/esm/ProcessWarningIcon";
+
+export const BannerExample = `
+const ObjectStatusPatternComponents = () => {
+ const [process, setProcess] = React.useState(ProcessObject.Success);
+ const menu = useStatusMenuState();
+ const onClick = (status) => {
+ setProcess(ProcessObject[status]);
+ menu.hide();
+ };
+ return (
+
Status | +Export name | +
---|---|
+ |
+ + Contacts who did not click + | +
+ |
+ + All contacts + | +
ID | +Unique name | +Region | +Status | +Order Date | +
---|---|---|---|---|
90294808908109537 | +WE902990c21gjioGasd | +North America | +
+ |
+ 2020-10-15 | +
90294808908872345 | +WE928471c21gjioGasd | +North America | +
+ |
+ 2020-10-15 | +
Title | +Media | +Status | +
---|---|---|
Bewitched | +Series | +
+ |
+
Mulan | +Feature | +Released | +
Little Women | +Feature | +Released | +
Agents | +Queues | +
---|---|
+ |
+ |
+ |
+ |
+ |
+
Status | -Export name | -
---|---|
- |
- - Contacts who did not click - | -
- |
- - All contacts - | -
ID | -Unique name | -Region | -Status | -Order Date | -
---|---|---|---|---|
90294808908109537 | -WE902990c21gjioGasd | -North America | -
- |
- 2020-10-15 | -
90294808908872345 | -WE928471c21gjioGasd | -North America | -
- |
- 2020-10-15 | -
Title | -Media | -Status | -
---|---|---|
Bewitched | -Series | -
- |
-
Mulan | -Feature | -Released | -
Little Women | -Feature | -Released | -
Icon | Icon name | Token | +Status Badge variant | Usage | @@ -201,6 +274,7 @@ used to 3 or 4 of the most important statuses. For statuses that are not as critProcessErrorIcon | $color-text-icon-error | +ProcessError | Indicates an error or that something went wrong. |
---|---|---|---|---|---|---|---|
ProcessWarningIcon | $color-text-icon-warning | +ProcessWarning | Indicates a condition requiring corrective action. | ||||
ProcessSuccessIcon | $color-text-icon-success | +ProcessSuccess | Indicates that something is stable, active, or successfully completed. | ||||
ProcessNeutralIcon | $color-text-icon-neutral | +ProcessNeutral | Indicates a neutral / informative state. Can be used to fill any gaps that the more specific statuses don’t cover. @@ -236,6 +313,7 @@ used to 3 or 4 of the most important statuses. For statuses that are not as crit | ProcessInProgressIcon | $color-text-icon-neutral | +ProcessInProgress | Indicates that something is in progress, in review, or scheduled. |
ProcessDisabledIcon | $color-text-icon | +ProcessDisabled | Indicates that something is inactive, disabled, or paused. | ||||
ProcessDraftIcon | $color-text-icon | +ProcessDraft | Indicates that something is a draft, unused, or not started. |
Icon | Icon name | Token | +Status Badge variant | Usage | @@ -297,6 +439,7 @@ Connectivity statuses are used to show if a user, object, or system is online orConnectivityAvailableIcon | $color-text-icon-available | +ConnectivityAvailable | Indicates that a person or entity is available or online. |
---|---|---|---|
ConnectivityBusyIcon | $color-text-icon-busy | +ConnectivityBusy | Indicates that a person or entity is busy or away. |
ConnectivityUnavailableIcon | $color-text-icon-unavailable | +ConnectivityUnavailable | Indicates that a person or entity is unavailable or at capacity. |
ConnectivityNeutralIcon | $color-text-icon-neutral | +ConnectivityNeutral | Indicates that a person or entity is neutral. |
ConnectivityOfflineIcon | $color-text-icon-offline | +ConnectivityOffline | Indicates that a person or entity is offline. |