` element that wraps all table elements |
-| `amplify-table__body` | Class applied to `TableBody` component |
-| `amplify-table__caption` | Class applied to the content provided as the `caption` prop |
-| `amplify-table__foot` | Class applied to `TableFoot` component |
-| `amplify-table__head` | Class applied to `TableHead` component |
-| `amplify-table__row` | Class applied to `TableRow` component |
-| `amplify-table__td` | Class applied to `TableCell` component rendered as a `` element (``) |
-| `amplify-table__th` | Class applied to `TableCell` comopnent rendered as a ` | ` element (``) |
+
### Global Styling
diff --git a/docs/src/pages/components/tabs/react.mdx b/docs/src/pages/components/tabs/react.mdx
index 1bfd257f38f..c3b92973b62 100644
--- a/docs/src/pages/components/tabs/react.mdx
+++ b/docs/src/pages/components/tabs/react.mdx
@@ -8,6 +8,7 @@ import {
} from '@aws-amplify/ui-react';
import { TabsDemo, ControlledTabExample, DemoTabPanel } from './demo';
import { Example } from '@/components/Example';
+import { ComponentClassTable } from '@/components/ComponentClassTable';
Tabs organize content into multiple sections and allow users to navigate between them. The content under the set of Tabs should be related and form a coherent unit.
@@ -350,6 +351,10 @@ In the `TabItem` component, use the `isDisabled` prop to make a Tab not clickabl
## CSS Styling
+### Target classes
+
+
+
### Global styling
To override styling on all `Tabs` or `TabItems`, you can set the Amplify CSS variables, use the built-in `.amplify-tabs` or `.amplify-tabs-items`classes, or use pseudo-classes.
diff --git a/docs/src/pages/components/text/react.mdx b/docs/src/pages/components/text/react.mdx
index 43e8fefee97..e7be45fa12e 100644
--- a/docs/src/pages/components/text/react.mdx
+++ b/docs/src/pages/components/text/react.mdx
@@ -1,6 +1,7 @@
import { Text } from '@aws-amplify/ui-react';
import { TextDemo, TextTruncatedSample, TextStylingSample } from './demo';
import { Example } from '@/components/Example';
+import { ComponentClassTable } from '@/components/ComponentClassTable';
The Text primitive is used to display simple strings of text in an interface.
@@ -73,6 +74,10 @@ The `isTruncated` prop will render an ellipsis when the text exceeds the defined
## CSS Styling
+### Target classes
+
+
+
### Global styling
To override styling on all Text, you can set the Amplify CSS variables or use the built-in `.amplify-text` class.
diff --git a/docs/src/pages/components/textareafield/react.mdx b/docs/src/pages/components/textareafield/react.mdx
index 0ddf1c9e0d1..503774f4efe 100644
--- a/docs/src/pages/components/textareafield/react.mdx
+++ b/docs/src/pages/components/textareafield/react.mdx
@@ -17,6 +17,7 @@ import {
} from './examples';
import { Example, ExampleCode } from '@/components/Example';
import { Fragment } from '@/components/Fragment';
+import { ComponentClassTable } from '@/components/ComponentClassTable';
## Demo
@@ -179,6 +180,10 @@ Use the `hasError` and `errorMessage` fields to mark a `TextAreaField` with a va
## Styling
+### Target classes
+
+
+
### Global styling
To override styling on all TextAreaField primitives, you can set the Amplify CSS variables with the built-in `.amplify-textareafield` class.
diff --git a/docs/src/pages/components/textfield/react.mdx b/docs/src/pages/components/textfield/react.mdx
index b4fc0498748..754c3f1098a 100644
--- a/docs/src/pages/components/textfield/react.mdx
+++ b/docs/src/pages/components/textfield/react.mdx
@@ -23,6 +23,7 @@ import {
} from './examples';
import { Example, ExampleCode } from '@/components/Example';
import { Fragment } from '@/components/Fragment';
+import { ComponentClassTable } from '@/components/ComponentClassTable';
## Demo
@@ -274,6 +275,10 @@ Use the `hasError` and `errorMessage` fields to mark a TextField as having an va
## CSS Styling
+### Target classes
+
+
+
### Global styling
To override styling on all TextField primitives, you can set the Amplify CSS variables with the built-in `.amplify-textfield` class.
diff --git a/docs/src/pages/components/togglebutton/react.mdx b/docs/src/pages/components/togglebutton/react.mdx
index cc553e34807..f2cd352395d 100644
--- a/docs/src/pages/components/togglebutton/react.mdx
+++ b/docs/src/pages/components/togglebutton/react.mdx
@@ -1,6 +1,7 @@
import { Flex, ToggleButton } from '@aws-amplify/ui-react';
import { Example, ExampleCode } from '@/components/Example';
+import { ComponentClassTable } from '@/components/ComponentClassTable';
import { ToggleButtonDemo } from './demo';
import {
ControlledToggleButtonExample,
@@ -125,7 +126,11 @@ In cases where you need to have at least one option on, you can set the `isSelec
-## Styling
+## CSS Styling
+
+### Target classes
+
+
### Global styling
diff --git a/docs/src/pages/components/visuallyhidden/react.mdx b/docs/src/pages/components/visuallyhidden/react.mdx
index ef20fc68c93..38cf1a38beb 100644
--- a/docs/src/pages/components/visuallyhidden/react.mdx
+++ b/docs/src/pages/components/visuallyhidden/react.mdx
@@ -1,4 +1,5 @@
import { Example, ExampleCode } from '@/components/Example';
+import { ComponentClassTable } from '@/components/ComponentClassTable';
import { DefaultVisuallyHiddenExample } from './examples';
@@ -24,6 +25,4 @@ Import the `VisuallyHidden` primitive.
### Target classes
-| Class | Description |
-| ------------------------- | ---------------------------------------------------------- |
-| `amplify-visually-hidden` | Top level element that wraps the Visually Hidden component |
+
diff --git a/packages/react/__tests__/exports.ts b/packages/react/__tests__/exports.ts
index ece1d5809db..8a2c0abc5e6 100644
--- a/packages/react/__tests__/exports.ts
+++ b/packages/react/__tests__/exports.ts
@@ -23,6 +23,7 @@ describe('@aws-amplify/ui-react', () => {
"CheckboxField",
"Collection",
"ComponentClassNames",
+ "ComponentClassObject",
"ComponentPropsToStylePropsMap",
"ComponentPropsToStylePropsMapKeys",
"Divider",
diff --git a/packages/react/src/primitives/shared/constants.ts b/packages/react/src/primitives/shared/constants.ts
index 18f878d85b7..b4cca442d02 100644
--- a/packages/react/src/primitives/shared/constants.ts
+++ b/packages/react/src/primitives/shared/constants.ts
@@ -1,114 +1,514 @@
-export enum ComponentClassNames {
- Alert = 'amplify-alert',
- AlertIcon = 'amplify-alert__icon',
- AlertHeading = 'amplify-alert__heading',
- AlertBody = 'amplify-alert__body',
- AlertDismiss = 'amplify-alert__dismiss',
- Badge = 'amplify-badge',
- Button = 'amplify-button',
- ButtonGroup = 'amplify-buttongroup',
- ButtonLoaderWrapper = 'amplify-button__loader-wrapper',
- Card = 'amplify-card',
- Checkbox = 'amplify-checkbox',
- CheckboxButton = 'amplify-checkbox__button',
- CheckboxIcon = 'amplify-checkbox__icon',
- CheckboxInput = 'amplify-checkbox__input',
- CheckboxLabel = 'amplify-checkbox__label',
- CheckboxField = 'amplify-checkboxfield',
- Collection = 'amplify-collection',
- CollectionItems = 'amplify-collection-items',
- CollectionSearch = 'amplify-collection-search',
- CollectionPagination = 'amplify-collection-pagination',
- CountryCodeSelect = 'amplify-countrycodeselect',
- Divider = 'amplify-divider',
- DividerLabel = 'amplify-divider--label',
- Expander = 'amplify-expander',
- ExpanderContent = 'amplify-expander__content',
- ExpanderContentText = 'amplify-expander__content__text',
- ExpanderHeader = 'amplify-expander__header',
- ExpanderIcon = 'amplify-expander__icon',
- ExpanderItem = 'amplify-expander__item',
- ExpanderTrigger = 'amplify-expander__trigger',
- Field = 'amplify-field',
- FieldDescription = 'amplify-field__description',
- FieldErrorMessage = 'amplify-field__error-message',
- FieldGroup = 'amplify-field-group',
- FieldGroupControl = 'amplify-field-group__control',
- FieldGroupOuterEnd = 'amplify-field-group__outer-end',
- FieldGroupOuterStart = 'amplify-field-group__outer-start',
- FieldGroupInnerEnd = 'amplify-field-group__inner-end',
- FieldGroupInnerStart = 'amplify-field-group__inner-start',
- FieldGroupIcon = 'amplify-field-group__icon',
- FieldGroupIconButton = 'amplify-field-group__icon-button',
- FieldGroupHasInnerEnd = 'amplify-field-group--has-inner-end',
- FieldGroupHasInnerStart = 'amplify-field-group--has-inner-start',
- FieldShowPassword = 'amplify-field__show-password',
- FieldGroupFieldWrapper = 'amplify-field-group__field-wrapper',
- Flex = 'amplify-flex',
- Grid = 'amplify-grid',
- Heading = 'amplify-heading',
- Icon = 'amplify-icon',
- Image = 'amplify-image',
- Input = 'amplify-input',
- Label = 'amplify-label',
- Link = 'amplify-link',
- Loader = 'amplify-loader',
- MenuContent = 'amplify-menu-content',
- MenuItem = 'amplify-menu-content__item',
- MenuTrigger = 'amplify-menu-trigger',
- Pagination = 'amplify-pagination',
- PaginationItemButton = 'amplify-pagination__item-button',
- PaginationItemCurrent = 'amplify-pagination__item-current',
- PaginationItemEllipsis = 'amplify-pagination__item-ellipsis',
- PasswordField = 'amplify-passwordfield',
- PhoneNumberField = 'amplify-phonenumberfield',
- Placeholder = 'amplify-placeholder',
- Radio = 'amplify-radio',
- RadioButton = 'amplify-radio__button',
- RadioInput = 'amplify-radio__input',
- RadioLabel = 'amplify-radio__label',
- RadioGroupField = 'amplify-radiogroupfield',
- RadioGroup = 'amplify-radiogroup',
- Rating = 'amplify-rating',
- ScrollView = 'amplify-scrollview',
- Select = 'amplify-select',
- SelectField = 'amplify-selectfield',
- SearchField = 'amplify-searchfield',
- SearchFieldClear = 'amplify-searchfield__clear',
- SearchFieldSearch = 'amplify-searchfield__search',
- SelectWrapper = 'amplify-select__wrapper',
- SelectIconWrapper = 'amplify-select__icon-wrapper',
- SliderField = 'amplify-sliderfield',
- SliderFieldGroup = 'amplify-sliderfield__group',
- SliderFieldLabel = 'amplify-sliderfield__label',
- SliderFieldRange = 'amplify-sliderfield__range',
- SliderFieldRoot = 'amplify-sliderfield__root',
- SliderFieldThumb = 'amplify-sliderfield__thumb',
- SliderFieldTrack = 'amplify-sliderfield__track',
- StepperField = 'amplify-stepperfield',
- StepperFieldButtonDecrease = 'amplify-stepperfield__button--decrease',
- StepperFieldButtonIncrease = 'amplify-stepperfield__button--increase',
- StepperFieldInput = 'amplify-stepperfield__input',
- SwitchField = 'amplify-switchfield',
- SwitchLabel = 'amplify-switch-label',
- SwitchThumb = 'amplify-switch-thumb',
- SwitchTrack = 'amplify-switch-track',
- SwitchWrapper = 'amplify-switch__wrapper',
- Table = 'amplify-table',
- TableCaption = 'amplify-table__caption',
- TableBody = 'amplify-table__body',
- TableTd = 'amplify-table__td',
- TableTh = 'amplify-table__th',
- TableFoot = 'amplify-table__foot',
- TableHead = 'amplify-table__head',
- TableRow = 'amplify-table__row',
- Tabs = 'amplify-tabs',
- TabItems = 'amplify-tabs-item',
- Text = 'amplify-text',
- Textarea = 'amplify-textarea',
- TextField = 'amplify-textfield',
- TextAreaField = 'amplify-textareafield',
- ToggleButton = 'amplify-togglebutton',
- ToggleButtonGroup = 'amplify-togglebuttongroup',
- VisuallyHidden = 'amplify-visually-hidden',
-}
+export const ComponentClassObject = {
+ Alert: {
+ className: 'amplify-alert',
+ components: ['Alert'],
+ description: 'Top level element that wraps the Alert primitive',
+ },
+ AlertIcon: {
+ className: 'amplify-alert__icon',
+ components: ['Alert'],
+ description: 'Class applied to Icon component within the Alert primitive',
+ },
+ AlertHeading: {
+ className: 'amplify-alert__heading',
+ components: ['Alert'],
+ description: 'Class applied to the heading View',
+ },
+ AlertBody: {
+ className: 'amplify-alert__body',
+ components: ['Alert'],
+ description: 'Class applied to the body View',
+ },
+ AlertDismiss: {
+ className: 'amplify-alert__dismiss',
+ components: ['Alert'],
+ description: 'Class applied to the close Button',
+ },
+ Badge: {
+ className: 'amplify-badge',
+ components: ['Badge'],
+ description: 'Top level element that wraps the Badge component',
+ },
+ Button: {
+ className: 'amplify-button',
+ components: ['Button'],
+ description: 'Top level element that wraps the Button primitive',
+ },
+ ButtonGroup: { className: 'amplify-buttongroup' },
+ ButtonLoaderWrapper: {
+ className: 'amplify-button__loader-wrapper',
+ components: ['Button'],
+ description:
+ 'Class applied to the Loader component within the Button Loading state',
+ },
+ Card: {
+ className: 'amplify-card',
+ components: ['Card'],
+ description: 'Top level element that wraps the Card primitive',
+ },
+ Checkbox: {
+ className: 'amplify-checkbox',
+ components: ['Checkbox'],
+ description: 'Top level element that wraps the Checkbox primitive',
+ },
+ CheckboxButton: {
+ className: 'amplify-checkbox__button',
+ components: ['Checkbox'],
+ description: 'Wrapper for the checked icon within the Checkbox primitive',
+ },
+ CheckboxIcon: {
+ className: 'amplify-checkbox__icon',
+ components: ['Checkbox'],
+ description:
+ 'Class applied to the checked icon within the Checkbox primitive',
+ },
+ CheckboxInput: {
+ className: 'amplify-checkbox__input',
+ components: ['Checkbox'],
+ description:
+ 'Class applied to the visually hidden checkbox input within the Checkbox primitive',
+ },
+ CheckboxLabel: {
+ className: 'amplify-checkbox__label',
+ components: ['Checkbox'],
+ description: 'Class applied to the label within the Checkbox primitive',
+ },
+ CheckboxField: {
+ className: 'amplify-checkboxfield',
+ components: ['CheckboxField'],
+ description: 'Top level element that wraps the CheckboxField primitive',
+ },
+ Collection: {
+ className: 'amplify-collection',
+ components: ['Collection'],
+ description: 'Top level element that wraps the Collection primitive',
+ },
+ CollectionItems: {
+ className: 'amplify-collection-items',
+ components: ['Collection'],
+ description:
+ 'Class applied to the element that wraps all the items in a collection',
+ },
+ CollectionSearch: {
+ className: 'amplify-collection-search',
+ components: ['Collection'],
+ description:
+ 'Class applied to the element that wraps the collection search box',
+ },
+ CollectionPagination: {
+ className: 'amplify-collection-pagination',
+ components: ['Collection'],
+ description:
+ 'Class applied to the element that wraps the pagination component in a collection',
+ },
+ CountryCodeSelect: {
+ className: 'amplify-countrycodeselect',
+ components: ['PhoneNumberField'],
+ description:
+ 'Class applied to the Country Code Select within the PhoneNumberField primitive',
+ },
+ Divider: {
+ className: 'amplify-divider',
+ components: ['Divider'],
+ description: 'Top level element that wraps the Divider primitive',
+ },
+ DividerLabel: {
+ className: 'amplify-divider--label',
+ components: ['Divider'],
+ description: 'Class applied to the label of the Divider component',
+ },
+ Expander: {
+ className: 'amplify-expander',
+ components: ['Expander'],
+ description: 'Top level element that wraps the Expander primitive',
+ },
+ ExpanderContent: {
+ className: 'amplify-expander__content',
+ components: ['Expander'],
+ description: 'Expander content container',
+ },
+ ExpanderContentText: {
+ className: 'amplify-expander__content__text',
+ components: ['Expander'],
+ description: 'Expander content text',
+ },
+ ExpanderHeader: {
+ className: 'amplify-expander__header',
+ components: ['Expander'],
+ description: 'Expander item header',
+ },
+ ExpanderIcon: {
+ className: 'amplify-expander__icon',
+ components: ['Expander'],
+ description: 'Icon to indicate whether an item is expanded or collapsed',
+ },
+ ExpanderItem: {
+ className: 'amplify-expander__item',
+ components: ['Expander'],
+ description: 'Expander item(containier for header, trigger, and content)',
+ },
+ ExpanderTrigger: {
+ className: 'amplify-expander__trigger',
+ components: ['Expander'],
+ description: 'Expander item trigger(button)',
+ },
+ Field: { className: 'amplify-field' },
+ FieldDescription: { className: 'amplify-field__description' },
+ FieldErrorMessage: { className: 'amplify-field__error-message' },
+ FieldGroup: { className: 'amplify-field-group' },
+ FieldGroupControl: { className: 'amplify-field-group__control' },
+ FieldGroupOuterEnd: { className: 'amplify-field-group__outer-end' },
+ FieldGroupOuterStart: { className: 'amplify-field-group__outer-start' },
+ FieldGroupInnerEnd: { className: 'amplify-field-group__inner-end' },
+ FieldGroupInnerStart: { className: 'amplify-field-group__inner-start' },
+ FieldGroupIcon: { className: 'amplify-field-group__icon' },
+ FieldGroupIconButton: { className: 'amplify-field-group__icon-button' },
+ FieldGroupHasInnerEnd: { className: 'amplify-field-group--has-inner-end' },
+ FieldGroupHasInnerStart: {
+ className: 'amplify-field-group--has-inner-start',
+ },
+ FieldShowPassword: { className: 'amplify-field__show-password' },
+ FieldGroupFieldWrapper: { className: 'amplify-field-group__field-wrapper' },
+ Flex: {
+ className: 'amplify-flex',
+ components: ['Flex'],
+ description: 'Top level element that wraps the Flex primitive',
+ },
+ Grid: {
+ className: 'amplify-grid',
+ components: ['Grid'],
+ description: 'Top level element that wraps the Grid primitive',
+ },
+ Heading: {
+ className: 'amplify-heading',
+ components: ['Heading'],
+ description: 'Top level element that wraps the Heading primitive',
+ },
+ Icon: {
+ className: 'amplify-icon',
+ components: ['Icon'],
+ description: 'Top level element that wraps the Icon primitive',
+ },
+ Image: {
+ className: 'amplify-image',
+ components: ['Image'],
+ description: 'Top level element that wraps the Image primitive',
+ },
+ Input: { className: 'amplify-input' },
+ Label: { className: 'amplify-label' },
+ Link: {
+ className: 'amplify-link',
+ components: ['Link'],
+ description: 'Top level element that wraps the Link primitive',
+ },
+ Loader: {
+ className: 'amplify-loader',
+ components: ['Loader'],
+ description: 'Top level element that wraps the Loader primitive',
+ },
+ MenuContent: {
+ className: 'amplify-menu-content',
+ components: ['Menu'],
+ description: 'Menu content container (Flex)',
+ },
+ MenuItem: {
+ className: 'amplify-menu-content__item',
+ components: ['Menu'],
+ description:
+ 'Menu item button (MenuButton, wrapped in amplify-menu-content class)',
+ },
+ MenuTrigger: {
+ className: 'amplify-menu-trigger',
+ components: ['Menu'],
+ description:
+ 'Menu trigger button (MenuButton, not wrapped in amplify-menu-content class)',
+ },
+ Pagination: {
+ className: 'amplify-pagination',
+ components: ['Pagination'],
+ description: 'Top level element that wraps the Pagination primitive',
+ },
+ PaginationItemButton: {
+ className: 'amplify-pagination__item-button',
+ components: ['Pagination'],
+ description: 'Class applied to the pagination buttons',
+ },
+ PaginationItemCurrent: {
+ className: 'amplify-pagination__item-current',
+ components: ['Pagination'],
+ description: 'Class applied to the currently selected pagination button',
+ },
+ PaginationItemEllipsis: {
+ className: 'amplify-pagination__item-ellipsis',
+ components: ['Pagination'],
+ description:
+ 'Class applied to the ellipsis within the Pagination primitive',
+ },
+ PasswordField: {
+ className: 'amplify-passwordfield',
+ components: ['PasswordField'],
+ description: 'Top level element that wraps the PasswordField primitive',
+ },
+ PhoneNumberField: {
+ className: 'amplify-phonenumberfield',
+ components: ['PhoneNumberField'],
+ description: 'Top level element that wraps the PhoneNumberField primitive',
+ },
+ Placeholder: {
+ className: 'amplify-placeholder',
+ components: ['Placeholder'],
+ description: 'Top level element that wraps the Placeholder primitive',
+ },
+ Radio: {
+ className: 'amplify-radio',
+ components: ['RadioGroupField', 'Radio'],
+ description: 'Top level element that wraps the Radio primitive',
+ },
+ RadioButton: {
+ className: 'amplify-radio__button',
+ compoents: ['RadioGroupField', 'Radio'],
+ description: 'Class applied to the displayed radio button',
+ },
+ RadioInput: {
+ className: 'amplify-radio__input',
+ components: ['RadioGroupField', 'Radio'],
+ description: 'Class applied to the visually hidden radio input',
+ },
+ RadioLabel: {
+ className: 'amplify-radio__label',
+ components: ['RadioGroupField', 'Radio'],
+ description: 'Class applied to the radio label',
+ },
+ RadioGroupField: {
+ className: 'amplify-radiogroupfield',
+ components: ['RadioGroupField'],
+ description: 'Top level element that wraps the RadioGroupField primitive',
+ },
+ RadioGroup: {
+ className: 'amplify-radiogroup',
+ components: ['RadioGroupField'],
+ description: 'Class applied to the radio group wrapper',
+ },
+ Rating: {
+ className: 'amplify-rating',
+ components: ['Rating'],
+ description: 'Top level element that wraps the Rating primitive',
+ },
+ ScrollView: {
+ className: 'amplify-scrollview',
+ components: ['ScrollView'],
+ description: 'Top level element that wraps the ScrollView primitive',
+ },
+ SearchField: {
+ className: 'amplify-searchfield',
+ components: ['SearchField'],
+ description: 'Top level element that wraps the SearchField primitive',
+ },
+ SearchFieldClear: {
+ className: 'amplify-searchfield__clear',
+ components: ['SearchField'],
+ description: 'Class applied to the search field clear button',
+ },
+ SearchFieldSearch: {
+ className: 'amplify-searchfield__search',
+ components: ['SearchField'],
+ description: 'Class applied to the search button',
+ },
+ Select: {
+ className: 'amplify-select',
+ components: ['Select', 'SelectField'],
+ description: 'Class applied to the select element',
+ },
+ SelectField: {
+ className: 'amplify-selectfield',
+ components: ['SelectField'],
+ description: 'Top level element that wraps the SelectField primitive',
+ },
+ SelectWrapper: {
+ className: 'amplify-select__wrapper',
+ components: ['Select', 'SelectField'],
+ description: 'Class applied to the select wrapper',
+ },
+ SelectIconWrapper: {
+ className: 'amplify-select__icon-wrapper',
+ components: ['Select', 'SelectField'],
+ description: 'Class applied to the select icon wrapper',
+ },
+ SliderField: {
+ className: 'amplify-sliderfield',
+ components: ['SliderField'],
+ description: 'Top level element that wraps the SliderField primitive',
+ },
+ SliderFieldGroup: {
+ className: 'amplify-sliderfield__group',
+ components: ['SliderField'],
+ description: 'Class applied to the element that wraps the slider root',
+ },
+ SliderFieldLabel: {
+ className: 'amplify-sliderfield__label',
+ components: ['SliderField'],
+ description: 'Class applied to the slider label',
+ },
+ SliderFieldRange: {
+ className: 'amplify-sliderfield__range',
+ components: ['SliderField'],
+ description: 'Class applied to the filled in portion of the slider track',
+ },
+ SliderFieldRoot: {
+ className: 'amplify-sliderfield__root',
+ components: ['SliderField'],
+ description:
+ 'Class applied to the slider root which wraps the track and thumb',
+ },
+ SliderFieldThumb: {
+ className: 'amplify-sliderfield__thumb',
+ components: ['SliderField'],
+ description: 'Class applied to the slider thumb',
+ },
+ SliderFieldTrack: {
+ className: 'amplify-sliderfield__track',
+ components: ['SliderField'],
+ description: 'Class applied to the slider track',
+ },
+ StepperField: {
+ className: 'amplify-stepperfield',
+ components: ['StepperField'],
+ description: 'Top level element that wraps the StepperField primitive',
+ },
+ StepperFieldButtonDecrease: {
+ className: 'amplify-stepperfield__button--decrease',
+ components: ['StepperField'],
+ description: 'Class applied to the decrease button',
+ },
+ StepperFieldButtonIncrease: {
+ className: 'amplify-stepperfield__button--increase',
+ components: ['StepperField'],
+ description: 'Class applied to the increase button',
+ },
+ StepperFieldInput: {
+ className: 'amplify-stepperfield__input',
+ components: ['StepperField'],
+ description: 'Class applied to the StepperField input',
+ },
+ SwitchField: {
+ className: 'amplify-switchfield',
+ components: ['SwitchField'],
+ description: 'Top level element that wraps the SwitchField primitive',
+ },
+ SwitchLabel: {
+ className: 'amplify-switch-label',
+ components: ['SwitchField'],
+ description: 'Class applied to the SwitchField label text',
+ },
+ SwitchThumb: {
+ className: 'amplify-switch-thumb',
+ components: ['SwitchField'],
+ description: 'Class applied to the SwitchField thumb',
+ },
+ SwitchTrack: {
+ className: 'amplify-switch-track',
+ components: ['SwitchField'],
+ description: 'Class applied to the SwitchField track',
+ },
+ SwitchWrapper: {
+ className: 'amplify-switch__wrapper',
+ components: ['SwitchField'],
+ description:
+ 'Class applied to the label element that wraps the SwitchField label and track',
+ },
+ Table: {
+ className: 'amplify-table',
+ components: ['Table'],
+ description: 'Top level element that wraps the Table primitive',
+ },
+ TableCaption: {
+ className: 'amplify-table__caption',
+ components: ['Table'],
+ description: 'Class applied to the content provided as the caption prop',
+ },
+ TableBody: {
+ className: 'amplify-table__body',
+ components: ['Table'],
+ description: 'Class applied to TableBody component',
+ },
+ TableTd: {
+ className: 'amplify-table__td',
+ components: ['Table'],
+ description:
+ 'Class applied to TableCell component rendered as a | element ()',
+ },
+ TableTh: {
+ className: 'amplify-table__th',
+ components: ['Table'],
+ description:
+ 'Class applied to TableCell comopnent rendered as a | element ()',
+ },
+ TableFoot: {
+ className: 'amplify-table__foot',
+ components: ['Table'],
+ description: 'Class applied to TableFoot component',
+ },
+ TableHead: {
+ className: 'amplify-table__head',
+ components: ['Table'],
+ description: 'Class applied to TableHead component',
+ },
+ TableRow: {
+ className: 'amplify-table__row',
+ components: ['Table'],
+ description: 'Class applied to TableRow component',
+ },
+ Tabs: {
+ className: 'amplify-tabs',
+ components: ['Tabs'],
+ description: 'Top level element that wraps the Tabs primitive',
+ },
+ TabItems: {
+ className: 'amplify-tabs-item',
+ components: ['Tabs'],
+ description: 'Top level element that wraps the TabItem primitive',
+ },
+ Text: {
+ className: 'amplify-text',
+ components: ['Text'],
+ description: 'Top level element that wraps the Text primitive',
+ },
+ Textarea: {
+ className: 'amplify-textarea',
+ components: ['TextAreaField'],
+ description: 'Class applied to the text area',
+ },
+ TextAreaField: {
+ className: 'amplify-textareafield',
+ components: ['TextAreaField'],
+ description: 'Top level element that wraps the TextAreaField primitive',
+ },
+ TextField: {
+ className: 'amplify-textfield',
+ components: ['TextField'],
+ description: 'Top level element that wraps the TextField primitive',
+ },
+ ToggleButton: {
+ className: 'amplify-togglebutton',
+ components: ['ToggleButton'],
+ description: 'Top level element that wraps the ToggleButton primitive',
+ },
+ ToggleButtonGroup: {
+ className: 'amplify-togglebuttongroup',
+ components: ['ToggleButton', 'ToggleButtonGroup'],
+ description: 'Top level element that wraps the ToggleButtonGroup primitive',
+ },
+ VisuallyHidden: {
+ className: 'amplify-visually-hidden',
+ components: ['VisuallyHidden'],
+ description: 'Top level element that wraps the VisuallyHidden primitive',
+ },
+};
+
+type ComponentNames = keyof typeof ComponentClassObject;
+let ComponentClassNames: { [Name in ComponentNames]?: string } = {};
+Object.keys(ComponentClassObject).map((keyName) => {
+ ComponentClassNames[keyName] = ComponentClassObject[keyName].className;
+});
+Object.freeze(ComponentClassNames);
+export { ComponentClassNames };
|