@alfalab/core-components-bottom-sheet 8.0.1 → 8.0.2
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/footer/default.css +2 -2
- package/components/footer/default.module.css.js +1 -1
- package/components/footer/index.css +2 -2
- package/components/footer/index.module.css.js +1 -1
- package/components/footer/inverted.css +2 -2
- package/components/footer/inverted.module.css.js +1 -1
- package/components/header/Component.js +3 -3
- package/components/header/Component.js.map +1 -1
- package/components/header/default.css +4 -4
- package/components/header/default.module.css.js +1 -1
- package/components/header/index.css +13 -13
- package/components/header/index.module.css.js +1 -1
- package/components/header/inverted.css +4 -4
- package/components/header/inverted.module.css.js +1 -1
- package/cssm/components/header/Component.js +3 -3
- package/cssm/components/header/Component.js.map +1 -1
- package/default.css +4 -4
- package/default.module.css.js +1 -1
- package/esm/components/footer/default.css +2 -2
- package/esm/components/footer/default.module.css.js +1 -1
- package/esm/components/footer/index.css +2 -2
- package/esm/components/footer/index.module.css.js +1 -1
- package/esm/components/footer/inverted.css +2 -2
- package/esm/components/footer/inverted.module.css.js +1 -1
- package/esm/components/header/Component.js +3 -3
- package/esm/components/header/Component.js.map +1 -1
- package/esm/components/header/default.css +4 -4
- package/esm/components/header/default.module.css.js +1 -1
- package/esm/components/header/index.css +13 -13
- package/esm/components/header/index.module.css.js +1 -1
- package/esm/components/header/inverted.css +4 -4
- package/esm/components/header/inverted.module.css.js +1 -1
- package/esm/default.css +4 -4
- package/esm/default.module.css.js +1 -1
- package/esm/index.css +45 -45
- package/esm/index.module.css.js +1 -1
- package/esm/inverted.css +4 -4
- package/esm/inverted.module.css.js +1 -1
- package/index.css +45 -45
- package/index.module.css.js +1 -1
- package/inverted.css +4 -4
- package/inverted.module.css.js +1 -1
- package/modern/components/footer/default.css +2 -2
- package/modern/components/footer/default.module.css.js +1 -1
- package/modern/components/footer/index.css +2 -2
- package/modern/components/footer/index.module.css.js +1 -1
- package/modern/components/footer/inverted.css +2 -2
- package/modern/components/footer/inverted.module.css.js +1 -1
- package/modern/components/header/Component.js +3 -3
- package/modern/components/header/Component.js.map +1 -1
- package/modern/components/header/default.css +4 -4
- package/modern/components/header/default.module.css.js +1 -1
- package/modern/components/header/index.css +13 -13
- package/modern/components/header/index.module.css.js +1 -1
- package/modern/components/header/inverted.css +4 -4
- package/modern/components/header/inverted.module.css.js +1 -1
- package/modern/default.css +4 -4
- package/modern/default.module.css.js +1 -1
- package/modern/index.css +45 -45
- package/modern/index.module.css.js +1 -1
- package/modern/inverted.css +4 -4
- package/modern/inverted.module.css.js +1 -1
- package/moderncssm/components/header/Component.js +3 -3
- package/moderncssm/components/header/Component.js.map +1 -1
- package/package.json +1 -1
- package/src/components/header/Component.tsx +3 -1
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
--bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
|
|
9
9
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
|
|
10
10
|
}
|
|
11
|
-
.bottom-
|
|
11
|
+
.bottom-sheet__highlighted_1gfc7 {
|
|
12
12
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
13
13
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__hasContent_1gfc7 {
|
|
16
16
|
color: var(--bottom-sheet-text-color);
|
|
17
17
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./default.css');
|
|
4
4
|
|
|
5
|
-
var defaultColors = {"highlighted":"bottom-
|
|
5
|
+
var defaultColors = {"highlighted":"bottom-sheet__highlighted_1gfc7","hasContent":"bottom-sheet__hasContent_1gfc7"};
|
|
6
6
|
|
|
7
7
|
module.exports = defaultColors;
|
|
8
8
|
//# sourceMappingURL=default.module.css.js.map
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
--gap-0: 0px;
|
|
4
4
|
--gap-16: var(--gap-m);
|
|
5
5
|
}
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__footer_1wb4l {
|
|
7
7
|
padding: var(--gap-16) var(--gap-16);
|
|
8
8
|
}
|
|
9
|
-
.bottom-
|
|
9
|
+
.bottom-sheet__sticky_1wb4l {
|
|
10
10
|
position: sticky;
|
|
11
11
|
bottom: var(--gap-0);
|
|
12
12
|
z-index: 1;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"footer":"bottom-
|
|
5
|
+
var styles = {"footer":"bottom-sheet__footer_1wb4l","sticky":"bottom-sheet__sticky_1wb4l"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
--bottom-sheet-footer-background-color-inverted: var(--color-light-modal-bg-primary-inverted);
|
|
9
9
|
--bottom-sheet-footer-border-top-inverted: 1px solid var(--color-light-neutral-300-inverted);
|
|
10
10
|
}
|
|
11
|
-
.bottom-
|
|
11
|
+
.bottom-sheet__highlighted_vhp47 {
|
|
12
12
|
background-color: var(--bottom-sheet-footer-background-color-inverted);
|
|
13
13
|
border-top: var(--bottom-sheet-footer-border-top-inverted);
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__hasContent_vhp47 {
|
|
16
16
|
color: var(--bottom-sheet-text-color-inverted);
|
|
17
17
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./inverted.css');
|
|
4
4
|
|
|
5
|
-
var invertedColors = {"highlighted":"bottom-
|
|
5
|
+
var invertedColors = {"highlighted":"bottom-sheet__highlighted_vhp47","hasContent":"bottom-sheet__hasContent_vhp47"};
|
|
6
6
|
|
|
7
7
|
module.exports = invertedColors;
|
|
8
8
|
//# sourceMappingURL=inverted.module.css.js.map
|
|
@@ -22,7 +22,7 @@ var colorStyles = {
|
|
|
22
22
|
};
|
|
23
23
|
var Header = function (_a) {
|
|
24
24
|
var _b;
|
|
25
|
-
var className = _a.className, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, sticky = _a.sticky, headerRef = _a.headerRef, headerOffset = _a.headerOffset, showSwipeMarker = _a.showSwipeMarker, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, restProps = tslib.__rest(_a, ["className", "colors", "sticky", "headerRef", "headerOffset", "showSwipeMarker", "title", "children", "contentClassName"]);
|
|
25
|
+
var className = _a.className, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, sticky = _a.sticky, headerRef = _a.headerRef, headerOffset = _a.headerOffset, showSwipeMarker = _a.showSwipeMarker, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, bottomAddons = _a.bottomAddons, restProps = tslib.__rest(_a, ["className", "colors", "sticky", "headerRef", "headerOffset", "showSwipeMarker", "title", "children", "contentClassName", "bottomAddons"]);
|
|
26
26
|
var _d = React.useContext(coreComponentsBaseModal.BaseModalContext), setHeaderOffset = _d.setHeaderOffset, setHasHeader = _d.setHasHeader, headerHighlighted = _d.headerHighlighted, onClose = _d.onClose;
|
|
27
27
|
React.useEffect(function () {
|
|
28
28
|
setHeaderOffset(headerOffset);
|
|
@@ -31,8 +31,8 @@ var Header = function (_a) {
|
|
|
31
31
|
setHasHeader(true);
|
|
32
32
|
}, [setHasHeader]);
|
|
33
33
|
var colorStyle = colorStyles[colors];
|
|
34
|
-
var hasContent = Boolean(title || children);
|
|
35
|
-
return (React__default.default.createElement(coreComponentsNavigationBarPrivate.NavigationBarPrivate, tslib.__assign({}, restProps, { ref: headerRef, title: title, onClose: onClose, sticky: sticky, view: 'mobile', className: cn__default.default(className, (_b = {},
|
|
34
|
+
var hasContent = Boolean(title || children || bottomAddons);
|
|
35
|
+
return (React__default.default.createElement(coreComponentsNavigationBarPrivate.NavigationBarPrivate, tslib.__assign({}, restProps, { ref: headerRef, title: title, bottomAddons: bottomAddons, onClose: onClose, sticky: sticky, view: 'mobile', className: cn__default.default(className, (_b = {},
|
|
36
36
|
_b[index_module.headerWrapper] = showSwipeMarker,
|
|
37
37
|
_b[index_module.headerWrapperWithoutSwipeMarker] = !showSwipeMarker,
|
|
38
38
|
_b[colorStyle.highlighted] = hasContent && headerHighlighted && sticky,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../src/components/header/Component.tsx"],"sourcesContent":["import React, { type FC, type RefObject, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModalContext } from '@alfalab/core-components-base-modal';\nimport {\n NavigationBarPrivate,\n type NavigationBarPrivateProps,\n} from '@alfalab/core-components-navigation-bar-private';\n\nimport { type ColorType } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type HeaderProps = Omit<NavigationBarPrivateProps, 'view' | 'size'> & {\n headerRef: RefObject<HTMLDivElement>;\n headerOffset: number;\n colors?: ColorType;\n showSwipeMarker?: boolean;\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n} as const;\n\nexport const Header: FC<HeaderProps> = ({\n className,\n colors = 'default',\n sticky,\n headerRef,\n headerOffset,\n showSwipeMarker,\n title,\n children,\n contentClassName,\n ...restProps\n}) => {\n const { setHeaderOffset, setHasHeader, headerHighlighted, onClose } =\n useContext(BaseModalContext);\n\n useEffect(() => {\n setHeaderOffset(headerOffset);\n }, [headerOffset, setHeaderOffset]);\n\n useEffect(() => {\n setHasHeader(true);\n }, [setHasHeader]);\n\n const colorStyle = colorStyles[colors];\n const hasContent = Boolean(title || children);\n\n return (\n <NavigationBarPrivate\n {...restProps}\n ref={headerRef}\n title={title}\n onClose={onClose}\n sticky={sticky}\n view='mobile'\n className={cn(className, {\n [styles.headerWrapper]: showSwipeMarker,\n [styles.headerWrapperWithoutSwipeMarker]: !showSwipeMarker,\n [colorStyle.highlighted]: hasContent && headerHighlighted && sticky,\n [colorStyle.hasContent]: hasContent,\n [styles.sticky]: sticky,\n })}\n contentClassName={cn(styles.title, contentClassName)}\n titleClassName={cn(colorStyle.title)}\n subtitleClassName={cn(styles.subtitle, colorStyle.subtitle)}\n colors={colors}\n >\n {children}\n </NavigationBarPrivate>\n );\n};\n"],"names":["defaultColors","invertedColors","__rest","useContext","BaseModalContext","useEffect","React","NavigationBarPrivate","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAEA,cAAa;AACtB,IAAA,QAAQ,EAAEC,eAAc;CAClB;AAEH,IAAM,MAAM,GAAoB,UAAC,
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../src/components/header/Component.tsx"],"sourcesContent":["import React, { type FC, type RefObject, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModalContext } from '@alfalab/core-components-base-modal';\nimport {\n NavigationBarPrivate,\n type NavigationBarPrivateProps,\n} from '@alfalab/core-components-navigation-bar-private';\n\nimport { type ColorType } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type HeaderProps = Omit<NavigationBarPrivateProps, 'view' | 'size'> & {\n headerRef: RefObject<HTMLDivElement>;\n headerOffset: number;\n colors?: ColorType;\n showSwipeMarker?: boolean;\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n} as const;\n\nexport const Header: FC<HeaderProps> = ({\n className,\n colors = 'default',\n sticky,\n headerRef,\n headerOffset,\n showSwipeMarker,\n title,\n children,\n contentClassName,\n bottomAddons,\n ...restProps\n}) => {\n const { setHeaderOffset, setHasHeader, headerHighlighted, onClose } =\n useContext(BaseModalContext);\n\n useEffect(() => {\n setHeaderOffset(headerOffset);\n }, [headerOffset, setHeaderOffset]);\n\n useEffect(() => {\n setHasHeader(true);\n }, [setHasHeader]);\n\n const colorStyle = colorStyles[colors];\n const hasContent = Boolean(title || children || bottomAddons);\n\n return (\n <NavigationBarPrivate\n {...restProps}\n ref={headerRef}\n title={title}\n bottomAddons={bottomAddons}\n onClose={onClose}\n sticky={sticky}\n view='mobile'\n className={cn(className, {\n [styles.headerWrapper]: showSwipeMarker,\n [styles.headerWrapperWithoutSwipeMarker]: !showSwipeMarker,\n [colorStyle.highlighted]: hasContent && headerHighlighted && sticky,\n [colorStyle.hasContent]: hasContent,\n [styles.sticky]: sticky,\n })}\n contentClassName={cn(styles.title, contentClassName)}\n titleClassName={cn(colorStyle.title)}\n subtitleClassName={cn(styles.subtitle, colorStyle.subtitle)}\n colors={colors}\n >\n {children}\n </NavigationBarPrivate>\n );\n};\n"],"names":["defaultColors","invertedColors","__rest","useContext","BaseModalContext","useEffect","React","NavigationBarPrivate","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;AAsBA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAEA,cAAa;AACtB,IAAA,QAAQ,EAAEC,eAAc;CAClB;AAEH,IAAM,MAAM,GAAoB,UAAC,EAYvC,EAAA;;AAXG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,EAAkB,GAAA,EAAA,CAAA,MAAA,EAAlB,MAAM,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAClB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,GAAA,EAAA,CAAA,YAAA,EACZ,eAAe,qBAAA,EACf,KAAK,GAAA,EAAA,CAAA,KAAA,EACL,QAAQ,GAAA,EAAA,CAAA,QAAA,EACR,gBAAgB,GAAA,EAAA,CAAA,gBAAA,EAChB,YAAY,GAAA,EAAA,CAAA,YAAA,EACT,SAAS,GAAAC,YAAA,CAAA,EAAA,EAXwB,0IAYvC,CADe;AAEN,IAAA,IAAA,KACFC,gBAAU,CAACC,wCAAgB,CAAC,EADxB,eAAe,GAAA,EAAA,CAAA,eAAA,EAAE,YAAY,kBAAA,EAAE,iBAAiB,uBAAA,E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C3D,MAAM,EAAE,MAAM,KAEb,QAAQ,CACU;AAE/B;;;;"}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
--bottom-sheet-header-border-bottom: 1px solid var(--color-light-neutral-300);
|
|
7
7
|
--bottom-sheet-text-color: var(--color-light-text-primary);
|
|
8
8
|
}
|
|
9
|
-
.bottom-
|
|
9
|
+
.bottom-sheet__title_1ucm9 {
|
|
10
10
|
color: var(--bottom-sheet-text-color);
|
|
11
11
|
}
|
|
12
|
-
.bottom-
|
|
12
|
+
.bottom-sheet__hasContent_1ucm9 {
|
|
13
13
|
background-color: inherit;
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__subtitle_1ucm9.bottom-sheet__subtitle_1ucm9 {
|
|
16
16
|
color: var(--bottom-sheet-text-color);
|
|
17
17
|
}
|
|
18
|
-
.bottom-
|
|
18
|
+
.bottom-sheet__highlighted_1ucm9 {
|
|
19
19
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./default.css');
|
|
4
4
|
|
|
5
|
-
var defaultColors = {"title":"bottom-
|
|
5
|
+
var defaultColors = {"title":"bottom-sheet__title_1ucm9","hasContent":"bottom-sheet__hasContent_1ucm9","subtitle":"bottom-sheet__subtitle_1ucm9","highlighted":"bottom-sheet__highlighted_1ucm9"};
|
|
6
6
|
|
|
7
7
|
module.exports = defaultColors;
|
|
8
8
|
//# sourceMappingURL=default.module.css.js.map
|
|
@@ -12,38 +12,38 @@
|
|
|
12
12
|
--font-family-system:
|
|
13
13
|
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__headerBase_nzj4a {
|
|
16
16
|
border-top-left-radius: inherit;
|
|
17
17
|
border-top-right-radius: inherit;
|
|
18
18
|
z-index: 1;
|
|
19
19
|
}
|
|
20
|
-
.bottom-
|
|
20
|
+
.bottom-sheet__headerWrapper_nzj4a {
|
|
21
21
|
padding: var(--gap-12) var(--gap-8) var(--gap-4);
|
|
22
22
|
}
|
|
23
|
-
.bottom-
|
|
23
|
+
.bottom-sheet__headerWrapperWithoutSwipeMarker_nzj4a {
|
|
24
24
|
padding: var(--gap-8) var(--gap-8) var(--gap-4);
|
|
25
25
|
}
|
|
26
|
-
.bottom-
|
|
26
|
+
.bottom-sheet__header_nzj4a {
|
|
27
27
|
display: flex;
|
|
28
28
|
}
|
|
29
|
-
.bottom-
|
|
29
|
+
.bottom-sheet__sticky_nzj4a {
|
|
30
30
|
position: sticky;
|
|
31
31
|
top: var(--gap-0);
|
|
32
32
|
}
|
|
33
|
-
.bottom-
|
|
33
|
+
.bottom-sheet__justifyEnd_nzj4a {
|
|
34
34
|
justify-content: flex-end;
|
|
35
35
|
}
|
|
36
|
-
.bottom-
|
|
36
|
+
.bottom-sheet__addon_nzj4a {
|
|
37
37
|
display: flex;
|
|
38
38
|
justify-content: center;
|
|
39
39
|
align-items: center;
|
|
40
40
|
min-width: 48px;
|
|
41
41
|
height: 48px;
|
|
42
42
|
}
|
|
43
|
-
.bottom-
|
|
43
|
+
.bottom-sheet__addonFixed_nzj4a {
|
|
44
44
|
position: fixed;
|
|
45
45
|
}
|
|
46
|
-
.bottom-
|
|
46
|
+
.bottom-sheet__title_nzj4a {
|
|
47
47
|
padding: var(--gap-10) var(--gap-8);
|
|
48
48
|
width: 100%;
|
|
49
49
|
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
|
|
56
56
|
font-family: var(--font-family-system);
|
|
57
57
|
}
|
|
58
|
-
.bottom-
|
|
58
|
+
.bottom-sheet__titleCenter_nzj4a {
|
|
59
59
|
text-align: center;
|
|
60
60
|
}
|
|
61
|
-
.bottom-
|
|
61
|
+
.bottom-sheet__titleLeft_nzj4a {
|
|
62
62
|
text-align: left;
|
|
63
63
|
}
|
|
64
|
-
.bottom-
|
|
64
|
+
.bottom-sheet__trimTitle_nzj4a {
|
|
65
65
|
white-space: nowrap;
|
|
66
66
|
overflow: hidden;
|
|
67
67
|
text-overflow: ellipsis;
|
|
68
68
|
}
|
|
69
|
-
.bottom-
|
|
69
|
+
.bottom-sheet__subtitle_nzj4a {
|
|
70
70
|
width: 100%;
|
|
71
71
|
|
|
72
72
|
font-size: 14px;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./index.css');
|
|
4
4
|
|
|
5
|
-
var styles = {"headerWrapper":"bottom-
|
|
5
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_nzj4a bottom-sheet__headerBase_nzj4a","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_nzj4a bottom-sheet__headerBase_nzj4a","sticky":"bottom-sheet__sticky_nzj4a","title":"bottom-sheet__title_nzj4a","subtitle":"bottom-sheet__subtitle_nzj4a"};
|
|
6
6
|
|
|
7
7
|
module.exports = styles;
|
|
8
8
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
--bottom-sheet-header-border-bottom-inverted: 1px solid var(--color-light-neutral-300-inverted);
|
|
7
7
|
--bottom-sheet-text-color-inverted: var(--color-light-text-primary-inverted);
|
|
8
8
|
}
|
|
9
|
-
.bottom-
|
|
9
|
+
.bottom-sheet__title_o23la {
|
|
10
10
|
color: var(--bottom-sheet-text-color-inverted);
|
|
11
11
|
}
|
|
12
|
-
.bottom-
|
|
12
|
+
.bottom-sheet__hasContent_o23la {
|
|
13
13
|
background-color: inherit;
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__subtitle_o23la.bottom-sheet__subtitle_o23la {
|
|
16
16
|
color: var(--bottom-sheet-text-color-inverted);
|
|
17
17
|
}
|
|
18
|
-
.bottom-
|
|
18
|
+
.bottom-sheet__highlighted_o23la {
|
|
19
19
|
border-bottom: var(--bottom-sheet-header-border-bottom-inverted);
|
|
20
20
|
}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./inverted.css');
|
|
4
4
|
|
|
5
|
-
var invertedColors = {"title":"bottom-
|
|
5
|
+
var invertedColors = {"title":"bottom-sheet__title_o23la","hasContent":"bottom-sheet__hasContent_o23la","subtitle":"bottom-sheet__subtitle_o23la","highlighted":"bottom-sheet__highlighted_o23la"};
|
|
6
6
|
|
|
7
7
|
module.exports = invertedColors;
|
|
8
8
|
//# sourceMappingURL=inverted.module.css.js.map
|
|
@@ -25,7 +25,7 @@ var colorStyles = {
|
|
|
25
25
|
};
|
|
26
26
|
var Header = function (_a) {
|
|
27
27
|
var _b;
|
|
28
|
-
var className = _a.className, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, sticky = _a.sticky, headerRef = _a.headerRef, headerOffset = _a.headerOffset, showSwipeMarker = _a.showSwipeMarker, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, restProps = tslib.__rest(_a, ["className", "colors", "sticky", "headerRef", "headerOffset", "showSwipeMarker", "title", "children", "contentClassName"]);
|
|
28
|
+
var className = _a.className, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, sticky = _a.sticky, headerRef = _a.headerRef, headerOffset = _a.headerOffset, showSwipeMarker = _a.showSwipeMarker, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, bottomAddons = _a.bottomAddons, restProps = tslib.__rest(_a, ["className", "colors", "sticky", "headerRef", "headerOffset", "showSwipeMarker", "title", "children", "contentClassName", "bottomAddons"]);
|
|
29
29
|
var _d = React.useContext(cssm.BaseModalContext), setHeaderOffset = _d.setHeaderOffset, setHasHeader = _d.setHasHeader, headerHighlighted = _d.headerHighlighted, onClose = _d.onClose;
|
|
30
30
|
React.useEffect(function () {
|
|
31
31
|
setHeaderOffset(headerOffset);
|
|
@@ -34,8 +34,8 @@ var Header = function (_a) {
|
|
|
34
34
|
setHasHeader(true);
|
|
35
35
|
}, [setHasHeader]);
|
|
36
36
|
var colorStyle = colorStyles[colors];
|
|
37
|
-
var hasContent = Boolean(title || children);
|
|
38
|
-
return (React__default.default.createElement(cssm$1.NavigationBarPrivate, tslib.__assign({}, restProps, { ref: headerRef, title: title, onClose: onClose, sticky: sticky, view: 'mobile', className: cn__default.default(className, (_b = {},
|
|
37
|
+
var hasContent = Boolean(title || children || bottomAddons);
|
|
38
|
+
return (React__default.default.createElement(cssm$1.NavigationBarPrivate, tslib.__assign({}, restProps, { ref: headerRef, title: title, bottomAddons: bottomAddons, onClose: onClose, sticky: sticky, view: 'mobile', className: cn__default.default(className, (_b = {},
|
|
39
39
|
_b[styles__default.default.headerWrapper] = showSwipeMarker,
|
|
40
40
|
_b[styles__default.default.headerWrapperWithoutSwipeMarker] = !showSwipeMarker,
|
|
41
41
|
_b[colorStyle.highlighted] = hasContent && headerHighlighted && sticky,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/header/Component.tsx"],"sourcesContent":["import React, { type FC, type RefObject, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModalContext } from '@alfalab/core-components-base-modal';\nimport {\n NavigationBarPrivate,\n type NavigationBarPrivateProps,\n} from '@alfalab/core-components-navigation-bar-private';\n\nimport { type ColorType } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type HeaderProps = Omit<NavigationBarPrivateProps, 'view' | 'size'> & {\n headerRef: RefObject<HTMLDivElement>;\n headerOffset: number;\n colors?: ColorType;\n showSwipeMarker?: boolean;\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n} as const;\n\nexport const Header: FC<HeaderProps> = ({\n className,\n colors = 'default',\n sticky,\n headerRef,\n headerOffset,\n showSwipeMarker,\n title,\n children,\n contentClassName,\n ...restProps\n}) => {\n const { setHeaderOffset, setHasHeader, headerHighlighted, onClose } =\n useContext(BaseModalContext);\n\n useEffect(() => {\n setHeaderOffset(headerOffset);\n }, [headerOffset, setHeaderOffset]);\n\n useEffect(() => {\n setHasHeader(true);\n }, [setHasHeader]);\n\n const colorStyle = colorStyles[colors];\n const hasContent = Boolean(title || children);\n\n return (\n <NavigationBarPrivate\n {...restProps}\n ref={headerRef}\n title={title}\n onClose={onClose}\n sticky={sticky}\n view='mobile'\n className={cn(className, {\n [styles.headerWrapper]: showSwipeMarker,\n [styles.headerWrapperWithoutSwipeMarker]: !showSwipeMarker,\n [colorStyle.highlighted]: hasContent && headerHighlighted && sticky,\n [colorStyle.hasContent]: hasContent,\n [styles.sticky]: sticky,\n })}\n contentClassName={cn(styles.title, contentClassName)}\n titleClassName={cn(colorStyle.title)}\n subtitleClassName={cn(styles.subtitle, colorStyle.subtitle)}\n colors={colors}\n >\n {children}\n </NavigationBarPrivate>\n );\n};\n"],"names":["defaultColors","invertedColors","__rest","useContext","BaseModalContext","useEffect","React","NavigationBarPrivate","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAEA,8BAAa;AACtB,IAAA,QAAQ,EAAEC,+BAAc;CAClB;AAEH,IAAM,MAAM,GAAoB,UAAC,
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/header/Component.tsx"],"sourcesContent":["import React, { type FC, type RefObject, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModalContext } from '@alfalab/core-components-base-modal';\nimport {\n NavigationBarPrivate,\n type NavigationBarPrivateProps,\n} from '@alfalab/core-components-navigation-bar-private';\n\nimport { type ColorType } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type HeaderProps = Omit<NavigationBarPrivateProps, 'view' | 'size'> & {\n headerRef: RefObject<HTMLDivElement>;\n headerOffset: number;\n colors?: ColorType;\n showSwipeMarker?: boolean;\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n} as const;\n\nexport const Header: FC<HeaderProps> = ({\n className,\n colors = 'default',\n sticky,\n headerRef,\n headerOffset,\n showSwipeMarker,\n title,\n children,\n contentClassName,\n bottomAddons,\n ...restProps\n}) => {\n const { setHeaderOffset, setHasHeader, headerHighlighted, onClose } =\n useContext(BaseModalContext);\n\n useEffect(() => {\n setHeaderOffset(headerOffset);\n }, [headerOffset, setHeaderOffset]);\n\n useEffect(() => {\n setHasHeader(true);\n }, [setHasHeader]);\n\n const colorStyle = colorStyles[colors];\n const hasContent = Boolean(title || children || bottomAddons);\n\n return (\n <NavigationBarPrivate\n {...restProps}\n ref={headerRef}\n title={title}\n bottomAddons={bottomAddons}\n onClose={onClose}\n sticky={sticky}\n view='mobile'\n className={cn(className, {\n [styles.headerWrapper]: showSwipeMarker,\n [styles.headerWrapperWithoutSwipeMarker]: !showSwipeMarker,\n [colorStyle.highlighted]: hasContent && headerHighlighted && sticky,\n [colorStyle.hasContent]: hasContent,\n [styles.sticky]: sticky,\n })}\n contentClassName={cn(styles.title, contentClassName)}\n titleClassName={cn(colorStyle.title)}\n subtitleClassName={cn(styles.subtitle, colorStyle.subtitle)}\n colors={colors}\n >\n {children}\n </NavigationBarPrivate>\n );\n};\n"],"names":["defaultColors","invertedColors","__rest","useContext","BaseModalContext","useEffect","React","NavigationBarPrivate","__assign","cn","styles"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAsBA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAEA,8BAAa;AACtB,IAAA,QAAQ,EAAEC,+BAAc;CAClB;AAEH,IAAM,MAAM,GAAoB,UAAC,EAYvC,EAAA;;AAXG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,EAAkB,GAAA,EAAA,CAAA,MAAA,EAAlB,MAAM,GAAG,EAAA,KAAA,MAAA,GAAA,SAAS,GAAA,EAAA,EAClB,MAAM,GAAA,EAAA,CAAA,MAAA,EACN,SAAS,GAAA,EAAA,CAAA,SAAA,EACT,YAAY,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BAAiB,IAAI,MAAM;AACnE,YAAA,EAAA,CAAC,UAAU,CAAC,UAAU,CAAA,GAAG,UAAU;AACnC,YAAA,EAAA,CAACA,uBAAM,CAAC,MAAM,CAAA,GAAG,MAAM;AACzB,YAAA,EAAA,EAAA,EACF,gBAAgB,EAAED,mBAAE,CAACC,uBAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,EACpD,cAAc,EAAED,mBAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EACpC,iBAAiB,EAAEA,mBAAE,CAACC,uBAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC3D,MAAM,EAAE,MAAM,KAEb,QAAQ,CACU;AAE/B;;;;"}
|
package/default.css
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
--bottom-sheet-marker-color: var(--color-light-neutral-translucent-300);
|
|
9
9
|
--bottom-sheet-text-color: var(--color-light-text-primary);
|
|
10
10
|
}
|
|
11
|
-
.bottom-
|
|
11
|
+
.bottom-sheet__component_25431 {
|
|
12
12
|
background-color: var(--bottom-sheet-background-color);
|
|
13
13
|
}
|
|
14
|
-
.bottom-
|
|
14
|
+
.bottom-sheet__content_25431 {
|
|
15
15
|
color: var(--bottom-sheet-text-color);
|
|
16
16
|
}
|
|
17
|
-
.bottom-
|
|
17
|
+
.bottom-sheet__defaultMarker_25431 {
|
|
18
18
|
background-color: var(--bottom-sheet-marker-color);
|
|
19
19
|
}
|
|
20
|
-
.bottom-
|
|
20
|
+
.bottom-sheet__hasContent_25431 {
|
|
21
21
|
color: var(--bottom-sheet-text-color);
|
|
22
22
|
}
|
package/default.module.css.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
require('./default.css');
|
|
4
4
|
|
|
5
|
-
var defaultColors = {"component":"bottom-
|
|
5
|
+
var defaultColors = {"component":"bottom-sheet__component_25431","content":"bottom-sheet__content_25431","defaultMarker":"bottom-sheet__defaultMarker_25431","hasContent":"bottom-sheet__hasContent_25431"};
|
|
6
6
|
|
|
7
7
|
module.exports = defaultColors;
|
|
8
8
|
//# sourceMappingURL=default.module.css.js.map
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
--bottom-sheet-footer-background-color: var(--color-light-modal-bg-primary);
|
|
9
9
|
--bottom-sheet-footer-border-top: 1px solid var(--color-light-neutral-300);
|
|
10
10
|
}
|
|
11
|
-
.bottom-
|
|
11
|
+
.bottom-sheet__highlighted_1gfc7 {
|
|
12
12
|
background-color: var(--bottom-sheet-footer-background-color);
|
|
13
13
|
border-top: var(--bottom-sheet-footer-border-top);
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__hasContent_1gfc7 {
|
|
16
16
|
color: var(--bottom-sheet-text-color);
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './default.css';
|
|
2
2
|
|
|
3
|
-
var defaultColors = {"highlighted":"bottom-
|
|
3
|
+
var defaultColors = {"highlighted":"bottom-sheet__highlighted_1gfc7","hasContent":"bottom-sheet__hasContent_1gfc7"};
|
|
4
4
|
|
|
5
5
|
export { defaultColors as default };
|
|
6
6
|
//# sourceMappingURL=default.module.css.js.map
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
--gap-0: 0px;
|
|
4
4
|
--gap-16: var(--gap-m);
|
|
5
5
|
}
|
|
6
|
-
.bottom-
|
|
6
|
+
.bottom-sheet__footer_1wb4l {
|
|
7
7
|
padding: var(--gap-16) var(--gap-16);
|
|
8
8
|
}
|
|
9
|
-
.bottom-
|
|
9
|
+
.bottom-sheet__sticky_1wb4l {
|
|
10
10
|
position: sticky;
|
|
11
11
|
bottom: var(--gap-0);
|
|
12
12
|
z-index: 1;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"footer":"bottom-
|
|
3
|
+
var styles = {"footer":"bottom-sheet__footer_1wb4l","sticky":"bottom-sheet__sticky_1wb4l"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
--bottom-sheet-footer-background-color-inverted: var(--color-light-modal-bg-primary-inverted);
|
|
9
9
|
--bottom-sheet-footer-border-top-inverted: 1px solid var(--color-light-neutral-300-inverted);
|
|
10
10
|
}
|
|
11
|
-
.bottom-
|
|
11
|
+
.bottom-sheet__highlighted_vhp47 {
|
|
12
12
|
background-color: var(--bottom-sheet-footer-background-color-inverted);
|
|
13
13
|
border-top: var(--bottom-sheet-footer-border-top-inverted);
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__hasContent_vhp47 {
|
|
16
16
|
color: var(--bottom-sheet-text-color-inverted);
|
|
17
17
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './inverted.css';
|
|
2
2
|
|
|
3
|
-
var invertedColors = {"highlighted":"bottom-
|
|
3
|
+
var invertedColors = {"highlighted":"bottom-sheet__highlighted_vhp47","hasContent":"bottom-sheet__hasContent_vhp47"};
|
|
4
4
|
|
|
5
5
|
export { invertedColors as default };
|
|
6
6
|
//# sourceMappingURL=inverted.module.css.js.map
|
|
@@ -13,7 +13,7 @@ var colorStyles = {
|
|
|
13
13
|
};
|
|
14
14
|
var Header = function (_a) {
|
|
15
15
|
var _b;
|
|
16
|
-
var className = _a.className, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, sticky = _a.sticky, headerRef = _a.headerRef, headerOffset = _a.headerOffset, showSwipeMarker = _a.showSwipeMarker, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, restProps = __rest(_a, ["className", "colors", "sticky", "headerRef", "headerOffset", "showSwipeMarker", "title", "children", "contentClassName"]);
|
|
16
|
+
var className = _a.className, _c = _a.colors, colors = _c === void 0 ? 'default' : _c, sticky = _a.sticky, headerRef = _a.headerRef, headerOffset = _a.headerOffset, showSwipeMarker = _a.showSwipeMarker, title = _a.title, children = _a.children, contentClassName = _a.contentClassName, bottomAddons = _a.bottomAddons, restProps = __rest(_a, ["className", "colors", "sticky", "headerRef", "headerOffset", "showSwipeMarker", "title", "children", "contentClassName", "bottomAddons"]);
|
|
17
17
|
var _d = useContext(BaseModalContext), setHeaderOffset = _d.setHeaderOffset, setHasHeader = _d.setHasHeader, headerHighlighted = _d.headerHighlighted, onClose = _d.onClose;
|
|
18
18
|
useEffect(function () {
|
|
19
19
|
setHeaderOffset(headerOffset);
|
|
@@ -22,8 +22,8 @@ var Header = function (_a) {
|
|
|
22
22
|
setHasHeader(true);
|
|
23
23
|
}, [setHasHeader]);
|
|
24
24
|
var colorStyle = colorStyles[colors];
|
|
25
|
-
var hasContent = Boolean(title || children);
|
|
26
|
-
return (React.createElement(NavigationBarPrivate, __assign({}, restProps, { ref: headerRef, title: title, onClose: onClose, sticky: sticky, view: 'mobile', className: cn(className, (_b = {},
|
|
25
|
+
var hasContent = Boolean(title || children || bottomAddons);
|
|
26
|
+
return (React.createElement(NavigationBarPrivate, __assign({}, restProps, { ref: headerRef, title: title, bottomAddons: bottomAddons, onClose: onClose, sticky: sticky, view: 'mobile', className: cn(className, (_b = {},
|
|
27
27
|
_b[styles.headerWrapper] = showSwipeMarker,
|
|
28
28
|
_b[styles.headerWrapperWithoutSwipeMarker] = !showSwipeMarker,
|
|
29
29
|
_b[colorStyle.highlighted] = hasContent && headerHighlighted && sticky,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Component.js","sources":["../../../src/components/header/Component.tsx"],"sourcesContent":["import React, { type FC, type RefObject, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModalContext } from '@alfalab/core-components-base-modal';\nimport {\n NavigationBarPrivate,\n type NavigationBarPrivateProps,\n} from '@alfalab/core-components-navigation-bar-private';\n\nimport { type ColorType } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type HeaderProps = Omit<NavigationBarPrivateProps, 'view' | 'size'> & {\n headerRef: RefObject<HTMLDivElement>;\n headerOffset: number;\n colors?: ColorType;\n showSwipeMarker?: boolean;\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n} as const;\n\nexport const Header: FC<HeaderProps> = ({\n className,\n colors = 'default',\n sticky,\n headerRef,\n headerOffset,\n showSwipeMarker,\n title,\n children,\n contentClassName,\n ...restProps\n}) => {\n const { setHeaderOffset, setHasHeader, headerHighlighted, onClose } =\n useContext(BaseModalContext);\n\n useEffect(() => {\n setHeaderOffset(headerOffset);\n }, [headerOffset, setHeaderOffset]);\n\n useEffect(() => {\n setHasHeader(true);\n }, [setHasHeader]);\n\n const colorStyle = colorStyles[colors];\n const hasContent = Boolean(title || children);\n\n return (\n <NavigationBarPrivate\n {...restProps}\n ref={headerRef}\n title={title}\n onClose={onClose}\n sticky={sticky}\n view='mobile'\n className={cn(className, {\n [styles.headerWrapper]: showSwipeMarker,\n [styles.headerWrapperWithoutSwipeMarker]: !showSwipeMarker,\n [colorStyle.highlighted]: hasContent && headerHighlighted && sticky,\n [colorStyle.hasContent]: hasContent,\n [styles.sticky]: sticky,\n })}\n contentClassName={cn(styles.title, contentClassName)}\n titleClassName={cn(colorStyle.title)}\n subtitleClassName={cn(styles.subtitle, colorStyle.subtitle)}\n colors={colors}\n >\n {children}\n </NavigationBarPrivate>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAsBA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,QAAQ,EAAE,cAAc;CAClB;AAEH,IAAM,MAAM,GAAoB,UAAC,
|
|
1
|
+
{"version":3,"file":"Component.js","sources":["../../../src/components/header/Component.tsx"],"sourcesContent":["import React, { type FC, type RefObject, useContext, useEffect } from 'react';\nimport cn from 'classnames';\n\nimport { BaseModalContext } from '@alfalab/core-components-base-modal';\nimport {\n NavigationBarPrivate,\n type NavigationBarPrivateProps,\n} from '@alfalab/core-components-navigation-bar-private';\n\nimport { type ColorType } from '../../types';\n\nimport defaultColors from './default.module.css';\nimport styles from './index.module.css';\nimport invertedColors from './inverted.module.css';\n\nexport type HeaderProps = Omit<NavigationBarPrivateProps, 'view' | 'size'> & {\n headerRef: RefObject<HTMLDivElement>;\n headerOffset: number;\n colors?: ColorType;\n showSwipeMarker?: boolean;\n};\n\nconst colorStyles = {\n default: defaultColors,\n inverted: invertedColors,\n} as const;\n\nexport const Header: FC<HeaderProps> = ({\n className,\n colors = 'default',\n sticky,\n headerRef,\n headerOffset,\n showSwipeMarker,\n title,\n children,\n contentClassName,\n bottomAddons,\n ...restProps\n}) => {\n const { setHeaderOffset, setHasHeader, headerHighlighted, onClose } =\n useContext(BaseModalContext);\n\n useEffect(() => {\n setHeaderOffset(headerOffset);\n }, [headerOffset, setHeaderOffset]);\n\n useEffect(() => {\n setHasHeader(true);\n }, [setHasHeader]);\n\n const colorStyle = colorStyles[colors];\n const hasContent = Boolean(title || children || bottomAddons);\n\n return (\n <NavigationBarPrivate\n {...restProps}\n ref={headerRef}\n title={title}\n bottomAddons={bottomAddons}\n onClose={onClose}\n sticky={sticky}\n view='mobile'\n className={cn(className, {\n [styles.headerWrapper]: showSwipeMarker,\n [styles.headerWrapperWithoutSwipeMarker]: !showSwipeMarker,\n [colorStyle.highlighted]: hasContent && headerHighlighted && sticky,\n [colorStyle.hasContent]: hasContent,\n [styles.sticky]: sticky,\n })}\n contentClassName={cn(styles.title, contentClassName)}\n titleClassName={cn(colorStyle.title)}\n subtitleClassName={cn(styles.subtitle, colorStyle.subtitle)}\n colors={colors}\n >\n {children}\n </NavigationBarPrivate>\n );\n};\n"],"names":[],"mappings":";;;;;;;;;AAsBA,IAAM,WAAW,GAAG;AAChB,IAAA,OAAO,EAAE,aAAa;AACtB,IAAA,QAAQ,EAAE,cAAc;CAClB;AAEH,IAAM,MAAM,GAAoB,UAAC,EAYvC,EAAA;;AAXG,IAAA,IAAA,SAAS,GAAA,EAAA,CAAA,SAAA,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AM,CAAC,aAAa,CAAA,GAAG,eAAe;AACvC,YAAA,EAAA,CAAC,MAAM,CAAC,+BAA+B,CAAA,GAAG,CAAC,eAAe;YAC1D,EAAC,CAAA,UAAU,CAAC,WAAW,CAAA,GAAG,UAAU,IAAI,iBAAiB,IAAI,MAAM;AACnE,YAAA,EAAA,CAAC,UAAU,CAAC,UAAU,CAAA,GAAG,UAAU;AACnC,YAAA,EAAA,CAAC,MAAM,CAAC,MAAM,CAAA,GAAG,MAAM;AACzB,YAAA,EAAA,EAAA,EACF,gBAAgB,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,EAAE,gBAAgB,CAAC,EACpD,cAAc,EAAE,EAAE,CAAC,UAAU,CAAC,KAAK,CAAC,EACpC,iBAAiB,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,UAAU,CAAC,QAAQ,CAAC,EAC3D,MAAM,EAAE,MAAM,KAEb,QAAQ,CACU;AAE/B;;;;"}
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
--bottom-sheet-header-border-bottom: 1px solid var(--color-light-neutral-300);
|
|
7
7
|
--bottom-sheet-text-color: var(--color-light-text-primary);
|
|
8
8
|
}
|
|
9
|
-
.bottom-
|
|
9
|
+
.bottom-sheet__title_1ucm9 {
|
|
10
10
|
color: var(--bottom-sheet-text-color);
|
|
11
11
|
}
|
|
12
|
-
.bottom-
|
|
12
|
+
.bottom-sheet__hasContent_1ucm9 {
|
|
13
13
|
background-color: inherit;
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__subtitle_1ucm9.bottom-sheet__subtitle_1ucm9 {
|
|
16
16
|
color: var(--bottom-sheet-text-color);
|
|
17
17
|
}
|
|
18
|
-
.bottom-
|
|
18
|
+
.bottom-sheet__highlighted_1ucm9 {
|
|
19
19
|
border-bottom: var(--bottom-sheet-header-border-bottom);
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './default.css';
|
|
2
2
|
|
|
3
|
-
var defaultColors = {"title":"bottom-
|
|
3
|
+
var defaultColors = {"title":"bottom-sheet__title_1ucm9","hasContent":"bottom-sheet__hasContent_1ucm9","subtitle":"bottom-sheet__subtitle_1ucm9","highlighted":"bottom-sheet__highlighted_1ucm9"};
|
|
4
4
|
|
|
5
5
|
export { defaultColors as default };
|
|
6
6
|
//# sourceMappingURL=default.module.css.js.map
|
|
@@ -12,38 +12,38 @@
|
|
|
12
12
|
--font-family-system:
|
|
13
13
|
system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Helvetica, sans-serif;
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__headerBase_nzj4a {
|
|
16
16
|
border-top-left-radius: inherit;
|
|
17
17
|
border-top-right-radius: inherit;
|
|
18
18
|
z-index: 1;
|
|
19
19
|
}
|
|
20
|
-
.bottom-
|
|
20
|
+
.bottom-sheet__headerWrapper_nzj4a {
|
|
21
21
|
padding: var(--gap-12) var(--gap-8) var(--gap-4);
|
|
22
22
|
}
|
|
23
|
-
.bottom-
|
|
23
|
+
.bottom-sheet__headerWrapperWithoutSwipeMarker_nzj4a {
|
|
24
24
|
padding: var(--gap-8) var(--gap-8) var(--gap-4);
|
|
25
25
|
}
|
|
26
|
-
.bottom-
|
|
26
|
+
.bottom-sheet__header_nzj4a {
|
|
27
27
|
display: flex;
|
|
28
28
|
}
|
|
29
|
-
.bottom-
|
|
29
|
+
.bottom-sheet__sticky_nzj4a {
|
|
30
30
|
position: sticky;
|
|
31
31
|
top: var(--gap-0);
|
|
32
32
|
}
|
|
33
|
-
.bottom-
|
|
33
|
+
.bottom-sheet__justifyEnd_nzj4a {
|
|
34
34
|
justify-content: flex-end;
|
|
35
35
|
}
|
|
36
|
-
.bottom-
|
|
36
|
+
.bottom-sheet__addon_nzj4a {
|
|
37
37
|
display: flex;
|
|
38
38
|
justify-content: center;
|
|
39
39
|
align-items: center;
|
|
40
40
|
min-width: 48px;
|
|
41
41
|
height: 48px;
|
|
42
42
|
}
|
|
43
|
-
.bottom-
|
|
43
|
+
.bottom-sheet__addonFixed_nzj4a {
|
|
44
44
|
position: fixed;
|
|
45
45
|
}
|
|
46
|
-
.bottom-
|
|
46
|
+
.bottom-sheet__title_nzj4a {
|
|
47
47
|
padding: var(--gap-10) var(--gap-8);
|
|
48
48
|
width: 100%;
|
|
49
49
|
|
|
@@ -55,18 +55,18 @@
|
|
|
55
55
|
|
|
56
56
|
font-family: var(--font-family-system);
|
|
57
57
|
}
|
|
58
|
-
.bottom-
|
|
58
|
+
.bottom-sheet__titleCenter_nzj4a {
|
|
59
59
|
text-align: center;
|
|
60
60
|
}
|
|
61
|
-
.bottom-
|
|
61
|
+
.bottom-sheet__titleLeft_nzj4a {
|
|
62
62
|
text-align: left;
|
|
63
63
|
}
|
|
64
|
-
.bottom-
|
|
64
|
+
.bottom-sheet__trimTitle_nzj4a {
|
|
65
65
|
white-space: nowrap;
|
|
66
66
|
overflow: hidden;
|
|
67
67
|
text-overflow: ellipsis;
|
|
68
68
|
}
|
|
69
|
-
.bottom-
|
|
69
|
+
.bottom-sheet__subtitle_nzj4a {
|
|
70
70
|
width: 100%;
|
|
71
71
|
|
|
72
72
|
font-size: 14px;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './index.css';
|
|
2
2
|
|
|
3
|
-
var styles = {"headerWrapper":"bottom-
|
|
3
|
+
var styles = {"headerWrapper":"bottom-sheet__headerWrapper_nzj4a bottom-sheet__headerBase_nzj4a","headerWrapperWithoutSwipeMarker":"bottom-sheet__headerWrapperWithoutSwipeMarker_nzj4a bottom-sheet__headerBase_nzj4a","sticky":"bottom-sheet__sticky_nzj4a","title":"bottom-sheet__title_nzj4a","subtitle":"bottom-sheet__subtitle_nzj4a"};
|
|
4
4
|
|
|
5
5
|
export { styles as default };
|
|
6
6
|
//# sourceMappingURL=index.module.css.js.map
|
|
@@ -6,15 +6,15 @@
|
|
|
6
6
|
--bottom-sheet-header-border-bottom-inverted: 1px solid var(--color-light-neutral-300-inverted);
|
|
7
7
|
--bottom-sheet-text-color-inverted: var(--color-light-text-primary-inverted);
|
|
8
8
|
}
|
|
9
|
-
.bottom-
|
|
9
|
+
.bottom-sheet__title_o23la {
|
|
10
10
|
color: var(--bottom-sheet-text-color-inverted);
|
|
11
11
|
}
|
|
12
|
-
.bottom-
|
|
12
|
+
.bottom-sheet__hasContent_o23la {
|
|
13
13
|
background-color: inherit;
|
|
14
14
|
}
|
|
15
|
-
.bottom-
|
|
15
|
+
.bottom-sheet__subtitle_o23la.bottom-sheet__subtitle_o23la {
|
|
16
16
|
color: var(--bottom-sheet-text-color-inverted);
|
|
17
17
|
}
|
|
18
|
-
.bottom-
|
|
18
|
+
.bottom-sheet__highlighted_o23la {
|
|
19
19
|
border-bottom: var(--bottom-sheet-header-border-bottom-inverted);
|
|
20
20
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './inverted.css';
|
|
2
2
|
|
|
3
|
-
var invertedColors = {"title":"bottom-
|
|
3
|
+
var invertedColors = {"title":"bottom-sheet__title_o23la","hasContent":"bottom-sheet__hasContent_o23la","subtitle":"bottom-sheet__subtitle_o23la","highlighted":"bottom-sheet__highlighted_o23la"};
|
|
4
4
|
|
|
5
5
|
export { invertedColors as default };
|
|
6
6
|
//# sourceMappingURL=inverted.module.css.js.map
|
package/esm/default.css
CHANGED
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
--bottom-sheet-marker-color: var(--color-light-neutral-translucent-300);
|
|
9
9
|
--bottom-sheet-text-color: var(--color-light-text-primary);
|
|
10
10
|
}
|
|
11
|
-
.bottom-
|
|
11
|
+
.bottom-sheet__component_25431 {
|
|
12
12
|
background-color: var(--bottom-sheet-background-color);
|
|
13
13
|
}
|
|
14
|
-
.bottom-
|
|
14
|
+
.bottom-sheet__content_25431 {
|
|
15
15
|
color: var(--bottom-sheet-text-color);
|
|
16
16
|
}
|
|
17
|
-
.bottom-
|
|
17
|
+
.bottom-sheet__defaultMarker_25431 {
|
|
18
18
|
background-color: var(--bottom-sheet-marker-color);
|
|
19
19
|
}
|
|
20
|
-
.bottom-
|
|
20
|
+
.bottom-sheet__hasContent_25431 {
|
|
21
21
|
color: var(--bottom-sheet-text-color);
|
|
22
22
|
}
|