Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/select/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,15 @@ const Select = React.forwardRef(
}: SelectProps,
ref: React.Ref<SelectProps.Ref>
) => {
const baseComponentProps = useBaseComponent('Select');
const baseComponentProps = useBaseComponent('Select', {
props: {
autoFocus: restProps.autoFocus,
expandToViewport: restProps.expandToViewport,
filteringType,
triggerVariant,
virtualScroll: restProps.virtualScroll,
},
});
const externalProps = getExternalProps(restProps);
return (
<InternalSelect
Expand Down
4 changes: 3 additions & 1 deletion src/space-between/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import useBaseComponent from '../internal/hooks/use-base-component';
export { SpaceBetweenProps };

export default function SpaceBetween({ direction = 'vertical', ...props }: SpaceBetweenProps) {
const baseComponentProps = useBaseComponent('SpaceBetween');
const baseComponentProps = useBaseComponent('SpaceBetween', {
props: { alignItems: props.alignItems, direction, size: props.size },
});
return <InternalSpaceBetween direction={direction} {...props} {...baseComponentProps} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/spinner/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import useBaseComponent from '../internal/hooks/use-base-component';
export { SpinnerProps };

export default function Spinner({ size = 'normal', variant = 'normal', ...props }: SpinnerProps) {
const baseComponentProps = useBaseComponent('Spinner');
const baseComponentProps = useBaseComponent('Spinner', {
props: { size, variant },
});
return <InternalSpinner size={size} variant={variant} {...props} {...baseComponentProps} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/split-panel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ export default function SplitPanel({
...restProps
}: SplitPanelProps) {
const isRefresh = useVisualRefresh();
const { __internalRootRef } = useBaseComponent('SplitPanel');
const { __internalRootRef } = useBaseComponent('SplitPanel', {
props: { closeBehavior, hidePreferencesButton },
});
const {
position,
topOffset,
Expand Down
4 changes: 3 additions & 1 deletion src/status-indicator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import useBaseComponent from '../internal/hooks/use-base-component';
export { StatusIndicatorProps };

export default function StatusIndicator({ type = 'success', wrapText = true, ...props }: StatusIndicatorProps) {
const baseComponentProps = useBaseComponent('StatusIndicator');
const baseComponentProps = useBaseComponent('StatusIndicator', {
props: { colorOverride: props.colorOverride, type, wrapText },
});
return <InternalStatusIndicator type={type} wrapText={wrapText} {...props} {...baseComponentProps} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ export default function Tabs({
for (const tab of tabs) {
checkSafeUrl('Tabs', tab.href);
}
const { __internalRootRef } = useBaseComponent('Tabs');
const { __internalRootRef } = useBaseComponent('Tabs', {
props: { disableContentPaddings, variant },
});
const idNamespace = useUniqueId('awsui-tabs-');

const [activeTabId, setActiveTabId] = useControllable(controlledTabId, onChange, firstEnabledTab(tabs)?.id ?? '', {
Expand Down
4 changes: 3 additions & 1 deletion src/tag-editor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ const TagEditor = React.forwardRef(
}: TagEditorProps,
ref: React.Ref<TagEditorProps.Ref>
) => {
const baseComponentProps = useBaseComponent('TagEditor');
const baseComponentProps = useBaseComponent('TagEditor', {
props: { tagLimit, allowedCharacterPattern },
});
const i18n = useInternalI18n('tag-editor');

const remainingTags = tagLimit - tags.filter(tag => !tag.markedForRemoval).length;
Expand Down
4 changes: 3 additions & 1 deletion src/textarea/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ const Textarea = React.forwardRef(
}: TextareaProps,
ref: Ref<TextareaProps.Ref>
) => {
const { __internalRootRef } = useBaseComponent('Textarea');
const { __internalRootRef } = useBaseComponent('Textarea', {
props: { autoComplete, autoFocus, disableBrowserAutocorrect, disableBrowserSpellcheck, readOnly, spellcheck },
});
const { ariaLabelledby, ariaDescribedby, controlId, invalid } = useFormFieldContext(rest);
const baseProps = getBaseProps(rest);

Expand Down
4 changes: 3 additions & 1 deletion src/tiles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import InternalTiles from './internal';
export { TilesProps };

const Tiles = React.forwardRef((props: TilesProps, ref: React.Ref<TilesProps.Ref>) => {
const baseComponentProps = useBaseComponent('Tiles');
const baseComponentProps = useBaseComponent('Tiles', {
props: { columns: props.columns },
});
return <InternalTiles ref={ref} {...props} {...baseComponentProps} />;
});

Expand Down
10 changes: 9 additions & 1 deletion src/time-input/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ const TimeInput = React.forwardRef(
{ format = 'hh:mm:ss', use24Hour = true, autoComplete = true, ...props }: TimeInputProps,
ref: Ref<HTMLInputElement>
) => {
const baseComponentProps = useBaseComponent('TimeInput');
const baseComponentProps = useBaseComponent('TimeInput', {
props: {
autoFocus: props.autoFocus,
disableBrowserAutocorrect: props.disableBrowserAutocorrect,
format,
readOnly: props.readOnly,
use24Hour,
},
});
return (
<InternalTimeInput
format={format}
Expand Down
4 changes: 3 additions & 1 deletion src/token-group/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import InternalTokenGroup from './internal';
export { TokenGroupProps };

export default function TokenGroup({ items = [], alignment = 'horizontal', ...props }: TokenGroupProps) {
const baseComponentProps = useBaseComponent('TokenGroup');
const baseComponentProps = useBaseComponent('TokenGroup', {
props: { alignment, disableOuterPadding: props.disableOuterPadding, limit: props.limit },
});
return <InternalTokenGroup items={items} alignment={alignment} {...props} {...baseComponentProps} />;
}

Expand Down
4 changes: 3 additions & 1 deletion src/wizard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ import { WizardProps } from './interfaces';
import { useFunnel } from '../internal/analytics/hooks/use-funnel';

function Wizard({ isLoadingNextStep = false, allowSkipTo = false, ...props }: WizardProps) {
const baseComponentProps = useBaseComponent('Wizard');
const baseComponentProps = useBaseComponent('Wizard', {
props: { allowSkipTo },
});
const { wizardCount } = useFunnel();
const externalProps = getExternalProps(props);

Expand Down