Skip to content

Commit

Permalink
Merge branch 'main' into feat/outline-for-text-input-and-select
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyzyl-ool authored Mar 4, 2024
2 parents c23d611 + 8eb741f commit 69c5f89
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 15 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## [6.1.1](https://github.com/gravity-ui/uikit/compare/v6.1.0...v6.1.1) (2024-02-26)


### Bug Fixes

* **breadcrumbs:** fix adaptive more view and define ResizeObserver in ssr apps ([#1364](https://github.com/gravity-ui/uikit/issues/1364)) ([dc6e514](https://github.com/gravity-ui/uikit/commit/dc6e514d058268f2ea482e4d78383a44e400d5e2))
* **controls:** allow disable input via controlProps ([#1371](https://github.com/gravity-ui/uikit/issues/1371)) ([3228dca](https://github.com/gravity-ui/uikit/commit/3228dcab413a5dff9e3dc2353f1ddfa6235643e8))
* **CopyToClipboard:** return CopyToClipboardProps type ([#1367](https://github.com/gravity-ui/uikit/issues/1367)) ([43599c2](https://github.com/gravity-ui/uikit/commit/43599c2d435b51e73bd581b73ac9ab3d72584adb))

## [6.1.0](https://github.com/gravity-ui/uikit/compare/v6.0.0...v6.1.0) (2024-02-21)


Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@gravity-ui/uikit",
"version": "6.1.0",
"version": "6.1.1",
"description": "Gravity UI base styling and components",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion src/components/CopyToClipboard/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export * from './CopyToClipboard';
export type {CopyToClipboardStatus} from './types';
export type {CopyToClipboardStatus, CopyToClipboardProps} from './types';
2 changes: 1 addition & 1 deletion src/components/Tabs/__stories__/Tabs.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ WithWrapTo.args = {
wrapTo(_item: TabsItemProps, node: React.ReactNode) {
return (
// eslint-disable-next-line jsx-a11y/anchor-is-valid
<a key={_item.id} href="#">
<a key={_item.id} href="#" style={{textDecoration: 'none'}}>
{node}
</a>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/controls/TextArea/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ LANDING_BLOCK-->
| onFocus | Fires when the control gets focus. Provides focus event as a callback's argument | `function` | |
| onKeyDown | Fires when a key is pressed. Provides keyboard event as a callback's argument | `function` | |
| onKeyUp | Fires when a key is released. Provides keyboard event as a callback's argument | `function` | |
| onUpdate | Fires when the input’s value is changed by the user. Provides new value as ancallback's argument | `function` | |
| onUpdate | Fires when the input’s value is changed by the user. Provides new value as a callback's argument | `function` | |
| pin | The control's border view | `string` | `"round-round"` |
| placeholder | Text that appears in the control when no value is set | `string` | |
| qa | Test id attribute (`data-qa`) | `string` | |
Expand Down
13 changes: 7 additions & 6 deletions src/components/controls/TextArea/TextAreaControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,10 @@ import {block} from '../../utils/cn';

import type {TextAreaProps} from './TextArea';

type Props = Omit<TextAreaProps, 'autoComplete' | 'onChange'> & {
type Props = Omit<TextAreaProps, 'autoComplete' | 'onChange' | 'controlProps'> & {
onChange: NonNullable<TextAreaProps['onChange']>;
autoComplete?: React.TextareaHTMLAttributes<HTMLTextAreaElement>['autoComplete'];
controlProps: NonNullable<TextAreaProps['controlProps']>;
};

const b = block('text-area');
Expand Down Expand Up @@ -86,13 +87,13 @@ export function TextAreaControl(props: Props) {

return (
<textarea
{...(controlProps as React.InputHTMLAttributes<HTMLTextAreaElement>)}
ref={handleRef as React.Ref<HTMLTextAreaElement>}
{...controlProps}
ref={handleRef}
style={{
...(controlProps as React.InputHTMLAttributes<HTMLTextAreaElement>)?.style,
...controlProps.style,
height: rows ? 'auto' : undefined,
}}
className={b('control', controlProps?.className)}
className={b('control', controlProps.className)}
name={name}
id={id}
tabIndex={tabIndex}
Expand All @@ -108,7 +109,7 @@ export function TextAreaControl(props: Props) {
onKeyDown={onKeyDown}
onKeyUp={onKeyUp}
onKeyPress={onKeyPress}
disabled={disabled}
disabled={disabled ?? controlProps.disabled}
/>
);
}
7 changes: 4 additions & 3 deletions src/components/controls/TextInput/TextInputControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import {block} from '../../utils/cn';

import type {TextInputProps} from './TextInput';

type Props = Omit<TextInputProps, 'autoComplete'> & {
type Props = Omit<TextInputProps, 'autoComplete' | 'controlProps'> & {
autoComplete?: React.TextareaHTMLAttributes<HTMLInputElement>['autoComplete'];
controlProps: NonNullable<TextInputProps['controlProps']>;
};

const b = block('text-input');
Expand Down Expand Up @@ -36,7 +37,7 @@ export function TextInputControl(props: Props) {
<input
{...controlProps}
ref={controlRef}
className={b('control', {type: 'input'}, controlProps?.className)}
className={b('control', {type: 'input'}, controlProps.className)}
type={type}
name={name}
id={id}
Expand All @@ -52,7 +53,7 @@ export function TextInputControl(props: Props) {
onKeyDown={onKeyDown}
onKeyUp={onKeyUp}
onKeyPress={onKeyPress}
disabled={disabled}
disabled={disabled ?? controlProps.disabled}
/>
);
}
1 change: 1 addition & 0 deletions src/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ export * from './RadioGroup';
export * from './Select';
export * from './Sheet';
export * from './Skeleton';
export * from './Slider';
export * from './Spin';
export * from './Switch';
export * from './Table';
Expand Down

0 comments on commit 69c5f89

Please sign in to comment.