@eleventheye/asui 2.8.0 → 2.8.1

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.
@@ -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;AAc9D,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAmJvC,CAAC;AAEF,eAAe,UAAU,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,CAiJvC,CAAC;AAEF,eAAe,UAAU,CAAC"}
@@ -38,12 +38,11 @@ const ASNavBarDW = ({ id = `asnavbar-dw-${(0, uuid_1.v4)()}`, className = '', na
38
38
  });
39
39
  };
40
40
  const onScrollEndHandler = () => {
41
- if (!navBarHighlightBoxRef.current || !navBarScrollRef.current || !navBarRef.current || !selectedItemElRef.current)
41
+ if (!navBarHighlightBoxRef.current || !navBarScrollRef.current || !selectedItemElRef.current)
42
42
  return;
43
43
  const selectedItemEl = selectedItemElRef.current;
44
44
  const selectedElRect = selectedItemEl.getBoundingClientRect();
45
45
  const parentRect = navBarScrollRef.current.getBoundingClientRect();
46
- const rootRect = navBarRef.current.getBoundingClientRect();
47
46
  const offsetToSelectedEl = selectedElRect.left - parentRect.left;
48
47
  const selectedBox = navBarHighlightBoxRef.current;
49
48
  const selectedBoxWidth = selectedElRect.width;
@@ -98,6 +97,6 @@ const ASNavBarDW = ({ id = `asnavbar-dw-${(0, uuid_1.v4)()}`, className = '', na
98
97
  };
99
98
  const onItemResizedHandler = (itemId, item) => slideHighlightToSelectedItem(item, itemId);
100
99
  const isSelected = (itemId) => selected === itemId;
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
+ 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, ...styleOptions, 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 })] }));
102
101
  };
103
102
  exports.default = ASNavBarDW;
@@ -7,6 +7,7 @@ interface ASNavBarStyledProps {
7
7
  $minWidth?: number;
8
8
  $borderRadius?: number;
9
9
  $padding?: string;
10
+ $hideNavArrowButtonsInDW?: boolean;
10
11
  }
11
12
  export declare const ASNavBarDWStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarStyledProps>> & string;
12
13
  interface ASNavBarSelectedBoxStyledProps {
@@ -25,7 +26,7 @@ interface ASNavBarItemStyledProps {
25
26
  }
26
27
  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
28
  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;
29
+ export declare const ASNavBarScrollableItems: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarStyledProps>> & string;
29
30
  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;
30
31
  export {};
31
32
  //# 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,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;AAEF,eAAO,MAAM,uBAAuB,6NAInC,CAAC;AAEF,eAAO,MAAM,uBAAuB,6NAYnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,wPAiBnC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/desktop/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAIpD,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;IAClB,wBAAwB,CAAC,EAAE,OAAO,CAAC;CACpC;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;AAEF,eAAO,MAAM,uBAAuB,6NAInC,CAAC;AAEF,eAAO,MAAM,uBAAuB,wPAYnC,CAAC;AAEF,eAAO,MAAM,uBAAuB,wPAiBnC,CAAC"}
@@ -4,22 +4,7 @@ exports.ASScrollContainerStyled = exports.ASNavBarScrollableItems = exports.ASNa
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
+ const ASSharedStyles_1 = require("../../astheme/ASSharedStyles");
23
8
  const dimensionsForSizes = (0, styled_components_1.css) `
24
9
  &.ASSmall {
25
10
  height: 30px;
@@ -35,7 +20,7 @@ const dimensionsForSizes = (0, styled_components_1.css) `
35
20
 
36
21
  &.ASLarge {
37
22
  height: 50px;
38
- font-size: 2.1rem;
23
+ font-size: 2rem;
39
24
  font-weight: 500;
40
25
  }
41
26
  `;
@@ -47,7 +32,7 @@ exports.ASNavBarDWStyled = styled_components_1.default.div `
47
32
  flex-direction: row;
48
33
  position: relative;
49
34
  gap: ${({ $gap = 30 }) => $gap}px;
50
- width: -webkit-fill-available;
35
+ ${ASSharedStyles_1.MaxWidthStyle}
51
36
  contain: layout;
52
37
  grid-row: 1;
53
38
  min-width: ${({ $minWidth = 300 }) => $minWidth}px;
@@ -127,9 +112,9 @@ exports.ASNavBarScrollableItems = styled_components_1.default.div `
127
112
  position: relative;
128
113
  overflow: hidden;
129
114
  width: fit-content;
130
- padding: 0 44px;
115
+ padding: ${({ $hideNavArrowButtonsInDW }) => ($hideNavArrowButtonsInDW ? '0' : '0 44px')};
131
116
  height: 95%;
132
- ${HideScrollBarConfig}
117
+ ${ASSharedStyles_1.HideScrollBarStyle}
133
118
  `;
134
119
  exports.ASScrollContainerStyled = styled_components_1.default.div `
135
120
  display: flex;
@@ -147,5 +132,5 @@ exports.ASScrollContainerStyled = styled_components_1.default.div `
147
132
  scroll-snap-stop: always;
148
133
  scroll-snap-align: center;
149
134
  }
