@wordpress/components 21.1.2-next.4d3b314fd5.0 → 21.2.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 +14 -1
- package/build/border-box-control/utils.js +42 -2
- package/build/border-box-control/utils.js.map +1 -1
- package/build/combobox-control/index.js +0 -1
- package/build/combobox-control/index.js.map +1 -1
- package/build/custom-select-control/index.js +4 -2
- package/build/custom-select-control/index.js.map +1 -1
- package/build/font-size-picker/index.js +46 -55
- package/build/font-size-picker/index.js.map +1 -1
- package/build/font-size-picker/styles.js +73 -0
- package/build/font-size-picker/styles.js.map +1 -0
- package/build/font-size-picker/types.js +6 -0
- package/build/font-size-picker/types.js.map +1 -0
- package/build/font-size-picker/utils.js +17 -15
- package/build/font-size-picker/utils.js.map +1 -1
- package/build/form-token-field/token-input.js +20 -1
- package/build/form-token-field/token-input.js.map +1 -1
- package/build/index.js +6 -0
- package/build/index.js.map +1 -1
- package/build/navigator/navigator-screen/component.js +8 -1
- package/build/navigator/navigator-screen/component.js.map +1 -1
- package/build/resizable-box/resize-tooltip/utils.js +12 -14
- package/build/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build/sandbox/index.js +13 -8
- package/build/sandbox/index.js.map +1 -1
- package/build/sandbox/index.native.js +3 -1
- package/build/sandbox/index.native.js.map +1 -1
- package/build/search-control/index.native.js +6 -2
- package/build/search-control/index.native.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js +8 -2
- package/build/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js +31 -41
- package/build/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js +39 -0
- package/build/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -0
- package/build/slot-fill/bubbles-virtually/use-slot.js +13 -4
- package/build/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build/slot-fill/index.js +8 -0
- package/build/slot-fill/index.js.map +1 -1
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js +8 -8
- package/build/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-module/border-box-control/utils.js +36 -1
- package/build-module/border-box-control/utils.js.map +1 -1
- package/build-module/combobox-control/index.js +0 -1
- package/build-module/combobox-control/index.js.map +1 -1
- package/build-module/custom-select-control/index.js +2 -1
- package/build-module/custom-select-control/index.js.map +1 -1
- package/build-module/font-size-picker/index.js +45 -53
- package/build-module/font-size-picker/index.js.map +1 -1
- package/build-module/font-size-picker/styles.js +62 -0
- package/build-module/font-size-picker/styles.js.map +1 -0
- package/build-module/font-size-picker/types.js +2 -0
- package/build-module/font-size-picker/types.js.map +1 -0
- package/build-module/font-size-picker/utils.js +21 -15
- package/build-module/font-size-picker/utils.js.map +1 -1
- package/build-module/form-token-field/token-input.js +21 -2
- package/build-module/form-token-field/token-input.js.map +1 -1
- package/build-module/index.js +1 -1
- package/build-module/index.js.map +1 -1
- package/build-module/navigator/navigator-screen/component.js +8 -1
- package/build-module/navigator/navigator-screen/component.js.map +1 -1
- package/build-module/resizable-box/resize-tooltip/utils.js +13 -15
- package/build-module/resizable-box/resize-tooltip/utils.js.map +1 -1
- package/build-module/sandbox/index.js +13 -8
- package/build-module/sandbox/index.js.map +1 -1
- package/build-module/sandbox/index.native.js +3 -1
- package/build-module/sandbox/index.native.js.map +1 -1
- package/build-module/search-control/index.native.js +6 -2
- package/build-module/search-control/index.native.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js +7 -2
- package/build-module/slot-fill/bubbles-virtually/slot-fill-context.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js +30 -42
- package/build-module/slot-fill/bubbles-virtually/slot-fill-provider.js.map +1 -1
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js +27 -0
- package/build-module/slot-fill/bubbles-virtually/use-slot-fills.js.map +1 -0
- package/build-module/slot-fill/bubbles-virtually/use-slot.js +13 -5
- package/build-module/slot-fill/bubbles-virtually/use-slot.js.map +1 -1
- package/build-module/slot-fill/index.js +1 -0
- package/build-module/slot-fill/index.js.map +1 -1
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js +7 -7
- package/build-module/toggle-group-control/toggle-group-control-option-base/styles.js.map +1 -1
- package/build-style/style-rtl.css +1 -98
- package/build-style/style.css +1 -98
- package/build-types/border-box-control/utils.d.ts +1 -3
- package/build-types/border-box-control/utils.d.ts.map +1 -1
- package/build-types/custom-select-control/index.d.ts +13 -0
- package/build-types/custom-select-control/index.d.ts.map +1 -0
- package/build-types/custom-select-control/styles.d.ts +9 -0
- package/build-types/custom-select-control/styles.d.ts.map +1 -0
- package/build-types/font-size-picker/index.d.ts +5 -0
- package/build-types/font-size-picker/index.d.ts.map +1 -0
- package/build-types/font-size-picker/stories/e2e/index.d.ts +16 -0
- package/build-types/font-size-picker/stories/e2e/index.d.ts.map +1 -0
- package/build-types/font-size-picker/stories/index.d.ts +31 -0
- package/build-types/font-size-picker/stories/index.d.ts.map +1 -0
- package/build-types/font-size-picker/styles.d.ts +27 -0
- package/build-types/font-size-picker/styles.d.ts.map +1 -0
- package/build-types/font-size-picker/test/index.d.ts +2 -0
- package/build-types/font-size-picker/test/index.d.ts.map +1 -0
- package/build-types/font-size-picker/test/utils.d.ts +2 -0
- package/build-types/font-size-picker/test/utils.d.ts.map +1 -0
- package/build-types/font-size-picker/types.d.ts +93 -0
- package/build-types/font-size-picker/types.d.ts.map +1 -0
- package/build-types/font-size-picker/utils.d.ts +41 -0
- package/build-types/font-size-picker/utils.d.ts.map +1 -0
- package/build-types/form-token-field/token-input.d.ts.map +1 -1
- package/build-types/navigator/navigator-screen/component.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts +2 -2
- package/build-types/slot-fill/bubbles-virtually/slot-fill-context.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/slot-fill-provider.d.ts.map +1 -1
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts +2 -0
- package/build-types/slot-fill/bubbles-virtually/use-slot-fills.d.ts.map +1 -0
- package/build-types/slot-fill/bubbles-virtually/use-slot.d.ts.map +1 -1
- package/build-types/slot-fill/index.d.ts +1 -0
- package/build-types/slot-fill/index.d.ts.map +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts +1 -1
- package/build-types/toggle-group-control/toggle-group-control-option-base/styles.d.ts.map +1 -1
- package/package.json +19 -18
- package/src/alignment-matrix-control/test/index.js +17 -62
- package/src/border-box-control/test/utils.js +48 -0
- package/src/border-box-control/utils.ts +44 -1
- package/src/combobox-control/index.js +0 -5
- package/src/custom-select-control/index.js +2 -1
- package/src/font-size-picker/{index.js → index.tsx} +113 -79
- package/src/font-size-picker/stories/e2e/{index.js → index.tsx} +13 -4
- package/src/font-size-picker/stories/{index.js → index.tsx} +42 -36
- package/src/font-size-picker/styles.ts +44 -0
- package/src/font-size-picker/test/{index.js → index.tsx} +1 -1
- package/src/font-size-picker/test/{utils.js → utils.ts} +6 -2
- package/src/font-size-picker/types.ts +98 -0
- package/src/font-size-picker/{utils.js → utils.ts} +51 -27
- package/src/form-token-field/test/index.tsx +22 -1
- package/src/form-token-field/token-input.tsx +25 -3
- package/src/index.js +1 -0
- package/src/navigator/navigator-screen/component.tsx +8 -1
- package/src/navigator/test/index.js +119 -54
- package/src/placeholder/style.scss +2 -2
- package/src/resizable-box/resize-tooltip/utils.ts +13 -13
- package/src/sandbox/index.js +13 -7
- package/src/sandbox/index.native.js +3 -0
- package/src/search-control/index.native.js +6 -0
- package/src/slot-fill/bubbles-virtually/slot-fill-context.js +6 -2
- package/src/slot-fill/bubbles-virtually/slot-fill-provider.js +51 -58
- package/src/slot-fill/bubbles-virtually/use-slot-fills.js +24 -0
- package/src/slot-fill/bubbles-virtually/use-slot.js +11 -6
- package/src/slot-fill/index.js +1 -0
- package/src/style.scss +0 -1
- package/src/toggle-group-control/test/__snapshots__/index.tsx.snap +1 -0
- package/src/toggle-group-control/toggle-group-control-option-base/styles.ts +9 -7
- package/tsconfig.json +0 -2
- package/tsconfig.tsbuildinfo +1 -1
- package/src/font-size-picker/style.scss +0 -78
package/src/sandbox/index.js
CHANGED
|
@@ -205,32 +205,38 @@ export default function Sandbox( {
|
|
|
205
205
|
setHeight( data.height );
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
-
const
|
|
208
|
+
const iframe = ref.current;
|
|
209
|
+
const { ownerDocument } = iframe;
|
|
209
210
|
const { defaultView } = ownerDocument;
|
|
210
211
|
|
|
211
212
|
// This used to be registered using <iframe onLoad={} />, but it made the iframe blank
|
|
212
213
|
// after reordering the containing block. See these two issues for more details:
|
|
213
214
|
// https://github.com/WordPress/gutenberg/issues/6146
|
|
214
215
|
// https://github.com/facebook/react/issues/18752
|
|
215
|
-
|
|
216
|
+
iframe.addEventListener( 'load', tryNoForceSandbox, false );
|
|
216
217
|
defaultView.addEventListener( 'message', checkMessageForResize );
|
|
217
218
|
|
|
218
219
|
return () => {
|
|
219
|
-
|
|
220
|
-
'load',
|
|
221
|
-
tryNoForceSandbox,
|
|
222
|
-
false
|
|
223
|
-
);
|
|
220
|
+
iframe?.removeEventListener( 'load', tryNoForceSandbox, false );
|
|
224
221
|
defaultView.addEventListener( 'message', checkMessageForResize );
|
|
225
222
|
};
|
|
223
|
+
// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.
|
|
224
|
+
// See https://github.com/WordPress/gutenberg/pull/44378
|
|
225
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
226
226
|
}, [] );
|
|
227
227
|
|
|
228
228
|
useEffect( () => {
|
|
229
229
|
trySandbox();
|
|
230
|
+
// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.
|
|
231
|
+
// See https://github.com/WordPress/gutenberg/pull/44378
|
|
232
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
230
233
|
}, [ title, styles, scripts ] );
|
|
231
234
|
|
|
232
235
|
useEffect( () => {
|
|
233
236
|
trySandbox( true );
|
|
237
|
+
// Ignore reason: passing `exhaustive-deps` will likely involve a more detailed refactor.
|
|
238
|
+
// See https://github.com/WordPress/gutenberg/pull/44378
|
|
239
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
234
240
|
}, [ html, type ] );
|
|
235
241
|
|
|
236
242
|
return (
|
|
@@ -282,6 +282,9 @@ function Sandbox( {
|
|
|
282
282
|
|
|
283
283
|
useEffect( () => {
|
|
284
284
|
updateContentHtml();
|
|
285
|
+
// Disable reason: deferring this refactor to the native team.
|
|
286
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
287
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
285
288
|
}, [ html, title, type, styles, scripts ] );
|
|
286
289
|
|
|
287
290
|
useEffect( () => {
|
|
@@ -115,6 +115,9 @@ function SearchControl( {
|
|
|
115
115
|
mergeFutureStyles( activeDarkStyles, [ isActive, isDark ] );
|
|
116
116
|
|
|
117
117
|
setCurrentStyles( futureStyles );
|
|
118
|
+
// Disable reason: deferring this refactor to the native team.
|
|
119
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
120
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
118
121
|
}, [ isActive, isDark ] );
|
|
119
122
|
|
|
120
123
|
useEffect( () => {
|
|
@@ -130,6 +133,9 @@ function SearchControl( {
|
|
|
130
133
|
clearTimeout( onCancelTimer.current );
|
|
131
134
|
keyboardHideSubscription.remove();
|
|
132
135
|
};
|
|
136
|
+
// Disable reason: deferring this refactor to the native team.
|
|
137
|
+
// see https://github.com/WordPress/gutenberg/pull/41166
|
|
138
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
133
139
|
}, [] );
|
|
134
140
|
|
|
135
141
|
const {
|
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { proxyMap } from 'valtio/utils';
|
|
2
6
|
/**
|
|
3
7
|
* WordPress dependencies
|
|
4
8
|
*/
|
|
@@ -6,8 +10,8 @@ import { createContext } from '@wordpress/element';
|
|
|
6
10
|
import warning from '@wordpress/warning';
|
|
7
11
|
|
|
8
12
|
const SlotFillContext = createContext( {
|
|
9
|
-
slots:
|
|
10
|
-
fills:
|
|
13
|
+
slots: proxyMap(),
|
|
14
|
+
fills: proxyMap(),
|
|
11
15
|
registerSlot: () => {
|
|
12
16
|
warning(
|
|
13
17
|
'Components must be wrapped within `SlotFillProvider`. ' +
|
|
@@ -1,8 +1,14 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { ref as valRef } from 'valtio';
|
|
6
|
+
import { proxyMap } from 'valtio/utils';
|
|
7
|
+
|
|
2
8
|
/**
|
|
3
9
|
* WordPress dependencies
|
|
4
10
|
*/
|
|
5
|
-
import { useMemo, useCallback,
|
|
11
|
+
import { useMemo, useCallback, useRef } from '@wordpress/element';
|
|
6
12
|
import isShallowEqual from '@wordpress/is-shallow-equal';
|
|
7
13
|
|
|
8
14
|
/**
|
|
@@ -11,79 +17,68 @@ import isShallowEqual from '@wordpress/is-shallow-equal';
|
|
|
11
17
|
import SlotFillContext from './slot-fill-context';
|
|
12
18
|
|
|
13
19
|
function useSlotRegistry() {
|
|
14
|
-
const
|
|
15
|
-
const
|
|
20
|
+
const slots = useRef( proxyMap() );
|
|
21
|
+
const fills = useRef( proxyMap() );
|
|
16
22
|
|
|
17
23
|
const registerSlot = useCallback( ( name, ref, fillProps ) => {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
};
|
|
28
|
-
} );
|
|
24
|
+
const slot = slots.current.get( name ) || {};
|
|
25
|
+
slots.current.set(
|
|
26
|
+
name,
|
|
27
|
+
valRef( {
|
|
28
|
+
...slot,
|
|
29
|
+
ref: ref || slot.ref,
|
|
30
|
+
fillProps: fillProps || slot.fillProps || {},
|
|
31
|
+
} )
|
|
32
|
+
);
|
|
29
33
|
}, [] );
|
|
30
34
|
|
|
31
35
|
const unregisterSlot = useCallback( ( name, ref ) => {
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return nextSlots;
|
|
38
|
-
}
|
|
39
|
-
return prevSlots;
|
|
40
|
-
} );
|
|
36
|
+
// Make sure we're not unregistering a slot registered by another element
|
|
37
|
+
// See https://github.com/WordPress/gutenberg/pull/19242#issuecomment-590295412
|
|
38
|
+
if ( slots.current.get( name )?.ref === ref ) {
|
|
39
|
+
slots.current.delete( name );
|
|
40
|
+
}
|
|
41
41
|
}, [] );
|
|
42
42
|
|
|
43
|
-
const updateSlot = useCallback(
|
|
44
|
-
( name
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
}
|
|
43
|
+
const updateSlot = useCallback( ( name, fillProps ) => {
|
|
44
|
+
const slot = slots.current.get( name );
|
|
45
|
+
if ( ! slot ) {
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
if ( ! isShallowEqual( slot.fillProps, fillProps ) ) {
|
|
50
|
+
slot.fillProps = fillProps;
|
|
51
|
+
const slotFills = fills.current.get( name );
|
|
52
|
+
if ( slotFills ) {
|
|
53
|
+
// Force update fills.
|
|
54
|
+
slotFills.map( ( fill ) => fill.current.rerender() );
|
|
56
55
|
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
);
|
|
56
|
+
}
|
|
57
|
+
}, [] );
|
|
60
58
|
|
|
61
59
|
const registerFill = useCallback( ( name, ref ) => {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
fills.current.set(
|
|
61
|
+
name,
|
|
62
|
+
valRef( [ ...( fills.current.get( name ) || [] ), ref ] )
|
|
63
|
+
);
|
|
66
64
|
}, [] );
|
|
67
65
|
|
|
68
66
|
const unregisterFill = useCallback( ( name, ref ) => {
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
}
|
|
78
|
-
return prevFills;
|
|
79
|
-
} );
|
|
67
|
+
if ( fills.current.get( name ) ) {
|
|
68
|
+
fills.current.set(
|
|
69
|
+
name,
|
|
70
|
+
fills.current
|
|
71
|
+
.get( name )
|
|
72
|
+
.filter( ( fillRef ) => fillRef !== ref )
|
|
73
|
+
);
|
|
74
|
+
}
|
|
80
75
|
}, [] );
|
|
81
76
|
|
|
82
77
|
// Memoizing the return value so it can be directly passed to Provider value
|
|
83
78
|
const registry = useMemo(
|
|
84
79
|
() => ( {
|
|
85
|
-
slots,
|
|
86
|
-
fills,
|
|
80
|
+
slots: slots.current,
|
|
81
|
+
fills: fills.current,
|
|
87
82
|
registerSlot,
|
|
88
83
|
updateSlot,
|
|
89
84
|
unregisterSlot,
|
|
@@ -91,8 +86,6 @@ function useSlotRegistry() {
|
|
|
91
86
|
unregisterFill,
|
|
92
87
|
} ),
|
|
93
88
|
[
|
|
94
|
-
slots,
|
|
95
|
-
fills,
|
|
96
89
|
registerSlot,
|
|
97
90
|
updateSlot,
|
|
98
91
|
unregisterSlot,
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { useSnapshot } from 'valtio';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* WordPress dependencies
|
|
9
|
+
*/
|
|
10
|
+
import { useContext } from '@wordpress/element';
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Internal dependencies
|
|
14
|
+
*/
|
|
15
|
+
import SlotFillContext from './slot-fill-context';
|
|
16
|
+
|
|
17
|
+
export default function useSlotFills( name ) {
|
|
18
|
+
const registry = useContext( SlotFillContext );
|
|
19
|
+
const fills = useSnapshot( registry.fills, { sync: true } );
|
|
20
|
+
// The important bit here is that this call ensures that the hook
|
|
21
|
+
// only causes a re-render if the "fills" of a given slot name
|
|
22
|
+
// change change, not any fills.
|
|
23
|
+
return fills.get( name );
|
|
24
|
+
}
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
// @ts-nocheck
|
|
2
|
+
/**
|
|
3
|
+
* External dependencies
|
|
4
|
+
*/
|
|
5
|
+
import { useSnapshot } from 'valtio';
|
|
6
|
+
|
|
2
7
|
/**
|
|
3
8
|
* WordPress dependencies
|
|
4
9
|
*/
|
|
5
|
-
import { useCallback, useContext
|
|
10
|
+
import { useCallback, useContext } from '@wordpress/element';
|
|
6
11
|
|
|
7
12
|
/**
|
|
8
13
|
* Internal dependencies
|
|
@@ -11,10 +16,11 @@ import SlotFillContext from './slot-fill-context';
|
|
|
11
16
|
|
|
12
17
|
export default function useSlot( name ) {
|
|
13
18
|
const registry = useContext( SlotFillContext );
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
const slots = useSnapshot( registry.slots, { sync: true } );
|
|
20
|
+
// The important bit here is that this call ensures
|
|
21
|
+
// the hook only causes a re-render if the slot
|
|
22
|
+
// with the given name change, not any other slot.
|
|
23
|
+
const slot = slots.get( name );
|
|
18
24
|
|
|
19
25
|
const updateSlot = useCallback(
|
|
20
26
|
( fillProps ) => {
|
|
@@ -48,7 +54,6 @@ export default function useSlot( name ) {
|
|
|
48
54
|
...slot,
|
|
49
55
|
updateSlot,
|
|
50
56
|
unregisterSlot,
|
|
51
|
-
fills,
|
|
52
57
|
registerFill,
|
|
53
58
|
unregisterFill,
|
|
54
59
|
};
|
package/src/slot-fill/index.js
CHANGED
|
@@ -14,6 +14,7 @@ import BubblesVirtuallySlot from './bubbles-virtually/slot';
|
|
|
14
14
|
import BubblesVirtuallySlotFillProvider from './bubbles-virtually/slot-fill-provider';
|
|
15
15
|
import SlotFillProvider from './provider';
|
|
16
16
|
import useSlot from './bubbles-virtually/use-slot';
|
|
17
|
+
export { default as useSlotFills } from './bubbles-virtually/use-slot-fills';
|
|
17
18
|
|
|
18
19
|
export function Fill( props ) {
|
|
19
20
|
// We're adding both Fills here so they can register themselves before
|
package/src/style.scss
CHANGED
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
@import "./dropdown/style.scss";
|
|
18
18
|
@import "./dropdown-menu/style.scss";
|
|
19
19
|
@import "./duotone-picker/style.scss";
|
|
20
|
-
@import "./font-size-picker/style.scss";
|
|
21
20
|
@import "./form-toggle/style.scss";
|
|
22
21
|
@import "./form-token-field/style.scss";
|
|
23
22
|
@import "./guide/style.scss";
|
|
@@ -55,13 +55,6 @@ export const buttonView = css`
|
|
|
55
55
|
}
|
|
56
56
|
`;
|
|
57
57
|
|
|
58
|
-
export const buttonActive = css`
|
|
59
|
-
color: ${ COLORS.white };
|
|
60
|
-
&:active {
|
|
61
|
-
background: transparent;
|
|
62
|
-
}
|
|
63
|
-
`;
|
|
64
|
-
|
|
65
58
|
export const ButtonContentView = styled.div`
|
|
66
59
|
font-size: ${ CONFIG.fontSize };
|
|
67
60
|
line-height: 1;
|
|
@@ -82,8 +75,17 @@ export const isIcon = ( {
|
|
|
82
75
|
};
|
|
83
76
|
|
|
84
77
|
return css`
|
|
78
|
+
color: ${ COLORS.gray[ 900 ] };
|
|
85
79
|
width: ${ iconButtonSizes[ size ] };
|
|
86
80
|
padding-left: 0;
|
|
87
81
|
padding-right: 0;
|
|
88
82
|
`;
|
|
89
83
|
};
|
|
84
|
+
|
|
85
|
+
export const buttonActive = css`
|
|
86
|
+
color: ${ COLORS.white };
|
|
87
|
+
|
|
88
|
+
&:active {
|
|
89
|
+
background: transparent;
|
|
90
|
+
}
|
|
91
|
+
`;
|
package/tsconfig.json
CHANGED
|
@@ -47,10 +47,8 @@
|
|
|
47
47
|
"src/color-list-picker",
|
|
48
48
|
"src/combobox-control",
|
|
49
49
|
"src/custom-gradient-picker",
|
|
50
|
-
"src/custom-select-control",
|
|
51
50
|
"src/dimension-control",
|
|
52
51
|
"src/duotone-picker",
|
|
53
|
-
"src/font-size-picker",
|
|
54
52
|
"src/gradient-picker",
|
|
55
53
|
"src/guide",
|
|
56
54
|
"src/higher-order/navigate-regions",
|