@salutejs/plasma-new-hope 0.88.0-canary.1252.9517095860.0 → 0.88.0-canary.1254.9538803694.0
Sign up to get free protection for your applications and to get access to all the features.
- package/cjs/components/Accordion/Accordion.css +1 -0
- package/cjs/components/Accordion/Accordion.js +81 -0
- package/cjs/components/Accordion/Accordion.js.map +1 -0
- package/cjs/components/Accordion/Accordion.styles.js +9 -0
- package/cjs/components/Accordion/Accordion.styles.js.map +1 -0
- package/cjs/components/Accordion/Accordion.styles_rsiff6.css +1 -0
- package/cjs/components/Accordion/Accordion.tokens.js +45 -0
- package/cjs/components/Accordion/Accordion.tokens.js.map +1 -0
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +97 -0
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js.map +1 -0
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +63 -0
- package/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -0
- package/cjs/components/Accordion/utils/index.js +30 -0
- package/cjs/components/Accordion/utils/index.js.map +1 -0
- package/cjs/components/Accordion/variations/_size/base.js +9 -0
- package/cjs/components/Accordion/variations/_size/base.js.map +1 -0
- package/cjs/components/Accordion/variations/_size/base_x642ct.css +1 -0
- package/cjs/components/Accordion/variations/_view/base.js +9 -0
- package/cjs/components/Accordion/variations/_view/base.js.map +1 -0
- package/cjs/components/Accordion/variations/_view/base_x642ct.css +1 -0
- package/cjs/components/Segment/SegmentProvider/SegmentProvider.js +1 -4
- package/cjs/components/Segment/SegmentProvider/SegmentProvider.js.map +1 -1
- package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +2 -9
- package/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
- package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +24 -0
- package/cjs/components/_Icon/Icon.assets/ChevronDownFill.js.map +1 -0
- package/cjs/components/_Icon/Icon.assets/Minus.js +22 -0
- package/cjs/components/_Icon/Icon.assets/Minus.js.map +1 -0
- package/cjs/components/_Icon/Icons/IconChevronDownFill.js +23 -0
- package/cjs/components/_Icon/Icons/IconChevronDownFill.js.map +1 -0
- package/cjs/components/_Icon/Icons/IconMinus.js +23 -0
- package/cjs/components/_Icon/Icons/IconMinus.js.map +1 -0
- package/cjs/index.css +2 -0
- package/cjs/index.js +8 -0
- package/cjs/index.js.map +1 -1
- package/es/components/Accordion/Accordion.css +1 -0
- package/es/components/Accordion/Accordion.js +76 -0
- package/es/components/Accordion/Accordion.js.map +1 -0
- package/es/components/Accordion/Accordion.styles.js +5 -0
- package/es/components/Accordion/Accordion.styles.js.map +1 -0
- package/es/components/Accordion/Accordion.styles_rsiff6.css +1 -0
- package/es/components/Accordion/Accordion.tokens.js +40 -0
- package/es/components/Accordion/Accordion.tokens.js.map +1 -0
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.js +93 -0
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.js.map +1 -0
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +49 -0
- package/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js.map +1 -0
- package/es/components/Accordion/utils/index.js +25 -0
- package/es/components/Accordion/utils/index.js.map +1 -0
- package/es/components/Accordion/variations/_size/base.js +5 -0
- package/es/components/Accordion/variations/_size/base.js.map +1 -0
- package/es/components/Accordion/variations/_size/base_x642ct.css +1 -0
- package/es/components/Accordion/variations/_view/base.js +5 -0
- package/es/components/Accordion/variations/_view/base.js.map +1 -0
- package/es/components/Accordion/variations/_view/base_x642ct.css +1 -0
- package/es/components/Segment/SegmentProvider/SegmentProvider.js +1 -4
- package/es/components/Segment/SegmentProvider/SegmentProvider.js.map +1 -1
- package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +2 -9
- package/es/components/Segment/ui/SegmentGroup/SegmentGroup.js.map +1 -1
- package/es/components/_Icon/Icon.assets/ChevronDownFill.js +20 -0
- package/es/components/_Icon/Icon.assets/ChevronDownFill.js.map +1 -0
- package/es/components/_Icon/Icon.assets/Minus.js +18 -0
- package/es/components/_Icon/Icon.assets/Minus.js.map +1 -0
- package/es/components/_Icon/Icons/IconChevronDownFill.js +19 -0
- package/es/components/_Icon/Icons/IconChevronDownFill.js.map +1 -0
- package/es/components/_Icon/Icons/IconMinus.js +19 -0
- package/es/components/_Icon/Icons/IconMinus.js.map +1 -0
- package/es/index.css +2 -0
- package/es/index.js +3 -0
- package/es/index.js.map +1 -1
- package/package.json +2 -2
- package/styled-components/cjs/components/Accordion/Accordion.js +90 -0
- package/styled-components/cjs/components/Accordion/Accordion.styles.js +9 -0
- package/styled-components/cjs/components/Accordion/Accordion.tokens.js +43 -0
- package/styled-components/cjs/components/Accordion/Accordion.types.js +5 -0
- package/styled-components/cjs/components/Accordion/index.js +38 -0
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.js +103 -0
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +49 -0
- package/styled-components/cjs/components/Accordion/ui/AccordionItem/AccordionItem.types.js +5 -0
- package/styled-components/cjs/components/Accordion/utils/index.js +27 -0
- package/styled-components/cjs/components/Accordion/variations/_size/base.js +8 -0
- package/styled-components/cjs/components/Accordion/variations/_size/tokens.json +6 -0
- package/styled-components/cjs/components/Accordion/variations/_stretching/base.js +8 -0
- package/styled-components/cjs/components/Accordion/variations/_stretching/tokens.json +1 -0
- package/styled-components/cjs/components/Accordion/variations/_view/base.js +8 -0
- package/styled-components/cjs/components/Accordion/variations/_view/tokens.json +8 -0
- package/styled-components/cjs/components/Segment/Segment.template-doc.mdx +1 -6
- package/styled-components/cjs/components/Segment/SegmentProvider/SegmentProvider.js +1 -4
- package/styled-components/cjs/components/Segment/ui/SegmentGroup/SegmentGroup.js +2 -9
- package/styled-components/cjs/components/_Icon/Icon.assets/ChevronDownFill.js +23 -0
- package/styled-components/cjs/components/_Icon/Icon.assets/Minus.js +21 -0
- package/styled-components/cjs/components/_Icon/Icons/IconChevronDownFill.js +22 -0
- package/styled-components/cjs/components/_Icon/Icons/IconMinus.js +22 -0
- package/styled-components/cjs/components/_Icon/index.js +15 -1
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.config.js +26 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.js +17 -0
- package/styled-components/cjs/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +66 -0
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.config.js +30 -0
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.js +17 -0
- package/styled-components/cjs/examples/plasma_web/components/Accordion/Accordion.stories.tsx +65 -0
- package/styled-components/cjs/index.js +11 -0
- package/styled-components/es/components/Accordion/Accordion.js +81 -0
- package/styled-components/es/components/Accordion/Accordion.styles.js +3 -0
- package/styled-components/es/components/Accordion/Accordion.tokens.js +37 -0
- package/styled-components/es/components/Accordion/Accordion.types.js +1 -0
- package/styled-components/es/components/Accordion/index.js +3 -0
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.js +94 -0
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.styles.js +42 -0
- package/styled-components/es/components/Accordion/ui/AccordionItem/AccordionItem.types.js +1 -0
- package/styled-components/es/components/Accordion/utils/index.js +21 -0
- package/styled-components/es/components/Accordion/variations/_size/base.js +2 -0
- package/styled-components/es/components/Accordion/variations/_size/tokens.json +6 -0
- package/styled-components/es/components/Accordion/variations/_stretching/base.js +2 -0
- package/styled-components/es/components/Accordion/variations/_stretching/tokens.json +1 -0
- package/styled-components/es/components/Accordion/variations/_view/base.js +2 -0
- package/styled-components/es/components/Accordion/variations/_view/tokens.json +8 -0
- package/styled-components/es/components/Segment/Segment.template-doc.mdx +1 -6
- package/styled-components/es/components/Segment/SegmentProvider/SegmentProvider.js +1 -4
- package/styled-components/es/components/Segment/ui/SegmentGroup/SegmentGroup.js +2 -9
- package/styled-components/es/components/_Icon/Icon.assets/ChevronDownFill.js +16 -0
- package/styled-components/es/components/_Icon/Icon.assets/Minus.js +14 -0
- package/styled-components/es/components/_Icon/Icons/IconChevronDownFill.js +15 -0
- package/styled-components/es/components/_Icon/Icons/IconMinus.js +15 -0
- package/styled-components/es/components/_Icon/index.js +3 -1
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.config.js +20 -0
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.js +6 -0
- package/styled-components/es/examples/plasma_b2c/components/Accordion/Accordion.stories.tsx +66 -0
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.config.js +24 -0
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.js +6 -0
- package/styled-components/es/examples/plasma_web/components/Accordion/Accordion.stories.tsx +65 -0
- package/styled-components/es/index.js +2 -1
- package/types/components/Accordion/Accordion.d.ts +43 -0
- package/types/components/Accordion/Accordion.d.ts.map +1 -0
- package/types/components/Accordion/Accordion.styles.d.ts +2 -0
- package/types/components/Accordion/Accordion.styles.d.ts.map +1 -0
- package/types/components/Accordion/Accordion.tokens.d.ts +38 -0
- package/types/components/Accordion/Accordion.tokens.d.ts.map +1 -0
- package/types/components/Accordion/Accordion.types.d.ts +36 -0
- package/types/components/Accordion/Accordion.types.d.ts.map +1 -0
- package/types/components/Accordion/index.d.ts +5 -0
- package/types/components/Accordion/index.d.ts.map +1 -0
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts +4 -0
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.d.ts.map +1 -0
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts +13 -0
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.styles.d.ts.map +1 -0
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts +51 -0
- package/types/components/Accordion/ui/AccordionItem/AccordionItem.types.d.ts.map +1 -0
- package/types/components/Accordion/utils/index.d.ts +17 -0
- package/types/components/Accordion/utils/index.d.ts.map +1 -0
- package/types/components/Accordion/variations/_size/base.d.ts +2 -0
- package/types/components/Accordion/variations/_size/base.d.ts.map +1 -0
- package/types/components/Accordion/variations/_stretching/base.d.ts +2 -0
- package/types/components/Accordion/variations/_stretching/base.d.ts.map +1 -0
- package/types/components/Accordion/variations/_view/base.d.ts +2 -0
- package/types/components/Accordion/variations/_view/base.d.ts.map +1 -0
- package/types/components/Segment/SegmentProvider/SegmentProvider.d.ts.map +1 -1
- package/types/components/Segment/SegmentProvider/SegmentProvider.types.d.ts +3 -4
- package/types/components/Segment/SegmentProvider/SegmentProvider.types.d.ts.map +1 -1
- package/types/components/Segment/ui/SegmentGroup/SegmentGroup.d.ts +0 -2
- package/types/components/Segment/ui/SegmentGroup/SegmentGroup.d.ts.map +1 -1
- package/types/components/Segment/ui/SegmentGroup/SegmentGroup.types.d.ts +0 -5
- package/types/components/Segment/ui/SegmentGroup/SegmentGroup.types.d.ts.map +1 -1
- package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/ChevronDownFill.d.ts.map +1 -0
- package/types/components/_Icon/Icon.assets/Minus.d.ts +4 -0
- package/types/components/_Icon/Icon.assets/Minus.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconChevronDownFill.d.ts +4 -0
- package/types/components/_Icon/Icons/IconChevronDownFill.d.ts.map +1 -0
- package/types/components/_Icon/Icons/IconMinus.d.ts +4 -0
- package/types/components/_Icon/Icons/IconMinus.d.ts.map +1 -0
- package/types/components/_Icon/index.d.ts +2 -0
- package/types/components/_Icon/index.d.ts.map +1 -1
- package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts +19 -0
- package/types/examples/plasma_b2c/components/Accordion/Accordion.config.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts +26 -0
- package/types/examples/plasma_b2c/components/Accordion/Accordion.d.ts.map +1 -0
- package/types/examples/plasma_b2c/components/Segment/Segment.d.ts +0 -1
- package/types/examples/plasma_b2c/components/Segment/Segment.d.ts.map +1 -1
- package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts +23 -0
- package/types/examples/plasma_web/components/Accordion/Accordion.config.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Accordion/Accordion.d.ts +30 -0
- package/types/examples/plasma_web/components/Accordion/Accordion.d.ts.map +1 -0
- package/types/examples/plasma_web/components/Segment/Segment.d.ts +0 -1
- package/types/examples/plasma_web/components/Segment/Segment.d.ts.map +1 -1
- package/types/examples/sds_engineer/components/Segment/Segment.d.ts +0 -1
- package/types/examples/sds_engineer/components/Segment/Segment.d.ts.map +1 -1
- package/types/index.d.ts +1 -0
- package/types/index.d.ts.map +1 -1
- /package/cjs/components/{_Icon/Icons/IconClose.css → Accordion/ui/AccordionItem/AccordionItem.css} +0 -0
- /package/es/components/{_Icon/Icons/IconClose.css → Accordion/ui/AccordionItem/AccordionItem.css} +0 -0
@@ -0,0 +1,66 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
3
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
+
import { disableProps } from '@salutejs/plasma-sb-utils';
|
5
|
+
|
6
|
+
import { mergeConfig } from '../../../../engines';
|
7
|
+
import { WithTheme, argTypesFromConfig } from '../../../_helpers';
|
8
|
+
import { accordionConfig } from '../../../../components/Accordion';
|
9
|
+
|
10
|
+
import { config } from './Accordion.config';
|
11
|
+
import { Accordion, AccordionItem } from './Accordion';
|
12
|
+
|
13
|
+
const meta: Meta<typeof Accordion> = {
|
14
|
+
title: 'plasma_b2c/Accordion',
|
15
|
+
decorators: [WithTheme],
|
16
|
+
component: Accordion,
|
17
|
+
args: {
|
18
|
+
singleActive: false,
|
19
|
+
view: 'default',
|
20
|
+
size: 'm',
|
21
|
+
stretching: 'filled',
|
22
|
+
type: 'arrow',
|
23
|
+
disabled: false,
|
24
|
+
title: 'Как оплатить заправку бонусами СберСпасибо?',
|
25
|
+
body:
|
26
|
+
'После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива',
|
27
|
+
},
|
28
|
+
argTypes: {
|
29
|
+
...argTypesFromConfig(mergeConfig(accordionConfig, config)),
|
30
|
+
...disableProps(['text']),
|
31
|
+
stretching: {
|
32
|
+
options: ['filled', 'fixed'],
|
33
|
+
control: {
|
34
|
+
type: 'select',
|
35
|
+
},
|
36
|
+
},
|
37
|
+
type: {
|
38
|
+
options: ['arrow', 'sign', 'clear'],
|
39
|
+
control: {
|
40
|
+
type: 'select',
|
41
|
+
},
|
42
|
+
},
|
43
|
+
},
|
44
|
+
};
|
45
|
+
|
46
|
+
export default meta;
|
47
|
+
|
48
|
+
export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
|
49
|
+
render: (props: ComponentProps<typeof Accordion>) => {
|
50
|
+
const args = { ...props, text: undefined };
|
51
|
+
|
52
|
+
return (
|
53
|
+
<Accordion {...args}>
|
54
|
+
<AccordionItem type={args.type} pin={args.pin} title={args.title}>
|
55
|
+
{args.body}
|
56
|
+
</AccordionItem>
|
57
|
+
<AccordionItem type={args.type} pin={args.pin} title={args.title}>
|
58
|
+
{args.body}
|
59
|
+
</AccordionItem>
|
60
|
+
<AccordionItem type={args.type} pin={args.pin} title={args.title}>
|
61
|
+
{args.body}
|
62
|
+
</AccordionItem>
|
63
|
+
</Accordion>
|
64
|
+
);
|
65
|
+
},
|
66
|
+
};
|
@@ -0,0 +1,24 @@
|
|
1
|
+
import { css } from 'styled-components';
|
2
|
+
import { accordionTokens } from '../../../../components/Accordion';
|
3
|
+
export var config = {
|
4
|
+
defaults: {
|
5
|
+
view: 'default',
|
6
|
+
size: 'm'
|
7
|
+
},
|
8
|
+
variations: {
|
9
|
+
view: {
|
10
|
+
"default": /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":var(", ") var(", ");", ":var(--surface-solid-card);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":var(--surface-clear);", ":0;"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemPadding, accordionTokens.accordionItemPaddingVertical, accordionTokens.accordionItemPaddingHorizontal, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionBackground, accordionTokens.accordionItemBorderBottom),
|
11
|
+
clear: /*#__PURE__*/css(["", ":0.125rem;", ":20rem;", ":var(", ") 0rem;", ":var(--surface-clear);", ":var(--text-primary);", ":var(--text-primary);", ":var(--surface-accent);", ":0rem !important;", ":var(--surface-clear);", ":0.125rem solid var(--surface-solid-tertiary);"], accordionTokens.accordionGap, accordionTokens.accordionWidth, accordionTokens.accordionItemPadding, accordionTokens.accordionItemPaddingVertical, accordionTokens.accordionItemBackground, accordionTokens.accordionItemTitleColor, accordionTokens.accordionItemTextColor, accordionTokens.accordionItemFocus, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionBackground, accordionTokens.accordionItemBorderBottom)
|
12
|
+
},
|
13
|
+
size: {
|
14
|
+
l: /*#__PURE__*/css(["", ":1.0625rem;", ":1.25rem;", ":0.5rem;", ":0.875rem;", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-bold-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);", ":var(--plasma-typo-body-l-font-family);", ":var(--plasma-typo-body-l-font-size);", ":var(--plasma-typo-body-l-font-style);", ":var(--plasma-typo-body-l-font-weight);", ":var(--plasma-typo-body-l-letter-spacing);", ":var(--plasma-typo-body-l-line-height);"], accordionTokens.accordionItemPaddingVertical, accordionTokens.accordionItemPaddingHorizontal, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
|
15
|
+
m: /*#__PURE__*/css(["", ":0.875rem;", ":1.125rem;", ":0.375rem;", ":0.75rem;", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-bold-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);", ":var(--plasma-typo-body-m-font-family);", ":var(--plasma-typo-body-m-font-size);", ":var(--plasma-typo-body-m-font-style);", ":var(--plasma-typo-body-m-font-weight);", ":var(--plasma-typo-body-m-letter-spacing);", ":var(--plasma-typo-body-m-line-height);"], accordionTokens.accordionItemPaddingVertical, accordionTokens.accordionItemPaddingHorizontal, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
|
16
|
+
s: /*#__PURE__*/css(["", ":0.6875rem;", ":0.875rem;", ":0.375rem;", ":0.625rem;", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-bold-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);", ":var(--plasma-typo-body-s-font-family);", ":var(--plasma-typo-body-s-font-size);", ":var(--plasma-typo-body-s-font-style);", ":var(--plasma-typo-body-s-font-weight);", ":var(--plasma-typo-body-s-letter-spacing);", ":var(--plasma-typo-body-s-line-height);"], accordionTokens.accordionItemPaddingVertical, accordionTokens.accordionItemPaddingHorizontal, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight),
|
17
|
+
xs: /*#__PURE__*/css(["", ":0.5rem;", ":0.75rem;", ":0.25rem;", ":0.5rem;", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-bold-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);", ":var(--plasma-typo-body-xs-font-family);", ":var(--plasma-typo-body-xs-font-size);", ":var(--plasma-typo-body-xs-font-style);", ":var(--plasma-typo-body-xs-font-weight);", ":var(--plasma-typo-body-xs-letter-spacing);", ":var(--plasma-typo-body-xs-line-height);"], accordionTokens.accordionItemPaddingVertical, accordionTokens.accordionItemPaddingHorizontal, accordionTokens.accordionItemGap, accordionTokens.accordionItemBorderRadius, accordionTokens.accordionItemTitleFontFamily, accordionTokens.accordionItemTitleFontSize, accordionTokens.accordionItemTitleFontStyle, accordionTokens.accordionItemTitleFontWeight, accordionTokens.accordionItemTitleLetterSpacing, accordionTokens.accordionItemTitleLineHeight, accordionTokens.accordionItemTextFontFamily, accordionTokens.accordionItemTextFontSize, accordionTokens.accordionItemTextFontStyle, accordionTokens.accordionItemTextFontWeight, accordionTokens.accordionItemTextLetterSpacing, accordionTokens.accordionItemTextLineHeight)
|
18
|
+
},
|
19
|
+
stretching: {
|
20
|
+
filled: /*#__PURE__*/css([""]),
|
21
|
+
fixed: /*#__PURE__*/css([""])
|
22
|
+
}
|
23
|
+
}
|
24
|
+
};
|
@@ -0,0 +1,6 @@
|
|
1
|
+
import { accordionConfig, AccordionItem } from '../../../../components/Accordion';
|
2
|
+
import { component, mergeConfig } from '../../../../engines';
|
3
|
+
import { config } from './Accordion.config';
|
4
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(accordionConfig, config);
|
5
|
+
export var Accordion = /*#__PURE__*/component(mergedConfig);
|
6
|
+
export { AccordionItem };
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
3
|
+
import type { StoryObj, Meta } from '@storybook/react';
|
4
|
+
import { disableProps } from '@salutejs/plasma-sb-utils';
|
5
|
+
|
6
|
+
import { mergeConfig } from '../../../../engines';
|
7
|
+
import { WithTheme, argTypesFromConfig } from '../../../_helpers';
|
8
|
+
import { accordionConfig } from '../../../../components/Accordion';
|
9
|
+
|
10
|
+
import { config } from './Accordion.config';
|
11
|
+
import { Accordion, AccordionItem } from './Accordion';
|
12
|
+
|
13
|
+
const meta: Meta<typeof Accordion> = {
|
14
|
+
title: 'plasma_web/Accordion',
|
15
|
+
decorators: [WithTheme],
|
16
|
+
component: Accordion,
|
17
|
+
args: {
|
18
|
+
singleActive: false,
|
19
|
+
view: 'default',
|
20
|
+
size: 'm',
|
21
|
+
stretching: 'filled',
|
22
|
+
type: 'arrow',
|
23
|
+
title: 'Как оплатить заправку бонусами СберСпасибо?',
|
24
|
+
body:
|
25
|
+
'После указания деталей заправки нажмите кнопку «К оплате». Откроется окно оплаты, где вы сможете списать бонусы и оплатить ими до 99% стоимости топлива',
|
26
|
+
},
|
27
|
+
argTypes: {
|
28
|
+
...argTypesFromConfig(mergeConfig(accordionConfig, config)),
|
29
|
+
...disableProps(['text']),
|
30
|
+
stretching: {
|
31
|
+
options: ['filled', 'fixed'],
|
32
|
+
control: {
|
33
|
+
type: 'select',
|
34
|
+
},
|
35
|
+
},
|
36
|
+
type: {
|
37
|
+
options: ['arrow', 'sign', 'clear'],
|
38
|
+
control: {
|
39
|
+
type: 'select',
|
40
|
+
},
|
41
|
+
},
|
42
|
+
},
|
43
|
+
};
|
44
|
+
|
45
|
+
export default meta;
|
46
|
+
|
47
|
+
export const Default: StoryObj<ComponentProps<typeof Accordion>> = {
|
48
|
+
render: (props: ComponentProps<typeof Accordion>) => {
|
49
|
+
const args = { ...props, text: undefined };
|
50
|
+
|
51
|
+
return (
|
52
|
+
<Accordion {...args}>
|
53
|
+
<AccordionItem type={args.type} pin={args.pin} title={args.title}>
|
54
|
+
{args.body}
|
55
|
+
</AccordionItem>
|
56
|
+
<AccordionItem type={args.type} pin={args.pin} title={args.title}>
|
57
|
+
{args.body}
|
58
|
+
</AccordionItem>
|
59
|
+
<AccordionItem type={args.type} pin={args.pin} title={args.title}>
|
60
|
+
{args.body}
|
61
|
+
</AccordionItem>
|
62
|
+
</Accordion>
|
63
|
+
);
|
64
|
+
},
|
65
|
+
};
|
@@ -47,4 +47,5 @@ export * from './components/Select';
|
|
47
47
|
export * from './components/Divider';
|
48
48
|
export * from './components/Toolbar';
|
49
49
|
export * from './components/Slider';
|
50
|
-
export * from './components/Range';
|
50
|
+
export * from './components/Range';
|
51
|
+
export * from './components/Accordion';
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import { RootPropsOmitOnChange } from '../../engines';
|
3
|
+
import type { AccordionProps } from './Accordion.types';
|
4
|
+
export declare const accordionRoot: (Root: RootPropsOmitOnChange<HTMLDivElement, AccordionProps>) => React.ForwardRefExoticComponent<{
|
5
|
+
view: string;
|
6
|
+
size?: string | undefined;
|
7
|
+
singleActive?: boolean | undefined;
|
8
|
+
defaultActiveEventKey?: number[] | undefined;
|
9
|
+
disabled?: boolean | undefined;
|
10
|
+
stretching?: "fixed" | "filled" | undefined;
|
11
|
+
onChange?: ((index?: number | undefined, value?: boolean | undefined) => void) | undefined;
|
12
|
+
children?: React.ReactNode;
|
13
|
+
className?: string | undefined;
|
14
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
15
|
+
export declare const accordionConfig: {
|
16
|
+
name: string;
|
17
|
+
tag: string;
|
18
|
+
layout: (Root: RootPropsOmitOnChange<HTMLDivElement, AccordionProps>) => React.ForwardRefExoticComponent<{
|
19
|
+
view: string;
|
20
|
+
size?: string | undefined;
|
21
|
+
singleActive?: boolean | undefined;
|
22
|
+
defaultActiveEventKey?: number[] | undefined;
|
23
|
+
disabled?: boolean | undefined;
|
24
|
+
stretching?: "fixed" | "filled" | undefined;
|
25
|
+
onChange?: ((index?: number | undefined, value?: boolean | undefined) => void) | undefined;
|
26
|
+
children?: React.ReactNode;
|
27
|
+
className?: string | undefined;
|
28
|
+
} & React.RefAttributes<HTMLDivElement>>;
|
29
|
+
base: import("@linaria/core").LinariaClassName;
|
30
|
+
variations: {
|
31
|
+
view: {
|
32
|
+
css: import("@linaria/core").LinariaClassName;
|
33
|
+
};
|
34
|
+
size: {
|
35
|
+
css: import("@linaria/core").LinariaClassName;
|
36
|
+
};
|
37
|
+
};
|
38
|
+
defaults: {
|
39
|
+
view: string;
|
40
|
+
size: string;
|
41
|
+
};
|
42
|
+
};
|
43
|
+
//# sourceMappingURL=Accordion.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAE9D,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAGtD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAOxD,eAAO,MAAM,aAAa,SAAU,sBAAsB,cAAc,EAAE,cAAc,CAAC;;;;;;;;;;wCAkDpF,CAAC;AAEN,eAAO,MAAM,eAAe;;;mBApDQ,sBAAsB,cAAc,EAAE,cAAc,CAAC;;;;;;;;;;;;;;;;;;;;;;;;CAqExF,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.styles.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,IAAI,0CAchB,CAAC"}
|
@@ -0,0 +1,38 @@
|
|
1
|
+
export declare const classes: {
|
2
|
+
filledStretching: string;
|
3
|
+
fixedStretching: string;
|
4
|
+
accordionRoot: string;
|
5
|
+
accordionItem: string;
|
6
|
+
clearAccordionItem: string;
|
7
|
+
accordionItemShowBody: string;
|
8
|
+
accordionPlusAnimationElement: string;
|
9
|
+
accordionDisabled: string;
|
10
|
+
};
|
11
|
+
export declare const tokens: {
|
12
|
+
accordionGap: string;
|
13
|
+
accordionWidth: string;
|
14
|
+
accordionBackground: string;
|
15
|
+
accordionItemBackground: string;
|
16
|
+
accordionItemBorderRadius: string;
|
17
|
+
accordionItemPadding: string;
|
18
|
+
accordionItemPaddingVertical: string;
|
19
|
+
accordionItemPaddingHorizontal: string;
|
20
|
+
accordionItemGap: string;
|
21
|
+
accordionItemFocus: string;
|
22
|
+
accordionItemBorderBottom: string;
|
23
|
+
accordionItemTitleColor: string;
|
24
|
+
accordionItemTitleFontFamily: string;
|
25
|
+
accordionItemTitleFontSize: string;
|
26
|
+
accordionItemTitleFontStyle: string;
|
27
|
+
accordionItemTitleFontWeight: string;
|
28
|
+
accordionItemTitleLetterSpacing: string;
|
29
|
+
accordionItemTitleLineHeight: string;
|
30
|
+
accordionItemTextColor: string;
|
31
|
+
accordionItemTextFontFamily: string;
|
32
|
+
accordionItemTextFontSize: string;
|
33
|
+
accordionItemTextFontStyle: string;
|
34
|
+
accordionItemTextFontWeight: string;
|
35
|
+
accordionItemTextLetterSpacing: string;
|
36
|
+
accordionItemTextLineHeight: string;
|
37
|
+
};
|
38
|
+
//# sourceMappingURL=Accordion.tokens.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.tokens.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.tokens.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO;;;;;;;;;CASnB,CAAC;AAEF,eAAO,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;CA6BlB,CAAC"}
|
@@ -0,0 +1,36 @@
|
|
1
|
+
import type { ReactNode } from 'react';
|
2
|
+
declare type CustomAccordionProps = {
|
3
|
+
/**
|
4
|
+
* Тип аккордеона
|
5
|
+
*/
|
6
|
+
view: string;
|
7
|
+
/**
|
8
|
+
* Размер
|
9
|
+
*/
|
10
|
+
size?: string;
|
11
|
+
/**
|
12
|
+
* Возможность раскрытия всех элементов или только одногo
|
13
|
+
*/
|
14
|
+
singleActive?: boolean;
|
15
|
+
/**
|
16
|
+
* Индекс элемента, который должен быть изначально раскрыт
|
17
|
+
*/
|
18
|
+
defaultActiveEventKey?: number[];
|
19
|
+
/**
|
20
|
+
* Блокировка всех элементов
|
21
|
+
*/
|
22
|
+
disabled?: boolean;
|
23
|
+
/**
|
24
|
+
* Ширина
|
25
|
+
*/
|
26
|
+
stretching?: 'fixed' | 'filled';
|
27
|
+
/**
|
28
|
+
* Коллбэк при открытии или закрытии элемента аккордеона
|
29
|
+
*/
|
30
|
+
onChange?: (index?: number, value?: boolean) => void;
|
31
|
+
children?: ReactNode;
|
32
|
+
className?: string;
|
33
|
+
};
|
34
|
+
export declare type AccordionProps = CustomAccordionProps;
|
35
|
+
export {};
|
36
|
+
//# sourceMappingURL=Accordion.types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.types.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,aAAK,oBAAoB,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;OAEG;IACH,qBAAqB,CAAC,EAAE,MAAM,EAAE,CAAC;IAEjC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,GAAG,QAAQ,CAAC;IAEhC;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IAErD,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,cAAc,GAAG,oBAAoB,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
export { accordionRoot, accordionConfig } from './Accordion';
|
2
|
+
export type { AccordionProps } from './Accordion.types';
|
3
|
+
export { AccordionItem } from './ui/AccordionItem/AccordionItem';
|
4
|
+
export { tokens as accordionTokens, classes as accordionClasses } from './Accordion.tokens';
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC7D,YAAY,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,oBAAoB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AccordionItem.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,cAAc,EAA+B,MAAM,OAAO,CAAC;AAkB3E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAEhE,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAAC,cAAc,CAAC,GAAG,kBAAkB,CA+FvF,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/// <reference types="react" />
|
2
|
+
export declare const StyledAccordionItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
3
|
+
export declare const StyledAccordionHeader: import("styled-components").StyledComponent<"button", any, {}, never>;
|
4
|
+
export declare const StyledAccordionHeaderLeft: import("styled-components").StyledComponent<"div", any, {}, never>;
|
5
|
+
export declare const StyledAccordionContentRight: import("styled-components").StyledComponent<"div", any, {}, never>;
|
6
|
+
export declare const StyledAccordionContentLeft: import("styled-components").StyledComponent<"div", any, {}, never>;
|
7
|
+
export declare const StyledAccordionTitle: import("styled-components").StyledComponent<"div", any, {}, never>;
|
8
|
+
export declare const StyledAccordionBodyAnimate: import("styled-components").StyledComponent<"div", any, {}, never>;
|
9
|
+
export declare const StyledAccordionBody: import("styled-components").StyledComponent<"div", any, {}, never>;
|
10
|
+
export declare const StyledArrow: import("styled-components").StyledComponent<import("react").FC<import("../../../_Icon/IconRoot").IconProps>, any, {}, never>;
|
11
|
+
export declare const StyledMinus: import("styled-components").StyledComponent<import("react").FC<import("../../../_Icon/IconRoot").IconProps>, any, {}, never>;
|
12
|
+
export declare const StyledPlus: import("styled-components").StyledComponent<"div", any, {}, never>;
|
13
|
+
//# sourceMappingURL=AccordionItem.styles.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AccordionItem.styles.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"names":[],"mappings":";AAMA,eAAO,MAAM,mBAAmB,oEAO/B,CAAC;AAEF,eAAO,MAAM,qBAAqB,uEA2BjC,CAAC;AAEF,eAAO,MAAM,yBAAyB,oEAKrC,CAAC;AAEF,eAAO,MAAM,2BAA2B,oEAQvC,CAAC;AAEF,eAAO,MAAM,0BAA0B,oEAStC,CAAC;AAEF,eAAO,MAAM,oBAAoB,oEAQhC,CAAC;AAEF,eAAO,MAAM,0BAA0B,oEAetC,CAAC;AAEF,eAAO,MAAM,mBAAmB,oEAW/B,CAAC;AAEF,eAAO,MAAM,WAAW,8HAIvB,CAAC;AAEF,eAAO,MAAM,WAAW,8HAmBvB,CAAC;AAEF,eAAO,MAAM,UAAU,oEAOtB,CAAC"}
|
@@ -0,0 +1,51 @@
|
|
1
|
+
import type { ReactNode } from 'react';
|
2
|
+
import type { Pin } from '../../../../utils/roundness';
|
3
|
+
declare type CustomAccordionItemProps = {
|
4
|
+
/**
|
5
|
+
* Значение раскрытия аккордеона
|
6
|
+
*/
|
7
|
+
value?: boolean;
|
8
|
+
/**
|
9
|
+
* Тип анимации раскрытия
|
10
|
+
*/
|
11
|
+
type?: 'clear' | 'arrow' | 'sign';
|
12
|
+
/**
|
13
|
+
* Контент слева
|
14
|
+
*/
|
15
|
+
contentLeft?: ReactNode;
|
16
|
+
/**
|
17
|
+
* Контент справа
|
18
|
+
*/
|
19
|
+
contentRight?: ReactNode;
|
20
|
+
/**
|
21
|
+
* Скругление аккордеона
|
22
|
+
*/
|
23
|
+
pin?: Pin;
|
24
|
+
/**
|
25
|
+
* Заголовок аккордеона
|
26
|
+
*/
|
27
|
+
title: ReactNode;
|
28
|
+
/**
|
29
|
+
* Контент аккордеона
|
30
|
+
*/
|
31
|
+
children: ReactNode;
|
32
|
+
/**
|
33
|
+
* Функция при открытии аккардеона
|
34
|
+
*/
|
35
|
+
onChange: (index: number, value: boolean) => void;
|
36
|
+
/**
|
37
|
+
* Блокировка элемента
|
38
|
+
*/
|
39
|
+
disabled?: boolean;
|
40
|
+
/**
|
41
|
+
* Индекс элемента
|
42
|
+
*/
|
43
|
+
eventKey?: number;
|
44
|
+
/**
|
45
|
+
* Индекс элемента
|
46
|
+
*/
|
47
|
+
index: number;
|
48
|
+
};
|
49
|
+
export declare type AccordionItemProps = CustomAccordionItemProps;
|
50
|
+
export {};
|
51
|
+
//# sourceMappingURL=AccordionItem.types.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AccordionItem.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,6BAA6B,CAAC;AAEvD,aAAK,wBAAwB,GAAG;IAC5B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;OAEG;IACH,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;IAElC;;OAEG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,SAAS,CAAC;IAEzB;;OAEG;IACH,GAAG,CAAC,EAAE,GAAG,CAAC;IAEV;;OAEG;IACH,KAAK,EAAE,SAAS,CAAC;IAEjB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAElD;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IAMnB;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,kBAAkB,GAAG,wBAAwB,CAAC"}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
2
|
+
import { AccordionItemProps } from '../ui/AccordionItem/AccordionItem.types';
|
3
|
+
export declare const updatePropsRecursively: (children?: ReactElement<{
|
4
|
+
value?: boolean | undefined;
|
5
|
+
type?: "clear" | "arrow" | "sign" | undefined;
|
6
|
+
contentLeft?: ReactNode;
|
7
|
+
contentRight?: ReactNode;
|
8
|
+
pin?: "square-square" | "square-clear" | "clear-square" | "clear-clear" | "clear-circle" | "circle-clear" | "circle-circle" | undefined;
|
9
|
+
title: ReactNode;
|
10
|
+
children: ReactNode;
|
11
|
+
onChange: (index: number, value: boolean) => void;
|
12
|
+
disabled?: boolean | undefined;
|
13
|
+
eventKey?: number | undefined;
|
14
|
+
index: number;
|
15
|
+
}, string | import("react").JSXElementConstructor<any>>[] | undefined, activeIndex?: number[] | undefined, disabled?: boolean | undefined, updateValue?: ((index: number, value?: boolean | undefined) => void) | undefined) => ReactNode[];
|
16
|
+
export declare const getChildren: (children: ReactElement<AccordionItemProps>[], activeIndex?: number[] | undefined, disabled?: boolean | undefined, updateValue?: ((index: number, value?: boolean | undefined) => void) | undefined) => ReactNode[];
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Accordion/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,YAAY,EAAE,SAAS,EAAgC,MAAM,OAAO,CAAC;AAExF,OAAO,EAAE,kBAAkB,EAAE,MAAM,yCAAyC,CAAC;AAE7E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;kKAIT,MAAM,kCAAsB,IAAI,kBACvD,SAAS,EAcN,CAAC;AAEP,eAAO,MAAM,WAAW,aACV,aAAa,kBAAkB,CAAC,EAAE,6FAGtB,MAAM,kCAAsB,IAAI,6BAGzD,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/variations/_size/base.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,0CAAQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/variations/_stretching/base.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,0CAAQ,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../../src/components/Accordion/variations/_view/base.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,IAAI,0CAAQ,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SegmentProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Segment/SegmentProvider/SegmentProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAC3F,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAwB,MAAM,yBAAyB,CAAC;AAEnF,eAAO,MAAM,cAAc,+CAA2D,CAAC;AAEvF,eAAO,MAAM,eAAe,0BAM3B,CAAC;AAEF,eAAO,MAAM,UAAU;;CAGtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,iBAAiB,
|
1
|
+
{"version":3,"file":"SegmentProvider.d.ts","sourceRoot":"","sources":["../../../../src/components/Segment/SegmentProvider/SegmentProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAC3F,OAAO,KAAK,EAAE,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAEnD,OAAO,EAAE,kBAAkB,EAAwB,MAAM,yBAAyB,CAAC;AAEnF,eAAO,MAAM,cAAc,+CAA2D,CAAC;AAEvF,eAAO,MAAM,eAAe,0BAM3B,CAAC;AAEF,eAAO,MAAM,UAAU;;CAGtB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,EAAE,CAAC,iBAAiB,CAiCjD,CAAC"}
|
@@ -1,12 +1,11 @@
|
|
1
|
-
import type {
|
1
|
+
import type { SetStateAction } from 'react';
|
2
2
|
export declare type SegmentSelectionMode = 'single' | 'multiple';
|
3
3
|
export declare type SegmentContextType = {
|
4
4
|
disabledGroup: boolean;
|
5
|
-
setDisabledGroup:
|
5
|
+
setDisabledGroup: (value: SetStateAction<boolean>) => void;
|
6
6
|
selectedSegmentItems: string[];
|
7
|
-
setSelectedSegmentItems: Dispatch<SetStateAction<string[]>>;
|
8
7
|
handleSelect: (label: string) => void;
|
9
8
|
selectionMode: SegmentSelectionMode;
|
10
|
-
setSelectionMode:
|
9
|
+
setSelectionMode: (mode: SegmentSelectionMode) => void;
|
11
10
|
};
|
12
11
|
//# sourceMappingURL=SegmentProvider.types.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SegmentProvider.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Segment/SegmentProvider/SegmentProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"SegmentProvider.types.d.ts","sourceRoot":"","sources":["../../../../src/components/Segment/SegmentProvider/SegmentProvider.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,oBAAY,oBAAoB,GAAG,QAAQ,GAAG,UAAU,CAAC;AAEzD,oBAAY,kBAAkB,GAAG;IAC7B,aAAa,EAAE,OAAO,CAAC;IACvB,gBAAgB,EAAE,CAAC,KAAK,EAAE,cAAc,CAAC,OAAO,CAAC,KAAK,IAAI,CAAC;IAC3D,oBAAoB,EAAE,MAAM,EAAE,CAAC;IAC/B,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,EAAE,oBAAoB,CAAC;IACpC,gBAAgB,EAAE,CAAC,IAAI,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC1D,CAAC"}
|
@@ -3,7 +3,6 @@ import type { RootProps } from '../../../../engines/types';
|
|
3
3
|
import type { SegmentGroupProps } from './SegmentGroup.types';
|
4
4
|
export declare const segmentGroupRoot: (Root: RootProps<HTMLDivElement, SegmentGroupProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
5
5
|
selectionMode?: "multiple" | "single" | undefined;
|
6
|
-
defaultSelected?: string[] | undefined;
|
7
6
|
disabled?: boolean | undefined;
|
8
7
|
stretch?: boolean | undefined;
|
9
8
|
pilled?: boolean | undefined;
|
@@ -16,7 +15,6 @@ export declare const segmentGroupConfig: {
|
|
16
15
|
tag: string;
|
17
16
|
layout: (Root: RootProps<HTMLDivElement, SegmentGroupProps>) => React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & {
|
18
17
|
selectionMode?: "multiple" | "single" | undefined;
|
19
|
-
defaultSelected?: string[] | undefined;
|
20
18
|
disabled?: boolean | undefined;
|
21
19
|
stretch?: boolean | undefined;
|
22
20
|
pilled?: boolean | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SegmentGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Segment/ui/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0E,MAAM,OAAO,CAAC;AAI/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAY3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,gBAAgB,SAAU,UAAU,cAAc,EAAE,iBAAiB,CAAC
|
1
|
+
{"version":3,"file":"SegmentGroup.d.ts","sourceRoot":"","sources":["../../../../../src/components/Segment/ui/SegmentGroup/SegmentGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0E,MAAM,OAAO,CAAC;AAI/F,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAC;AAY3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,eAAO,MAAM,gBAAgB,SAAU,UAAU,cAAc,EAAE,iBAAiB,CAAC;;;;;;;;wCAqJ7E,CAAC;AAEP,eAAO,MAAM,kBAAkB;;;mBAvJQ,UAAU,cAAc,EAAE,iBAAiB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwLlF,CAAC"}
|
@@ -4,11 +4,6 @@ declare type CustomSegmentGroupProps = {
|
|
4
4
|
* Сегмент множественного или одиночного выбора
|
5
5
|
*/
|
6
6
|
selectionMode?: 'multiple' | 'single';
|
7
|
-
/**
|
8
|
-
* Выбранные по умолчанию сегменты.
|
9
|
-
* Передается массив value сегментов, выбранных по умолчанию
|
10
|
-
*/
|
11
|
-
defaultSelected?: Array<string>;
|
12
7
|
/**
|
13
8
|
* Группа сегментов неактивна
|
14
9
|
*/
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"SegmentGroup.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Segment/ui/SegmentGroup/SegmentGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,aAAK,uBAAuB,GAAG;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACtC
|
1
|
+
{"version":3,"file":"SegmentGroup.types.d.ts","sourceRoot":"","sources":["../../../../../src/components/Segment/ui/SegmentGroup/SegmentGroup.types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAE5C,aAAK,uBAAuB,GAAG;IAC3B;;OAEG;IACH,aAAa,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACtC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,iBAAiB,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG,uBAAuB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"ChevronDownFill.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icon.assets/ChevronDownFill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAU/C,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Minus.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icon.assets/Minus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,eAAO,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAQrC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconChevronDownFill.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icons/IconChevronDownFill.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,mBAAmB,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEnD,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"IconMinus.d.ts","sourceRoot":"","sources":["../../../../src/components/_Icon/Icons/IconMinus.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAY,SAAS,EAAE,MAAM,aAAa,CAAC;AAElD,eAAO,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CAEzC,CAAC"}
|
@@ -4,7 +4,9 @@ export { IconMic } from './Icons/IconMic';
|
|
4
4
|
export { IconChevronLeft } from './Icons/IconChevronLeft';
|
5
5
|
export { IconChevronDoubleLeft } from './Icons/IconChevronDoubleLeft';
|
6
6
|
export { IconChevronDown } from './Icons/IconChevronDown';
|
7
|
+
export { IconChevronDownFill } from './Icons/IconChevronDownFill';
|
7
8
|
export { IconClose } from './Icons/IconClose';
|
8
9
|
export { IconCross } from './Icons/IconCross';
|
9
10
|
export { IconDone } from './Icons/IconDone';
|
11
|
+
export { IconMinus } from './Icons/IconMinus';
|
10
12
|
//# sourceMappingURL=index.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC"}
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/_Icon/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
|
@@ -0,0 +1,19 @@
|
|
1
|
+
export declare const config: {
|
2
|
+
defaults: {
|
3
|
+
view: string;
|
4
|
+
size: string;
|
5
|
+
};
|
6
|
+
variations: {
|
7
|
+
view: {
|
8
|
+
default: import("@linaria/core").LinariaClassName;
|
9
|
+
clear: import("@linaria/core").LinariaClassName;
|
10
|
+
};
|
11
|
+
size: {
|
12
|
+
l: import("@linaria/core").LinariaClassName;
|
13
|
+
m: import("@linaria/core").LinariaClassName;
|
14
|
+
s: import("@linaria/core").LinariaClassName;
|
15
|
+
xs: import("@linaria/core").LinariaClassName;
|
16
|
+
};
|
17
|
+
};
|
18
|
+
};
|
19
|
+
//# sourceMappingURL=Accordion.config.d.ts.map
|