Skip to content

Commit

Permalink
Merge branch 'main' into spr/main/cf35ff23
Browse files Browse the repository at this point in the history
  • Loading branch information
lassopicasso authored Feb 19, 2025
2 parents 59b0493 + f2104d9 commit c78bd45
Show file tree
Hide file tree
Showing 44 changed files with 21 additions and 67 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ export const ConfirmUndeployDialog = ({
{t('app_deployment.undeploy_confirmation_dialog_description')}
</StudioParagraph>
<StudioTextfield
size='sm'
label={t('app_deployment.undeploy_confirmation_input_label')}
description={t('app_deployment.undeploy_confirmation_input_description', {
appName,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export const RemoveChangesPopoverContent = ({
onChange={handleChange}
autoFocus
onKeyUp={handleOnKeypressEnter}
size='small'
/>
{repoResetMutation.isPending && (
<StudioSpinner showSpinnerTitle={false} spinnerTitle={t('overview.reset_repo_loading')} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ export const NumberInput = ({ value, onChange }: Props<SimpleSubexpressionValueT
<StudioDecimalInput
label={texts.value}
onChange={handleChange}
size='small'
validationErrorMessage={texts.numberValidationError}
value={value.value}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const StudioIconTextfield = forwardRef<HTMLDivElement, StudioIconTextfiel
<StudioTextfield
disabled={readOnly}
id={textFieldId}
size='sm'
className={classes.textfield}
{...rest}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export class CellNumberfield extends BaseInputCell<HTMLInputElement, CellNumberf

return (
<StudioTable.Cell className={className}>
<StudioDecimalInput hideLabel ref={ref} size='small' {...rest} {...eventProps} />
<StudioDecimalInput hideLabel ref={ref} {...rest} {...eventProps} />
</StudioTable.Cell>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class CellTextarea extends BaseInputCell<HTMLTextAreaElement, CellTextare
const className = cn(classes.textareaCell, givenClass);
return (
<StudioTable.Cell className={className}>
<StudioTextarea hideLabel ref={ref} size='small' {...rest} {...eventProps} />
<StudioTextarea hideLabel ref={ref} {...rest} {...eventProps} />
</StudioTable.Cell>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class CellTextfield extends BaseInputCell<HTMLInputElement, CellTextfield

return (
<StudioTable.Cell className={className}>
<StudioTextfield hideLabel ref={ref} size='small' {...rest} {...eventProps} />
<StudioTextfield hideLabel ref={ref} {...rest} {...eventProps} />
</StudioTable.Cell>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ const Children1 = ({ onChange, value }: ChildrenProps) => {
<div>
<StudioParagraph>Children 1</StudioParagraph>
<StudioTextfield
size='sm'
label='Please enter the value "3" to proceed to the next page.'
onChange={onChange}
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ export const ExampleUseCase: ExampleUseCase = (args): React.ReactElement => {
error={name !== 'Bernard' ? 'Navnet må være Bernard' : ''}
onChange={(e) => setName(e.target.value)}
icon={<KeyVerticalIcon />}
size='sm'
label='Nytt navn'
/>
</StudioRecommendedNextAction>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ const ValueField = forwardRef<HTMLInputElement, ValueFieldProps>(
({ textResource, onChangeTextResource, ...rest }, ref): ReactElement => {
const generalProps: StudioTextfieldProps = {
hideLabel: true,
size: 'sm',
...rest,
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const meta: Meta = {
argTypes: {
size: {
control: 'radio',
options: ['small', 'medium', 'large'],
options: ['sm', 'md', 'lg'],
},
},
};
Expand All @@ -21,6 +21,6 @@ Preview.args = {
placeholder: 'Type something here...',
error: '',
hideLabel: false,
size: 'medium',
size: 'sm',
};
export default meta;
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const meta: Meta = {
argTypes: {
size: {
control: 'radio',
options: ['small', 'medium', 'large'],
options: ['sm', 'md', 'lg'],
},
},
};
Expand All @@ -20,7 +20,7 @@ Preview.args = {
label: 'Textfield',
placeholder: '',
error: '',
size: 'small',
size: 'sm',
};

export default meta;
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export function useTextInputProps<E extends ElementType>(
errorAfterBlur,
label,
withAsterisk,
size = 'sm',
...rest
} = props;

Expand Down Expand Up @@ -53,5 +54,6 @@ export function useTextInputProps<E extends ElementType>(
onBlur: handleBlur,
error: errorComponent,
label: labelComponent,
size,
} as Omit<SharedTextInputProps<E>, keyof AdditionalProps>;
}
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,6 @@ function CreateNewCodeList({
<StudioTextfield
label={t('app_content_library.code_lists.create_new_code_list_name')}
className={classes.codeListTitle}
size='small'
onChange={(event) => handleCodeListTitleChange(event.target.value)}
error={codeListTitleError}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export function TextQuestion({ id, label, value, onChange }: QuestionsProps): Re
const debouncedOnChange = (newValue: string) => debounce(() => onChange(id, newValue));
return (
<StudioTextarea
size='sm'
id={id}
label={label}
value={value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@ export const PolicyAccessPackages = (): ReactElement => {
}
hideLabel
placeholder={t('policy_editor.access_package_search')}
size='small'
value={searchValue}
onChange={handleSearch}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export const PolicyDescription = (): React.ReactElement => {
<div className={classes.textAreaWrapper}>
<StudioTextarea
label={t('policy_editor.rule_card_description_title')}
size='small'
value={policyRule.description}
onChange={handleChangeDescription}
rows={5}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ export const PolicyResourceFields = ({
)}
<StudioTextfield
value={resource.type}
size='small'
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
handleInputChange('type', event.target.value)
}
Expand All @@ -86,7 +85,6 @@ export const PolicyResourceFields = ({
)}
<StudioTextfield
value={resource.id}
size='small'
onChange={(event: React.ChangeEvent<HTMLInputElement>) =>
handleInputChange('id', event.target.value)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export const CustomActions = ({ actionElement }: CustomActionsProps): React.Reac
<>
<StudioTextfield
onChange={onCustomActionChange}
size='small'
label={t('process_editor.configuration_panel_actions_action_card_custom_label')}
className={classes.customActionTextfield}
value={isCustomAction ? actionElement.action : ''}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ export const RecommendedActionChangeName = (): React.ReactElement => {
<StudioIconTextfield
error={newNameError}
icon={<KeyVerticalIcon />}
size='sm'
label={t('process_editor.recommended_action.new_name_label')}
onChange={(event: React.ChangeEvent<HTMLInputElement>) => {
setNewName(event.target.value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export const CreateCustomReceiptForm = ({
name='customReceiptLayoutSetId'
label={t('process_editor.configuration_panel_custom_receipt_textfield_label')}
value={existingCustomReceiptLayoutSetId}
size='small'
error={layoutSetError}
onChange={handleValidateLayoutSetId}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,20 +110,12 @@ export interface InputProps<T> {

export const StringInput = ({ id, value, onChange }: InputProps<string>) => {
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => onChange(e.target.value);
return <StudioTextfield size='sm' id={id} value={value} onChange={handleChange} />;
return <StudioTextfield id={id} value={value} onChange={handleChange} />;
};

export const NumberInput = ({ id, value, onChange }: InputProps<number>) => {
const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => onChange(Number(e.target.value));
return (
<StudioTextfield
size='sm'
id={id}
type='number'
value={value.toString()}
onChange={handleChange}
/>
);
return <StudioTextfield id={id} type='number' value={value.toString()} onChange={handleChange} />;
};

export const BooleanInput = ({ id, value, onChange }: InputProps<boolean>) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ export function ItemDataComponent({ schemaNode }: IItemDataComponentProps) {
label={t('schema_editor.name')}
handleSave={handleChangeNodeName}
schemaPointer={schemaPointer}
size='small'
/>
)}
{isReference(schemaNode) && (
Expand Down Expand Up @@ -183,7 +182,6 @@ export function ItemDataComponent({ schemaNode }: IItemDataComponentProps) {
label={t('schema_editor.title')}
aria-label={t('schema_editor.title')}
onBlur={onChangeTitle}
size='small'
onChange={(e: ChangeEvent<HTMLInputElement>) => setItemItemTitle(e.target.value)}
value={itemTitle}
/>
Expand All @@ -197,7 +195,6 @@ export function ItemDataComponent({ schemaNode }: IItemDataComponentProps) {
onChange={(event: ChangeEvent<HTMLTextAreaElement>) =>
setItemItemDescription(event.target.value)
}
size='small'
value={itemDescription}
/>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ export const ItemFieldsTableRow = ({
hideLabel
onKeyDown={onKeyDown}
schemaPointer={fullPath}
size='small'
aria-label={t('schema_editor.field_name')}
/>
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export function ArrayRestrictions({
}
value={restrictions[ArrRestrictionKey.minItems]}
type='number'
size='sm'
/>
</div>
<div className={classes.item}>
Expand All @@ -43,7 +42,6 @@ export function ArrayRestrictions({
}
value={restrictions[ArrRestrictionKey.maxItems]}
type='number'
size='sm'
/>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ export function NumberRestrictions({
onChange={onChangeMinNumber}
value={formatState.min === undefined ? '' : formatState.min.toString()}
type='number'
size='sm'
/>
<div className={classes.minNumberErrorMassage}>
<ErrorMessage>{minMaxErrorMessage}</ErrorMessage>
Expand All @@ -119,7 +118,6 @@ export function NumberRestrictions({
onChange={onChangeMaxNumber}
value={formatState.max === undefined ? '' : formatState.max.toString()}
type='number'
size='sm'
/>
<div className={classes.minNumberErrorMassage}>
<ErrorMessage>{minMaxErrorMessage}</ErrorMessage>
Expand All @@ -143,7 +141,6 @@ export function NumberRestrictions({
<StudioTextfield
id='schema_editor.multipleOf'
type='number'
size='sm'
onChange={(e: ChangeEvent<HTMLInputElement>) =>
dispatchAction(NumberRestrictionsReducerActionType.setMultipleOf, e.target.value)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ export function StringRestrictions({
<div className={classes.lengthFields}>
<div className={classes.lengthField}>
<StudioTextfield
size='sm'
type='number'
label={t(StrRestrictionKey.minLength)}
onChange={(e: ChangeEvent<HTMLInputElement>) =>
Expand All @@ -150,7 +149,6 @@ export function StringRestrictions({
</div>
<div className={classes.lengthField}>
<StudioTextfield
size='sm'
type='number'
label={t(StrRestrictionKey.maxLength)}
onChange={(e: ChangeEvent<HTMLInputElement>) =>
Expand Down Expand Up @@ -192,7 +190,6 @@ export function StringRestrictions({
))}
</div>
<StudioTextfield
size='sm'
id={fieldId}
onChange={(event: ChangeEvent<HTMLInputElement>) =>
handleValueChange(event.target.value)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const ClonePopoverContent = ({ onClose }: ClonePopoverContentProps) => {
</Paragraph>
</>
)}
<StudioTextfield readOnly value={gitUrl} label={t('sync_header.clone_https')} size='small' />
<StudioTextfield readOnly value={gitUrl} label={t('sync_header.clone_https')} />
{canCopy && (
<div className={classes.buttonWrapper}>
<StudioButton fullWidth onClick={copyGitUrl} className={classes.button}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@
vertical-align: top;
width: 1%;
}

.openDialogButton {
margin-bottom: var(--fds-spacing-4);
}
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,11 @@ export const FileChangesInfoModal = ({

return (
<StudioModal.Root>
<StudioModal.Trigger icon={<ClockDashedIcon />} variant='tertiary'>
<StudioModal.Trigger
icon={<ClockDashedIcon />}
variant='tertiary'
className={classes.openDialogButton}
>
{t('sync_header.review_file_changes')}
</StudioModal.Trigger>
<StudioModal.Dialog
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export const CreateNewSubformSection = ({
<StudioTextfield
name='subform'
label={t('ux_editor.component_properties.subform.created_layout_set_name')}
size='sm'
disabled={isPendingNewSubformMutation}
onChange={(e) => handleSubformName(e.target.value)}
error={newSubformNameError}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ export const SubformDataModel = ({
<StudioTextfield
name='newSubformDataModel'
label={t('ux_editor.component_properties.subform.create_new_data_model_label')}
size='sm'
onChange={(e) => handleNewDataModel(e.target.value)}
error={dataModelNameError}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ const AddMapLayer = ({ component, handleComponentChange }: AddMapLayerProps): JS
id={component.id}
label={t('ux_editor.url_label')}
value={fieldProps.value}
size='sm'
onChange={(e) => fieldProps.onChange(e.target.value, e)}
name='url'
/>
Expand All @@ -130,7 +129,6 @@ const AddMapLayer = ({ component, handleComponentChange }: AddMapLayerProps): JS
id={component.id}
label={t('ux_editor.attribution_label')}
value={fieldProps.value}
size='sm'
name='attribution'
onChange={(e) => fieldProps.onChange(e.target.value, e)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export const EmptyTextField = ({ onChange, override }: EmptyTextFieldProps) => {
<StudioTextfield
label={t('ux_editor.component_properties.summary.override.empty_field_text')}
autoFocus={true}
size='sm'
onBlur={() => setOpen(false)}
onKeyDown={({ key }) => key === 'Enter' && setOpen(false)}
value={override.emptyFieldText}
Expand Down
Loading

0 comments on commit c78bd45

Please sign in to comment.