@dmitriikapustin/ui 0.3.0 → 0.3.3
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/index.cjs +132 -20
- package/dist/index.d.cts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +132 -20
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -272,27 +272,75 @@ function Button(props) {
|
|
|
272
272
|
iconRight
|
|
273
273
|
] });
|
|
274
274
|
if (props.href !== void 0) {
|
|
275
|
-
const _a = props, {
|
|
275
|
+
const _a = props, {
|
|
276
|
+
variant: _v2,
|
|
277
|
+
size: _s2,
|
|
278
|
+
loading: _l2,
|
|
279
|
+
icon: _i2,
|
|
280
|
+
iconRight: _ir2,
|
|
281
|
+
children: _c2,
|
|
282
|
+
disabled: _d2,
|
|
283
|
+
className: _cn2,
|
|
284
|
+
href: href,
|
|
285
|
+
target,
|
|
286
|
+
rel,
|
|
287
|
+
onClick
|
|
288
|
+
} = _a, domRest2 = __objRest(_a, [
|
|
289
|
+
// strip internal/non-DOM props
|
|
290
|
+
"variant",
|
|
291
|
+
"size",
|
|
292
|
+
"loading",
|
|
293
|
+
"icon",
|
|
294
|
+
"iconRight",
|
|
295
|
+
"children",
|
|
296
|
+
"disabled",
|
|
297
|
+
"className",
|
|
298
|
+
// pull out anchor-specific that we set explicitly below
|
|
299
|
+
"href",
|
|
300
|
+
"target",
|
|
301
|
+
"rel",
|
|
302
|
+
"onClick"
|
|
303
|
+
]);
|
|
276
304
|
const safeRel = target === "_blank" ? rel != null ? rel : "noopener noreferrer" : rel;
|
|
277
305
|
const handleClick = disabled || loading ? (e) => e.preventDefault() : onClick;
|
|
278
306
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
279
307
|
"a",
|
|
280
|
-
__spreadProps(__spreadValues({},
|
|
308
|
+
__spreadProps(__spreadValues({}, domRest2), {
|
|
281
309
|
href,
|
|
282
310
|
target,
|
|
283
311
|
rel: safeRel,
|
|
284
312
|
className: rootClass,
|
|
285
313
|
"aria-disabled": disabled || loading || void 0,
|
|
286
|
-
tabIndex: disabled || loading ? -1 :
|
|
314
|
+
tabIndex: disabled || loading ? -1 : domRest2.tabIndex,
|
|
287
315
|
onClick: handleClick,
|
|
288
316
|
children: content
|
|
289
317
|
})
|
|
290
318
|
);
|
|
291
319
|
}
|
|
292
|
-
const _b = props, {
|
|
320
|
+
const _b = props, {
|
|
321
|
+
variant: _v,
|
|
322
|
+
size: _s,
|
|
323
|
+
loading: _l,
|
|
324
|
+
icon: _i,
|
|
325
|
+
iconRight: _ir,
|
|
326
|
+
children: _c,
|
|
327
|
+
disabled: _d,
|
|
328
|
+
className: _cn,
|
|
329
|
+
href: _href
|
|
330
|
+
} = _b, domRest = __objRest(_b, [
|
|
331
|
+
"variant",
|
|
332
|
+
"size",
|
|
333
|
+
"loading",
|
|
334
|
+
"icon",
|
|
335
|
+
"iconRight",
|
|
336
|
+
"children",
|
|
337
|
+
"disabled",
|
|
338
|
+
"className",
|
|
339
|
+
"href"
|
|
340
|
+
]);
|
|
293
341
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
294
342
|
"button",
|
|
295
|
-
__spreadProps(__spreadValues({},
|
|
343
|
+
__spreadProps(__spreadValues({}, domRest), {
|
|
296
344
|
className: rootClass,
|
|
297
345
|
disabled: disabled || loading,
|
|
298
346
|
children: content
|
|
@@ -941,27 +989,57 @@ function IconButton(props) {
|
|
|
941
989
|
const isDisabled = variant === "disabled" || disabled;
|
|
942
990
|
const rootClass = `${__default10.root} ${__default10[variant]}${isDisabled ? ` ${__default10.isDisabled}` : ""}${className ? ` ${className}` : ""}`;
|
|
943
991
|
if (props.href !== void 0) {
|
|
944
|
-
const _a = props, {
|
|
992
|
+
const _a = props, {
|
|
993
|
+
icon: _i2,
|
|
994
|
+
variant: _v2,
|
|
995
|
+
className: _cn2,
|
|
996
|
+
disabled: _d2,
|
|
997
|
+
href,
|
|
998
|
+
target,
|
|
999
|
+
rel,
|
|
1000
|
+
onClick
|
|
1001
|
+
} = _a, domRest2 = __objRest(_a, [
|
|
1002
|
+
"icon",
|
|
1003
|
+
"variant",
|
|
1004
|
+
"className",
|
|
1005
|
+
"disabled",
|
|
1006
|
+
"href",
|
|
1007
|
+
"target",
|
|
1008
|
+
"rel",
|
|
1009
|
+
"onClick"
|
|
1010
|
+
]);
|
|
945
1011
|
const safeRel = target === "_blank" ? rel != null ? rel : "noopener noreferrer" : rel;
|
|
946
1012
|
const handleClick = isDisabled ? (e) => e.preventDefault() : onClick;
|
|
947
1013
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
948
1014
|
"a",
|
|
949
|
-
__spreadProps(__spreadValues({},
|
|
1015
|
+
__spreadProps(__spreadValues({}, domRest2), {
|
|
950
1016
|
href,
|
|
951
1017
|
target,
|
|
952
1018
|
rel: safeRel,
|
|
953
1019
|
className: rootClass,
|
|
954
1020
|
"aria-disabled": isDisabled || void 0,
|
|
955
|
-
tabIndex: isDisabled ? -1 :
|
|
1021
|
+
tabIndex: isDisabled ? -1 : domRest2.tabIndex,
|
|
956
1022
|
onClick: handleClick,
|
|
957
1023
|
children: icon
|
|
958
1024
|
})
|
|
959
1025
|
);
|
|
960
1026
|
}
|
|
961
|
-
const _b = props, {
|
|
1027
|
+
const _b = props, {
|
|
1028
|
+
icon: _i,
|
|
1029
|
+
variant: _v,
|
|
1030
|
+
className: _cn,
|
|
1031
|
+
disabled: _d,
|
|
1032
|
+
href: _href
|
|
1033
|
+
} = _b, domRest = __objRest(_b, [
|
|
1034
|
+
"icon",
|
|
1035
|
+
"variant",
|
|
1036
|
+
"className",
|
|
1037
|
+
"disabled",
|
|
1038
|
+
"href"
|
|
1039
|
+
]);
|
|
962
1040
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
963
1041
|
"button",
|
|
964
|
-
__spreadProps(__spreadValues({},
|
|
1042
|
+
__spreadProps(__spreadValues({}, domRest), {
|
|
965
1043
|
className: rootClass,
|
|
966
1044
|
disabled: isDisabled,
|
|
967
1045
|
children: icon
|
|
@@ -3327,19 +3405,35 @@ __styleInject(`@charset "UTF-8";
|
|
|
3327
3405
|
.DropdownMenu-module_trigger {
|
|
3328
3406
|
cursor: pointer;
|
|
3329
3407
|
display: inline-flex;
|
|
3408
|
+
/* div \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442 focus \u043A\u0430\u043A role="button" \u2014 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 Button \u0443\u0436\u0435 \u0434\u0430\u0451\u0442 focus indicator. */
|
|
3409
|
+
}
|
|
3410
|
+
.DropdownMenu-module_trigger:focus, .DropdownMenu-module_trigger:focus-visible {
|
|
3411
|
+
outline: none;
|
|
3330
3412
|
}
|
|
3331
3413
|
|
|
3414
|
+
@keyframes DropdownMenu-module_dropdownEnter {
|
|
3415
|
+
from {
|
|
3416
|
+
opacity: 0;
|
|
3417
|
+
transform: translateY(-4px);
|
|
3418
|
+
}
|
|
3419
|
+
to {
|
|
3420
|
+
opacity: 1;
|
|
3421
|
+
transform: translateY(0);
|
|
3422
|
+
}
|
|
3423
|
+
}
|
|
3332
3424
|
.DropdownMenu-module_menu {
|
|
3333
3425
|
position: absolute;
|
|
3334
3426
|
top: 100%;
|
|
3335
|
-
margin-top: 0.
|
|
3427
|
+
margin-top: 0.5rem;
|
|
3336
3428
|
z-index: 50;
|
|
3337
|
-
border-radius: var(--radius-
|
|
3338
|
-
box-shadow: 0
|
|
3429
|
+
border-radius: var(--radius-xl);
|
|
3430
|
+
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
|
|
3339
3431
|
border: 1px solid var(--border-color);
|
|
3340
3432
|
background: var(--bg);
|
|
3341
|
-
min-width:
|
|
3342
|
-
padding: 0.
|
|
3433
|
+
min-width: 200px;
|
|
3434
|
+
padding: 0.375rem;
|
|
3435
|
+
animation: DropdownMenu-module_dropdownEnter 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
3436
|
+
transform-origin: top center;
|
|
3343
3437
|
}
|
|
3344
3438
|
|
|
3345
3439
|
.DropdownMenu-module_alignLeft {
|
|
@@ -3364,11 +3458,16 @@ __styleInject(`@charset "UTF-8";
|
|
|
3364
3458
|
text-align: left;
|
|
3365
3459
|
background: none;
|
|
3366
3460
|
border: none;
|
|
3461
|
+
border-radius: var(--radius-md);
|
|
3367
3462
|
}
|
|
3368
|
-
.DropdownMenu-module_item:hover {
|
|
3463
|
+
.DropdownMenu-module_item:hover, .DropdownMenu-module_item:focus-visible {
|
|
3464
|
+
outline: none;
|
|
3369
3465
|
background: var(--bg-secondary);
|
|
3370
3466
|
color: var(--fg);
|
|
3371
3467
|
}
|
|
3468
|
+
.DropdownMenu-module_item:active {
|
|
3469
|
+
background: var(--border-color);
|
|
3470
|
+
}
|
|
3372
3471
|
|
|
3373
3472
|
.DropdownMenu-module_itemIcon {
|
|
3374
3473
|
flex-shrink: 0;
|
|
@@ -3376,7 +3475,7 @@ __styleInject(`@charset "UTF-8";
|
|
|
3376
3475
|
}
|
|
3377
3476
|
|
|
3378
3477
|
.DropdownMenu-module_divider {
|
|
3379
|
-
margin: 0.
|
|
3478
|
+
margin: 0.375rem -0.375rem;
|
|
3380
3479
|
border: none;
|
|
3381
3480
|
border-top: 1px solid var(--border-color);
|
|
3382
3481
|
}`);
|
|
@@ -4092,6 +4191,18 @@ __styleInject(`@charset "UTF-8";
|
|
|
4092
4191
|
margin-bottom: 1.5rem;
|
|
4093
4192
|
}
|
|
4094
4193
|
|
|
4194
|
+
/* Compact layout \u2014 logo \u0438 nav \u0432\u043F\u043B\u043E\u0442\u043D\u0443\u044E \u0441\u0432\u0435\u0440\u0445\u0443, footer \u043F\u0440\u0438\u0436\u0430\u0442 \u043A \u043D\u0438\u0437\u0443 */
|
|
4195
|
+
.Sidebar-module_compact {
|
|
4196
|
+
justify-content: flex-start;
|
|
4197
|
+
gap: 1rem;
|
|
4198
|
+
}
|
|
4199
|
+
.Sidebar-module_compact .Sidebar-module_logo {
|
|
4200
|
+
margin-bottom: 0;
|
|
4201
|
+
}
|
|
4202
|
+
.Sidebar-module_compact .Sidebar-module_footer {
|
|
4203
|
+
margin-top: auto;
|
|
4204
|
+
}
|
|
4205
|
+
|
|
4095
4206
|
.Sidebar-module_nav {
|
|
4096
4207
|
display: flex;
|
|
4097
4208
|
flex-direction: column;
|
|
@@ -4150,7 +4261,7 @@ __styleInject(`@charset "UTF-8";
|
|
|
4150
4261
|
display: block;
|
|
4151
4262
|
}
|
|
4152
4263
|
}`);
|
|
4153
|
-
var __default47 = { "root": "Sidebar-module_root", "menu": "Sidebar-module_menu", "courseSubmenu": "Sidebar-module_courseSubmenu", "logo": "Sidebar-module_logo", "
|
|
4264
|
+
var __default47 = { "root": "Sidebar-module_root", "menu": "Sidebar-module_menu", "courseSubmenu": "Sidebar-module_courseSubmenu", "logo": "Sidebar-module_logo", "compact": "Sidebar-module_compact", "footer": "Sidebar-module_footer", "nav": "Sidebar-module_nav", "legal": "Sidebar-module_legal", "overlay": "Sidebar-module_overlay", "collapsed": "Sidebar-module_collapsed", "open": "Sidebar-module_open", "overlayVisible": "Sidebar-module_overlayVisible" };
|
|
4154
4265
|
var defaultMenuItems = [
|
|
4155
4266
|
"\u0413\u043B\u0430\u0432\u043D\u0430\u044F",
|
|
4156
4267
|
"\u041C\u043E\u0438 \u043A\u0443\u0440\u0441\u044B",
|
|
@@ -4187,7 +4298,8 @@ function Sidebar({
|
|
|
4187
4298
|
logo,
|
|
4188
4299
|
legalText,
|
|
4189
4300
|
collapsed,
|
|
4190
|
-
onToggle
|
|
4301
|
+
onToggle,
|
|
4302
|
+
layout = "space-between"
|
|
4191
4303
|
}) {
|
|
4192
4304
|
const rawItems = menuItems || (type === "courseSubmenu" ? courseMenuItems : defaultMenuItems);
|
|
4193
4305
|
const items = normaliseItems(rawItems);
|
|
@@ -4213,7 +4325,7 @@ function Sidebar({
|
|
|
4213
4325
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4214
4326
|
"aside",
|
|
4215
4327
|
{
|
|
4216
|
-
className: `${__default47.root} ${widthClass}${collapseClasses ? ` ${collapseClasses}` : ""}${className ? ` ${className}` : ""}`,
|
|
4328
|
+
className: `${__default47.root} ${widthClass}${layout === "compact" ? ` ${__default47.compact}` : ""}${collapseClasses ? ` ${collapseClasses}` : ""}${className ? ` ${className}` : ""}`,
|
|
4217
4329
|
children: [
|
|
4218
4330
|
logo && /* @__PURE__ */ jsxRuntime.jsx("div", { className: __default47.logo, children: logo }),
|
|
4219
4331
|
/* @__PURE__ */ jsxRuntime.jsx("nav", { className: __default47.nav, children: items.map((item, i) => {
|
package/dist/index.d.cts
CHANGED
|
@@ -586,8 +586,14 @@ interface SidebarProps {
|
|
|
586
586
|
collapsed?: boolean;
|
|
587
587
|
/** Called when the user requests toggling the sidebar (e.g. clicking the overlay backdrop). */
|
|
588
588
|
onToggle?: () => void;
|
|
589
|
+
/**
|
|
590
|
+
* Вертикальная раскладка детей.
|
|
591
|
+
* - `'space-between'` (default, BC) — logo / nav / footer распределены через `justify-content: space-between`.
|
|
592
|
+
* - `'compact'` — logo и nav сверху без зазора, footer прижимается к низу через `margin-top: auto`. Логотип теряет авто-`margin-bottom: 1.5rem`. Use-case: Select / site-switcher над nav.
|
|
593
|
+
*/
|
|
594
|
+
layout?: 'space-between' | 'compact';
|
|
589
595
|
}
|
|
590
|
-
declare function Sidebar({ type, menuItems, footer, className, activeId, onItemClick, logo, legalText, collapsed, onToggle, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
596
|
+
declare function Sidebar({ type, menuItems, footer, className, activeId, onItemClick, logo, legalText, collapsed, onToggle, layout, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
591
597
|
|
|
592
598
|
type AppCardVariant = 'default' | 'stamp' | 'stamp-padded';
|
|
593
599
|
interface AppCardProps {
|
package/dist/index.d.ts
CHANGED
|
@@ -586,8 +586,14 @@ interface SidebarProps {
|
|
|
586
586
|
collapsed?: boolean;
|
|
587
587
|
/** Called when the user requests toggling the sidebar (e.g. clicking the overlay backdrop). */
|
|
588
588
|
onToggle?: () => void;
|
|
589
|
+
/**
|
|
590
|
+
* Вертикальная раскладка детей.
|
|
591
|
+
* - `'space-between'` (default, BC) — logo / nav / footer распределены через `justify-content: space-between`.
|
|
592
|
+
* - `'compact'` — logo и nav сверху без зазора, footer прижимается к низу через `margin-top: auto`. Логотип теряет авто-`margin-bottom: 1.5rem`. Use-case: Select / site-switcher над nav.
|
|
593
|
+
*/
|
|
594
|
+
layout?: 'space-between' | 'compact';
|
|
589
595
|
}
|
|
590
|
-
declare function Sidebar({ type, menuItems, footer, className, activeId, onItemClick, logo, legalText, collapsed, onToggle, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
596
|
+
declare function Sidebar({ type, menuItems, footer, className, activeId, onItemClick, logo, legalText, collapsed, onToggle, layout, }: SidebarProps): react_jsx_runtime.JSX.Element;
|
|
591
597
|
|
|
592
598
|
type AppCardVariant = 'default' | 'stamp' | 'stamp-padded';
|
|
593
599
|
interface AppCardProps {
|
package/dist/index.js
CHANGED
|
@@ -266,27 +266,75 @@ function Button(props) {
|
|
|
266
266
|
iconRight
|
|
267
267
|
] });
|
|
268
268
|
if (props.href !== void 0) {
|
|
269
|
-
const _a = props, {
|
|
269
|
+
const _a = props, {
|
|
270
|
+
variant: _v2,
|
|
271
|
+
size: _s2,
|
|
272
|
+
loading: _l2,
|
|
273
|
+
icon: _i2,
|
|
274
|
+
iconRight: _ir2,
|
|
275
|
+
children: _c2,
|
|
276
|
+
disabled: _d2,
|
|
277
|
+
className: _cn2,
|
|
278
|
+
href: href,
|
|
279
|
+
target,
|
|
280
|
+
rel,
|
|
281
|
+
onClick
|
|
282
|
+
} = _a, domRest2 = __objRest(_a, [
|
|
283
|
+
// strip internal/non-DOM props
|
|
284
|
+
"variant",
|
|
285
|
+
"size",
|
|
286
|
+
"loading",
|
|
287
|
+
"icon",
|
|
288
|
+
"iconRight",
|
|
289
|
+
"children",
|
|
290
|
+
"disabled",
|
|
291
|
+
"className",
|
|
292
|
+
// pull out anchor-specific that we set explicitly below
|
|
293
|
+
"href",
|
|
294
|
+
"target",
|
|
295
|
+
"rel",
|
|
296
|
+
"onClick"
|
|
297
|
+
]);
|
|
270
298
|
const safeRel = target === "_blank" ? rel != null ? rel : "noopener noreferrer" : rel;
|
|
271
299
|
const handleClick = disabled || loading ? (e) => e.preventDefault() : onClick;
|
|
272
300
|
return /* @__PURE__ */ jsx(
|
|
273
301
|
"a",
|
|
274
|
-
__spreadProps(__spreadValues({},
|
|
302
|
+
__spreadProps(__spreadValues({}, domRest2), {
|
|
275
303
|
href,
|
|
276
304
|
target,
|
|
277
305
|
rel: safeRel,
|
|
278
306
|
className: rootClass,
|
|
279
307
|
"aria-disabled": disabled || loading || void 0,
|
|
280
|
-
tabIndex: disabled || loading ? -1 :
|
|
308
|
+
tabIndex: disabled || loading ? -1 : domRest2.tabIndex,
|
|
281
309
|
onClick: handleClick,
|
|
282
310
|
children: content
|
|
283
311
|
})
|
|
284
312
|
);
|
|
285
313
|
}
|
|
286
|
-
const _b = props, {
|
|
314
|
+
const _b = props, {
|
|
315
|
+
variant: _v,
|
|
316
|
+
size: _s,
|
|
317
|
+
loading: _l,
|
|
318
|
+
icon: _i,
|
|
319
|
+
iconRight: _ir,
|
|
320
|
+
children: _c,
|
|
321
|
+
disabled: _d,
|
|
322
|
+
className: _cn,
|
|
323
|
+
href: _href
|
|
324
|
+
} = _b, domRest = __objRest(_b, [
|
|
325
|
+
"variant",
|
|
326
|
+
"size",
|
|
327
|
+
"loading",
|
|
328
|
+
"icon",
|
|
329
|
+
"iconRight",
|
|
330
|
+
"children",
|
|
331
|
+
"disabled",
|
|
332
|
+
"className",
|
|
333
|
+
"href"
|
|
334
|
+
]);
|
|
287
335
|
return /* @__PURE__ */ jsx(
|
|
288
336
|
"button",
|
|
289
|
-
__spreadProps(__spreadValues({},
|
|
337
|
+
__spreadProps(__spreadValues({}, domRest), {
|
|
290
338
|
className: rootClass,
|
|
291
339
|
disabled: disabled || loading,
|
|
292
340
|
children: content
|
|
@@ -935,27 +983,57 @@ function IconButton(props) {
|
|
|
935
983
|
const isDisabled = variant === "disabled" || disabled;
|
|
936
984
|
const rootClass = `${__default10.root} ${__default10[variant]}${isDisabled ? ` ${__default10.isDisabled}` : ""}${className ? ` ${className}` : ""}`;
|
|
937
985
|
if (props.href !== void 0) {
|
|
938
|
-
const _a = props, {
|
|
986
|
+
const _a = props, {
|
|
987
|
+
icon: _i2,
|
|
988
|
+
variant: _v2,
|
|
989
|
+
className: _cn2,
|
|
990
|
+
disabled: _d2,
|
|
991
|
+
href,
|
|
992
|
+
target,
|
|
993
|
+
rel,
|
|
994
|
+
onClick
|
|
995
|
+
} = _a, domRest2 = __objRest(_a, [
|
|
996
|
+
"icon",
|
|
997
|
+
"variant",
|
|
998
|
+
"className",
|
|
999
|
+
"disabled",
|
|
1000
|
+
"href",
|
|
1001
|
+
"target",
|
|
1002
|
+
"rel",
|
|
1003
|
+
"onClick"
|
|
1004
|
+
]);
|
|
939
1005
|
const safeRel = target === "_blank" ? rel != null ? rel : "noopener noreferrer" : rel;
|
|
940
1006
|
const handleClick = isDisabled ? (e) => e.preventDefault() : onClick;
|
|
941
1007
|
return /* @__PURE__ */ jsx(
|
|
942
1008
|
"a",
|
|
943
|
-
__spreadProps(__spreadValues({},
|
|
1009
|
+
__spreadProps(__spreadValues({}, domRest2), {
|
|
944
1010
|
href,
|
|
945
1011
|
target,
|
|
946
1012
|
rel: safeRel,
|
|
947
1013
|
className: rootClass,
|
|
948
1014
|
"aria-disabled": isDisabled || void 0,
|
|
949
|
-
tabIndex: isDisabled ? -1 :
|
|
1015
|
+
tabIndex: isDisabled ? -1 : domRest2.tabIndex,
|
|
950
1016
|
onClick: handleClick,
|
|
951
1017
|
children: icon
|
|
952
1018
|
})
|
|
953
1019
|
);
|
|
954
1020
|
}
|
|
955
|
-
const _b = props, {
|
|
1021
|
+
const _b = props, {
|
|
1022
|
+
icon: _i,
|
|
1023
|
+
variant: _v,
|
|
1024
|
+
className: _cn,
|
|
1025
|
+
disabled: _d,
|
|
1026
|
+
href: _href
|
|
1027
|
+
} = _b, domRest = __objRest(_b, [
|
|
1028
|
+
"icon",
|
|
1029
|
+
"variant",
|
|
1030
|
+
"className",
|
|
1031
|
+
"disabled",
|
|
1032
|
+
"href"
|
|
1033
|
+
]);
|
|
956
1034
|
return /* @__PURE__ */ jsx(
|
|
957
1035
|
"button",
|
|
958
|
-
__spreadProps(__spreadValues({},
|
|
1036
|
+
__spreadProps(__spreadValues({}, domRest), {
|
|
959
1037
|
className: rootClass,
|
|
960
1038
|
disabled: isDisabled,
|
|
961
1039
|
children: icon
|
|
@@ -3321,19 +3399,35 @@ __styleInject(`@charset "UTF-8";
|
|
|
3321
3399
|
.DropdownMenu-module_trigger {
|
|
3322
3400
|
cursor: pointer;
|
|
3323
3401
|
display: inline-flex;
|
|
3402
|
+
/* div \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442 focus \u043A\u0430\u043A role="button" \u2014 \u0432\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u0438\u0439 Button \u0443\u0436\u0435 \u0434\u0430\u0451\u0442 focus indicator. */
|
|
3403
|
+
}
|
|
3404
|
+
.DropdownMenu-module_trigger:focus, .DropdownMenu-module_trigger:focus-visible {
|
|
3405
|
+
outline: none;
|
|
3324
3406
|
}
|
|
3325
3407
|
|
|
3408
|
+
@keyframes DropdownMenu-module_dropdownEnter {
|
|
3409
|
+
from {
|
|
3410
|
+
opacity: 0;
|
|
3411
|
+
transform: translateY(-4px);
|
|
3412
|
+
}
|
|
3413
|
+
to {
|
|
3414
|
+
opacity: 1;
|
|
3415
|
+
transform: translateY(0);
|
|
3416
|
+
}
|
|
3417
|
+
}
|
|
3326
3418
|
.DropdownMenu-module_menu {
|
|
3327
3419
|
position: absolute;
|
|
3328
3420
|
top: 100%;
|
|
3329
|
-
margin-top: 0.
|
|
3421
|
+
margin-top: 0.5rem;
|
|
3330
3422
|
z-index: 50;
|
|
3331
|
-
border-radius: var(--radius-
|
|
3332
|
-
box-shadow: 0
|
|
3423
|
+
border-radius: var(--radius-xl);
|
|
3424
|
+
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 8px rgba(0, 0, 0, 0.04), 0 0 0 1px rgba(0, 0, 0, 0.02);
|
|
3333
3425
|
border: 1px solid var(--border-color);
|
|
3334
3426
|
background: var(--bg);
|
|
3335
|
-
min-width:
|
|
3336
|
-
padding: 0.
|
|
3427
|
+
min-width: 200px;
|
|
3428
|
+
padding: 0.375rem;
|
|
3429
|
+
animation: DropdownMenu-module_dropdownEnter 150ms cubic-bezier(0.16, 1, 0.3, 1);
|
|
3430
|
+
transform-origin: top center;
|
|
3337
3431
|
}
|
|
3338
3432
|
|
|
3339
3433
|
.DropdownMenu-module_alignLeft {
|
|
@@ -3358,11 +3452,16 @@ __styleInject(`@charset "UTF-8";
|
|
|
3358
3452
|
text-align: left;
|
|
3359
3453
|
background: none;
|
|
3360
3454
|
border: none;
|
|
3455
|
+
border-radius: var(--radius-md);
|
|
3361
3456
|
}
|
|
3362
|
-
.DropdownMenu-module_item:hover {
|
|
3457
|
+
.DropdownMenu-module_item:hover, .DropdownMenu-module_item:focus-visible {
|
|
3458
|
+
outline: none;
|
|
3363
3459
|
background: var(--bg-secondary);
|
|
3364
3460
|
color: var(--fg);
|
|
3365
3461
|
}
|
|
3462
|
+
.DropdownMenu-module_item:active {
|
|
3463
|
+
background: var(--border-color);
|
|
3464
|
+
}
|
|
3366
3465
|
|
|
3367
3466
|
.DropdownMenu-module_itemIcon {
|
|
3368
3467
|
flex-shrink: 0;
|
|
@@ -3370,7 +3469,7 @@ __styleInject(`@charset "UTF-8";
|
|
|
3370
3469
|
}
|
|
3371
3470
|
|
|
3372
3471
|
.DropdownMenu-module_divider {
|
|
3373
|
-
margin: 0.
|
|
3472
|
+
margin: 0.375rem -0.375rem;
|
|
3374
3473
|
border: none;
|
|
3375
3474
|
border-top: 1px solid var(--border-color);
|
|
3376
3475
|
}`);
|
|
@@ -4086,6 +4185,18 @@ __styleInject(`@charset "UTF-8";
|
|
|
4086
4185
|
margin-bottom: 1.5rem;
|
|
4087
4186
|
}
|
|
4088
4187
|
|
|
4188
|
+
/* Compact layout \u2014 logo \u0438 nav \u0432\u043F\u043B\u043E\u0442\u043D\u0443\u044E \u0441\u0432\u0435\u0440\u0445\u0443, footer \u043F\u0440\u0438\u0436\u0430\u0442 \u043A \u043D\u0438\u0437\u0443 */
|
|
4189
|
+
.Sidebar-module_compact {
|
|
4190
|
+
justify-content: flex-start;
|
|
4191
|
+
gap: 1rem;
|
|
4192
|
+
}
|
|
4193
|
+
.Sidebar-module_compact .Sidebar-module_logo {
|
|
4194
|
+
margin-bottom: 0;
|
|
4195
|
+
}
|
|
4196
|
+
.Sidebar-module_compact .Sidebar-module_footer {
|
|
4197
|
+
margin-top: auto;
|
|
4198
|
+
}
|
|
4199
|
+
|
|
4089
4200
|
.Sidebar-module_nav {
|
|
4090
4201
|
display: flex;
|
|
4091
4202
|
flex-direction: column;
|
|
@@ -4144,7 +4255,7 @@ __styleInject(`@charset "UTF-8";
|
|
|
4144
4255
|
display: block;
|
|
4145
4256
|
}
|
|
4146
4257
|
}`);
|
|
4147
|
-
var __default47 = { "root": "Sidebar-module_root", "menu": "Sidebar-module_menu", "courseSubmenu": "Sidebar-module_courseSubmenu", "logo": "Sidebar-module_logo", "
|
|
4258
|
+
var __default47 = { "root": "Sidebar-module_root", "menu": "Sidebar-module_menu", "courseSubmenu": "Sidebar-module_courseSubmenu", "logo": "Sidebar-module_logo", "compact": "Sidebar-module_compact", "footer": "Sidebar-module_footer", "nav": "Sidebar-module_nav", "legal": "Sidebar-module_legal", "overlay": "Sidebar-module_overlay", "collapsed": "Sidebar-module_collapsed", "open": "Sidebar-module_open", "overlayVisible": "Sidebar-module_overlayVisible" };
|
|
4148
4259
|
var defaultMenuItems = [
|
|
4149
4260
|
"\u0413\u043B\u0430\u0432\u043D\u0430\u044F",
|
|
4150
4261
|
"\u041C\u043E\u0438 \u043A\u0443\u0440\u0441\u044B",
|
|
@@ -4181,7 +4292,8 @@ function Sidebar({
|
|
|
4181
4292
|
logo,
|
|
4182
4293
|
legalText,
|
|
4183
4294
|
collapsed,
|
|
4184
|
-
onToggle
|
|
4295
|
+
onToggle,
|
|
4296
|
+
layout = "space-between"
|
|
4185
4297
|
}) {
|
|
4186
4298
|
const rawItems = menuItems || (type === "courseSubmenu" ? courseMenuItems : defaultMenuItems);
|
|
4187
4299
|
const items = normaliseItems(rawItems);
|
|
@@ -4207,7 +4319,7 @@ function Sidebar({
|
|
|
4207
4319
|
/* @__PURE__ */ jsxs(
|
|
4208
4320
|
"aside",
|
|
4209
4321
|
{
|
|
4210
|
-
className: `${__default47.root} ${widthClass}${collapseClasses ? ` ${collapseClasses}` : ""}${className ? ` ${className}` : ""}`,
|
|
4322
|
+
className: `${__default47.root} ${widthClass}${layout === "compact" ? ` ${__default47.compact}` : ""}${collapseClasses ? ` ${collapseClasses}` : ""}${className ? ` ${className}` : ""}`,
|
|
4211
4323
|
children: [
|
|
4212
4324
|
logo && /* @__PURE__ */ jsx("div", { className: __default47.logo, children: logo }),
|
|
4213
4325
|
/* @__PURE__ */ jsx("nav", { className: __default47.nav, children: items.map((item, i) => {
|
package/package.json
CHANGED