jfs-components 0.1.36 → 0.1.49

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 (56) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/lib/commonjs/components/Accordion/Accordion.js +16 -3
  3. package/lib/commonjs/components/AppBar/AppBar.js +118 -93
  4. package/lib/commonjs/components/CompareTable/CompareTable.js +98 -33
  5. package/lib/commonjs/components/FormField/FormField.js +9 -1
  6. package/lib/commonjs/components/FullscreenModal/FullscreenModal.js +4 -14
  7. package/lib/commonjs/components/HelloJioInput/HelloJioInput.js +20 -4
  8. package/lib/commonjs/components/PageHero/PageHero.js +3 -0
  9. package/lib/commonjs/components/ProductMerchandisingCard/ProductMerchandisingCard.js +50 -30
  10. package/lib/commonjs/components/Section/Section.js +3 -1
  11. package/lib/commonjs/components/ValueBackMetric/ValueBackMetric.js +117 -89
  12. package/lib/commonjs/components/index.js +7 -1
  13. package/lib/commonjs/design-tokens/Coin Variables-variables-full.json +1 -42204
  14. package/lib/commonjs/design-tokens/figma-modes.generated.js +8 -7
  15. package/lib/commonjs/icons/registry.js +1 -1
  16. package/lib/module/components/Accordion/Accordion.js +16 -3
  17. package/lib/module/components/AppBar/AppBar.js +116 -93
  18. package/lib/module/components/CompareTable/CompareTable.js +99 -34
  19. package/lib/module/components/FormField/FormField.js +9 -1
  20. package/lib/module/components/FullscreenModal/FullscreenModal.js +4 -14
  21. package/lib/module/components/HelloJioInput/HelloJioInput.js +20 -4
  22. package/lib/module/components/PageHero/PageHero.js +3 -0
  23. package/lib/module/components/ProductMerchandisingCard/ProductMerchandisingCard.js +50 -30
  24. package/lib/module/components/Section/Section.js +3 -1
  25. package/lib/module/components/ValueBackMetric/ValueBackMetric.js +120 -93
  26. package/lib/module/components/index.js +1 -1
  27. package/lib/module/design-tokens/Coin Variables-variables-full.json +1 -42204
  28. package/lib/module/design-tokens/figma-modes.generated.js +8 -7
  29. package/lib/module/icons/registry.js +1 -1
  30. package/lib/typescript/src/components/Accordion/Accordion.d.ts +14 -1
  31. package/lib/typescript/src/components/AppBar/AppBar.d.ts +46 -14
  32. package/lib/typescript/src/components/CompareTable/CompareTable.d.ts +29 -12
  33. package/lib/typescript/src/components/HelloJioInput/HelloJioInput.d.ts +6 -4
  34. package/lib/typescript/src/components/PageHero/PageHero.d.ts +1 -0
  35. package/lib/typescript/src/components/ProductMerchandisingCard/ProductMerchandisingCard.d.ts +8 -1
  36. package/lib/typescript/src/components/Section/Section.d.ts +2 -1
  37. package/lib/typescript/src/components/ValueBackMetric/ValueBackMetric.d.ts +27 -16
  38. package/lib/typescript/src/components/index.d.ts +1 -1
  39. package/lib/typescript/src/design-tokens/figma-modes.generated.d.ts +2 -1
  40. package/lib/typescript/src/icons/registry.d.ts +1 -1
  41. package/package.json +1 -1
  42. package/src/components/Accordion/Accordion.tsx +61 -33
  43. package/src/components/AppBar/AppBar.tsx +154 -124
  44. package/src/components/CompareTable/CompareTable.tsx +138 -52
  45. package/src/components/FormField/FormField.tsx +7 -0
  46. package/src/components/FullscreenModal/FullscreenModal.tsx +5 -14
  47. package/src/components/HelloJioInput/HelloJioInput.tsx +31 -12
  48. package/src/components/PageHero/PageHero.tsx +5 -0
  49. package/src/components/ProductMerchandisingCard/ProductMerchandisingCard.tsx +63 -30
  50. package/src/components/Section/Section.tsx +121 -156
  51. package/src/components/ValueBackMetric/ValueBackMetric.tsx +178 -104
  52. package/src/components/index.ts +6 -1
  53. package/src/design-tokens/Coin Variables-variables-full.json +1 -42204
  54. package/src/design-tokens/figma-modes.generated.ts +8 -7
  55. package/src/icons/registry.ts +1 -1
  56. package/D2C.md +0 -113
@@ -63,7 +63,7 @@ export const FIGMA_MODES = {
63
63
  "Calendar Glyph / Output": ["Default"],
64
64
  "Calendar Glyph State": ["Idle", "notSaved", "saved"],
65
65
  "Card / Output": ["Default"],
66
- "Card Apperance": ["Default", "Plain"],
66
+ "Card Container": ["Default", "Plain"],
67
67
  "Card Feedback / Output": ["Default"],
68
68
  "Card Tab / output": ["Default"],
69
69
  "Card Tab State": ["Default", "Active"],
@@ -248,6 +248,7 @@ export const FIGMA_MODES = {
248
248
  "Slot gap": ["S", "M", "L", "XL", "XS"],
249
249
  "special button": ["Default"],
250
250
  "Spinner / Output": ["Default"],
251
+ "Stack Context": ["Root", "Nested"],
251
252
  "statGroup / Output": ["Default"],
252
253
  "StatItem / Output": ["Default"],
253
254
  "StatItem Label Position ": ["Top", "Bottom"],
@@ -304,7 +305,7 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
304
305
  "Accordion": ["Accordion States"],
305
306
  "AccordionCheckbox": ["Color Mode", "context 10", "Profile Card Appearance"],
306
307
  "AccountCard": ["AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "Emphasis", "Page type"],
307
- "ActionFooter": ["Color Mode", "context5"],
308
+ "ActionFooter": ["Color Mode", "Context", "context5", "Slot gap"],
308
309
  "ActionTile": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "Page type", "Semantic Intent"],
309
310
  "Additem": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "Page type", "Semantic Intent"],
310
311
  "AllocationComparisonChart": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
@@ -322,7 +323,7 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
322
323
  "BrandChip": ["Avatar Size", "Badge Size", "Color Mode", "context 10", "Context4", "Profile Card Appearance"],
323
324
  "BubbleChart": ["Appearance / DataViz", "Color Mode", "Context", "context 10", "Emphasis / DataViz", "Profile Card Appearance", "Text Appearance"],
324
325
  "Button": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "Emphasis", "Page type", "Profile Card Appearance", "Semantic Intent"],
325
- "Card": ["AppearanceBrand", "AppearanceSystem", "Border Boolean", "Card Apperance", "Color Mode", "Gap", "Page type", "Semantic Intent"],
326
+ "Card": ["AppearanceBrand", "AppearanceSystem", "Card Container", "Color Mode", "Gap", "Page type", "Semantic Intent"],
326
327
  "CardAdvisory": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "circularProgressBar Size", "Color Mode", "Context", "context 10", "Emphasis", "Nudge padding", "Page type", "Profile Card Appearance", "Semantic Intent", "Slot gap"],
327
328
  "CardBankAccount": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "Context4", "context5", "Emphasis", "List Item Style", "Page type", "Profile Card Appearance", "Semantic Intent", "Text Appearance", "Text Sizes", "Weight"],
328
329
  "CardCTA": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "context 8", "Context4", "Emphasis", "Icon Capsule Size", "MediaBlock", "Page type", "Profile Card Appearance", "Semantic Intent"],
@@ -341,7 +342,7 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
341
342
  "CircularProgressBar": ["AppearanceBrand", "AppearanceSystem", "circularProgressBar Size", "Color Mode", "Emphasis", "Semantic Intent"],
342
343
  "CircularRating": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "Emphasis", "Nudge padding", "Page type", "Profile Card Appearance", "Semantic Intent", "Slot gap"],
343
344
  "ClusterBubble": ["Appearance / DataViz", "Color Mode", "Context", "context 10", "Emphasis / DataViz", "Profile Card Appearance", "Text Appearance"],
344
- "CompareTable": ["Accordion States", "AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "Emphasis", "Page type", "Radius", "Selection Card Radius"],
345
+ "CompareTable": ["Accordion States", "AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "Emphasis", "Page type", "Radius"],
345
346
  "ComparisonBar": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "Emphasis", "Icon Capsule Size", "Page type", "Profile Card Appearance", "Radius", "Semantic Intent"],
346
347
  "ContentSheet": ["Color Mode", "Page type"],
347
348
  "CoverageBarComparison": ["Appearance / DataViz", "Color Mode", "Emphasis / DataViz"],
@@ -366,7 +367,7 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
366
367
  "HelloJioInput": ["AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "Emphasis", "Hello Jio Input Size", "Hello Jio Input State", "Page type"],
367
368
  "HeroSection": ["AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "context 9", "context7", "Emphasis", "FormField States", "InputState", "Page type", "Status"],
368
369
  "HoldingsCard": ["AppearanceBrand", "Color Mode"],
369
- "HStack": ["Context", "Padding", "Page type", "Slot gap"],
370
+ "HStack": ["Context", "Padding", "Page type", "Slot gap", "Stack Context"],
370
371
  "Icon": ["AppearanceBrand", "AppearanceSystem", "Badge Size", "Color Mode", "context 10", "Context4", "Emphasis", "Page type", "Profile Card Appearance", "Semantic Intent"],
371
372
  "IconButton": ["AppearanceBrand", "Button / Size", "Button / State", "Color Mode", "Emphasis", "Page type"],
372
373
  "IconCapsule": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "Page type", "Semantic Intent"],
@@ -393,7 +394,7 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
393
394
  "PaymentFeedback": ["AppearanceBrand", "AppearanceSystem", "Color Mode", "Context", "Emphasis", "Icon Capsule Size", "Page type", "Semantic Intent"],
394
395
  "PdpCcCard": ["AppearanceBrand", "AppearanceSystem", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "context7", "Emphasis", "Page type", "Profile Card Appearance", "Radius", "Semantic Intent"],
395
396
  "PlanComparisonCard": ["Color Mode"],
396
- "Popup": ["Color Mode", "Context", "Padding", "Page type", "Slot gap"],
397
+ "Popup": ["Color Mode", "Context", "Padding", "Page type", "Slot gap", "Stack Context"],
397
398
  "PortfolioHero": ["Avatar Size", "Badge Size", "Color Mode", "context 10", "Context3", "Context4", "Profile Card Appearance"],
398
399
  "ProductLabel": ["Avatar Size", "Badge Size", "Color Mode", "context 10", "Context4", "Profile Card Appearance"],
399
400
  "ProductMerchandisingCard": ["AppearanceBrand", "AppearanceSystem", "Avatar Size", "Badge Size", "Button / Size", "Button / State", "Color Mode", "Context", "context 10", "Context4", "Emphasis", "Page type", "Profile Card Appearance", "Semantic Intent"],
@@ -434,7 +435,7 @@ export const FIGMA_COMPONENT_MODES: Record<string, readonly string[]> = {
434
435
  "TransactionStatus": ["Transaction Status"],
435
436
  "UpiHandle": ["Color Mode", "context 10", "Profile Card Appearance", "UPI Handle Image"],
436
437
  "ValueBackMetric": ["AppearanceBrand", "AppearanceSystem", "Badge Size", "Color Mode", "Context", "context 10", "Context4", "Emphasis", "Page type", "Profile Card Appearance", "Semantic Intent", "Text Appearance", "Text Sizes", "Weight"],
437
- "VStack": ["Context", "Padding", "Page type", "Slot gap"],
438
+ "VStack": ["Context", "Padding", "Page type", "Slot gap", "Stack Context"],
438
439
  };
439
440
 
440
441
  /**
@@ -4,7 +4,7 @@
4
4
  * Auto-generated from SVG files in src/icons/
5
5
  * DO NOT EDIT MANUALLY - Run "npm run icons:generate" to regenerate
6
6
  *
7
- * Generated: 2026-07-21T07:33:30.350Z
7
+ * Generated: 2026-07-25T08:19:21.865Z
8
8
  */
9
9
 
10
10
  // Icon name to SVG data mapping
package/D2C.md DELETED
@@ -1,113 +0,0 @@
1
- # D2C — Design to Code with jfs-components
2
-
3
- Implement the supplied Figma design using the installed `jfs-components`
4
- package. Follow all four stages in order.
5
-
6
- ## Input
7
-
8
- Use the Figma URL supplied after `/D2C` or in the user's latest message. If no
9
- Figma URL was supplied, ask for one before doing anything else.
10
-
11
- ## 1. Read the design
12
-
13
- 1. Call the Figma MCP `get_design_context` for the linked node.
14
- 2. Call `get_screenshot` for the same node. Keep it as the visual reference for
15
- final QA.
16
- 3. Follow Code Connect mappings, design annotations, and provided assets. If
17
- Figma supplies an image or SVG URL, use it directly; do not create a
18
- placeholder or install an icon package.
19
-
20
- If the Figma MCP is unavailable or cannot read the node, report the blocker and
21
- stop. Do not recreate the design from the URL or from assumptions.
22
-
23
- ## 2. Extract and resolve explicit modes
24
-
25
- From the consuming project's root, run:
26
-
27
- ```bash
28
- npx jfs-extract-modes "<figma-url>" --out modes.json
29
- ```
30
-
31
- The CLI automatically loads `FIGMA_ACCESS_TOKEN` from the project-root `.env`.
32
- An already exported shell value takes precedence. The token only needs the
33
- Figma `file_content:read` scope. Never print, log, or ask the user to paste the
34
- token into chat.
35
-
36
- If the token is missing, stop and direct the user to `[Open .env](.env)` and
37
- add `FIGMA_ACCESS_TOKEN=` if needed. To create a token: in Figma's file browser,
38
- open the account menu → **Settings** → **Security** → **Personal access
39
- tokens** → **Generate new token**, choose an expiration, grant only
40
- `file_content:read`, generate it, and copy it immediately into `.env`. Figma
41
- shows the value only once. Use the
42
- [official PAT documentation](https://developers.figma.com/docs/rest-api/personal-access-tokens/)
43
- if the UI has changed. Never create or overwrite a token value yourself.
44
-
45
- If the bin is unavailable in a nonstandard monorepo, run:
46
-
47
- ```bash
48
- node node_modules/jfs-components/scripts/extract-figma-modes.js "<figma-url>" --out modes.json
49
- ```
50
-
51
- Resolve the effective modes for each represented component as follows:
52
-
53
- 1. Start with `inheritedFromAncestors`, when present.
54
- 2. Find every `modes` entry whose `path` is the component's path or an ancestor
55
- of it.
56
- 3. Merge those entries from root to leaf; deeper entries override inherited
57
- values.
58
- 4. Match by layer name and position, using `nodeId` to disambiguate duplicate
59
- names.
60
-
61
- If `unresolved` is present, report every item and its exact `reason`, then stop
62
- before implementation because mode fidelity cannot be guaranteed:
63
-
64
- - `local collection` means the design uses a file-local collection that the
65
- packaged library data cannot resolve.
66
- - `key not in variables JSON` or `mode not in collection` means the packaged
67
- design-token JSON is out of date.
68
-
69
- Do not guess or silently omit an unresolved mode.
70
-
71
- ## 3. Implement
72
-
73
- Before editing, inspect the installed package's exports/types and the consuming
74
- app's existing screens. Reuse its file placement, navigation, styling, and
75
- asset conventions. Never invent a `jfs-components` component or prop.
76
-
77
- - Prefer mapped `jfs-components` over rebuilding them from primitives.
78
- - Apply extracted collection/mode pairs exactly through each component's
79
- `modes` prop.
80
- - Put a mode on the closest code component that represents the reported Figma
81
- layer or subtree. Preserve parent inheritance and child overrides; never
82
- flatten a child override into its parent.
83
- - Do not substitute similar-looking modes, remove apparently redundant modes,
84
- or move modes between layers.
85
- - Match Figma content, order, visibility, variants, spacing, and assets.
86
-
87
- Run the consuming app's existing typecheck, tests, or build command relevant to
88
- the changed screen and fix implementation errors.
89
-
90
- ## 4. Render and visually verify
91
-
92
- Render the implemented screen on the target platform and capture it with the
93
- available mobile or browser tooling. Compare it with the Figma screenshot for:
94
-
95
- 1. component size, variant, and emphasis;
96
- 2. color and appearance;
97
- 3. spacing, padding, alignment, and gaps;
98
- 4. text, wrapping, and truncation; and
99
- 5. icons, imagery, and layer visibility.
100
-
101
- Fix every implementation-caused difference and capture the screen again.
102
- Platform or environment differences that cannot be fixed in code, such as a
103
- missing system font or renderer-specific antialiasing, must be identified
104
- explicitly rather than hidden.
105
-
106
- If no suitable render or screenshot tooling is available, do not claim visual
107
- completion. Report what remains to be checked and give the exact manual run and
108
- comparison steps.
109
-
110
- ## Completion report
111
-
112
- Report the files changed, the effective modes applied to each component, the
113
- validation commands and results, and the final visual comparison status.