jfs-components 0.1.23 → 0.1.28

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.
Files changed (99) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/lib/commonjs/components/AutoplayControl/AutoplayControl.js +66 -0
  3. package/lib/commonjs/components/CardCTA/CardCTA.js +32 -25
  4. package/lib/commonjs/components/Carousel/Carousel.js +112 -19
  5. package/lib/commonjs/components/ChipSelect/ChipSelect.js +2 -1
  6. package/lib/commonjs/components/ContentSheet/ContentSheet.js +39 -5
  7. package/lib/commonjs/components/FormUpload/Additem.js +168 -0
  8. package/lib/commonjs/components/FormUpload/FormUpload.js +198 -0
  9. package/lib/commonjs/components/Grid/Grid.js +206 -0
  10. package/lib/commonjs/components/ListItem/ListItem.js +11 -4
  11. package/lib/commonjs/components/MetricData/MetricData.js +132 -0
  12. package/lib/commonjs/components/NumberPagination/NumberPagination.js +144 -0
  13. package/lib/commonjs/components/ProfileCard/ProfileCard.js +208 -0
  14. package/lib/commonjs/components/Rating/Rating.js +137 -0
  15. package/lib/commonjs/components/UpiHandle/UpiHandle.js +23 -11
  16. package/lib/commonjs/components/index.js +42 -0
  17. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -1
  18. package/lib/commonjs/design-tokens/figma-modes.generated.js +23 -10
  19. package/lib/commonjs/icons/components/IconBrokenimage.js +19 -0
  20. package/lib/commonjs/icons/components/IconImage.js +19 -0
  21. package/lib/commonjs/icons/components/IconMic.js +19 -0
  22. package/lib/commonjs/icons/components/IconMicoff.js +19 -0
  23. package/lib/commonjs/icons/components/IconPause.js +19 -0
  24. package/lib/commonjs/icons/components/IconPlay.js +19 -0
  25. package/lib/commonjs/icons/components/index.js +66 -0
  26. package/lib/commonjs/icons/registry.js +2 -2
  27. package/lib/module/components/AutoplayControl/AutoplayControl.js +60 -0
  28. package/lib/module/components/CardCTA/CardCTA.js +32 -25
  29. package/lib/module/components/Carousel/Carousel.js +111 -19
  30. package/lib/module/components/ChipSelect/ChipSelect.js +2 -1
  31. package/lib/module/components/ContentSheet/ContentSheet.js +41 -7
  32. package/lib/module/components/FormUpload/Additem.js +162 -0
  33. package/lib/module/components/FormUpload/FormUpload.js +192 -0
  34. package/lib/module/components/Grid/Grid.js +201 -0
  35. package/lib/module/components/ListItem/ListItem.js +11 -4
  36. package/lib/module/components/MetricData/MetricData.js +127 -0
  37. package/lib/module/components/NumberPagination/NumberPagination.js +138 -0
  38. package/lib/module/components/ProfileCard/ProfileCard.js +202 -0
  39. package/lib/module/components/Rating/Rating.js +132 -0
  40. package/lib/module/components/UpiHandle/UpiHandle.js +23 -11
  41. package/lib/module/components/index.js +7 -1
  42. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -1
  43. package/lib/module/design-tokens/figma-modes.generated.js +23 -10
  44. package/lib/module/icons/components/IconBrokenimage.js +12 -0
  45. package/lib/module/icons/components/IconImage.js +12 -0
  46. package/lib/module/icons/components/IconMic.js +12 -0
  47. package/lib/module/icons/components/IconMicoff.js +12 -0
  48. package/lib/module/icons/components/IconPause.js +12 -0
  49. package/lib/module/icons/components/IconPlay.js +12 -0
  50. package/lib/module/icons/components/index.js +6 -0
  51. package/lib/module/icons/registry.js +2 -2
  52. package/lib/typescript/src/components/AutoplayControl/AutoplayControl.d.ts +15 -0
  53. package/lib/typescript/src/components/Carousel/Carousel.d.ts +8 -1
  54. package/lib/typescript/src/components/ChipSelect/ChipSelect.d.ts +6 -1
  55. package/lib/typescript/src/components/ContentSheet/ContentSheet.d.ts +7 -1
  56. package/lib/typescript/src/components/FormUpload/Additem.d.ts +96 -0
  57. package/lib/typescript/src/components/FormUpload/FormUpload.d.ts +85 -0
  58. package/lib/typescript/src/components/Grid/Grid.d.ts +87 -0
  59. package/lib/typescript/src/components/MetricData/MetricData.d.ts +53 -0
  60. package/lib/typescript/src/components/NumberPagination/NumberPagination.d.ts +21 -0
  61. package/lib/typescript/src/components/ProfileCard/ProfileCard.d.ts +89 -0
  62. package/lib/typescript/src/components/Rating/Rating.d.ts +30 -0
  63. package/lib/typescript/src/components/UpiHandle/UpiHandle.d.ts +7 -1
  64. package/lib/typescript/src/components/index.d.ts +34 -28
  65. package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +10 -4
  66. package/lib/typescript/src/icons/components/IconBrokenimage.d.ts +3 -0
  67. package/lib/typescript/src/icons/components/IconImage.d.ts +3 -0
  68. package/lib/typescript/src/icons/components/IconMic.d.ts +3 -0
  69. package/lib/typescript/src/icons/components/IconMicoff.d.ts +3 -0
  70. package/lib/typescript/src/icons/components/IconPause.d.ts +3 -0
  71. package/lib/typescript/src/icons/components/IconPlay.d.ts +3 -0
  72. package/lib/typescript/src/icons/components/index.d.ts +6 -0
  73. package/lib/typescript/src/icons/registry.d.ts +1 -1
  74. package/package.json +1 -1
  75. package/src/components/AutoplayControl/AutoplayControl.tsx +77 -0
  76. package/src/components/CardCTA/CardCTA.tsx +30 -15
  77. package/src/components/Carousel/Carousel.tsx +133 -23
  78. package/src/components/ChipSelect/ChipSelect.tsx +7 -1
  79. package/src/components/ContentSheet/ContentSheet.tsx +50 -0
  80. package/src/components/FormUpload/Additem.tsx +262 -0
  81. package/src/components/FormUpload/FormUpload.tsx +313 -0
  82. package/src/components/Grid/Grid.tsx +368 -0
  83. package/src/components/ListItem/ListItem.tsx +11 -4
  84. package/src/components/MetricData/MetricData.tsx +185 -0
  85. package/src/components/NumberPagination/NumberPagination.tsx +170 -0
  86. package/src/components/ProfileCard/ProfileCard.tsx +268 -0
  87. package/src/components/Rating/Rating.tsx +174 -0
  88. package/src/components/UpiHandle/UpiHandle.tsx +35 -24
  89. package/src/components/index.ts +329 -182
  90. package/src/design-tokens/Coin Variables-variables-full.json +1 -1
  91. package/src/design-tokens/figma-modes.generated.ts +23 -10
  92. package/src/icons/components/IconBrokenimage.tsx +11 -0
  93. package/src/icons/components/IconImage.tsx +11 -0
  94. package/src/icons/components/IconMic.tsx +11 -0
  95. package/src/icons/components/IconMicoff.tsx +11 -0
  96. package/src/icons/components/IconPause.tsx +11 -0
  97. package/src/icons/components/IconPlay.tsx +11 -0
  98. package/src/icons/components/index.ts +6 -0
  99. package/src/icons/registry.ts +25 -1
