Skip to content

Commit

Permalink
chore: pr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSisb committed Jan 26, 2024
1 parent 4831546 commit 2430c9a
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions .changeset/grumpy-islands-sell.md
Expand Up @@ -3,3 +3,4 @@
---

[Codemods] added a new package: page-header
[Codemods] added a new package: SummaryDetail
1 change: 1 addition & 0 deletions .codesandbox/ci.json
Expand Up @@ -91,6 +91,7 @@
"/packages/paste-core/components/status",
"/packages/paste-style-props",
"/packages/paste-libraries/styling",
"/packages/paste-core/components/summary-detail",
"/packages/paste-core/components/switch",
"/packages/paste-libraries/syntax-highlighter",
"/packages/paste-core/components/table",
Expand Down
6 changes: 6 additions & 0 deletions packages/paste-codemods/tools/.cache/mappings.json
Expand Up @@ -253,6 +253,12 @@
"StatusMenuItemRadio": "@twilio-paste/core/status",
"StatusObject": "@twilio-paste/core/status",
"useStatusMenuState": "@twilio-paste/core/status",
"SummaryDetail": "@twilio-paste/core/summary-detail",
"SummaryDetailContent": "@twilio-paste/core/summary-detail",
"SummaryDetailHeading": "@twilio-paste/core/summary-detail",
"SummaryDetailHeadingContent": "@twilio-paste/core/summary-detail",
"SummaryDetailToggleButton": "@twilio-paste/core/summary-detail",
"useSummaryDetailState": "@twilio-paste/core/summary-detail",
"Switch": "@twilio-paste/core/switch",
"SwitchGroup": "@twilio-paste/core/switch",
"TBody": "@twilio-paste/core/table",
Expand Down
2 changes: 1 addition & 1 deletion packages/paste-core/components/summary-detail/package.json
Expand Up @@ -2,7 +2,7 @@
"name": "@twilio-paste/summary-detail",
"version": "0.0.1",
"category": "interaction",
"status": "alpha",
"status": "production",
"description": "A Summary Detail is a collapsible container that can be used to hide or show content.",
"author": "Twilio Inc.",
"license": "MIT",
Expand Down
Expand Up @@ -18,7 +18,7 @@ export interface SummaryDetailProps extends DisclosurePrimitiveInitialState {
/**
* Overrides the default element name to apply unique styles with the Customization Provider
*
* @default 'DISCLOSURE'
* @default 'SUMMARY_DETAIL'
* @type {BoxProps['element']}
* @memberof SummaryDetailProps
*/
Expand Down
Expand Up @@ -20,8 +20,8 @@ export interface SummaryDetailToggleButtonProps

const ToggleButton = React.forwardRef<HTMLButtonElement, SummaryDetailToggleButtonProps>((props, ref) => {
const rotation = props["aria-expanded"] ? "90" : "0";
// todo make this logic better
const labelledby = props["aria-label"] ? undefined : props["aria-labelledby"];
// Only use aria-labelledby if aria-label is not provided
const ariaLabelledBy = props["aria-label"] ? undefined : props["aria-labelledby"];

return (
<Button
Expand All @@ -33,7 +33,7 @@ const ToggleButton = React.forwardRef<HTMLButtonElement, SummaryDetailToggleButt
borderRadius="borderRadius20"
_hover={{ backgroundColor: "colorBackground" }}
{...props}
aria-labelledby={labelledby}
aria-labelledby={ariaLabelledBy}
>
<Box as="span" element={`${props.element}_ICON_WRAPPER`} transform={`translateX(0) rotate(${rotation}deg)`}>
<ChevronDisclosureIcon decorative={true} size="sizeIcon30" element={`${props.element}_ICON}`} />
Expand Down
1 change: 1 addition & 0 deletions packages/paste-core/core-bundle/.gitignore
Expand Up @@ -87,6 +87,7 @@
/status
/style-props
/styling-library
/summary-detail
/switch
/syntax-highlighter-library
/table
Expand Down
1 change: 1 addition & 0 deletions packages/paste-core/core-bundle/package.json
Expand Up @@ -158,6 +158,7 @@
"@twilio-paste/status": "^2.1.1",
"@twilio-paste/style-props": "^9.1.1",
"@twilio-paste/styling-library": "^3.0.0",
"@twilio-paste/summary-detail": "^0.0.1",
"@twilio-paste/switch": "^5.1.1",
"@twilio-paste/syntax-highlighter-library": "^3.0.0",
"@twilio-paste/table": "^8.1.0",
Expand Down
1 change: 1 addition & 0 deletions packages/paste-core/core-bundle/src/index.tsx
Expand Up @@ -71,6 +71,7 @@ export * from "@twilio-paste/slider";
export * from "@twilio-paste/spinner";
export * from "@twilio-paste/stack";
export * from "@twilio-paste/status";
export * from "@twilio-paste/summary-detail";
export * from "@twilio-paste/switch";
export * from "@twilio-paste/table";
export * from "@twilio-paste/tabs";
Expand Down
1 change: 1 addition & 0 deletions packages/paste-core/core-bundle/src/summary-detail.tsx
@@ -0,0 +1 @@
export * from "@twilio-paste/summary-detail";

0 comments on commit 2430c9a

Please sign in to comment.