150
- ${HideScrollBarConfig}
135
+ ${ASSharedStyles_1.HideScrollBarStyle}
151
136
  `;
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asnavbar/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAGvE,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;CACpB;AAwCD,eAAO,MAAM,cAAc,wPAoC1B,CAAC;AAEF,UAAU,wBAAwB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,0BAA0B,6PAgBtC,CAAC"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/asnavbar/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AAIvE,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;CACpB;AAED,eAAO,MAAM,cAAc,wPAgC1B,CAAC;AAEF,UAAU,wBAAwB;IAChC,KAAK,EAAE,OAAO,CAAC;IACf,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,0BAA0B,6PAetC,CAAC"}
@@ -2,44 +2,9 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.ASNavBarLeadingIconPadding = exports.ASNavBarStyled = void 0;
4
4
  const tslib_1 = require("tslib");
5
- const styled_components_1 = tslib_1.__importStar(require("styled-components"));
5
+ const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
6
6
  const astheme_1 = tslib_1.__importDefault(require("../astheme"));
7
- const ShowScrollBarConfig = (0, styled_components_1.css) `
8
- /* Chrome, Edge, and Safari */
9
- &::-webkit-scrollbar {
10
- width: 1px;
11
- height: 1px; // Set scrollbar height (horizontal)
12
- background: transparent;
13
- scrollbar-color: #ffda3f transparent; // thumb color, track color
14
- scrollbar-width: thinner;
15
- }
16
- &::-webkit-scrollbar-track {
17
- background: transparent;
18
- height: 1px; // Set scrollbar track height (horizontal)
19
- width: 1px;
20
- }
21
-
22
- &::-webkit-scrollbar-thumb {
23
- background: linear-gradient(to bottom, rgb(22, 19, 8) 0%, rgb(255, 204, 0) 75%, rgb(66, 55, 14) 100%);
24
- border-radius: 3px;
25
- height: 1px; // Set scrollbar track height (horizontal)
26
- width: 1px;
27
- }
28
-
29
- /* Firefox */
30
- scrollbar-color: #ffda3f transparent; // thumb color, track color
31
- scrollbar-width: thinner;
32
- `;
33
- const HideScrollBarConfig = (0, styled_components_1.css) `
34
- /* Hide scrollbar for Chrome, Safari and Opera */
35
- &::-webkit-scrollbar {
36
- display: none;
37
- }
38
-
39
- /* Hide scrollbar for IE, Edge and Firefox */
40
- -ms-overflow-style: none; /* IE and Edge */
41
- scrollbar-width: none; /* Firefox */
42
- `;
7
+ const ASSharedStyles_1 = require("../astheme/ASSharedStyles");
43
8
  exports.ASNavBarStyled = styled_components_1.default.div `
44
9
  anchor-name: --navbarAnchor;
45
10
  display: grid;
@@ -50,7 +15,6 @@ exports.ASNavBarStyled = styled_components_1.default.div `
50
15
  grid-column: 3;
51
16
  grid-row: 1;
52
17
  grid-gap: 16px;
53
- // display: flex;
54
18
  flex-direction: column;
55
19
  align-items: flex-start;
56
20
  justify-content: flex-start;
@@ -63,21 +27,17 @@ exports.ASNavBarStyled = styled_components_1.default.div `
63
27
  background-color: ${({ theme }) => theme.navbar.navBarBackgroundColor};
64
28
  box-shadow: ${({ theme }) => theme.navbar.navBarBoxShadow};
65
29
 
