Skip to content

An open source design system that's fully customizable and agent ready

TypeScript

fix(core): rename EmptyState xdsThemeProps key to kebab-case, add missing displayName (#2823)

Cindy Zhang95aae35a9dce
diff --git a/apps/docsite/src/components/themePlayground/constants.ts b/apps/docsite/src/components/themePlayground/constants.ts
index fc845b5ba1..5ba05caed3 100644
--- a/apps/docsite/src/components/themePlayground/constants.ts
+++ b/apps/docsite/src/components/themePlayground/constants.ts
@@ -329,7 +329,7 @@ export const ALL_COMPONENT_NAMES = [
'dialog',
'divider',
'dropdown-menu',
- 'emptystate',
+ 'empty-state',
'field',
'heading',
'hovercard',
diff --git a/apps/sandbox/src/app/(fullscreen)/pages/documentation/page.tsx b/apps/sandbox/src/app/(fullscreen)/pages/documentation/page.tsx
index dc784673b1..6fd6acf4cf 100644
--- a/apps/sandbox/src/app/(fullscreen)/pages/documentation/page.tsx
+++ b/apps/sandbox/src/app/(fullscreen)/pages/documentation/page.tsx
@@ -179,7 +179,7 @@ const COMPONENT_CATEGORIES = [
desc: 'DropdownMenu presents a list of actions or options in a floating overlay. It is triggered by a button and supports nested submenus.',
},
{
- key: 'emptystate',
+ key: 'empty-state',
name: 'EmptyState',
desc: 'EmptyState provides a placeholder when there is no content to display. It guides users with a message, illustration, and optional call-to-action.',
},
diff --git a/packages/cli/src/commands/build-theme.mjs b/packages/cli/src/commands/build-theme.mjs
index b1876828d3..d9c305b82c 100644
--- a/packages/cli/src/commands/build-theme.mjs
+++ b/packages/cli/src/commands/build-theme.mjs
@@ -797,7 +797,7 @@ const KNOWN_COMPONENTS = {
dialog: ['variant', 'position'],
divider: ['variant', 'orientation'],
dropdownmenu: [],
- emptystate: [],
+ 'empty-state': [],
field: [],
formlayout: [],
grid: ['align'],
diff --git a/packages/cli/templates/pages/documentation-design/page.tsx b/packages/cli/templates/pages/documentation-design/page.tsx
index 48f14edcde..b34a993727 100644
--- a/packages/cli/templates/pages/documentation-design/page.tsx
+++ b/packages/cli/templates/pages/documentation-design/page.tsx
@@ -115,7 +115,7 @@ const COMPONENT_CATEGORIES = [
desc: 'DropdownMenu presents a list of actions or options in a floating overlay. It is triggered by a button and supports nested submenus.',
},
{
- key: 'emptystate',
+ key: 'empty-state',
name: 'EmptyState',
desc: 'EmptyState provides a placeholder when there is no content to display. It guides users with a message, illustration, and optional call-to-action.',
},
diff --git a/packages/cli/templates/pages/documentation/page.tsx b/packages/cli/templates/pages/documentation/page.tsx
index 0083343966..13ca211e27 100644
--- a/packages/cli/templates/pages/documentation/page.tsx
+++ b/packages/cli/templates/pages/documentation/page.tsx
@@ -73,7 +73,7 @@ const COMPONENT_CATEGORIES = [
desc: 'DropdownMenu presents a list of actions or options in a floating overlay. It is triggered by a button and supports nested submenus.',
},
{
- key: 'emptystate',
+ key: 'empty-state',
name: 'EmptyState',
desc: 'EmptyState provides a placeholder when there is no content to display. It guides users with a message, illustration, and optional call-to-action.',
},
diff --git a/packages/core/src/EmptyState/EmptyState.doc.mjs b/packages/core/src/EmptyState/EmptyState.doc.mjs
index d4235340b3..3a0d77c2df 100644
--- a/packages/core/src/EmptyState/EmptyState.doc.mjs
+++ b/packages/core/src/EmptyState/EmptyState.doc.mjs
@@ -65,7 +65,7 @@ export const docs = {
},
theming: {
targets: [
- {className: 'xds-emptystate'},
+ {className: 'xds-empty-state'},
],
},
usage: {
@@ -140,7 +140,7 @@ export const docsZh = {
],
theming: {
targets: [
- {className: 'xds-emptystate'},
+ {className: 'xds-empty-state'},
],
},
usage: {
diff --git a/packages/core/src/EmptyState/XDSEmptyState.tsx b/packages/core/src/EmptyState/XDSEmptyState.tsx
index 574459423e..fa2944de52 100644
--- a/packages/core/src/EmptyState/XDSEmptyState.tsx
+++ b/packages/core/src/EmptyState/XDSEmptyState.tsx
@@ -156,7 +156,7 @@ export function XDSEmptyState({
ref={ref}
role="status"
{...mergeProps(
- xdsThemeProps('emptystate', {variant: isCompact ? 'compact' : null}),
+ xdsThemeProps('empty-state', {variant: isCompact ? 'compact' : null}),
stylex.props(
styles.container,
isCompact && styles.containerCompact,
diff --git a/packages/core/src/Field/XDSInputClearButton.tsx b/packages/core/src/Field/XDSInputClearButton.tsx
index 2ad739cf19..c8145bffea 100644
--- a/packages/core/src/Field/XDSInputClearButton.tsx
+++ b/packages/core/src/Field/XDSInputClearButton.tsx
@@ -44,3 +44,5 @@ export function XDSInputClearButton({
/>
);
}
+
+XDSInputClearButton.displayName = 'XDSInputClearButton';