@wordpress/components 25.9.1 → 25.11.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 +48 -0
- package/build/alignment-matrix-control/cell.js +8 -5
- package/build/alignment-matrix-control/cell.js.map +1 -1
- package/build/alignment-matrix-control/index.js +27 -43
- package/build/alignment-matrix-control/index.js.map +1 -1
- package/build/alignment-matrix-control/utils.js +29 -9
- package/build/alignment-matrix-control/utils.js.map +1 -1
- package/build/autocomplete/index.js +104 -52
- package/build/autocomplete/index.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker-option.js +20 -39
- package/build/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build/circular-option-picker/circular-option-picker.js +11 -32
- package/build/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build/circular-option-picker/types.js.map +1 -1
- package/build/color-palette/index.js +7 -2
- package/build/color-palette/index.js.map +1 -1
- package/build/color-picker/component.js +12 -2
- package/build/color-picker/component.js.map +1 -1
- package/build/color-picker/picker.js +77 -1
- package/build/color-picker/picker.js.map +1 -1
- package/build/color-picker/styles.js +8 -8
- package/build/color-picker/styles.js.map +1 -1
- package/build/color-picker/types.js.map +1 -1
- package/build/composite/v2.js +43 -0
- package/build/composite/v2.js.map +1 -0
- package/build/confirm-dialog/component.js +74 -8
- package/build/confirm-dialog/component.js.map +1 -1
- package/build/confirm-dialog/types.js.map +1 -1
- package/build/custom-gradient-picker/gradient-bar/control-points.js +13 -4
- package/build/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build/dropdown-menu-v2-ariakit/index.js +217 -0
- package/build/dropdown-menu-v2-ariakit/index.js.map +1 -0
- package/build/dropdown-menu-v2-ariakit/styles.js +157 -0
- package/build/dropdown-menu-v2-ariakit/styles.js.map +1 -0
- package/build/dropdown-menu-v2-ariakit/types.js +6 -0
- package/build/dropdown-menu-v2-ariakit/types.js.map +1 -0
- package/build/font-size-picker/utils.js +1 -1
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/input-control/styles/input-control-styles.js +23 -23
- package/build/input-control/styles/input-control-styles.js.map +1 -1
- package/build/mobile/global-styles-context/utils.native.js +1 -1
- package/build/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build/modal/index.js +45 -16
- package/build/modal/index.js.map +1 -1
- package/build/palette-edit/index.js +4 -0
- package/build/palette-edit/index.js.map +1 -1
- package/build/popover/index.js +34 -6
- package/build/popover/index.js.map +1 -1
- package/build/private-apis.js +18 -2
- package/build/private-apis.js.map +1 -1
- package/build/progress-bar/styles.js +5 -5
- package/build/progress-bar/styles.js.map +1 -1
- package/build/sandbox/index.js +1 -1
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +1 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/select-control/styles/select-control-styles.js +8 -8
- package/build/select-control/styles/select-control-styles.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/tabs/context.js +16 -0
- package/build/tabs/context.js.map +1 -0
- package/build/tabs/index.js +147 -0
- package/build/tabs/index.js.map +1 -0
- package/build/tabs/styles.js +38 -0
- package/build/tabs/styles.js.map +1 -0
- package/build/tabs/tab.js +46 -0
- package/build/tabs/tab.js.map +1 -0
- package/build/tabs/tablist.js +47 -0
- package/build/tabs/tablist.js.map +1 -0
- package/build/tabs/tabpanel.js +48 -0
- package/build/tabs/tabpanel.js.map +1 -0
- package/build/tabs/types.js +6 -0
- package/build/tabs/types.js.map +1 -0
- package/build/text/component.js +7 -6
- package/build/text/component.js.map +1 -1
- package/build/text/hook.js +6 -15
- package/build/text/hook.js.map +1 -1
- package/build/text/index.js.map +1 -1
- package/build/text/styles.js +7 -7
- package/build/text/styles.js.map +1 -1
- package/build/text/types.js.map +1 -1
- package/build/text/utils.js +17 -33
- package/build/text/utils.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/component.js +1 -0
- package/build/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build/toolbar/toolbar/index.js +17 -10
- package/build/toolbar/toolbar/index.js.map +1 -1
- package/build/toolbar/toolbar/types.js.map +1 -1
- package/build/tools-panel/tools-panel-item/hook.js +2 -2
- package/build/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build/tools-panel/types.js.map +1 -1
- package/build/tooltip/index.js +2 -2
- package/build/tooltip/index.js.map +1 -1
- package/build/unit-control/utils.js +108 -0
- package/build/unit-control/utils.js.map +1 -1
- package/build/utils/unit-values.js +1 -1
- package/build/utils/unit-values.js.map +1 -1
- package/build-module/alignment-matrix-control/cell.js +7 -4
- package/build-module/alignment-matrix-control/cell.js.map +1 -1
- package/build-module/alignment-matrix-control/index.js +27 -43
- package/build-module/alignment-matrix-control/index.js.map +1 -1
- package/build-module/alignment-matrix-control/utils.js +29 -8
- package/build-module/alignment-matrix-control/utils.js.map +1 -1
- package/build-module/autocomplete/index.js +104 -52
- package/build-module/autocomplete/index.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker-option.js +20 -39
- package/build-module/circular-option-picker/circular-option-picker-option.js.map +1 -1
- package/build-module/circular-option-picker/circular-option-picker.js +10 -31
- package/build-module/circular-option-picker/circular-option-picker.js.map +1 -1
- package/build-module/circular-option-picker/types.js.map +1 -1
- package/build-module/color-palette/index.js +7 -2
- package/build-module/color-palette/index.js.map +1 -1
- package/build-module/color-picker/component.js +13 -3
- package/build-module/color-picker/component.js.map +1 -1
- package/build-module/color-picker/picker.js +78 -2
- package/build-module/color-picker/picker.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/color-picker/types.js.map +1 -1
- package/build-module/composite/v2.js +15 -0
- package/build-module/composite/v2.js.map +1 -0
- package/build-module/confirm-dialog/component.js +72 -7
- package/build-module/confirm-dialog/component.js.map +1 -1
- package/build-module/confirm-dialog/types.js.map +1 -1
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js +13 -4
- package/build-module/custom-gradient-picker/gradient-bar/control-points.js.map +1 -1
- package/build-module/dropdown-menu-v2-ariakit/index.js +199 -0
- package/build-module/dropdown-menu-v2-ariakit/index.js.map +1 -0
- package/build-module/dropdown-menu-v2-ariakit/styles.js +136 -0
- package/build-module/dropdown-menu-v2-ariakit/styles.js.map +1 -0
- package/build-module/dropdown-menu-v2-ariakit/types.js +2 -0
- package/build-module/dropdown-menu-v2-ariakit/types.js.map +1 -0
- package/build-module/font-size-picker/utils.js +1 -1
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/input-control/styles/input-control-styles.js +23 -23
- package/build-module/input-control/styles/input-control-styles.js.map +1 -1
- package/build-module/mobile/global-styles-context/utils.native.js +2 -2
- package/build-module/mobile/global-styles-context/utils.native.js.map +1 -1
- package/build-module/modal/index.js +47 -18
- package/build-module/modal/index.js.map +1 -1
- package/build-module/palette-edit/index.js +4 -0
- package/build-module/palette-edit/index.js.map +1 -1
- package/build-module/popover/index.js +34 -6
- package/build-module/popover/index.js.map +1 -1
- package/build-module/private-apis.js +18 -2
- package/build-module/private-apis.js.map +1 -1
- package/build-module/progress-bar/styles.js +5 -5
- package/build-module/progress-bar/styles.js.map +1 -1
- package/build-module/sandbox/index.js +1 -1
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +1 -1
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/select-control/styles/select-control-styles.js +8 -8
- package/build-module/select-control/styles/select-control-styles.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/tabs/context.js +12 -0
- package/build-module/tabs/context.js.map +1 -0
- package/build-module/tabs/index.js +142 -0
- package/build-module/tabs/index.js.map +1 -0
- package/build-module/tabs/styles.js +36 -0
- package/build-module/tabs/styles.js.map +1 -0
- package/build-module/tabs/tab.js +43 -0
- package/build-module/tabs/tab.js.map +1 -0
- package/build-module/tabs/tablist.js +41 -0
- package/build-module/tabs/tablist.js.map +1 -0
- package/build-module/tabs/tabpanel.js +43 -0
- package/build-module/tabs/tabpanel.js.map +1 -0
- package/build-module/tabs/types.js +2 -0
- package/build-module/tabs/types.js.map +1 -0
- package/build-module/text/component.js +6 -6
- package/build-module/text/component.js.map +1 -1
- package/build-module/text/hook.js +11 -19
- package/build-module/text/hook.js.map +1 -1
- package/build-module/text/index.js.map +1 -1
- package/build-module/text/styles.js +7 -7
- package/build-module/text/styles.js.map +1 -1
- package/build-module/text/types.js.map +1 -1
- package/build-module/text/utils.js +17 -10
- package/build-module/text/utils.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js +1 -0
- package/build-module/toggle-group-control/toggle-group-control-option-base/component.js.map +1 -1
- package/build-module/toolbar/toolbar/index.js +18 -11
- package/build-module/toolbar/toolbar/index.js.map +1 -1
- package/build-module/toolbar/toolbar/types.js.map +1 -1
- package/build-module/tools-panel/tools-panel-item/hook.js +2 -2
- package/build-module/tools-panel/tools-panel-item/hook.js.map +1 -1
- package/build-module/tools-panel/types.js.map +1 -1
- package/build-module/tooltip/index.js +2 -2
- package/build-module/tooltip/index.js.map +1 -1
- package/build-module/unit-control/utils.js +108 -0
- package/build-module/unit-control/utils.js.map +1 -1
- package/build-module/utils/unit-values.js +1 -1
- package/build-module/utils/unit-values.js.map +1 -1
- package/build-style/style-rtl.css +17 -5
- package/build-style/style.css +17 -5
- package/build-types/alignment-matrix-control/cell.d.ts +1 -1
- package/build-types/alignment-matrix-control/cell.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/index.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/stories/index.story.d.ts.map +1 -1
- package/build-types/alignment-matrix-control/utils.d.ts +9 -9
- package/build-types/alignment-matrix-control/utils.d.ts.map +1 -1
- package/build-types/autocomplete/index.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker-option.d.ts.map +1 -1
- package/build-types/circular-option-picker/circular-option-picker.d.ts.map +1 -1
- package/build-types/circular-option-picker/types.d.ts +4 -6
- package/build-types/circular-option-picker/types.d.ts.map +1 -1
- package/build-types/color-palette/index.d.ts.map +1 -1
- package/build-types/color-picker/component.d.ts.map +1 -1
- package/build-types/color-picker/picker.d.ts +1 -1
- package/build-types/color-picker/picker.d.ts.map +1 -1
- package/build-types/color-picker/styles.d.ts.map +1 -1
- package/build-types/color-picker/types.d.ts +3 -0
- package/build-types/color-picker/types.d.ts.map +1 -1
- package/build-types/composite/v2.d.ts +12 -0
- package/build-types/composite/v2.d.ts.map +1 -0
- package/build-types/confirm-dialog/component.d.ts +70 -29
- package/build-types/confirm-dialog/component.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts +11 -0
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -0
- package/build-types/confirm-dialog/test/index.d.ts +2 -0
- package/build-types/confirm-dialog/test/index.d.ts.map +1 -0
- package/build-types/confirm-dialog/types.d.ts +32 -10
- package/build-types/confirm-dialog/types.d.ts.map +1 -1
- package/build-types/custom-gradient-picker/gradient-bar/control-points.d.ts.map +1 -1
- package/build-types/dropdown-menu-v2-ariakit/index.d.ts +11 -0
- package/build-types/dropdown-menu-v2-ariakit/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts +16 -0
- package/build-types/dropdown-menu-v2-ariakit/stories/index.story.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2-ariakit/styles.d.ts +88 -0
- package/build-types/dropdown-menu-v2-ariakit/styles.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2-ariakit/test/index.d.ts +2 -0
- package/build-types/dropdown-menu-v2-ariakit/test/index.d.ts.map +1 -0
- package/build-types/dropdown-menu-v2-ariakit/types.d.ts +174 -0
- package/build-types/dropdown-menu-v2-ariakit/types.d.ts.map +1 -0
- package/build-types/font-size-picker/utils.d.ts.map +1 -1
- package/build-types/heading/stories/index.story.d.ts.map +1 -1
- package/build-types/modal/index.d.ts.map +1 -1
- package/build-types/palette-edit/index.d.ts.map +1 -1
- package/build-types/popover/index.d.ts +1 -1
- package/build-types/popover/index.d.ts.map +1 -1
- package/build-types/popover/stories/e2e/index.story.d.ts +1 -1
- package/build-types/private-apis.d.ts.map +1 -1
- package/build-types/progress-bar/styles.d.ts.map +1 -1
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/tabs/context.d.ts +8 -0
- package/build-types/tabs/context.d.ts.map +1 -0
- package/build-types/tabs/index.d.ts +13 -0
- package/build-types/tabs/index.d.ts.map +1 -0
- package/build-types/tabs/stories/index.story.d.ts +20 -0
- package/build-types/tabs/stories/index.story.d.ts.map +1 -0
- package/build-types/tabs/styles.d.ts +17 -0
- package/build-types/tabs/styles.d.ts.map +1 -0
- package/build-types/tabs/tab.d.ts +10 -0
- package/build-types/tabs/tab.d.ts.map +1 -0
- package/build-types/tabs/tablist.d.ts +7 -0
- package/build-types/tabs/tablist.d.ts.map +1 -0
- package/build-types/tabs/tabpanel.d.ts +7 -0
- package/build-types/tabs/tabpanel.d.ts.map +1 -0
- package/build-types/tabs/test/index.d.ts +2 -0
- package/build-types/tabs/test/index.d.ts.map +1 -0
- package/build-types/tabs/types.d.ts +134 -0
- package/build-types/tabs/types.d.ts.map +1 -0
- package/build-types/text/component.d.ts +4 -2
- package/build-types/text/component.d.ts.map +1 -1
- package/build-types/text/hook.d.ts +171 -165
- package/build-types/text/hook.d.ts.map +1 -1
- package/build-types/text/index.d.ts +2 -2
- package/build-types/text/index.d.ts.map +1 -1
- package/build-types/text/stories/index.story.d.ts +21 -0
- package/build-types/text/stories/index.story.d.ts.map +1 -0
- package/build-types/text/styles.d.ts +7 -7
- package/build-types/text/styles.d.ts.map +1 -1
- package/build-types/text/types.d.ts +1 -1
- package/build-types/text/types.d.ts.map +1 -1
- package/build-types/text/utils.d.ts +56 -61
- package/build-types/text/utils.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/component.d.ts.map +1 -1
- package/build-types/toolbar/stories/index.story.d.ts +5 -0
- package/build-types/toolbar/stories/index.story.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/index.d.ts.map +1 -1
- package/build-types/toolbar/toolbar/types.d.ts +10 -0
- package/build-types/toolbar/toolbar/types.d.ts.map +1 -1
- package/build-types/tools-panel/tools-panel-item/hook.d.ts.map +1 -1
- package/build-types/tools-panel/types.d.ts +2 -0
- package/build-types/tools-panel/types.d.ts.map +1 -1
- package/build-types/tooltip/index.d.ts.map +1 -1
- package/build-types/unit-control/utils.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/alignment-matrix-control/cell.tsx +6 -2
- package/src/alignment-matrix-control/index.tsx +31 -54
- package/src/alignment-matrix-control/stories/index.story.tsx +3 -7
- package/src/alignment-matrix-control/test/index.tsx +117 -18
- package/src/alignment-matrix-control/utils.tsx +33 -9
- package/src/autocomplete/index.tsx +136 -77
- package/src/button/style.scss +1 -2
- package/src/circular-option-picker/circular-option-picker-option.tsx +24 -38
- package/src/circular-option-picker/circular-option-picker.tsx +11 -28
- package/src/circular-option-picker/types.ts +6 -5
- package/src/color-palette/index.tsx +6 -1
- package/src/color-picker/component.tsx +25 -3
- package/src/color-picker/picker.tsx +96 -2
- package/src/color-picker/styles.ts +0 -1
- package/src/color-picker/types.ts +3 -0
- package/src/composite/v2.ts +22 -0
- package/src/confirm-dialog/README.md +1 -1
- package/src/confirm-dialog/component.tsx +79 -13
- package/src/confirm-dialog/stories/{index.story.js → index.story.tsx} +26 -24
- package/src/confirm-dialog/test/{index.js → index.tsx} +3 -3
- package/src/confirm-dialog/types.ts +32 -12
- package/src/custom-gradient-picker/gradient-bar/control-points.tsx +32 -25
- package/src/dimension-control/test/__snapshots__/index.test.js.snap +8 -8
- package/src/dropdown-menu-v2-ariakit/README.md +324 -0
- package/src/dropdown-menu-v2-ariakit/index.tsx +318 -0
- package/src/dropdown-menu-v2-ariakit/stories/index.story.tsx +506 -0
- package/src/dropdown-menu-v2-ariakit/styles.ts +297 -0
- package/src/dropdown-menu-v2-ariakit/test/index.tsx +1139 -0
- package/src/dropdown-menu-v2-ariakit/types.ts +186 -0
- package/src/font-size-picker/utils.ts +2 -1
- package/src/heading/stories/index.story.tsx +2 -4
- package/src/input-control/styles/input-control-styles.tsx +2 -2
- package/src/mobile/global-styles-context/utils.native.js +2 -2
- package/src/modal/index.tsx +58 -22
- package/src/modal/test/index.tsx +29 -0
- package/src/notice/style.scss +0 -1
- package/src/palette-edit/index.tsx +4 -0
- package/src/popover/index.tsx +99 -57
- package/src/popover/style.scss +9 -0
- package/src/private-apis.ts +31 -1
- package/src/progress-bar/styles.ts +19 -4
- package/src/sandbox/index.native.js +1 -1
- package/src/sandbox/index.tsx +3 -1
- package/src/select-control/styles/select-control-styles.ts +2 -2
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.tsx +1 -1
- package/src/tabs/README.md +242 -0
- package/src/tabs/context.ts +13 -0
- package/src/tabs/index.tsx +167 -0
- package/src/tabs/stories/index.story.tsx +352 -0
- package/src/tabs/styles.ts +103 -0
- package/src/tabs/tab.tsx +39 -0
- package/src/tabs/tablist.tsx +40 -0
- package/src/tabs/tabpanel.tsx +42 -0
- package/src/tabs/test/index.tsx +1133 -0
- package/src/tabs/types.ts +142 -0
- package/src/text/README.md +2 -2
- package/src/text/{component.js → component.tsx} +10 -6
- package/src/text/{hook.js → hook.ts} +12 -15
- package/src/text/stories/index.story.tsx +80 -0
- package/src/text/types.ts +1 -6
- package/src/text/{utils.js → utils.ts} +40 -14
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +16 -0
- package/src/toggle-group-control/toggle-group-control-option-base/component.tsx +1 -0
- package/src/toolbar/stories/index.story.tsx +15 -0
- package/src/toolbar/test/index.tsx +8 -0
- package/src/toolbar/toolbar/README.md +9 -0
- package/src/toolbar/toolbar/index.tsx +21 -12
- package/src/toolbar/toolbar/style.scss +9 -0
- package/src/toolbar/toolbar/types.ts +10 -0
- package/src/tools-panel/tools-panel/README.md +3 -0
- package/src/tools-panel/tools-panel-item/hook.ts +4 -6
- package/src/tools-panel/types.ts +2 -0
- package/src/tooltip/index.tsx +2 -3
- package/src/unit-control/utils.ts +124 -0
- package/src/utils/unit-values.ts +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/src/text/stories/index.story.js +0 -53
- /package/src/text/{index.js → index.ts} +0 -0
- /package/src/text/{styles.js → styles.ts} +0 -0
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type * as Ariakit from '@ariakit/react';
|
|
6
|
+
import type { Placement } from '@floating-ui/react-dom';
|
|
7
|
+
export interface DropdownMenuContext {
|
|
8
|
+
/**
|
|
9
|
+
* The ariakit store shared across all DropdownMenu subcomponents.
|
|
10
|
+
*/
|
|
11
|
+
store: Ariakit.MenuStore;
|
|
12
|
+
/**
|
|
13
|
+
* The variant used by the underlying menu popover.
|
|
14
|
+
*/
|
|
15
|
+
variant?: 'toolbar';
|
|
16
|
+
}
|
|
17
|
+
export interface DropdownMenuProps {
|
|
18
|
+
/**
|
|
19
|
+
* The trigger button.
|
|
20
|
+
*/
|
|
21
|
+
trigger: React.ReactElement;
|
|
22
|
+
/**
|
|
23
|
+
* The contents of the dropdown.
|
|
24
|
+
*/
|
|
25
|
+
children?: React.ReactNode;
|
|
26
|
+
/**
|
|
27
|
+
* The open state of the dropdown menu when it is initially rendered. Use when
|
|
28
|
+
* not wanting to control its open state.
|
|
29
|
+
*
|
|
30
|
+
* @default false
|
|
31
|
+
*/
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* The controlled open state of the dropdown menu. Must be used in conjunction
|
|
35
|
+
* with `onOpenChange`.
|
|
36
|
+
*/
|
|
37
|
+
open?: boolean;
|
|
38
|
+
/**
|
|
39
|
+
* Event handler called when the open state of the dropdown menu changes.
|
|
40
|
+
*/
|
|
41
|
+
onOpenChange?: (open: boolean) => void;
|
|
42
|
+
/**
|
|
43
|
+
* The modality of the dropdown menu. When set to true, interaction with
|
|
44
|
+
* outside elements will be disabled and only menu content will be visible to
|
|
45
|
+
* screen readers.
|
|
46
|
+
*
|
|
47
|
+
* @default true
|
|
48
|
+
*/
|
|
49
|
+
modal?: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* The placement of the dropdown menu popover.
|
|
52
|
+
*
|
|
53
|
+
* @default 'bottom-start' for root-level menus, 'right-start' for nested menus
|
|
54
|
+
*/
|
|
55
|
+
placement?: Placement;
|
|
56
|
+
/**
|
|
57
|
+
* The distance between the popover and the anchor element.
|
|
58
|
+
*
|
|
59
|
+
* @default 8 for root-level menus, 16 for nested menus
|
|
60
|
+
*/
|
|
61
|
+
gutter?: number;
|
|
62
|
+
/**
|
|
63
|
+
* The skidding of the popover along the anchor element. Can be set to
|
|
64
|
+
* negative values to make the popover shift to the opposite side.
|
|
65
|
+
*
|
|
66
|
+
* @default 0 for root-level menus, -8 for nested menus
|
|
67
|
+
*/
|
|
68
|
+
shift?: number;
|
|
69
|
+
/**
|
|
70
|
+
* Determines whether the menu popover will be hidden when the user presses
|
|
71
|
+
* the Escape key.
|
|
72
|
+
*
|
|
73
|
+
* @default true
|
|
74
|
+
*/
|
|
75
|
+
hideOnEscape?: boolean | ((event: KeyboardEvent | React.KeyboardEvent<Element>) => boolean);
|
|
76
|
+
}
|
|
77
|
+
export interface DropdownMenuGroupProps {
|
|
78
|
+
/**
|
|
79
|
+
* The contents of the dropdown menu group.
|
|
80
|
+
*/
|
|
81
|
+
children: React.ReactNode;
|
|
82
|
+
}
|
|
83
|
+
export interface DropdownMenuGroupLabelProps {
|
|
84
|
+
/**
|
|
85
|
+
* The contents of the dropdown menu group label.
|
|
86
|
+
*/
|
|
87
|
+
children: React.ReactNode;
|
|
88
|
+
}
|
|
89
|
+
export interface DropdownMenuItemProps {
|
|
90
|
+
/**
|
|
91
|
+
* The contents of the menu item.
|
|
92
|
+
*/
|
|
93
|
+
children: React.ReactNode;
|
|
94
|
+
/**
|
|
95
|
+
* The contents of the menu item's prefix.
|
|
96
|
+
*/
|
|
97
|
+
prefix?: React.ReactNode;
|
|
98
|
+
/**
|
|
99
|
+
* The contents of the menu item's suffix.
|
|
100
|
+
*/
|
|
101
|
+
suffix?: React.ReactNode;
|
|
102
|
+
/**
|
|
103
|
+
* Whether to hide the parent menu when the item is clicked.
|
|
104
|
+
*
|
|
105
|
+
* @default true
|
|
106
|
+
*/
|
|
107
|
+
hideOnClick?: boolean;
|
|
108
|
+
/**
|
|
109
|
+
* Determines if the element is disabled.
|
|
110
|
+
*/
|
|
111
|
+
disabled?: boolean;
|
|
112
|
+
}
|
|
113
|
+
export interface DropdownMenuCheckboxItemProps extends Omit<DropdownMenuItemProps, 'prefix' | 'hideOnClick'> {
|
|
114
|
+
/**
|
|
115
|
+
* Whether to hide the dropdown menu when the item is clicked.
|
|
116
|
+
*
|
|
117
|
+
* @default false
|
|
118
|
+
*/
|
|
119
|
+
hideOnClick?: boolean;
|
|
120
|
+
/**
|
|
121
|
+
* The checkbox menu item's name.
|
|
122
|
+
*/
|
|
123
|
+
name: string;
|
|
124
|
+
/**
|
|
125
|
+
* The checkbox item's value, useful when using multiple checkbox menu items
|
|
126
|
+
* associated to the same `name`.
|
|
127
|
+
*/
|
|
128
|
+
value?: string;
|
|
129
|
+
/**
|
|
130
|
+
* The controlled checked state of the checkbox menu item.
|
|
131
|
+
*/
|
|
132
|
+
checked?: boolean;
|
|
133
|
+
/**
|
|
134
|
+
* The checked state of the checkbox menu item when it is initially rendered.
|
|
135
|
+
* Use when not wanting to control its checked state.
|
|
136
|
+
*/
|
|
137
|
+
defaultChecked?: boolean;
|
|
138
|
+
/**
|
|
139
|
+
* Event handler called when the checked state of the checkbox menu item changes.
|
|
140
|
+
*/
|
|
141
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
142
|
+
}
|
|
143
|
+
export interface DropdownMenuRadioItemProps extends Omit<DropdownMenuItemProps, 'prefix' | 'hideOnClick'> {
|
|
144
|
+
/**
|
|
145
|
+
* Whether to hide the dropdown menu when the item is clicked.
|
|
146
|
+
*
|
|
147
|
+
* @default false
|
|
148
|
+
*/
|
|
149
|
+
hideOnClick?: boolean;
|
|
150
|
+
/**
|
|
151
|
+
* The radio item's name.
|
|
152
|
+
*/
|
|
153
|
+
name: string;
|
|
154
|
+
/**
|
|
155
|
+
* The radio item's value.
|
|
156
|
+
*/
|
|
157
|
+
value: string | number;
|
|
158
|
+
/**
|
|
159
|
+
* The controlled checked state of the radio menu item.
|
|
160
|
+
*/
|
|
161
|
+
checked?: boolean;
|
|
162
|
+
/**
|
|
163
|
+
* The checked state of the radio menu item when it is initially rendered.
|
|
164
|
+
* Use when not wanting to control its checked state.
|
|
165
|
+
*/
|
|
166
|
+
defaultChecked?: boolean;
|
|
167
|
+
/**
|
|
168
|
+
* Event handler called when the checked radio menu item changes.
|
|
169
|
+
*/
|
|
170
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
171
|
+
}
|
|
172
|
+
export interface DropdownMenuSeparatorProps {
|
|
173
|
+
}
|
|
174
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/dropdown-menu-v2-ariakit/types.ts"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAC/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AAExD,MAAM,WAAW,mBAAmB;IACnC;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,OAAO,CAAC,EAAE,SAAS,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IACjC;;OAEG;IACH,OAAO,EAAE,KAAK,CAAC,YAAY,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;OAKG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;OAEG;IACH,YAAY,CAAC,EAAE,CAAE,IAAI,EAAE,OAAO,KAAM,IAAI,CAAC;IACzC;;;;;;OAMG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,YAAY,CAAC,EACV,OAAO,GACP,CAAE,CACF,KAAK,EAAE,aAAa,GAAG,KAAK,CAAC,aAAa,CAAE,OAAO,CAAE,KAChD,OAAO,CAAE,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACtC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,qBAAqB;IACrC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,6BAChB,SAAQ,IAAI,CAAE,qBAAqB,EAAE,QAAQ,GAAG,aAAa,CAAE;IAC/D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAE,gBAAgB,CAAE,KAAM,IAAI,CAAC;CACpE;AAED,MAAM,WAAW,0BAChB,SAAQ,IAAI,CAAE,qBAAqB,EAAE,QAAQ,GAAG,aAAa,CAAE;IAC/D;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAE,KAAK,EAAE,KAAK,CAAC,WAAW,CAAE,gBAAgB,CAAE,KAAM,IAAI,CAAC;CACpE;AAED,MAAM,WAAW,0BAA0B;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/font-size-picker/utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG7D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,WAAW,CAAE,mBAAmB,CAAE,OAAO,CAAE,CAAE,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/font-size-picker/utils.ts"],"names":[],"mappings":"AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAG7D;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,WAAW,CAAE,mBAAmB,CAAE,OAAO,CAAE,CAAE,WAKpD;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAE,SAAS,EAAE,QAAQ,EAAE,6BAavD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/heading/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/heading/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;GAEG;AACH,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,OAAO,CAoB/B,CAAC;AACF,eAAe,IAAI,CAAC;AAEpB,eAAO,MAAM,OAAO,EAAE,OAAO,CAAE,OAAO,OAAO,CAE5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/modal/index.tsx"],"names":[],"mappings":";AA0CA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAiU1C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,eAAO,MAAM,KAAK,uGAAiC,CAAC;AAEpD,eAAe,KAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette-edit/index.tsx"],"names":[],"mappings":";AAmDA,OAAO,KAAK,EAOX,gBAAgB,EAChB,cAAc,EACd,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,MAAM,UAqBlB;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/palette-edit/index.tsx"],"names":[],"mappings":";AAmDA,OAAO,KAAK,EAOX,gBAAgB,EAChB,cAAc,EACd,MAAM,SAAS,CAAC;AAejB;;;;;;;;;;GAUG;AACH,wBAAgB,kBAAkB,CACjC,QAAQ,EAAE,cAAc,EAAE,EAC1B,UAAU,EAAE,MAAM,UAqBlB;AAkQD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,WAAW,CAAE,EAC5B,SAAS,EACT,MAAoB,EACpB,QAAQ,EACR,YAAY,EACZ,wBAA4B,EAC5B,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,UAAe,EACf,YAAY,GACZ,EAAE,gBAAgB,eA8OlB;AAED,eAAe,WAAW,CAAC"}
|
|
@@ -30,6 +30,6 @@ export declare const SLOT_NAME = "Popover";
|
|
|
30
30
|
* ```
|
|
31
31
|
*
|
|
32
32
|
*/
|
|
33
|
-
export declare const Popover: import("react").
|
|
33
|
+
export declare const Popover: import("../context").WordPressComponent<import("react").ElementType<any>, Omit<WordPressComponentProps<PopoverProps, "div", false>, "style" | "transition" | "inherit" | "initial" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart" | "layout" | "drag" | "exit" | "custom" | "viewport" | "transformTemplate" | "transformValues" | "variants" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onUpdate" | "onAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "whileTap" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileFocus" | "whileInView" | "onViewportEnter" | "onViewportLeave" | "whileDrag" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "onDirectionLock" | "onDragTransitionEnd" | "layoutId" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "ignoreStrict"> & import("react").RefAttributes<any>, boolean>;
|
|
34
34
|
export default Popover;
|
|
35
35
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/popover/index.tsx"],"names":[],"mappings":";AA4DA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,KAAK,EACX,YAAY,EAGZ,MAAM,SAAS,CAAC;AAIjB;;;;GAIG;AACH,eAAO,MAAM,SAAS,YAAY,CAAC;AAobnC;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,OAAO,2mCAAkD,CAAC;AAqBvE,eAAe,OAAO,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
declare const _default: {
|
|
3
3
|
title: string;
|
|
4
|
-
component: import("react").
|
|
4
|
+
component: import("../../../context").WordPressComponent<import("react").ElementType<any>, Omit<import("../../../context").WordPressComponentProps<import("../../types").PopoverProps, "div", false>, "style" | "transition" | "inherit" | "initial" | "onDrag" | "onDragEnd" | "onDragStart" | "onAnimationStart" | "layout" | "drag" | "exit" | "custom" | "viewport" | "transformTemplate" | "transformValues" | "variants" | "onBeforeLayoutMeasure" | "onLayoutMeasure" | "onUpdate" | "onAnimationComplete" | "onPan" | "onPanStart" | "onPanSessionStart" | "onPanEnd" | "onTap" | "onTapStart" | "onTapCancel" | "whileTap" | "whileHover" | "onHoverStart" | "onHoverEnd" | "whileFocus" | "whileInView" | "onViewportEnter" | "onViewportLeave" | "whileDrag" | "dragDirectionLock" | "dragPropagation" | "dragConstraints" | "dragElastic" | "dragMomentum" | "dragTransition" | "dragControls" | "dragSnapToOrigin" | "dragListener" | "onMeasureDragConstraints" | "_dragX" | "_dragY" | "onDirectionLock" | "onDragTransitionEnd" | "layoutId" | "onLayoutAnimationStart" | "onLayoutAnimationComplete" | "layoutDependency" | "layoutScroll" | "layoutRoot" | "ignoreStrict"> & import("react").RefAttributes<any>, boolean>;
|
|
5
5
|
};
|
|
6
6
|
export default _default;
|
|
7
7
|
export declare const Default: () => JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"private-apis.d.ts","sourceRoot":"","sources":["../src/private-apis.ts"],"names":[],"mappings":"AA4CA,eAAO,MAAQ,IAAI,2CAAE,MAAM,sBAIzB,CAAC;AAEH,eAAO,MAAM,WAAW,IAAK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/progress-bar/styles.ts"],"names":[],"mappings":";AAqBA,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,KAAK;;;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/progress-bar/styles.ts"],"names":[],"mappings":";AAqBA,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,eAAO,MAAM,KAAK;;;yGAiBjB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;qBACJ,OAAO;;yGAgCxB,CAAC;AAEF,eAAO,MAAM,eAAe;;;2HAO3B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.tsx"],"names":[],"mappings":";AAWA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAsG5C;;;;;;;;;;GAUG;AACH,iBAAS,OAAO,CAAE,EACjB,IAAS,EACT,KAAU,EACV,IAAI,EACJ,MAAW,EACX,OAAY,EACZ,OAAO,EACP,QAAQ,GACR,EAAE,YAAY,eAgKd;AAED,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { TabsContextProps } from './types';
|
|
6
|
+
export declare const TabsContext: import("react").Context<TabsContextProps>;
|
|
7
|
+
export declare const useTabsContext: () => TabsContextProps;
|
|
8
|
+
//# sourceMappingURL=context.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/tabs/context.ts"],"names":[],"mappings":";AAKA;;GAEG;AACH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,eAAO,MAAM,WAAW,2CAAiD,CAAC;AAE1E,eAAO,MAAM,cAAc,wBAAkC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { TabsProps } from './types';
|
|
6
|
+
declare function Tabs({ selectOnMove, initialTabId, orientation, onSelect, children, selectedTabId, }: TabsProps): JSX.Element;
|
|
7
|
+
declare namespace Tabs {
|
|
8
|
+
var TabList: import("react").ForwardRefExoticComponent<import("./types").TabListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
9
|
+
var Tab: import("react").ForwardRefExoticComponent<import("./types").TabProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
var TabPanel: import("react").ForwardRefExoticComponent<import("./types").TabPanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
11
|
+
}
|
|
12
|
+
export default Tabs;
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tabs/index.tsx"],"names":[],"mappings":";AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAMzC,iBAAS,IAAI,CAAE,EACd,YAAmB,EACnB,YAAY,EACZ,WAA0B,EAC1B,QAAQ,EACR,QAAQ,EACR,aAAa,GACb,EAAE,SAAS,eAqIX;kBA5IQ,IAAI;;;;;AAiJb,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* External dependencies
|
|
3
|
+
*/
|
|
4
|
+
import type { Meta } from '@storybook/react';
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import Tabs from '..';
|
|
9
|
+
declare const meta: Meta<typeof Tabs>;
|
|
10
|
+
export default meta;
|
|
11
|
+
export declare const Default: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
12
|
+
export declare const DisabledTab: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
13
|
+
export declare const WithTabIconsAndTooltips: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
14
|
+
export declare const ManualActivation: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
15
|
+
export declare const UsingSlotFill: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
16
|
+
export declare const InsertCustomElements: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
17
|
+
export declare const ControlledMode: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
18
|
+
export declare const TabBecomesDisabled: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
19
|
+
export declare const TabGetsRemoved: import("@storybook/types").AnnotatedStoryFn<import("@storybook/react/dist/types-0a347bb9").R, import("../types").TabsProps>;
|
|
20
|
+
//# sourceMappingURL=index.story.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.story.d.ts","sourceRoot":"","sources":["../../../src/tabs/stories/index.story.tsx"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,KAAK,EAAE,IAAI,EAAW,MAAM,kBAAkB,CAAC;AAQtD;;GAEG;AACH,OAAO,IAAI,MAAM,IAAI,CAAC;AAKtB,QAAA,MAAM,IAAI,EAAE,IAAI,CAAE,OAAO,IAAI,CAQ5B,CAAC;AACF,eAAe,IAAI,CAAC;AAuBpB,eAAO,MAAM,OAAO,6HAAsB,CAAC;AAwB3C,eAAO,MAAM,WAAW,6HAAiC,CAAC;AAqC1D,eAAO,MAAM,uBAAuB,6HAEnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,6HAAsB,CAAC;AA0CpD,eAAO,MAAM,aAAa,6HAAmC,CAAC;AA6D9D,eAAO,MAAM,oBAAoB,6HAAiC,CAAC;AA+DnE,eAAO,MAAM,cAAc,6HAAoC,CAAC;AAqChE,eAAO,MAAM,kBAAkB,6HAAwC,CAAC;AAgCxE,eAAO,MAAM,cAAc,6HAAoC,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import * as Ariakit from '@ariakit/react';
|
|
3
|
+
export declare const TabListWrapper: 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<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
7
|
+
export declare const Tab: import("@emotion/styled").StyledComponent<Ariakit.TabOptions<"button"> & {
|
|
8
|
+
[index: `data-${string}`]: unknown;
|
|
9
|
+
wrapElement?: import("@ariakit/react-core/cjs/utils/types").WrapElement | undefined;
|
|
10
|
+
children?: import("@ariakit/react-core/cjs/utils/types").Children<any>;
|
|
11
|
+
render?: import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>> | import("@ariakit/react-core/cjs/utils/types").RenderProp<import("react").HTMLAttributes<any> & import("react").RefAttributes<any>> | undefined;
|
|
12
|
+
} & Omit<Pick<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof import("react").ButtonHTMLAttributes<HTMLButtonElement>> & {
|
|
13
|
+
ref?: ((instance: HTMLButtonElement | null) => void) | import("react").RefObject<HTMLButtonElement> | null | undefined;
|
|
14
|
+
}, "children" | keyof Ariakit.TabOptions<"button">> & {
|
|
15
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
16
|
+
}, {}, {}>;
|
|
17
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/tabs/styles.ts"],"names":[],"mappings":";AAKA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAS1C,eAAO,MAAM,cAAc;;;yGAO1B,CAAC;AAEF,eAAO,MAAM,GAAG;;;;;;;;;UA+Ef,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WordPress dependencies
|
|
3
|
+
*/
|
|
4
|
+
/// <reference types="react" />
|
|
5
|
+
/**
|
|
6
|
+
* Internal dependencies
|
|
7
|
+
*/
|
|
8
|
+
import type { TabProps } from './types';
|
|
9
|
+
export declare const Tab: import("react").ForwardRefExoticComponent<TabProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
10
|
+
//# sourceMappingURL=tab.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tab.d.ts","sourceRoot":"","sources":["../../src/tabs/tab.tsx"],"names":[],"mappings":"AAAA;;GAEG;;AAIH;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKxC,eAAO,MAAM,GAAG,wGAwBb,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { TabListProps } from './types';
|
|
6
|
+
export declare const TabList: import("react").ForwardRefExoticComponent<TabListProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//# sourceMappingURL=tablist.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tablist.d.ts","sourceRoot":"","sources":["../../src/tabs/tablist.tsx"],"names":[],"mappings":";AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAI5C,eAAO,MAAM,OAAO,yGAoBnB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* Internal dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type { TabPanelProps } from './types';
|
|
6
|
+
export declare const TabPanel: import("react").ForwardRefExoticComponent<TabPanelProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
7
|
+
//# sourceMappingURL=tabpanel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tabpanel.d.ts","sourceRoot":"","sources":["../../src/tabs/tabpanel.tsx"],"names":[],"mappings":";AAYA;;GAEG;AACH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAK7C,eAAO,MAAM,QAAQ,0GAqBpB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tabs/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import type * as Ariakit from '@ariakit/react';
|
|
6
|
+
/**
|
|
7
|
+
* Internal dependencies
|
|
8
|
+
*/
|
|
9
|
+
import type { IconType } from '../icon';
|
|
10
|
+
export type TabsContextProps = {
|
|
11
|
+
/**
|
|
12
|
+
* The tabStore object returned by Ariakit's `useTabStore` hook.
|
|
13
|
+
*/
|
|
14
|
+
store: Ariakit.TabStore;
|
|
15
|
+
/**
|
|
16
|
+
* The unique id string for this instance of the Tabs component.
|
|
17
|
+
*/
|
|
18
|
+
instanceId: string;
|
|
19
|
+
} | undefined;
|
|
20
|
+
export type TabsProps = {
|
|
21
|
+
/**
|
|
22
|
+
* The children elements, which should be at least a
|
|
23
|
+
* `Tabs.Tablist` component and a series of `Tabs.TabPanel`
|
|
24
|
+
* components.
|
|
25
|
+
*/
|
|
26
|
+
children: React.ReactNode;
|
|
27
|
+
/**
|
|
28
|
+
* When `true`, the tab will be selected when receiving focus (automatic tab
|
|
29
|
+
* activation). When `false`, the tab will be selected only when clicked
|
|
30
|
+
* (manual tab activation). See the official W3C docs for more info.
|
|
31
|
+
*
|
|
32
|
+
* @default true
|
|
33
|
+
*
|
|
34
|
+
* @see https://www.w3.org/WAI/ARIA/apg/patterns/tabpanel/
|
|
35
|
+
*/
|
|
36
|
+
selectOnMove?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* The id of the tab to be selected upon mounting of component.
|
|
39
|
+
* If this prop is not set, the first tab will be selected by default.
|
|
40
|
+
* The id provided will be internally prefixed with the
|
|
41
|
+
* `TabsContextProps.instanceId`.
|
|
42
|
+
*
|
|
43
|
+
* Note: this prop will be overridden by the `selectedTabId` prop if it is
|
|
44
|
+
* provided. (Controlled Mode)
|
|
45
|
+
*/
|
|
46
|
+
initialTabId?: string;
|
|
47
|
+
/**
|
|
48
|
+
* The function called when a tab has been selected.
|
|
49
|
+
* It is passed the id of the newly selected tab as an argument.
|
|
50
|
+
*/
|
|
51
|
+
onSelect?: (selectedId: string | null | undefined) => void;
|
|
52
|
+
/**
|
|
53
|
+
* The orientation of the tablist.
|
|
54
|
+
*
|
|
55
|
+
* @default `horizontal`
|
|
56
|
+
*/
|
|
57
|
+
orientation?: 'horizontal' | 'vertical';
|
|
58
|
+
/**
|
|
59
|
+
* The Id of the tab to display. This id is prepended with the `Tabs`
|
|
60
|
+
* instanceId internally.
|
|
61
|
+
*
|
|
62
|
+
* If left `undefined`, the component assumes it is being used in
|
|
63
|
+
* uncontrolled mode. Consequently, any value different than `undefined`
|
|
64
|
+
* will set the component in `controlled` mode.
|
|
65
|
+
* When in controlled mode, the `null` value will result in no tab being selected.
|
|
66
|
+
*/
|
|
67
|
+
selectedTabId?: string | null;
|
|
68
|
+
};
|
|
69
|
+
export type TabListProps = {
|
|
70
|
+
/**
|
|
71
|
+
* The children elements, which should be a series of `Tabs.TabPanel` components.
|
|
72
|
+
*/
|
|
73
|
+
children?: React.ReactNode;
|
|
74
|
+
/**
|
|
75
|
+
* The class name to apply to the tablist.
|
|
76
|
+
*/
|
|
77
|
+
className?: string;
|
|
78
|
+
/**
|
|
79
|
+
* Custom CSS styles for the rendered tablist.
|
|
80
|
+
*/
|
|
81
|
+
style?: React.CSSProperties;
|
|
82
|
+
};
|
|
83
|
+
export type TabProps = {
|
|
84
|
+
/**
|
|
85
|
+
* The id of the tab, which is prepended with the `Tabs` instanceId.
|
|
86
|
+
*/
|
|
87
|
+
id: string;
|
|
88
|
+
/**
|
|
89
|
+
* Custom CSS styles for the tab.
|
|
90
|
+
*/
|
|
91
|
+
style?: React.CSSProperties;
|
|
92
|
+
/**
|
|
93
|
+
* The children elements, generally the text to display on the tab.
|
|
94
|
+
*/
|
|
95
|
+
children?: React.ReactNode;
|
|
96
|
+
/**
|
|
97
|
+
* The class name to apply to the tab button.
|
|
98
|
+
*/
|
|
99
|
+
className?: string;
|
|
100
|
+
/**
|
|
101
|
+
* The icon used for the tab button.
|
|
102
|
+
*/
|
|
103
|
+
icon?: IconType;
|
|
104
|
+
/**
|
|
105
|
+
* Determines if the tab button should be disabled.
|
|
106
|
+
*
|
|
107
|
+
* @default false
|
|
108
|
+
*/
|
|
109
|
+
disabled?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* The type of component to render the tab button as. If this prop is not
|
|
112
|
+
* provided, the tab button will be rendered as a `button` element.
|
|
113
|
+
*/
|
|
114
|
+
render?: React.ReactElement;
|
|
115
|
+
};
|
|
116
|
+
export type TabPanelProps = {
|
|
117
|
+
/**
|
|
118
|
+
* The children elements, generally the content to display on the tabpanel.
|
|
119
|
+
*/
|
|
120
|
+
children?: React.ReactNode;
|
|
121
|
+
/**
|
|
122
|
+
* A unique identifier for the TabPanel, which is used to generate a unique `id` for the underlying element.
|
|
123
|
+
*/
|
|
124
|
+
id: string;
|
|
125
|
+
/**
|
|
126
|
+
* The class name to apply to the tabpanel.
|
|
127
|
+
*/
|
|
128
|
+
className?: string;
|
|
129
|
+
/**
|
|
130
|
+
* Custom CSS styles for the rendered `TabPanel` component.
|
|
131
|
+
*/
|
|
132
|
+
style?: React.CSSProperties;
|
|
133
|
+
};
|
|
134
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/tabs/types.ts"],"names":[],"mappings":";AAAA;;GAEG;AAEH,OAAO,KAAK,KAAK,OAAO,MAAM,gBAAgB,CAAC;AAE/C;;GAEG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,MAAM,MAAM,gBAAgB,GACzB;IACA;;OAEG;IACH,KAAK,EAAE,OAAO,CAAC,QAAQ,CAAC;IACxB;;OAEG;IACH,UAAU,EAAE,MAAM,CAAC;CAClB,GACD,SAAS,CAAC;AAEb,MAAM,MAAM,SAAS,GAAG;IACvB;;;;OAIG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB;;;;;;;;OAQG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAE,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,KAAM,IAAI,CAAC;IAE7D;;;;OAIG;IACH,WAAW,CAAC,EAAE,YAAY,GAAG,UAAU,CAAC;IACxC;;;;;;;;OAQG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,QAAQ,GAAG;IACtB;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC;CAC5B,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC3B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC5B,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { Props } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* `Text` is a core component that renders text in the library, using the
|
|
4
5
|
* library's typography system.
|
|
@@ -15,5 +16,6 @@ export default ConnectedText;
|
|
|
15
16
|
* }
|
|
16
17
|
* ```
|
|
17
18
|
*/
|
|
18
|
-
declare const
|
|
19
|
+
export declare const Text: import("../context").WordPressComponent<"span", Props & import("react").RefAttributes<any>, true>;
|
|
20
|
+
export default Text;
|
|
19
21
|
//# sourceMappingURL=component.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/text/component.
|
|
1
|
+
{"version":3,"file":"component.d.ts","sourceRoot":"","sources":["../../src/text/component.tsx"],"names":[],"mappings":";AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAerC;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,IAAI,mGAA4C,CAAC;AAC9D,eAAe,IAAI,CAAC"}
|