@salutejs/sdds-cs 0.318.1-canary.2018.15640028321.0 → 0.318.1-canary.2018.15775755664.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/components/Carousel/Carousel.config.d.ts +14 -0
- package/components/Carousel/Carousel.config.js +23 -0
- package/components/Carousel/Carousel.d.ts +9 -0
- package/components/Carousel/Carousel.js +10 -0
- package/components/Carousel/index.d.ts +2 -0
- package/components/Carousel/index.js +19 -0
- package/emotion/cjs/components/Carousel/Carousel.config.js +23 -0
- package/emotion/cjs/components/Carousel/Carousel.js +10 -0
- package/emotion/cjs/components/Carousel/Carousel.stories.tsx +133 -0
- package/emotion/cjs/components/Carousel/index.js +19 -0
- package/emotion/cjs/components/Modal/Modal.stories.tsx +1 -1
- package/emotion/cjs/index.js +11 -0
- package/emotion/es/components/Carousel/Carousel.config.js +17 -0
- package/emotion/es/components/Carousel/Carousel.js +5 -0
- package/emotion/es/components/Carousel/Carousel.stories.tsx +133 -0
- package/emotion/es/components/Carousel/index.js +2 -0
- package/emotion/es/components/Modal/Modal.stories.tsx +1 -1
- package/emotion/es/index.js +1 -0
- package/es/components/Carousel/Carousel.config.js +17 -0
- package/es/components/Carousel/Carousel.js +5 -0
- package/es/components/Carousel/index.js +2 -0
- package/es/index.js +1 -0
- package/index.d.ts +1 -0
- package/index.js +11 -0
- package/package.json +3 -3
@@ -0,0 +1,14 @@
|
|
1
|
+
export declare const config: {
|
2
|
+
defaults: {
|
3
|
+
view: string;
|
4
|
+
size: string;
|
5
|
+
};
|
6
|
+
variations: {
|
7
|
+
view: {
|
8
|
+
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
9
|
+
};
|
10
|
+
size: {
|
11
|
+
s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
12
|
+
};
|
13
|
+
};
|
14
|
+
};
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.config = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
|
8
|
+
var _templateObject, _templateObject2;
|
9
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
10
|
+
var config = exports.config = {
|
11
|
+
defaults: {
|
12
|
+
view: 'default',
|
13
|
+
size: 's'
|
14
|
+
},
|
15
|
+
variations: {
|
16
|
+
view: {
|
17
|
+
"default": /*#__PURE__*/(0, _styledComponents.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-accent);\n ", ": var(--text-primary);\n ", ": var(--text-accent);\n ", ": var(--surface-solid-primary);\n ", ": var(--text-positive);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--text-accent-active);\n ", ": var(--surface-solid-primary-active);\n "])), _styledComponents.carouselNewTokens.paginationDotBackground, _styledComponents.carouselNewTokens.paginationDotActiveBackground, _styledComponents.carouselNewTokens.controlIconButtonColor, _styledComponents.carouselNewTokens.controlIconButtonBackgroundColor, _styledComponents.carouselNewTokens.controlIconButtonColorHover, _styledComponents.carouselNewTokens.controlIconButtonBackgroundColorHover, _styledComponents.carouselNewTokens.controlIconButtonColorActive, _styledComponents.carouselNewTokens.controlIconButtonBackgroundColorActive)
|
18
|
+
},
|
19
|
+
size: {
|
20
|
+
s: /*#__PURE__*/(0, _styledComponents.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n "])), _styledComponents.carouselNewTokens.controlIconButtonRadius)
|
21
|
+
}
|
22
|
+
}
|
23
|
+
};
|
@@ -0,0 +1,9 @@
|
|
1
|
+
declare const Carousel: import("react").FunctionComponent<import("@salutejs/plasma-new-hope/types/engines/types").PropsType<{
|
2
|
+
view: {
|
3
|
+
default: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
4
|
+
};
|
5
|
+
size: {
|
6
|
+
s: import("@salutejs/plasma-new-hope/types/engines/types").PolymorphicClassName;
|
7
|
+
};
|
8
|
+
}> & import("@salutejs/plasma-new-hope/styled-components").CarouselNewProps & import("react").RefAttributes<HTMLDivElement>>;
|
9
|
+
export { Carousel };
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Carousel = void 0;
|
7
|
+
var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
|
8
|
+
var _Carousel = /*#__PURE__*/require("./Carousel.config");
|
9
|
+
var mergedConfig = /*#__PURE__*/(0, _styledComponents.mergeConfig)(_styledComponents.carouselNewConfig, _Carousel.config);
|
10
|
+
var Carousel = exports.Carousel = /*#__PURE__*/(0, _styledComponents.component)(mergedConfig);
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "Carousel", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _Carousel.Carousel;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "CarouselItem", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _styledComponents.CarouselItem;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
var _styledComponents = /*#__PURE__*/require("@salutejs/plasma-new-hope/styled-components");
|
19
|
+
var _Carousel = /*#__PURE__*/require("./Carousel");
|
@@ -0,0 +1,23 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.config = void 0;
|
7
|
+
var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
|
8
|
+
var _templateObject, _templateObject2;
|
9
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
10
|
+
var config = exports.config = {
|
11
|
+
defaults: {
|
12
|
+
view: 'default',
|
13
|
+
size: 's'
|
14
|
+
},
|
15
|
+
variations: {
|
16
|
+
view: {
|
17
|
+
"default": /*#__PURE__*/(0, _emotion.css)(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-accent);\n ", ": var(--text-primary);\n ", ": var(--text-accent);\n ", ": var(--surface-solid-primary);\n ", ": var(--text-positive);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--text-accent-active);\n ", ": var(--surface-solid-primary-active);\n "])), _emotion.carouselNewTokens.paginationDotBackground, _emotion.carouselNewTokens.paginationDotActiveBackground, _emotion.carouselNewTokens.controlIconButtonColor, _emotion.carouselNewTokens.controlIconButtonBackgroundColor, _emotion.carouselNewTokens.controlIconButtonColorHover, _emotion.carouselNewTokens.controlIconButtonBackgroundColorHover, _emotion.carouselNewTokens.controlIconButtonColorActive, _emotion.carouselNewTokens.controlIconButtonBackgroundColorActive)
|
18
|
+
},
|
19
|
+
size: {
|
20
|
+
s: /*#__PURE__*/(0, _emotion.css)(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n "])), _emotion.carouselNewTokens.controlIconButtonRadius)
|
21
|
+
}
|
22
|
+
}
|
23
|
+
};
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.Carousel = void 0;
|
7
|
+
var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
|
8
|
+
var _Carousel = /*#__PURE__*/require("./Carousel.config");
|
9
|
+
var mergedConfig = /*#__PURE__*/(0, _emotion.mergeConfig)(_emotion.carouselNewConfig, _Carousel.config);
|
10
|
+
var Carousel = exports.Carousel = /*#__PURE__*/(0, _emotion.component)(mergedConfig);
|
@@ -0,0 +1,133 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
4
|
+
import styled from 'styled-components';
|
5
|
+
import { getConfigVariations, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
|
6
|
+
|
7
|
+
import { config } from './Carousel.config';
|
8
|
+
import { Carousel } from './Carousel';
|
9
|
+
|
10
|
+
import { CarouselItem } from './index';
|
11
|
+
|
12
|
+
type StoryCarouselProps = ComponentProps<typeof Carousel> & {
|
13
|
+
slides: number;
|
14
|
+
visibleDots: number;
|
15
|
+
paginationDisabled: boolean;
|
16
|
+
paginationCentered: boolean;
|
17
|
+
};
|
18
|
+
|
19
|
+
const { views, sizes } = getConfigVariations(config);
|
20
|
+
|
21
|
+
const meta: Meta<StoryCarouselProps> = {
|
22
|
+
title: 'Navigation/Carousel',
|
23
|
+
component: Carousel,
|
24
|
+
decorators: [InSpacingDecorator],
|
25
|
+
argTypes: {
|
26
|
+
view: {
|
27
|
+
options: views,
|
28
|
+
control: {
|
29
|
+
type: 'select',
|
30
|
+
},
|
31
|
+
},
|
32
|
+
size: {
|
33
|
+
options: sizes,
|
34
|
+
control: {
|
35
|
+
type: 'inline-radio',
|
36
|
+
},
|
37
|
+
},
|
38
|
+
scrollAlign: {
|
39
|
+
options: ['start', 'center', 'end'],
|
40
|
+
control: {
|
41
|
+
type: 'inline-radio',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
slides: {
|
45
|
+
control: 'number',
|
46
|
+
},
|
47
|
+
visibleDots: {
|
48
|
+
control: 'number',
|
49
|
+
},
|
50
|
+
controlArrowsDisabled: {
|
51
|
+
control: 'boolean',
|
52
|
+
},
|
53
|
+
paginationDisabled: {
|
54
|
+
control: 'boolean',
|
55
|
+
},
|
56
|
+
paginationCentered: {
|
57
|
+
control: 'boolean',
|
58
|
+
},
|
59
|
+
gap: {
|
60
|
+
control: 'text',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
args: {
|
64
|
+
view: 'default',
|
65
|
+
size: 's',
|
66
|
+
scrollAlign: 'start',
|
67
|
+
slides: 20,
|
68
|
+
controlArrowsDisabled: false,
|
69
|
+
paginationDisabled: false,
|
70
|
+
paginationCentered: false,
|
71
|
+
gap: '20px',
|
72
|
+
},
|
73
|
+
parameters: {
|
74
|
+
controls: {
|
75
|
+
include: [
|
76
|
+
'scrollAlign',
|
77
|
+
'visibleDots',
|
78
|
+
'slides',
|
79
|
+
'controlArrowsDisabled',
|
80
|
+
'paginationDisabled',
|
81
|
+
'paginationCentered',
|
82
|
+
'gap',
|
83
|
+
],
|
84
|
+
},
|
85
|
+
},
|
86
|
+
};
|
87
|
+
|
88
|
+
export default meta;
|
89
|
+
|
90
|
+
const StyledCard = styled.div`
|
91
|
+
display: flex;
|
92
|
+
align-items: center;
|
93
|
+
justify-content: center;
|
94
|
+
border-radius: 8px;
|
95
|
+
width: 400px;
|
96
|
+
height: 370px;
|
97
|
+
background-color: #add8e6;
|
98
|
+
font-size: 30px;
|
99
|
+
`;
|
100
|
+
|
101
|
+
const StoryDefault = ({ visibleDots, slides, paginationDisabled, paginationCentered, ...rest }: StoryCarouselProps) => {
|
102
|
+
const items = Array(slides)
|
103
|
+
.fill(1)
|
104
|
+
.map((_, i) => ({
|
105
|
+
id: i,
|
106
|
+
title: i,
|
107
|
+
}));
|
108
|
+
|
109
|
+
return (
|
110
|
+
<>
|
111
|
+
<div style={{ width: '600px' }}>
|
112
|
+
<Carousel
|
113
|
+
paginationOptions={{
|
114
|
+
disabled: paginationDisabled,
|
115
|
+
visibleDots,
|
116
|
+
centered: paginationCentered,
|
117
|
+
}}
|
118
|
+
{...rest}
|
119
|
+
>
|
120
|
+
{items.map((item, i) => (
|
121
|
+
<CarouselItem key={i}>
|
122
|
+
<StyledCard>{item.title}</StyledCard>
|
123
|
+
</CarouselItem>
|
124
|
+
))}
|
125
|
+
</Carousel>
|
126
|
+
</div>
|
127
|
+
</>
|
128
|
+
);
|
129
|
+
};
|
130
|
+
|
131
|
+
export const Default: StoryObj<StoryCarouselProps> = {
|
132
|
+
render: (args) => <StoryDefault {...args} />,
|
133
|
+
};
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
Object.defineProperty(exports, "Carousel", {
|
7
|
+
enumerable: true,
|
8
|
+
get: function get() {
|
9
|
+
return _Carousel.Carousel;
|
10
|
+
}
|
11
|
+
});
|
12
|
+
Object.defineProperty(exports, "CarouselItem", {
|
13
|
+
enumerable: true,
|
14
|
+
get: function get() {
|
15
|
+
return _emotion.CarouselItem;
|
16
|
+
}
|
17
|
+
});
|
18
|
+
var _emotion = /*#__PURE__*/require("@salutejs/plasma-new-hope/emotion");
|
19
|
+
var _Carousel = /*#__PURE__*/require("./Carousel");
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
2
2
|
import type { ComponentProps } from 'react';
|
3
|
-
import styled from 'styled-components';
|
3
|
+
import styled, { css } from 'styled-components';
|
4
4
|
import type { Meta, StoryObj } from '@storybook/react';
|
5
5
|
import { InSpacingDecorator, disableProps } from '@salutejs/plasma-sb-utils';
|
6
6
|
|
package/emotion/cjs/index.js
CHANGED
@@ -707,6 +707,17 @@ Object.keys(_ToastNew).forEach(function (key) {
|
|
707
707
|
}
|
708
708
|
});
|
709
709
|
});
|
710
|
+
var _Carousel = /*#__PURE__*/require("./components/Carousel");
|
711
|
+
Object.keys(_Carousel).forEach(function (key) {
|
712
|
+
if (key === "default" || key === "__esModule") return;
|
713
|
+
if (key in exports && exports[key] === _Carousel[key]) return;
|
714
|
+
Object.defineProperty(exports, key, {
|
715
|
+
enumerable: true,
|
716
|
+
get: function get() {
|
717
|
+
return _Carousel[key];
|
718
|
+
}
|
719
|
+
});
|
720
|
+
});
|
710
721
|
var _mixins = /*#__PURE__*/require("./mixins");
|
711
722
|
Object.keys(_mixins).forEach(function (key) {
|
712
723
|
if (key === "default" || key === "__esModule") return;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
var _templateObject, _templateObject2;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
3
|
+
import { css, carouselNewTokens as tokens } from '@salutejs/plasma-new-hope/emotion';
|
4
|
+
export var config = {
|
5
|
+
defaults: {
|
6
|
+
view: 'default',
|
7
|
+
size: 's'
|
8
|
+
},
|
9
|
+
variations: {
|
10
|
+
view: {
|
11
|
+
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-accent);\n ", ": var(--text-primary);\n ", ": var(--text-accent);\n ", ": var(--surface-solid-primary);\n ", ": var(--text-positive);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--text-accent-active);\n ", ": var(--surface-solid-primary-active);\n "])), tokens.paginationDotBackground, tokens.paginationDotActiveBackground, tokens.controlIconButtonColor, tokens.controlIconButtonBackgroundColor, tokens.controlIconButtonColorHover, tokens.controlIconButtonBackgroundColorHover, tokens.controlIconButtonColorActive, tokens.controlIconButtonBackgroundColorActive)
|
12
|
+
},
|
13
|
+
size: {
|
14
|
+
s: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n "])), tokens.controlIconButtonRadius)
|
15
|
+
}
|
16
|
+
}
|
17
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { carouselNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/emotion';
|
2
|
+
import { config } from './Carousel.config';
|
3
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(carouselNewConfig, config);
|
4
|
+
var Carousel = /*#__PURE__*/component(mergedConfig);
|
5
|
+
export { Carousel };
|
@@ -0,0 +1,133 @@
|
|
1
|
+
import * as React from 'react';
|
2
|
+
import type { ComponentProps } from 'react';
|
3
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
4
|
+
import styled from 'styled-components';
|
5
|
+
import { getConfigVariations, InSpacingDecorator } from '@salutejs/plasma-sb-utils';
|
6
|
+
|
7
|
+
import { config } from './Carousel.config';
|
8
|
+
import { Carousel } from './Carousel';
|
9
|
+
|
10
|
+
import { CarouselItem } from './index';
|
11
|
+
|
12
|
+
type StoryCarouselProps = ComponentProps<typeof Carousel> & {
|
13
|
+
slides: number;
|
14
|
+
visibleDots: number;
|
15
|
+
paginationDisabled: boolean;
|
16
|
+
paginationCentered: boolean;
|
17
|
+
};
|
18
|
+
|
19
|
+
const { views, sizes } = getConfigVariations(config);
|
20
|
+
|
21
|
+
const meta: Meta<StoryCarouselProps> = {
|
22
|
+
title: 'Navigation/Carousel',
|
23
|
+
component: Carousel,
|
24
|
+
decorators: [InSpacingDecorator],
|
25
|
+
argTypes: {
|
26
|
+
view: {
|
27
|
+
options: views,
|
28
|
+
control: {
|
29
|
+
type: 'select',
|
30
|
+
},
|
31
|
+
},
|
32
|
+
size: {
|
33
|
+
options: sizes,
|
34
|
+
control: {
|
35
|
+
type: 'inline-radio',
|
36
|
+
},
|
37
|
+
},
|
38
|
+
scrollAlign: {
|
39
|
+
options: ['start', 'center', 'end'],
|
40
|
+
control: {
|
41
|
+
type: 'inline-radio',
|
42
|
+
},
|
43
|
+
},
|
44
|
+
slides: {
|
45
|
+
control: 'number',
|
46
|
+
},
|
47
|
+
visibleDots: {
|
48
|
+
control: 'number',
|
49
|
+
},
|
50
|
+
controlArrowsDisabled: {
|
51
|
+
control: 'boolean',
|
52
|
+
},
|
53
|
+
paginationDisabled: {
|
54
|
+
control: 'boolean',
|
55
|
+
},
|
56
|
+
paginationCentered: {
|
57
|
+
control: 'boolean',
|
58
|
+
},
|
59
|
+
gap: {
|
60
|
+
control: 'text',
|
61
|
+
},
|
62
|
+
},
|
63
|
+
args: {
|
64
|
+
view: 'default',
|
65
|
+
size: 's',
|
66
|
+
scrollAlign: 'start',
|
67
|
+
slides: 20,
|
68
|
+
controlArrowsDisabled: false,
|
69
|
+
paginationDisabled: false,
|
70
|
+
paginationCentered: false,
|
71
|
+
gap: '20px',
|
72
|
+
},
|
73
|
+
parameters: {
|
74
|
+
controls: {
|
75
|
+
include: [
|
76
|
+
'scrollAlign',
|
77
|
+
'visibleDots',
|
78
|
+
'slides',
|
79
|
+
'controlArrowsDisabled',
|
80
|
+
'paginationDisabled',
|
81
|
+
'paginationCentered',
|
82
|
+
'gap',
|
83
|
+
],
|
84
|
+
},
|
85
|
+
},
|
86
|
+
};
|
87
|
+
|
88
|
+
export default meta;
|
89
|
+
|
90
|
+
const StyledCard = styled.div`
|
91
|
+
display: flex;
|
92
|
+
align-items: center;
|
93
|
+
justify-content: center;
|
94
|
+
border-radius: 8px;
|
95
|
+
width: 400px;
|
96
|
+
height: 370px;
|
97
|
+
background-color: #add8e6;
|
98
|
+
font-size: 30px;
|
99
|
+
`;
|
100
|
+
|
101
|
+
const StoryDefault = ({ visibleDots, slides, paginationDisabled, paginationCentered, ...rest }: StoryCarouselProps) => {
|
102
|
+
const items = Array(slides)
|
103
|
+
.fill(1)
|
104
|
+
.map((_, i) => ({
|
105
|
+
id: i,
|
106
|
+
title: i,
|
107
|
+
}));
|
108
|
+
|
109
|
+
return (
|
110
|
+
<>
|
111
|
+
<div style={{ width: '600px' }}>
|
112
|
+
<Carousel
|
113
|
+
paginationOptions={{
|
114
|
+
disabled: paginationDisabled,
|
115
|
+
visibleDots,
|
116
|
+
centered: paginationCentered,
|
117
|
+
}}
|
118
|
+
{...rest}
|
119
|
+
>
|
120
|
+
{items.map((item, i) => (
|
121
|
+
<CarouselItem key={i}>
|
122
|
+
<StyledCard>{item.title}</StyledCard>
|
123
|
+
</CarouselItem>
|
124
|
+
))}
|
125
|
+
</Carousel>
|
126
|
+
</div>
|
127
|
+
</>
|
128
|
+
);
|
129
|
+
};
|
130
|
+
|
131
|
+
export const Default: StoryObj<StoryCarouselProps> = {
|
132
|
+
render: (args) => <StoryDefault {...args} />,
|
133
|
+
};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import React, { useCallback, useRef, useState } from 'react';
|
2
2
|
import type { ComponentProps } from 'react';
|
3
|
-
import styled from 'styled-components';
|
3
|
+
import styled, { css } from 'styled-components';
|
4
4
|
import type { Meta, StoryObj } from '@storybook/react';
|
5
5
|
import { InSpacingDecorator, disableProps } from '@salutejs/plasma-sb-utils';
|
6
6
|
|
package/emotion/es/index.js
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
var _templateObject, _templateObject2;
|
2
|
+
function _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }
|
3
|
+
import { css, carouselNewTokens as tokens } from '@salutejs/plasma-new-hope/styled-components';
|
4
|
+
export var config = {
|
5
|
+
defaults: {
|
6
|
+
view: 'default',
|
7
|
+
size: 's'
|
8
|
+
},
|
9
|
+
variations: {
|
10
|
+
view: {
|
11
|
+
"default": /*#__PURE__*/css(_templateObject || (_templateObject = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": var(--surface-accent);\n ", ": var(--text-primary);\n ", ": var(--text-accent);\n ", ": var(--surface-solid-primary);\n ", ": var(--text-positive);\n ", ": var(--surface-solid-primary-hover);\n ", ": var(--text-accent-active);\n ", ": var(--surface-solid-primary-active);\n "])), tokens.paginationDotBackground, tokens.paginationDotActiveBackground, tokens.controlIconButtonColor, tokens.controlIconButtonBackgroundColor, tokens.controlIconButtonColorHover, tokens.controlIconButtonBackgroundColorHover, tokens.controlIconButtonColorActive, tokens.controlIconButtonBackgroundColorActive)
|
12
|
+
},
|
13
|
+
size: {
|
14
|
+
s: /*#__PURE__*/css(_templateObject2 || (_templateObject2 = /*#__PURE__*/_taggedTemplateLiteral(["\n ", ": 0.75rem;\n "])), tokens.controlIconButtonRadius)
|
15
|
+
}
|
16
|
+
}
|
17
|
+
};
|
@@ -0,0 +1,5 @@
|
|
1
|
+
import { carouselNewConfig, component, mergeConfig } from '@salutejs/plasma-new-hope/styled-components';
|
2
|
+
import { config } from './Carousel.config';
|
3
|
+
var mergedConfig = /*#__PURE__*/mergeConfig(carouselNewConfig, config);
|
4
|
+
var Carousel = /*#__PURE__*/component(mergedConfig);
|
5
|
+
export { Carousel };
|
package/es/index.js
CHANGED
package/index.d.ts
CHANGED
package/index.js
CHANGED
@@ -707,6 +707,17 @@ Object.keys(_ToastNew).forEach(function (key) {
|
|
707
707
|
}
|
708
708
|
});
|
709
709
|
});
|
710
|
+
var _Carousel = /*#__PURE__*/require("./components/Carousel");
|
711
|
+
Object.keys(_Carousel).forEach(function (key) {
|
712
|
+
if (key === "default" || key === "__esModule") return;
|
713
|
+
if (key in exports && exports[key] === _Carousel[key]) return;
|
714
|
+
Object.defineProperty(exports, key, {
|
715
|
+
enumerable: true,
|
716
|
+
get: function get() {
|
717
|
+
return _Carousel[key];
|
718
|
+
}
|
719
|
+
});
|
720
|
+
});
|
710
721
|
var _mixins = /*#__PURE__*/require("./mixins");
|
711
722
|
Object.keys(_mixins).forEach(function (key) {
|
712
723
|
if (key === "default" || key === "__esModule") return;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@salutejs/sdds-cs",
|
3
|
-
"version": "0.318.1-canary.2018.
|
3
|
+
"version": "0.318.1-canary.2018.15775755664.0",
|
4
4
|
"description": "Salute Design System / React UI kit for SDDS CS web applications",
|
5
5
|
"author": "Salute Frontend Team <salute.developers@gmail.com>",
|
6
6
|
"license": "MIT",
|
@@ -30,7 +30,7 @@
|
|
30
30
|
"directory": "packages/sdds-cs"
|
31
31
|
},
|
32
32
|
"dependencies": {
|
33
|
-
"@salutejs/plasma-new-hope": "0.326.1-canary.2018.
|
33
|
+
"@salutejs/plasma-new-hope": "0.326.1-canary.2018.15775755664.0",
|
34
34
|
"@salutejs/sdds-themes": "0.38.0"
|
35
35
|
},
|
36
36
|
"peerDependencies": {
|
@@ -123,5 +123,5 @@
|
|
123
123
|
"Anton Vinogradov"
|
124
124
|
],
|
125
125
|
"sideEffects": false,
|
126
|
-
"gitHead": "
|
126
|
+
"gitHead": "fa19a157ccb51ac63787c93a18ed9099ab5d6071"
|
127
127
|
}
|