@skbkontur/react-ui 0.0.0-a5ba2462c5 → 0.0.0-a6f09fbded
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +0 -30
- package/cjs/components/Autocomplete/Autocomplete.md +113 -0
- package/cjs/components/Button/Button.md +261 -0
- package/cjs/components/Calendar/Calendar.md +276 -0
- package/cjs/components/Calendar/CalendarDay.md +70 -0
- package/cjs/components/Center/Center.md +26 -0
- package/cjs/components/Checkbox/Checkbox.md +171 -0
- package/cjs/components/ComboBox/ComboBox.d.ts +11 -5
- package/cjs/components/ComboBox/ComboBox.js +10 -1
- package/cjs/components/ComboBox/ComboBox.js.map +1 -1
- package/cjs/components/ComboBox/ComboBox.md +574 -0
- package/cjs/components/CurrencyInput/CurrencyInput.md +39 -0
- package/cjs/components/CurrencyLabel/CurrencyLabel.js +2 -2
- package/cjs/components/CurrencyLabel/CurrencyLabel.js.map +1 -1
- package/cjs/components/CurrencyLabel/CurrencyLabel.md +29 -0
- package/cjs/components/DateInput/DateInput.md +111 -0
- package/cjs/components/DatePicker/DatePicker.md +368 -0
- package/cjs/components/Dropdown/Dropdown.md +45 -0
- package/cjs/components/DropdownMenu/DropdownMenu.md +290 -0
- package/cjs/components/FileUploader/FileUploader.md +131 -0
- package/cjs/components/FxInput/FxInput.md +31 -0
- package/cjs/components/Gapped/Gapped.md +44 -0
- package/cjs/components/GlobalLoader/GlobalLoader.md +97 -0
- package/cjs/components/Group/Group.md +19 -0
- package/cjs/components/Hint/Hint.md +86 -0
- package/cjs/components/Input/Input.md +86 -0
- package/cjs/components/Input/InputLayout/InputLayout.d.ts +1 -0
- package/cjs/components/Input/InputLayout/InputLayout.js +4 -2
- package/cjs/components/Input/InputLayout/InputLayout.js.map +1 -1
- package/cjs/components/Kebab/Kebab.md +306 -0
- package/cjs/components/Link/Link.md +182 -0
- package/cjs/components/Loader/Loader.md +33 -0
- package/cjs/components/MaskedInput/MaskedInput.d.ts +0 -8
- package/cjs/components/MaskedInput/MaskedInput.js +2 -23
- package/cjs/components/MaskedInput/MaskedInput.js.map +1 -1
- package/cjs/components/MaskedInput/MaskedInput.md +114 -0
- package/cjs/components/MenuFooter/MenuFooter.md +27 -0
- package/cjs/components/MenuHeader/MenuHeader.md +35 -0
- package/cjs/components/MenuItem/MenuItem.md +139 -0
- package/cjs/components/MenuSeparator/MenuSeparator.md +14 -0
- package/cjs/components/MiniModal/MiniModal.md +231 -0
- package/cjs/components/Modal/Modal.md +56 -0
- package/cjs/components/Paging/Paging.md +57 -0
- package/cjs/components/PasswordInput/PasswordInput.md +29 -0
- package/cjs/components/Radio/Radio.md +57 -0
- package/cjs/components/RadioGroup/RadioGroup.md +44 -0
- package/cjs/components/ResponsiveLayout/ResponsiveLayout.md +75 -0
- package/cjs/components/ScrollContainer/ScrollContainer.md +224 -0
- package/cjs/components/Select/Select.md +113 -0
- package/cjs/components/SidePage/SidePage.md +65 -0
- package/cjs/components/SingleToast/SingleToast.md +36 -0
- package/cjs/components/Spinner/Spinner.md +36 -0
- package/cjs/components/Sticky/Sticky.md +28 -0
- package/cjs/components/Switcher/Switcher.md +111 -0
- package/cjs/components/Tabs/Tab.md +73 -0
- package/cjs/components/Tabs/Tabs.md +54 -0
- package/cjs/components/Textarea/Textarea.d.ts +6 -1
- package/cjs/components/Textarea/Textarea.js +16 -3
- package/cjs/components/Textarea/Textarea.js.map +1 -1
- package/cjs/components/Textarea/Textarea.md +58 -0
- package/cjs/components/Textarea/Textarea.styles.js +2 -1
- package/cjs/components/Textarea/Textarea.styles.js.map +1 -1
- package/cjs/components/Toast/Toast.md +69 -0
- package/cjs/components/Toggle/Toggle.md +110 -0
- package/cjs/components/Token/Token.md +48 -0
- package/cjs/components/TokenInput/TokenInput.md +277 -0
- package/cjs/components/Tooltip/Tooltip.d.ts +1 -1
- package/cjs/components/Tooltip/Tooltip.js +6 -8
- package/cjs/components/Tooltip/Tooltip.js.map +1 -1
- package/cjs/components/Tooltip/Tooltip.md +322 -0
- package/cjs/components/TooltipMenu/TooltipMenu.md +241 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js +16 -7
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js +27 -9
- package/cjs/internal/ClearCrossIcon/ClearCrossIcon.styles.js.map +1 -1
- package/cjs/internal/CustomComboBox/ComboBoxView.d.ts +7 -6
- package/cjs/internal/CustomComboBox/ComboBoxView.js +2 -7
- package/cjs/internal/CustomComboBox/ComboBoxView.js.map +1 -1
- package/cjs/internal/CustomComboBox/CustomComboBox.d.ts +6 -5
- package/cjs/internal/CustomComboBox/CustomComboBox.js +1 -3
- package/cjs/internal/CustomComboBox/CustomComboBox.js.map +1 -1
- package/cjs/internal/CustomComboBox/getComboBoxTheme.d.ts +2 -1
- package/cjs/internal/CustomComboBox/getComboBoxTheme.js +10 -7
- package/cjs/internal/CustomComboBox/getComboBoxTheme.js.map +1 -1
- package/cjs/internal/DataTids/DATATIDS.md +12 -0
- package/cjs/internal/DataTids/DataTids.d.ts +12 -0
- package/cjs/internal/DataTids/DataTids.js +50 -0
- package/cjs/internal/DataTids/DataTids.js.map +1 -0
- package/cjs/internal/DataTids/DataTids.styles.d.ts +7 -0
- package/cjs/internal/DataTids/DataTids.styles.js +42 -0
- package/cjs/internal/DataTids/DataTids.styles.js.map +1 -0
- package/cjs/internal/DataTids/componentsDataTids.d.ts +5 -0
- package/cjs/internal/DataTids/componentsDataTids.js +15 -0
- package/cjs/internal/DataTids/componentsDataTids.js.map +1 -0
- package/cjs/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
- package/cjs/internal/InputLikeText/InputLikeText.styles.js +12 -4
- package/cjs/internal/InputLikeText/InputLikeText.styles.js.map +1 -1
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +37 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js +235 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js +10 -0
- package/cjs/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.js.map +1 -0
- package/cjs/internal/ThemePlayground/Playground.md +7 -0
- package/cjs/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/cjs/internal/themes/BasicTheme.d.ts +2 -0
- package/cjs/internal/themes/BasicTheme.js +11 -6
- package/cjs/internal/themes/BasicTheme.js.map +1 -1
- package/cjs/internal/themes/DarkTheme5_4.js +10 -3
- package/cjs/internal/themes/DarkTheme5_4.js.map +1 -1
- package/cjs/internal/themes/LightTheme5_4.js +10 -3
- package/cjs/internal/themes/LightTheme5_4.js.map +1 -1
- package/cjs/internal/themes/consts.d.ts +7 -0
- package/cjs/internal/themes/consts.js +7 -0
- package/cjs/internal/themes/consts.js.map +1 -0
- package/cjs/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +64 -0
- package/cjs/lib/locale/LOCALECONTEXT.md +222 -0
- package/cjs/lib/theming/ThemeContext.md +265 -0
- package/components/Autocomplete/Autocomplete.md +113 -0
- package/components/Button/Button.md +261 -0
- package/components/Calendar/Calendar.md +276 -0
- package/components/Calendar/CalendarDay.md +70 -0
- package/components/Center/Center.md +26 -0
- package/components/Checkbox/Checkbox.md +171 -0
- package/components/ComboBox/ComboBox/ComboBox.js +2 -1
- package/components/ComboBox/ComboBox/ComboBox.js.map +1 -1
- package/components/ComboBox/ComboBox.d.ts +11 -5
- package/components/ComboBox/ComboBox.md +574 -0
- package/components/CurrencyInput/CurrencyInput.md +39 -0
- package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js +1 -1
- package/components/CurrencyLabel/CurrencyLabel/CurrencyLabel.js.map +1 -1
- package/components/CurrencyLabel/CurrencyLabel.md +29 -0
- package/components/DateInput/DateInput.md +111 -0
- package/components/DatePicker/DatePicker.md +368 -0
- package/components/Dropdown/Dropdown.md +45 -0
- package/components/DropdownMenu/DropdownMenu.md +290 -0
- package/components/FileUploader/FileUploader.md +131 -0
- package/components/FxInput/FxInput.md +31 -0
- package/components/Gapped/Gapped.md +44 -0
- package/components/GlobalLoader/GlobalLoader.md +97 -0
- package/components/Group/Group.md +19 -0
- package/components/Hint/Hint.md +86 -0
- package/components/Input/Input.md +86 -0
- package/components/Input/InputLayout/InputLayout/InputLayout.js +5 -2
- package/components/Input/InputLayout/InputLayout/InputLayout.js.map +1 -1
- package/components/Input/InputLayout/InputLayout.d.ts +1 -0
- package/components/Kebab/Kebab.md +306 -0
- package/components/Link/Link.md +182 -0
- package/components/Loader/Loader.md +33 -0
- package/components/MaskedInput/MaskedInput/MaskedInput.js +1 -11
- package/components/MaskedInput/MaskedInput/MaskedInput.js.map +1 -1
- package/components/MaskedInput/MaskedInput.d.ts +0 -8
- package/components/MaskedInput/MaskedInput.md +114 -0
- package/components/MenuFooter/MenuFooter.md +27 -0
- package/components/MenuHeader/MenuHeader.md +35 -0
- package/components/MenuItem/MenuItem.md +139 -0
- package/components/MenuSeparator/MenuSeparator.md +14 -0
- package/components/MiniModal/MiniModal.md +231 -0
- package/components/Modal/Modal.md +56 -0
- package/components/Paging/Paging.md +57 -0
- package/components/PasswordInput/PasswordInput.md +29 -0
- package/components/Radio/Radio.md +57 -0
- package/components/RadioGroup/RadioGroup.md +44 -0
- package/components/ResponsiveLayout/ResponsiveLayout.md +75 -0
- package/components/ScrollContainer/ScrollContainer.md +224 -0
- package/components/Select/Select.md +113 -0
- package/components/SidePage/SidePage.md +65 -0
- package/components/SingleToast/SingleToast.md +36 -0
- package/components/Spinner/Spinner.md +36 -0
- package/components/Sticky/Sticky.md +28 -0
- package/components/Switcher/Switcher.md +111 -0
- package/components/Tabs/Tab.md +73 -0
- package/components/Tabs/Tabs.md +54 -0
- package/components/Textarea/Textarea/Textarea.js +11 -2
- package/components/Textarea/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/Textarea.d.ts +6 -1
- package/components/Textarea/Textarea.md +58 -0
- package/components/Textarea/Textarea.styles/Textarea.styles.js +1 -1
- package/components/Textarea/Textarea.styles/Textarea.styles.js.map +1 -1
- package/components/Toast/Toast.md +69 -0
- package/components/Toggle/Toggle.md +110 -0
- package/components/Token/Token.md +48 -0
- package/components/TokenInput/TokenInput.md +277 -0
- package/components/Tooltip/Tooltip/Tooltip.js +4 -7
- package/components/Tooltip/Tooltip/Tooltip.js.map +1 -1
- package/components/Tooltip/Tooltip.d.ts +1 -1
- package/components/Tooltip/Tooltip.md +322 -0
- package/components/TooltipMenu/TooltipMenu.md +241 -0
- package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js +21 -7
- package/internal/ClearCrossIcon/ClearCrossIcon/ClearCrossIcon.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.d.ts +1 -0
- package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js +14 -5
- package/internal/ClearCrossIcon/ClearCrossIcon.styles/ClearCrossIcon.styles.js.map +1 -1
- package/internal/ClearCrossIcon/ClearCrossIcon.styles.d.ts +3 -0
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js +44 -51
- package/internal/CustomComboBox/ComboBoxView/ComboBoxView.js.map +1 -1
- package/internal/CustomComboBox/ComboBoxView.d.ts +7 -6
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js +3 -5
- package/internal/CustomComboBox/CustomComboBox/CustomComboBox.js.map +1 -1
- package/internal/CustomComboBox/CustomComboBox.d.ts +6 -5
- package/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js +5 -3
- package/internal/CustomComboBox/getComboBoxTheme/getComboBoxTheme.js.map +1 -1
- package/internal/CustomComboBox/getComboBoxTheme.d.ts +2 -1
- package/internal/DataTids/DATATIDS.md +12 -0
- package/internal/DataTids/DataTids/DataTids.js +69 -0
- package/internal/DataTids/DataTids/DataTids.js.map +1 -0
- package/internal/DataTids/DataTids/package.json +6 -0
- package/internal/DataTids/DataTids.d.ts +12 -0
- package/internal/DataTids/DataTids.styles/DataTids.styles.js +20 -0
- package/internal/DataTids/DataTids.styles/DataTids.styles.js.map +1 -0
- package/internal/DataTids/DataTids.styles/package.json +6 -0
- package/internal/DataTids/DataTids.styles.d.ts +7 -0
- package/internal/DataTids/componentsDataTids/componentsDataTids.js +12 -0
- package/internal/DataTids/componentsDataTids/componentsDataTids.js.map +1 -0
- package/internal/DataTids/componentsDataTids/package.json +6 -0
- package/internal/DataTids/componentsDataTids.d.ts +5 -0
- package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js +7 -4
- package/internal/InputLikeText/InputLikeText.styles/InputLikeText.styles.js.map +1 -1
- package/internal/InputLikeText/InputLikeText.styles.d.ts +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js +249 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/InternalTextareaWithLayout.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout/package.json +6 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.d.ts +37 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js +8 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/InternalTextareaWithLayout.styles.js.map +1 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles/package.json +6 -0
- package/internal/InternalTextareaWithLayout/InternalTextareaWithLayout.styles.d.ts +3 -0
- package/internal/ThemePlayground/Playground.md +7 -0
- package/internal/ThemeShowcase/VariablesCollector.d.ts +1 -1
- package/internal/themes/BasicTheme/BasicTheme.js +4 -4
- package/internal/themes/BasicTheme/BasicTheme.js.map +1 -1
- package/internal/themes/BasicTheme.d.ts +2 -0
- package/internal/themes/DarkTheme5_4/DarkTheme5_4.js +4 -2
- package/internal/themes/DarkTheme5_4/DarkTheme5_4.js.map +1 -1
- package/internal/themes/LightTheme5_4/LightTheme5_4.js +4 -2
- package/internal/themes/LightTheme5_4/LightTheme5_4.js.map +1 -1
- package/internal/themes/consts/consts.js +7 -0
- package/internal/themes/consts/consts.js.map +1 -0
- package/internal/themes/consts/package.json +6 -0
- package/internal/themes/consts.d.ts +7 -0
- package/lib/featureFlagsContext/FEATUREFLAGSCONTEXT.md +64 -0
- package/lib/locale/LOCALECONTEXT.md +222 -0
- package/lib/theming/ThemeContext.md +265 -0
- package/package.json +6 -1
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
### Базовый пример
|
|
2
|
+
|
|
3
|
+
```jsx harmony
|
|
4
|
+
<Hint text="Подсказка">Базовая</Hint>
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### Иконка
|
|
8
|
+
|
|
9
|
+
```jsx harmony
|
|
10
|
+
<Hint text="Редактирование">
|
|
11
|
+
<svg width="16" height="16" viewBox="0 0 16 16">
|
|
12
|
+
<path
|
|
13
|
+
fillRule="evenodd"
|
|
14
|
+
d="M13 12V12.998H8V12H13ZM3 13V11L9 4.99999L11 6.99999L5 13H3ZM13 5L11.5 6.5L9.5 4.5L11 3L13 5Z"
|
|
15
|
+
clipRule="evenodd"
|
|
16
|
+
/>
|
|
17
|
+
</svg>
|
|
18
|
+
</Hint>
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Сторона всплытия
|
|
22
|
+
|
|
23
|
+
```jsx harmony
|
|
24
|
+
<Hint pos={"left"} text="Подсказка слева">Всегда всплывает слева</Hint>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Ограниченная ширина
|
|
28
|
+
```jsx harmony
|
|
29
|
+
<Hint
|
|
30
|
+
maxWidth="150px"
|
|
31
|
+
text="Очень много текста, рассказывающего про этот очень непонятный элемент"
|
|
32
|
+
>
|
|
33
|
+
Очень непонятный элемент
|
|
34
|
+
</Hint>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Открытие подсказки кнопкой
|
|
38
|
+
|
|
39
|
+
```jsx harmony
|
|
40
|
+
import { Button, Gapped } from '@skbkontur/react-ui';
|
|
41
|
+
|
|
42
|
+
const [isOpen, setIsOpen] = React.useState(false);
|
|
43
|
+
|
|
44
|
+
<Gapped>
|
|
45
|
+
<Hint opened={isOpen} manual text="Подсказка">Управляемая удалённо</Hint>
|
|
46
|
+
<Button onClick={() => setIsOpen(!isOpen)}>
|
|
47
|
+
{isOpen ? "Закрыть подсказку" : "Открыть подсказку"}
|
|
48
|
+
</Button>
|
|
49
|
+
</Gapped>
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
### Всплытие без анимации
|
|
53
|
+
|
|
54
|
+
```jsx harmony
|
|
55
|
+
<Hint disableAnimations text={"Нет анимации :("}>Есть анимация?</Hint>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Встроеная обёртка
|
|
59
|
+
|
|
60
|
+
Подсказка должна отображаться даже на отключённых компонентах. Из коробки это работает только с контролами `react-ui`.
|
|
61
|
+
|
|
62
|
+
Нативные элементы, поддерживающие атрибут `disabled`, отключают необходимые события мыши.
|
|
63
|
+
В подобных случаях следуют использовать проп `useWrapper`:
|
|
64
|
+
|
|
65
|
+
```jsx harmony
|
|
66
|
+
<Hint useWrapper text="Подсказа всё равно отображается">
|
|
67
|
+
<button disabled>native button</button>
|
|
68
|
+
</Hint>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Кастомная обертка
|
|
72
|
+
Т.к. встроённая обёртка это `<span>` без стилей, то она может работать некорректно в определённых ситуациях.
|
|
73
|
+
В таких случаях стоит использовать собственную обётку:
|
|
74
|
+
|
|
75
|
+
```jsx harmony
|
|
76
|
+
<>
|
|
77
|
+
<Hint useWrapper text="Подсказа">
|
|
78
|
+
<button disabled style={{ height: 40 }}>useWrapper prop</button>
|
|
79
|
+
</Hint>
|
|
80
|
+
<Hint text="Подсказа">
|
|
81
|
+
<span style={{ display: 'inline-block' }}>
|
|
82
|
+
<button disabled style={{ height: 40 }}>custom wrapper</button>
|
|
83
|
+
</span>
|
|
84
|
+
</Hint>
|
|
85
|
+
</>
|
|
86
|
+
```
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
### Базовый пример
|
|
2
|
+
```jsx harmony
|
|
3
|
+
|
|
4
|
+
<Input />;
|
|
5
|
+
```
|
|
6
|
+
|
|
7
|
+
### Иконка
|
|
8
|
+
```jsx harmony
|
|
9
|
+
import { SearchLoupeIcon16Regular } from '@skbkontur/icons/icons/SearchLoupeIcon/SearchLoupeIcon16Regular';
|
|
10
|
+
|
|
11
|
+
<Input leftIcon={<SearchLoupeIcon16Regular />} />;
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
### Очистка значения
|
|
15
|
+
Очистить значение в `Input`'е можно только с помощью пустой строки
|
|
16
|
+
|
|
17
|
+
```jsx harmony
|
|
18
|
+
import { Button, Group } from '@skbkontur/react-ui';
|
|
19
|
+
|
|
20
|
+
const [value, setValue] = React.useState('Значение');
|
|
21
|
+
|
|
22
|
+
<Group>
|
|
23
|
+
<Input value={value} onValueChange={setValue} />
|
|
24
|
+
<Button onClick={() => setValue('')}>Очистить</Button>
|
|
25
|
+
</Group>
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
### Префикс
|
|
29
|
+
|
|
30
|
+
```jsx harmony
|
|
31
|
+
import { SearchLoupeIcon16Regular } from '@skbkontur/icons/icons/SearchLoupeIcon/SearchLoupeIcon16Regular';
|
|
32
|
+
|
|
33
|
+
<Input
|
|
34
|
+
width={400}
|
|
35
|
+
prefix="https://kontur.ru/search?query="
|
|
36
|
+
rightIcon={<SearchLoupeIcon16Regular />}
|
|
37
|
+
/>;
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### type
|
|
41
|
+
|
|
42
|
+
```jsx harmony
|
|
43
|
+
import { Gapped, Input, Tooltip } from '@skbkontur/react-ui';
|
|
44
|
+
|
|
45
|
+
<Gapped vertical gap={20}>
|
|
46
|
+
<Gapped gap={20}>
|
|
47
|
+
<Input type="password" />
|
|
48
|
+
<span>type = "password"</span>
|
|
49
|
+
</Gapped>
|
|
50
|
+
|
|
51
|
+
<Gapped gap={20}>
|
|
52
|
+
<Input type="number" />
|
|
53
|
+
<span>type = "number"</span>
|
|
54
|
+
</Gapped>
|
|
55
|
+
|
|
56
|
+
<Gapped gap={20}>
|
|
57
|
+
<Input type="tel" />
|
|
58
|
+
<span>type = "tel"</span>
|
|
59
|
+
</Gapped>
|
|
60
|
+
|
|
61
|
+
<Gapped gap={20}>
|
|
62
|
+
<Input type="search" />
|
|
63
|
+
<span>type = "search"</span>
|
|
64
|
+
</Gapped>
|
|
65
|
+
|
|
66
|
+
<Gapped gap={20}>
|
|
67
|
+
<Input type="time" />
|
|
68
|
+
<span>type = "time"</span>
|
|
69
|
+
</Gapped>
|
|
70
|
+
|
|
71
|
+
<Gapped gap={20}>
|
|
72
|
+
<Input type="date" />
|
|
73
|
+
<span>type = "date"</span>
|
|
74
|
+
</Gapped>
|
|
75
|
+
|
|
76
|
+
<Gapped gap={20}>
|
|
77
|
+
<Input type="url" />
|
|
78
|
+
<span>type = "url"</span>
|
|
79
|
+
</Gapped>
|
|
80
|
+
|
|
81
|
+
<Gapped gap={20}>
|
|
82
|
+
<Input type="email" />
|
|
83
|
+
<span>type = "email"</span>
|
|
84
|
+
</Gapped>
|
|
85
|
+
</Gapped>
|
|
86
|
+
```
|
|
@@ -13,14 +13,17 @@ export var InputLayout = forwardRefAndName('InputLayout', function (props, ref)
|
|
|
13
13
|
suffix = props.suffix,
|
|
14
14
|
labelProps = props.labelProps,
|
|
15
15
|
context = props.context,
|
|
16
|
-
children = props.children
|
|
16
|
+
children = props.children,
|
|
17
|
+
_props$tag = props.tag,
|
|
18
|
+
tag = _props$tag === void 0 ? 'label' : _props$tag;
|
|
17
19
|
var _context = _extends({}, InputLayoutContextDefault, context);
|
|
20
|
+
var Tag = tag;
|
|
18
21
|
return /*#__PURE__*/(
|
|
19
22
|
React.createElement(InputLayoutContext.Provider, {
|
|
20
23
|
value: _context
|
|
21
24
|
}, /*#__PURE__*/
|
|
22
25
|
React.createElement(CommonWrapper, props, /*#__PURE__*/
|
|
23
|
-
React.createElement(
|
|
26
|
+
React.createElement(Tag, _extends({
|
|
24
27
|
ref: ref,
|
|
25
28
|
"data-tid": InputDataTids.root
|
|
26
29
|
}, labelProps), /*#__PURE__*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","forwardRefAndName","InputDataTids","CommonWrapper","InputLayoutAside","InputLayoutContext","InputLayoutContextDefault","stylesLayout","InputLayout","props","ref","leftIcon","rightIcon","prefix","suffix","labelProps","context","children","_context","_extends","createElement","Provider","value","root","icon","text","side","className","input"],"sources":["InputLayout.tsx"],"sourcesContent":["import React from 'react';\n\nimport { forwardRefAndName } from '../../../lib/forwardRefAndName';\nimport type { InputProps } from '../Input';\nimport { InputDataTids } from '../Input';\nimport type { CommonProps } from '../../../internal/CommonWrapper';\nimport { CommonWrapper } from '../../../internal/CommonWrapper';\n\nimport { InputLayoutAside } from './InputLayoutAside';\nimport type { InputLayoutContextProps } from './InputLayoutContext';\nimport { InputLayoutContext, InputLayoutContextDefault } from './InputLayoutContext';\nimport { stylesLayout } from './InputLayout.styles';\n\ntype InputLayoutRootFromInputProps = Pick<InputProps, 'leftIcon' | 'rightIcon' | 'prefix' | 'suffix'>;\n\nexport interface InputLayoutRootProps extends InputLayoutRootFromInputProps, CommonProps {\n labelProps: React.LabelHTMLAttributes<HTMLLabelElement>;\n context: Partial<InputLayoutContextProps>;\n}\n\nexport const InputLayout = forwardRefAndName<HTMLLabelElement, InputLayoutRootProps>('InputLayout', (props, ref) => {\n const { leftIcon, rightIcon, prefix, suffix, labelProps, context, children } = props;\n const _context: InputLayoutContextProps = { ...InputLayoutContextDefault, ...context };\n\n return (\n <InputLayoutContext.Provider value={_context}>\n <CommonWrapper {...props}>\n <
|
|
1
|
+
{"version":3,"names":["React","forwardRefAndName","InputDataTids","CommonWrapper","InputLayoutAside","InputLayoutContext","InputLayoutContextDefault","stylesLayout","InputLayout","props","ref","leftIcon","rightIcon","prefix","suffix","labelProps","context","children","_props$tag","tag","_context","_extends","Tag","createElement","Provider","value","root","icon","text","side","className","input"],"sources":["InputLayout.tsx"],"sourcesContent":["import React from 'react';\n\nimport { forwardRefAndName } from '../../../lib/forwardRefAndName';\nimport type { InputProps } from '../Input';\nimport { InputDataTids } from '../Input';\nimport type { CommonProps } from '../../../internal/CommonWrapper';\nimport { CommonWrapper } from '../../../internal/CommonWrapper';\n\nimport { InputLayoutAside } from './InputLayoutAside';\nimport type { InputLayoutContextProps } from './InputLayoutContext';\nimport { InputLayoutContext, InputLayoutContextDefault } from './InputLayoutContext';\nimport { stylesLayout } from './InputLayout.styles';\n\ntype InputLayoutRootFromInputProps = Pick<InputProps, 'leftIcon' | 'rightIcon' | 'prefix' | 'suffix'>;\n\nexport interface InputLayoutRootProps extends InputLayoutRootFromInputProps, CommonProps {\n labelProps: React.LabelHTMLAttributes<HTMLLabelElement>;\n context: Partial<InputLayoutContextProps>;\n tag?: 'label' | 'span';\n}\n\nexport const InputLayout = forwardRefAndName<HTMLLabelElement, InputLayoutRootProps>('InputLayout', (props, ref) => {\n const { leftIcon, rightIcon, prefix, suffix, labelProps, context, children, tag = 'label' } = props;\n const _context: InputLayoutContextProps = { ...InputLayoutContextDefault, ...context };\n const Tag = tag;\n\n return (\n <InputLayoutContext.Provider value={_context}>\n <CommonWrapper {...props}>\n <Tag ref={ref} data-tid={InputDataTids.root} {...labelProps}>\n <InputLayoutAside icon={leftIcon} text={prefix} side=\"left\" />\n <span className={stylesLayout.input()}>{children}</span>\n <InputLayoutAside icon={rightIcon} text={suffix} side=\"right\" />\n </Tag>\n </CommonWrapper>\n </InputLayoutContext.Provider>\n );\n});\n"],"mappings":"0DAAA,OAAOA,KAAK,MAAM,OAAO;;AAEzB,SAASC,iBAAiB,QAAQ,gCAAgC;;AAElE,SAASC,aAAa,QAAQ,UAAU;;AAExC,SAASC,aAAa,QAAQ,iCAAiC;;AAE/D,SAASC,gBAAgB,QAAQ,oBAAoB;;AAErD,SAASC,kBAAkB,EAAEC,yBAAyB,QAAQ,sBAAsB;AACpF,SAASC,YAAY,QAAQ,sBAAsB;;;;;;;;;;AAUnD,OAAO,IAAMC,WAAW,GAAGP,iBAAiB,CAAyC,aAAa,EAAE,UAACQ,KAAK,EAAEC,GAAG,EAAK;EAClH,IAAQC,QAAQ,GAA8EF,KAAK,CAA3FE,QAAQ,CAAEC,SAAS,GAAmEH,KAAK,CAAjFG,SAAS,CAAEC,MAAM,GAA2DJ,KAAK,CAAtEI,MAAM,CAAEC,MAAM,GAAmDL,KAAK,CAA9DK,MAAM,CAAEC,UAAU,GAAuCN,KAAK,CAAtDM,UAAU,CAAEC,OAAO,GAA8BP,KAAK,CAA1CO,OAAO,CAAEC,QAAQ,GAAoBR,KAAK,CAAjCQ,QAAQ,CAAAC,UAAA,GAAoBT,KAAK,CAAvBU,GAAG,CAAHA,GAAG,GAAAD,UAAA,cAAG,OAAO,GAAAA,UAAA;EACzF,IAAME,QAAiC,GAAAC,QAAA,KAAQf,yBAAyB,EAAKU,OAAO,CAAE;EACtF,IAAMM,GAAG,GAAGH,GAAG;;EAEf;IACEnB,KAAA,CAAAuB,aAAA,CAAClB,kBAAkB,CAACmB,QAAQ,IAACC,KAAK,EAAEL,QAAS;IAC3CpB,KAAA,CAAAuB,aAAA,CAACpB,aAAa,EAAKM,KAAK;IACtBT,KAAA,CAAAuB,aAAA,CAACD,GAAG,EAAAD,QAAA,GAACX,GAAG,EAAEA,GAAI,EAAC,YAAUR,aAAa,CAACwB,IAAK,IAAKX,UAAU;IACzDf,KAAA,CAAAuB,aAAA,CAACnB,gBAAgB,IAACuB,IAAI,EAAEhB,QAAS,EAACiB,IAAI,EAAEf,MAAO,EAACgB,IAAI,EAAC,MAAM,EAAE,CAAC;IAC9D7B,KAAA,CAAAuB,aAAA,WAAMO,SAAS,EAAEvB,YAAY,CAACwB,KAAK,CAAC,CAAE,IAAEd,QAAe,CAAC;IACxDjB,KAAA,CAAAuB,aAAA,CAACnB,gBAAgB,IAACuB,IAAI,EAAEf,SAAU,EAACgB,IAAI,EAAEd,MAAO,EAACe,IAAI,EAAC,OAAO,EAAE;IAC5D;IACQ;IACY,CAAC;;AAElC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -6,6 +6,7 @@ type InputLayoutRootFromInputProps = Pick<InputProps, 'leftIcon' | 'rightIcon' |
|
|
|
6
6
|
export interface InputLayoutRootProps extends InputLayoutRootFromInputProps, CommonProps {
|
|
7
7
|
labelProps: React.LabelHTMLAttributes<HTMLLabelElement>;
|
|
8
8
|
context: Partial<InputLayoutContextProps>;
|
|
9
|
+
tag?: 'label' | 'span';
|
|
9
10
|
}
|
|
10
11
|
export declare const InputLayout: import("../../../lib/forwardRefAndName").ReactUIComponentWithRef<HTMLLabelElement, InputLayoutRootProps> & Record<never, never>;
|
|
11
12
|
export {};
|
|
@@ -0,0 +1,306 @@
|
|
|
1
|
+
### Базовый пример
|
|
2
|
+
|
|
3
|
+
```jsx harmony
|
|
4
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
5
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
6
|
+
import { Gapped, MenuItem, Toast } from '@skbkontur/react-ui';
|
|
7
|
+
|
|
8
|
+
let style = {
|
|
9
|
+
alignItems: 'center',
|
|
10
|
+
border: '1px solid #dfdede',
|
|
11
|
+
display: 'flex',
|
|
12
|
+
justifyContent: 'space-between',
|
|
13
|
+
padding: '0 20px',
|
|
14
|
+
width: 250,
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
let Card = ({ name, post }) => (
|
|
18
|
+
<div style={style}>
|
|
19
|
+
<div>
|
|
20
|
+
<h3>{name}</h3>
|
|
21
|
+
<p style={{ color: 'gray' }}>{post}</p>
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<Kebab size="large">
|
|
25
|
+
<MenuItem icon={<ToolPencilLineIcon16Regular />} onClick={() => Toast.push('Отредактировано')}>
|
|
26
|
+
Редактировать
|
|
27
|
+
</MenuItem>
|
|
28
|
+
<MenuItem icon={<TrashCanIcon16Regular />} onClick={() => Toast.push('Удалено')}>
|
|
29
|
+
Удалить
|
|
30
|
+
</MenuItem>
|
|
31
|
+
</Kebab>
|
|
32
|
+
</div>
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
<Gapped gap={-1} wrap>
|
|
36
|
+
<Gapped gap={-1}>
|
|
37
|
+
<Card name="Баранова Анастасия" post="SEO GazPro" />
|
|
38
|
+
<Card name="Слуцкий Антон" post="Junior Front-Back Developer" />
|
|
39
|
+
</Gapped>
|
|
40
|
+
<Gapped gap={-1}>
|
|
41
|
+
<Card name="Иванов Иван" post="Head Ivan Co" />
|
|
42
|
+
<Card name="Сашка Егоров" post="KungFu Master" />
|
|
43
|
+
</Gapped>
|
|
44
|
+
</Gapped>;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Размер
|
|
48
|
+
|
|
49
|
+
```jsx harmony
|
|
50
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
51
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
52
|
+
import { Gapped, MenuItem, Toast} from '@skbkontur/react-ui';
|
|
53
|
+
|
|
54
|
+
let style = {
|
|
55
|
+
alignItems: 'center',
|
|
56
|
+
border: '1px solid #dfdede',
|
|
57
|
+
display: 'flex',
|
|
58
|
+
justifyContent: 'space-between',
|
|
59
|
+
padding: '0 20px',
|
|
60
|
+
width: 230,
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
let Card = ({ title, size }) => (
|
|
64
|
+
<div style={style}>
|
|
65
|
+
<div>
|
|
66
|
+
<h3>{title}</h3>
|
|
67
|
+
</div>
|
|
68
|
+
|
|
69
|
+
<Kebab size={size}>
|
|
70
|
+
<MenuItem icon={<ToolPencilLineIcon16Regular />} onClick={() => Toast.push('Отредактировано')}>
|
|
71
|
+
Редактировать
|
|
72
|
+
</MenuItem>
|
|
73
|
+
<MenuItem icon={<TrashCanIcon16Regular />} onClick={() => Toast.push('Удалено')}>
|
|
74
|
+
Удалить
|
|
75
|
+
</MenuItem>
|
|
76
|
+
</Kebab>
|
|
77
|
+
</div>
|
|
78
|
+
);
|
|
79
|
+
|
|
80
|
+
<Gapped>
|
|
81
|
+
<Card title="Маленький кебаб" size="small" />
|
|
82
|
+
<Card title="Средний кебаб" size="medium" />
|
|
83
|
+
<Card title="Большой кебаб" size="large" />
|
|
84
|
+
</Gapped>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
### Кебаб-меню с выпадашкой слева
|
|
88
|
+
|
|
89
|
+
```jsx harmony
|
|
90
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
91
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
92
|
+
import { MenuItem, Toast } from '@skbkontur/react-ui';
|
|
93
|
+
|
|
94
|
+
let style = {
|
|
95
|
+
alignItems: 'center',
|
|
96
|
+
border: '1px solid #dfdede',
|
|
97
|
+
display: 'flex',
|
|
98
|
+
justifyContent: 'space-between',
|
|
99
|
+
padding: '0 20px',
|
|
100
|
+
width: 250,
|
|
101
|
+
};
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
let Card = ({ title }) => (
|
|
105
|
+
<div style={style}>
|
|
106
|
+
<div>
|
|
107
|
+
<h3>{title}</h3>
|
|
108
|
+
</div>
|
|
109
|
+
|
|
110
|
+
<Kebab positions={['left middle']} size="large">
|
|
111
|
+
<MenuItem icon={<ToolPencilLineIcon16Regular />} onClick={() => Toast.push('Отредактировано')}>
|
|
112
|
+
Редактировать
|
|
113
|
+
</MenuItem>
|
|
114
|
+
<MenuItem icon={<TrashCanIcon16Regular />} onClick={() => Toast.push('Удалено')}>
|
|
115
|
+
Удалить
|
|
116
|
+
</MenuItem>
|
|
117
|
+
</Kebab>
|
|
118
|
+
</div>
|
|
119
|
+
);
|
|
120
|
+
|
|
121
|
+
<Card title="С выпадашкой слева" />
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Кастомное действие при открытии
|
|
125
|
+
|
|
126
|
+
```jsx harmony
|
|
127
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
128
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
129
|
+
import { MenuItem, Toast } from '@skbkontur/react-ui';
|
|
130
|
+
|
|
131
|
+
let style = {
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
border: '1px solid #dfdede',
|
|
134
|
+
display: 'flex',
|
|
135
|
+
justifyContent: 'space-between',
|
|
136
|
+
padding: '0 20px',
|
|
137
|
+
width: 250,
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
let Card = ({ title }) => (
|
|
141
|
+
<div style={style}>
|
|
142
|
+
<div>
|
|
143
|
+
<h3>{title}</h3>
|
|
144
|
+
</div>
|
|
145
|
+
|
|
146
|
+
<Kebab
|
|
147
|
+
onOpen={() => Toast.push('Кебаб-меню открылось!')}
|
|
148
|
+
size="large"
|
|
149
|
+
>
|
|
150
|
+
<MenuItem icon={<ToolPencilLineIcon16Regular />} onClick={() => Toast.push('Отредактировано')}>
|
|
151
|
+
Редактировать
|
|
152
|
+
</MenuItem>
|
|
153
|
+
<MenuItem icon={<TrashCanIcon16Regular />} onClick={() => Toast.push('Удалено')}>
|
|
154
|
+
Удалить
|
|
155
|
+
</MenuItem>
|
|
156
|
+
</Kebab>
|
|
157
|
+
</div>
|
|
158
|
+
);
|
|
159
|
+
|
|
160
|
+
<Card title="С кастомным действием" />
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Иконка и автовыравнивание
|
|
164
|
+
|
|
165
|
+
```jsx harmony
|
|
166
|
+
import { Button, MenuHeader, MenuItem, MenuSeparator, Kebab } from '@skbkontur/react-ui';
|
|
167
|
+
import { CheckAIcon16Regular } from '@skbkontur/icons/icons/CheckAIcon/CheckAIcon16Regular';
|
|
168
|
+
|
|
169
|
+
<Kebab>
|
|
170
|
+
<MenuHeader>MenuHeader</MenuHeader>
|
|
171
|
+
<MenuItem icon={<CheckAIcon16Regular />}>MenuItem1</MenuItem>
|
|
172
|
+
<MenuItem icon={<CheckAIcon16Regular />}>MenuItem2</MenuItem>
|
|
173
|
+
<MenuItem>MenuItem3</MenuItem>
|
|
174
|
+
</Kebab>;
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Иконка и отключенное автовыравнивание
|
|
178
|
+
|
|
179
|
+
```jsx harmony
|
|
180
|
+
import { Button, MenuHeader, MenuItem, MenuSeparator, Kebab } from '@skbkontur/react-ui';
|
|
181
|
+
import { CheckAIcon16Regular } from '@skbkontur/icons/icons/CheckAIcon/CheckAIcon16Regular';
|
|
182
|
+
|
|
183
|
+
<Kebab preventIconsOffset>
|
|
184
|
+
<MenuHeader>MenuHeader</MenuHeader>
|
|
185
|
+
<MenuItem icon={<CheckAIcon16Regular />}>MenuItem1</MenuItem>
|
|
186
|
+
<MenuItem icon={<CheckAIcon16Regular />}>MenuItem2</MenuItem>
|
|
187
|
+
<MenuItem>MenuItem3</MenuItem>
|
|
188
|
+
</Kebab>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
### Отключенное кебаб-меню
|
|
192
|
+
|
|
193
|
+
```jsx harmony
|
|
194
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
195
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
196
|
+
import { MenuItem, Toast } from '@skbkontur/react-ui';
|
|
197
|
+
|
|
198
|
+
let style = {
|
|
199
|
+
alignItems: 'center',
|
|
200
|
+
border: '1px solid #dfdede',
|
|
201
|
+
display: 'flex',
|
|
202
|
+
justifyContent: 'space-between',
|
|
203
|
+
padding: '0 20px',
|
|
204
|
+
width: 250,
|
|
205
|
+
};
|
|
206
|
+
|
|
207
|
+
let Card = ({ title }) => (
|
|
208
|
+
<div style={style}>
|
|
209
|
+
<div>
|
|
210
|
+
<h3>{title}</h3>
|
|
211
|
+
</div>
|
|
212
|
+
|
|
213
|
+
<Kebab disabled size="large">
|
|
214
|
+
<MenuItem icon={<ToolPencilLineIcon16Regular />} onClick={() => Toast.push('Отредактировано')}>
|
|
215
|
+
Редактировать
|
|
216
|
+
</MenuItem>
|
|
217
|
+
<MenuItem icon={<TrashCanIcon16Regular />} onClick={() => Toast.push('Удалено')}>
|
|
218
|
+
Удалить
|
|
219
|
+
</MenuItem>
|
|
220
|
+
</Kebab>
|
|
221
|
+
</div>
|
|
222
|
+
);
|
|
223
|
+
|
|
224
|
+
<Card title="Не нажимается :(" />
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
### Отключенная анимация
|
|
228
|
+
|
|
229
|
+
```jsx harmony
|
|
230
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
231
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
232
|
+
import { MenuItem, Toast } from '@skbkontur/react-ui';
|
|
233
|
+
|
|
234
|
+
let style = {
|
|
235
|
+
alignItems: 'center',
|
|
236
|
+
border: '1px solid #dfdede',
|
|
237
|
+
display: 'flex',
|
|
238
|
+
justifyContent: 'space-between',
|
|
239
|
+
padding: '0 20px',
|
|
240
|
+
width: 250,
|
|
241
|
+
};
|
|
242
|
+
|
|
243
|
+
let Card = ({ title }) => (
|
|
244
|
+
<div style={style}>
|
|
245
|
+
<div>
|
|
246
|
+
<h3>{title}</h3>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
<Kebab disableAnimations size="large">
|
|
250
|
+
<MenuItem icon={<ToolPencilLineIcon16Regular />} onClick={() => Toast.push('Отредактировано')}>
|
|
251
|
+
Редактировать
|
|
252
|
+
</MenuItem>
|
|
253
|
+
<MenuItem icon={<TrashCanIcon16Regular />} onClick={() => Toast.push('Удалено')}>
|
|
254
|
+
Удалить
|
|
255
|
+
</MenuItem>
|
|
256
|
+
</Kebab>
|
|
257
|
+
</div>
|
|
258
|
+
);
|
|
259
|
+
|
|
260
|
+
<Card title="Без анимации" />
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
### Высота
|
|
264
|
+
|
|
265
|
+
```jsx harmony
|
|
266
|
+
import { ToolPencilLineIcon16Regular } from '@skbkontur/icons/icons/ToolPencilLineIcon/ToolPencilLineIcon16Regular';
|
|
267
|
+
import { TrashCanIcon16Regular } from '@skbkontur/icons/icons/TrashCanIcon/TrashCanIcon16Regular';
|
|
268
|
+
import { MenuItem, Toast } from '@skbkontur/react-ui';
|
|
269
|
+
|
|
270
|
+
let style = {
|
|
271
|
+
alignItems: 'center',
|
|
272
|
+
border: '1px solid #dfdede',
|
|
273
|
+
display: 'flex',
|
|
274
|
+
justifyContent: 'space-between',
|
|
275
|
+
padding: '0 20px',
|
|
276
|
+
width: 250,
|
|
277
|
+
};
|
|
278
|
+
|
|
279
|
+
let Card = ({ title }) => (
|
|
280
|
+
<div style={style}>
|
|
281
|
+
<div>
|
|
282
|
+
<h3>{title}</h3>
|
|
283
|
+
</div>
|
|
284
|
+
|
|
285
|
+
<Kebab
|
|
286
|
+
menuMaxHeight="100px"
|
|
287
|
+
size="large"
|
|
288
|
+
>
|
|
289
|
+
<MenuItem>
|
|
290
|
+
Действие
|
|
291
|
+
</MenuItem>
|
|
292
|
+
<MenuItem>
|
|
293
|
+
И ещё одно
|
|
294
|
+
</MenuItem>
|
|
295
|
+
<MenuItem>
|
|
296
|
+
Ещё действие
|
|
297
|
+
</MenuItem>
|
|
298
|
+
<MenuItem>
|
|
299
|
+
И последнее действие
|
|
300
|
+
</MenuItem>
|
|
301
|
+
</Kebab>
|
|
302
|
+
</div>
|
|
303
|
+
);
|
|
304
|
+
|
|
305
|
+
<Card title="С заданной высотой" />
|
|
306
|
+
```
|