66
- width: 100%;
67
- @supports (width: -webkit-fill-available) {
68
- width: -webkit-fill-available;
69
- max-width: ${({ $maxWidth = 100, $maxWidthUnit = '%' }) => `${$maxWidth}${$maxWidthUnit}`};
70
- }
30
+ ${ASSharedStyles_1.MaxWidthStyle}
31
+ max-width: ${({ $maxWidth = 100, $maxWidthUnit = '%' }) => `${$maxWidth}${$maxWidthUnit}`};
71
32
 
72
- @media screen and (max-width: 768px) {
33
+ @media screen and (max-width: 425px) {
73
34
  max-width: 300px;
74
35
  width: 100%;
75
36
  }
76
37
 
77
- ${({ $hideHorizontalScrollbarInDW = true }) => $hideHorizontalScrollbarInDW ? HideScrollBarConfig : ShowScrollBarConfig};
38
+ ${({ $hideHorizontalScrollbarInDW = true }) => $hideHorizontalScrollbarInDW ? ASSharedStyles_1.HideScrollBarStyle : ASSharedStyles_1.ShowScrollBarStyle};
78
39
  `;
79
40
  exports.ASNavBarLeadingIconPadding = styled_components_1.default.div `
80
- // padding: 0 4px;
81
41
  pointer-events: none;
82
42
  user-select: none;
83
43
  ${({ $selected = false, theme = astheme_1.default }) => $selected
@@ -0,0 +1,4 @@
1
+ export declare const ShowScrollBarStyle: import("styled-components").RuleSet<object>;
2
+ export declare const HideScrollBarStyle: import("styled-components").RuleSet<object>;
3
+ export declare const MaxWidthStyle: import("styled-components").RuleSet<object>;
4
+ //# sourceMappingURL=ASSharedStyles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ASSharedStyles.d.ts","sourceRoot":"","sources":["../../src/astheme/ASSharedStyles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,kBAAkB,6CAyB9B,CAAC;AAEF,eAAO,MAAM,kBAAkB,6CAS9B,CAAC;AAEF,eAAO,MAAM,aAAa,6CAKzB,CAAC"}
@@ -0,0 +1,46 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.MaxWidthStyle = exports.HideScrollBarStyle = exports.ShowScrollBarStyle = void 0;
4
+ const styled_components_1 = require("styled-components");
5
+ exports.ShowScrollBarStyle = (0, styled_components_1.css) `
6
+ /* Chrome, Edge, and Safari */
7
+ &::-webkit-scrollbar {
8
+ width: 1px;
9
+ height: 1px; // Set scrollbar height (horizontal)
10
+ background: transparent;
11
+ scrollbar-color: #ffda3f transparent; // thumb color, track color
12
+ scrollbar-width: thinner;
13
+ }
14
+ &::-webkit-scrollbar-track {
15
+ background: transparent;
16
+ height: 1px; // Set scrollbar track height (horizontal)
17
+ width: 1px;
18
+ }
19
+
20
+ &::-webkit-scrollbar-thumb {
21
+ background: linear-gradient(to bottom, rgb(22, 19, 8) 0%, rgb(255, 204, 0) 75%, rgb(66, 55, 14) 100%);
22
+ border-radius: 3px;
23
+ height: 1px; // Set scrollbar track height (horizontal)
24
+ width: 1px;
25
+ }
26
+
27
+ /* Firefox */
28
+ scrollbar-color: #ffda3f transparent; // thumb color, track color
29
+ scrollbar-width: thinner;
30
+ `;
31
+ exports.HideScrollBarStyle = (0, styled_components_1.css) `
32
+ /* Hide scrollbar for Chrome, Safari and Opera */
33
+ &::-webkit-scrollbar {
34
+ display: none;
35
+ }
36
+
37
+ /* Hide scrollbar for IE, Edge and Firefox */
38
+ -ms-overflow-style: none; /* IE and Edge */
39
+ scrollbar-width: none; /* Firefox */
40
+ `;
41
+ exports.MaxWidthStyle = (0, styled_components_1.css) `
42
+ width: 100%;
43
+ @supports (width: -webkit-fill-available) {
44
+ width: -webkit-fill-available;
45
+ }
46
+ `;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eleventheye/asui",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "private": false,
5
5
  "description": "AS UI React Library by eleventheye (another one!)",
6
6
  "keywords": [