@salutejs/plasma-new-hope 0.88.0-canary.1253.9520566145.0 → 0.88.0-canary.1254.9539033175.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/Range/Range.css +6 -6
- package/cjs/components/Slider/Slider.css +6 -6
- package/cjs/components/Slider/components/Double/Double.css +6 -6
- package/cjs/components/TextField/TextField.styles.js +1 -1
- package/cjs/components/TextField/TextField.styles.js.map +1 -1
- package/cjs/components/TextField/{TextField.styles_9fkr1l.css → TextField.styles_aqmut.css} +2 -2
- 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 +8 -6
- 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/Range/Range.css +6 -6
- package/es/components/Slider/Slider.css +6 -6
- package/es/components/Slider/components/Double/Double.css +6 -6
- package/es/components/TextField/TextField.styles.js +1 -1
- package/es/components/TextField/TextField.styles.js.map +1 -1
- package/es/components/TextField/{TextField.styles_9fkr1l.css → TextField.styles_aqmut.css} +2 -2
- 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 +8 -6
- 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/TextField/TextField.styles.js +2 -2
- 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/TextField/TextField.styles.js +2 -2
- 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/TextField/TextField.styles.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_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/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 @@
|
|
1
|
+
.Accordion_styles_rsiff6_bjv6ypd__465a9c67{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:var(--plasma-accordion-gap);-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;height:auto;background:var(--plasma-accordion-background);}.Accordion_styles_rsiff6_bjv6ypd__465a9c67.Accordion_styles_rsiff6_accordionStretchingFixed__465a9c67{width:var(--plasma-accordion-width);}.Accordion_styles_rsiff6_bjv6ypd__465a9c67.Accordion_styles_rsiff6_accordionStretchingFilled__465a9c67{width:100%;}
|
@@ -0,0 +1,81 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var React = require('react');
|
7
|
+
var index = require('../../utils/index.js');
|
8
|
+
var Accordion_styles = require('./Accordion.styles.js');
|
9
|
+
var Accordion_tokens = require('./Accordion.tokens.js');
|
10
|
+
var base = require('./variations/_view/base.js');
|
11
|
+
var base$1 = require('./variations/_size/base.js');
|
12
|
+
var index$1 = require('./utils/index.js');
|
13
|
+
|
14
|
+
var accordionRoot = function accordionRoot(Root) {
|
15
|
+
return /*#__PURE__*/React.forwardRef(function (_ref, outerRootRef) {
|
16
|
+
var size = _ref.size,
|
17
|
+
view = _ref.view,
|
18
|
+
_ref$stretching = _ref.stretching,
|
19
|
+
stretching = _ref$stretching === void 0 ? 'filled' : _ref$stretching,
|
20
|
+
_ref$defaultActiveEve = _ref.defaultActiveEventKey,
|
21
|
+
defaultActiveEventKey = _ref$defaultActiveEve === void 0 ? [] : _ref$defaultActiveEve,
|
22
|
+
children = _ref.children,
|
23
|
+
disabled = _ref.disabled,
|
24
|
+
className = _ref.className,
|
25
|
+
singleActive = _ref.singleActive,
|
26
|
+
onChange = _ref.onChange;
|
27
|
+
var stretchingClass = Accordion_tokens.classes["".concat(stretching, "Stretching")];
|
28
|
+
var _useState = React.useState(defaultActiveEventKey),
|
29
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
30
|
+
activeIndex = _useState2[0],
|
31
|
+
setActiveIndex = _useState2[1];
|
32
|
+
var updateValue = function updateValue(index, value) {
|
33
|
+
if (onChange) {
|
34
|
+
onChange(index, value);
|
35
|
+
}
|
36
|
+
if (singleActive) {
|
37
|
+
if (value) {
|
38
|
+
setActiveIndex([index]);
|
39
|
+
} else {
|
40
|
+
setActiveIndex([]);
|
41
|
+
}
|
42
|
+
} else if (value) {
|
43
|
+
setActiveIndex([index].concat(_rollupPluginBabelHelpers.toConsumableArray(activeIndex)));
|
44
|
+
} else {
|
45
|
+
var updatedActiveIndex = activeIndex.filter(function (i) {
|
46
|
+
return i !== index;
|
47
|
+
});
|
48
|
+
setActiveIndex(updatedActiveIndex);
|
49
|
+
}
|
50
|
+
};
|
51
|
+
var childrenArray = React.Children.toArray(children);
|
52
|
+
return /*#__PURE__*/React.createElement(Root, {
|
53
|
+
ref: outerRootRef,
|
54
|
+
size: size,
|
55
|
+
view: view,
|
56
|
+
className: index.cx(stretchingClass, Accordion_tokens.classes.accordionRoot, className)
|
57
|
+
}, index$1.getChildren(childrenArray, activeIndex, disabled, updateValue));
|
58
|
+
});
|
59
|
+
};
|
60
|
+
var accordionConfig = {
|
61
|
+
name: 'Accordion',
|
62
|
+
tag: 'div',
|
63
|
+
layout: accordionRoot,
|
64
|
+
base: Accordion_styles.base,
|
65
|
+
variations: {
|
66
|
+
view: {
|
67
|
+
css: base.base
|
68
|
+
},
|
69
|
+
size: {
|
70
|
+
css: base$1.base
|
71
|
+
}
|
72
|
+
},
|
73
|
+
defaults: {
|
74
|
+
view: 'default',
|
75
|
+
size: 'm'
|
76
|
+
}
|
77
|
+
};
|
78
|
+
|
79
|
+
exports.accordionConfig = accordionConfig;
|
80
|
+
exports.accordionRoot = accordionRoot;
|
81
|
+
//# sourceMappingURL=Accordion.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.js","sources":["../../../src/components/Accordion/Accordion.tsx"],"sourcesContent":["import React, { Children, forwardRef, useState } from 'react';\n\nimport { RootPropsOmitOnChange } from '../../engines';\nimport { cx } from '../../utils';\n\nimport type { AccordionProps } from './Accordion.types';\nimport { base } from './Accordion.styles';\nimport { classes } from './Accordion.tokens';\nimport { base as viewCSS } from './variations/_view/base';\nimport { base as sizeCSS } from './variations/_size/base';\nimport { getChildren } from './utils';\n\nexport const accordionRoot = (Root: RootPropsOmitOnChange<HTMLDivElement, AccordionProps>) =>\n forwardRef<HTMLDivElement, AccordionProps>(\n (\n {\n size,\n view,\n stretching = 'filled',\n defaultActiveEventKey = [],\n children,\n disabled,\n className,\n singleActive,\n onChange,\n },\n outerRootRef,\n ) => {\n const stretchingClass = classes[`${stretching}Stretching` as keyof typeof classes];\n\n const [activeIndex, setActiveIndex] = useState<number[]>(defaultActiveEventKey);\n\n const updateValue = (index: number, value?: boolean) => {\n if (onChange) {\n onChange(index, value);\n }\n if (singleActive) {\n if (value) {\n setActiveIndex([index]);\n } else {\n setActiveIndex([]);\n }\n } else if (value) {\n setActiveIndex([index, ...activeIndex]);\n } else {\n const updatedActiveIndex = activeIndex.filter((i) => i !== index);\n setActiveIndex(updatedActiveIndex);\n }\n };\n\n const childrenArray = Children.toArray(children) as React.ReactElement[];\n return (\n <Root\n ref={outerRootRef}\n size={size}\n view={view}\n className={cx(stretchingClass, classes.accordionRoot, className)}\n >\n {getChildren(childrenArray, activeIndex, disabled, updateValue)}\n </Root>\n );\n },\n );\n\nexport const accordionConfig = {\n name: 'Accordion',\n tag: 'div',\n layout: accordionRoot,\n base,\n variations: {\n view: {\n css: viewCSS,\n },\n size: {\n css: sizeCSS,\n },\n },\n defaults: {\n view: 'default',\n size: 'm',\n },\n};\n"],"names":["accordionRoot","Root","forwardRef","_ref","outerRootRef","size","view","_ref$stretching","stretching","_ref$defaultActiveEve","defaultActiveEventKey","children","disabled","className","singleActive","onChange","stretchingClass","classes","concat","_useState","useState","_useState2","_slicedToArray","activeIndex","setActiveIndex","updateValue","index","value","_toConsumableArray","updatedActiveIndex","filter","i","childrenArray","Children","toArray","React","createElement","ref","cx","getChildren","accordionConfig","name","tag","layout","base","variations","css","viewCSS","s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E;AACFyC,MAAAA,GAAG,EAAEE,WAAAA;AACT,KAAA;GACH;AACDC,EAAAA,QAAQ,EAAE;AACN3C,IAAAA,IAAI,EAAE,SAAS;AACfD,IAAAA,IAAI,EAAE,GAAA;AACV,GAAA;AACJ;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.styles.js","sources":["../../../src/components/Accordion/Accordion.styles.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nimport { classes, tokens } from './Accordion.tokens';\n\nexport const base = css`\n display: flex;\n flex-direction: column;\n gap: var(${tokens.accordionGap});\n align-items: stretch;\n height: auto;\n background: var(${tokens.accordionBackground});\n\n &.${classes.fixedStretching} {\n width: var(${tokens.accordionWidth});\n }\n &.${classes.filledStretching} {\n width: 100%;\n }\n`;\n"],"names":["base"],"mappings":";;;;AAIO,IAAMA,IAAI,GAchB;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
.bjv6ypd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;gap:var(--plasma-accordion-gap);-webkit-align-items:stretch;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch;height:auto;background:var(--plasma-accordion-background);}.bjv6ypd.accordion-stretching-fixed{width:var(--plasma-accordion-width);}.bjv6ypd.accordion-stretching-filled{width:100%;}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var classes = {
|
6
|
+
filledStretching: 'accordion-stretching-filled',
|
7
|
+
fixedStretching: 'accordion-stretching-fixed',
|
8
|
+
accordionRoot: 'accordion-root',
|
9
|
+
accordionItem: 'accordion-item',
|
10
|
+
clearAccordionItem: 'clear-accordion-item',
|
11
|
+
accordionItemShowBody: 'accordion-item-show-body',
|
12
|
+
accordionPlusAnimationElement: 'accordion-plus-animation-element',
|
13
|
+
accordionDisabled: 'accordion-disabled'
|
14
|
+
};
|
15
|
+
var tokens = {
|
16
|
+
accordionGap: '--plasma-accordion-gap',
|
17
|
+
accordionWidth: '--plasma-accordion-width',
|
18
|
+
accordionBackground: '--plasma-accordion-background',
|
19
|
+
accordionItemBackground: '--plasma-accordion-item-background',
|
20
|
+
accordionItemBorderRadius: '--plasma-accordion-item-border-radius',
|
21
|
+
accordionItemPadding: '--plasma-accordion-item-padding',
|
22
|
+
accordionItemPaddingVertical: '--plasma-accordion-item-padding-vertical',
|
23
|
+
accordionItemPaddingHorizontal: '--plasma-accordion-item-padding-horizontal',
|
24
|
+
accordionItemGap: '--plasma-accordion-item-gap',
|
25
|
+
accordionItemFocus: '--plasma-accordion-item-focus',
|
26
|
+
accordionItemBorderBottom: '--plasma-accordion-item-border-bottom',
|
27
|
+
accordionItemTitleColor: '--plasma-accordion-item-title-color',
|
28
|
+
accordionItemTitleFontFamily: '--plasma-accordion-item-title-font-family',
|
29
|
+
accordionItemTitleFontSize: '--plasma-accordion-item-title-font-size',
|
30
|
+
accordionItemTitleFontStyle: '--plasma-accordion-item-title-font-style',
|
31
|
+
accordionItemTitleFontWeight: '--plasma-accordion-item-title-font-weight',
|
32
|
+
accordionItemTitleLetterSpacing: '--plasma-accordion-item-title-letter-spacing',
|
33
|
+
accordionItemTitleLineHeight: '--plasma-accordion-item-title-line-height',
|
34
|
+
accordionItemTextColor: '--plasma-accordion-item-text-color',
|
35
|
+
accordionItemTextFontFamily: '--plasma-accordion-item-text-font-family',
|
36
|
+
accordionItemTextFontSize: '--plasma-accordion-item-text-font-size',
|
37
|
+
accordionItemTextFontStyle: '--plasma-accordion-item-text-font-style',
|
38
|
+
accordionItemTextFontWeight: '--plasma-accordion-item-text-font-weight',
|
39
|
+
accordionItemTextLetterSpacing: '--plasma-accordion-item-text-letter-spacing',
|
40
|
+
accordionItemTextLineHeight: '--plasma-accordion-item-text-line-height'
|
41
|
+
};
|
42
|
+
|
43
|
+
exports.classes = classes;
|
44
|
+
exports.tokens = tokens;
|
45
|
+
//# sourceMappingURL=Accordion.tokens.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"Accordion.tokens.js","sources":["../../../src/components/Accordion/Accordion.tokens.ts"],"sourcesContent":["export const classes = {\n filledStretching: 'accordion-stretching-filled',\n fixedStretching: 'accordion-stretching-fixed',\n accordionRoot: 'accordion-root',\n accordionItem: 'accordion-item',\n clearAccordionItem: 'clear-accordion-item',\n accordionItemShowBody: 'accordion-item-show-body',\n accordionPlusAnimationElement: 'accordion-plus-animation-element',\n accordionDisabled: 'accordion-disabled',\n};\n\nexport const tokens = {\n accordionGap: '--plasma-accordion-gap',\n accordionWidth: '--plasma-accordion-width',\n accordionBackground: '--plasma-accordion-background',\n\n accordionItemBackground: '--plasma-accordion-item-background',\n accordionItemBorderRadius: '--plasma-accordion-item-border-radius',\n accordionItemPadding: '--plasma-accordion-item-padding',\n accordionItemPaddingVertical: '--plasma-accordion-item-padding-vertical',\n accordionItemPaddingHorizontal: '--plasma-accordion-item-padding-horizontal',\n accordionItemGap: '--plasma-accordion-item-gap',\n accordionItemFocus: '--plasma-accordion-item-focus',\n accordionItemBorderBottom: '--plasma-accordion-item-border-bottom',\n\n accordionItemTitleColor: '--plasma-accordion-item-title-color',\n accordionItemTitleFontFamily: '--plasma-accordion-item-title-font-family',\n accordionItemTitleFontSize: '--plasma-accordion-item-title-font-size',\n accordionItemTitleFontStyle: '--plasma-accordion-item-title-font-style',\n accordionItemTitleFontWeight: '--plasma-accordion-item-title-font-weight',\n accordionItemTitleLetterSpacing: '--plasma-accordion-item-title-letter-spacing',\n accordionItemTitleLineHeight: '--plasma-accordion-item-title-line-height',\n\n accordionItemTextColor: '--plasma-accordion-item-text-color',\n accordionItemTextFontFamily: '--plasma-accordion-item-text-font-family',\n accordionItemTextFontSize: '--plasma-accordion-item-text-font-size',\n accordionItemTextFontStyle: '--plasma-accordion-item-text-font-style',\n accordionItemTextFontWeight: '--plasma-accordion-item-text-font-weight',\n accordionItemTextLetterSpacing: '--plasma-accordion-item-text-letter-spacing',\n accordionItemTextLineHeight: '--plasma-accordion-item-text-line-height',\n};\n"],"names":["classes","filledStretching","fixedStretching","accordionRoot","accordionItem","clearAccordionItem","accordionItemShowBody","accordionPlusAnimationElement","accordionDisabled","tokens","accordionGap","accordionWidth","accordionBackground","accordionItemBackground","accordionItemBorderRadius","accordionItemPadding","accordionItemPaddingVertical","accordionItemPaddingHorizontal","accordionItemGap","accordionItemFocus","accordionItemBorderBottom","accordionItemTitleColor","accordionItemTitleFontFamily","accordionItemTitleFontSize","accordionItemTitleFontStyle","accordionItemTitleFontWeight","accordionItemTitleLetterSpacing","accordionItemTitleLineHeight","accordionItemTextColor","accordionItemTextFontFamily","accordionItemTextFontSize","accordionItemTextFontStyle","accordionItemTextFontWeight","accordionItemTextLetterSpacing","accordionItemTextLineHeight"],"mappings":";;;;AAAO,IAAMA,OAAO,GAAG;AACnBC,EAAAA,gBAAgB,EAAE,6BAA6B;AAC/CC,EAAAA,eAAe,EAAE,4BAA4B;AAC7CC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,aAAa,EAAE,gBAAgB;AAC/BC,EAAAA,kBAAkB,EAAE,sBAAsB;AAC1CC,EAAAA,qBAAqB,EAAE,0BAA0B;AACjDC,EAAAA,6BAA6B,EAAE,kCAAkC;AACjEC,EAAAA,iBAAiB,EAAE,oBAAA;AACvB,EAAC;AAEM,IAAMC,MAAM,GAAG;AAClBC,EAAAA,YAAY,EAAE,wBAAwB;AACtCC,EAAAA,cAAc,EAAE,0BAA0B;AAC1CC,EAAAA,mBAAmB,EAAE,+BAA+B;AAEpDC,EAAAA,uBAAuB,EAAE,oCAAoC;AAC7DC,EAAAA,yBAAyB,EAAE,uCAAuC;AAClEC,EAAAA,oBAAoB,EAAE,iCAAiC;AACvDC,EAAAA,4BAA4B,EAAE,0CAA0C;AACxEC,EAAAA,8BAA8B,EAAE,4CAA4C;AAC5EC,EAAAA,gBAAgB,EAAE,6BAA6B;AAC/CC,EAAAA,kBAAkB,EAAE,+BAA+B;AACnDC,EAAAA,yBAAyB,EAAE,uCAAuC;AAElEC,EAAAA,uBAAuB,EAAE,qCAAqC;AAC9DC,EAAAA,4BAA4B,EAAE,2CAA2C;AACzEC,EAAAA,0BAA0B,EAAE,yCAAyC;AACrEC,EAAAA,2BAA2B,EAAE,0CAA0C;AACvEC,EAAAA,4BAA4B,EAAE,2CAA2C;AACzEC,EAAAA,+BAA+B,EAAE,8CAA8C;AAC/EC,EAAAA,4BAA4B,EAAE,2CAA2C;AAEzEC,EAAAA,sBAAsB,EAAE,oCAAoC;AAC5DC,EAAAA,2BAA2B,EAAE,0CAA0C;AACvEC,EAAAA,yBAAyB,EAAE,wCAAwC;AACnEC,EAAAA,0BAA0B,EAAE,yCAAyC;AACrEC,EAAAA,2BAA2B,EAAE,0CAA0C;AACvEC,EAAAA,8BAA8B,EAAE,6CAA6C;AAC7EC,EAAAA,2BAA2B,EAAE,0CAAA;AACjC;;;;;"}
|
@@ -0,0 +1,97 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var _rollupPluginBabelHelpers = require('../../../../_virtual/_rollupPluginBabelHelpers.js');
|
6
|
+
var React = require('react');
|
7
|
+
var roundness = require('../../../../utils/roundness.js');
|
8
|
+
var Accordion_tokens = require('../../Accordion.tokens.js');
|
9
|
+
var AccordionItem_styles = require('./AccordionItem.styles.js');
|
10
|
+
|
11
|
+
var _StyledMinus, _StyledArrow;
|
12
|
+
var AccordionItem = function AccordionItem(_ref) {
|
13
|
+
var value = _ref.value,
|
14
|
+
contentRight = _ref.contentRight,
|
15
|
+
contentLeft = _ref.contentLeft,
|
16
|
+
title = _ref.title,
|
17
|
+
_ref$pin = _ref.pin,
|
18
|
+
pin = _ref$pin === void 0 ? 'square-square' : _ref$pin,
|
19
|
+
children = _ref.children,
|
20
|
+
_ref$type = _ref.type,
|
21
|
+
type = _ref$type === void 0 ? 'sign' : _ref$type,
|
22
|
+
index = _ref.index,
|
23
|
+
eventKey = _ref.eventKey,
|
24
|
+
disabled = _ref.disabled,
|
25
|
+
onChange = _ref.onChange;
|
26
|
+
var key = eventKey !== null && eventKey !== void 0 ? eventKey : index;
|
27
|
+
var _useState = React.useState(),
|
28
|
+
_useState2 = _rollupPluginBabelHelpers.slicedToArray(_useState, 2),
|
29
|
+
leftPadding = _useState2[0],
|
30
|
+
setLeftPadding = _useState2[1];
|
31
|
+
var handleOpen = function handleOpen() {
|
32
|
+
if (disabled) {
|
33
|
+
return;
|
34
|
+
}
|
35
|
+
if (onChange) {
|
36
|
+
onChange(key, !value);
|
37
|
+
}
|
38
|
+
};
|
39
|
+
var leftContentRef = React.useRef(null);
|
40
|
+
React.useEffect(function () {
|
41
|
+
var _leftContentRef$curre, _leftContentRef$curre2;
|
42
|
+
var leftContentWidth = (_leftContentRef$curre = leftContentRef === null || leftContentRef === void 0 || (_leftContentRef$curre2 = leftContentRef.current) === null || _leftContentRef$curre2 === void 0 ? void 0 : _leftContentRef$curre2.offsetWidth) !== null && _leftContentRef$curre !== void 0 ? _leftContentRef$curre : 0;
|
43
|
+
var leftPaddingBody = leftContentWidth ? "calc(".concat(leftContentWidth, "px + var(").concat(Accordion_tokens.tokens.accordionItemGap, "))") : 0;
|
44
|
+
setLeftPadding(leftPaddingBody);
|
45
|
+
}, [value, type, leftContentRef, setLeftPadding]);
|
46
|
+
var openedBodyClass = value ? Accordion_tokens.classes.accordionItemShowBody : undefined;
|
47
|
+
var StyledAnimationPLus = function StyledAnimationPLus() {
|
48
|
+
return /*#__PURE__*/React.createElement(AccordionItem_styles.StyledPlus, null, _StyledMinus || (_StyledMinus = /*#__PURE__*/React.createElement(AccordionItem_styles.StyledMinus, {
|
49
|
+
size: "xs",
|
50
|
+
color: "inhert"
|
51
|
+
})), /*#__PURE__*/React.createElement(AccordionItem_styles.StyledMinus, {
|
52
|
+
size: "xs",
|
53
|
+
color: "inhert",
|
54
|
+
className: openedBodyClass !== null && openedBodyClass !== void 0 ? openedBodyClass : Accordion_tokens.classes.accordionPlusAnimationElement
|
55
|
+
}));
|
56
|
+
};
|
57
|
+
var accordionBorderRadius = roundness.convertRoundnessMatrix(pin, "var(".concat(Accordion_tokens.tokens.accordionItemBorderRadius, ")"), '1.5rem');
|
58
|
+
var disabledClass = disabled ? Accordion_tokens.classes.accordionDisabled : '';
|
59
|
+
var leftContent = contentLeft !== null && contentLeft !== void 0 ? contentLeft : type === 'arrow' ? _StyledArrow || (_StyledArrow = /*#__PURE__*/React.createElement(AccordionItem_styles.StyledArrow, {
|
60
|
+
size: "xs",
|
61
|
+
color: "inhert"
|
62
|
+
})) : undefined;
|
63
|
+
var leftContentRotate = type === 'arrow' && value ? Accordion_tokens.classes.accordionItemShowBody : undefined;
|
64
|
+
var rightContent = contentRight !== null && contentRight !== void 0 ? contentRight : type === 'sign' ? /*#__PURE__*/React.createElement(StyledAnimationPLus, null) : undefined;
|
65
|
+
var rightContentRotate = type === 'sign' && value ? Accordion_tokens.classes.accordionItemShowBody : undefined;
|
66
|
+
return /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionItem, {
|
67
|
+
className: Accordion_tokens.classes.accordionItem,
|
68
|
+
key: key,
|
69
|
+
style: {
|
70
|
+
borderRadius: accordionBorderRadius
|
71
|
+
}
|
72
|
+
}, /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionHeader, {
|
73
|
+
role: "tab",
|
74
|
+
tabIndex: 0,
|
75
|
+
onClick: handleOpen,
|
76
|
+
className: disabledClass,
|
77
|
+
"aria-expanded": value,
|
78
|
+
"aria-controls": "accordion-item-section".concat(key),
|
79
|
+
id: "accordion-item-".concat(key)
|
80
|
+
}, /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionHeaderLeft, null, leftContent && /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionContentLeft, {
|
81
|
+
ref: leftContentRef,
|
82
|
+
className: leftContentRotate
|
83
|
+
}, leftContent), /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionTitle, null, title)), /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionContentRight, {
|
84
|
+
className: rightContentRotate
|
85
|
+
}, rightContent && rightContent)), /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionBodyAnimate, {
|
86
|
+
"aria-labelledby": "accordion-item-".concat(key),
|
87
|
+
"aria-hidden": !value,
|
88
|
+
id: "accordion-item-section".concat(key),
|
89
|
+
className: openedBodyClass,
|
90
|
+
style: {
|
91
|
+
paddingLeft: "".concat(leftPadding)
|
92
|
+
}
|
93
|
+
}, /*#__PURE__*/React.createElement(AccordionItem_styles.StyledAccordionBody, null, children)));
|
94
|
+
};
|
95
|
+
|
96
|
+
exports.AccordionItem = AccordionItem;
|
97
|
+
//# sourceMappingURL=AccordionItem.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AccordionItem.js","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.tsx"],"sourcesContent":["import React, { HTMLAttributes, useState, useRef, useEffect } from 'react';\n\nimport { convertRoundnessMatrix } from '../../../../utils/roundness';\nimport { classes, tokens } from '../../Accordion.tokens';\n\nimport {\n StyledAccordionItem,\n StyledAccordionHeader,\n StyledAccordionBody,\n StyledAccordionTitle,\n StyledAccordionContentLeft,\n StyledAccordionHeaderLeft,\n StyledAccordionContentRight,\n StyledArrow,\n StyledMinus,\n StyledPlus,\n StyledAccordionBodyAnimate,\n} from './AccordionItem.styles';\nimport type { AccordionItemProps } from './AccordionItem.types';\n\nexport const AccordionItem: React.FC<HTMLAttributes<HTMLDivElement> & AccordionItemProps> = ({\n value,\n contentRight,\n contentLeft,\n title,\n pin = 'square-square',\n children,\n type = 'sign',\n index,\n eventKey,\n disabled,\n onChange,\n}) => {\n const key = eventKey ?? index;\n\n const [leftPadding, setLeftPadding] = useState<string | number | null>();\n\n const handleOpen = () => {\n if (disabled) {\n return;\n }\n if (onChange) {\n onChange(key, !value);\n }\n };\n\n const leftContentRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const leftContentWidth = leftContentRef?.current?.offsetWidth ?? 0;\n const leftPaddingBody = leftContentWidth ? `calc(${leftContentWidth}px + var(${tokens.accordionItemGap}))` : 0;\n setLeftPadding(leftPaddingBody);\n }, [value, type, leftContentRef, setLeftPadding]);\n\n const openedBodyClass = value ? classes.accordionItemShowBody : undefined;\n\n const StyledAnimationPLus = () => (\n <StyledPlus>\n <StyledMinus size=\"xs\" color=\"inhert\" />\n <StyledMinus\n size=\"xs\"\n color=\"inhert\"\n className={openedBodyClass ?? classes.accordionPlusAnimationElement}\n />\n </StyledPlus>\n );\n\n const accordionBorderRadius = convertRoundnessMatrix(pin, `var(${tokens.accordionItemBorderRadius})`, '1.5rem');\n const disabledClass = disabled ? classes.accordionDisabled : '';\n\n const leftContent = contentLeft ?? (type === 'arrow' ? <StyledArrow size=\"xs\" color=\"inhert\" /> : undefined);\n const leftContentRotate = type === 'arrow' && value ? classes.accordionItemShowBody : undefined;\n\n const rightContent = contentRight ?? (type === 'sign' ? <StyledAnimationPLus /> : undefined);\n const rightContentRotate = type === 'sign' && value ? classes.accordionItemShowBody : undefined;\n\n return (\n <StyledAccordionItem\n className={classes.accordionItem}\n key={key}\n style={{ borderRadius: accordionBorderRadius }}\n >\n <StyledAccordionHeader\n role=\"tab\"\n tabIndex={0}\n onClick={handleOpen}\n className={disabledClass}\n aria-expanded={value}\n aria-controls={`accordion-item-section${key}`}\n id={`accordion-item-${key}`}\n >\n <StyledAccordionHeaderLeft>\n {leftContent && (\n <StyledAccordionContentLeft ref={leftContentRef} className={leftContentRotate}>\n {leftContent}\n </StyledAccordionContentLeft>\n )}\n <StyledAccordionTitle>{title}</StyledAccordionTitle>\n </StyledAccordionHeaderLeft>\n\n <StyledAccordionContentRight className={rightContentRotate}>\n {rightContent && rightContent}\n </StyledAccordionContentRight>\n </StyledAccordionHeader>\n <StyledAccordionBodyAnimate\n aria-labelledby={`accordion-item-${key}`}\n aria-hidden={!value}\n id={`accordion-item-section${key}`}\n className={openedBodyClass}\n style={{ paddingLeft: `${leftPadding}` }}\n >\n <StyledAccordionBody>{children}</StyledAccordionBody>\n </StyledAccordionBodyAnimate>\n </StyledAccordionItem>\n );\n};\n"],"names":["AccordionItem","_ref","value","contentRight","contentLeft","title","_ref$pin","pin","children","_ref$type","type","index","eventKey","disabled","onChange","key","_useState","useState","_useState2","_slicedToArray","leftPadding","setLeftPadding","handleOpen","leftContentRef","useRef","useEffect","_leftContentRef$curre","_leftContentRef$curre2","leftContentWidth","current","offsetWidth","leftPaddingBody","concat","tokens","accordionItemGap","openedBodyClass","classes","accordionItemShowBody","undefined","StyledAnimationPLus","React","createElement","StyledPlus","_StyledMinus","StyledMinus","size","color","className","accordionPlusAnimationElement","accordionBorderRadius","convertRoundnessMatrix","accordionItemBorderRadius","disabledClass","accordionDisabled","leftContent","_StyledArrow","StyledArrow","leftContentRotate","rightContent","rightContentRotate","StyledAccordionItem","accordionItem","style","borderRadius","StyledAccordionHeader","role","tabIndex","onClick","id","StyledAccordionHeaderLeft","StyledAccordionContentLeft","ref","StyledAccordionTitle","StyledAccordionContentRight","StyledAccordionBodyAnimate","paddingLeft","StyledAccordionBody"],"mappings":";;;;;;;;;;;IAoBaA,aAA4E,GAAG,SAA/EA,aAA4EA,CAAAC,IAAA,EAYnF;AAAA,EAAA,IAXFC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,YAAY,GAAAF,IAAA,CAAZE,YAAY;IACZC,WAAW,GAAAH,IAAA,CAAXG,WAAW;IACXC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IAAAC,QAAA,GAAAL,IAAA,CACLM,GAAG;AAAHA,IAAAA,GAAG,GAAAD,QAAA,KAAG,KAAA,CAAA,GAAA,eAAe,GAAAA,QAAA;IACrBE,QAAQ,GAAAP,IAAA,CAARO,QAAQ;IAAAC,SAAA,GAAAR,IAAA,CACRS,IAAI;A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AA,eAE5ByB,KAAA,CAAAC,aAAA,CAAC4B,8CAAyB,EAAA,IAAA,EACrBf,WAAW,iBACRd,KAAA,CAAAC,aAAA,CAAC6B,+CAA0B,EAAA;AAACC,IAAAA,GAAG,EAAEhD,cAAe;AAACwB,IAAAA,SAAS,EAAEU,iBAAAA;AAAkB,GAAA,EACzEH,WACuB,CAC/B,eACDd,KAAA,CAAAC,aAAA,CAAC+B,yCAAoB,EAAEnE,IAAAA,EAAAA,KAA4B,CAC5B,CAAC,eAE5BmC,KAAA,CAAAC,aAAA,CAACgC,gDAA2B,EAAA;AAAC1B,IAAAA,SAAS,EAAEY,kBAAAA;GACnCD,EAAAA,YAAY,IAAIA,YACQ,CACV,CAAC,eACxBlB,KAAA,CAAAC,aAAA,CAACiC,+CAA0B,EAAA;IACvB,iBAAA1C,EAAAA,iBAAAA,CAAAA,MAAA,CAAmCjB,GAAG,CAAG;AACzC,IAAA,aAAA,EAAa,CAACb,KAAM;AACpBkE,IAAAA,EAAE,EAAApC,wBAAAA,CAAAA,MAAA,CAA2BjB,GAAG,CAAG;AACnCgC,IAAAA,SAAS,EAAEZ,eAAgB;AAC3B2B,IAAAA,KAAK,EAAE;MAAEa,WAAW,EAAA,EAAA,CAAA3C,MAAA,CAAKZ,WAAW,CAAA;AAAG,KAAA;GAEvCoB,eAAAA,KAAA,CAAAC,aAAA,CAACmC,wCAAmB,EAAEpE,IAAAA,EAAAA,QAA8B,CAC5B,CACX,CAAC,CAAA;AAE9B;;;;"}
|
@@ -0,0 +1,63 @@
|
|
1
|
+
'use strict';
|
2
|
+
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var styled = require('styled-components');
|
6
|
+
require('react');
|
7
|
+
require('@linaria/react');
|
8
|
+
var IconChevronDownFill = require('../../../_Icon/Icons/IconChevronDownFill.js');
|
9
|
+
var IconMinus = require('../../../_Icon/Icons/IconMinus.js');
|
10
|
+
var Accordion_tokens = require('../../Accordion.tokens.js');
|
11
|
+
var addFocus = require('../../../../mixins/addFocus.js');
|
12
|
+
|
13
|
+
var StyledAccordionItem = /*#__PURE__*/styled.div.withConfig({
|
14
|
+
componentId: "plasma-new-hope__sc-iot32d-0"
|
15
|
+
})(["background:var(", ");border-bottom:var(", ");&:last-child{border-bottom:none;}"], Accordion_tokens.tokens.accordionItemBackground, Accordion_tokens.tokens.accordionItemBorderBottom);
|
16
|
+
var StyledAccordionHeader = /*#__PURE__*/styled.button.withConfig({
|
17
|
+
componentId: "plasma-new-hope__sc-iot32d-1"
|
18
|
+
})(["width:100%;border:none;padding:var(", ");display:flex;gap:var(", ");justify-content:space-between;align-items:center;background:none;box-sizing:border-box;cursor:pointer;&.", "{opacity:0.4;cursor:not-allowed;}&:focus{outline:none;}", ""], Accordion_tokens.tokens.accordionItemPadding, Accordion_tokens.tokens.accordionItemGap, Accordion_tokens.classes.accordionDisabled, /*#__PURE__*/addFocus.addFocus({
|
19
|
+
outlineOffset: '0.125rem',
|
20
|
+
outlineSize: '0.125rem',
|
21
|
+
outlineRadius: '0',
|
22
|
+
outlineColor: /*#__PURE__*/"var(".concat(Accordion_tokens.tokens.accordionItemFocus, ")")
|
23
|
+
}));
|
24
|
+
var StyledAccordionHeaderLeft = /*#__PURE__*/styled.div.withConfig({
|
25
|
+
componentId: "plasma-new-hope__sc-iot32d-2"
|
26
|
+
})(["display:flex;gap:var(", ");justify-content:space-between;align-items:center;"], Accordion_tokens.tokens.accordionItemGap);
|
27
|
+
var StyledAccordionContentRight = /*#__PURE__*/styled.div.withConfig({
|
28
|
+
componentId: "plasma-new-hope__sc-iot32d-3"
|
29
|
+
})(["transition:0.2s;transform:rotate(90deg);&.", "{transition:0.2s;transform:rotate(0deg);}"], Accordion_tokens.classes.accordionItemShowBody);
|
30
|
+
var StyledAccordionContentLeft = /*#__PURE__*/styled.div.withConfig({
|
31
|
+
componentId: "plasma-new-hope__sc-iot32d-4"
|
32
|
+
})(["transition:0.2s;display:flex;align-items:center;&.", "{transition:0.2s;transform:rotate(180deg);}"], Accordion_tokens.classes.accordionItemShowBody);
|
33
|
+
var StyledAccordionTitle = /*#__PURE__*/styled.div.withConfig({
|
34
|
+
componentId: "plasma-new-hope__sc-iot32d-5"
|
35
|
+
})(["color:var(", ");font-family:var(", ");font-size:var(", ");font-weight:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");"], Accordion_tokens.tokens.accordionItemTitleColor, Accordion_tokens.tokens.accordionItemTitleFontFamily, Accordion_tokens.tokens.accordionItemTitleFontSize, Accordion_tokens.tokens.accordionItemTitleFontWeight, Accordion_tokens.tokens.accordionItemTitleFontStyle, Accordion_tokens.tokens.accordionItemTitleLetterSpacing, Accordion_tokens.tokens.accordionItemTitleLineHeight);
|
36
|
+
var StyledAccordionBodyAnimate = /*#__PURE__*/styled.div.withConfig({
|
37
|
+
componentId: "plasma-new-hope__sc-iot32d-6"
|
38
|
+
})(["display:grid;grid-template-rows:0fr;transition:grid-template-rows 0.2s ease-out;overflow:hidden;&.", "{grid-template-rows:1fr;padding-bottom:var(", ");&.", "{transition:0.2s;transform:rotate(0deg);}}"], Accordion_tokens.classes.accordionItemShowBody, Accordion_tokens.tokens.accordionItemPaddingVertical, Accordion_tokens.classes.accordionPlusAnimationElement);
|
39
|
+
var StyledAccordionBody = /*#__PURE__*/styled.div.withConfig({
|
40
|
+
componentId: "plasma-new-hope__sc-iot32d-7"
|
41
|
+
})(["color:var(", ");font-family:var(", ");font-size:var(", ");font-weight:var(", ");font-style:var(", ");letter-spacing:var(", ");line-height:var(", ");overflow:hidden;padding-right:var(", ");padding-left:var(", ");"], Accordion_tokens.tokens.accordionItemTextColor, Accordion_tokens.tokens.accordionItemTextFontFamily, Accordion_tokens.tokens.accordionItemTextFontSize, Accordion_tokens.tokens.accordionItemTextFontWeight, Accordion_tokens.tokens.accordionItemTextFontStyle, Accordion_tokens.tokens.accordionItemTextLetterSpacing, Accordion_tokens.tokens.accordionItemTextLineHeight, Accordion_tokens.tokens.accordionItemPaddingHorizontal, Accordion_tokens.tokens.accordionItemPaddingHorizontal);
|
42
|
+
var StyledArrow = /*#__PURE__*/styled(IconChevronDownFill.IconChevronDownFill).withConfig({
|
43
|
+
componentId: "plasma-new-hope__sc-iot32d-8"
|
44
|
+
})(["pointer-events:none;user-select:none;color:var(", ");"], Accordion_tokens.tokens.accordionItemTextColor);
|
45
|
+
var StyledMinus = /*#__PURE__*/styled(IconMinus.IconMinus).withConfig({
|
46
|
+
componentId: "plasma-new-hope__sc-iot32d-9"
|
47
|
+
})(["pointer-events:none;user-select:none;color:var(", ");display:flex;align-items:center;position:absolute;top:0;left:0;&.", "{transition:0.2s;transform:rotate(90deg);}&.", "{transition:0.2s;transform:rotate(0deg);}"], Accordion_tokens.tokens.accordionItemTextColor, Accordion_tokens.classes.accordionPlusAnimationElement, Accordion_tokens.classes.accordionItemShowBody);
|
48
|
+
var StyledPlus = /*#__PURE__*/styled.div.withConfig({
|
49
|
+
componentId: "plasma-new-hope__sc-iot32d-10"
|
50
|
+
})(["position:relative;height:1rem;display:flex;align-items:center;justify-content:center;width:1rem;"]);
|
51
|
+
|
52
|
+
exports.StyledAccordionBody = StyledAccordionBody;
|
53
|
+
exports.StyledAccordionBodyAnimate = StyledAccordionBodyAnimate;
|
54
|
+
exports.StyledAccordionContentLeft = StyledAccordionContentLeft;
|
55
|
+
exports.StyledAccordionContentRight = StyledAccordionContentRight;
|
56
|
+
exports.StyledAccordionHeader = StyledAccordionHeader;
|
57
|
+
exports.StyledAccordionHeaderLeft = StyledAccordionHeaderLeft;
|
58
|
+
exports.StyledAccordionItem = StyledAccordionItem;
|
59
|
+
exports.StyledAccordionTitle = StyledAccordionTitle;
|
60
|
+
exports.StyledArrow = StyledArrow;
|
61
|
+
exports.StyledMinus = StyledMinus;
|
62
|
+
exports.StyledPlus = StyledPlus;
|
63
|
+
//# sourceMappingURL=AccordionItem.styles.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"AccordionItem.styles.js","sources":["../../../../../src/components/Accordion/ui/AccordionItem/AccordionItem.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nimport { IconChevronDownFill, IconMinus } from '../../../_Icon';\nimport { classes, tokens } from '../../Accordion.tokens';\nimport { addFocus } from '../../../../mixins';\n\nexport const StyledAccordionItem = styled.div`\n background: var(${tokens.accordionItemBackground});\n border-bottom: var(${tokens.accordionItemBorderBottom});\n\n &:last-child {\n border-bottom: none;\n }\n`;\n\nexport const StyledAccordionHeader = styled.button`\n width: 100%;\n border: none;\n padding: var(${tokens.accordionItemPadding});\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n background: none;\n box-sizing: border-box;\n cursor: pointer;\n\n &.${classes.accordionDisabled} {\n opacity: 0.4;\n cursor: not-allowed;\n }\n\n &:focus {\n outline: none;\n }\n\n ${addFocus({\n outlineOffset: '0.125rem',\n outlineSize: '0.125rem',\n outlineRadius: '0',\n outlineColor: `var(${tokens.accordionItemFocus})`,\n })}\n`;\n\nexport const StyledAccordionHeaderLeft = styled.div`\n display: flex;\n gap: var(${tokens.accordionItemGap});\n justify-content: space-between;\n align-items: center;\n`;\n\nexport const StyledAccordionContentRight = styled.div`\n transition: 0.2s;\n transform: rotate(90deg);\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledAccordionContentLeft = styled.div`\n transition: 0.2s;\n display: flex;\n align-items: center;\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(180deg);\n }\n`;\n\nexport const StyledAccordionTitle = styled.div`\n color: var(${tokens.accordionItemTitleColor});\n font-family: var(${tokens.accordionItemTitleFontFamily});\n font-size: var(${tokens.accordionItemTitleFontSize});\n font-weight: var(${tokens.accordionItemTitleFontWeight});\n font-style: var(${tokens.accordionItemTitleFontStyle});\n letter-spacing: var(${tokens.accordionItemTitleLetterSpacing});\n line-height: var(${tokens.accordionItemTitleLineHeight});\n`;\n\nexport const StyledAccordionBodyAnimate = styled.div`\n display: grid;\n grid-template-rows: 0fr;\n transition: grid-template-rows 0.2s ease-out;\n overflow: hidden;\n\n &.${classes.accordionItemShowBody} {\n grid-template-rows: 1fr;\n padding-bottom: var(${tokens.accordionItemPaddingVertical});\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n }\n`;\n\nexport const StyledAccordionBody = styled.div`\n color: var(${tokens.accordionItemTextColor});\n font-family: var(${tokens.accordionItemTextFontFamily});\n font-size: var(${tokens.accordionItemTextFontSize});\n font-weight: var(${tokens.accordionItemTextFontWeight});\n font-style: var(${tokens.accordionItemTextFontStyle});\n letter-spacing: var(${tokens.accordionItemTextLetterSpacing});\n line-height: var(${tokens.accordionItemTextLineHeight});\n overflow: hidden;\n padding-right: var(${tokens.accordionItemPaddingHorizontal});\n padding-left: var(${tokens.accordionItemPaddingHorizontal});\n`;\n\nexport const StyledArrow = styled(IconChevronDownFill)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemTextColor});\n`;\n\nexport const StyledMinus = styled(IconMinus)`\n pointer-events: none;\n user-select: none;\n color: var(${tokens.accordionItemTextColor});\n display: flex;\n align-items: center;\n position: absolute;\n top: 0;\n left: 0;\n\n &.${classes.accordionPlusAnimationElement} {\n transition: 0.2s;\n transform: rotate(90deg);\n }\n\n &.${classes.accordionItemShowBody} {\n transition: 0.2s;\n transform: rotate(0deg);\n }\n`;\n\nexport const StyledPlus = styled.div`\n position: relative;\n height: 1rem;\n display: flex;\n align-items: center;\n justify-content: center;\n width: 1rem;\n`;\n"],"names":["StyledAccordionItem","styled","div","withConfig","componentId","tokens","accordionItemBackground","accordionItemBorderBottom","StyledAccordionHeader","button","accordionItemPadding","accordionItemGap","classes","accordionDisabled","addFocus","outlineOffset","outlineSize","outlineRadius","outlineColor","concat","accordionItemFocus","StyledAccordionHeaderLeft","StyledAccordionContentRight","accordionItemShowBody","StyledAccordionContentLeft","StyledAccordionTitle","accordionItemTitleColor","accordionItemTitleFontFamily","accordionItemTitleFontSize","accordionItemTitleFontWeight","accordionItemTitleFontStyle","accordionItemTitleLetterSpacing","accordionItemTitleLineHeight","StyledAccordionBodyAnimate","accordionItemPaddingVertical","accordionPlusAnimationElement","StyledAccordionBody","accordionItemTextColor","accordionItemTextFontFamily","accordionItemTextFontSize","accordionItemTextFontWeight","accordionItemTextFontStyle","accordionItemTextLetterSpacing","accordionItemTextLineHeight","accordionItemPaddingHorizontal","StyledArrow","IconChevronDownFill","StyledMinus","IconMinus","StyledPlus"],"mappings":";;;;;;;;;;;;IAMaA,mBAAmB,gBAAGC,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAAA,CAAA,CAAA,CAAA,iBAAA,EAAA,sBAAA,EAAA,qCAAA,CAAA,EACvBC,uBAAM,CAACC,uBAAuB,EAC3BD,uBAAM,CAACE,yBAAyB,EAKxD;IAEYC,qBAAqB,gBAAGP,MAAM,CAACQ,MAAM,CAAAN,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAAA,CAAA,CAAA,CAAA,qCAAA,EAAA,yBAAA,EAAA,4GAAA,EAAA,yDAAA,EAAA,EAAA,CAAA,EAG/BC,uBAAM,CAACK,oBAAoB,EAE/BL,uBAAM,CAACM,gBAAgB,EAO9BC,wBAAO,CAACC,iBAAiB,eAS3BC,iBAAQ,CAAC;AACPC,EAAAA,aAAa,EAAE,UAAU;AACzBC,EAAAA,WAAW,EAAE,UAAU;AACvBC,EAAAA,aAAa,EAAE,GAAG;AAClBC,EAAAA,YAAY,eAAAC,MAAAA,CAAAA,MAAA,CAASd,uBAAM,CAACe,kBAAkB,EAAA,GAAA,CAAA;AAClD,CAAC,CAAC,EACL;IAEYC,yBAAyB,gBAAGpB,MAAM,CAACC,GAAG,CAAAC,UAAA,CAAA;EAAAC,WAAA,EAAA,8BAAA;AAAA,CAEpCC,CAAAA,CAAAA,CAAAA,uBAAAA,EAAA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
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
4
|
+
|
5
|
+
var React = require('react');
|
6
|
+
|
7
|
+
var updatePropsRecursively = function updatePropsRecursively(children, activeIndex, disabled, updateValue) {
|
8
|
+
return React.Children.map(children || [], function (child, index) {
|
9
|
+
if (! /*#__PURE__*/React.isValidElement(child)) {
|
10
|
+
return child;
|
11
|
+
}
|
12
|
+
var props = {
|
13
|
+
index: index,
|
14
|
+
value: !!((activeIndex === null || activeIndex === void 0 ? void 0 : activeIndex.findIndex(function (i) {
|
15
|
+
var _child$props$eventKey;
|
16
|
+
return i === ((_child$props$eventKey = child.props.eventKey) !== null && _child$props$eventKey !== void 0 ? _child$props$eventKey : index);
|
17
|
+
})) !== -1),
|
18
|
+
disabled: disabled,
|
19
|
+
onChange: updateValue
|
20
|
+
};
|
21
|
+
return /*#__PURE__*/React.cloneElement(child, props);
|
22
|
+
});
|
23
|
+
};
|
24
|
+
var getChildren = function getChildren(children, activeIndex, disabled, updateValue) {
|
25
|
+
return updatePropsRecursively(children, activeIndex, disabled, updateValue);
|
26
|
+
};
|
27
|
+
|
28
|
+
exports.getChildren = getChildren;
|
29
|
+
exports.updatePropsRecursively = updatePropsRecursively;
|
30
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/components/Accordion/utils/index.ts"],"sourcesContent":["import { Children, ReactElement, ReactNode, cloneElement, isValidElement } from 'react';\n\nimport { AccordionItemProps } from '../ui/AccordionItem/AccordionItem.types';\n\nexport const updatePropsRecursively = (\n children?: ReactElement<AccordionItemProps>[],\n activeIndex?: number[],\n disabled?: boolean,\n updateValue?: (index: number, value?: boolean) => void,\n): ReactNode[] =>\n Children.map(children || [], (child, index) => {\n if (!isValidElement(child)) {\n return child;\n }\n\n const props = {\n index,\n value: !!(activeIndex?.findIndex((i: number) => i === (child.props.eventKey ?? index)) !== -1),\n disabled,\n onChange: updateValue,\n };\n\n return cloneElement(child, props);\n });\n\nexport const getChildren = (\n children: ReactElement<AccordionItemProps>[],\n activeIndex?: number[],\n disabled?: boolean,\n updateValue?: (index: number, value?: boolean) => void,\n) => {\n return updatePropsRecursively(children, activeIndex, disabled, updateValue);\n};\n"],"names":["updatePropsRecursively","children","activeIndex","disabled","updateValue","Children","map","child","index","isValidElement","props","value","findIndex","i","_child$props$eventKey","eventKey","onChange","cloneElement","getChildren"],"mappings":";;;;;;AAIaA,IAAAA,sBAAsB,GAAG,SAAzBA,sBAAsBA,CAC/BC,QAA6C,EAC7CC,WAAsB,EACtBC,QAAkB,EAClBC,WAAsD,EAAA;AAAA,EAAA,OAEtDC,cAAQ,CAACC,GAAG,CAACL,QAAQ,IAAI,EAAE,EAAE,UAACM,KAAK,EAAEC,KAAK,EAAK;AAC3C,IAAA,IAAI,eAACC,oBAAc,CAACF,KAAK,CAAC,EAAE;AACxB,MAAA,OAAOA,KAAK,CAAA;AAChB,KAAA;AAEA,IAAA,IAAMG,KAAK,GAAG;AACVF,MAAAA,KAAK,EAALA,KAAK;AACLG,MAAAA,KAAK,EAAE,CAAC,EAAE,CAAAT,WAAW,KAAA,IAAA,IAAXA,WAAW,KAAA,KAAA,CAAA,GAAA,KAAA,CAAA,GAAXA,WAAW,CAAEU,SAAS,CAAC,UAACC,CAAS,EAAA;AAAA,QAAA,IAAAC,qBAAA,CAAA;AAAA,QAAA,OAAKD,CAAC,MAAA,CAAAC,qBAAA,GAAMP,KAAK,CAACG,KAAK,CAACK,QAAQ,cAAAD,qBAAA,KAAA,KAAA,CAAA,GAAAA,qBAAA,GAAIN,KAAK,CAAC,CAAA;OAAC,CAAA,MAAK,CAAC,CAAC,CAAC;AAC9FL,MAAAA,QAAQ,EAARA,QAAQ;AACRa,MAAAA,QAAQ,EAAEZ,WAAAA;KACb,CAAA;AAED,IAAA,oBAAOa,kBAAY,CAACV,KAAK,EAAEG,KAAK,CAAC,CAAA;AACrC,GAAC,CAAC,CAAA;AAAA,EAAA;AAEOQ,IAAAA,WAAW,GAAG,SAAdA,WAAWA,CACpBjB,QAA4C,EAC5CC,WAAsB,EACtBC,QAAkB,EAClBC,WAAsD,EACrD;EACD,OAAOJ,sBAAsB,CAACC,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,EAAEC,WAAW,CAAC,CAAA;AAC/E;;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Accordion/variations/_size/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"base.js","sources":["../../../../../src/components/Accordion/variations/_view/base.ts"],"sourcesContent":["import { css } from '@linaria/core';\n\nexport const base = css``;\n"],"names":["base"],"mappings":";;;;AAEO,IAAMA,IAAI,GAAQ;;;;"}
|
@@ -0,0 +1 @@
|
|
1
|
+
|
@@ -18,13 +18,13 @@
|
|
18
18
|
|
19
19
|
.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_iq39zt5__3851a304{color:var(--plasma-textfield-color-readonly);background-color:var(--plasma-textfield-bg-color-readonly);box-shadow:inset 0 0 0 var(--plasmas-textfield-border-width) var(--plasma-textfield-border-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_iq39zt5__3851a304:hover{background-color:var(--plasma-textfield-bg-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::-webkit-input-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::-moz-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304:-ms-input-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304{color:var(--plasma-textfield-color-readonly);cursor:default;min-width:unset;}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_llv9av6__3851a304{color:var(--plasma-textfield__left-helper-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_l13qvwoy__3851a304{color:var(--plasma-textfield__label-color-readonly);}
|
20
20
|
|
21
|
-
.
|
22
|
-
.
|
23
|
-
.
|
24
|
-
.
|
21
|
+
.TextField_styles_aqmut_iq39zt5__4a8fddcd{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;}
|
22
|
+
.TextField_styles_aqmut_i1j28rg8__4a8fddcd{-webkit-flex:1;-ms-flex:1;flex:1;overflow:scroll;position:relative;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.TextField_styles_aqmut_i1j28rg8__4a8fddcd::-webkit-scrollbar{display:none;}.TextField_styles_aqmut_i1j28rg8__4a8fddcd.TextField_styles_aqmut_hasChips__4a8fddcd{height:var(--plasma-textfield__chip-height);border-radius:var(--plasma-textfield__chip-border-radius);}
|
23
|
+
.TextField_styles_aqmut_s13zudoe__4a8fddcd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-textfield__chip-gap);margin-right:var(--plasma-textfield__chip-gap);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
24
|
+
.TextField_styles_aqmut_io4bpie__4a8fddcd{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;-webkit-flex:1;-ms-flex:1;flex:1;min-width:60%;}
|
25
25
|
|
26
|
-
.
|
27
|
-
.
|
26
|
+
.TextField_styles_aqmut_s19ry60d__4a8fddcd{margin:var(--plasma-textfield__left-content-margin);}
|
27
|
+
.TextField_styles_aqmut_sbt1ohz__4a8fddcd{margin:var(--plasma-textfield__right-content-margin);}
|
28
28
|
|
29
29
|
|
30
30
|
|
@@ -27,13 +27,13 @@
|
|
27
27
|
|
28
28
|
.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_iq39zt5__3851a304{color:var(--plasma-textfield-color-readonly);background-color:var(--plasma-textfield-bg-color-readonly);box-shadow:inset 0 0 0 var(--plasmas-textfield-border-width) var(--plasma-textfield-border-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_iq39zt5__3851a304:hover{background-color:var(--plasma-textfield-bg-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::-webkit-input-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::-moz-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304:-ms-input-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304{color:var(--plasma-textfield-color-readonly);cursor:default;min-width:unset;}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_llv9av6__3851a304{color:var(--plasma-textfield__left-helper-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_l13qvwoy__3851a304{color:var(--plasma-textfield__label-color-readonly);}
|
29
29
|
|
30
|
-
.
|
31
|
-
.
|
32
|
-
.
|
33
|
-
.
|
30
|
+
.TextField_styles_aqmut_iq39zt5__4a8fddcd{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;}
|
31
|
+
.TextField_styles_aqmut_i1j28rg8__4a8fddcd{-webkit-flex:1;-ms-flex:1;flex:1;overflow:scroll;position:relative;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.TextField_styles_aqmut_i1j28rg8__4a8fddcd::-webkit-scrollbar{display:none;}.TextField_styles_aqmut_i1j28rg8__4a8fddcd.TextField_styles_aqmut_hasChips__4a8fddcd{height:var(--plasma-textfield__chip-height);border-radius:var(--plasma-textfield__chip-border-radius);}
|
32
|
+
.TextField_styles_aqmut_s13zudoe__4a8fddcd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-textfield__chip-gap);margin-right:var(--plasma-textfield__chip-gap);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
33
|
+
.TextField_styles_aqmut_io4bpie__4a8fddcd{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;-webkit-flex:1;-ms-flex:1;flex:1;min-width:60%;}
|
34
34
|
|
35
|
-
.
|
36
|
-
.
|
35
|
+
.TextField_styles_aqmut_s19ry60d__4a8fddcd{margin:var(--plasma-textfield__left-content-margin);}
|
36
|
+
.TextField_styles_aqmut_sbt1ohz__4a8fddcd{margin:var(--plasma-textfield__right-content-margin);}
|
37
37
|
|
38
38
|
|
39
39
|
|
@@ -20,13 +20,13 @@
|
|
20
20
|
|
21
21
|
.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_iq39zt5__3851a304{color:var(--plasma-textfield-color-readonly);background-color:var(--plasma-textfield-bg-color-readonly);box-shadow:inset 0 0 0 var(--plasmas-textfield-border-width) var(--plasma-textfield-border-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_iq39zt5__3851a304:hover{background-color:var(--plasma-textfield-bg-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::-webkit-input-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::-moz-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304:-ms-input-placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304::placeholder{color:var(--plasma-textfield__placeholder-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_io4bpie__3851a304{color:var(--plasma-textfield-color-readonly);cursor:default;min-width:unset;}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_llv9av6__3851a304{color:var(--plasma-textfield__left-helper-color-readonly);}.base_134hshp_b1w985rt__3851a304[readonly] .base_134hshp_l13qvwoy__3851a304{color:var(--plasma-textfield__label-color-readonly);}
|
22
22
|
|
23
|
-
.
|
24
|
-
.
|
25
|
-
.
|
26
|
-
.
|
23
|
+
.TextField_styles_aqmut_iq39zt5__4a8fddcd{position:relative;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;box-sizing:border-box;}
|
24
|
+
.TextField_styles_aqmut_i1j28rg8__4a8fddcd{-webkit-flex:1;-ms-flex:1;flex:1;overflow:scroll;position:relative;width:100%;display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-scrollbar-width:none;-moz-scrollbar-width:none;-ms-scrollbar-width:none;scrollbar-width:none;overscroll-behavior:contain;}.TextField_styles_aqmut_i1j28rg8__4a8fddcd::-webkit-scrollbar{display:none;}.TextField_styles_aqmut_i1j28rg8__4a8fddcd.TextField_styles_aqmut_hasChips__4a8fddcd{height:var(--plasma-textfield__chip-height);border-radius:var(--plasma-textfield__chip-border-radius);}
|
25
|
+
.TextField_styles_aqmut_s13zudoe__4a8fddcd{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-textfield__chip-gap);margin-right:var(--plasma-textfield__chip-gap);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
26
|
+
.TextField_styles_aqmut_io4bpie__4a8fddcd{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;-webkit-flex:1;-ms-flex:1;flex:1;min-width:60%;}
|
27
27
|
|
28
|
-
.
|
29
|
-
.
|
28
|
+
.TextField_styles_aqmut_s19ry60d__4a8fddcd{margin:var(--plasma-textfield__left-content-margin);}
|
29
|
+
.TextField_styles_aqmut_sbt1ohz__4a8fddcd{margin:var(--plasma-textfield__right-content-margin);}
|
30
30
|
|
31
31
|
|
32
32
|
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"TextField.styles.js","sources":["../../../src/components/TextField/TextField.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from './TextField.tokens';\n\nexport const InputWrapper = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n`;\n\nexport const InputLabelWrapper = styled.div`\n flex: 1;\n overflow: scroll;\n position: relative;\n width: 100%;\n display: inline-flex;\n align-items: center;\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n scrollbar-width: none;\n\n overscroll-behavior: contain;\n\n &.${String(classes.hasChips)} {\n height: var(${tokens.chipHeight});\n border-radius: var(${tokens.chipBorderRadius});\n }\n`;\n\nexport const StyledChips = styled.div`\n display: flex;\n gap: var(${tokens.chipGap});\n margin-right: var(${tokens.chipGap});\n user-select: none;\n`;\n\nexport const Input = styled.input`\n box-sizing: border-box;\n appearance: none;\n border: 0;\n padding: 0;\n background-color: transparent;\n outline: none;\n flex: 1;\n min-width: 60%;\n`;\n\nexport const Label = styled.label``;\n\nexport const StyledContentLeft = styled.div`\n margin: var(${tokens.leftContentMargin});\n
|
1
|
+
{"version":3,"file":"TextField.styles.js","sources":["../../../src/components/TextField/TextField.styles.ts"],"sourcesContent":["import { styled } from '@linaria/react';\n\nimport { classes, tokens } from './TextField.tokens';\n\nexport const InputWrapper = styled.div`\n position: relative;\n display: flex;\n align-items: center;\n box-sizing: border-box;\n`;\n\nexport const InputLabelWrapper = styled.div`\n flex: 1;\n overflow: scroll;\n position: relative;\n width: 100%;\n display: inline-flex;\n align-items: center;\n\n ::-webkit-scrollbar {\n display: none;\n }\n\n scrollbar-width: none;\n\n overscroll-behavior: contain;\n\n &.${String(classes.hasChips)} {\n height: var(${tokens.chipHeight});\n border-radius: var(${tokens.chipBorderRadius});\n }\n`;\n\nexport const StyledChips = styled.div`\n display: flex;\n gap: var(${tokens.chipGap});\n margin-right: var(${tokens.chipGap});\n user-select: none;\n`;\n\nexport const Input = styled.input`\n box-sizing: border-box;\n appearance: none;\n border: 0;\n padding: 0;\n background-color: transparent;\n outline: none;\n flex: 1;\n min-width: 60%;\n`;\n\nexport const Label = styled.label``;\n\nexport const StyledContentLeft = styled.div`\n margin: var(${tokens.leftContentMargin});\n`;\n\nexport const StyledContentRight = styled.div`\n margin: var(${tokens.rightContentMargin});\n`;\n\nexport const LeftHelper = styled.div``;\n\nexport const StyledTextBefore = styled.div``;\n\nexport const StyledTextAfter = styled.div``;\n"],"names":["InputWrapper","styled","name","class","propsAsIs","InputLabelWrapper","StyledChips","Input","Label","StyledContentLeft","StyledContentRight","LeftHelper","St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,EAAAA,SAAA,EAAA,KAAA;AAAA,CAEvC,EAAA;AAEM,IAAMO,UAAU,gBAAGV,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,YAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM,EAAA;AAE/B,IAAMQ,gBAAgB,gBAAGX,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,kBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM,EAAA;AAErC,IAAMS,eAAe,gBAAGZ,YAAM,CAAA,KAAA,CAAA,CAAA;AAAAC,EAAAA,IAAA,EAAA,iBAAA;AAAAC,EAAAA,OAAAA,EAAA,SAAA;AAAAC,EAAAA,SAAA,EAAA,KAAA;AAAA,CAAM;;;;;;;;;;;;;"}
|
@@ -3,8 +3,8 @@
|
|
3
3
|
.s13zudoe{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--plasma-textfield__chip-gap);margin-right:var(--plasma-textfield__chip-gap);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}
|
4
4
|
.io4bpie{box-sizing:border-box;-webkit-appearance:none;-moz-appearance:none;appearance:none;border:0;padding:0;background-color:transparent;outline:none;-webkit-flex:1;-ms-flex:1;flex:1;min-width:60%;}
|
5
5
|
|
6
|
-
.s19ry60d{margin:var(--plasma-textfield__left-content-margin);
|
7
|
-
.sbt1ohz{margin:var(--plasma-textfield__right-content-margin);
|
6
|
+
.s19ry60d{margin:var(--plasma-textfield__left-content-margin);}
|
7
|
+
.sbt1ohz{margin:var(--plasma-textfield__right-content-margin);}
|
8
8
|
|
9
9
|
|
10
10
|
|