@@ -14,9 +14,6 @@ var _Icon = _interopRequireDefault(require("../../icons/Icon"));
14
14
  var _jsxRuntime = require("react/jsx-runtime");
15
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
17
- // Default static asset from the component folder.
18
- // Consumers can override the image via the `source` prop if needed.
19
- const DEFAULT_AVATAR_IMAGE = require('./Image.png');
20
17
  const IS_WEB = _reactNative.Platform.OS === 'web';
21
18
  const IS_IOS = _reactNative.Platform.OS === 'ios';
22
19
  const PRESS_DELAY = IS_IOS ? 130 : 0;
@@ -89,7 +86,7 @@ function resolveUpiHandleTokens(modes) {
89
86
  * @param {Object} [props.modes={}] - Modes object passed directly to `getVariableByName`.
90
87
  * @param {boolean} [props.showIcon=true] - Toggles the trailing icon visibility.
91
88
  * @param {string} [props.iconName='ic_scan_qr_code'] - Icon name from the actions set.
92
- * @param {UnifiedSource} [props.source] - Unified avatar source (URI, inline SVG XML, `require()` asset, SVG React component, or React element). Smart-detects raster vs SVG so the same prop works on iOS, Android and web.
89
+ * @param {UnifiedSource} [props.source] - Unified avatar source (URI, inline SVG XML, `require()` asset, SVG React component, or React element). Smart-detects raster vs SVG so the same prop works on iOS, Android and web. Providing a source force-sets `UPI Handle Image: True` (avatar shown); omitting it force-sets `False` (avatar hidden), overriding any `UPI Handle Image` value passed via `modes`.
93
90
  * @param {ImageSourcePropType|UnifiedSource} [props.avatarSource] - Deprecated alias for `source`; kept for back-compat.
94
91
  * @param {Function} [props.onClick] - Click/tap handler. Works as an alias for `onPress`.
95
92
  * @param {string} [props.accessibilityLabel] - Accessibility label for screen readers
@@ -124,10 +121,24 @@ function UpiHandle({
124
121
  const {
125
122
  modes: globalModes
126
123
  } = (0, _JFSThemeProvider.useTokens)();
127
- const modes = (0, _react.useMemo)(() => globalModes === _reactUtils.EMPTY_MODES && propModes === _reactUtils.EMPTY_MODES ? _reactUtils.EMPTY_MODES : {
128
- ...globalModes,
129
- ...propModes
130
- }, [globalModes, propModes]);
124
+
125
+ // The avatar is fully driven by the presence of a `source`. It force-sets the
126
+ // Figma "UPI Handle Image" collection to `True` when a source is provided and
127
+ // `False` otherwise. This is applied last so it overrides any consumer-passed
128
+ // `UPI Handle Image` mode, keeping the avatar visibility and the token layout
129
+ // (symmetric padding in the hidden-image state) in lockstep with the source.
130
+ const hasSource = source != null || avatarSource != null;
131
+ const modes = (0, _react.useMemo)(() => {
132
+ const base = globalModes === _reactUtils.EMPTY_MODES && propModes === _reactUtils.EMPTY_MODES ? _reactUtils.EMPTY_MODES : {
133
+ ...globalModes,
134
+ ...propModes
135
+ };
136
+ return {
137
+ ...base,
138
+ 'UPI Handle Image': hasSource ? 'True' : 'False'
139
+ };
140
+ }, [globalModes, propModes, hasSource]);
141
+ const showImageResolved = hasSource;
131
142
  const tokens = (0, _react.useMemo)(() => resolveUpiHandleTokens(modes), [modes]);
132
143
 
133
144
  // Focus is a sustained visible state (web-only). Setter is gated so it
@@ -161,11 +172,12 @@ function UpiHandle({
161
172
 
162
173
  // `source` wins; `avatarSource` is the legacy fallback. Both are accepted
163
174
  // as a UnifiedSource (string / number / {uri} / component / element), and
164
- // the legacy `ImageSourcePropType` shapes naturally fit that union too.
165
- const resolvedAvatarSource = source ?? avatarSource ?? DEFAULT_AVATAR_IMAGE;
175
+ // the legacy `ImageSourcePropType` shapes naturally fit that union too. This
176
+ // is only read when `showImageResolved` is true, which requires a source.
177
+ const resolvedAvatarSource = source ?? avatarSource;
166
178
  const avatarSize = tokens.avatarStyle.width ?? 23;
167
179
  const innerContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
168
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
180
+ children: [showImageResolved && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
169
181
  style: tokens.avatarStyle,
170
182
  children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_MediaSource.default, {
171
183
  source: resolvedAvatarSource,
@@ -33,6 +33,12 @@ Object.defineProperty(exports, "ActionTile", {
33
33
  return _ActionTile.default;
34
34
  }
35
35
  });
36
+ Object.defineProperty(exports, "Additem", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _Additem.default;
40
+ }
41
+ });
36
42
  Object.defineProperty(exports, "AllocationComparisonChart", {
37
43
  enumerable: true,
38
44
  get: function () {
@@ -63,6 +69,12 @@ Object.defineProperty(exports, "Attached", {
63
69
  return _Attached.default;
64
70
  }
65
71
  });
72
+ Object.defineProperty(exports, "AutoplayControl", {
73
+ enumerable: true,
74
+ get: function () {
75
+ return _AutoplayControl.default;
76
+ }
77
+ });
66
78
  Object.defineProperty(exports, "Avatar", {
67
79
  enumerable: true,
68
80
  get: function () {
@@ -375,6 +387,12 @@ Object.defineProperty(exports, "FormField", {
375
387
  return _FormField.default;
376
388
  }
377
389
  });
390
+ Object.defineProperty(exports, "FormUpload", {
391
+ enumerable: true,
392
+ get: function () {
393
+ return _FormUpload.default;
394
+ }
395
+ });
378
396
  Object.defineProperty(exports, "FullscreenModal", {
379
397
  enumerable: true,
380
398
  get: function () {
@@ -387,6 +405,12 @@ Object.defineProperty(exports, "Gauge", {
387
405
  return _Gauge.default;
388
406
  }
389
407
  });
408
+ Object.defineProperty(exports, "Grid", {
409
+ enumerable: true,
410
+ get: function () {
411
+ return _Grid.default;
412
+ }
413
+ });
390
414
  Object.defineProperty(exports, "HStack", {
391
415
  enumerable: true,
392
416
  get: function () {
@@ -543,6 +567,12 @@ Object.defineProperty(exports, "Nudge", {
543
567
  return _Nudge.default;
544
568
  }
545
569
  });
570
+ Object.defineProperty(exports, "NumberPagination", {
571
+ enumerable: true,
572
+ get: function () {
573
+ return _NumberPagination.default;
574
+ }
575
+ });
546
576
  Object.defineProperty(exports, "Numpad", {
547
577
  enumerable: true,
548
578
  get: function () {
@@ -627,6 +657,12 @@ Object.defineProperty(exports, "ProductOverview", {
627
657
  return _ProductOverview.default;
628
658
  }
629
659
  });
660
+ Object.defineProperty(exports, "ProfileCard", {
661
+ enumerable: true,
662
+ get: function () {
663
+ return _ProfileCard.default;
664
+ }
665
+ });
630
666
  Object.defineProperty(exports, "ProgressBadge", {
631
667
  enumerable: true,
632
668
  get: function () {
@@ -1029,6 +1065,9 @@ var _FilterBar = _interopRequireDefault(require("./FilterBar/FilterBar"));
1029
1065
  var _FullscreenModal = _interopRequireDefault(require("./FullscreenModal/FullscreenModal"));
1030
1066
  var _Form = _interopRequireWildcard(require("./Form/Form"));
1031
1067
  var _FormField = _interopRequireDefault(require("./FormField/FormField"));
1068
+ var _Grid = _interopRequireDefault(require("./Grid/Grid"));
1069
+ var _FormUpload = _interopRequireDefault(require("./FormUpload/FormUpload"));
1070
+ var _Additem = _interopRequireDefault(require("./FormUpload/Additem"));
1032
1071
  var _ContentSheet = _interopRequireDefault(require("./ContentSheet/ContentSheet"));
1033
1072
  var _CircularProgressBar = _interopRequireDefault(require("./CircularProgressBar/CircularProgressBar"));
1034
1073
  var _CircularProgressBarDoted = _interopRequireDefault(require("./CircularProgressBarDoted/CircularProgressBarDoted"));
@@ -1124,6 +1163,7 @@ var _CompareTable = _interopRequireDefault(require("./CompareTable/CompareTable"
1124
1163
  var _Table = _interopRequireWildcard(require("./Table/Table"));
1125
1164
  var _PoweredByLabel = _interopRequireDefault(require("./PoweredByLabel/PoweredByLabel"));
1126
1165
  var _ProductLabel = _interopRequireDefault(require("./ProductLabel/ProductLabel"));
1166
+ var _ProfileCard = _interopRequireDefault(require("./ProfileCard/ProfileCard"));
1127
1167
  var _ProductMerchandisingCard = _interopRequireDefault(require("./ProductMerchandisingCard/ProductMerchandisingCard"));
1128
1168
  var _ProductOverview = _interopRequireDefault(require("./ProductOverview/ProductOverview"));
1129
1169
  var _ProjectionMarker = _interopRequireDefault(require("./ProjectionMarker/ProjectionMarker"));
@@ -1140,5 +1180,7 @@ var _Text = _interopRequireDefault(require("./Text/Text"));
1140
1180
  var _TextSegment = _interopRequireDefault(require("./TextSegment/TextSegment"));
1141
1181
  var _SegmentedControl = _interopRequireDefault(require("./SegmentedControl/SegmentedControl"));
1142
1182
  var _Toggle = _interopRequireDefault(require("./Toggle/Toggle"));
1183
+ var _AutoplayControl = _interopRequireDefault(require("./AutoplayControl/AutoplayControl"));
1184
+ var _NumberPagination = _interopRequireDefault(require("./NumberPagination/NumberPagination"));
1143
1185
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
1144
1186
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }