@salutejs/plasma-new-hope 0.322.0-canary.1933.14614537450.0 → 0.322.0-canary.1938.14660334712.0
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/cjs/components/Notification/Notification.types.js.map +1 -1
- package/cjs/components/Notification/NotificationsStore.js +4 -2
- package/cjs/components/Notification/NotificationsStore.js.map +1 -1
- package/emotion/cjs/components/Accordion/Accordion.template-doc.mdx +99 -71
- package/emotion/cjs/components/Autocomplete/Autocomplete.template-doc.mdx +523 -454
- package/emotion/cjs/components/Checkbox/Checkbox.template-doc.mdx +3 -3
- package/emotion/cjs/components/Combobox/Combobox.template-doc.mdx +58 -27
- package/emotion/cjs/components/DatePicker/DatePicker.template-doc.mdx +5 -0
- package/emotion/cjs/components/Dropdown/Dropdown.template-doc.mdx +10 -10
- package/emotion/cjs/components/Flow/Flow.template-doc.mdx +2 -2
- package/emotion/cjs/components/Notification/Notification.template-doc.mdx +23 -2
- package/emotion/cjs/components/Notification/NotificationsStore.js +4 -2
- package/emotion/cjs/components/NumberFormat/NumberFormat.template-doc.mdx +4 -4
- package/emotion/cjs/components/Radiobox/Radiobox.template-doc.mdx +10 -11
- package/emotion/cjs/components/Range/Range.template-doc.mdx +5 -1
- package/emotion/cjs/components/Segment/Segment.template-doc.mdx +3 -3
- package/emotion/cjs/components/Select/Select.template-doc.mdx +27 -27
- package/emotion/cjs/components/Slider/Slider.template-doc.mdx +2 -2
- package/emotion/cjs/components/Switch/Switch.template-doc.mdx +3 -3
- package/emotion/cjs/components/Table/Table.template-doc.mdx +2 -2
- package/emotion/cjs/components/Tabs/Tabs.template-doc.mdx +11 -7
- package/emotion/cjs/components/TextArea/TextArea.template-doc.mdx +9 -2
- package/emotion/cjs/components/TextField/TextField.template-doc.mdx +117 -32
- package/emotion/cjs/components/Toast/Toast.template-doc.mdx +48 -2
- package/emotion/cjs/components/Tooltip/Tooltip.template-doc.mdx +19 -4
- package/emotion/cjs/components/Tree/Tree.template-doc.mdx +0 -1
- package/emotion/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -0
- package/emotion/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -0
- package/emotion/es/components/Accordion/Accordion.template-doc.mdx +99 -71
- package/emotion/es/components/Autocomplete/Autocomplete.template-doc.mdx +523 -454
- package/emotion/es/components/Checkbox/Checkbox.template-doc.mdx +3 -3
- package/emotion/es/components/Combobox/Combobox.template-doc.mdx +58 -27
- package/emotion/es/components/DatePicker/DatePicker.template-doc.mdx +5 -0
- package/emotion/es/components/Dropdown/Dropdown.template-doc.mdx +10 -10
- package/emotion/es/components/Flow/Flow.template-doc.mdx +2 -2
- package/emotion/es/components/Notification/Notification.template-doc.mdx +23 -2
- package/emotion/es/components/Notification/NotificationsStore.js +4 -2
- package/emotion/es/components/NumberFormat/NumberFormat.template-doc.mdx +4 -4
- package/emotion/es/components/Radiobox/Radiobox.template-doc.mdx +10 -11
- package/emotion/es/components/Range/Range.template-doc.mdx +5 -1
- package/emotion/es/components/Segment/Segment.template-doc.mdx +3 -3
- package/emotion/es/components/Select/Select.template-doc.mdx +27 -27
- package/emotion/es/components/Slider/Slider.template-doc.mdx +2 -2
- package/emotion/es/components/Switch/Switch.template-doc.mdx +3 -3
- package/emotion/es/components/Table/Table.template-doc.mdx +2 -2
- package/emotion/es/components/Tabs/Tabs.template-doc.mdx +11 -7
- package/emotion/es/components/TextArea/TextArea.template-doc.mdx +9 -2
- package/emotion/es/components/TextField/TextField.template-doc.mdx +117 -32
- package/emotion/es/components/Toast/Toast.template-doc.mdx +48 -2
- package/emotion/es/components/Tooltip/Tooltip.template-doc.mdx +19 -4
- package/emotion/es/components/Tree/Tree.template-doc.mdx +0 -1
- package/emotion/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -0
- package/emotion/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -0
- package/es/components/Notification/Notification.types.js.map +1 -1
- package/es/components/Notification/NotificationsStore.js +4 -2
- package/es/components/Notification/NotificationsStore.js.map +1 -1
- package/package.json +4 -4
- package/styled-components/cjs/components/Accordion/Accordion.template-doc.mdx +99 -71
- package/styled-components/cjs/components/Autocomplete/Autocomplete.template-doc.mdx +523 -454
- package/styled-components/cjs/components/Checkbox/Checkbox.template-doc.mdx +3 -3
- package/styled-components/cjs/components/Combobox/Combobox.template-doc.mdx +58 -27
- package/styled-components/cjs/components/DatePicker/DatePicker.template-doc.mdx +5 -0
- package/styled-components/cjs/components/Dropdown/Dropdown.template-doc.mdx +10 -10
- package/styled-components/cjs/components/Flow/Flow.template-doc.mdx +2 -2
- package/styled-components/cjs/components/Notification/Notification.template-doc.mdx +23 -2
- package/styled-components/cjs/components/Notification/NotificationsStore.js +4 -2
- package/styled-components/cjs/components/NumberFormat/NumberFormat.template-doc.mdx +4 -4
- package/styled-components/cjs/components/Radiobox/Radiobox.template-doc.mdx +10 -11
- package/styled-components/cjs/components/Range/Range.template-doc.mdx +5 -1
- package/styled-components/cjs/components/Segment/Segment.template-doc.mdx +3 -3
- package/styled-components/cjs/components/Select/Select.template-doc.mdx +27 -27
- package/styled-components/cjs/components/Slider/Slider.template-doc.mdx +2 -2
- package/styled-components/cjs/components/Switch/Switch.template-doc.mdx +3 -3
- package/styled-components/cjs/components/Table/Table.template-doc.mdx +2 -2
- package/styled-components/cjs/components/Tabs/Tabs.template-doc.mdx +11 -7
- package/styled-components/cjs/components/TextArea/TextArea.template-doc.mdx +9 -2
- package/styled-components/cjs/components/TextField/TextField.template-doc.mdx +117 -32
- package/styled-components/cjs/components/Toast/Toast.template-doc.mdx +48 -2
- package/styled-components/cjs/components/Tooltip/Tooltip.template-doc.mdx +19 -4
- package/styled-components/cjs/components/Tree/Tree.template-doc.mdx +0 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -0
- package/styled-components/cjs/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -0
- package/styled-components/es/components/Accordion/Accordion.template-doc.mdx +99 -71
- package/styled-components/es/components/Autocomplete/Autocomplete.template-doc.mdx +523 -454
- package/styled-components/es/components/Checkbox/Checkbox.template-doc.mdx +3 -3
- package/styled-components/es/components/Combobox/Combobox.template-doc.mdx +58 -27
- package/styled-components/es/components/DatePicker/DatePicker.template-doc.mdx +5 -0
- package/styled-components/es/components/Dropdown/Dropdown.template-doc.mdx +10 -10
- package/styled-components/es/components/Flow/Flow.template-doc.mdx +2 -2
- package/styled-components/es/components/Notification/Notification.template-doc.mdx +23 -2
- package/styled-components/es/components/Notification/NotificationsStore.js +4 -2
- package/styled-components/es/components/NumberFormat/NumberFormat.template-doc.mdx +4 -4
- package/styled-components/es/components/Radiobox/Radiobox.template-doc.mdx +10 -11
- package/styled-components/es/components/Range/Range.template-doc.mdx +5 -1
- package/styled-components/es/components/Segment/Segment.template-doc.mdx +3 -3
- package/styled-components/es/components/Select/Select.template-doc.mdx +27 -27
- package/styled-components/es/components/Slider/Slider.template-doc.mdx +2 -2
- package/styled-components/es/components/Switch/Switch.template-doc.mdx +3 -3
- package/styled-components/es/components/Table/Table.template-doc.mdx +2 -2
- package/styled-components/es/components/Tabs/Tabs.template-doc.mdx +11 -7
- package/styled-components/es/components/TextArea/TextArea.template-doc.mdx +9 -2
- package/styled-components/es/components/TextField/TextField.template-doc.mdx +117 -32
- package/styled-components/es/components/Toast/Toast.template-doc.mdx +48 -2
- package/styled-components/es/components/Tooltip/Tooltip.template-doc.mdx +19 -4
- package/styled-components/es/components/Tree/Tree.template-doc.mdx +0 -1
- package/styled-components/es/examples/plasma_b2c/components/Notification/Notification.stories.tsx +4 -0
- package/styled-components/es/examples/plasma_web/components/Notification/Notification.stories.tsx +4 -0
- package/types/components/Notification/Notification.types.d.ts +14 -10
- package/types/components/Notification/Notification.types.d.ts.map +1 -1
- package/types/components/Notification/NotificationsStore.d.ts +1 -1
- package/types/components/Notification/NotificationsStore.d.ts.map +1 -1
- /package/emotion/cjs/components/Combobox/ComboboxOld/{Combobox.template-doc.mdx → Combobox.doc.mdx} +0 -0
- /package/emotion/es/components/Combobox/ComboboxOld/{Combobox.template-doc.mdx → Combobox.doc.mdx} +0 -0
- /package/styled-components/cjs/components/Combobox/ComboboxOld/{Combobox.template-doc.mdx → Combobox.doc.mdx} +0 -0
- /package/styled-components/es/components/Combobox/ComboboxOld/{Combobox.template-doc.mdx → Combobox.doc.mdx} +0 -0
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
4
4
|
import type { StoryObj, Meta } from '@storybook/react';
|
5
5
|
import { getConfigVariations } from '@salutejs/plasma-sb-utils';
|
6
|
+
import { action } from '@storybook/addon-actions';
|
6
7
|
|
7
8
|
import { Button } from '../Button/Button';
|
8
9
|
import { Modal } from '../Modal/Modal';
|
@@ -40,6 +41,9 @@ const getNotificationProps = (i: number) => ({
|
|
40
41
|
children: texts[i % 3],
|
41
42
|
size: size[i % 2],
|
42
43
|
iconPlacement: iconPlacement[i % 2] as NotificationIconPlacement,
|
44
|
+
onTimeoutClose: () => {
|
45
|
+
action('onTimeoutClose')('Callback, вызываемый при автоматическом закрытии по timeout.');
|
46
|
+
},
|
43
47
|
});
|
44
48
|
|
45
49
|
const meta: Meta<NotificationProps> = {
|
@@ -3,6 +3,7 @@ import styled from '@emotion/styled';
|
|
3
3
|
import type { ComponentProps } from 'react';
|
4
4
|
import type { StoryObj, Meta } from '@storybook/react';
|
5
5
|
import { getConfigVariations } from '@salutejs/plasma-sb-utils';
|
6
|
+
import { action } from '@storybook/addon-actions';
|
6
7
|
|
7
8
|
import { Button } from '../Button/Button';
|
8
9
|
import { Modal } from '../Modal/Modal';
|
@@ -40,6 +41,9 @@ const getNotificationProps = (i: number) => ({
|
|
40
41
|
children: texts[i % 3],
|
41
42
|
size: size[i % 2],
|
42
43
|
iconPlacement: iconPlacement[i % 2] as NotificationIconPlacement,
|
44
|
+
onTimeoutClose: () => {
|
45
|
+
action('onTimeoutClose')('Callback, вызываемый при автоматическом закрытии по timeout.');
|
46
|
+
},
|
43
47
|
});
|
44
48
|
|
45
49
|
const meta: Meta<NotificationProps> = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Notification.types.js","sources":["../../../src/components/Notification/Notification.types.ts"],"sourcesContent":["import type { AsProps } from '@salutejs/plasma-core';\nimport { HTMLAttributes, ReactNode } from 'react';\n\nimport { ComponentConfig, PropsType, Variants } from '../../engines/types';\nimport type { PopupPlacement } from '../Popup';\n\nexport const layouts = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n};\n\nexport type NotificationLayout = keyof typeof layouts;\n\nexport const placements = {\n top: 'top',\n left: 'left',\n};\n\nexport type NotificationIconPlacement = keyof typeof placements;\nexport type NotificationPlacement = PopupPlacement;\n\nexport type LayoutType = {\n layout?: NotificationLayout;\n};\n\nexport type IconPlacementType = {\n iconPlacement?: NotificationIconPlacement;\n};\n\nexport type CloseIconType = {\n showCloseIcon?: boolean;\n};\n\nexport interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Заголовок.\n */\n title?: ReactNode;\n /**\n * Контент под заголовком.\n */\n children?: ReactNode;\n /**\n * Кнопки снизу/справа для необходимых действий.\n */\n actions?: ReactNode;\n /**\n * Схема расположение блоков Notification.\n */\n layout?: NotificationLayout;\n /**\n * Иконка слева.\n */\n icon?: ReactNode;\n /**\n * Расположение иконки слева внутри Textbox.\n */\n iconPlacement?: NotificationIconPlacement;\n /**\n * Показывать ли иконку закрытия справа.\n * @default\n * true\n */\n showCloseIcon?: boolean;\n /**\n *
|
1
|
+
{"version":3,"file":"Notification.types.js","sources":["../../../src/components/Notification/Notification.types.ts"],"sourcesContent":["import type { AsProps } from '@salutejs/plasma-core';\nimport { HTMLAttributes, ReactNode } from 'react';\n\nimport { ComponentConfig, PropsType, Variants } from '../../engines/types';\nimport type { PopupPlacement } from '../Popup';\n\nexport const layouts = {\n horizontal: 'horizontal',\n vertical: 'vertical',\n};\n\nexport type NotificationLayout = keyof typeof layouts;\n\nexport const placements = {\n top: 'top',\n left: 'left',\n};\n\nexport type NotificationIconPlacement = keyof typeof placements;\nexport type NotificationPlacement = PopupPlacement;\n\nexport type LayoutType = {\n layout?: NotificationLayout;\n};\n\nexport type IconPlacementType = {\n iconPlacement?: NotificationIconPlacement;\n};\n\nexport type CloseIconType = {\n showCloseIcon?: boolean;\n};\n\nexport interface NotificationProps extends AsProps, Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Заголовок.\n */\n title?: ReactNode;\n /**\n * Контент под заголовком.\n */\n children?: ReactNode;\n /**\n * Кнопки снизу/справа для необходимых действий.\n */\n actions?: ReactNode;\n /**\n * Схема расположение блоков Notification.\n */\n layout?: NotificationLayout;\n /**\n * Иконка слева.\n */\n icon?: ReactNode;\n /**\n * Расположение иконки слева внутри Textbox.\n */\n iconPlacement?: NotificationIconPlacement;\n /**\n * Показывать ли иконку закрытия справа.\n * @default\n * true\n */\n showCloseIcon?: boolean;\n /**\n * Вид Notification.\n */\n view?: string;\n /**\n * Размер Notification (необходимо связать с размером используемых Button).\n */\n size?: string;\n /**\n * Вид закрывающей иконки в Notification.\n */\n closeIconType?: 'default' | 'thin';\n /**\n * @description Только для применения в рамках SSR.\n */\n UNSAFE_SSR_ENABLED?: boolean;\n /**\n * Цвет текста (по умолчанию берётся цвет из view)\n */\n textColor?: string;\n /**\n * Цвет заголовка (по умолчанию берётся цвет из view)\n */\n titleColor?: string;\n /**\n * Цвет заголовка (по умолчанию берётся цвет из view)\n */\n backgroundColor?: string;\n /**\n * Callback при нажатии на кнопку закрытия.\n */\n onCloseButtonClick?: () => void;\n /**\n * Callback, вызываемый при автоматическом закрытии по timeout.\n */\n onTimeoutClose?: () => void;\n /**\n * @deprecated\n * Не влияет на отображение компонента.\n * Статус компонента Notification.\n */\n status?: string;\n}\n\nexport interface NotificationPortalProps extends Omit<HTMLAttributes<HTMLDivElement>, 'title'> {\n /**\n * Конфигурация компонента Notification.\n */\n config: ComponentConfig<string, Variants, PropsType<Variants>, NotificationProps & HTMLAttributes<HTMLDivElement>>;\n /**\n * В каком контейнере позиционируется(по умолчанию document), можно также указать id элемента или ref для него.\n */\n frame?: string;\n /**\n * Расположение компонента Notification во frame\n * @default bottom-right\n */\n placement?: NotificationPlacement;\n /**\n * @description Только для применения в рамках SSR.\n */\n UNSAFE_SSR_ENABLED?: boolean;\n}\n"],"names":["layouts","horizontal","vertical","placements","top","left"],"mappings":"AAMO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,UAAU,EAAE,YAAY;AACxBC,EAAAA,QAAQ,EAAE,UAAA;AACd,EAAC;AAIM,IAAMC,UAAU,GAAG;AACtBC,EAAAA,GAAG,EAAE,KAAK;AACVC,EAAAA,IAAI,EAAE,MAAA;AACV;;;;"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { objectWithoutProperties as _objectWithoutProperties, objectSpread2 as _objectSpread2 } from '../../_virtual/_rollupPluginBabelHelpers.js';
|
2
2
|
import { createStoreon } from 'storeon';
|
3
3
|
|
4
|
-
var _excluded = ["id"];
|
4
|
+
var _excluded = ["id", "onTimeoutClose"];
|
5
5
|
/**
|
6
6
|
* Создает хранилищие с ключем `notifications` к массиву с окнами.
|
7
7
|
*/
|
@@ -52,6 +52,7 @@ var closeNotification = function closeNotification(id) {
|
|
52
52
|
*/
|
53
53
|
function addNotification(_ref4) {
|
54
54
|
var externalId = _ref4.id,
|
55
|
+
onTimeoutClose = _ref4.onTimeoutClose,
|
55
56
|
rest = _objectWithoutProperties(_ref4, _excluded);
|
56
57
|
var timeout = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 2000;
|
57
58
|
var id = externalId || "plasma-notification-".concat(Date.now());
|
@@ -62,7 +63,8 @@ function addNotification(_ref4) {
|
|
62
63
|
}));
|
63
64
|
if (timeout !== 0 && timeout !== null) {
|
64
65
|
setTimeout(function () {
|
65
|
-
|
66
|
+
closeNotification(id);
|
67
|
+
onTimeoutClose === null || onTimeoutClose === void 0 || onTimeoutClose();
|
66
68
|
}, timeout);
|
67
69
|
}
|
68
70
|
return id;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"NotificationsStore.js","sources":["../../../src/components/Notification/NotificationsStore.ts"],"sourcesContent":["import { createStoreon, StoreonStore } from 'storeon';\n\nimport { NotificationProps } from './Notification.types';\n\nexport type NotificationItem = {\n id: string;\n isHidden?: boolean;\n};\nexport type NotificationsState = {\n notifications: NotificationItem[];\n};\nexport type NotificationsEvents = {\n add: NotificationItem;\n hide: string;\n remove: string;\n};\n\n/**\n * Создает хранилищие с ключем `notifications` к массиву с окнами.\n */\nexport const NotificationsStore = createStoreon([\n (store: StoreonStore<NotificationsState, NotificationsEvents>) => {\n store.on('@init', () => ({ notifications: [] }));\n\n store.on('add', ({ notifications }, notif) => {\n return { notifications: notifications.concat([notif]) };\n });\n\n store.on('hide', ({ notifications }, id) => {\n return {\n notifications: notifications.map((notif) => (id === notif.id ? { ...notif, isHidden: true } : notif)),\n };\n });\n\n store.on('remove', ({ notifications }, id) => {\n return { notifications: notifications.filter((notif) => id !== notif.id) };\n });\n },\n]);\n\nexport const closeNotification = (id: string, delay = 380) => {\n const { dispatch } = NotificationsStore;\n\n dispatch('hide', id);\n setTimeout(() => dispatch('remove', id), delay);\n};\n\n/**\n * Открыть новое оповещение.\n * @param props Пропсы всплывающего оповещения\n * @return Идентификатор нового оповещения\n */\nexport function addNotification({ id: externalId, ...rest }: NotificationProps
|
1
|
+
{"version":3,"file":"NotificationsStore.js","sources":["../../../src/components/Notification/NotificationsStore.ts"],"sourcesContent":["import { createStoreon, StoreonStore } from 'storeon';\n\nimport { NotificationProps } from './Notification.types';\n\nexport type NotificationItem = {\n id: string;\n isHidden?: boolean;\n};\nexport type NotificationsState = {\n notifications: NotificationItem[];\n};\nexport type NotificationsEvents = {\n add: NotificationItem;\n hide: string;\n remove: string;\n};\n\n/**\n * Создает хранилищие с ключем `notifications` к массиву с окнами.\n */\nexport const NotificationsStore = createStoreon([\n (store: StoreonStore<NotificationsState, NotificationsEvents>) => {\n store.on('@init', () => ({ notifications: [] }));\n\n store.on('add', ({ notifications }, notif) => {\n return { notifications: notifications.concat([notif]) };\n });\n\n store.on('hide', ({ notifications }, id) => {\n return {\n notifications: notifications.map((notif) => (id === notif.id ? { ...notif, isHidden: true } : notif)),\n };\n });\n\n store.on('remove', ({ notifications }, id) => {\n return { notifications: notifications.filter((notif) => id !== notif.id) };\n });\n },\n]);\n\nexport const closeNotification = (id: string, delay = 380) => {\n const { dispatch } = NotificationsStore;\n\n dispatch('hide', id);\n\n setTimeout(() => dispatch('remove', id), delay);\n};\n\n/**\n * Открыть новое оповещение.\n * @param props Пропсы всплывающего оповещения\n * @return Идентификатор нового оповещения\n */\nexport function addNotification(\n { id: externalId, onTimeoutClose, ...rest }: NotificationProps,\n timeout: number | null = 2000,\n) {\n const id = externalId || `plasma-notification-${Date.now()}`;\n const { dispatch } = NotificationsStore;\n\n dispatch('add', {\n ...rest,\n id,\n isHidden: false,\n });\n\n if (timeout !== 0 && timeout !== null) {\n setTimeout(() => {\n closeNotification(id);\n\n onTimeoutClose?.();\n }, timeout);\n }\n\n return id;\n}\n"],"names":["NotificationsStore","createStoreon","store","on","notifications","_ref","notif","concat","_ref2","id","map","_objectSpread","isHidden","_ref3","filter","closeNotification","delay","arguments","length","undefined","dispatch","setTimeout","addNotification","_ref4","externalId","onTimeoutClose","rest","_objectWithoutProperties","_excluded","timeout","Date","now"],"mappings":";;;;AAiBA;AACA;AACA;AACO,IAAMA,kBAAkB,gBAAGC,aAAa,CAAC,CAC5C,UAACC,KAA4D,EAAK;AAC9DA,EAAAA,KAAK,CAACC,EAAE,CAAC,OAAO,EAAE,YAAA;IAAA,OAAO;AAAEC,MAAAA,aAAa,EAAE,EAAA;KAAI,CAAA;AAAA,GAAC,CAAC,CAAA;EAEhDF,KAAK,CAACC,EAAE,CAAC,KAAK,EAAE,UAAAE,IAAA,EAAoBC,KAAK,EAAK;AAAA,IAAA,IAA3BF,a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,CAAA;KACrB,EAAEI,OAAO,CAAC,CAAA;AACf,GAAA;AAEA,EAAA,OAAOpB,EAAE,CAAA;AACb;;;;"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/plasma-new-hope",
|
3
|
-
"version": "0.322.0-canary.
|
3
|
+
"version": "0.322.0-canary.1938.14660334712.0",
|
4
4
|
"description": "Salute Design System blueprint",
|
5
5
|
"main": "cjs/index.js",
|
6
6
|
"module": "es/index.js",
|
@@ -80,8 +80,8 @@
|
|
80
80
|
"@rollup/plugin-babel": "^6.0.4",
|
81
81
|
"@rollup/plugin-commonjs": "^25.0.4",
|
82
82
|
"@rollup/plugin-node-resolve": "^15.1.0",
|
83
|
-
"@salutejs/plasma-sb-utils": "0.197.0-canary.
|
84
|
-
"@salutejs/plasma-themes": "0.33.0-canary.
|
83
|
+
"@salutejs/plasma-sb-utils": "0.197.0-canary.1938.14660334712.0",
|
84
|
+
"@salutejs/plasma-themes": "0.33.0-canary.1938.14660334712.0",
|
85
85
|
"@storybook/addon-docs": "8.6.12",
|
86
86
|
"@storybook/addon-essentials": "8.6.12",
|
87
87
|
"@storybook/manager-api": "8.6.12",
|
@@ -137,5 +137,5 @@
|
|
137
137
|
"sideEffects": [
|
138
138
|
"*.css"
|
139
139
|
],
|
140
|
-
"gitHead": "
|
140
|
+
"gitHead": "1969be27cb99dd466b7309c8d4235c55a7d203d7"
|
141
141
|
}
|
@@ -15,7 +15,7 @@ import TabItem from '@theme/TabItem';
|
|
15
15
|
Компонент выпадающей информации
|
16
16
|
<PropsTable name="AccordionItem" exclude={['value']} />
|
17
17
|
|
18
|
-
Компонент представляет собой заголовок и контент, который раскрывается при нажатии.
|
18
|
+
Компонент представляет собой заголовок и контент, который раскрывается при нажатии.
|
19
19
|
|
20
20
|
## Примеры Accordion
|
21
21
|
|
@@ -35,10 +35,10 @@ import TabItem from '@theme/TabItem';
|
|
35
35
|
</Accordion>
|
36
36
|
</div>
|
37
37
|
);
|
38
|
-
|
38
|
+
}
|
39
39
|
```
|
40
40
|
</TabItem>
|
41
|
-
|
41
|
+
<TabItem value="view" label="View">
|
42
42
|
```tsx live
|
43
43
|
import React from 'react';
|
44
44
|
import { Accordion, AccordionItem } from '@salutejs/{{ package }}';
|
@@ -61,78 +61,106 @@ import TabItem from '@theme/TabItem';
|
|
61
61
|
</Accordion>
|
62
62
|
</div>
|
63
63
|
</div>
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
64
|
+
);
|
65
|
+
}
|
66
|
+
```
|
67
|
+
</TabItem>
|
68
|
+
<TabItem value="size" label="Size">
|
69
|
+
```tsx live
|
70
|
+
import React from 'react';
|
71
|
+
import { Accordion, AccordionItem } from '@salutejs/{{ package }}';
|
72
72
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
</div>
|
83
|
-
<div style=\{{"width": "100%"}}>
|
84
|
-
<Accordion size="s">
|
85
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
86
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
87
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
88
|
-
</Accordion>
|
89
|
-
</div>
|
90
|
-
<div style=\{{"width": "100%"}}>
|
91
|
-
<Accordion size="m">
|
92
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
93
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
94
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
95
|
-
</Accordion>
|
96
|
-
</div>
|
97
|
-
<div style=\{{"width": "100%"}}>
|
98
|
-
<Accordion size="l">
|
99
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
100
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
101
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
102
|
-
</Accordion>
|
103
|
-
</div>
|
73
|
+
export function App() {
|
74
|
+
return (
|
75
|
+
<div style=\{{"width": "100%", "display": "flex", "flex-direction": "column"}}>
|
76
|
+
<div style=\{{"width": "100%"}}>
|
77
|
+
<Accordion size="xs">
|
78
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
79
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
80
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
81
|
+
</Accordion>
|
104
82
|
</div>
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
83
|
+
<div style=\{{"width": "100%"}}>
|
84
|
+
<Accordion size="s">
|
85
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
86
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
87
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
88
|
+
</Accordion>
|
89
|
+
</div>
|
90
|
+
<div style=\{{"width": "100%"}}>
|
91
|
+
<Accordion size="m">
|
92
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
93
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
94
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
95
|
+
</Accordion>
|
96
|
+
</div>
|
97
|
+
<div style=\{{"width": "100%"}}>
|
98
|
+
<Accordion size="l">
|
99
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
100
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
101
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
102
|
+
</Accordion>
|
103
|
+
</div>
|
104
|
+
<div style=\{{"width": "100%"}}>
|
105
|
+
<Accordion size="h2">
|
106
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
107
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
108
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
109
|
+
</Accordion>
|
110
|
+
</div>
|
111
|
+
<div style=\{{"width": "100%"}}>
|
112
|
+
<Accordion size="h3">
|
113
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
114
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
115
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
116
|
+
</Accordion>
|
117
|
+
</div>
|
118
|
+
<div style=\{{"width": "100%"}}>
|
119
|
+
<Accordion size="h4">
|
120
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
121
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
122
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
123
|
+
</Accordion>
|
124
|
+
</div>
|
125
|
+
<div style=\{{"width": "100%"}}>
|
126
|
+
<Accordion size="h5">
|
127
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
128
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
129
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
130
|
+
</Accordion>
|
131
|
+
</div>
|
132
|
+
</div>
|
133
|
+
);
|
134
|
+
}
|
135
|
+
```
|
136
|
+
</TabItem>
|
137
|
+
<TabItem value="stretching" label="Stretching">
|
138
|
+
```tsx live
|
139
|
+
import React from 'react';
|
140
|
+
import { Accordion, AccordionItem } from '@salutejs/{{ package }}';
|
113
141
|
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
</div>
|
124
|
-
<div style=\{{"width": "100%"}}>
|
125
|
-
<Accordion stretching="fixed">
|
126
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
127
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
128
|
-
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
129
|
-
</Accordion>
|
130
|
-
</div>
|
142
|
+
export function App() {
|
143
|
+
return (
|
144
|
+
<div style=\{{"width": "100%", "display": "flex", "flex-direction": "column"}}>
|
145
|
+
<div style=\{{"width": "100%"}}>
|
146
|
+
<Accordion>
|
147
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
148
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
149
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
150
|
+
</Accordion>
|
131
151
|
</div>
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
152
|
+
<div style=\{{"width": "100%"}}>
|
153
|
+
<Accordion stretching="fixed">
|
154
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
155
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
156
|
+
<AccordionItem title="Как оплатить заправку бонусами СберСпасибо?">После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива</AccordionItem>
|
157
|
+
</Accordion>
|
158
|
+
</div>
|
159
|
+
</div>
|
160
|
+
);
|
161
|
+
}
|
162
|
+
```
|
163
|
+
</TabItem>
|
136
164
|
</Tabs>
|
137
165
|
|
138
166
|
### Использование Accordion в Controlled варианте
|