@uniformdev/design-system 19.134.0 → 19.134.3-alpha.10
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/esm/index.js +48 -6
- package/dist/index.d.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +48 -6
- package/package.json +6 -6
package/dist/esm/index.js
CHANGED
|
@@ -11852,7 +11852,7 @@ function isMenuSeparator(child) {
|
|
|
11852
11852
|
|
|
11853
11853
|
// src/components/Menu/Menu.styles.ts
|
|
11854
11854
|
import { css as css26 } from "@emotion/react";
|
|
11855
|
-
var menuStyles = css26`
|
|
11855
|
+
var menuStyles = (maxMenuHeight) => css26`
|
|
11856
11856
|
box-shadow: var(--shadow-base);
|
|
11857
11857
|
border-radius: var(--rounded-base);
|
|
11858
11858
|
background: var(--gray-50);
|
|
@@ -11862,10 +11862,21 @@ var menuStyles = css26`
|
|
|
11862
11862
|
outline: none;
|
|
11863
11863
|
position: relative;
|
|
11864
11864
|
z-index: var(--z-50);
|
|
11865
|
-
|
|
11866
11865
|
&:focus {
|
|
11867
11866
|
outline: none;
|
|
11868
11867
|
}
|
|
11868
|
+
|
|
11869
|
+
// resolves uni-2997 for smaller screens not being able to access large menus
|
|
11870
|
+
// the code was removed in https://github.com/uniformdev/platform/commit/0067e6c87aaf29147c656949bbf49d632d3e89dc#diff-84f70b10af4d4ec4f57c535e3c44b04c30ce95ac337ce21db9f1ffd8393a846d
|
|
11871
|
+
// but we need to keep it for the Menu component if the menu is larger than the screen
|
|
11872
|
+
${maxMenuHeight ? `
|
|
11873
|
+
overflow-x: hidden;
|
|
11874
|
+
overflow-y: auto;
|
|
11875
|
+
height: min(${maxMenuHeight}, var(--popover-available-height));
|
|
11876
|
+
scroll-snap-align: start;
|
|
11877
|
+
scroll-snap-stop: always;
|
|
11878
|
+
${scrollbarStyles}
|
|
11879
|
+
` : ""}
|
|
11869
11880
|
`;
|
|
11870
11881
|
|
|
11871
11882
|
// src/components/Menu/Menu.tsx
|
|
@@ -11881,6 +11892,7 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
11881
11892
|
disableAutoSeparatorManagement,
|
|
11882
11893
|
menuItemsContainerCssClasses,
|
|
11883
11894
|
testId,
|
|
11895
|
+
maxMenuHeight,
|
|
11884
11896
|
...props
|
|
11885
11897
|
}, ref) {
|
|
11886
11898
|
const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
|
|
@@ -11895,7 +11907,7 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
11895
11907
|
shift: menu.parent ? -4 : 0,
|
|
11896
11908
|
...props,
|
|
11897
11909
|
css: [
|
|
11898
|
-
menuStyles,
|
|
11910
|
+
menuStyles(maxMenuHeight),
|
|
11899
11911
|
typeof menuItemsContainerCssClasses === "object" ? menuItemsContainerCssClasses : void 0
|
|
11900
11912
|
],
|
|
11901
11913
|
className: typeof menuItemsContainerCssClasses === "string" ? menuItemsContainerCssClasses : "",
|
|
@@ -12146,6 +12158,7 @@ var ButtonWithMenu = ({
|
|
|
12146
12158
|
size = "lg",
|
|
12147
12159
|
menuContainerCssClasses,
|
|
12148
12160
|
withoutPortal = false,
|
|
12161
|
+
maxMenuHeight,
|
|
12149
12162
|
...buttonProps
|
|
12150
12163
|
}) => {
|
|
12151
12164
|
const buttonTheme = {
|
|
@@ -12204,6 +12217,7 @@ var ButtonWithMenu = ({
|
|
|
12204
12217
|
placement,
|
|
12205
12218
|
menuTrigger: clickableButton,
|
|
12206
12219
|
menuItemsContainerCssClasses: menuContainerCssClasses,
|
|
12220
|
+
maxMenuHeight,
|
|
12207
12221
|
children
|
|
12208
12222
|
}
|
|
12209
12223
|
)
|
|
@@ -12215,6 +12229,7 @@ var ButtonWithMenu = ({
|
|
|
12215
12229
|
menuTrigger: dropdownButton,
|
|
12216
12230
|
menuItemsContainerCssClasses: menuContainerCssClasses,
|
|
12217
12231
|
portal: withoutPortal,
|
|
12232
|
+
maxMenuHeight,
|
|
12218
12233
|
children
|
|
12219
12234
|
}
|
|
12220
12235
|
) })
|
|
@@ -20463,6 +20478,18 @@ var ConditionalFilterRow = css92`
|
|
|
20463
20478
|
|
|
20464
20479
|
${cq("380px")} {
|
|
20465
20480
|
align-items: center;
|
|
20481
|
+
|
|
20482
|
+
&:after {
|
|
20483
|
+
content: '';
|
|
20484
|
+
display: block;
|
|
20485
|
+
height: 1px;
|
|
20486
|
+
background: var(--gray-300);
|
|
20487
|
+
width: calc(100% - var(--spacing-base));
|
|
20488
|
+
margin-left: var(--spacing-base);
|
|
20489
|
+
}
|
|
20490
|
+
&:last-of-type:after {
|
|
20491
|
+
display: none;
|
|
20492
|
+
}
|
|
20466
20493
|
}
|
|
20467
20494
|
|
|
20468
20495
|
&:first-of-type {
|
|
@@ -20470,6 +20497,12 @@ var ConditionalFilterRow = css92`
|
|
|
20470
20497
|
grid-template-columns: 50px 1fr;
|
|
20471
20498
|
}
|
|
20472
20499
|
|
|
20500
|
+
${cq("580px")} {
|
|
20501
|
+
&:after {
|
|
20502
|
+
display: none;
|
|
20503
|
+
}
|
|
20504
|
+
}
|
|
20505
|
+
|
|
20473
20506
|
@media (prefers-reduced-motion: no-preference) {
|
|
20474
20507
|
animation: ${fadeInLtr} var(--duration-fast) var(--timing-ease-out);
|
|
20475
20508
|
}
|
|
@@ -20477,15 +20510,24 @@ var ConditionalFilterRow = css92`
|
|
|
20477
20510
|
var ConditionalInputRow = css92`
|
|
20478
20511
|
display: flex;
|
|
20479
20512
|
gap: var(--spacing-sm);
|
|
20480
|
-
flex-
|
|
20513
|
+
flex-wrap: wrap;
|
|
20481
20514
|
|
|
20482
20515
|
${cq("380px")} {
|
|
20483
|
-
|
|
20484
|
-
|
|
20516
|
+
& > div:nth-child(-n + 2) {
|
|
20517
|
+
width: calc(50% - var(--spacing-sm));
|
|
20518
|
+
}
|
|
20519
|
+
|
|
20520
|
+
& > div:nth-child(n + 3) {
|
|
20521
|
+
width: calc(100% - 48px);
|
|
20522
|
+
}
|
|
20485
20523
|
}
|
|
20486
20524
|
${cq("580px")} {
|
|
20487
20525
|
display: grid;
|
|
20488
20526
|
grid-template-columns: 200px 160px 1fr 32px;
|
|
20527
|
+
|
|
20528
|
+
& > div:nth-child(n) {
|
|
20529
|
+
width: auto;
|
|
20530
|
+
}
|
|
20489
20531
|
}
|
|
20490
20532
|
`;
|
|
20491
20533
|
var SearchInput = css92`
|
package/dist/index.d.mts
CHANGED
|
@@ -21107,6 +21107,11 @@ interface ActionButtonsProps {
|
|
|
21107
21107
|
* @default false
|
|
21108
21108
|
*/
|
|
21109
21109
|
withoutPortal?: boolean;
|
|
21110
|
+
/** (optional) sets the maximum height of the menu
|
|
21111
|
+
* setting a max menu height value will make the menu scrollable if the content exceeds the height
|
|
21112
|
+
* this is not compatible with nested menus that expand to the left or right of the menu
|
|
21113
|
+
*/
|
|
21114
|
+
maxMenuHeight?: string;
|
|
21110
21115
|
}
|
|
21111
21116
|
/** ButtonWithMenuProps combines the ActionButtonsProps with React HTMLButtonElement attributes */
|
|
21112
21117
|
type ButtonWithMenuProps = ActionButtonsProps & React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -21132,7 +21137,7 @@ type ButtonWithMenuProps = ActionButtonsProps & React$1.ButtonHTMLAttributes<HTM
|
|
|
21132
21137
|
</MenuItem>
|
|
21133
21138
|
</ButtonWithMenu>
|
|
21134
21139
|
*/
|
|
21135
|
-
declare const ButtonWithMenu: ({ onButtonClick, buttonType, buttonText, icon, disabled, children, placement, size, menuContainerCssClasses, withoutPortal, ...buttonProps }: ButtonWithMenuProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21140
|
+
declare const ButtonWithMenu: ({ onButtonClick, buttonType, buttonText, icon, disabled, children, placement, size, menuContainerCssClasses, withoutPortal, maxMenuHeight, ...buttonProps }: ButtonWithMenuProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21136
21141
|
|
|
21137
21142
|
/**
|
|
21138
21143
|
* A string in the ISO 8601 date format: YYYY-MM-DD
|
|
@@ -22377,6 +22382,11 @@ interface MenuProps extends MenuProps$2 {
|
|
|
22377
22382
|
withoutPortal?: boolean;
|
|
22378
22383
|
/** (optional) sets the test id attribute */
|
|
22379
22384
|
testId?: string;
|
|
22385
|
+
/** (optional) sets the maximum height of the menu
|
|
22386
|
+
* setting a max menu height value will make the menu scrollable if the content exceeds the height
|
|
22387
|
+
* this is not compatible with nested menus that expand to the left or right of the menu
|
|
22388
|
+
*/
|
|
22389
|
+
maxMenuHeight?: string;
|
|
22380
22390
|
}
|
|
22381
22391
|
/**
|
|
22382
22392
|
* Component used for creating clickable menus
|
package/dist/index.d.ts
CHANGED
|
@@ -21107,6 +21107,11 @@ interface ActionButtonsProps {
|
|
|
21107
21107
|
* @default false
|
|
21108
21108
|
*/
|
|
21109
21109
|
withoutPortal?: boolean;
|
|
21110
|
+
/** (optional) sets the maximum height of the menu
|
|
21111
|
+
* setting a max menu height value will make the menu scrollable if the content exceeds the height
|
|
21112
|
+
* this is not compatible with nested menus that expand to the left or right of the menu
|
|
21113
|
+
*/
|
|
21114
|
+
maxMenuHeight?: string;
|
|
21110
21115
|
}
|
|
21111
21116
|
/** ButtonWithMenuProps combines the ActionButtonsProps with React HTMLButtonElement attributes */
|
|
21112
21117
|
type ButtonWithMenuProps = ActionButtonsProps & React$1.ButtonHTMLAttributes<HTMLButtonElement>;
|
|
@@ -21132,7 +21137,7 @@ type ButtonWithMenuProps = ActionButtonsProps & React$1.ButtonHTMLAttributes<HTM
|
|
|
21132
21137
|
</MenuItem>
|
|
21133
21138
|
</ButtonWithMenu>
|
|
21134
21139
|
*/
|
|
21135
|
-
declare const ButtonWithMenu: ({ onButtonClick, buttonType, buttonText, icon, disabled, children, placement, size, menuContainerCssClasses, withoutPortal, ...buttonProps }: ButtonWithMenuProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21140
|
+
declare const ButtonWithMenu: ({ onButtonClick, buttonType, buttonText, icon, disabled, children, placement, size, menuContainerCssClasses, withoutPortal, maxMenuHeight, ...buttonProps }: ButtonWithMenuProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
|
|
21136
21141
|
|
|
21137
21142
|
/**
|
|
21138
21143
|
* A string in the ISO 8601 date format: YYYY-MM-DD
|
|
@@ -22377,6 +22382,11 @@ interface MenuProps extends MenuProps$2 {
|
|
|
22377
22382
|
withoutPortal?: boolean;
|
|
22378
22383
|
/** (optional) sets the test id attribute */
|
|
22379
22384
|
testId?: string;
|
|
22385
|
+
/** (optional) sets the maximum height of the menu
|
|
22386
|
+
* setting a max menu height value will make the menu scrollable if the content exceeds the height
|
|
22387
|
+
* this is not compatible with nested menus that expand to the left or right of the menu
|
|
22388
|
+
*/
|
|
22389
|
+
maxMenuHeight?: string;
|
|
22380
22390
|
}
|
|
22381
22391
|
/**
|
|
22382
22392
|
* Component used for creating clickable menus
|
package/dist/index.js
CHANGED
|
@@ -13529,7 +13529,7 @@ function isMenuSeparator(child) {
|
|
|
13529
13529
|
// src/components/Menu/Menu.styles.ts
|
|
13530
13530
|
init_emotion_jsx_shim();
|
|
13531
13531
|
var import_react35 = require("@emotion/react");
|
|
13532
|
-
var menuStyles = import_react35.css`
|
|
13532
|
+
var menuStyles = (maxMenuHeight) => import_react35.css`
|
|
13533
13533
|
box-shadow: var(--shadow-base);
|
|
13534
13534
|
border-radius: var(--rounded-base);
|
|
13535
13535
|
background: var(--gray-50);
|
|
@@ -13539,10 +13539,21 @@ var menuStyles = import_react35.css`
|
|
|
13539
13539
|
outline: none;
|
|
13540
13540
|
position: relative;
|
|
13541
13541
|
z-index: var(--z-50);
|
|
13542
|
-
|
|
13543
13542
|
&:focus {
|
|
13544
13543
|
outline: none;
|
|
13545
13544
|
}
|
|
13545
|
+
|
|
13546
|
+
// resolves uni-2997 for smaller screens not being able to access large menus
|
|
13547
|
+
// the code was removed in https://github.com/uniformdev/platform/commit/0067e6c87aaf29147c656949bbf49d632d3e89dc#diff-84f70b10af4d4ec4f57c535e3c44b04c30ce95ac337ce21db9f1ffd8393a846d
|
|
13548
|
+
// but we need to keep it for the Menu component if the menu is larger than the screen
|
|
13549
|
+
${maxMenuHeight ? `
|
|
13550
|
+
overflow-x: hidden;
|
|
13551
|
+
overflow-y: auto;
|
|
13552
|
+
height: min(${maxMenuHeight}, var(--popover-available-height));
|
|
13553
|
+
scroll-snap-align: start;
|
|
13554
|
+
scroll-snap-stop: always;
|
|
13555
|
+
${scrollbarStyles}
|
|
13556
|
+
` : ""}
|
|
13546
13557
|
`;
|
|
13547
13558
|
|
|
13548
13559
|
// src/components/Menu/Menu.tsx
|
|
@@ -13558,6 +13569,7 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
13558
13569
|
disableAutoSeparatorManagement,
|
|
13559
13570
|
menuItemsContainerCssClasses,
|
|
13560
13571
|
testId,
|
|
13572
|
+
maxMenuHeight,
|
|
13561
13573
|
...props
|
|
13562
13574
|
}, ref) {
|
|
13563
13575
|
const placementOverride = legacyPlacements.includes(placement) ? void 0 : placement;
|
|
@@ -13572,7 +13584,7 @@ var Menu = React8.forwardRef(function Menu2({
|
|
|
13572
13584
|
shift: menu.parent ? -4 : 0,
|
|
13573
13585
|
...props,
|
|
13574
13586
|
css: [
|
|
13575
|
-
menuStyles,
|
|
13587
|
+
menuStyles(maxMenuHeight),
|
|
13576
13588
|
typeof menuItemsContainerCssClasses === "object" ? menuItemsContainerCssClasses : void 0
|
|
13577
13589
|
],
|
|
13578
13590
|
className: typeof menuItemsContainerCssClasses === "string" ? menuItemsContainerCssClasses : "",
|
|
@@ -13825,6 +13837,7 @@ var ButtonWithMenu = ({
|
|
|
13825
13837
|
size = "lg",
|
|
13826
13838
|
menuContainerCssClasses,
|
|
13827
13839
|
withoutPortal = false,
|
|
13840
|
+
maxMenuHeight,
|
|
13828
13841
|
...buttonProps
|
|
13829
13842
|
}) => {
|
|
13830
13843
|
const buttonTheme = {
|
|
@@ -13883,6 +13896,7 @@ var ButtonWithMenu = ({
|
|
|
13883
13896
|
placement,
|
|
13884
13897
|
menuTrigger: clickableButton,
|
|
13885
13898
|
menuItemsContainerCssClasses: menuContainerCssClasses,
|
|
13899
|
+
maxMenuHeight,
|
|
13886
13900
|
children
|
|
13887
13901
|
}
|
|
13888
13902
|
)
|
|
@@ -13894,6 +13908,7 @@ var ButtonWithMenu = ({
|
|
|
13894
13908
|
menuTrigger: dropdownButton,
|
|
13895
13909
|
menuItemsContainerCssClasses: menuContainerCssClasses,
|
|
13896
13910
|
portal: withoutPortal,
|
|
13911
|
+
maxMenuHeight,
|
|
13897
13912
|
children
|
|
13898
13913
|
}
|
|
13899
13914
|
) })
|
|
@@ -22300,6 +22315,18 @@ var ConditionalFilterRow = import_react139.css`
|
|
|
22300
22315
|
|
|
22301
22316
|
${cq("380px")} {
|
|
22302
22317
|
align-items: center;
|
|
22318
|
+
|
|
22319
|
+
&:after {
|
|
22320
|
+
content: '';
|
|
22321
|
+
display: block;
|
|
22322
|
+
height: 1px;
|
|
22323
|
+
background: var(--gray-300);
|
|
22324
|
+
width: calc(100% - var(--spacing-base));
|
|
22325
|
+
margin-left: var(--spacing-base);
|
|
22326
|
+
}
|
|
22327
|
+
&:last-of-type:after {
|
|
22328
|
+
display: none;
|
|
22329
|
+
}
|
|
22303
22330
|
}
|
|
22304
22331
|
|
|
22305
22332
|
&:first-of-type {
|
|
@@ -22307,6 +22334,12 @@ var ConditionalFilterRow = import_react139.css`
|
|
|
22307
22334
|
grid-template-columns: 50px 1fr;
|
|
22308
22335
|
}
|
|
22309
22336
|
|
|
22337
|
+
${cq("580px")} {
|
|
22338
|
+
&:after {
|
|
22339
|
+
display: none;
|
|
22340
|
+
}
|
|
22341
|
+
}
|
|
22342
|
+
|
|
22310
22343
|
@media (prefers-reduced-motion: no-preference) {
|
|
22311
22344
|
animation: ${fadeInLtr} var(--duration-fast) var(--timing-ease-out);
|
|
22312
22345
|
}
|
|
@@ -22314,15 +22347,24 @@ var ConditionalFilterRow = import_react139.css`
|
|
|
22314
22347
|
var ConditionalInputRow = import_react139.css`
|
|
22315
22348
|
display: flex;
|
|
22316
22349
|
gap: var(--spacing-sm);
|
|
22317
|
-
flex-
|
|
22350
|
+
flex-wrap: wrap;
|
|
22318
22351
|
|
|
22319
22352
|
${cq("380px")} {
|
|
22320
|
-
|
|
22321
|
-
|
|
22353
|
+
& > div:nth-child(-n + 2) {
|
|
22354
|
+
width: calc(50% - var(--spacing-sm));
|
|
22355
|
+
}
|
|
22356
|
+
|
|
22357
|
+
& > div:nth-child(n + 3) {
|
|
22358
|
+
width: calc(100% - 48px);
|
|
22359
|
+
}
|
|
22322
22360
|
}
|
|
22323
22361
|
${cq("580px")} {
|
|
22324
22362
|
display: grid;
|
|
22325
22363
|
grid-template-columns: 200px 160px 1fr 32px;
|
|
22364
|
+
|
|
22365
|
+
& > div:nth-child(n) {
|
|
22366
|
+
width: auto;
|
|
22367
|
+
}
|
|
22326
22368
|
}
|
|
22327
22369
|
`;
|
|
22328
22370
|
var SearchInput = import_react139.css`
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/design-system",
|
|
3
|
-
"version": "19.134.
|
|
3
|
+
"version": "19.134.3-alpha.10+ae656e8e4c",
|
|
4
4
|
"description": "Uniform design system components",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -23,15 +23,15 @@
|
|
|
23
23
|
"@storybook/react": "6.5.16",
|
|
24
24
|
"@types/react": "18.2.40",
|
|
25
25
|
"@types/react-dom": "18.2.17",
|
|
26
|
-
"@uniformdev/canvas": "^19.134.
|
|
27
|
-
"@uniformdev/richtext": "^19.134.
|
|
26
|
+
"@uniformdev/canvas": "^19.134.3-alpha.10+ae656e8e4c",
|
|
27
|
+
"@uniformdev/richtext": "^19.134.3-alpha.10+ae656e8e4c",
|
|
28
28
|
"autoprefixer": "10.4.16",
|
|
29
29
|
"hygen": "6.2.11",
|
|
30
|
-
"postcss": "8.4.
|
|
30
|
+
"postcss": "8.4.38",
|
|
31
31
|
"react": "18.2.0",
|
|
32
32
|
"react-dom": "18.2.0",
|
|
33
33
|
"react-select-event": "^5.5.1",
|
|
34
|
-
"tsup": "8.0.
|
|
34
|
+
"tsup": "8.0.2"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@ariakit/react": "^0.3.5",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"publishConfig": {
|
|
72
72
|
"access": "public"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "ae656e8e4c730dbf960ef43b6c5e9a0b8ba13193"
|
|
75
75
|
}
|