@wordpress/components 35.0.1 → 35.1.1-next.v.202606191442.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 +27 -0
- package/build/alignment-matrix-control/cell.cjs +1 -1
- package/build/alignment-matrix-control/cell.cjs.map +2 -2
- package/build/alignment-matrix-control/index.cjs +1 -1
- package/build/alignment-matrix-control/index.cjs.map +2 -2
- package/build/angle-picker-control/angle-circle.cjs +1 -1
- package/build/angle-picker-control/angle-circle.cjs.map +2 -2
- package/build/angle-picker-control/index.cjs +2 -2
- package/build/autocomplete/get-autocomplete-match.cjs.map +1 -1
- package/build/autocomplete/index.cjs.map +1 -1
- package/build/base-control/styles/base-control-styles.cjs +6 -6
- package/build/base-control/styles/base-control-styles.cjs.map +2 -2
- package/build/border-control/styles.cjs +17 -14
- package/build/border-control/styles.cjs.map +2 -2
- package/build/button/index.cjs +3 -7
- package/build/button/index.cjs.map +2 -2
- package/build/card/card-divider/hook.cjs.map +2 -2
- package/build/color-palette/index.cjs.map +1 -1
- package/build/color-picker/component.cjs.map +1 -1
- package/build/date-time/utils.cjs.map +1 -1
- package/build/draggable/index.cjs.map +1 -1
- package/build/external-link/index.cjs +1 -1
- package/build/external-link/index.cjs.map +1 -1
- package/build/menu/popover.cjs.map +1 -1
- package/build/menu/styles.cjs +17 -17
- package/build/menu/styles.cjs.map +2 -2
- package/build/modal/index.cjs.map +1 -1
- package/build/modal/use-modal-exit-animation.cjs +37 -52
- package/build/modal/use-modal-exit-animation.cjs.map +2 -2
- package/build/palette-edit/index.cjs +1 -1
- package/build/progress-bar/index.cjs +1 -1
- package/build/progress-bar/index.cjs.map +2 -2
- package/build/query-controls/index.cjs +2 -2
- package/build/query-controls/index.cjs.map +2 -2
- package/build/range-control/index.cjs.map +1 -1
- package/build/sandbox/index.cjs +7 -1
- package/build/sandbox/index.cjs.map +2 -2
- package/build/snackbar/index.cjs +1 -1
- package/build/spinner/styles.cjs +4 -4
- package/build/spinner/styles.cjs.map +2 -2
- package/build/tabs/index.cjs +0 -18
- package/build/tabs/index.cjs.map +2 -2
- package/build/tabs/tablist.cjs +5 -15
- package/build/tabs/tablist.cjs.map +2 -2
- package/build/tools-panel/styles.cjs +13 -13
- package/build/tools-panel/styles.cjs.map +2 -2
- package/build/tools-panel/tools-panel/hook.cjs.map +1 -1
- package/build/tree-select/index.cjs +1 -1
- package/build/tree-select/index.cjs.map +1 -1
- package/build/truncate/utils.cjs +1 -1
- package/build/truncate/utils.cjs.map +1 -1
- package/build/utils/colors-values.cjs +12 -12
- package/build/utils/colors-values.cjs.map +2 -2
- package/build/utils/config-values.cjs +2 -2
- package/build/utils/config-values.cjs.map +2 -2
- package/build/utils/dropdown-motion.cjs.map +2 -2
- package/build/utils/strings.cjs.map +1 -1
- package/build-module/alignment-matrix-control/cell.mjs +1 -1
- package/build-module/alignment-matrix-control/cell.mjs.map +2 -2
- package/build-module/alignment-matrix-control/index.mjs +1 -1
- package/build-module/alignment-matrix-control/index.mjs.map +2 -2
- package/build-module/angle-picker-control/angle-circle.mjs +1 -1
- package/build-module/angle-picker-control/angle-circle.mjs.map +2 -2
- package/build-module/angle-picker-control/index.mjs +2 -2
- package/build-module/autocomplete/get-autocomplete-match.mjs.map +1 -1
- package/build-module/autocomplete/index.mjs.map +1 -1
- package/build-module/base-control/styles/base-control-styles.mjs +6 -6
- package/build-module/base-control/styles/base-control-styles.mjs.map +2 -2
- package/build-module/border-control/styles.mjs +17 -14
- package/build-module/border-control/styles.mjs.map +2 -2
- package/build-module/button/index.mjs +2 -5
- package/build-module/button/index.mjs.map +2 -2
- package/build-module/card/card-divider/hook.mjs.map +2 -2
- package/build-module/color-palette/index.mjs.map +1 -1
- package/build-module/color-picker/component.mjs.map +1 -1
- package/build-module/date-time/utils.mjs.map +1 -1
- package/build-module/draggable/index.mjs.map +1 -1
- package/build-module/external-link/index.mjs +1 -1
- package/build-module/external-link/index.mjs.map +1 -1
- package/build-module/menu/popover.mjs.map +1 -1
- package/build-module/menu/styles.mjs +17 -17
- package/build-module/menu/styles.mjs.map +2 -2
- package/build-module/modal/index.mjs.map +1 -1
- package/build-module/modal/use-modal-exit-animation.mjs +37 -52
- package/build-module/modal/use-modal-exit-animation.mjs.map +2 -2
- package/build-module/palette-edit/index.mjs +1 -1
- package/build-module/progress-bar/index.mjs +1 -1
- package/build-module/progress-bar/index.mjs.map +2 -2
- package/build-module/query-controls/index.mjs +2 -2
- package/build-module/query-controls/index.mjs.map +2 -2
- package/build-module/range-control/index.mjs.map +1 -1
- package/build-module/sandbox/index.mjs +3 -1
- package/build-module/sandbox/index.mjs.map +2 -2
- package/build-module/snackbar/index.mjs +1 -1
- package/build-module/spinner/styles.mjs +4 -4
- package/build-module/spinner/styles.mjs.map +2 -2
- package/build-module/tabs/index.mjs +1 -19
- package/build-module/tabs/index.mjs.map +2 -2
- package/build-module/tabs/tablist.mjs +5 -15
- package/build-module/tabs/tablist.mjs.map +2 -2
- package/build-module/tools-panel/styles.mjs +13 -13
- package/build-module/tools-panel/styles.mjs.map +2 -2
- package/build-module/tools-panel/tools-panel/hook.mjs.map +1 -1
- package/build-module/tree-select/index.mjs +1 -1
- package/build-module/tree-select/index.mjs.map +1 -1
- package/build-module/truncate/utils.mjs +1 -1
- package/build-module/truncate/utils.mjs.map +1 -1
- package/build-module/utils/colors-values.mjs +12 -12
- package/build-module/utils/colors-values.mjs.map +2 -2
- package/build-module/utils/config-values.mjs +2 -2
- package/build-module/utils/config-values.mjs.map +2 -2
- package/build-module/utils/dropdown-motion.mjs.map +2 -2
- package/build-module/utils/strings.mjs.map +1 -1
- package/build-style/style-rtl.css +82 -82
- package/build-style/style.css +82 -82
- package/build-types/base-control/styles/base-control-styles.d.ts.map +1 -1
- package/build-types/border-control/styles.d.ts.map +1 -1
- package/build-types/button/index.d.ts +0 -2
- package/build-types/button/index.d.ts.map +1 -1
- package/build-types/card/card-divider/hook.d.ts +1 -274
- package/build-types/card/card-divider/hook.d.ts.map +1 -1
- package/build-types/composite/stories/index.story.d.ts.map +1 -1
- package/build-types/confirm-dialog/stories/index.story.d.ts.map +1 -1
- package/build-types/dropdown/stories/index.story.d.ts.map +1 -1
- package/build-types/menu/styles.d.ts.map +1 -1
- package/build-types/menu/types.d.ts +2 -2
- package/build-types/sandbox/index.d.ts +15 -0
- package/build-types/sandbox/index.d.ts.map +1 -1
- package/build-types/spinner/styles.d.ts.map +1 -1
- package/build-types/tabs/index.d.ts.map +1 -1
- package/build-types/tabs/tablist.d.ts.map +1 -1
- package/build-types/tools-panel/styles.d.ts.map +1 -1
- package/build-types/utils/colors-values.d.ts.map +1 -1
- package/build-types/utils/dropdown-motion.d.ts.map +1 -1
- package/build-types/validated-form-controls/components/combobox-control.d.ts +1 -1
- package/package.json +34 -28
- package/src/angle-picker-control/angle-circle.tsx +3 -3
- package/src/base-control/README.md +2 -2
- package/src/base-control/styles/base-control-styles.ts +1 -0
- package/src/border-control/styles.ts +1 -0
- package/src/button/index.tsx +2 -4
- package/src/button/style.scss +3 -3
- package/src/card/card-divider/hook.ts +5 -1
- package/src/card/test/__snapshots__/index.tsx.snap +3 -3
- package/src/composite/stories/index.story.tsx +5 -0
- package/src/confirm-dialog/stories/index.story.tsx +1 -0
- package/src/dropdown/stories/index.story.tsx +5 -0
- package/src/dropdown-menu/style.scss +1 -1
- package/src/external-link/style.scss +4 -4
- package/src/form-toggle/style.scss +1 -1
- package/src/heading/test/__snapshots__/index.tsx.snap +4 -4
- package/src/menu/README.md +2 -2
- package/src/menu/styles.ts +2 -0
- package/src/menu/test/index.tsx +120 -87
- package/src/menu/types.ts +2 -2
- package/src/modal/style.scss +1 -1
- package/src/modal/use-modal-exit-animation.ts +2 -2
- package/src/notice/style.scss +11 -13
- package/src/panel/README.md +2 -0
- package/src/panel/stories/index.story.tsx +2 -2
- package/src/panel/style.scss +1 -1
- package/src/radio-control/style.scss +1 -1
- package/src/sandbox/index.tsx +18 -1
- package/src/sandbox/test/index.tsx +44 -1
- package/src/spinner/styles.ts +1 -0
- package/src/tab-panel/style.scss +6 -6
- package/src/tabs/index.tsx +1 -26
- package/src/tabs/tablist.tsx +5 -21
- package/src/tabs/test/index.tsx +16 -27
- package/src/text/test/__snapshots__/index.tsx.snap +3 -3
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +34 -26
- package/src/toolbar/toolbar-group/style.scss +2 -2
- package/src/tools-panel/styles.ts +1 -1
- package/src/tooltip/stories/index.story.tsx +2 -2
- package/src/utils/colors-values.js +36 -16
- package/src/utils/config-values.js +2 -2
- package/src/utils/dropdown-motion.ts +6 -4
- package/src/utils/theme-variables.scss +18 -13
- package/build-types/card/context.d.ts +0 -3
- package/build-types/card/context.d.ts.map +0 -1
- package/build-types/date-time/date/index.d.ts +0 -23
- package/build-types/date-time/date/index.d.ts.map +0 -1
- package/build-types/date-time/date/styles.d.ts +0 -45
- package/build-types/date-time/date/styles.d.ts.map +0 -1
- package/build-types/date-time/date/test/index.d.ts +0 -2
- package/build-types/date-time/date/test/index.d.ts.map +0 -1
- package/build-types/date-time/date/test/use-lilius.d.ts +0 -2
- package/build-types/date-time/date/test/use-lilius.d.ts.map +0 -1
- package/build-types/date-time/date/use-lilius/index.d.ts +0 -169
- package/build-types/date-time/date/use-lilius/index.d.ts.map +0 -1
- package/build-types/date-time/time/index.d.ts +0 -27
- package/build-types/date-time/time/index.d.ts.map +0 -1
- package/build-types/date-time/time/styles.d.ts +0 -93
- package/build-types/date-time/time/styles.d.ts.map +0 -1
- package/build-types/date-time/time/test/index.d.ts +0 -2
- package/build-types/date-time/time/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/index.d.ts +0 -4
- package/build-types/date-time/time/time-input/index.d.ts.map +0 -1
- package/build-types/date-time/time/time-input/test/index.d.ts +0 -2
- package/build-types/date-time/time/time-input/test/index.d.ts.map +0 -1
- package/build-types/date-time/time/timezone.d.ts +0 -7
- package/build-types/date-time/time/timezone.d.ts.map +0 -1
- package/build-types/mobile/image/constants.d.ts +0 -5
- package/build-types/mobile/image/constants.d.ts.map +0 -1
- package/build-types/navigation/back-button/index.d.ts +0 -7
- package/build-types/navigation/back-button/index.d.ts.map +0 -1
- package/build-types/navigation/constants.d.ts +0 -3
- package/build-types/navigation/constants.d.ts.map +0 -1
- package/build-types/navigation/context.d.ts +0 -4
- package/build-types/navigation/context.d.ts.map +0 -1
- package/build-types/navigation/group/context.d.ts +0 -7
- package/build-types/navigation/group/context.d.ts.map +0 -1
- package/build-types/navigation/group/index.d.ts +0 -7
- package/build-types/navigation/group/index.d.ts.map +0 -1
- package/build-types/navigation/index.d.ts +0 -46
- package/build-types/navigation/index.d.ts.map +0 -1
- package/build-types/navigation/item/base-content.d.ts +0 -3
- package/build-types/navigation/item/base-content.d.ts.map +0 -1
- package/build-types/navigation/item/base.d.ts +0 -3
- package/build-types/navigation/item/base.d.ts.map +0 -1
- package/build-types/navigation/item/index.d.ts +0 -7
- package/build-types/navigation/item/index.d.ts.map +0 -1
- package/build-types/navigation/item/use-navigation-tree-item.d.ts +0 -3
- package/build-types/navigation/item/use-navigation-tree-item.d.ts.map +0 -1
- package/build-types/navigation/menu/context.d.ts +0 -7
- package/build-types/navigation/menu/context.d.ts.map +0 -1
- package/build-types/navigation/menu/index.d.ts +0 -7
- package/build-types/navigation/menu/index.d.ts.map +0 -1
- package/build-types/navigation/menu/menu-title-search.d.ts +0 -3
- package/build-types/navigation/menu/menu-title-search.d.ts.map +0 -1
- package/build-types/navigation/menu/menu-title.d.ts +0 -3
- package/build-types/navigation/menu/menu-title.d.ts.map +0 -1
- package/build-types/navigation/menu/search-no-results-found.d.ts +0 -3
- package/build-types/navigation/menu/search-no-results-found.d.ts.map +0 -1
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts +0 -3
- package/build-types/navigation/menu/use-navigation-tree-menu.d.ts.map +0 -1
- package/build-types/navigation/stories/index.story.d.ts +0 -23
- package/build-types/navigation/stories/index.story.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/controlled-state.d.ts +0 -7
- package/build-types/navigation/stories/utils/controlled-state.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/default.d.ts +0 -10
- package/build-types/navigation/stories/utils/default.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/group.d.ts +0 -10
- package/build-types/navigation/stories/utils/group.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts +0 -10
- package/build-types/navigation/stories/utils/hide-if-empty.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/more-examples.d.ts +0 -10
- package/build-types/navigation/stories/utils/more-examples.d.ts.map +0 -1
- package/build-types/navigation/stories/utils/search.d.ts +0 -10
- package/build-types/navigation/stories/utils/search.d.ts.map +0 -1
- package/build-types/navigation/styles/navigation-styles.d.ts +0 -55
- package/build-types/navigation/styles/navigation-styles.d.ts.map +0 -1
- package/build-types/navigation/test/index.d.ts +0 -2
- package/build-types/navigation/test/index.d.ts.map +0 -1
- package/build-types/navigation/types.d.ts +0 -266
- package/build-types/navigation/types.d.ts.map +0 -1
- package/build-types/navigation/use-create-navigation-tree.d.ts +0 -15
- package/build-types/navigation/use-create-navigation-tree.d.ts.map +0 -1
- package/build-types/navigation/use-navigation-tree-nodes.d.ts +0 -10
- package/build-types/navigation/use-navigation-tree-nodes.d.ts.map +0 -1
- package/build-types/navigation/utils.d.ts +0 -3
- package/build-types/navigation/utils.d.ts.map +0 -1
- package/build-types/visually-hidden/test/index.d.ts +0 -2
- package/build-types/visually-hidden/test/index.d.ts.map +0 -1
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
padding-right: $grid-unit-15 * 0.5;
|
|
31
31
|
|
|
32
32
|
svg {
|
|
33
|
-
min-width:
|
|
33
|
+
min-width: var(--wpds-dimension-size-sm); // This is the optimal icon size, and we size the whole button after this.
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
&::before {
|
|
@@ -75,7 +75,7 @@ div.components-toolbar {
|
|
|
75
75
|
display: inline-block;
|
|
76
76
|
content: "";
|
|
77
77
|
box-sizing: content-box;
|
|
78
|
-
background-color:
|
|
78
|
+
background-color: var(--wpds-color-stroke-surface-neutral);
|
|
79
79
|
position: absolute;
|
|
80
80
|
top: 8px;
|
|
81
81
|
left: -3px;
|
|
@@ -30,10 +30,10 @@ const toolsPanelGrid = {
|
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
|
|
33
|
+
// TODO: should use the `stroke-surface-neutral` WPDS token when refactored to SCSS modules
|
|
33
34
|
export const ToolsPanel = ( columns: number ) => css`
|
|
34
35
|
${ toolsPanelGrid.columns( columns ) }
|
|
35
36
|
${ toolsPanelGrid.spacing }
|
|
36
|
-
|
|
37
37
|
border-top: ${ CONFIG.borderWidth } solid ${ COLORS.gray[ 300 ] };
|
|
38
38
|
margin-top: -1px;
|
|
39
39
|
padding: ${ space( 4 ) };
|
|
@@ -15,7 +15,6 @@ import Tooltip from '..';
|
|
|
15
15
|
import Button from '../../button';
|
|
16
16
|
|
|
17
17
|
const meta: Meta< typeof Tooltip > = {
|
|
18
|
-
tags: [ 'manifest' ],
|
|
19
18
|
title: 'Components/Overlays/Tooltip',
|
|
20
19
|
id: 'components-tooltip',
|
|
21
20
|
component: Tooltip,
|
|
@@ -38,8 +37,9 @@ const meta: Meta< typeof Tooltip > = {
|
|
|
38
37
|
controls: { expanded: true },
|
|
39
38
|
docs: { canvas: { sourceState: 'shown' } },
|
|
40
39
|
componentStatus: {
|
|
41
|
-
status: 'recommended',
|
|
40
|
+
status: 'not-recommended',
|
|
42
41
|
whereUsed: 'global',
|
|
42
|
+
notes: 'Use `Tooltip` from `@wordpress/ui` instead.',
|
|
43
43
|
},
|
|
44
44
|
},
|
|
45
45
|
};
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/* eslint-disable @wordpress/no-ds-tokens -- This file is the JS counterpart of
|
|
2
|
+
theme-variables.scss and the package's single mapping to the design system.
|
|
3
|
+
The rule guards against bare `--wpds-*` references, which the build can't
|
|
4
|
+
inject fallbacks into for Emotion/JS files; here every reference carries an
|
|
5
|
+
explicit fallback, so that concern doesn't apply.
|
|
6
|
+
|
|
7
|
+
IMPORTANT: because this file's source contains `--wpds-` text, the
|
|
8
|
+
design-system fallback build plugin claims it (it matches any file whose
|
|
9
|
+
source includes `--wpds-`, comments included) and, in doing so, displaces
|
|
10
|
+
the Emotion transform for this file. That is harmless ONLY because this file
|
|
11
|
+
holds plain value constants and no Emotion `css`/styled component selectors.
|
|
12
|
+
Do not add any here: a co-located component selector would silently fail to
|
|
13
|
+
compile and break the build, with no lint signal (see #79245). Keep this
|
|
14
|
+
file selector-free — define styles elsewhere and consume these constants. */
|
|
15
|
+
|
|
4
16
|
const white = '#fff';
|
|
5
17
|
|
|
6
18
|
// Matches the grays in @wordpress/base-styles
|
|
@@ -27,33 +39,41 @@ const ALERT = {
|
|
|
27
39
|
green: '#4ab866',
|
|
28
40
|
};
|
|
29
41
|
|
|
30
|
-
// Should match packages/components/src/utils/theme-variables.scss
|
|
42
|
+
// Should match packages/components/src/utils/theme-variables.scss.
|
|
43
|
+
//
|
|
44
|
+
// Mirrors the Sass structure: each non-accent value resolves through a design
|
|
45
|
+
// system (`--wpds-*`) token, then a hardcoded fallback. The hardcoded values
|
|
46
|
+
// match what the design-system fallback plugin injects into the Sass version,
|
|
47
|
+
// so JS behaves consistently with the Sass variables. Keep both the token
|
|
48
|
+
// references and the fallbacks in sync with the Sass version.
|
|
31
49
|
const THEME = {
|
|
32
50
|
accent: `var(--wp-components-color-accent, var(--wp-admin-theme-color, #3858e9))`,
|
|
33
51
|
accentDarker10: `var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6))`,
|
|
34
52
|
accentDarker20: `var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6))`,
|
|
35
53
|
/** Used when placing text on the accent color. */
|
|
36
|
-
accentInverted: `var(--wp-components-color-accent-inverted,
|
|
54
|
+
accentInverted: `var(--wp-components-color-accent-inverted, var(--wpds-color-foreground-interactive-brand-strong, #fff))`,
|
|
37
55
|
|
|
38
|
-
background: `var(--wp-components-color-background,
|
|
56
|
+
background: `var(--wp-components-color-background, var(--wpds-color-background-surface-neutral-strong, #fff))`,
|
|
39
57
|
|
|
40
|
-
foreground: `var(--wp-components-color-foreground,
|
|
58
|
+
foreground: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
41
59
|
/** Used when placing text on the foreground color. */
|
|
42
|
-
foregroundInverted: `var(--wp-components-color-foreground-inverted,
|
|
60
|
+
foregroundInverted: `var(--wp-components-color-foreground-inverted, var(--wpds-color-background-surface-neutral, #fcfcfc))`,
|
|
43
61
|
|
|
44
62
|
gray: {
|
|
45
63
|
/** @deprecated Use `COLORS.theme.foreground` instead. */
|
|
46
|
-
900: `var(--wp-components-color-foreground,
|
|
47
|
-
800: `var(--wp-components-color-gray-800,
|
|
48
|
-
700: `var(--wp-components-color-gray-700,
|
|
49
|
-
600: `var(--wp-components-color-gray-600,
|
|
50
|
-
400: `var(--wp-components-color-gray-400,
|
|
51
|
-
300: `var(--wp-components-color-gray-300,
|
|
52
|
-
200: `var(--wp-components-color-gray-200,
|
|
53
|
-
100: `var(--wp-components-color-gray-100,
|
|
64
|
+
900: `var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
65
|
+
800: `var(--wp-components-color-gray-800, var(--wpds-color-foreground-content-neutral, #1e1e1e))`,
|
|
66
|
+
700: `var(--wp-components-color-gray-700, var(--wpds-color-foreground-content-neutral-weak, #707070))`,
|
|
67
|
+
600: `var(--wp-components-color-gray-600, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
68
|
+
400: `var(--wp-components-color-gray-400, var(--wpds-color-stroke-interactive-neutral, #8d8d8d))`,
|
|
69
|
+
300: `var(--wp-components-color-gray-300, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
70
|
+
200: `var(--wp-components-color-gray-200, var(--wpds-color-stroke-surface-neutral, #dbdbdb))`,
|
|
71
|
+
100: `var(--wp-components-color-gray-100, var(--wpds-color-background-surface-neutral, #fcfcfc))`,
|
|
54
72
|
},
|
|
55
73
|
};
|
|
56
74
|
|
|
75
|
+
/* eslint-enable @wordpress/no-ds-tokens */
|
|
76
|
+
|
|
57
77
|
const UI = {
|
|
58
78
|
background: THEME.background,
|
|
59
79
|
backgroundDisabled: THEME.gray[ 100 ],
|
|
@@ -66,8 +66,8 @@ export default Object.assign( {}, CONTROL_PROPS, {
|
|
|
66
66
|
surfaceBackgroundTertiaryColor: COLORS.white,
|
|
67
67
|
surfaceColor: COLORS.white,
|
|
68
68
|
// Modal exit animation: `use-modal-exit-animation` parses this for the
|
|
69
|
-
// `animationend` timeout race; keep the numeric duration equal to
|
|
70
|
-
//
|
|
69
|
+
// `animationend` timeout race; keep the numeric duration equal to the WPDS
|
|
70
|
+
// `motion-duration-md` token on `.components-modal__frame` in modal/style.scss.
|
|
71
71
|
transitionDuration: '200ms',
|
|
72
72
|
transitionDurationFast: '160ms',
|
|
73
73
|
transitionDurationFaster: '120ms',
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Motion configuration for dropdown-like popovers.
|
|
2
2
|
// Keep constants in sync with: packages/ui/src/utils/css/dropdown-motion.module.css
|
|
3
|
-
// Values should stay in sync with
|
|
3
|
+
// Values should stay in sync with the WPDS motion design tokens.
|
|
4
4
|
|
|
5
5
|
export const DROPDOWN_MOTION = Object.freeze( {
|
|
6
6
|
SLIDE_DISTANCE: 4,
|
|
@@ -25,9 +25,11 @@ const convertEasingToString = ( easing: {
|
|
|
25
25
|
return easing.function;
|
|
26
26
|
};
|
|
27
27
|
|
|
28
|
-
// Note:
|
|
29
|
-
// fallback injection is
|
|
30
|
-
//
|
|
28
|
+
// Note: WPDS design tokens can't be referenced here directly. The build-time
|
|
29
|
+
// fallback injection is incompatible with Emotion, and even mentioning a token's
|
|
30
|
+
// full CSS custom property name in this file makes the esbuild fallback plugin
|
|
31
|
+
// claim it and break the Emotion transform. This file is consumed by Menu's
|
|
32
|
+
// Emotion styles.
|
|
31
33
|
export const DROPDOWN_MOTION_CSS = Object.freeze( {
|
|
32
34
|
SLIDE_DISTANCE: `${ DROPDOWN_MOTION.SLIDE_DISTANCE }px`,
|
|
33
35
|
SLIDE_DURATION: `${ DROPDOWN_MOTION.SLIDE_DURATION }ms`,
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
@use "@wordpress/base-styles/colors" as *;
|
|
2
|
-
|
|
3
1
|
// Accent color
|
|
4
2
|
//
|
|
5
3
|
// If the `--wp-components-color-accent` variable is not defined, fallback to
|
|
@@ -9,22 +7,29 @@ $components-color-accent: var(--wp-components-color-accent, var(--wp-admin-theme
|
|
|
9
7
|
$components-color-accent-darker-10: var(--wp-components-color-accent-darker-10, var(--wp-admin-theme-color-darker-10, #2145e6));
|
|
10
8
|
$components-color-accent-darker-20: var(--wp-components-color-accent-darker-20, var(--wp-admin-theme-color-darker-20, #183ad6));
|
|
11
9
|
|
|
10
|
+
// The non-accent values fall back to the design system (`--wpds-*`) tokens.
|
|
11
|
+
// Those are defined at `:root` by the prebuilt `@wordpress/theme` stylesheet
|
|
12
|
+
// when it is loaded (always the case inside WordPress). The references here
|
|
13
|
+
// intentionally omit a hardcoded fallback — the build plugin injects the
|
|
14
|
+
// design system default value, so component styles stay correct even when
|
|
15
|
+
// neither the prebuilt stylesheet nor a runtime `<ThemeProvider>` is present.
|
|
16
|
+
|
|
12
17
|
// Used when placing text on the accent color.
|
|
13
|
-
$components-color-accent-inverted: var(--wp-components-color-accent-inverted,
|
|
18
|
+
$components-color-accent-inverted: var(--wp-components-color-accent-inverted, var(--wpds-color-foreground-interactive-brand-strong));
|
|
14
19
|
|
|
15
|
-
$components-color-background: var(--wp-components-color-background,
|
|
16
|
-
$components-color-foreground: var(--wp-components-color-foreground,
|
|
20
|
+
$components-color-background: var(--wp-components-color-background, var(--wpds-color-background-surface-neutral-strong));
|
|
21
|
+
$components-color-foreground: var(--wp-components-color-foreground, var(--wpds-color-foreground-content-neutral));
|
|
17
22
|
|
|
18
23
|
// Used when placing text on the foreground color.
|
|
19
|
-
$components-color-foreground-inverted: var(--wp-components-color-foreground-inverted,
|
|
24
|
+
$components-color-foreground-inverted: var(--wp-components-color-foreground-inverted, var(--wpds-color-background-surface-neutral));
|
|
20
25
|
|
|
21
|
-
$components-color-gray-100: var(--wp-components-color-gray-100,
|
|
22
|
-
$components-color-gray-200: var(--wp-components-color-gray-200,
|
|
23
|
-
$components-color-gray-300: var(--wp-components-color-gray-300,
|
|
24
|
-
$components-color-gray-400: var(--wp-components-color-gray-400,
|
|
25
|
-
$components-color-gray-600: var(--wp-components-color-gray-600,
|
|
26
|
-
$components-color-gray-700: var(--wp-components-color-gray-700,
|
|
27
|
-
$components-color-gray-800: var(--wp-components-color-gray-800,
|
|
26
|
+
$components-color-gray-100: var(--wp-components-color-gray-100, var(--wpds-color-background-surface-neutral));
|
|
27
|
+
$components-color-gray-200: var(--wp-components-color-gray-200, var(--wpds-color-stroke-surface-neutral));
|
|
28
|
+
$components-color-gray-300: var(--wp-components-color-gray-300, var(--wpds-color-stroke-surface-neutral));
|
|
29
|
+
$components-color-gray-400: var(--wp-components-color-gray-400, var(--wpds-color-stroke-interactive-neutral));
|
|
30
|
+
$components-color-gray-600: var(--wp-components-color-gray-600, var(--wpds-color-stroke-interactive-neutral));
|
|
31
|
+
$components-color-gray-700: var(--wp-components-color-gray-700, var(--wpds-color-foreground-content-neutral-weak));
|
|
32
|
+
$components-color-gray-800: var(--wp-components-color-gray-800, var(--wpds-color-foreground-content-neutral));
|
|
28
33
|
|
|
29
34
|
$components-color-dark-gray-placeholder: color-mix(in srgb, $components-color-foreground, transparent 38%);
|
|
30
35
|
$components-color-light-gray-placeholder: color-mix(in srgb, $components-color-background, transparent 35%);
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../src/card/context.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,6BAAsB,CAAC;AAG/C,eAAO,MAAM,cAAc,UAAkC,CAAC"}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import type { DatePickerProps } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* DatePicker is a React component that renders a calendar for date selection.
|
|
4
|
-
*
|
|
5
|
-
* ```jsx
|
|
6
|
-
* import { DatePicker } from '@wordpress/components';
|
|
7
|
-
* import { useState } from '@wordpress/element';
|
|
8
|
-
*
|
|
9
|
-
* const MyDatePicker = () => {
|
|
10
|
-
* const [ date, setDate ] = useState( new Date() );
|
|
11
|
-
*
|
|
12
|
-
* return (
|
|
13
|
-
* <DatePicker
|
|
14
|
-
* currentDate={ date }
|
|
15
|
-
* onChange={ ( newDate ) => setDate( newDate ) }
|
|
16
|
-
* />
|
|
17
|
-
* );
|
|
18
|
-
* };
|
|
19
|
-
* ```
|
|
20
|
-
*/
|
|
21
|
-
export declare function DatePicker({ currentDate, onChange, events, isInvalidDate, onMonthPreviewed, startOfWeek: weekStartsOn, }: DatePickerProps): import("react").JSX.Element;
|
|
22
|
-
export default DatePicker;
|
|
23
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-time/date/index.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAkBhD;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,UAAU,CAAE,EAC3B,WAAW,EACX,QAAQ,EACR,MAAW,EACX,aAAa,EACb,gBAAgB,EAChB,WAAW,EAAE,YAAgB,GAC7B,EAAE,eAAe,+BAyNjB;AAgGD,eAAe,UAAU,CAAC"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
export declare const Wrapper: import("@emotion/styled").StyledComponent<{
|
|
2
|
-
theme?: import("@emotion/react").Theme;
|
|
3
|
-
as?: React.ElementType;
|
|
4
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
5
|
-
export declare const Navigator: import("@emotion/styled").StyledComponent<Omit<import("../../flex/types").FlexProps, "gap" | "align"> & {
|
|
6
|
-
alignment?: import("../../h-stack/types").HStackAlignment | import("react").CSSProperties["alignItems"];
|
|
7
|
-
spacing?: import("react").CSSProperties["width"];
|
|
8
|
-
} & import("react").RefAttributes<any> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref">, "direction" | "wrap" | "expanded" | "justify" | "children" | "as" | "spacing" | keyof import("react").RefAttributes<any> | "isReversed" | "alignment"> & {
|
|
9
|
-
as?: keyof import("react").JSX.IntrinsicElements | undefined;
|
|
10
|
-
} & {
|
|
11
|
-
theme?: import("@emotion/react").Theme;
|
|
12
|
-
}, {}, {}>;
|
|
13
|
-
export declare const ViewPreviousMonthButton: import("@emotion/styled").StyledComponent<((import("../../button/types").ButtonProps & import("../../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>) & {
|
|
14
|
-
theme?: import("@emotion/react").Theme;
|
|
15
|
-
}, {}, {}>;
|
|
16
|
-
export declare const ViewNextMonthButton: import("@emotion/styled").StyledComponent<((import("../../button/types").ButtonProps & import("../../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>) & {
|
|
17
|
-
theme?: import("@emotion/react").Theme;
|
|
18
|
-
}, {}, {}>;
|
|
19
|
-
export declare const NavigatorHeading: import("@emotion/styled").StyledComponent<Omit<import("../../text/types").Props, "color" | "weight" | "isBlock"> & {
|
|
20
|
-
level?: import("../../heading/types").HeadingSize;
|
|
21
|
-
isBlock?: import("../../text/types").Props["isBlock"];
|
|
22
|
-
color?: import("../../text/types").Props["color"];
|
|
23
|
-
weight?: import("../../text/types").Props["weight"];
|
|
24
|
-
} & import("react").RefAttributes<any> & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLHeadingElement>, HTMLHeadingElement>, "ref">, "color" | "display" | "letterSpacing" | "lineHeight" | "size" | "weight" | "ellipsis" | "children" | "as" | "align" | "variant" | keyof import("react").RefAttributes<any> | "isBlock" | "ellipsizeMode" | "limit" | "numberOfLines" | "adjustLineHeightForInnerControls" | "isDestructive" | "highlightEscape" | "highlightCaseSensitive" | "highlightWords" | "highlightSanitize" | "optimizeReadabilityFor" | "truncate" | "upperCase" | "level"> & {
|
|
25
|
-
as?: keyof import("react").JSX.IntrinsicElements | undefined;
|
|
26
|
-
} & {
|
|
27
|
-
theme?: import("@emotion/react").Theme;
|
|
28
|
-
}, {}, {}>;
|
|
29
|
-
export declare const Calendar: import("@emotion/styled").StyledComponent<{
|
|
30
|
-
theme?: import("@emotion/react").Theme;
|
|
31
|
-
as?: React.ElementType;
|
|
32
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
33
|
-
export declare const DayOfWeek: import("@emotion/styled").StyledComponent<{
|
|
34
|
-
theme?: import("@emotion/react").Theme;
|
|
35
|
-
as?: React.ElementType;
|
|
36
|
-
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
37
|
-
export declare const DayButton: import("@emotion/styled").StyledComponent<(((import("../../button/types").ButtonProps & import("../../button/types").DeprecatedButtonProps) & import("react").RefAttributes<any>) & {
|
|
38
|
-
theme?: import("@emotion/react").Theme;
|
|
39
|
-
}) & {
|
|
40
|
-
column: number;
|
|
41
|
-
isSelected: boolean;
|
|
42
|
-
isToday: boolean;
|
|
43
|
-
hasEvents: boolean;
|
|
44
|
-
}, {}, {}>;
|
|
45
|
-
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../src/date-time/date/styles.ts"],"names":[],"mappings":"AAcA,eAAO,MAAM,OAAO;;;yGAEnB,CAAC;AAEF,eAAO,MAAM,SAAS;;;;;;;UAMrB,CAAC;AAEF,eAAO,MAAM,uBAAuB;;UAEnC,CAAC;AAEF,eAAO,MAAM,mBAAmB;;UAE/B,CAAC;AAEF,eAAO,MAAM,gBAAgB;;;;;;;;;UAQ5B,CAAC;AAEF,eAAO,MAAM,QAAQ;;;yGAMpB,CAAC;AAEF,eAAO,MAAM,SAAS;;;yGAIrB,CAAC;AAEF,eAAO,MAAM,SAAS;;;YAIb,MAAM;gBACF,OAAO;aACV,OAAO;eACL,OAAO;UAqElB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/date-time/date/test/index.tsx"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-lilius.d.ts","sourceRoot":"","sources":["../../../../src/date-time/date/test/use-lilius.ts"],"names":[],"mappings":""}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This source is a local copy of the use-lilius library, since the original
|
|
3
|
-
* library is not actively maintained.
|
|
4
|
-
* @see https://github.com/WordPress/gutenberg/discussions/64968
|
|
5
|
-
*
|
|
6
|
-
* use-lilius@2.0.5
|
|
7
|
-
* https://github.com/Avarios/use-lilius
|
|
8
|
-
*
|
|
9
|
-
* The MIT License (MIT)
|
|
10
|
-
*
|
|
11
|
-
* Copyright (c) 2021-Present Danny Tatom
|
|
12
|
-
*
|
|
13
|
-
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
14
|
-
* of this software and associated documentation files (the "Software"), to deal
|
|
15
|
-
* in the Software without restriction, including without limitation the rights
|
|
16
|
-
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
17
|
-
* copies of the Software, and to permit persons to whom the Software is
|
|
18
|
-
* furnished to do so, subject to the following conditions:
|
|
19
|
-
*
|
|
20
|
-
* The above copyright notice and this permission notice shall be included in all
|
|
21
|
-
* copies or substantial portions of the Software.
|
|
22
|
-
*
|
|
23
|
-
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
24
|
-
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
25
|
-
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
26
|
-
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
27
|
-
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
28
|
-
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
29
|
-
* SOFTWARE.
|
|
30
|
-
*/
|
|
31
|
-
export declare enum Month {
|
|
32
|
-
JANUARY = 0,
|
|
33
|
-
FEBRUARY = 1,
|
|
34
|
-
MARCH = 2,
|
|
35
|
-
APRIL = 3,
|
|
36
|
-
MAY = 4,
|
|
37
|
-
JUNE = 5,
|
|
38
|
-
JULY = 6,
|
|
39
|
-
AUGUST = 7,
|
|
40
|
-
SEPTEMBER = 8,
|
|
41
|
-
OCTOBER = 9,
|
|
42
|
-
NOVEMBER = 10,
|
|
43
|
-
DECEMBER = 11
|
|
44
|
-
}
|
|
45
|
-
export declare enum Day {
|
|
46
|
-
SUNDAY = 0,
|
|
47
|
-
MONDAY = 1,
|
|
48
|
-
TUESDAY = 2,
|
|
49
|
-
WEDNESDAY = 3,
|
|
50
|
-
THURSDAY = 4,
|
|
51
|
-
FRIDAY = 5,
|
|
52
|
-
SATURDAY = 6
|
|
53
|
-
}
|
|
54
|
-
export interface Options {
|
|
55
|
-
/**
|
|
56
|
-
* What day a week starts on within the calendar matrix.
|
|
57
|
-
*
|
|
58
|
-
* @default Day.SUNDAY
|
|
59
|
-
*/
|
|
60
|
-
weekStartsOn?: Day;
|
|
61
|
-
/**
|
|
62
|
-
* The initial viewing date.
|
|
63
|
-
*
|
|
64
|
-
* @default new Date()
|
|
65
|
-
*/
|
|
66
|
-
viewing?: Date;
|
|
67
|
-
/**
|
|
68
|
-
* The initial date(s) selection.
|
|
69
|
-
*
|
|
70
|
-
* @default []
|
|
71
|
-
*/
|
|
72
|
-
selected?: Date[];
|
|
73
|
-
/**
|
|
74
|
-
* The number of months in the calendar.
|
|
75
|
-
*
|
|
76
|
-
* @default 1
|
|
77
|
-
*/
|
|
78
|
-
numberOfMonths?: number;
|
|
79
|
-
}
|
|
80
|
-
export interface Returns {
|
|
81
|
-
/**
|
|
82
|
-
* Returns a copy of the given date with the time set to 00:00:00:00.
|
|
83
|
-
*/
|
|
84
|
-
clearTime: (date: Date) => Date;
|
|
85
|
-
/**
|
|
86
|
-
* Returns whether or not a date is between 2 other dates (inclusive).
|
|
87
|
-
*/
|
|
88
|
-
inRange: (date: Date, min: Date, max: Date) => boolean;
|
|
89
|
-
/**
|
|
90
|
-
* The date represented in the calendar matrix. Note that
|
|
91
|
-
* the month and year are the only parts used.
|
|
92
|
-
*/
|
|
93
|
-
viewing: Date;
|
|
94
|
-
/**
|
|
95
|
-
* Set the date represented in the calendar matrix. Note that
|
|
96
|
-
* the month and year are the only parts used.
|
|
97
|
-
*/
|
|
98
|
-
setViewing: React.Dispatch<React.SetStateAction<Date>>;
|
|
99
|
-
/**
|
|
100
|
-
* Set the viewing date to today.
|
|
101
|
-
*/
|
|
102
|
-
viewToday: () => void;
|
|
103
|
-
/**
|
|
104
|
-
* Set the viewing date to the given month.
|
|
105
|
-
*/
|
|
106
|
-
viewMonth: (month: Month) => void;
|
|
107
|
-
/**
|
|
108
|
-
* Set the viewing date to the month before the current.
|
|
109
|
-
*/
|
|
110
|
-
viewPreviousMonth: () => void;
|
|
111
|
-
/**
|
|
112
|
-
* Set the viewing date to the month after the current.
|
|
113
|
-
*/
|
|
114
|
-
viewNextMonth: () => void;
|
|
115
|
-
/**
|
|
116
|
-
* Set the viewing date to the given year.
|
|
117
|
-
*/
|
|
118
|
-
viewYear: (year: number) => void;
|
|
119
|
-
/**
|
|
120
|
-
* Set the viewing date to the year before the current.
|
|
121
|
-
*/
|
|
122
|
-
viewPreviousYear: () => void;
|
|
123
|
-
/**
|
|
124
|
-
* Set the viewing date to the year after the current.
|
|
125
|
-
*/
|
|
126
|
-
viewNextYear: () => void;
|
|
127
|
-
/**
|
|
128
|
-
* The dates currently selected.
|
|
129
|
-
*/
|
|
130
|
-
selected: Date[];
|
|
131
|
-
/**
|
|
132
|
-
* Override the currently selected dates.
|
|
133
|
-
*/
|
|
134
|
-
setSelected: React.Dispatch<React.SetStateAction<Date[]>>;
|
|
135
|
-
/**
|
|
136
|
-
* Reset the selected dates to [].
|
|
137
|
-
*/
|
|
138
|
-
clearSelected: () => void;
|
|
139
|
-
/**
|
|
140
|
-
* Determine whether or not a date has been selected.
|
|
141
|
-
*/
|
|
142
|
-
isSelected: (date: Date) => boolean;
|
|
143
|
-
/**
|
|
144
|
-
* Select one or more dates.
|
|
145
|
-
*/
|
|
146
|
-
select: (date: Date | Date[], replaceExisting?: boolean) => void;
|
|
147
|
-
/**
|
|
148
|
-
* Deselect one or more dates.
|
|
149
|
-
*/
|
|
150
|
-
deselect: (date: Date | Date[]) => void;
|
|
151
|
-
/**
|
|
152
|
-
* Toggle the selection of a date.
|
|
153
|
-
*/
|
|
154
|
-
toggle: (date: Date, replaceExisting?: boolean) => void;
|
|
155
|
-
/**
|
|
156
|
-
* Select a range of dates (inclusive).
|
|
157
|
-
*/
|
|
158
|
-
selectRange: (start: Date, end: Date, replaceExisting?: boolean) => void;
|
|
159
|
-
/**
|
|
160
|
-
* Deselect a range of dates (inclusive).
|
|
161
|
-
*/
|
|
162
|
-
deselectRange: (start: Date, end: Date) => void;
|
|
163
|
-
/**
|
|
164
|
-
* A matrix of days based on the current viewing date.
|
|
165
|
-
*/
|
|
166
|
-
calendar: Date[][][];
|
|
167
|
-
}
|
|
168
|
-
export declare const useLilius: ({ weekStartsOn, viewing: initialViewing, selected: initialSelected, numberOfMonths, }?: Options) => Returns;
|
|
169
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/date-time/date/use-lilius/index.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type { TimePickerProps } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* TimePicker is a React component that renders a clock for time selection.
|
|
4
|
-
*
|
|
5
|
-
* ```jsx
|
|
6
|
-
* import { TimePicker } from '@wordpress/components';
|
|
7
|
-
* import { useState } from '@wordpress/element';
|
|
8
|
-
*
|
|
9
|
-
* const MyTimePicker = () => {
|
|
10
|
-
* const [ time, setTime ] = useState( new Date() );
|
|
11
|
-
*
|
|
12
|
-
* return (
|
|
13
|
-
* <TimePicker
|
|
14
|
-
* currentTime={ date }
|
|
15
|
-
* onChange={ ( newTime ) => setTime( newTime ) }
|
|
16
|
-
* is12Hour
|
|
17
|
-
* />
|
|
18
|
-
* );
|
|
19
|
-
* };
|
|
20
|
-
* ```
|
|
21
|
-
*/
|
|
22
|
-
export declare function TimePicker({ is12Hour, currentTime, onChange, dateOrder: dateOrderProp, hideLabelFromVision, }: TimePickerProps): import("react").JSX.Element;
|
|
23
|
-
export declare namespace TimePicker {
|
|
24
|
-
var TimeInput: typeof import("./time-input").TimeInput;
|
|
25
|
-
}
|
|
26
|
-
export default TimePicker;
|
|
27
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/date-time/time/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAkB,eAAe,EAAE,MAAM,UAAU,CAAC;AAuBhE;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,UAAU,CAAE,EAC3B,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,SAAS,EAAE,aAAa,EACxB,mBAA2B,GAC3B,EAAE,eAAe,+BAkNjB;yBAxNe,UAAU;;;AAmP1B,eAAe,UAAU,CAAC"}
|