@eleventheye/asui 2.7.8 → 2.7.9
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/dist/asiconbutton/ASIconButton.d.ts.map +1 -1
- package/dist/asiconbutton/ASIconButton.js +1 -1
- package/dist/asiconbutton/ASIconButton.types.d.ts +2 -4
- package/dist/asiconbutton/ASIconButton.types.d.ts.map +1 -1
- package/dist/asnavbar/ASNavBar.js +2 -2
- package/dist/asnavbar/desktop/ASNavBarDW.d.ts.map +1 -1
- package/dist/asnavbar/desktop/ASNavBarDW.js +7 -5
- package/dist/asnavbar/desktop/styles.d.ts +2 -8
- package/dist/asnavbar/desktop/styles.d.ts.map +1 -1
- package/dist/asnavbar/desktop/styles.js +36 -24
- package/dist/asnavbar/mobile/ASNavBarMW.d.ts.map +1 -1
- package/dist/asnavbar/mobile/ASNavBarMW.js +1 -1
- package/dist/asnavbar/mobile/styles.d.ts +0 -5
- package/dist/asnavbar/mobile/styles.d.ts.map +1 -1
- package/dist/asnavbar/mobile/styles.js +2 -19
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.d.ts.map +1 -1
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.js +6 -6
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.d.ts +2 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.d.ts.map +1 -1
- package/dist/asnavbar/navbararrowbuttons/styles.d.ts +2 -6
- package/dist/asnavbar/navbararrowbuttons/styles.d.ts.map +1 -1
- package/dist/asnavbar/navbararrowbuttons/styles.js +16 -13
- package/dist/asnavbar/styles.js +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASIconButton.d.ts","sourceRoot":"","sources":["../../src/asiconbutton/ASIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"ASIconButton.d.ts","sourceRoot":"","sources":["../../src/asiconbutton/ASIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAoD,MAAM,OAAO,CAAC;AAGzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAGzD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAqF7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -6,7 +6,7 @@ const react_1 = require("react");
|
|
|
6
6
|
const ASUI_types_1 = require("../apptypes/ASUI.types");
|
|
7
7
|
const astheme_1 = tslib_1.__importDefault(require("../astheme"));
|
|
8
8
|
const styles_1 = require("./styles");
|
|
9
|
-
const ASIconButton = ({ className = '', onIconButtonTap = () => undefined, selected = false, toggle = false, size = ASUI_types_1.ComponentSize.Medium, iconSize = size === ASUI_types_1.ComponentSize.Small ? 22 : size === ASUI_types_1.ComponentSize.Medium ? 28 : 40,
|
|
9
|
+
const ASIconButton = ({ className = '', onIconButtonTap = () => undefined, selected = false, toggle = false, size = ASUI_types_1.ComponentSize.Medium, iconSize = size === ASUI_types_1.ComponentSize.Small ? 22 : size === ASUI_types_1.ComponentSize.Medium ? 28 : 40, disabled = false, isLoading = false, icon: Icon, theme = astheme_1.default, strokeWidth = 0.1, strokeColor = astheme_1.default.button.buttonBg, fillColor = astheme_1.default.button.buttonColor, color = astheme_1.default.button.buttonColor, id, style, ...props }) => {
|
|
10
10
|
const tapDebounceRef = (0, react_1.useRef)('None');
|
|
11
11
|
const [isSelected, setIsSelected] = (0, react_1.useState)(selected);
|
|
12
12
|
(0, react_1.useEffect)(() => {
|
|
@@ -1,19 +1,17 @@
|
|
|
1
1
|
import { PointerEvent } from 'react';
|
|
2
|
-
import { ASComponentSize,
|
|
2
|
+
import { ASComponentSize, ASTheme } from '../apptypes/ASUI.types';
|
|
3
3
|
import { ASIcon, IconProps } from '../icons';
|
|
4
4
|
type ASIconButtonOwnProps = {
|
|
5
5
|
className?: string;
|
|
6
|
-
text?: string;
|
|
7
6
|
selected?: boolean;
|
|
8
7
|
toggle?: boolean;
|
|
9
8
|
size?: ASComponentSize;
|
|
10
9
|
iconSize?: number;
|
|
11
10
|
theme?: ASTheme;
|
|
12
|
-
paddingSize?: ASPaddingSize;
|
|
13
11
|
isLoading?: boolean;
|
|
14
12
|
icon: typeof ASIcon;
|
|
15
13
|
onIconButtonTap?: (e: PointerEvent) => void;
|
|
16
|
-
} & IconProps & Omit<React.HTMLProps<HTMLDivElement>, 'size'>;
|
|
14
|
+
} & IconProps & Omit<React.HTMLProps<HTMLDivElement>, 'size' | 'text'>;
|
|
17
15
|
export type ASIconButtonProps = React.PropsWithChildren<ASIconButtonOwnProps>;
|
|
18
16
|
export {};
|
|
19
17
|
//# sourceMappingURL=ASIconButton.types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASIconButton.types.d.ts","sourceRoot":"","sources":["../../src/asiconbutton/ASIconButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"ASIconButton.types.d.ts","sourceRoot":"","sources":["../../src/asiconbutton/ASIconButton.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,eAAe,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAE7C,KAAK,oBAAoB,GAAG;IAC1B,SAAS,CAAC,EAAE,MAAM,CAAC;IAUnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IASnB,MAAM,CAAC,EAAE,OAAO,CAAC;IASjB,IAAI,CAAC,EAAE,eAAe,CAAC;IAQvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAMlB,KAAK,CAAC,EAAE,OAAO,CAAC;IAOhB,SAAS,CAAC,EAAE,OAAO,CAAC;IAOpB,IAAI,EAAE,OAAO,MAAM,CAAC;IAEpB,eAAe,CAAC,EAAE,CAAC,CAAC,EAAE,YAAY,KAAK,IAAI,CAAC;CAC7C,GAAG,SAAS,GACX,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,cAAc,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,CAAC;AAEzD,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,CAAC"}
|
|
@@ -32,7 +32,7 @@ exports.defaultNavBarDWStyleOptions = {
|
|
|
32
32
|
$hideHorizontalScrollbarInDW: true,
|
|
33
33
|
$gap: 30,
|
|
34
34
|
$borderRadius: 6,
|
|
35
|
-
$padding: '0
|
|
35
|
+
$padding: '0',
|
|
36
36
|
$margin: '0 auto',
|
|
37
37
|
$minWidth: 300,
|
|
38
38
|
$minWidthUnit: 'px',
|
|
@@ -46,7 +46,7 @@ exports.defaultNavBarMWStyleOptions = {
|
|
|
46
46
|
$maxWidth: 300,
|
|
47
47
|
$maxWidthUnit: 'px',
|
|
48
48
|
$borderRadius: 6,
|
|
49
|
-
$padding: '0
|
|
49
|
+
$padding: '0',
|
|
50
50
|
};
|
|
51
51
|
const ASNavBar = ({ className = '', navItems = [], selectedItemId = '', onItemSelected = () => undefined, theme = astheme_1.default, size = ASUI_types_1.ComponentSize.Medium, styleOptions = { ...exports.defaultNavBarStyleOptions }, dwStyleOptions = { ...exports.defaultNavBarDWStyleOptions }, mwStyleOptions = { ...exports.defaultNavBarMWStyleOptions }, }) => {
|
|
52
52
|
const visitedCountRef = (0, react_1.useRef)(0);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASNavBarDW.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/desktop/ASNavBarDW.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0E,MAAM,OAAO,CAAC;AAI/F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"ASNavBarDW.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/desktop/ASNavBarDW.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0E,MAAM,OAAO,CAAC;AAI/F,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAc9D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmJvC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -16,13 +16,14 @@ const ASNavBarDW = ({ id = `asnavbar-dw-${(0, uuid_1.v4)()}`, className = '', na
|
|
|
16
16
|
const selectedItemElRef = (0, react_1.useRef)(null);
|
|
17
17
|
const navBarRef = (0, react_1.useRef)(null);
|
|
18
18
|
const navBarHighlightBoxRef = (0, react_1.useRef)(null);
|
|
19
|
+
const navBarScrollRef = (0, react_1.useRef)(null);
|
|
19
20
|
const [selected, setSelected] = (0, react_1.useState)(selectedItemId);
|
|
20
21
|
const slideHighlightToSelectedItem = (selectedItemEl, itemId) => {
|
|
21
|
-
if (!navBarHighlightBoxRef.current || !
|
|
22
|
+
if (!navBarHighlightBoxRef.current || !navBarScrollRef.current)
|
|
22
23
|
return;
|
|
23
24
|
selectedItemElRef.current = selectedItemEl;
|
|
24
25
|
const selectedElRect = selectedItemEl.getBoundingClientRect();
|
|
25
|
-
const parentRect =
|
|
26
|
+
const parentRect = navBarScrollRef.current.getBoundingClientRect();
|
|
26
27
|
const offsetToSelectedEl = selectedElRect.left - parentRect.left;
|
|
27
28
|
const selectedBox = navBarHighlightBoxRef.current;
|
|
28
29
|
const selectedBoxWidth = selectedElRect.width;
|
|
@@ -37,11 +38,12 @@ const ASNavBarDW = ({ id = `asnavbar-dw-${(0, uuid_1.v4)()}`, className = '', na
|
|
|
37
38
|
});
|
|
38
39
|
};
|
|
39
40
|
const onScrollEndHandler = () => {
|
|
40
|
-
if (!navBarHighlightBoxRef.current || !navBarRef.current || !selectedItemElRef.current)
|
|
41
|
+
if (!navBarHighlightBoxRef.current || !navBarScrollRef.current || !navBarRef.current || !selectedItemElRef.current)
|
|
41
42
|
return;
|
|
42
43
|
const selectedItemEl = selectedItemElRef.current;
|
|
43
44
|
const selectedElRect = selectedItemEl.getBoundingClientRect();
|
|
44
|
-
const parentRect =
|
|
45
|
+
const parentRect = navBarScrollRef.current.getBoundingClientRect();
|
|
46
|
+
const rootRect = navBarRef.current.getBoundingClientRect();
|
|
45
47
|
const offsetToSelectedEl = selectedElRect.left - parentRect.left;
|
|
46
48
|
const selectedBox = navBarHighlightBoxRef.current;
|
|
47
49
|
const selectedBoxWidth = selectedElRect.width;
|
|
@@ -96,6 +98,6 @@ const ASNavBarDW = ({ id = `asnavbar-dw-${(0, uuid_1.v4)()}`, className = '', na
|
|
|
96
98
|
};
|
|
97
99
|
const onItemResizedHandler = (itemId, item) => slideHighlightToSelectedItem(item, itemId);
|
|
98
100
|
const isSelected = (itemId) => selected === itemId;
|
|
99
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.ASNavBarDWStyled, { id: id, ref: navBarRef, className: `${className} ${size}`, theme: theme, ...styleOptions, children: [(0, jsx_runtime_1.
|
|
101
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.ASNavBarDWStyled, { id: id, ref: navBarRef, className: `${className} ${size}`, theme: theme, ...styleOptions, children: [(0, jsx_runtime_1.jsxs)(styles_1.ASNavBarScrollableItems, { ref: navBarScrollRef, children: [(0, jsx_runtime_1.jsx)(styles_1.ASScrollContainerStyled, { onScrollEnd: onScrollEndHandler, children: navItems.map((item, index) => ((0, jsx_runtime_1.jsx)(navbaritem_1.default, { theme: theme, itemId: item.itemId, selected: isSelected(item.itemId), displayText: item.displayText, icon: item.icon, onItemResized: onItemResizedHandler, onItemClick: onItemSelectedHandler, size: size }, `key_${index}_${item.itemId}`))) }), (0, jsx_runtime_1.jsx)(styles_1.ASSelectedBoxStyled, { ref: navBarHighlightBoxRef, theme: theme })] }), (0, jsx_runtime_1.jsx)(navbararrowbuttons_1.default, { onArrowButtonClicked: scrollToDirection, className: styles_1.ASNavButtonsDWContainer, theme: theme, size: size, totalItemCount: totalItemCount, selectedIndex: selectedIndex, styleOptions: styleOptions, isMobile: false })] }));
|
|
100
102
|
};
|
|
101
103
|
exports.default = ASNavBarDW;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ASTheme } from '../../apptypes/ASUI.types';
|
|
2
2
|
interface ASNavBarStyledProps {
|
|
3
3
|
theme: ASTheme;
|
|
4
4
|
$mobileMode?: boolean;
|
|
@@ -24,14 +24,8 @@ interface ASNavBarItemStyledProps {
|
|
|
24
24
|
$padding?: string;
|
|
25
25
|
}
|
|
26
26
|
export declare const ASNavBarItemStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarItemStyledProps>> & string;
|
|
27
|
-
interface ASNavBarItemPaddingProps {
|
|
28
|
-
theme: ASTheme;
|
|
29
|
-
$mobileMode?: boolean;
|
|
30
|
-
$styleOptions?: ASStyleOptions | {};
|
|
31
|
-
$selected?: boolean;
|
|
32
|
-
}
|
|
33
|
-
export declare const ASNavBarItemPadding: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarItemPaddingProps>> & string;
|
|
34
27
|
export declare const ASNavButtonsDWContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
28
|
+
export declare const ASNavBarScrollableItems: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
35
29
|
export declare const ASScrollContainerStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarStyledProps>> & string;
|
|
36
30
|
export {};
|
|
37
31
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/desktop/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/desktop/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAqBpD,UAAU,mBAAmB;IAC3B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAsBD,eAAO,MAAM,gBAAgB,wPAoB5B,CAAC;AAEF,UAAU,8BAA8B;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,mBAAmB,qQAc/B,CAAC;AAEF,UAAU,uBAAuB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,kBAAkB,4PAuC9B,CAAC;AA4BF,eAAO,MAAM,uBAAuB,6NAInC,CAAC;AAEF,eAAO,MAAM,uBAAuB,6NAYnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,wPAWnC,CAAC"}
|
|
@@ -1,9 +1,25 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ASScrollContainerStyled = exports.
|
|
3
|
+
exports.ASScrollContainerStyled = exports.ASNavBarScrollableItems = exports.ASNavButtonsDWContainer = exports.ASNavBarItemStyled = exports.ASSelectedBoxStyled = exports.ASNavBarDWStyled = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
6
|
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
7
|
+
const HideScrollBarConfig = (0, styled_components_1.css) `
|
|
8
|
+
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
9
|
+
&::-webkit-scrollbar {
|
|
10
|
+
display: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/* Hide scrollbar for IE, Edge and Firefox */
|
|
14
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
15
|
+
scrollbar-width: none; /* Firefox */
|
|
16
|
+
`;
|
|
17
|
+
const maxWidth = (0, styled_components_1.css) `
|
|
18
|
+
width: 100%;
|
|
19
|
+
@supports (width: -webkit-fill-available) {
|
|
20
|
+
width: -webkit-fill-available;
|
|
21
|
+
}
|
|
22
|
+
`;
|
|
7
23
|
const dimensionsForSizes = (0, styled_components_1.css) `
|
|
8
24
|
&.ASSmall {
|
|
9
25
|
height: 30px;
|
|
@@ -31,10 +47,11 @@ exports.ASNavBarDWStyled = styled_components_1.default.div `
|
|
|
31
47
|
flex-direction: row;
|
|
32
48
|
position: relative;
|
|
33
49
|
gap: ${({ $gap = 30 }) => $gap}px;
|
|
34
|
-
width:
|
|
50
|
+
width: -webkit-fill-available;
|
|
51
|
+
contain: layout;
|
|
35
52
|
grid-row: 1;
|
|
36
53
|
min-width: ${({ $minWidth = 300 }) => $minWidth}px;
|
|
37
|
-
padding: ${({ $padding = '0
|
|
54
|
+
padding: ${({ $padding = '0' }) => $padding};
|
|
38
55
|
border-radius: ${({ $borderRadius = 6 }) => $borderRadius}px;
|
|
39
56
|
background-color: ${({ theme }) => theme.navbar.navBarBackgroundColor};
|
|
40
57
|
box-shadow: ${({ theme }) => theme.navbar.navBarBoxShadow};
|
|
@@ -96,28 +113,24 @@ exports.ASNavBarItemStyled = styled_components_1.default.div `
|
|
|
96
113
|
}
|
|
97
114
|
}
|
|
98
115
|
`;
|
|
99
|
-
exports.ASNavBarItemPadding = styled_components_1.default.div `
|
|
100
|
-
padding: 0 4px;
|
|
101
|
-
pointer-events: none;
|
|
102
|
-
user-select: none;
|
|
103
|
-
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
104
|
-
? `
|
|
105
|
-
& > div > svg > path {
|
|
106
|
-
stroke-width: 0.4;
|
|
107
|
-
stroke: ${theme.navbar.navBarItemColorSelected};
|
|
108
|
-
}`
|
|
109
|
-
: `
|
|
110
|
-
& > div > svg > path {
|
|
111
|
-
stroke-width: 0.4;
|
|
112
|
-
stroke: ${theme.navbar.navBarItemColor};
|
|
113
|
-
}
|
|
114
|
-
`};
|
|
115
|
-
`;
|
|
116
116
|
exports.ASNavButtonsDWContainer = styled_components_1.default.div `
|
|
117
117
|
position: fixed;
|
|
118
118
|
max-width: inherit;
|
|
119
119
|
height: inherit;
|
|
120
120
|
`;
|
|
121
|
+
exports.ASNavBarScrollableItems = styled_components_1.default.div `
|
|
122
|
+
display: flex;
|
|
123
|
+
justify-content: center;
|
|
124
|
+
align-items: center;
|
|
125
|
+
flex-wrap: nowrap;
|
|
126
|
+
flex-direction: row;
|
|
127
|
+
position: relative;
|
|
128
|
+
overflow: hidden;
|
|
129
|
+
// overflow-x: overlay;
|
|
130
|
+
width: fit-content;
|
|
131
|
+
padding: 0 44px;
|
|
132
|
+
${HideScrollBarConfig}
|
|
133
|
+
`;
|
|
121
134
|
exports.ASScrollContainerStyled = styled_components_1.default.div `
|
|
122
135
|
display: flex;
|
|
123
136
|
justify-content: flex-start;
|
|
@@ -125,9 +138,8 @@ exports.ASScrollContainerStyled = styled_components_1.default.div `
|
|
|
125
138
|
flex-direction: row;
|
|
126
139
|
position: relative;
|
|
127
140
|
overflow: hidden;
|
|
141
|
+
overflow-x: auto;
|
|
142
|
+
width: 100%
|
|
128
143
|
gap: 16px;
|
|
129
|
-
|
|
130
|
-
@supports (width: -webkit-fill-available) {
|
|
131
|
-
width: -webkit-fill-available;
|
|
132
|
-
}
|
|
144
|
+
${HideScrollBarConfig}
|
|
133
145
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASNavBarMW.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/mobile/ASNavBarMW.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAM3F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,
|
|
1
|
+
{"version":3,"file":"ASNavBarMW.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/mobile/ASNavBarMW.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsE,MAAM,OAAO,CAAC;AAM3F,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAOlD,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAkKvC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -98,6 +98,6 @@ const ASNavBarMW = ({ id = `asnavbar-mw-${(0, uuid_1.v4)()}`, className = '', na
|
|
|
98
98
|
selectNext(e);
|
|
99
99
|
}
|
|
100
100
|
};
|
|
101
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.ASNavBarMWStyled, { id: id, ref: navBarRef, className: `${className} ${size}`, theme: theme, ...styleOptions, children: [(0, jsx_runtime_1.jsx)(styles_1.ASSelectedBoxMWStyled, { ref: navBarHighlightBoxRef, theme: theme }), (0, jsx_runtime_1.jsx)(styles_1.ScrollableNavBarItems, { id: "ScrollableNavBarItems", ref: scrollContainerRef, onScrollEnd: onScrollEndedHandler, children: navItems.map((item, index) => ((0, jsx_runtime_1.jsx)(styles_1.ASNavBarItemMWStyled, { theme: theme, itemId: item.itemId, selected: isSelected(item.itemId), displayText: item.displayText, icon: item.icon, size: size, title: item.displayText, onItemClick: () => setShowSelectionPanel(true) }, `key_${index}_${item.itemId}`))) }), (0, jsx_runtime_1.jsx)(navbararrowbuttons_1.default, { ...styleOptions, onArrowButtonClicked: onButtonsPressed, theme: theme, size: size, totalItemCount: navItems.length, selectedIndex: selectedIndex, styleOptions: styleOptions }), (0, jsx_runtime_1.jsx)(asmodal_1.default, { isOpen: showSelectionPanel, onBackdropClick: () => setShowSelectionPanel(false), className: className, children: (0, jsx_runtime_1.jsx)(navbarpickpanel_1.default, { theme: theme, size: size, className: className, navItems: navItems, selectedId: selected, selectedIndex: selectedIndex, onItemSelected: onNavBarItemPickedHandler }) })] }));
|
|
101
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.ASNavBarMWStyled, { id: id, ref: navBarRef, className: `${className} ${size}`, theme: theme, ...styleOptions, children: [(0, jsx_runtime_1.jsx)(styles_1.ASSelectedBoxMWStyled, { ref: navBarHighlightBoxRef, theme: theme }), (0, jsx_runtime_1.jsx)(styles_1.ScrollableNavBarItems, { id: "ScrollableNavBarItems", ref: scrollContainerRef, onScrollEnd: onScrollEndedHandler, children: navItems.map((item, index) => ((0, jsx_runtime_1.jsx)(styles_1.ASNavBarItemMWStyled, { theme: theme, itemId: item.itemId, selected: isSelected(item.itemId), displayText: item.displayText, icon: item.icon, size: size, title: item.displayText, onItemClick: () => setShowSelectionPanel(true) }, `key_${index}_${item.itemId}`))) }), (0, jsx_runtime_1.jsx)(navbararrowbuttons_1.default, { ...styleOptions, onArrowButtonClicked: onButtonsPressed, theme: theme, size: size, totalItemCount: navItems.length, selectedIndex: selectedIndex, styleOptions: styleOptions, isMobile: true }), (0, jsx_runtime_1.jsx)(asmodal_1.default, { isOpen: showSelectionPanel, onBackdropClick: () => setShowSelectionPanel(false), className: className, children: (0, jsx_runtime_1.jsx)(navbarpickpanel_1.default, { theme: theme, size: size, className: className, navItems: navItems, selectedId: selected, selectedIndex: selectedIndex, onItemSelected: onNavBarItemPickedHandler }) })] }));
|
|
102
102
|
};
|
|
103
103
|
exports.default = ASNavBarMW;
|
|
@@ -27,10 +27,5 @@ interface ASNavBarItemStyledProps {
|
|
|
27
27
|
export declare const ASNavBarItemMWStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("../ASNavBar.types").ASNavBarItemProps, ASNavBarItemStyledProps>> & string & Omit<import("react").FC<import("../ASNavBar.types").ASNavBarItemProps>, keyof import("react").Component<any, {}, any>>;
|
|
28
28
|
export declare const ScrollableNavBarItems: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
29
29
|
export declare const ASNavBarMWStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarStyledProps>> & string;
|
|
30
|
-
interface ASNavBarItemPaddingProps {
|
|
31
|
-
theme: ASTheme;
|
|
32
|
-
$selected?: boolean;
|
|
33
|
-
}
|
|
34
|
-
export declare const ASNavBarItemPadding: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarItemPaddingProps>> & string;
|
|
35
30
|
export {};
|
|
36
31
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/mobile/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAwB1E,UAAU,8BAA8B;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,eAAO,MAAM,qBAAqB,qQAgBjC,CAAC;AAEF,UAAU,mBAAoB,SAAQ,oBAAoB;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,uBAAuB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,oBAAoB,iUAwDhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,6NA0BjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,wPAkB5B,CAAC
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/mobile/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAwB1E,UAAU,8BAA8B;IACtC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AACD,eAAO,MAAM,qBAAqB,qQAgBjC,CAAC;AAEF,UAAU,mBAAoB,SAAQ,oBAAoB;IACxD,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,uBAAuB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AACD,eAAO,MAAM,oBAAoB,iUAwDhC,CAAC;AAEF,eAAO,MAAM,qBAAqB,6NA0BjC,CAAC;AAEF,eAAO,MAAM,gBAAgB,wPAkB5B,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ASNavBarMWStyled = exports.ScrollableNavBarItems = exports.ASNavBarItemMWStyled = exports.ASSelectedBoxMWStyled = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
6
|
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
@@ -137,25 +137,8 @@ exports.ASNavBarMWStyled = styled_components_1.default.div `
|
|
|
137
137
|
max-width: ${({ $maxWidth = 300, $maxWidthUnit = 'px' }) => `${$maxWidth}${$maxWidthUnit}`};
|
|
138
138
|
border-radius: ${({ $borderRadius = 6 }) => $borderRadius}px;
|
|
139
139
|
background-color: ${({ theme }) => theme.navbar.navBarBackgroundColor};
|
|
140
|
-
padding: ${({ $padding = '0
|
|
140
|
+
padding: ${({ $padding = '0' }) => $padding};
|
|
141
141
|
box-shadow: ${({ theme }) => theme.navbar.navBarBoxShadow};
|
|
142
142
|
|
|
143
143
|
${dimensionsForSizes}
|
|
144
144
|
`;
|
|
145
|
-
exports.ASNavBarItemPadding = styled_components_1.default.div `
|
|
146
|
-
padding: 0 4px;
|
|
147
|
-
pointer-events: none;
|
|
148
|
-
user-select: none;
|
|
149
|
-
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
150
|
-
? `
|
|
151
|
-
& > div > svg > path {
|
|
152
|
-
stroke-width: 0.4;
|
|
153
|
-
stroke: ${theme.navbar.navBarItemColorSelected};
|
|
154
|
-
}`
|
|
155
|
-
: `
|
|
156
|
-
& > div > svg > path {
|
|
157
|
-
stroke-width: 0.4;
|
|
158
|
-
stroke: ${theme.navbar.navBarItemColor};
|
|
159
|
-
}
|
|
160
|
-
`};
|
|
161
|
-
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASNavBarArrowButtons.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAMzE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,
|
|
1
|
+
{"version":3,"file":"ASNavBarArrowButtons.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAgB,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAK/D,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAMzE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CAmCvF,CAAC;AAEF,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2BhE,CAAC;AAEF,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CA2BjE,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -10,24 +10,24 @@ const icons_1 = require("../../icons");
|
|
|
10
10
|
const styles_1 = require("./styles");
|
|
11
11
|
const clsY = 'background: goldenrod; color: #000000; border-radius: 10px;';
|
|
12
12
|
const clsG = 'background: forestgreen; color: #000000; border-radius: 10px;';
|
|
13
|
-
const ASNavBarArrowButtons = ({ className = '', onArrowButtonClicked = () => undefined, selectedIndex = 0, totalItemCount = 0, size = apptypes_1.ComponentSize.Medium, styleOptions = ASNavBar_1.defaultNavBarStyleOptions, theme = astheme_1.default, }) => {
|
|
14
|
-
return ((0, jsx_runtime_1.jsxs)(styles_1.ASNavBarArrowButtonsStyled, { className: `${className} ${size}`, theme: theme, styleOptions: styleOptions, children: [(0, jsx_runtime_1.jsx)(ASLeftNavBarArrowButton, { onArrowButtonClicked: onArrowButtonClicked, theme: theme, size: size, selectedIndex: selectedIndex, disabled: selectedIndex <= 0 }), (0, jsx_runtime_1.jsx)(ASRightNavBarArrowButton, { onArrowButtonClicked: onArrowButtonClicked, theme: theme, size: size, selectedIndex: selectedIndex, disabled: selectedIndex >= totalItemCount - 1 })] }));
|
|
13
|
+
const ASNavBarArrowButtons = ({ className = '', onArrowButtonClicked = () => undefined, selectedIndex = 0, totalItemCount = 0, size = apptypes_1.ComponentSize.Medium, styleOptions = ASNavBar_1.defaultNavBarStyleOptions, theme = astheme_1.default, isMobile = false, }) => {
|
|
14
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.ASNavBarArrowButtonsStyled, { className: `${className} ${size}`, theme: theme, isMobile: isMobile, styleOptions: styleOptions, children: [(0, jsx_runtime_1.jsx)(ASLeftNavBarArrowButton, { onArrowButtonClicked: onArrowButtonClicked, theme: theme, size: size, selectedIndex: selectedIndex, disabled: selectedIndex <= 0, isMobile: isMobile }), (0, jsx_runtime_1.jsx)(ASRightNavBarArrowButton, { onArrowButtonClicked: onArrowButtonClicked, theme: theme, size: size, selectedIndex: selectedIndex, disabled: selectedIndex >= totalItemCount - 1, isMobile: isMobile })] }));
|
|
15
15
|
};
|
|
16
16
|
exports.ASNavBarArrowButtons = ASNavBarArrowButtons;
|
|
17
17
|
exports.default = exports.ASNavBarArrowButtons;
|
|
18
|
-
const ASLeftNavBarArrowButton = ({ size = apptypes_1.ComponentSize.Medium, theme = astheme_1.default, disabled = false, onArrowButtonClicked = () => undefined, }) => {
|
|
18
|
+
const ASLeftNavBarArrowButton = ({ size = apptypes_1.ComponentSize.Medium, theme = astheme_1.default, disabled = false, onArrowButtonClicked = () => undefined, isMobile = false, }) => {
|
|
19
19
|
const tapHandler = (e, dir) => {
|
|
20
20
|
console.log(`e: %c ${e.currentTarget.role} %c, dir: %c ${dir} %c`, clsG, '', clsY, '');
|
|
21
21
|
onArrowButtonClicked(e, dir);
|
|
22
22
|
};
|
|
23
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.ASIconButtonLeftStyled, { icon: icons_1.ArrowLeftIcon, onIconButtonTap: (e) => tapHandler(e, apptypes_1.ArrowButtonDirection.Left), theme: theme, size: size, toggle: false, selected: false, disabled: disabled, id: "LeftButtonId", iconSize: size === apptypes_1.ComponentSize.Large ? 32 : size === apptypes_1.ComponentSize.Medium ? 28 : 24, fillColor: theme.button.buttonIconColor }));
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASIconButtonLeftStyled, { icon: icons_1.ArrowLeftIcon, onIconButtonTap: (e) => tapHandler(e, apptypes_1.ArrowButtonDirection.Left), theme: theme, size: size, toggle: false, selected: false, disabled: disabled, isMobile: isMobile, id: "LeftButtonId", iconSize: size === apptypes_1.ComponentSize.Large ? 32 : size === apptypes_1.ComponentSize.Medium ? 28 : 24, fillColor: theme.button.buttonIconColor }));
|
|
24
24
|
};
|
|
25
25
|
exports.ASLeftNavBarArrowButton = ASLeftNavBarArrowButton;
|
|
26
|
-
const ASRightNavBarArrowButton = ({ size = apptypes_1.ComponentSize.Medium, theme = astheme_1.default, onArrowButtonClicked = () => undefined, disabled = false, }) => {
|
|
26
|
+
const ASRightNavBarArrowButton = ({ size = apptypes_1.ComponentSize.Medium, theme = astheme_1.default, onArrowButtonClicked = () => undefined, disabled = false, isMobile = false, }) => {
|
|
27
27
|
const tapHandler = (e, dir) => {
|
|
28
28
|
console.log(`e: %c ${e.currentTarget.role} %c, dir: %c ${dir} %c`, clsG, '', clsY, '');
|
|
29
29
|
onArrowButtonClicked(e, dir);
|
|
30
30
|
};
|
|
31
|
-
return ((0, jsx_runtime_1.jsx)(styles_1.ASIconButtonRightStyled, { icon: icons_1.ArrowRightIcon, onIconButtonTap: (e) => tapHandler(e, apptypes_1.ArrowButtonDirection.Right), theme: theme, toggle: false, selected: false, size: size, disabled: disabled, id: "RightButtonId", iconSize: size === apptypes_1.ComponentSize.Large ? 32 : size === apptypes_1.ComponentSize.Medium ? 28 : 24, fillColor: theme.button.buttonIconColor }));
|
|
31
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASIconButtonRightStyled, { icon: icons_1.ArrowRightIcon, onIconButtonTap: (e) => tapHandler(e, apptypes_1.ArrowButtonDirection.Right), theme: theme, toggle: false, selected: false, size: size, disabled: disabled, isMobile: isMobile, id: "RightButtonId", iconSize: size === apptypes_1.ComponentSize.Large ? 32 : size === apptypes_1.ComponentSize.Medium ? 28 : 24, fillColor: theme.button.buttonIconColor }));
|
|
32
32
|
};
|
|
33
33
|
exports.ASRightNavBarArrowButton = ASRightNavBarArrowButton;
|
|
@@ -6,6 +6,7 @@ export interface ASNavBarArrowButtonsStyledProps {
|
|
|
6
6
|
icon?: React.ReactNode;
|
|
7
7
|
theme?: ASTheme;
|
|
8
8
|
size?: ASComponentSize;
|
|
9
|
+
isMobile?: boolean;
|
|
9
10
|
styleOptions?: ASNavBarStyleOptions;
|
|
10
11
|
}
|
|
11
12
|
export type ASNavBarArrowButtonClickFn = (event: PointerEvent, dir: ASComponentDirection) => void;
|
|
@@ -15,6 +16,7 @@ export type ASNavBarArrowButtonsProps = {
|
|
|
15
16
|
selectedIndex?: number;
|
|
16
17
|
totalItemCount?: number;
|
|
17
18
|
onArrowButtonClicked?: ASNavBarArrowButtonClickFn;
|
|
19
|
+
isMobile?: boolean;
|
|
18
20
|
size?: ASComponentSize;
|
|
19
21
|
styleOptions?: ASNavBarStyleOptions;
|
|
20
22
|
disabled?: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ASNavBarArrowButtons.types.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEtG,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAElG,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;IAClD,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
1
|
+
{"version":3,"file":"ASNavBarArrowButtons.types.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAEtG,MAAM,WAAW,+BAA+B;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,oBAAoB,CAAC;CACrC;AAED,MAAM,MAAM,0BAA0B,GAAG,CAAC,KAAK,EAAE,YAAY,EAAE,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAElG,MAAM,MAAM,yBAAyB,GAAG;IACtC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;IAClD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,eAAe,CAAC;IACvB,YAAY,CAAC,EAAE,oBAAoB,CAAC;IACpC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC"}
|
|
@@ -12,32 +12,28 @@ interface ASNavBarIconButtonStyledProps {
|
|
|
12
12
|
}
|
|
13
13
|
export declare const ASIconButtonRightStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
|
|
14
14
|
className?: string;
|
|
15
|
-
text?: string;
|
|
16
15
|
selected?: boolean;
|
|
17
16
|
toggle?: boolean;
|
|
18
17
|
size?: ASComponentSize;
|
|
19
18
|
iconSize?: number;
|
|
20
19
|
theme?: ASTheme;
|
|
21
|
-
paddingSize?: import("../../apptypes").ASPaddingSize;
|
|
22
20
|
isLoading?: boolean;
|
|
23
21
|
icon: import("react").FC<import("react").PropsWithChildren<import("../..").IconProps>>;
|
|
24
22
|
onIconButtonTap?: (e: import("react").PointerEvent) => void;
|
|
25
|
-
} & import("../..").IconProps & Omit<import("react").HTMLProps<HTMLDivElement>, "size"> & {
|
|
23
|
+
} & import("../..").IconProps & Omit<import("react").HTMLProps<HTMLDivElement>, "text" | "size"> & {
|
|
26
24
|
children?: import("react").ReactNode | undefined;
|
|
27
25
|
}, ASNavBarIconButtonStyledProps>> & string & Omit<import("react").FC<import("../../asiconbutton").ASIconButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
28
26
|
export declare const ASIconButtonLeftStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
|
|
29
27
|
className?: string;
|
|
30
|
-
text?: string;
|
|
31
28
|
selected?: boolean;
|
|
32
29
|
toggle?: boolean;
|
|
33
30
|
size?: ASComponentSize;
|
|
34
31
|
iconSize?: number;
|
|
35
32
|
theme?: ASTheme;
|
|
36
|
-
paddingSize?: import("../../apptypes").ASPaddingSize;
|
|
37
33
|
isLoading?: boolean;
|
|
38
34
|
icon: import("react").FC<import("react").PropsWithChildren<import("../..").IconProps>>;
|
|
39
35
|
onIconButtonTap?: (e: import("react").PointerEvent) => void;
|
|
40
|
-
} & import("../..").IconProps & Omit<import("react").HTMLProps<HTMLDivElement>, "size"> & {
|
|
36
|
+
} & import("../..").IconProps & Omit<import("react").HTMLProps<HTMLDivElement>, "text" | "size"> & {
|
|
41
37
|
children?: import("react").ReactNode | undefined;
|
|
42
38
|
}, ASNavBarIconButtonStyledProps>> & string & Omit<import("react").FC<import("../../asiconbutton").ASIconButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
43
39
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAiB,MAAM,gBAAgB,CAAC;AAGzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAwC/E,eAAO,MAAM,0BAA0B,
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,OAAO,EAAiB,MAAM,gBAAgB,CAAC;AAGzE,OAAO,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC;AAwC/E,eAAO,MAAM,0BAA0B,oQA+BtC,CAAC;AAEF,UAAU,6BAA6B;IACrC,KAAK,EAAE,OAAO,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,eAAe,CAAC;CACxB;AAED,eAAO,MAAM,uBAAuB;;;;;;;;;;;;qKAKnC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;qKAKlC,CAAC"}
|
|
@@ -24,7 +24,7 @@ const dimensionsForSizes = (0, styled_components_1.css) `
|
|
|
24
24
|
&.ASLarge {
|
|
25
25
|
height: 50px;
|
|
26
26
|
max-height: 50px;
|
|
27
|
-
font-size:
|
|
27
|
+
font-size: 2rem;
|
|
28
28
|
font-weight: 600;
|
|
29
29
|
}
|
|
30
30
|
`;
|
|
@@ -33,44 +33,47 @@ const scrollEdgesCover = (0, styled_components_1.css) `
|
|
|
33
33
|
background: #333333;
|
|
34
34
|
position: absolute;
|
|
35
35
|
top: 0;
|
|
36
|
-
height:
|
|
36
|
+
height: 96%;
|
|
37
37
|
border-radius: 6px;
|
|
38
38
|
`;
|
|
39
39
|
const getWidthBySize = (size) => size === apptypes_1.ComponentSize.Large ? 50 : apptypes_1.ComponentSize.Medium === size ? 40 : 30;
|
|
40
40
|
exports.ASNavBarArrowButtonsStyled = styled_components_1.default.div `
|
|
41
41
|
position: fixed;
|
|
42
|
-
|
|
43
|
-
left: calc(anchor(left) + 2px);
|
|
44
|
-
right: calc(anchor(right) - 2px);
|
|
42
|
+
contain: strict;
|
|
45
43
|
display: ${({ styleOptions = ASNavBar_1.defaultNavBarStyleOptions }) => styleOptions.$hideNavArrowButtonsInDW ? 'none' : 'flex'};
|
|
46
44
|
align-items: center;
|
|
47
45
|
justify-content: space-between;
|
|
48
46
|
width: -webkit-fill-available;
|
|
47
|
+
max-width: ${({ styleOptions = ASNavBar_1.defaultNavBarStyleOptions, isMobile = false }) => styleOptions.$maxWidth && styleOptions.$maxWidthUnit
|
|
48
|
+
? `${styleOptions.$maxWidth}${styleOptions.$maxWidthUnit}`
|
|
49
|
+
: isMobile
|
|
50
|
+
? '300px'
|
|
51
|
+
: '100%'};
|
|
49
52
|
pointer-events: none;
|
|
50
53
|
user-select: none;
|
|
51
54
|
z-index: 10;
|
|
52
55
|
|
|
53
56
|
&:before {
|
|
54
57
|
${scrollEdgesCover}
|
|
55
|
-
width: ${({ size = apptypes_1.ComponentSize.Medium }) => `calc(${getWidthBySize(size)}px +
|
|
56
|
-
left:
|
|
58
|
+
width: ${({ size = apptypes_1.ComponentSize.Medium }) => `calc(${getWidthBySize(size)}px + 6px)`};
|
|
59
|
+
left: 0;
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
&:after {
|
|
60
63
|
${scrollEdgesCover}
|
|
61
|
-
width: ${({ size = apptypes_1.ComponentSize.Medium }) => `calc(${getWidthBySize(size)}px +
|
|
62
|
-
right:
|
|
64
|
+
width: ${({ size = apptypes_1.ComponentSize.Medium }) => `calc(${getWidthBySize(size)}px + 6px)`};
|
|
65
|
+
right: 0;
|
|
63
66
|
}
|
|
64
67
|
|
|
65
68
|
${dimensionsForSizes}
|
|
66
69
|
`;
|
|
67
70
|
exports.ASIconButtonRightStyled = (0, styled_components_1.default)(asiconbutton_1.default) `
|
|
68
|
-
margin: ${({ size = apptypes_1.ComponentSize.Medium }) => size === apptypes_1.ComponentSize.Small ? '0 10px' : size === apptypes_1.ComponentSize.Large ? '0
|
|
71
|
+
margin: ${({ size = apptypes_1.ComponentSize.Medium }) => size === apptypes_1.ComponentSize.Small ? '0 10px' : size === apptypes_1.ComponentSize.Large ? '0' : '0 5px 0 0'};
|
|
69
72
|
z-index: 1;
|
|
70
|
-
scale: 0.
|
|
73
|
+
scale: ${({ size = apptypes_1.ComponentSize.Medium }) => (size === apptypes_1.ComponentSize.Large ? '0.75' : '0.75')};
|
|
71
74
|
`;
|
|
72
75
|
exports.ASIconButtonLeftStyled = (0, styled_components_1.default)(asiconbutton_1.default) `
|
|
73
|
-
margin: ${({ size = apptypes_1.ComponentSize.Medium }) => size === apptypes_1.ComponentSize.Small ? '0 10px' : size === apptypes_1.ComponentSize.Large ? '0
|
|
76
|
+
margin: ${({ size = apptypes_1.ComponentSize.Medium }) => size === apptypes_1.ComponentSize.Small ? '0 10px' : size === apptypes_1.ComponentSize.Large ? '0' : '0 5px'};
|
|
74
77
|
z-index: 1;
|
|
75
|
-
scale: 0.
|
|
78
|
+
scale: ${({ size = apptypes_1.ComponentSize.Medium }) => (size === apptypes_1.ComponentSize.Large ? '0.75' : '0.75')};
|
|
76
79
|
`;
|
package/dist/asnavbar/styles.js
CHANGED
|
@@ -77,7 +77,7 @@ exports.ASNavBarStyled = styled_components_1.default.div `
|
|
|
77
77
|
${({ $hideHorizontalScrollbarInDW = true }) => $hideHorizontalScrollbarInDW ? HideScrollBarConfig : ShowScrollBarConfig};
|
|
78
78
|
`;
|
|
79
79
|
exports.ASNavBarLeadingIconPadding = styled_components_1.default.div `
|
|
80
|
-
padding: 0 4px;
|
|
80
|
+
// padding: 0 4px;
|
|
81
81
|
pointer-events: none;
|
|
82
82
|
user-select: none;
|
|
83
83
|
${({ $selected = false, theme = astheme_1.default }) => $selected
|