@oaknational/oak-components 1.175.0 → 1.177.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 +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/types.d.ts +27 -9
- 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
|
/**
|
|
@@ -3186,11 +3195,20 @@ type OakSaveButtonProps = {
|
|
|
3186
3195
|
declare const OakSaveButton: (props: OakSaveButtonProps) => React__default.JSX.Element;
|
|
3187
3196
|
|
|
3188
3197
|
type OakSaveCountProps = {
|
|
3189
|
-
|
|
3198
|
+
/**
|
|
3199
|
+
* The number of saved items.
|
|
3200
|
+
*
|
|
3201
|
+
* Setting this will show the count inline with the label.
|
|
3202
|
+
*/
|
|
3203
|
+
count?: number;
|
|
3204
|
+
/**
|
|
3205
|
+
* The label to display inline with the count.
|
|
3206
|
+
*/
|
|
3207
|
+
label?: string;
|
|
3190
3208
|
href: string;
|
|
3191
3209
|
loading: boolean;
|
|
3192
3210
|
};
|
|
3193
|
-
declare const OakSaveCount: ({ count, href, loading }: OakSaveCountProps) => React__default.JSX.Element;
|
|
3211
|
+
declare const OakSaveCount: ({ count, href, loading, label, }: OakSaveCountProps) => React__default.JSX.Element;
|
|
3194
3212
|
|
|
3195
3213
|
type OakScaleImageButtonProps = Omit<InternalShadowRectButtonProps, "defaultTextColor" | "hoverTextColor" | "disabledTextColor" | "defaultBackground" | "defaultBorderColor" | "hoverBackground" | "hoverBorderColor" | "disabledBackground" | "disabledBorderColor" | "iconGap" | "pv" | "ph" | "$bblr" | "$btlr" | "width" | "onClick"> & {
|
|
3196
3214
|
onImageScaleCallback: (event: React__default.MouseEvent<HTMLButtonElement>) => void;
|