@nulogy/components 13.1.0 → 13.1.2

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/main.js CHANGED
@@ -51394,9 +51394,6 @@
51394
51394
  border: "1px solid " + (currentPage ? theme.colors.darkBlue : theme.colors.lightGrey),
51395
51395
  color: disabled ? theme.colors.grey : theme.colors.black,
51396
51396
  minWidth: iconOnly ? theme.space.x4 : "auto",
51397
- "&:not(:last-child)": {
51398
- marginRight: theme.space.x2
51399
- },
51400
51397
  cursor: disabled ? "default" : "pointer",
51401
51398
  "&:hover": {
51402
51399
  background: getHoverBackground(currentPage, disabled, theme)
@@ -51580,6 +51577,7 @@
51580
51577
 
51581
51578
  return /*#__PURE__*/React__default["default"].createElement(Flex, Object.assign({
51582
51579
  as: "nav",
51580
+ gap: "x2",
51583
51581
  "aria-label": ariaLabel || t("pagination navigation"),
51584
51582
  alignItems: "center"
51585
51583
  }, restProps), /*#__PURE__*/React__default["default"].createElement(PreviousButton, {
@@ -51602,7 +51600,6 @@
51602
51600
  if (page === SEPARATOR) return /*#__PURE__*/React__default["default"].createElement(Text, {
51603
51601
  key: "sep" + index,
51604
51602
  py: "x1",
51605
- mr: "x2",
51606
51603
  fontSize: "small",
51607
51604
  lineHeight: "smallTextBase"
51608
51605
  }, SEPARATOR);else return /*#__PURE__*/React__default["default"].createElement(PageNumber, {
@@ -51377,9 +51377,6 @@ var PaginationButton = styled.button.withConfig({
51377
51377
  border: "1px solid " + (currentPage ? theme.colors.darkBlue : theme.colors.lightGrey),
51378
51378
  color: disabled ? theme.colors.grey : theme.colors.black,
51379
51379
  minWidth: iconOnly ? theme.space.x4 : "auto",
51380
- "&:not(:last-child)": {
51381
- marginRight: theme.space.x2
51382
- },
51383
51380
  cursor: disabled ? "default" : "pointer",
51384
51381
  "&:hover": {
51385
51382
  background: getHoverBackground(currentPage, disabled, theme)
@@ -51563,6 +51560,7 @@ function Pagination(_a) {
51563
51560
 
51564
51561
  return /*#__PURE__*/React__default.createElement(Flex, Object.assign({
51565
51562
  as: "nav",
51563
+ gap: "x2",
51566
51564
  "aria-label": ariaLabel || t("pagination navigation"),
51567
51565
  alignItems: "center"
51568
51566
  }, restProps), /*#__PURE__*/React__default.createElement(PreviousButton, {
@@ -51585,7 +51583,6 @@ function Pagination(_a) {
51585
51583
  if (page === SEPARATOR) return /*#__PURE__*/React__default.createElement(Text, {
51586
51584
  key: "sep" + index,
51587
51585
  py: "x1",
51588
- mr: "x2",
51589
51586
  fontSize: "small",
51590
51587
  lineHeight: "smallTextBase"
51591
51588
  }, SEPARATOR);else return /*#__PURE__*/React__default.createElement(PageNumber, {
@@ -3,6 +3,7 @@ import Select from "react-select/base";
3
3
  import { PropsValue } from "react-select";
4
4
  import type { GroupBase, Props, StylesConfig } from "react-select";
5
5
  import { StyledProps } from "../StyledProps";
6
+ import { CustomOnChangeValue } from "./lib";
6
7
  export type NDSOptionValue = string | number | boolean | null;
7
8
  export interface NDSOption {
8
9
  label: ReactNode;
@@ -22,7 +23,7 @@ interface CustomProps<Option extends NDSOption, IsMulti extends boolean, Group e
22
23
  defaultValue?: PropsValue<Option["value"]>;
23
24
  value?: PropsValue<Option["value"]>;
24
25
  options: readonly Option[];
25
- onChange?: (newValue: PropsValue<Option["value"]>) => void;
26
+ onChange?: (newValue: CustomOnChangeValue<IsMulti>) => void;
26
27
  windowThreshold?: number;
27
28
  styles?: (selectStyles: StylesConfig<Option, IsMulti, Group>) => StylesConfig<Option, IsMulti, Group>;
28
29
  }
@@ -1,4 +1,4 @@
1
- import { Options, PropsValue } from "react-select";
1
+ import { OnChangeValue, Options, PropsValue } from "react-select";
2
2
  import { NDSOption, NDSOptionValue } from "./Select";
3
3
  export declare function calcOptionsLength(options: any): any;
4
4
  export declare function flattenGroupedChildren(children: any): any;
@@ -17,4 +17,5 @@ export declare function createGetHeight({ groupHeadingStyles, noOptionsMsgStyles
17
17
  export declare function checkOptionsAreValid(options: Options<NDSOption>): void;
18
18
  export declare function getOption(options: Options<NDSOption>, value: PropsValue<NDSOptionValue>): any;
19
19
  export declare function getReactSelectValue(options: Options<NDSOption>, input: PropsValue<NDSOptionValue>): any;
20
- export declare function extractValue(options: Options<NDSOption> | NDSOption, isMulti: boolean): NDSOptionValue[] | NDSOptionValue;
20
+ export type CustomOnChangeValue<IsMulti extends boolean> = IsMulti extends true ? NDSOptionValue[] : NDSOptionValue;
21
+ export declare function extractValue<IsMulti extends boolean>(options: OnChangeValue<NDSOption, IsMulti>, isMulti: IsMulti): CustomOnChangeValue<IsMulti>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nulogy/components",
3
- "version": "13.1.0",
3
+ "version": "13.1.2",
4
4
  "description": "Component library for the Nulogy Design System - http://nulogy.design",
5
5
  "private": false,
6
6
  "publishConfig": {