@spscommerce/ds-react 4.30.1 → 4.31.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/lib/index.es.js CHANGED
@@ -31,7 +31,7 @@ var __objRest = (source, exclude) => {
31
31
  };
32
32
  import * as React from "react";
33
33
  import React__default, { useRef, useEffect, createContext, useMemo as useMemo$1, useContext, useReducer, useState, useCallback as useCallback$1, useLayoutEffect as useLayoutEffect$1 } from "react";
34
- import { noI18nI18n, ButtonKind, ButtonType, SpsIcon as SpsIcon$1, SpinnerSize, Position, ZStratum, SpsOptionListOption, DropdownKind, SPS_ACTION_DEFAULTS, ClickableTagKind, MultiSelectTagKind, TagKind, SpsIconSize, SelectMode, TooltipKind, TooltipShowTrigger, TOOLTIP_HIDE_DELAY_MS_DEFAULT, FeedbackBlockKind, FeedbackBlockIcons, GrowlerKind, GrowlerIcon, GROWLER_VISIBLE_DURATION_MS, GROWLER_FADEOUT_DURATION_MS, SpsInsightTileKind, SpsInsightTileIcons, SortDirection, ModalKind, ModalSize, DEFAULT_PAGE_SIZE_OPTIONS, StdButtonKind, SpsTaskStatus, TASK_QUEUE_NOTIFICATION_DURATION_MS, SpsTaskStatusIcons, SpsFilterTileKind, RingSize, WizardSubstepConditions } from "@spscommerce/ds-shared";
34
+ import { noI18nI18n, ButtonKind, ButtonType, SpsIcon as SpsIcon$1, SpinnerSize, Position, ZStratum, SpsOptionListOption, DropdownKind, SPS_ACTION_DEFAULTS, ClickableTagKind, MultiSelectTagKind, TagKind, SpsIconSize, SelectMode, TooltipKind, TooltipShowTrigger, TOOLTIP_HIDE_DELAY_MS_DEFAULT, FeedbackBlockKind, FeedbackBlockIcons, GrowlerKind, GrowlerIcon, GROWLER_VISIBLE_DURATION_MS, GROWLER_FADEOUT_DURATION_MS, SpsInsightTileKind, SpsInsightTileIcons, KeyValueListTitleColor, SortDirection, ModalKind, ModalSize, DEFAULT_PAGE_SIZE_OPTIONS, StdButtonKind, SpsTaskStatus, TASK_QUEUE_NOTIFICATION_DURATION_MS, SpsTaskStatusIcons, SpsFilterTileKind, RingSize, WizardSubstepConditions } from "@spscommerce/ds-shared";
35
35
  import { values as values$3, code, debounce, flatten, deepFreeze, setPath, diff, DiffChange, getPath, crumblePath, traversePath, forEachNestedObject, lockToAnimationFrames, constrain } from "@spscommerce/utils";
36
36
  import * as ReactDOM from "react-dom";
37
37
  import { createPortal, unstable_batchedUpdates } from "react-dom";
@@ -25069,26 +25069,30 @@ Object.assign(SpsKeyValueList, {
25069
25069
  displayName: "SpsKeyValueList"
25070
25070
  });
25071
25071
  const propsDoc$12 = {
25072
- itemKey: { type: "string", required: true }
25072
+ itemKey: { type: "string | nodeOrRenderFn", required: true },
25073
+ titleColor: "KeyValueListTitleColor"
25073
25074
  };
25074
25075
  const propTypes$15 = __spreadProps(__spreadValues({}, spsGlobalPropTypes), {
25075
- itemKey: propTypes$1K.exports.string.isRequired
25076
+ itemKey: propTypes$1K.exports.string.isRequired || nodeOrRenderFn.isRequired,
25077
+ titleColor: enumValue(KeyValueListTitleColor)
25076
25078
  });
25077
25079
  function SpsKeyValueListItem(props2) {
25078
25080
  const _a = props2, {
25079
25081
  children,
25080
25082
  className,
25081
25083
  itemKey,
25084
+ titleColor = KeyValueListTitleColor.LIGHT,
25082
25085
  "data-testid": testId,
25083
25086
  unsafelyReplaceClassName
25084
25087
  } = _a, rest = __objRest(_a, [
25085
25088
  "children",
25086
25089
  "className",
25087
25090
  "itemKey",
25091
+ "titleColor",
25088
25092
  "data-testid",
25089
25093
  "unsafelyReplaceClassName"
25090
25094
  ]);
25091
- const classes = clsx(unsafelyReplaceClassName || "sps-key-value-list__item", className);
25095
+ const classes = clsx(unsafelyReplaceClassName || "sps-key-value-list__item", `sps-key-value-list__item--${titleColor}`, className);
25092
25096
  return /* @__PURE__ */ React.createElement("div", __spreadValues({
25093
25097
  className: classes,
25094
25098
  "data-testid": `${testId}`
@@ -1,6 +1,8 @@
1
+ import { KeyValueListTitleColor } from "@spscommerce/ds-shared";
1
2
  import * as PropTypes from "../prop-types";
2
3
  declare const propTypes: {
3
- itemKey: PropTypes.Validator<string>;
4
+ itemKey: PropTypes.Validator<PropTypes.ReactNodeOrRenderFn>;
5
+ titleColor: PropTypes.Requireable<KeyValueListTitleColor>;
4
6
  children: PropTypes.Requireable<PropTypes.ReactNodeLike>;
5
7
  className: PropTypes.Requireable<string>;
6
8
  "data-testid": PropTypes.Requireable<string>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@spscommerce/ds-react",
3
3
  "description": "SPS Design System React components",
4
- "version": "4.30.1",
4
+ "version": "4.31.0",
5
5
  "author": "SPS Commerce",
6
6
  "license": "UNLICENSED",
7
7
  "repository": "https://github.com/spscommerce/design-system/tree/main/packages/@spscommerce/ds-react",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@react-stately/collections": "^3.3.3",
31
- "@spscommerce/ds-colors": "4.30.1",
32
- "@spscommerce/ds-shared": "4.30.1",
33
- "@spscommerce/positioning": "4.30.1",
34
- "@spscommerce/utils": "4.30.1",
31
+ "@spscommerce/ds-colors": "4.31.0",
32
+ "@spscommerce/ds-shared": "4.31.0",
33
+ "@spscommerce/positioning": "4.31.0",
34
+ "@spscommerce/utils": "4.31.0",
35
35
  "moment": "^2.25.3",
36
36
  "moment-timezone": "^0.5.28",
37
37
  "react": "^16.9.0",
@@ -39,10 +39,10 @@
39
39
  },
40
40
  "devDependencies": {
41
41
  "@react-stately/collections": "^3.3.3",
42
- "@spscommerce/ds-colors": "4.30.1",
43
- "@spscommerce/ds-shared": "4.30.1",
44
- "@spscommerce/positioning": "4.30.1",
45
- "@spscommerce/utils": "4.30.1",
42
+ "@spscommerce/ds-colors": "4.31.0",
43
+ "@spscommerce/ds-shared": "4.31.0",
44
+ "@spscommerce/positioning": "4.31.0",
45
+ "@spscommerce/utils": "4.31.0",
46
46
  "@testing-library/jest-dom": "^4.2.4",
47
47
  "@testing-library/react": "^9.3.2",
48
48
  "@types/prop-types": "^15.7.1",