Skip to content

Commit 4dc5b95

Browse files
committed
Tighten component text props
1 parent a3b186b commit 4dc5b95

98 files changed

Lines changed: 405 additions & 838 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/clean-label-slots.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"@makeplane/propel": minor
3+
---
4+
5+
Tighten component text props, add a decorative `Shortcut` component slot with `aria-keyshortcuts`
6+
examples on actionable controls, remove shortcut-specific menu element wrappers, and add an accent
7+
menu row tone for emphasized menu actions. Remove unused/story-only element exports, including
8+
group-label wrappers, popover anatomy wrappers, pass-through select scroll arrows, scroll-area
9+
content, tooltip shortcut, and the unused `initialsToneClass` avatar style-map export.

packages/propel/src/components/accordion/accordion-trigger.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export type AccordionTriggerProps = Omit<
1818
*/
1919
icon?: React.ReactNode;
2020
/** Visible trigger label. */
21-
label: React.ReactNode;
21+
label: string;
2222
};
2323

2424
/**

packages/propel/src/components/anchor-button/anchor-button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export type AnchorButtonProps = Omit<AnchorButtonElementProps, "children"> & {
2323
/** Element rendered after the label (inline-end), e.g. `<Icon icon={ArrowUpRight} />`. */
2424
endIcon?: React.ReactNode;
2525
/** Visible action/link label. */
26-
label: React.ReactNode;
26+
label: string;
2727
/** Shows a spinner, sets `aria-busy`, and makes the control non-interactive. */
2828
loading?: boolean;
2929
};

packages/propel/src/components/autocomplete-field/autocomplete-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export type AutocompleteFieldProps<Value = string> = Omit<
3535
/** Items rendered in the popup. */
3636
items: readonly Value[];
3737
/** Visible field label. */
38-
label: React.ReactNode;
38+
label: string;
3939
/** Label and helper text size. */
4040
magnitude: FieldMagnitude;
4141
/** Input placeholder. */

packages/propel/src/components/badge/badge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ import {
77
} from "../../elements/badge";
88

99
export type BadgeProps = Omit<BadgeElementProps, "children"> & {
10-
/** The badge label text, a count, or any inline content. */
11-
label?: React.ReactNode;
10+
/** The badge label text. */
11+
label?: string;
1212
/** Element rendered before the label (inline-start), e.g. `<Icon icon={Check} />`. */
1313
startIcon?: React.ReactNode;
1414
/** Element rendered after the label (inline-end), e.g. `<Icon icon={Sparkles} />`. */

packages/propel/src/components/breadcrumb/breadcrumb-menu-trigger.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export type BreadcrumbMenuTriggerProps = Omit<
1212
/** Leading element, typically `<Icon icon={...} tint="tertiary" magnitude="md" />`. */
1313
icon?: React.ReactNode;
1414
/** The crumb label. */
15-
label?: React.ReactNode;
15+
label?: string;
1616
};
1717

1818
/** The crumb that opens a `BreadcrumbMenu`. */

packages/propel/src/components/button/button.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export type ButtonProps = Omit<ButtonElementProps, "children"> & {
2020
/** Element rendered after the label (inline-end), e.g. `<Icon icon={ArrowRight} />`. */
2121
endIcon?: React.ReactNode;
2222
/** Visible button label. */
23-
label: React.ReactNode;
23+
label: string;
2424
/** Shows a spinner, sets `aria-busy`, and makes the button non-interactive. */
2525
loading?: boolean;
2626
};

packages/propel/src/components/checkbox-field/checkbox-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type CheckboxFieldProps = Omit<
1919
/** Error text shown below the control. */
2020
error?: React.ReactNode;
2121
/** Visible field label. */
22-
label: React.ReactNode;
22+
label: string;
2323
/** Label and helper text size. */
2424
magnitude: FieldMagnitude;
2525
/** Optional supporting text announced as the checkbox description. */

packages/propel/src/components/checkbox-group-field/checkbox-group-field-option.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export type CheckboxGroupFieldOptionProps = Omit<
1313
"aria-label" | "label" | "icon"
1414
> & {
1515
/** Visible option label. */
16-
label: React.ReactNode;
16+
label: string;
1717
/** Optional supporting text announced as the checkbox description. */
1818
description?: React.ReactNode;
1919
/** Label and description size. Inherited from `CheckboxGroupField` when omitted. */

packages/propel/src/components/checkbox-group-field/checkbox-group-field.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export type CheckboxGroupFieldProps = Omit<CheckboxGroupProps, "children" | "den
1919
/** Helper text shown below the group. Replaced by `error` when an error is set. */
2020
hint?: React.ReactNode;
2121
/** Visible fieldset legend. */
22-
label: React.ReactNode;
22+
label: string;
2323
/** Legend and helper text size. */
2424
magnitude: FieldMagnitude;
2525
/** Submitted field name. */

0 commit comments

Comments
 (0)