@oaknational/oak-components 1.175.0 → 1.176.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/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types.d.ts +16 -7
- package/package.json +1 -1
package/dist/types.d.ts
CHANGED
|
@@ -165,7 +165,7 @@ declare const oakSpaceBetweenTokens: {
|
|
|
165
165
|
"spacing-80": string;
|
|
166
166
|
};
|
|
167
167
|
type OakSpaceBetweenToken = keyof typeof oakSpaceBetweenTokens;
|
|
168
|
-
type AdditionalSpacingTypes = "100%" | 0 | "100vh" | "100vw" | "auto" | "fit-content" | "max-content" | "min-content" | "inherit" | "initial" | "unset";
|
|
168
|
+
type AdditionalSpacingTypes = "100%" | "-50%" | "50%" | 0 | "100vh" | "100vw" | "auto" | "fit-content" | "max-content" | "min-content" | "inherit" | "initial" | "unset";
|
|
169
169
|
type OakCombinedSpacingToken = OakAllSpacingToken | OakInnerPaddingToken | OakSpaceBetweenToken | AdditionalSpacingTypes;
|
|
170
170
|
|
|
171
171
|
type PaddingValues = ResponsiveValues<OakInnerPaddingToken | null | undefined>;
|
|
@@ -316,7 +316,7 @@ type ColorStyleProps = {
|
|
|
316
316
|
$background?: ColorToken;
|
|
317
317
|
};
|
|
318
318
|
|
|
319
|
-
type PositionSpacing = OakAllSpacingToken | OakSpaceBetweenToken | null | undefined;
|
|
319
|
+
type PositionSpacing = OakAllSpacingToken | OakSpaceBetweenToken | "-50%" | "50%" | null | undefined;
|
|
320
320
|
type PositionStyleProps = {
|
|
321
321
|
/**
|
|
322
322
|
* Sets the `position` CSS property of the element.
|
|
@@ -327,31 +327,40 @@ type PositionStyleProps = {
|
|
|
327
327
|
/**
|
|
328
328
|
* Sets the `top` CSS property of the element.
|
|
329
329
|
*
|
|
330
|
-
* Accepts a spacing token or a responsive array of spacing tokens.
|
|
330
|
+
* - Accepts a spacing token or a responsive array of spacing tokens. E.g. `['spacing-4', 'spacing-8']`
|
|
331
|
+
* - `50%` or `-50%` may be used to center an absolutely positioned element within its parent.
|
|
332
|
+
* - Can be `null` at a breakpoint E.g. `[null, 'spacing-8']`.
|
|
331
333
|
*/
|
|
332
334
|
$top?: ResponsiveValues<PositionSpacing>;
|
|
333
335
|
/**
|
|
334
336
|
* Sets the `right` CSS property of the element.
|
|
335
337
|
*
|
|
336
|
-
* Accepts a spacing token or a responsive array of spacing tokens.
|
|
338
|
+
* - Accepts a spacing token or a responsive array of spacing tokens. E.g. `['spacing-4', 'spacing-8']`
|
|
339
|
+
* - `50%` or `-50%` may be used to center an absolutely positioned element within its parent.
|
|
340
|
+
* - Can be `null` at a breakpoint E.g. `[null, 'spacing-8']`.
|
|
337
341
|
*/
|
|
338
342
|
$right?: ResponsiveValues<PositionSpacing>;
|
|
339
343
|
/**
|
|
340
344
|
* Sets the `bottom` CSS property of the element.
|
|
341
345
|
*
|
|
342
|
-
* Accepts a spacing token or a responsive array of spacing tokens.
|
|
346
|
+
* - Accepts a spacing token or a responsive array of spacing tokens. E.g. `['spacing-4', 'spacing-8']`
|
|
347
|
+
* - `50%` or `-50%` may be used to center an absolutely positioned element within its parent.
|
|
348
|
+
* - Can be `null` at a breakpoint E.g. `[null, 'spacing-8']`.
|
|
343
349
|
*/
|
|
344
350
|
$bottom?: ResponsiveValues<PositionSpacing>;
|
|
345
351
|
/**
|
|
346
352
|
* Sets the `left` CSS property of the element.
|
|
347
353
|
*
|
|
348
|
-
* Accepts a spacing token or a responsive array of spacing tokens.
|
|
354
|
+
* - Accepts a spacing token or a responsive array of spacing tokens. E.g. `['spacing-4', 'spacing-8']`
|
|
355
|
+
* - `50%` or `-50%` may be used to center an absolutely positioned element within its parent.
|
|
356
|
+
* - Can be `null` at a breakpoint E.g. `[null, 'spacing-8']`.
|
|
349
357
|
*/
|
|
350
358
|
$left?: ResponsiveValues<PositionSpacing>;
|
|
351
359
|
/**
|
|
352
360
|
* Sets the `inset` CSS property of the element.
|
|
353
361
|
*
|
|
354
|
-
* Accepts a spacing token or a responsive array of spacing tokens.
|
|
362
|
+
* - Accepts a spacing token or a responsive array of spacing tokens. E.g. `['spacing-4', 'spacing-8']`
|
|
363
|
+
* - Can be `null` at a breakpoint E.g. `[null, 'spacing-8']`.
|
|
355
364
|
*/
|
|
356
365
|
$inset?: ResponsiveValues<PositionSpacing>;
|
|
357
366
|
/**
|