@wordpress/components 24.0.0 → 25.0.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/CHANGELOG.md +26 -0
- package/CONTRIBUTING.md +10 -0
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/date-time/date-time/index.js +3 -84
- package/build/date-time/date-time/index.js.map +1 -1
- package/build/date-time/date-time/styles.js +4 -19
- package/build/date-time/date-time/styles.js.map +1 -1
- package/build/dropdown-menu/index.js +87 -11
- package/build/dropdown-menu/index.js.map +1 -1
- package/build/dropdown-menu/types.js +6 -0
- package/build/dropdown-menu/types.js.map +1 -0
- package/build/dropdown-menu-v2/index.js +195 -0
- package/build/dropdown-menu-v2/index.js.map +1 -0
- package/build/dropdown-menu-v2/styles.js +176 -0
- package/build/dropdown-menu-v2/styles.js.map +1 -0
- package/build/dropdown-menu-v2/types.js +6 -0
- package/build/dropdown-menu-v2/types.js.map +1 -0
- package/build/index.native.js +0 -9
- package/build/index.native.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +30 -23
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/mobile/bottom-sheet/cell.native.js +16 -8
- package/build/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/range-cell.native.js +3 -2
- package/build/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
- package/build/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet/switch-cell.native.js +8 -2
- package/build/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build/mobile/bottom-sheet-text-control/index.native.js +4 -2
- package/build/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build/modal/index.js +1 -2
- package/build/modal/index.js.map +1 -1
- package/build/private-apis.js +13 -1
- package/build/private-apis.js.map +1 -1
- package/build/range-control/index.native.js +5 -2
- package/build/range-control/index.native.js.map +1 -1
- package/build/snackbar/list.js +0 -2
- package/build/snackbar/list.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-module/color-picker/styles.js +8 -8
- package/build-module/color-picker/styles.js.map +1 -1
- package/build-module/date-time/date-time/index.js +6 -81
- package/build-module/date-time/date-time/index.js.map +1 -1
- package/build-module/date-time/date-time/styles.js +3 -17
- package/build-module/date-time/date-time/styles.js.map +1 -1
- package/build-module/dropdown-menu/index.js +87 -10
- package/build-module/dropdown-menu/index.js.map +1 -1
- package/build-module/dropdown-menu/types.js +2 -0
- package/build-module/dropdown-menu/types.js.map +1 -0
- package/build-module/dropdown-menu-v2/index.js +149 -0
- package/build-module/dropdown-menu-v2/index.js.map +1 -0
- package/build-module/dropdown-menu-v2/styles.js +153 -0
- package/build-module/dropdown-menu-v2/styles.js.map +1 -0
- package/build-module/dropdown-menu-v2/types.js +2 -0
- package/build-module/dropdown-menu-v2/types.js.map +1 -0
- package/build-module/index.native.js +0 -1
- package/build-module/index.native.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +30 -23
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/mobile/bottom-sheet/cell.native.js +16 -8
- package/build-module/mobile/bottom-sheet/cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/range-cell.native.js +3 -2
- package/build-module/mobile/bottom-sheet/range-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet/stepper-cell/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet/switch-cell.native.js +7 -2
- package/build-module/mobile/bottom-sheet/switch-cell.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-select-control/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet-select-control/index.native.js.map +1 -1
- package/build-module/mobile/bottom-sheet-text-control/index.native.js +4 -2
- package/build-module/mobile/bottom-sheet-text-control/index.native.js.map +1 -1
- package/build-module/modal/index.js +1 -2
- package/build-module/modal/index.js.map +1 -1
- package/build-module/private-apis.js +12 -1
- package/build-module/private-apis.js.map +1 -1
- package/build-module/range-control/index.native.js +5 -2
- package/build-module/range-control/index.native.js.map +1 -1
- package/build-module/snackbar/list.js +0 -2
- package/build-module/snackbar/list.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control/styles.js.map +1 -1
- package/build-style/style-rtl.css +11 -14
- package/build-style/style.css +11 -14
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/date-time/date-time/index.d.ts +3 -4
- package/build-types/date-time/date-time/index.d.ts.map +1 -1
- package/build-types/date-time/date-time/styles.d.ts +0 -4
- package/build-types/date-time/date-time/styles.d.ts.map +1 -1
- package/build-types/date-time/stories/date-time.d.ts.map +1 -1
- package/build-types/date-time/types.d.ts +0 -14
- package/build-types/date-time/types.d.ts.map +1 -1
- package/build-types/dropdown-menu/index.d.ts +83 -1
- package/build-types/dropdown-menu/index.d.ts.map +1 -1
- package/build-types/dropdown-menu/stories/index.d.ts +13 -0
- package/build-types/dropdown-menu/stories/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/test/index.d.ts +2 -0
- package/build-types/dropdown-menu/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu/types.d.ts +134 -0
- package/build-types/dropdown-menu/types.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/index.d.ts +17 -0
- package/build-types/dropdown-menu-v2/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/stories/index.d.ts +13 -0
- package/build-types/dropdown-menu-v2/stories/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/styles.d.ts +41 -0
- package/build-types/dropdown-menu-v2/styles.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/test/index.d.ts +2 -0
- package/build-types/dropdown-menu-v2/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2/types.d.ts +242 -0
- package/build-types/dropdown-menu-v2/types.d.ts.map +1 -0
- package/build-types/input-control/styles/input-control-styles.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/snackbar/list.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control/styles.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.d.ts.map +1 -1
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts +1 -10
- package/build-types/ui/context/get-styled-class-name-from-key.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/button/style.scss +5 -12
- package/src/color-picker/styles.ts +7 -2
- package/src/date-time/README.md +0 -16
- package/src/date-time/date-time/index.tsx +17 -155
- package/src/date-time/date-time/styles.ts +0 -4
- package/src/date-time/stories/date-time.tsx +0 -4
- package/src/date-time/types.ts +0 -16
- package/src/dropdown-menu/README.md +12 -22
- package/src/dropdown-menu/{index.js → index.tsx} +111 -25
- package/src/dropdown-menu/stories/{index.js → index.tsx} +14 -22
- package/src/dropdown-menu/test/{index.js → index.tsx} +6 -5
- package/src/dropdown-menu/types.ts +143 -0
- package/src/dropdown-menu-v2/README.md +392 -0
- package/src/dropdown-menu-v2/index.tsx +241 -0
- package/src/dropdown-menu-v2/stories/index.tsx +193 -0
- package/src/dropdown-menu-v2/styles.ts +263 -0
- package/src/dropdown-menu-v2/test/index.tsx +816 -0
- package/src/dropdown-menu-v2/types.ts +250 -0
- package/src/index.native.js +0 -1
- package/src/input-control/styles/input-control-styles.tsx +7 -0
- package/src/mobile/bottom-sheet/cell.native.js +26 -5
- package/src/mobile/bottom-sheet/range-cell.native.js +2 -1
- package/src/mobile/bottom-sheet/stepper-cell/index.native.js +2 -0
- package/src/mobile/bottom-sheet/styles.native.scss +13 -1
- package/src/mobile/bottom-sheet/switch-cell.native.js +10 -2
- package/src/mobile/bottom-sheet-select-control/index.native.js +2 -0
- package/src/mobile/bottom-sheet-text-control/index.native.js +2 -0
- package/src/modal/index.tsx +1 -6
- package/src/private-apis.ts +22 -0
- package/src/range-control/index.native.js +3 -0
- package/src/search-control/style.scss +2 -0
- package/src/snackbar/list.tsx +0 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +6 -2
- package/src/toggle-group-control/toggle-group-control/styles.ts +6 -1
- package/src/toolbar/stories/index.tsx +25 -28
- package/src/tooltip/style.scss +2 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/build/mobile/readable-content-view/index.native.js +0 -97
- package/build/mobile/readable-content-view/index.native.js.map +0 -1
- package/build-module/mobile/readable-content-view/index.native.js +0 -81
- package/build-module/mobile/readable-content-view/index.native.js.map +0 -1
- package/src/mobile/readable-content-view/index.native.js +0 -85
- package/src/mobile/readable-content-view/style.native.scss +0 -30
package/build-style/style.css
CHANGED
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
--wp-admin-theme-color-darker-20--rgb: 24, 58, 214;
|
|
97
97
|
--wp-admin-border-width-focus: 2px;
|
|
98
98
|
}
|
|
99
|
-
@media (
|
|
99
|
+
@media (min-resolution: 192dpi) {
|
|
100
100
|
:root {
|
|
101
101
|
--wp-admin-border-width-focus: 1.5px;
|
|
102
102
|
}
|
|
@@ -310,16 +310,11 @@
|
|
|
310
310
|
outline: 1px solid transparent;
|
|
311
311
|
}
|
|
312
312
|
.components-button.is-secondary:active:not(:disabled), .components-button.is-tertiary:active:not(:disabled) {
|
|
313
|
-
background: var(--wp-components-color-gray-300, #ddd);
|
|
314
|
-
color: var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6));
|
|
315
313
|
box-shadow: none;
|
|
316
314
|
}
|
|
317
|
-
.components-button.is-secondary:hover:not(:disabled), .components-button.is-tertiary:hover:not(:disabled) {
|
|
318
|
-
color: var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6));
|
|
319
|
-
}
|
|
320
315
|
.components-button.is-secondary:disabled, .components-button.is-secondary[aria-disabled=true], .components-button.is-secondary[aria-disabled=true]:hover, .components-button.is-tertiary:disabled, .components-button.is-tertiary[aria-disabled=true], .components-button.is-tertiary[aria-disabled=true]:hover {
|
|
321
|
-
color: #
|
|
322
|
-
background:
|
|
316
|
+
color: #949494;
|
|
317
|
+
background: transparent;
|
|
323
318
|
transform: none;
|
|
324
319
|
opacity: 1;
|
|
325
320
|
box-shadow: none;
|
|
@@ -340,10 +335,10 @@
|
|
|
340
335
|
color: var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9));
|
|
341
336
|
background: transparent;
|
|
342
337
|
}
|
|
343
|
-
.components-button.is-tertiary:hover:not(:disabled) {
|
|
338
|
+
.components-button.is-tertiary:hover:not(:disabled, [aria-disabled=true]) {
|
|
344
339
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.04);
|
|
345
340
|
}
|
|
346
|
-
.components-button.is-tertiary:active:not(:disabled) {
|
|
341
|
+
.components-button.is-tertiary:active:not(:disabled, [aria-disabled=true]) {
|
|
347
342
|
background: rgba(var(--wp-admin-theme-color--rgb), 0.08);
|
|
348
343
|
}
|
|
349
344
|
.components-button.is-tertiary .dashicon {
|
|
@@ -396,7 +391,7 @@ p + .components-button.is-tertiary {
|
|
|
396
391
|
.components-button.is-link:focus {
|
|
397
392
|
border-radius: 2px;
|
|
398
393
|
}
|
|
399
|
-
.components-button:not([aria-disabled=true]):active {
|
|
394
|
+
.components-button:not(:disabled, [aria-disabled=true]):active {
|
|
400
395
|
color: var(--wp-components-color-foreground, #1e1e1e);
|
|
401
396
|
}
|
|
402
397
|
.components-button:disabled, .components-button[aria-disabled=true] {
|
|
@@ -2734,7 +2729,7 @@ body.rtl .components-panel__body-toggle.components-button .dashicons-arrow-right
|
|
|
2734
2729
|
|
|
2735
2730
|
/* This CSS is shown only to Safari, which has a bug with table-caption making it jumpy.
|
|
2736
2731
|
See https://bugs.webkit.org/show_bug.cgi?id=187903. */
|
|
2737
|
-
@media not all and (
|
|
2732
|
+
@media not all and (min-resolution: 0.001dpcm) {
|
|
2738
2733
|
@supports (-webkit-appearance: none) {
|
|
2739
2734
|
.components-resizable-box__side-handle.components-resizable-box__handle-top:hover::before,
|
|
2740
2735
|
.components-resizable-box__side-handle.components-resizable-box__handle-bottom:hover::before,
|
|
@@ -2888,10 +2883,12 @@ body.lockscroll {
|
|
|
2888
2883
|
.components-search-control__icon {
|
|
2889
2884
|
position: absolute;
|
|
2890
2885
|
top: 0;
|
|
2886
|
+
width: 24px;
|
|
2891
2887
|
right: 12px;
|
|
2892
2888
|
bottom: 0;
|
|
2893
2889
|
display: flex;
|
|
2894
2890
|
align-items: center;
|
|
2891
|
+
justify-content: center;
|
|
2895
2892
|
}
|
|
2896
2893
|
.components-search-control__icon > svg {
|
|
2897
2894
|
margin: 8px 0;
|
|
@@ -3405,11 +3402,11 @@ div.components-toolbar > div + div.has-left-divider::before {
|
|
|
3405
3402
|
}
|
|
3406
3403
|
|
|
3407
3404
|
.components-tooltip .components-popover__content {
|
|
3408
|
-
background:
|
|
3405
|
+
background: #000;
|
|
3409
3406
|
border-radius: 2px;
|
|
3410
3407
|
border-width: 0;
|
|
3411
3408
|
outline: none;
|
|
3412
|
-
color:
|
|
3409
|
+
color: #f0f0f0;
|
|
3413
3410
|
white-space: nowrap;
|
|
3414
3411
|
text-align: center;
|
|
3415
3412
|
line-height: 1.4;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-picker/styles.ts"],"names":[],"mappings":";AAsBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;UAIhC,CAAC;AAEF,eAAO,MAAM,aAAa;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/color-picker/styles.ts"],"names":[],"mappings":";AAsBA,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;UAIhC,CAAC;AAEF,eAAO,MAAM,aAAa;;UAWzB,CAAC;AAEF,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAGxB,CAAC;AASF,eAAO,MAAM,6BAA6B;;;yGAKzC,CAAC;AAEF,eAAO,MAAM,kCAAkC;;;;;;;UAG9C,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;;UAK7B,CAAC;AAEF,eAAO,MAAM,eAAe;;;yGA6C3B,CAAC;AAEF,eAAO,MAAM,UAAU;;UAStB,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
2
5
|
import { default as DatePicker } from '../date';
|
|
3
6
|
import { default as TimePicker } from '../time';
|
|
4
7
|
export { DatePicker, TimePicker };
|
|
@@ -19,8 +22,6 @@ export { DatePicker, TimePicker };
|
|
|
19
22
|
* currentDate={ date }
|
|
20
23
|
* onChange={ ( newDate ) => setDate( newDate ) }
|
|
21
24
|
* is12Hour
|
|
22
|
-
* __nextRemoveHelpButton
|
|
23
|
-
* __nextRemoveResetButton
|
|
24
25
|
* />
|
|
25
26
|
* );
|
|
26
27
|
* };
|
|
@@ -28,8 +29,6 @@ export { DatePicker, TimePicker };
|
|
|
28
29
|
*/
|
|
29
30
|
export declare const DateTimePicker: import("react").ForwardRefExoticComponent<Omit<import("../types").DatePickerProps, "onChange"> & Omit<import("../types").TimePickerProps, "onChange" | "currentTime"> & {
|
|
30
31
|
onChange?: ((date: string | null) => void) | undefined;
|
|
31
|
-
__nextRemoveHelpButton?: boolean | undefined;
|
|
32
|
-
__nextRemoveResetButton?: boolean | undefined;
|
|
33
32
|
} & import("react").RefAttributes<any>>;
|
|
34
33
|
export default DateTimePicker;
|
|
35
34
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-time/date-time/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-time/date-time/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,SAAS,CAAC;AAIhD,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,CAAC;AAqClC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,cAAc;;uCAA0C,CAAC;AAEtE,eAAe,cAAc,CAAC"}
|
|
@@ -7,8 +7,4 @@ export declare const Wrapper: import("@emotion/styled").StyledComponent<Omit<imp
|
|
|
7
7
|
} & {
|
|
8
8
|
theme?: import("@emotion/react").Theme | undefined;
|
|
9
9
|
}, {}, {}>;
|
|
10
|
-
export declare const CalendarHelp: import("@emotion/styled").StyledComponent<{
|
|
11
|
-
theme?: import("@emotion/react").Theme | undefined;
|
|
12
|
-
as?: import("react").ElementType<any> | undefined;
|
|
13
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
14
10
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/date-time/date-time/styles.ts"],"names":[],"mappings":";AAUA,eAAO,MAAM,OAAO;;;;;;;UAEnB,CAAC
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/date-time/date-time/styles.ts"],"names":[],"mappings":";AAUA,eAAO,MAAM,OAAO;;;;;;;UAEnB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"date-time.d.ts","sourceRoot":"","sources":["../../../src/date-time/stories/date-time.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,cAAc,MAAM,cAAc,CAAC;AAG1C,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,cAAc,CAW/C,CAAC;AACF,eAAe,IAAI,CAAC;AAuBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,cAAc,CAE1D,CAAC;
|
|
1
|
+
{"version":3,"file":"date-time.d.ts","sourceRoot":"","sources":["../../../src/date-time/stories/date-time.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAOtE;;GAEG;AACH,OAAO,cAAc,MAAM,cAAc,CAAC;AAG1C,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,cAAc,CAW/C,CAAC;AACF,eAAe,IAAI,CAAC;AAuBpB,eAAO,MAAM,OAAO,EAAE,cAAc,CAAE,OAAO,cAAc,CAE1D,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,cAAc,CAAE,OAAO,cAAc,CAC1C,CAAC;AAWrB,eAAO,MAAM,gBAAgB,EAAE,cAAc,CAAE,OAAO,cAAc,CAChD,CAAC"}
|
|
@@ -62,19 +62,5 @@ export type DateTimePickerProps = Omit<DatePickerProps, 'onChange'> & Omit<TimeP
|
|
|
62
62
|
* passed the date and time as an argument.
|
|
63
63
|
*/
|
|
64
64
|
onChange?: (date: string | null) => void;
|
|
65
|
-
/**
|
|
66
|
-
* Start opting in to not displaying a Help button which will become the
|
|
67
|
-
* default in a future version.
|
|
68
|
-
*
|
|
69
|
-
* @default false
|
|
70
|
-
*/
|
|
71
|
-
__nextRemoveHelpButton?: boolean;
|
|
72
|
-
/**
|
|
73
|
-
* Start opting in to not displaying a Reset button which will become
|
|
74
|
-
* the default in a future version.
|
|
75
|
-
*
|
|
76
|
-
* @default false
|
|
77
|
-
*/
|
|
78
|
-
__nextRemoveResetButton?: boolean;
|
|
79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AI,CAAC;CAC3C,CAAC"}
|
|
@@ -1,3 +1,85 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DropdownMenuProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* The DropdownMenu displays a list of actions (each contained in a MenuItem,
|
|
6
|
+
* MenuItemsChoice, or MenuGroup) in a compact way. It appears in a Popover
|
|
7
|
+
* after the user has interacted with an element (a button or icon) or when
|
|
8
|
+
* they perform a specific action.
|
|
9
|
+
*
|
|
10
|
+
* Render a Dropdown Menu with a set of controls:
|
|
11
|
+
*
|
|
12
|
+
* ```jsx
|
|
13
|
+
* import { DropdownMenu } from '@wordpress/components';
|
|
14
|
+
* import {
|
|
15
|
+
* more,
|
|
16
|
+
* arrowLeft,
|
|
17
|
+
* arrowRight,
|
|
18
|
+
* arrowUp,
|
|
19
|
+
* arrowDown,
|
|
20
|
+
* } from '@wordpress/icons';
|
|
21
|
+
*
|
|
22
|
+
* const MyDropdownMenu = () => (
|
|
23
|
+
* <DropdownMenu
|
|
24
|
+
* icon={ more }
|
|
25
|
+
* label="Select a direction"
|
|
26
|
+
* controls={ [
|
|
27
|
+
* {
|
|
28
|
+
* title: 'Up',
|
|
29
|
+
* icon: arrowUp,
|
|
30
|
+
* onClick: () => console.log( 'up' ),
|
|
31
|
+
* },
|
|
32
|
+
* {
|
|
33
|
+
* title: 'Right',
|
|
34
|
+
* icon: arrowRight,
|
|
35
|
+
* onClick: () => console.log( 'right' ),
|
|
36
|
+
* },
|
|
37
|
+
* {
|
|
38
|
+
* title: 'Down',
|
|
39
|
+
* icon: arrowDown,
|
|
40
|
+
* onClick: () => console.log( 'down' ),
|
|
41
|
+
* },
|
|
42
|
+
* {
|
|
43
|
+
* title: 'Left',
|
|
44
|
+
* icon: arrowLeft,
|
|
45
|
+
* onClick: () => console.log( 'left' ),
|
|
46
|
+
* },
|
|
47
|
+
* ] }
|
|
48
|
+
* />
|
|
49
|
+
* );
|
|
50
|
+
* ```
|
|
51
|
+
*
|
|
52
|
+
* Alternatively, specify a `children` function which returns elements valid for
|
|
53
|
+
* use in a DropdownMenu: `MenuItem`, `MenuItemsChoice`, or `MenuGroup`.
|
|
54
|
+
*
|
|
55
|
+
* ```jsx
|
|
56
|
+
* import { DropdownMenu, MenuGroup, MenuItem } from '@wordpress/components';
|
|
57
|
+
* import { more, arrowUp, arrowDown, trash } from '@wordpress/icons';
|
|
58
|
+
*
|
|
59
|
+
* const MyDropdownMenu = () => (
|
|
60
|
+
* <DropdownMenu icon={ more } label="Select a direction">
|
|
61
|
+
* { ( { onClose } ) => (
|
|
62
|
+
* <>
|
|
63
|
+
* <MenuGroup>
|
|
64
|
+
* <MenuItem icon={ arrowUp } onClick={ onClose }>
|
|
65
|
+
* Move Up
|
|
66
|
+
* </MenuItem>
|
|
67
|
+
* <MenuItem icon={ arrowDown } onClick={ onClose }>
|
|
68
|
+
* Move Down
|
|
69
|
+
* </MenuItem>
|
|
70
|
+
* </MenuGroup>
|
|
71
|
+
* <MenuGroup>
|
|
72
|
+
* <MenuItem icon={ trash } onClick={ onClose }>
|
|
73
|
+
* Remove
|
|
74
|
+
* </MenuItem>
|
|
75
|
+
* </MenuGroup>
|
|
76
|
+
* </>
|
|
77
|
+
* ) }
|
|
78
|
+
* </DropdownMenu>
|
|
79
|
+
* );
|
|
80
|
+
* ```
|
|
81
|
+
*
|
|
82
|
+
*/
|
|
83
|
+
declare function DropdownMenu(dropdownMenuProps: DropdownMenuProps): JSX.Element | null;
|
|
1
84
|
export default DropdownMenu;
|
|
2
|
-
declare function DropdownMenu(dropdownMenuProps: any): JSX.Element | null;
|
|
3
85
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu/index.
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu/index.tsx"],"names":[],"mappings":";AAgBA,OAAO,KAAK,EAAE,iBAAiB,EAAkB,MAAM,SAAS,CAAC;AAwBjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+EG;AAEH,iBAAS,YAAY,CAAE,iBAAiB,EAAE,iBAAiB,sBAmK1D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import DropdownMenu from '..';
|
|
9
|
+
declare const meta: ComponentMeta<typeof DropdownMenu>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: ComponentStory<typeof DropdownMenu>;
|
|
12
|
+
export declare const WithChildren: ComponentStory<typeof DropdownMenu>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dropdown-menu/stories/index.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACtE;;GAEG;AACH,OAAO,YAAY,MAAM,IAAI,CAAC;AAgB9B,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,YAAY,CAc7C,CAAC;AACF,eAAe,IAAI,CAAC;AAQpB,eAAO,MAAM,OAAO,qCAAsB,CAAC;AAoB3C,eAAO,MAAM,YAAY,qCAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dropdown-menu/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { ReactNode } from 'react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { ButtonAsButtonProps } from '../button/types';
|
|
9
|
+
import type { WordPressComponentProps } from '../ui/context';
|
|
10
|
+
import type { DropdownProps } from '../dropdown/types';
|
|
11
|
+
import type { Props as IconProps } from '../icon';
|
|
12
|
+
import type { NavigableMenuProps } from '../navigable-container/types';
|
|
13
|
+
export type DropdownOption = {
|
|
14
|
+
/**
|
|
15
|
+
* The Dashicon icon slug to be shown for the option.
|
|
16
|
+
*/
|
|
17
|
+
icon?: IconProps['icon'];
|
|
18
|
+
/**
|
|
19
|
+
* A human-readable title to display for the option.
|
|
20
|
+
*/
|
|
21
|
+
title: string;
|
|
22
|
+
/**
|
|
23
|
+
* Whether or not the option is disabled.
|
|
24
|
+
*
|
|
25
|
+
* @default false
|
|
26
|
+
*/
|
|
27
|
+
isDisabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* A callback function to invoke when the option is selected.
|
|
30
|
+
*/
|
|
31
|
+
onClick?: () => void;
|
|
32
|
+
/**
|
|
33
|
+
* Whether or not the control is currently active.
|
|
34
|
+
*/
|
|
35
|
+
isActive?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* Text to use for the internal `Button` component's tooltip.
|
|
38
|
+
*/
|
|
39
|
+
label?: string;
|
|
40
|
+
/**
|
|
41
|
+
* The role to apply to the option's HTML element
|
|
42
|
+
*/
|
|
43
|
+
role?: HTMLElement['role'];
|
|
44
|
+
};
|
|
45
|
+
type DropdownCallbackProps = {
|
|
46
|
+
isOpen: boolean;
|
|
47
|
+
onToggle: () => void;
|
|
48
|
+
onClose: () => void;
|
|
49
|
+
};
|
|
50
|
+
type ToggleProps = Partial<Omit<WordPressComponentProps<ButtonAsButtonProps, 'button', false>, 'label' | 'text'>> & {
|
|
51
|
+
as?: React.ElementType | keyof JSX.IntrinsicElements;
|
|
52
|
+
};
|
|
53
|
+
export type DropdownMenuProps = {
|
|
54
|
+
/**
|
|
55
|
+
* The Dashicon icon slug to be shown in the collapsed menu button.
|
|
56
|
+
*
|
|
57
|
+
* @default "menu"
|
|
58
|
+
*/
|
|
59
|
+
icon?: IconProps['icon'] | null;
|
|
60
|
+
/**
|
|
61
|
+
* A human-readable label to present as accessibility text on the focused
|
|
62
|
+
* collapsed menu button.
|
|
63
|
+
*/
|
|
64
|
+
label: string;
|
|
65
|
+
/**
|
|
66
|
+
* A class name to apply to the dropdown menu's toggle element wrapper.
|
|
67
|
+
*/
|
|
68
|
+
className?: string;
|
|
69
|
+
/**
|
|
70
|
+
* Properties of `popoverProps` object will be passed as props to the nested
|
|
71
|
+
* `Popover` component.
|
|
72
|
+
* Use this object to modify props available for the `Popover` component that
|
|
73
|
+
* are not already exposed in the `DropdownMenu` component, e.g.: the
|
|
74
|
+
* direction in which the popover should open relative to its parent node
|
|
75
|
+
* set with `position` prop.
|
|
76
|
+
*/
|
|
77
|
+
popoverProps?: DropdownProps['popoverProps'];
|
|
78
|
+
/**
|
|
79
|
+
* Properties of `toggleProps` object will be passed as props to the nested
|
|
80
|
+
* `Button` component in the `renderToggle` implementation of the `Dropdown`
|
|
81
|
+
* component used internally.
|
|
82
|
+
* Use this object to modify props available for the `Button` component that
|
|
83
|
+
* are not already exposed in the `DropdownMenu` component, e.g.: the tooltip
|
|
84
|
+
* text displayed on hover set with `tooltip` prop.
|
|
85
|
+
*/
|
|
86
|
+
toggleProps?: ToggleProps;
|
|
87
|
+
/**
|
|
88
|
+
* Properties of `menuProps` object will be passed as props to the nested
|
|
89
|
+
* `NavigableMenu` component in the `renderContent` implementation of the
|
|
90
|
+
* `Dropdown` component used internally.
|
|
91
|
+
* Use this object to modify props available for the `NavigableMenu`
|
|
92
|
+
* component that are not already exposed in the `DropdownMenu` component,
|
|
93
|
+
* e.g.: the orientation of the menu set with `orientation` prop.
|
|
94
|
+
*/
|
|
95
|
+
menuProps?: Omit<Partial<NavigableMenuProps>, 'children'>;
|
|
96
|
+
/**
|
|
97
|
+
* In some contexts, the arrow down key used to open the dropdown menu might
|
|
98
|
+
* need to be disabled—for example when that key is used to perform another
|
|
99
|
+
* action.
|
|
100
|
+
*
|
|
101
|
+
* @default false
|
|
102
|
+
*/
|
|
103
|
+
disableOpenOnArrowDown?: boolean;
|
|
104
|
+
/**
|
|
105
|
+
* Text to display on the nested `Button` component in the `renderToggle`
|
|
106
|
+
* implementation of the `Dropdown` component used internally.
|
|
107
|
+
*/
|
|
108
|
+
text?: string;
|
|
109
|
+
/**
|
|
110
|
+
* Whether or not `no-icons` should be added to the menu's `className`.
|
|
111
|
+
*/
|
|
112
|
+
noIcons?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* A [function render prop](https://reactjs.org/docs/render-props.html#using-props-other-than-render)
|
|
115
|
+
* which should return an element or elements valid for use in a DropdownMenu:
|
|
116
|
+
* `MenuItem`, `MenuItemsChoice`, or `MenuGroup`. Its first argument is a
|
|
117
|
+
* props object including the same values as given to a `Dropdown`'s
|
|
118
|
+
* `renderContent` (`isOpen`, `onToggle`, `onClose`).
|
|
119
|
+
*
|
|
120
|
+
* A valid DropdownMenu must specify a `controls` or `children` prop, or both.
|
|
121
|
+
*/
|
|
122
|
+
children?: (callbackProps: DropdownCallbackProps) => ReactNode;
|
|
123
|
+
/**
|
|
124
|
+
* An array or nested array of objects describing the options to be shown in
|
|
125
|
+
* the expanded menu. Each object should include an `icon` Dashicon slug
|
|
126
|
+
* string, a human-readable `title` string, `isDisabled` boolean flag, and
|
|
127
|
+
* an `onClick` function callback to invoke when the option is selected.
|
|
128
|
+
*
|
|
129
|
+
* A valid DropdownMenu must specify a `controls` or `children` prop, or both.
|
|
130
|
+
*/
|
|
131
|
+
controls?: DropdownOption[] | DropdownOption[][];
|
|
132
|
+
};
|
|
133
|
+
export {};
|
|
134
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","s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MAAM,MAAM,iBAAiB,GAAG;IAC/B;;;;OAIG;IACH,IAAI,CAAC,EAAE,SAAS,CAAE,MAAM,CAAE,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,aAAa,CAAE,cAAc,CAAE,CAAC;IAC/C;;;;;;;OAOG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,IAAI,CAAE,OAAO,CAAE,kBAAkB,CAAE,EAAE,UAAU,CAAE,CAAC;IAC9D;;;;;;OAMG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;;;OAQG;IACH,QAAQ,CAAC,EAAE,CAAE,aAAa,EAAE,qBAAqB,KAAM,SAAS,CAAC;IACjE;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,cAAc,EAAE,GAAG,cAAc,EAAE,EAAE,CAAC;CACjD,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DropdownMenuProps, DropdownSubMenuProps, DropdownMenuItemProps, DropdownMenuLabelProps, DropdownMenuGroupProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownSubMenuTriggerProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* `DropdownMenu` displays a menu to the user (such as a set of actions
|
|
5
|
+
* or functions) triggered by a button.
|
|
6
|
+
*/
|
|
7
|
+
export declare const DropdownMenu: ({ defaultOpen, open, onOpenChange, modal, side, sideOffset, align, alignOffset, children, trigger, }: DropdownMenuProps) => JSX.Element;
|
|
8
|
+
export declare const DropdownSubMenuTrigger: ({ prefix, suffix, children, }: DropdownSubMenuTriggerProps) => JSX.Element;
|
|
9
|
+
export declare const DropdownSubMenu: ({ defaultOpen, open, onOpenChange, disabled, textValue, children, trigger, }: DropdownSubMenuProps) => JSX.Element;
|
|
10
|
+
export declare const DropdownMenuLabel: (props: DropdownMenuLabelProps) => JSX.Element;
|
|
11
|
+
export declare const DropdownMenuGroup: (props: DropdownMenuGroupProps) => JSX.Element;
|
|
12
|
+
export declare const DropdownMenuItem: import("react").ForwardRefExoticComponent<DropdownMenuItemProps & import("react").RefAttributes<any>>;
|
|
13
|
+
export declare const DropdownMenuCheckboxItem: ({ children, checked, suffix, ...props }: DropdownMenuCheckboxItemProps) => JSX.Element;
|
|
14
|
+
export declare const DropdownMenuRadioGroup: (props: DropdownMenuRadioGroupProps) => JSX.Element;
|
|
15
|
+
export declare const DropdownMenuRadioItem: ({ children, suffix, ...props }: DropdownMenuRadioItemProps) => JSX.Element;
|
|
16
|
+
export declare const DropdownMenuSeparator: (props: DropdownMenuSeparatorProps) => JSX.Element;
|
|
17
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu-v2/index.tsx"],"names":[],"mappings":";AAkBA,OAAO,KAAK,EACX,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,sBAAsB,EACtB,sBAAsB,EACtB,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,2BAA2B,EAC3B,MAAM,SAAS,CAAC;AAOjB;;;GAGG;AACH,eAAO,MAAM,YAAY,yGActB,iBAAiB,gBAyBnB,CAAC;AAEF,eAAO,MAAM,sBAAsB,kCAShC,2BAA2B,gBAgB7B,CAAC;AAEF,eAAO,MAAM,eAAe,iFAWzB,oBAAoB,gBAwBtB,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAY,sBAAsB,gBAE/D,CAAC;AAEF,eAAO,MAAM,iBAAiB,UAAY,sBAAsB,gBAE/D,CAAC;AAEF,eAAO,MAAM,gBAAgB,uGAqB5B,CAAC;AAEF,eAAO,MAAM,wBAAwB,4CAKlC,6BAA6B,gBAuB/B,CAAC;AAEF,eAAO,MAAM,sBAAsB,UAC3B,2BAA2B,gBACmB,CAAC;AAQvD,eAAO,MAAM,qBAAqB,mCAI/B,0BAA0B,gBAgB5B,CAAC;AAEF,eAAO,MAAM,qBAAqB,UAAY,0BAA0B,gBAEvE,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { ComponentMeta, ComponentStory } from '@storybook/react';
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import { DropdownMenu } from '..';
|
|
10
|
+
declare const meta: ComponentMeta<typeof DropdownMenu>;
|
|
11
|
+
export default meta;
|
|
12
|
+
export declare const Default: ComponentStory<({ defaultOpen, open, onOpenChange, modal, side, sideOffset, align, alignOffset, children, trigger, }: import("../types").DropdownMenuProps) => JSX.Element>;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dropdown-menu-v2/stories/index.tsx"],"names":[],"mappings":";AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGtE;;GAEG;AACH,OAAO,EACN,YAAY,EAUZ,MAAM,IAAI,CAAC;AAcZ,QAAA,MAAM,IAAI,EAAE,aAAa,CAAE,OAAO,YAAY,CAmC7C,CAAC;AACF,eAAe,IAAI,CAAC;AA6DpB,eAAO,MAAM,OAAO,6KAAsB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as DropdownMenu from '@radix-ui/react-dropdown-menu';
|
|
3
|
+
export declare const ItemPrefixWrapper: import("@emotion/styled").StyledComponent<{
|
|
4
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
5
|
+
as?: import("react").ElementType<any> | undefined;
|
|
6
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
7
|
+
export declare const ItemSuffixWrapper: import("@emotion/styled").StyledComponent<{
|
|
8
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
9
|
+
as?: import("react").ElementType<any> | undefined;
|
|
10
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
11
|
+
export declare const Content: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
12
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
13
|
+
}, {}, {}>;
|
|
14
|
+
export declare const SubContent: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
15
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
export declare const Item: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
18
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
19
|
+
}, {}, {}>;
|
|
20
|
+
export declare const CheckboxItem: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
21
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
22
|
+
}, {}, {}>;
|
|
23
|
+
export declare const RadioItem: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
24
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
25
|
+
}, {}, {}>;
|
|
26
|
+
export declare const SubTrigger: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
27
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
28
|
+
}, {}, {}>;
|
|
29
|
+
export declare const Label: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
30
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
31
|
+
}, {}, {}>;
|
|
32
|
+
export declare const Separator: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement> & {
|
|
33
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
34
|
+
}, {}, {}>;
|
|
35
|
+
export declare const ItemIndicator: import("@emotion/styled").StyledComponent<DropdownMenu.DropdownMenuItemIndicatorProps & import("react").RefAttributes<HTMLSpanElement> & {
|
|
36
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
37
|
+
}, {}, {}>;
|
|
38
|
+
export declare const SubmenuRtlChevronIcon: import("@emotion/styled").StyledComponent<import("../icon").Props & {
|
|
39
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
40
|
+
}, {}, {}>;
|
|
41
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu-v2/styles.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,YAAY,MAAM,+BAA+B,CAAC;AAyI9D,eAAO,MAAM,iBAAiB;;;2GAE7B,CAAC;AAEF,eAAO,MAAM,iBAAiB;;;2GAE7B,CAAC;AA+CF,eAAO,MAAM,OAAO;;UAEnB,CAAC;AACF,eAAO,MAAM,UAAU;;UAEtB,CAAC;AAEF,eAAO,MAAM,IAAI;;UAEhB,CAAC;AACF,eAAO,MAAM,YAAY;;UAExB,CAAC;AACF,eAAO,MAAM,SAAS;;UAErB,CAAC;AACF,eAAO,MAAM,UAAU;;UAQtB,CAAC;AAEF,eAAO,MAAM,KAAK;;UAgBjB,CAAC;AAEF,eAAO,MAAM,SAAS;;UAMrB,CAAC;AAEF,eAAO,MAAM,aAAa;;UAIzB,CAAC;AAEF,eAAO,MAAM,qBAAqB;;UASjC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/dropdown-menu-v2/test/index.tsx"],"names":[],"mappings":""}
|