@eleventheye/asui 2.5.5 → 2.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/apptypes/ASUI.types.d.ts +37 -3
- package/dist/apptypes/ASUI.types.d.ts.map +1 -1
- package/dist/apptypes/ASUI.types.js +18 -1
- package/dist/apptypes/index.d.ts +1 -1
- package/dist/apptypes/index.d.ts.map +1 -1
- package/dist/apptypes/index.js +5 -1
- package/dist/asdropdown/ASDropdown.js +1 -1
- package/dist/asiconbutton/ASIconButton.d.ts +5 -0
- package/dist/asiconbutton/ASIconButton.d.ts.map +1 -0
- package/dist/asiconbutton/ASIconButton.js +31 -0
- package/dist/asiconbutton/ASIconButton.types.d.ts +17 -0
- package/dist/asiconbutton/ASIconButton.types.d.ts.map +1 -0
- package/dist/asiconbutton/ASIconButton.types.js +2 -0
- package/dist/asiconbutton/index.d.ts +3 -0
- package/dist/asiconbutton/index.d.ts.map +1 -0
- package/dist/asiconbutton/index.js +6 -0
- package/dist/asiconbutton/styles.d.ts +6 -0
- package/dist/asiconbutton/styles.d.ts.map +1 -0
- package/dist/asiconbutton/styles.js +179 -0
- package/dist/asmodal/ASModal.d.ts +5 -0
- package/dist/asmodal/ASModal.d.ts.map +1 -0
- package/dist/asmodal/ASModal.js +31 -0
- package/dist/asmodal/ASModal.types.d.ts +8 -0
- package/dist/asmodal/ASModal.types.d.ts.map +1 -0
- package/dist/asmodal/ASModal.types.js +2 -0
- package/dist/asmodal/index.d.ts +3 -0
- package/dist/asmodal/index.d.ts.map +1 -0
- package/dist/asmodal/index.js +6 -0
- package/dist/asmodal/styles.d.ts +2 -0
- package/dist/asmodal/styles.d.ts.map +1 -0
- package/dist/asmodal/styles.js +14 -0
- package/dist/asnavbar/ASNavBar.d.ts +3 -1
- package/dist/asnavbar/ASNavBar.d.ts.map +1 -1
- package/dist/asnavbar/ASNavBar.js +46 -45
- package/dist/asnavbar/ASNavBar.types.d.ts +6 -3
- package/dist/asnavbar/ASNavBar.types.d.ts.map +1 -1
- package/dist/asnavbar/desktop/ASNavBarDW.d.ts +5 -0
- package/dist/asnavbar/desktop/ASNavBarDW.d.ts.map +1 -0
- package/dist/asnavbar/desktop/ASNavBarDW.js +88 -0
- package/dist/asnavbar/desktop/index.d.ts +3 -0
- package/dist/asnavbar/desktop/index.d.ts.map +1 -0
- package/dist/asnavbar/desktop/index.js +6 -0
- package/dist/asnavbar/desktop/styles.d.ts +37 -0
- package/dist/asnavbar/desktop/styles.d.ts.map +1 -0
- package/dist/asnavbar/desktop/styles.js +133 -0
- package/dist/asnavbar/mobile/ASNavBarMW.d.ts +5 -0
- package/dist/asnavbar/mobile/ASNavBarMW.d.ts.map +1 -0
- package/dist/asnavbar/mobile/ASNavBarMW.js +98 -0
- package/dist/asnavbar/mobile/index.d.ts +3 -0
- package/dist/asnavbar/mobile/index.d.ts.map +1 -0
- package/dist/asnavbar/mobile/index.js +6 -0
- package/dist/asnavbar/mobile/styles.d.ts +59 -0
- package/dist/asnavbar/mobile/styles.d.ts.map +1 -0
- package/dist/asnavbar/mobile/styles.js +247 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.d.ts +7 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.d.ts.map +1 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.js +23 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.d.ts +22 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.d.ts.map +1 -0
- package/dist/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.js +2 -0
- package/dist/asnavbar/navbararrowbuttons/index.d.ts +3 -0
- package/dist/asnavbar/navbararrowbuttons/index.d.ts.map +1 -0
- package/dist/asnavbar/navbararrowbuttons/index.js +6 -0
- package/dist/asnavbar/navbararrowbuttons/styles.d.ts +42 -0
- package/dist/asnavbar/navbararrowbuttons/styles.d.ts.map +1 -0
- package/dist/asnavbar/navbararrowbuttons/styles.js +76 -0
- package/dist/asnavbar/{ASNavBarItem.d.ts → navbaritem/ASNavBarItem.d.ts} +1 -1
- package/dist/asnavbar/navbaritem/ASNavBarItem.d.ts.map +1 -0
- package/dist/asnavbar/navbaritem/ASNavBarItem.js +49 -0
- package/dist/asnavbar/navbaritem/index.d.ts +3 -0
- package/dist/asnavbar/navbaritem/index.d.ts.map +1 -0
- package/dist/asnavbar/navbaritem/index.js +6 -0
- package/dist/asnavbar/navbaritem/styles.d.ts +11 -0
- package/dist/asnavbar/navbaritem/styles.d.ts.map +1 -0
- package/dist/asnavbar/navbaritem/styles.js +73 -0
- package/dist/asnavbar/navbarpickpanel/ASNavBarPickPanel.d.ts +5 -0
- package/dist/asnavbar/navbarpickpanel/ASNavBarPickPanel.d.ts.map +1 -0
- package/dist/asnavbar/navbarpickpanel/ASNavBarPickPanel.js +27 -0
- package/dist/asnavbar/navbarpickpanel/ASNavBarPickPanel.types.d.ts +14 -0
- package/dist/asnavbar/navbarpickpanel/ASNavBarPickPanel.types.d.ts.map +1 -0
- package/dist/asnavbar/navbarpickpanel/ASNavBarPickPanel.types.js +2 -0
- package/dist/asnavbar/navbarpickpanel/index.d.ts +3 -0
- package/dist/asnavbar/navbarpickpanel/index.d.ts.map +1 -0
- package/dist/asnavbar/navbarpickpanel/index.js +6 -0
- package/dist/asnavbar/navbarpickpanel/styles.d.ts +11 -0
- package/dist/asnavbar/navbarpickpanel/styles.d.ts.map +1 -0
- package/dist/asnavbar/navbarpickpanel/styles.js +59 -0
- package/dist/asnavbar/navbarpickpanelitem/ASNavBarPickPanelItem.d.ts +5 -0
- package/dist/asnavbar/navbarpickpanelitem/ASNavBarPickPanelItem.d.ts.map +1 -0
- package/dist/asnavbar/{ASNavBarItem.js → navbarpickpanelitem/ASNavBarPickPanelItem.js} +8 -6
- package/dist/asnavbar/navbarpickpanelitem/index.d.ts +3 -0
- package/dist/asnavbar/navbarpickpanelitem/index.d.ts.map +1 -0
- package/dist/asnavbar/navbarpickpanelitem/index.js +6 -0
- package/dist/asnavbar/navbarpickpanelitem/styles.d.ts +11 -0
- package/dist/asnavbar/navbarpickpanelitem/styles.d.ts.map +1 -0
- package/dist/asnavbar/navbarpickpanelitem/styles.js +70 -0
- package/dist/asnavbar/styles.d.ts +1 -16
- package/dist/asnavbar/styles.d.ts.map +1 -1
- package/dist/asnavbar/styles.js +72 -94
- package/dist/astextfield/ASTextField.js +1 -1
- package/dist/astheme/ASThemeDefault.d.ts.map +1 -1
- package/dist/astheme/ASThemeDefault.js +6 -0
- package/dist/asutils/screenSizeHelpers.d.ts +2 -0
- package/dist/asutils/screenSizeHelpers.d.ts.map +1 -0
- package/dist/asutils/screenSizeHelpers.js +18 -0
- package/dist/icons/ASIcon.d.ts.map +1 -1
- package/dist/icons/ASIcon.js +4 -4
- package/dist/icons/AddItemIcon.js +1 -1
- package/dist/icons/AddUserIcon.js +1 -1
- package/dist/icons/ArrowLeftIcon.js +1 -1
- package/dist/icons/ArrowRightIcon.js +1 -1
- package/dist/icons/CalendarRangeIcon.js +1 -1
- package/dist/icons/CheckIcon.js +1 -1
- package/dist/icons/CloseIcon.js +1 -1
- package/dist/icons/DeleteIcon.d.ts.map +1 -1
- package/dist/icons/DeleteIcon.js +2 -2
- package/dist/icons/EleventheyeIcon.js +1 -1
- package/dist/icons/EmailIcon.js +1 -1
- package/dist/icons/ErrorIcon.js +1 -1
- package/dist/icons/EyeIcon.js +1 -1
- package/dist/icons/EyeSlashIcon.js +1 -1
- package/dist/icons/FootballIcon.js +1 -1
- package/dist/icons/GamesIcon.js +1 -1
- package/dist/icons/GearUserIcon.js +1 -1
- package/dist/icons/HeartIcon.js +1 -1
- package/dist/icons/HexagonIcon.js +1 -1
- package/dist/icons/HomeIcon.js +1 -1
- package/dist/icons/Icons.types.d.ts +2 -2
- package/dist/icons/Icons.types.d.ts.map +1 -1
- package/dist/icons/LockIcon.js +1 -1
- package/dist/icons/PasswordIcon.js +1 -1
- package/dist/icons/PenIcon.js +1 -1
- package/dist/icons/PodiumIcon.js +1 -1
- package/dist/icons/ReplayIcon.js +1 -1
- package/dist/icons/RulerIcon.js +1 -1
- package/dist/icons/SaveIcon.js +1 -1
- package/dist/icons/SearchIcon.js +1 -1
- package/dist/icons/StatsIcon.js +1 -1
- package/dist/icons/TimeLapseIcon.js +1 -1
- package/dist/icons/UnlockIcon.js +1 -1
- package/dist/icons/UserSettingsIcon.js +1 -1
- package/dist/icons/styles.d.ts.map +1 -1
- package/dist/icons/styles.js +2 -0
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -2
- package/package.json +1 -1
- package/dist/asnavbar/ASNavBarItem.d.ts.map +0 -1
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ASNavBarItemPadding = exports.ASNavBarMWStyled = exports.ScrollableNavBarItems = exports.ASNavBarItemMWStyled = exports.NavButtonsContainer = exports.ASSelectedBoxMWStyled = exports.NavControlRightButton = exports.NavControlLeftButton = exports.ASIconButtonStyled = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
|
+
const ASUI_types_1 = require("../../apptypes/ASUI.types");
|
|
7
|
+
const ASIconButton_1 = tslib_1.__importDefault(require("../../asiconbutton/ASIconButton"));
|
|
8
|
+
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
9
|
+
const icons_1 = require("../../icons");
|
|
10
|
+
const navbaritem_1 = tslib_1.__importDefault(require("../navbaritem"));
|
|
11
|
+
const getNavControlButtonStyle = (0, styled_components_1.css) `
|
|
12
|
+
pointer-events: all;
|
|
13
|
+
cursor: pointer;
|
|
14
|
+
|
|
15
|
+
&:active {
|
|
16
|
+
svg > path {
|
|
17
|
+
fill: rgb(61, 61, 61);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
> @media (hover) {
|
|
21
|
+
&:hover {
|
|
22
|
+
svg > path {
|
|
23
|
+
// fill: rgb(61, 61, 61);
|
|
24
|
+
stroke: #ffd321;
|
|
25
|
+
strokewidth: 1px;
|
|
26
|
+
stroke-width: 1px;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
exports.ASIconButtonStyled = (0, styled_components_1.default)(ASIconButton_1.default) `
|
|
32
|
+
margin: ${({ size = ASUI_types_1.ComponentSize.Medium }) => size === ASUI_types_1.ComponentSize.Small ? '0 10px' : size === ASUI_types_1.ComponentSize.Large ? '0 -1px' : '0 3px'};
|
|
33
|
+
z-index: 1;
|
|
34
|
+
scale: ${({ size = ASUI_types_1.ComponentSize.Medium }) => size === ASUI_types_1.ComponentSize.Small ? 0.9 : size === ASUI_types_1.ComponentSize.Large ? 0.8 : 0.8};
|
|
35
|
+
`;
|
|
36
|
+
exports.NavControlLeftButton = (0, styled_components_1.default)(icons_1.ArrowLeftIcon) `
|
|
37
|
+
margin-left: 10px;
|
|
38
|
+
${getNavControlButtonStyle}
|
|
39
|
+
&:hover {
|
|
40
|
+
&:last-child(svg) > path {
|
|
41
|
+
fill: rgb(61, 61, 61);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
`;
|
|
45
|
+
exports.NavControlRightButton = (0, styled_components_1.default)(icons_1.ArrowRightIcon) `
|
|
46
|
+
margin-right: 10px;
|
|
47
|
+
${getNavControlButtonStyle}
|
|
48
|
+
|
|
49
|
+
&:hover {
|
|
50
|
+
&:last-child(svg) > path {
|
|
51
|
+
fill: rgb(61, 61, 61);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
`;
|
|
55
|
+
exports.ASSelectedBoxMWStyled = styled_components_1.default.span `
|
|
56
|
+
position: absolute;
|
|
57
|
+
height: 85%;
|
|
58
|
+
width: 200px;
|
|
59
|
+
left: 50%;
|
|
60
|
+
top: 50%;
|
|
61
|
+
transform: translate(-50%, -50%);
|
|
62
|
+
border-radius: ${({ $borderRadius = 4 }) => $borderRadius}px;
|
|
63
|
+
background-color: ${({ theme }) => theme.navbar.navBarSelectedBoxBackgroundColor};
|
|
64
|
+
z-index: 0;
|
|
65
|
+
transition: all 0.3s ease-in-out 0.1s allow-discrete;
|
|
66
|
+
|
|
67
|
+
@starting-style {
|
|
68
|
+
z-index: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
}
|
|
71
|
+
`;
|
|
72
|
+
exports.NavButtonsContainer = styled_components_1.default.div `
|
|
73
|
+
display: flex;
|
|
74
|
+
align-items: center;
|
|
75
|
+
justify-content: space-between;
|
|
76
|
+
width: -webkit-fill-available;
|
|
77
|
+
pointer-events: none;
|
|
78
|
+
user-select: none;
|
|
79
|
+
z-index: 10;
|
|
80
|
+
|
|
81
|
+
&.ASSmall {
|
|
82
|
+
height: 30px;
|
|
83
|
+
font-size: 1.3rem;
|
|
84
|
+
font-weight: 400;
|
|
85
|
+
> ${exports.ASSelectedBoxMWStyled} {
|
|
86
|
+
height: 80%;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
&.ASMedium {
|
|
91
|
+
height: 40px;
|
|
92
|
+
font-size: 1.7rem;
|
|
93
|
+
font-weight: 500;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&.ASLarge {
|
|
97
|
+
height: 50px;
|
|
98
|
+
font-size: 2.1rem;
|
|
99
|
+
font-weight: 600;
|
|
100
|
+
> ${exports.ASSelectedBoxMWStyled} {
|
|
101
|
+
height: 90%;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
`;
|
|
105
|
+
exports.ASNavBarItemMWStyled = (0, styled_components_1.default)(navbaritem_1.default) `
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
flex-wrap: nowrap;
|
|
110
|
+
flex-direction: row;
|
|
111
|
+
text-transform: uppercase;
|
|
112
|
+
z-index: 1;
|
|
113
|
+
white-space: nowrap;
|
|
114
|
+
user-select: none;
|
|
115
|
+
max-width: 200px;
|
|
116
|
+
width: -webkit-fill-available;
|
|
117
|
+
background: transparent;
|
|
118
|
+
min-width: 200px;
|
|
119
|
+
padding: 0;
|
|
120
|
+
margin: 0;
|
|
121
|
+
|
|
122
|
+
&.ASSmall {
|
|
123
|
+
font-size: 1.3rem;
|
|
124
|
+
font-weight: 400;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
&.ASMedium {
|
|
128
|
+
font-size: 1.7rem;
|
|
129
|
+
font-weight: 500;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&.ASLarge {
|
|
133
|
+
font-size: 2.1rem;
|
|
134
|
+
font-weight: 600;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
138
|
+
? `
|
|
139
|
+
transition: all 0.3s ease-in-out 0.2s;
|
|
140
|
+
color: ${theme.navbar.navBarItemColorSelected} !important;
|
|
141
|
+
`
|
|
142
|
+
: `color: ${theme.navbar.navBarItemColorSelected};`}
|
|
143
|
+
|
|
144
|
+
@media (hover) {
|
|
145
|
+
&:hover {
|
|
146
|
+
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
147
|
+
? `color: ${theme.navbar.navBarItemColorSelected};`
|
|
148
|
+
: `cursor: pointer;
|
|
149
|
+
transition: color 0.3s ease-in-out;
|
|
150
|
+
color: ${theme.navbar.navBarItemColorSelected};
|
|
151
|
+
& > div > div > svg > path {
|
|
152
|
+
stroke-width: 0.4;
|
|
153
|
+
stroke: ${theme.navbar.navBarItemColorSelected};
|
|
154
|
+
}
|
|
155
|
+
`}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
`;
|
|
159
|
+
exports.ScrollableNavBarItems = styled_components_1.default.div `
|
|
160
|
+
display: flex;
|
|
161
|
+
position: relative;
|
|
162
|
+
align-items: center;
|
|
163
|
+
justify-content: flex-start;
|
|
164
|
+
flex-wrap: nowrap;
|
|
165
|
+
flex-direction: row;
|
|
166
|
+
width: -webkit-fill-available;
|
|
167
|
+
overflow: hidden;
|
|
168
|
+
overflow-x: scroll;
|
|
169
|
+
margin: 0 50px;
|
|
170
|
+
scroll-behavior: smooth;
|
|
171
|
+
scroll-snap-type: x mandatory;
|
|
172
|
+
& > ${exports.ASNavBarItemMWStyled} {
|
|
173
|
+
scroll-snap-stop: always;
|
|
174
|
+
scroll-snap-align: center;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
/* Hide scrollbar for Chrome, Safari and Opera */
|
|
178
|
+
&::-webkit-scrollbar {
|
|
179
|
+
display: none;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
/* Hide scrollbar for IE, Edge and Firefox */
|
|
183
|
+
-ms-overflow-style: none; /* IE and Edge */
|
|
184
|
+
scrollbar-width: none; /* Firefox */
|
|
185
|
+
`;
|
|
186
|
+
exports.ASNavBarMWStyled = styled_components_1.default.div `
|
|
187
|
+
display: flex;
|
|
188
|
+
position: relative;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: flex-start;
|
|
191
|
+
flex-wrap: nowrap;
|
|
192
|
+
flex-direction: row;
|
|
193
|
+
width: -webkit-fill-available;
|
|
194
|
+
max-width: 300px;
|
|
195
|
+
border-radius: ${({ $borderRadius = 6 }) => $borderRadius}px;
|
|
196
|
+
background-color: ${({ theme }) => theme.navbar.navBarBackgroundColor};
|
|
197
|
+
padding: ${({ $padding = '0 4px' }) => $padding};
|
|
198
|
+
box-shadow: ${({ theme }) => theme.navbar.navBarBoxShadow};
|
|
199
|
+
|
|
200
|
+
& ${exports.NavButtonsContainer} {
|
|
201
|
+
position: fixed;
|
|
202
|
+
max-width: inherit;
|
|
203
|
+
height: inherit;
|
|
204
|
+
|
|
205
|
+
${exports.ASSelectedBoxMWStyled} {
|
|
206
|
+
position: absolute;
|
|
207
|
+
left: 50px;
|
|
208
|
+
height: 90%;
|
|
209
|
+
z-index: 0;
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
&.ASSmall {
|
|
214
|
+
height: 30px;
|
|
215
|
+
font-size: 1.3rem;
|
|
216
|
+
font-weight: 400;
|
|
217
|
+
}
|
|
218
|
+
|
|
219
|
+
&.ASMedium {
|
|
220
|
+
height: 40px;
|
|
221
|
+
font-size: 1.7rem;
|
|
222
|
+
font-weight: 500;
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
&.ASLarge {
|
|
226
|
+
height: 50px;
|
|
227
|
+
font-size: 2.1rem;
|
|
228
|
+
font-weight: 600;
|
|
229
|
+
}
|
|
230
|
+
`;
|
|
231
|
+
exports.ASNavBarItemPadding = styled_components_1.default.div `
|
|
232
|
+
padding: 0 4px;
|
|
233
|
+
pointer-events: none;
|
|
234
|
+
user-select: none;
|
|
235
|
+
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
236
|
+
? `
|
|
237
|
+
& > div > svg > path {
|
|
238
|
+
stroke-width: 0.4;
|
|
239
|
+
stroke: ${theme.navbar.navBarItemColorSelected};
|
|
240
|
+
}`
|
|
241
|
+
: `
|
|
242
|
+
& > div > svg > path {
|
|
243
|
+
stroke-width: 0.4;
|
|
244
|
+
stroke: ${theme.navbar.navBarItemColor};
|
|
245
|
+
}
|
|
246
|
+
`};
|
|
247
|
+
`;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
import { ASNavBarArrowButtonsProps } from './ASNavBarArrowButtons.types';
|
|
3
|
+
export declare const ASNavBarArrowButtons: React.FC<PropsWithChildren<ASNavBarArrowButtonsProps>>;
|
|
4
|
+
declare const ASLeftNavBarArrowButton: React.FC<ASNavBarArrowButtonsProps>;
|
|
5
|
+
declare const ASRightNavBarArrowButton: React.FC<ASNavBarArrowButtonsProps>;
|
|
6
|
+
export { ASLeftNavBarArrowButton, ASRightNavBarArrowButton, ASNavBarArrowButtons as default };
|
|
7
|
+
//# sourceMappingURL=ASNavBarArrowButtons.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ASNavBarArrowButtons.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAGzE,eAAO,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAAC,yBAAyB,CAAC,CA2BvF,CAAC;AAEF,QAAA,MAAM,uBAAuB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAmBhE,CAAC;AAEF,QAAA,MAAM,wBAAwB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAmBjE,CAAC;AAEF,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,oBAAoB,IAAI,OAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = exports.ASRightNavBarArrowButton = exports.ASLeftNavBarArrowButton = exports.ASNavBarArrowButtons = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const apptypes_1 = require("../../apptypes");
|
|
7
|
+
const ASNavBar_1 = require("../../asnavbar/ASNavBar");
|
|
8
|
+
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
9
|
+
const icons_1 = require("../../icons");
|
|
10
|
+
const styles_1 = require("./styles");
|
|
11
|
+
const ASNavBarArrowButtons = ({ className = '', onArrowButtonClicked = () => undefined, selectedIndex = 0, totalItemCount = 0, size = apptypes_1.ComponentSize.Medium, styleOptions = ASNavBar_1.defaultNavBarStyleOptions, theme = astheme_1.default, }) => {
|
|
12
|
+
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
|
+
};
|
|
14
|
+
exports.ASNavBarArrowButtons = ASNavBarArrowButtons;
|
|
15
|
+
exports.default = exports.ASNavBarArrowButtons;
|
|
16
|
+
const ASLeftNavBarArrowButton = ({ size = apptypes_1.ComponentSize.Medium, theme = astheme_1.default, disabled = false, onArrowButtonClicked = () => undefined, }) => {
|
|
17
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASIconButtonLeftStyled, { role: "button", icon: icons_1.ArrowLeftIcon, onClick: (e) => onArrowButtonClicked(e, apptypes_1.ArrowButtonDirection.Left), theme: theme, size: size, disabled: disabled, id: "LeftButtonId", iconSize: size === apptypes_1.ComponentSize.Large ? 32 : size === apptypes_1.ComponentSize.Medium ? 28 : 24, fillColor: theme.button.buttonIconColor }));
|
|
18
|
+
};
|
|
19
|
+
exports.ASLeftNavBarArrowButton = ASLeftNavBarArrowButton;
|
|
20
|
+
const ASRightNavBarArrowButton = ({ size = apptypes_1.ComponentSize.Medium, theme = astheme_1.default, onArrowButtonClicked = () => undefined, disabled = false, }) => {
|
|
21
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASIconButtonRightStyled, { role: "button", icon: icons_1.ArrowRightIcon, onClick: (e) => onArrowButtonClicked(e, apptypes_1.ArrowButtonDirection.Right), theme: theme, size: size, disabled: disabled, id: "RightButtonId", iconSize: size === apptypes_1.ComponentSize.Large ? 32 : size === apptypes_1.ComponentSize.Medium ? 28 : 24, fillColor: theme.button.buttonIconColor }));
|
|
22
|
+
};
|
|
23
|
+
exports.ASRightNavBarArrowButton = ASRightNavBarArrowButton;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { MouseEvent } from 'react';
|
|
2
|
+
import { ASComponentDirection, ASComponentSize, ASNavBarStyleOptions, ASTheme } from '../../apptypes';
|
|
3
|
+
export interface ASNavBarArrowButtonsStyledProps {
|
|
4
|
+
itemId?: string;
|
|
5
|
+
displayText?: string;
|
|
6
|
+
icon?: React.ReactNode;
|
|
7
|
+
theme?: ASTheme;
|
|
8
|
+
size?: ASComponentSize;
|
|
9
|
+
styleOptions?: ASNavBarStyleOptions;
|
|
10
|
+
}
|
|
11
|
+
export type ASNavBarArrowButtonClickFn = (event: MouseEvent, dir: ASComponentDirection) => void;
|
|
12
|
+
export type ASNavBarArrowButtonsProps = {
|
|
13
|
+
className?: string;
|
|
14
|
+
theme?: ASTheme;
|
|
15
|
+
selectedIndex?: number;
|
|
16
|
+
totalItemCount?: number;
|
|
17
|
+
onArrowButtonClicked?: ASNavBarArrowButtonClickFn;
|
|
18
|
+
size?: ASComponentSize;
|
|
19
|
+
styleOptions?: ASNavBarStyleOptions;
|
|
20
|
+
disabled?: boolean;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=ASNavBarArrowButtons.types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ASNavBarArrowButtons.types.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/ASNavBarArrowButtons.types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,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,UAAU,EAAE,GAAG,EAAE,oBAAoB,KAAK,IAAI,CAAC;AAEhG,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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbararrowbuttons/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,YAAY,EAAE,yBAAyB,EAAE,+BAA+B,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var ASNavBarArrowButtons_1 = require("./ASNavBarArrowButtons");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(ASNavBarArrowButtons_1).default; } });
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { ASComponentSize, ASTheme } from '../../apptypes';
|
|
2
|
+
import { ASNavBarArrowButtonsStyledProps } from './ASNavBarArrowButtons.types';
|
|
3
|
+
export declare const ASNavBarArrowButtonsStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, ASNavBarArrowButtonsStyledProps>> & string;
|
|
4
|
+
interface ASNavBarIconButtonStyledProps {
|
|
5
|
+
theme: ASTheme;
|
|
6
|
+
$mobileMode?: boolean;
|
|
7
|
+
$gap?: number;
|
|
8
|
+
$maxWidth?: number;
|
|
9
|
+
$borderRadius?: number;
|
|
10
|
+
$padding?: string;
|
|
11
|
+
size?: ASComponentSize;
|
|
12
|
+
}
|
|
13
|
+
export declare const ASIconButtonRightStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
|
|
14
|
+
className?: string;
|
|
15
|
+
text?: string;
|
|
16
|
+
selected?: boolean;
|
|
17
|
+
toggle?: boolean;
|
|
18
|
+
size?: ASComponentSize;
|
|
19
|
+
iconSize?: number;
|
|
20
|
+
theme?: ASTheme;
|
|
21
|
+
paddingSize?: import("../../apptypes").ASPaddingSize;
|
|
22
|
+
isLoading?: boolean;
|
|
23
|
+
icon: import("react").FC<import("react").PropsWithChildren<import("../..").IconProps>>;
|
|
24
|
+
} & import("../..").IconProps & Omit<import("react").HTMLProps<HTMLDivElement>, "size"> & {
|
|
25
|
+
children?: import("react").ReactNode | undefined;
|
|
26
|
+
}, ASNavBarIconButtonStyledProps>> & string & Omit<import("react").FC<import("../../asiconbutton").ASIconButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
27
|
+
export declare const ASIconButtonLeftStyled: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<{
|
|
28
|
+
className?: string;
|
|
29
|
+
text?: string;
|
|
30
|
+
selected?: boolean;
|
|
31
|
+
toggle?: boolean;
|
|
32
|
+
size?: ASComponentSize;
|
|
33
|
+
iconSize?: number;
|
|
34
|
+
theme?: ASTheme;
|
|
35
|
+
paddingSize?: import("../../apptypes").ASPaddingSize;
|
|
36
|
+
isLoading?: boolean;
|
|
37
|
+
icon: import("react").FC<import("react").PropsWithChildren<import("../..").IconProps>>;
|
|
38
|
+
} & import("../..").IconProps & Omit<import("react").HTMLProps<HTMLDivElement>, "size"> & {
|
|
39
|
+
children?: import("react").ReactNode | undefined;
|
|
40
|
+
}, ASNavBarIconButtonStyledProps>> & string & Omit<import("react").FC<import("../../asiconbutton").ASIconButtonProps>, keyof import("react").Component<any, {}, any>>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +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,oQA2BtC,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;;;;;;;;;;;;;qKAMnC,CAAC;AAEF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;qKAMlC,CAAC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ASIconButtonLeftStyled = exports.ASIconButtonRightStyled = exports.ASNavBarArrowButtonsStyled = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const styled_components_1 = tslib_1.__importStar(require("styled-components"));
|
|
6
|
+
const apptypes_1 = require("../../apptypes");
|
|
7
|
+
const asiconbutton_1 = tslib_1.__importDefault(require("../../asiconbutton"));
|
|
8
|
+
const ASNavBar_1 = require("../../asnavbar/ASNavBar");
|
|
9
|
+
const dimensionsForSizes = (0, styled_components_1.css) `
|
|
10
|
+
&.ASSmall {
|
|
11
|
+
height: 30px;
|
|
12
|
+
max-height: 30px;
|
|
13
|
+
font-size: 1.3rem;
|
|
14
|
+
font-weight: 400;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&.ASMedium {
|
|
18
|
+
height: 40px;
|
|
19
|
+
max-height: 40px;
|
|
20
|
+
font-size: 1.7rem;
|
|
21
|
+
font-weight: 500;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.ASLarge {
|
|
25
|
+
height: 50px;
|
|
26
|
+
max-height: 50px;
|
|
27
|
+
font-size: 2.1rem;
|
|
28
|
+
font-weight: 600;
|
|
29
|
+
}
|
|
30
|
+
`;
|
|
31
|
+
const scrollEdgesCover = (0, styled_components_1.css) `
|
|
32
|
+
content: '';
|
|
33
|
+
background: #333333;
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 0;
|
|
36
|
+
height: 100%;
|
|
37
|
+
border-radius: 6px;
|
|
38
|
+
`;
|
|
39
|
+
const getWidthBySize = (size) => size === apptypes_1.ComponentSize.Large ? 50 : apptypes_1.ComponentSize.Medium === size ? 40 : 30;
|
|
40
|
+
exports.ASNavBarArrowButtonsStyled = styled_components_1.default.div `
|
|
41
|
+
position: fixed;
|
|
42
|
+
position-anchor: --navbarAnchor;
|
|
43
|
+
left: calc(anchor(left) + 2px);
|
|
44
|
+
right: calc(anchor(right) - 2px);
|
|
45
|
+
display: ${({ styleOptions = ASNavBar_1.defaultNavBarStyleOptions }) => styleOptions.$hideNavArrowButtonsInDW ? 'none' : 'flex'};
|
|
46
|
+
align-items: center;
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
width: -webkit-fill-available;
|
|
49
|
+
pointer-events: none;
|
|
50
|
+
user-select: none;
|
|
51
|
+
z-index: 10;
|
|
52
|
+
|
|
53
|
+
&:before {
|
|
54
|
+
${scrollEdgesCover}
|
|
55
|
+
width: ${({ size = apptypes_1.ComponentSize.Medium }) => `calc(${getWidthBySize(size)}px + 8px)`};
|
|
56
|
+
left: -2px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
&:after {
|
|
60
|
+
${scrollEdgesCover}
|
|
61
|
+
width: ${({ size = apptypes_1.ComponentSize.Medium }) => `calc(${getWidthBySize(size)}px + 8px)`};
|
|
62
|
+
right: -2px;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
${dimensionsForSizes}
|
|
66
|
+
`;
|
|
67
|
+
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 -1px' : '0 3px'};
|
|
69
|
+
z-index: 1;
|
|
70
|
+
scale: ${({ size = apptypes_1.ComponentSize.Medium }) => size === apptypes_1.ComponentSize.Small ? 0.9 : size === apptypes_1.ComponentSize.Large ? 0.8 : 0.8};
|
|
71
|
+
`;
|
|
72
|
+
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 -1px' : '0 3px'};
|
|
74
|
+
z-index: 1;
|
|
75
|
+
scale: ${({ size = apptypes_1.ComponentSize.Medium }) => size === apptypes_1.ComponentSize.Small ? 0.9 : size === apptypes_1.ComponentSize.Large ? 0.8 : 0.8};
|
|
76
|
+
`;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ASNavBarItemProps } from '
|
|
2
|
+
import { ASNavBarItemProps } from '../ASNavBar.types';
|
|
3
3
|
declare const ASNavBarItem: React.FC<ASNavBarItemProps>;
|
|
4
4
|
export default ASNavBarItem;
|
|
5
5
|
//# sourceMappingURL=ASNavBarItem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ASNavBarItem.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbaritem/ASNavBarItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkD,MAAM,OAAO,CAAC;AAGvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAItD,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAyE7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = require("react");
|
|
6
|
+
const apptypes_1 = require("../../apptypes");
|
|
7
|
+
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
8
|
+
const styles_1 = require("../styles");
|
|
9
|
+
const styles_2 = require("./styles");
|
|
10
|
+
const ASNavBarItem = ({ className = '', theme = astheme_1.default, displayText = '---', icon, selected = false, itemId, itemIndex = 0, size = apptypes_1.ComponentSize.Medium, onItemClick = () => undefined, onItemResized = () => undefined, }) => {
|
|
11
|
+
const [navItemSizeInitialized, setNavSizeInitialized] = (0, react_1.useState)(false);
|
|
12
|
+
const navItemWidthRef = (0, react_1.useRef)(0);
|
|
13
|
+
const navBarItemRef = (0, react_1.useRef)(null);
|
|
14
|
+
const isNavBarItemSelected = (0, react_1.useRef)(selected);
|
|
15
|
+
const onItemClickHandler = (e) => {
|
|
16
|
+
e.preventDefault();
|
|
17
|
+
e.stopPropagation();
|
|
18
|
+
onItemClick(e, itemId, itemIndex);
|
|
19
|
+
};
|
|
20
|
+
(0, react_1.useEffect)(() => {
|
|
21
|
+
if (navBarItemRef.current) {
|
|
22
|
+
navItemWidthRef.current = navBarItemRef.current.getBoundingClientRect().width;
|
|
23
|
+
setNavSizeInitialized(true);
|
|
24
|
+
}
|
|
25
|
+
}, []);
|
|
26
|
+
(0, react_1.useEffect)(() => {
|
|
27
|
+
if (navItemSizeInitialized && navBarItemRef.current) {
|
|
28
|
+
const resizeObserver = new ResizeObserver((entries) => {
|
|
29
|
+
if (isNavBarItemSelected.current) {
|
|
30
|
+
const width = navBarItemRef.current?.getBoundingClientRect().width;
|
|
31
|
+
if (navBarItemRef.current && typeof width === 'number' && navItemWidthRef.current !== width) {
|
|
32
|
+
navItemWidthRef.current = width;
|
|
33
|
+
onItemResized(itemId, navBarItemRef.current);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
resizeObserver.observe(navBarItemRef.current);
|
|
38
|
+
return () => {
|
|
39
|
+
if (navBarItemRef.current)
|
|
40
|
+
resizeObserver.unobserve(navBarItemRef.current);
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [navItemSizeInitialized]);
|
|
44
|
+
(0, react_1.useEffect)(() => {
|
|
45
|
+
isNavBarItemSelected.current = selected;
|
|
46
|
+
}, [selected]);
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)(styles_2.ASNavBarItemStyled, { id: itemId, theme: theme, title: displayText, ref: navBarItemRef, className: `${className} ${size}`, "$selected": selected, onClick: onItemClickHandler, children: [icon && ((0, jsx_runtime_1.jsx)(styles_1.ASNavBarLeadingIconPadding, { theme: theme, "$selected": selected, "aria-invalid": true, "aria-hidden": true, children: icon })), displayText] }));
|
|
48
|
+
};
|
|
49
|
+
exports.default = ASNavBarItem;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbaritem/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC3F,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
var ASNavBarItem_1 = require("./ASNavBarItem");
|
|
6
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return tslib_1.__importDefault(ASNavBarItem_1).default; } });
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ASTheme } from '../../apptypes/ASUI.types';
|
|
2
|
+
interface ASNavBarItemStyledProps {
|
|
3
|
+
theme: ASTheme;
|
|
4
|
+
$mobileMode?: boolean;
|
|
5
|
+
$selected?: boolean;
|
|
6
|
+
$margin?: string;
|
|
7
|
+
$padding?: string;
|
|
8
|
+
}
|
|
9
|
+
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;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbaritem/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AAIpD,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,4PAmE9B,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ASNavBarItemStyled = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
+
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
7
|
+
const styles_1 = require("../styles");
|
|
8
|
+
exports.ASNavBarItemStyled = styled_components_1.default.div `
|
|
9
|
+
font-family: ${({ theme }) => theme.fontFamily};
|
|
10
|
+
display: flex;
|
|
11
|
+
align-items: center;
|
|
12
|
+
justify-content: center;
|
|
13
|
+
white-space: nowrap;
|
|
14
|
+
text-overflow: ellipsis;
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
flex-wrap: nowrap;
|
|
17
|
+
flex-direction: row;
|
|
18
|
+
transition: color 0.3s ease-in-out 0.1s;
|
|
19
|
+
text-transform: uppercase;
|
|
20
|
+
margin: ${({ $margin = '4px 4px' }) => $margin};
|
|
21
|
+
padding: ${({ $padding = '0 8px' }) => $padding};
|
|
22
|
+
border-radius: 4px;
|
|
23
|
+
z-index: 1;
|
|
24
|
+
white-space: nowrap;
|
|
25
|
+
user-select: none;
|
|
26
|
+
|
|
27
|
+
& > div > div {
|
|
28
|
+
pointer-events: none;
|
|
29
|
+
user-select: none;
|
|
30
|
+
display: flex;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&.ASSmall {
|
|
34
|
+
font-size: 1.3rem;
|
|
35
|
+
font-weight: 400;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
&.ASMedium {
|
|
39
|
+
font-size: 1.7rem;
|
|
40
|
+
font-weight: 500;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
&.ASLarge {
|
|
44
|
+
font-size: 2.1rem;
|
|
45
|
+
font-weight: 600;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
49
|
+
? `
|
|
50
|
+
transition: all 0.3s ease-in-out 0.2s;
|
|
51
|
+
color: ${theme.navbar.navBarItemColorSelected};
|
|
52
|
+
`
|
|
53
|
+
: `color: ${theme.navbar.navBarItemColor};`}
|
|
54
|
+
|
|
55
|
+
@media (hover) {
|
|
56
|
+
&:hover {
|
|
57
|
+
${({ $selected = false, theme = astheme_1.default }) => $selected
|
|
58
|
+
? `color: ${theme.navbar.navBarItemColorSelected};`
|
|
59
|
+
: `cursor: pointer;
|
|
60
|
+
transition: color 0.3s ease-in-out;
|
|
61
|
+
color: ${theme.navbar.navBarItemColorHover};
|
|
62
|
+
& > div > div > svg > path {
|
|
63
|
+
stroke-width: 0.4;
|
|
64
|
+
stroke: ${theme.navbar.navBarItemColorHover};
|
|
65
|
+
}
|
|
66
|
+
`}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
& ${styles_1.ASNavBarStyled} {
|
|
71
|
+
min-width: 200px;
|
|
72
|
+
}
|
|
73
|
+
`;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ASNavBarPickPanel.d.ts","sourceRoot":"","sources":["../../../src/asnavbar/navbarpickpanel/ASNavBarPickPanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAKrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAKnE,QAAA,MAAM,iBAAiB,EAAE,KAAK,CAAC,EAAE,CAAC,sBAAsB,CAyCvD,CAAC;AAEF,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const tslib_1 = require("tslib");
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const react_1 = tslib_1.__importStar(require("react"));
|
|
6
|
+
const apptypes_1 = require("../../apptypes");
|
|
7
|
+
const astheme_1 = tslib_1.__importDefault(require("../../astheme"));
|
|
8
|
+
const navbarpickpanelitem_1 = tslib_1.__importDefault(require("../navbarpickpanelitem"));
|
|
9
|
+
const styles_1 = require("./styles");
|
|
10
|
+
const DEFAULT_PADDING = 4;
|
|
11
|
+
const ASNavBarPickPanel = ({ className = '', navItems = [], theme = astheme_1.default, selectedId = '', size = apptypes_1.ComponentSize.Medium, selectedIndex = 0, onItemSelected = () => undefined, }) => {
|
|
12
|
+
const pickItemsContainerRef = react_1.default.useRef(null);
|
|
13
|
+
(0, react_1.useEffect)(() => {
|
|
14
|
+
if (pickItemsContainerRef.current && pickItemsContainerRef.current.childElementCount > 0) {
|
|
15
|
+
pickItemsContainerRef.current.children[selectedIndex].scrollIntoView({
|
|
16
|
+
behavior: 'smooth',
|
|
17
|
+
block: 'center',
|
|
18
|
+
inline: 'start',
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}, []);
|
|
22
|
+
const onItemSelectedHandler = (e, itemId, itemIndex) => {
|
|
23
|
+
onItemSelected(itemId, itemIndex - selectedIndex);
|
|
24
|
+
};
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(styles_1.ASNavBarPickPanelStyled, { theme: theme, className: className, ref: pickItemsContainerRef, children: navItems.map((item, index) => ((0, jsx_runtime_1.jsx)(navbarpickpanelitem_1.default, { theme: theme, selected: item.itemId === selectedId, itemId: item.itemId, itemIndex: index, displayText: item.displayText, size: size, onItemClick: onItemSelectedHandler }, item.itemId))) }));
|
|
26
|
+
};
|
|
27
|
+
exports.default = ASNavBarPickPanel;
|