jfs-components 0.0.1 → 0.0.3
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/commonjs/components/ActionFooter/ActionFooter.js +124 -0
- package/lib/commonjs/components/ActionFooter/ActionFooter.js.map +1 -0
- package/lib/commonjs/components/ActionFooter/ActionFooter.mdx +101 -0
- package/lib/commonjs/components/Button/Button.js +1 -1
- package/lib/commonjs/components/Button/Button.js.map +1 -1
- package/lib/commonjs/components/Button/Button.mdx +2 -2
- package/lib/commonjs/components/CardFeedback/CardFeedback.js +47 -11
- package/lib/commonjs/components/CardFeedback/CardFeedback.js.map +1 -1
- package/lib/commonjs/components/CardFeedback/CardFeedback.mdx +1 -0
- package/lib/commonjs/components/Divider/Divider.js +63 -0
- package/lib/commonjs/components/Divider/Divider.js.map +1 -0
- package/lib/commonjs/components/Divider/Divider.mdx +91 -0
- package/lib/commonjs/components/ListItem/ListItem.js +24 -13
- package/lib/commonjs/components/ListItem/ListItem.js.map +1 -1
- package/lib/commonjs/components/ListItem/ListItem.mdx +46 -5
- package/lib/commonjs/components/MerchantProfile/MerchantProfile.js +133 -0
- package/lib/commonjs/components/MerchantProfile/MerchantProfile.js.map +1 -0
- package/lib/commonjs/components/MerchantProfile/MerchantProfile.mdx +139 -0
- package/lib/commonjs/components/MoneyValue/MoneyValue.js +36 -4
- package/lib/commonjs/components/MoneyValue/MoneyValue.js.map +1 -1
- package/lib/commonjs/components/MoneyValue/MoneyValue.mdx +4 -0
- package/lib/commonjs/components/NavArrow/NavArrow.js +90 -0
- package/lib/commonjs/components/NavArrow/NavArrow.js.map +1 -0
- package/lib/commonjs/components/NavArrow/NavArrow.mdx +123 -0
- package/lib/commonjs/components/Section/Section.mdx +4 -4
- package/lib/commonjs/components/Stepper/Step.mdx +1 -1
- package/lib/commonjs/components/index.js +28 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/design-tokens/JFS Variables-variables-full.json +18633 -1
- package/lib/commonjs/design-tokens/figma-variables-resolver.js.map +1 -2
- package/lib/commonjs/icons/registry.js +1 -1
- package/lib/module/components/ActionFooter/ActionFooter.js +119 -0
- package/lib/module/components/ActionFooter/ActionFooter.js.map +1 -0
- package/lib/module/components/ActionFooter/ActionFooter.mdx +101 -0
- package/lib/module/components/Button/Button.js +1 -1
- package/lib/module/components/Button/Button.js.map +1 -1
- package/lib/module/components/Button/Button.mdx +2 -2
- package/lib/module/components/CardFeedback/CardFeedback.js +46 -11
- package/lib/module/components/CardFeedback/CardFeedback.js.map +1 -1
- package/lib/module/components/CardFeedback/CardFeedback.mdx +1 -0
- package/lib/module/components/Divider/Divider.js +58 -0
- package/lib/module/components/Divider/Divider.js.map +1 -0
- package/lib/module/components/Divider/Divider.mdx +91 -0
- package/lib/module/components/ListItem/ListItem.js +24 -13
- package/lib/module/components/ListItem/ListItem.js.map +1 -1
- package/lib/module/components/ListItem/ListItem.mdx +46 -5
- package/lib/module/components/MerchantProfile/MerchantProfile.js +128 -0
- package/lib/module/components/MerchantProfile/MerchantProfile.js.map +1 -0
- package/lib/module/components/MerchantProfile/MerchantProfile.mdx +139 -0
- package/lib/module/components/MoneyValue/MoneyValue.js +36 -4
- package/lib/module/components/MoneyValue/MoneyValue.js.map +1 -1
- package/lib/module/components/MoneyValue/MoneyValue.mdx +4 -0
- package/lib/module/components/NavArrow/NavArrow.js +84 -0
- package/lib/module/components/NavArrow/NavArrow.js.map +1 -0
- package/lib/module/components/NavArrow/NavArrow.mdx +123 -0
- package/lib/module/components/Section/Section.mdx +4 -4
- package/lib/module/components/Stepper/Step.mdx +1 -1
- package/lib/module/components/index.js +4 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/design-tokens/JFS Variables-variables-full.json +18633 -1
- package/lib/module/icons/registry.js +1 -1
- package/lib/typescript/components/ActionFooter/ActionFooter.d.ts +58 -0
- package/lib/typescript/components/ActionFooter/ActionFooter.d.ts.map +1 -0
- package/lib/typescript/components/CardFeedback/CardFeedback.d.ts +4 -3
- package/lib/typescript/components/CardFeedback/CardFeedback.d.ts.map +1 -1
- package/lib/typescript/components/Divider/Divider.d.ts +50 -0
- package/lib/typescript/components/Divider/Divider.d.ts.map +1 -0
- package/lib/typescript/components/ListItem/ListItem.d.ts +4 -3
- package/lib/typescript/components/ListItem/ListItem.d.ts.map +1 -1
- package/lib/typescript/components/MerchantProfile/MerchantProfile.d.ts +68 -0
- package/lib/typescript/components/MerchantProfile/MerchantProfile.d.ts.map +1 -0
- package/lib/typescript/components/MoneyValue/MoneyValue.d.ts +9 -2
- package/lib/typescript/components/MoneyValue/MoneyValue.d.ts.map +1 -1
- package/lib/typescript/components/NavArrow/NavArrow.d.ts +35 -0
- package/lib/typescript/components/NavArrow/NavArrow.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +4 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/icons/registry.d.ts +1 -1
- package/package.json +2 -2
- package/src/components/.token-metadata.json +99 -11
- package/src/components/ActionFooter/ActionFooter.mdx +101 -0
- package/src/components/ActionFooter/ActionFooter.tsx +142 -0
- package/src/components/Button/Button.mdx +2 -2
- package/src/components/Button/Button.tsx +1 -1
- package/src/components/CardFeedback/CardFeedback.mdx +1 -0
- package/src/components/CardFeedback/CardFeedback.tsx +37 -12
- package/src/components/Divider/Divider.mdx +91 -0
- package/src/components/Divider/Divider.tsx +91 -0
- package/src/components/ListItem/ListItem.mdx +46 -5
- package/src/components/ListItem/ListItem.tsx +22 -11
- package/src/components/MerchantProfile/MerchantProfile.mdx +139 -0
- package/src/components/MerchantProfile/MerchantProfile.tsx +174 -0
- package/src/components/MoneyValue/MoneyValue.mdx +4 -0
- package/src/components/MoneyValue/MoneyValue.tsx +39 -3
- package/src/components/NavArrow/NavArrow.mdx +123 -0
- package/src/components/NavArrow/NavArrow.tsx +108 -0
- package/src/components/Section/Section.mdx +4 -4
- package/src/components/Stepper/Step.mdx +1 -1
- package/src/components/index.ts +4 -0
- package/src/design-tokens/JFS Variables-variables-full.json +18633 -1
- package/src/icons/registry.ts +1 -1
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, Platform } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* ActionFooter component that provides a fixed footer container for action buttons.
|
|
9
|
+
*
|
|
10
|
+
* This component is designed to hold action items like IconButton and Button components
|
|
11
|
+
* at the bottom of a screen. It includes a shadow for visual separation from content above.
|
|
12
|
+
*
|
|
13
|
+
* The `modes` prop is automatically passed to all slot children. If a child has its own
|
|
14
|
+
* `modes` prop, it will be merged with the parent's modes (child modes take precedence).
|
|
15
|
+
*
|
|
16
|
+
* @component
|
|
17
|
+
* @param {Object} props - Component props
|
|
18
|
+
* @param {React.ReactNode} [props.children] - Action elements to display (e.g., IconButton, Button)
|
|
19
|
+
* @param {Object} [props.modes={}] - Mode configuration for design tokens (automatically passed to children)
|
|
20
|
+
* @param {Object} [props.style] - Optional style overrides
|
|
21
|
+
* @param {string} [props.accessibilityLabel] - Accessibility label for the footer region
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* // Basic usage - modes are automatically passed to all children
|
|
26
|
+
* <ActionFooter modes={modes}>
|
|
27
|
+
* <IconButton iconName="ic_split" />
|
|
28
|
+
* <Button label="Request" style={{ flex: 1 }} />
|
|
29
|
+
* <Button label="Pay" style={{ flex: 1 }} />
|
|
30
|
+
* </ActionFooter>
|
|
31
|
+
*
|
|
32
|
+
* // Children can override with their own modes (merged with parent)
|
|
33
|
+
* <ActionFooter modes={modes}>
|
|
34
|
+
* <IconButton iconName="ic_split" />
|
|
35
|
+
* <Button label="Request" modes={{ Appearance: 'secondary' }} style={{ flex: 1 }} />
|
|
36
|
+
* <Button label="Pay" modes={{ Appearance: 'primary' }} style={{ flex: 1 }} />
|
|
37
|
+
* </ActionFooter>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
function ActionFooter({
|
|
41
|
+
children,
|
|
42
|
+
modes = {},
|
|
43
|
+
style,
|
|
44
|
+
accessibilityLabel = 'Action footer'
|
|
45
|
+
}) {
|
|
46
|
+
// Resolve design tokens
|
|
47
|
+
const backgroundColor = getVariableByName('actionFooter/background', modes) ?? '#ffffff';
|
|
48
|
+
const gap = getVariableByName('actionFooter/gap', modes) ?? 8;
|
|
49
|
+
const paddingHorizontal = getVariableByName('actionFooter/padding/horizontal', modes) ?? 16;
|
|
50
|
+
const paddingTop = getVariableByName('actionFooter/padding/top', modes) ?? 10;
|
|
51
|
+
const paddingBottom = getVariableByName('actionFooter/padding/bottom', modes) ?? 41;
|
|
52
|
+
|
|
53
|
+
// Shadow styles - cross-platform
|
|
54
|
+
const shadowStyle = Platform.select({
|
|
55
|
+
ios: {
|
|
56
|
+
shadowColor: 'rgba(12, 13, 16, 1)',
|
|
57
|
+
shadowOffset: {
|
|
58
|
+
width: 0,
|
|
59
|
+
height: -12
|
|
60
|
+
},
|
|
61
|
+
shadowOpacity: 0.16,
|
|
62
|
+
shadowRadius: 24
|
|
63
|
+
},
|
|
64
|
+
android: {
|
|
65
|
+
elevation: 16
|
|
66
|
+
},
|
|
67
|
+
default: {
|
|
68
|
+
// Web shadow using boxShadow (RNW supports this)
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
const containerStyle = {
|
|
72
|
+
backgroundColor,
|
|
73
|
+
paddingLeft: paddingHorizontal,
|
|
74
|
+
paddingRight: paddingHorizontal,
|
|
75
|
+
paddingTop,
|
|
76
|
+
paddingBottom,
|
|
77
|
+
...shadowStyle
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
// Slot container style for horizontal layout of action items
|
|
81
|
+
const slotStyle = {
|
|
82
|
+
flexDirection: 'row',
|
|
83
|
+
alignItems: 'flex-start',
|
|
84
|
+
gap,
|
|
85
|
+
flex: 1
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
// Web-specific box-shadow
|
|
89
|
+
const webShadow = Platform.OS === 'web' ? {
|
|
90
|
+
boxShadow: '0px -12px 24px 0px rgba(12, 13, 16, 0.12), 0px -16px 48px 0px rgba(12, 13, 16, 0.16)'
|
|
91
|
+
} : {};
|
|
92
|
+
|
|
93
|
+
// Pass modes prop to all slot children
|
|
94
|
+
const childrenWithModes = React.Children.map(children, child => {
|
|
95
|
+
if (/*#__PURE__*/React.isValidElement(child)) {
|
|
96
|
+
// Merge modes: child's modes take precedence over parent's modes
|
|
97
|
+
const childModes = child.props.modes;
|
|
98
|
+
const mergedModes = childModes ? {
|
|
99
|
+
...modes,
|
|
100
|
+
...childModes
|
|
101
|
+
} : modes;
|
|
102
|
+
return /*#__PURE__*/React.cloneElement(child, {
|
|
103
|
+
modes: mergedModes
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return child;
|
|
107
|
+
});
|
|
108
|
+
return /*#__PURE__*/_jsx(View, {
|
|
109
|
+
style: [containerStyle, webShadow, style],
|
|
110
|
+
accessibilityRole: "toolbar",
|
|
111
|
+
accessibilityLabel: accessibilityLabel,
|
|
112
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
113
|
+
style: slotStyle,
|
|
114
|
+
children: childrenWithModes
|
|
115
|
+
})
|
|
116
|
+
});
|
|
117
|
+
}
|
|
118
|
+
export default ActionFooter;
|
|
119
|
+
//# sourceMappingURL=ActionFooter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Platform","getVariableByName","jsx","_jsx","ActionFooter","children","modes","style","accessibilityLabel","backgroundColor","gap","paddingHorizontal","paddingTop","paddingBottom","shadowStyle","select","ios","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","android","elevation","default","containerStyle","paddingLeft","paddingRight","slotStyle","flexDirection","alignItems","flex","webShadow","OS","boxShadow","childrenWithModes","Children","map","child","isValidElement","childModes","props","mergedModes","cloneElement","accessibilityRole"],"sourceRoot":"../../../../src","sources":["components/ActionFooter/ActionFooter.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EAGJC,QAAQ,QACH,cAAc;AACrB,SAASC,iBAAiB,QAAQ,8CAA8C;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAuBhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,YAAYA,CAAC;EACpBC,QAAQ;EACRC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC,kBAAkB,GAAG;AACJ,CAAC,EAAE;EACpB;EACA,MAAMC,eAAe,GAAGR,iBAAiB,CAAC,yBAAyB,EAAEK,KAAK,CAAC,IAAI,SAAS;EACxF,MAAMI,GAAG,GAAGT,iBAAiB,CAAC,kBAAkB,EAAEK,KAAK,CAAC,IAAI,CAAC;EAC7D,MAAMK,iBAAiB,GAAGV,iBAAiB,CAAC,iCAAiC,EAAEK,KAAK,CAAC,IAAI,EAAE;EAC3F,MAAMM,UAAU,GAAGX,iBAAiB,CAAC,0BAA0B,EAAEK,KAAK,CAAC,IAAI,EAAE;EAC7E,MAAMO,aAAa,GAAGZ,iBAAiB,CAAC,6BAA6B,EAAEK,KAAK,CAAC,IAAI,EAAE;;EAEnF;EACA,MAAMQ,WAAsB,GAAGd,QAAQ,CAACe,MAAM,CAAC;IAC7CC,GAAG,EAAE;MACHC,WAAW,EAAE,qBAAqB;MAClCC,YAAY,EAAE;QAAEC,KAAK,EAAE,CAAC;QAAEC,MAAM,EAAE,CAAC;MAAG,CAAC;MACvCC,aAAa,EAAE,IAAI;MACnBC,YAAY,EAAE;IAChB,CAAC;IACDC,OAAO,EAAE;MACPC,SAAS,EAAE;IACb,C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oreList":[]}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as ActionFooterStories from './ActionFooter.stories';
|
|
3
|
+
import ActionFooter from './ActionFooter';
|
|
4
|
+
|
|
5
|
+
<Meta of={ActionFooterStories} />
|
|
6
|
+
|
|
7
|
+
# ActionFooter
|
|
8
|
+
|
|
9
|
+
A fixed footer container for action buttons. Typically used at the bottom of screens to hold primary actions like `IconButton` and `Button` components.
|
|
10
|
+
|
|
11
|
+
The ActionFooter provides consistent spacing, padding, and shadow styling for action areas at the bottom of your UI.
|
|
12
|
+
|
|
13
|
+
## Props
|
|
14
|
+
|
|
15
|
+
<ArgsTable of={ActionFooter} />
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
## Available Collections and Modes
|
|
19
|
+
|
|
20
|
+
This component does not use any design token collections with multiple modes.
|
|
21
|
+
## Usage
|
|
22
|
+
|
|
23
|
+
The default configuration shows the typical use case with an IconButton and two Button components:
|
|
24
|
+
|
|
25
|
+
<Canvas>
|
|
26
|
+
<Story of={ActionFooterStories.Default} />
|
|
27
|
+
</Canvas>
|
|
28
|
+
|
|
29
|
+
## Examples
|
|
30
|
+
|
|
31
|
+
### Single Button
|
|
32
|
+
|
|
33
|
+
For simple confirmation flows, use a single full-width button:
|
|
34
|
+
|
|
35
|
+
<Canvas>
|
|
36
|
+
<Story of={ActionFooterStories.SingleButton} />
|
|
37
|
+
</Canvas>
|
|
38
|
+
|
|
39
|
+
### Two Buttons
|
|
40
|
+
|
|
41
|
+
Common pattern for cancel/confirm actions:
|
|
42
|
+
|
|
43
|
+
<Canvas>
|
|
44
|
+
<Story of={ActionFooterStories.TwoButtons} />
|
|
45
|
+
</Canvas>
|
|
46
|
+
|
|
47
|
+
### With Multiple Icon Buttons
|
|
48
|
+
|
|
49
|
+
For screens requiring multiple secondary actions alongside a primary button:
|
|
50
|
+
|
|
51
|
+
<Canvas>
|
|
52
|
+
<Story of={ActionFooterStories.WithMultipleIconButtons} />
|
|
53
|
+
</Canvas>
|
|
54
|
+
|
|
55
|
+
## Component Usage
|
|
56
|
+
|
|
57
|
+
```tsx
|
|
58
|
+
import { ActionFooter, IconButton, Button } from 'jsf-components';
|
|
59
|
+
|
|
60
|
+
function PaymentScreen() {
|
|
61
|
+
const modes = {};
|
|
62
|
+
const secondaryModes = { Appearance: 'secondary' };
|
|
63
|
+
const primaryModes = { Appearance: 'primary' };
|
|
64
|
+
|
|
65
|
+
return (
|
|
66
|
+
<View style={{ flex: 1 }}>
|
|
67
|
+
{/* Screen content */}
|
|
68
|
+
|
|
69
|
+
<ActionFooter modes={modes}>
|
|
70
|
+
<IconButton iconName="ic_split" modes={modes} />
|
|
71
|
+
<Button
|
|
72
|
+
label="Request"
|
|
73
|
+
modes={secondaryModes}
|
|
74
|
+
style={{ flex: 1 }}
|
|
75
|
+
/>
|
|
76
|
+
<Button
|
|
77
|
+
label="Pay"
|
|
78
|
+
modes={primaryModes}
|
|
79
|
+
style={{ flex: 1 }}
|
|
80
|
+
/>
|
|
81
|
+
</ActionFooter>
|
|
82
|
+
</View>
|
|
83
|
+
);
|
|
84
|
+
}
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Design Tokens
|
|
88
|
+
|
|
89
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
90
|
+
|
|
91
|
+
- **`actionFooter/background`**
|
|
92
|
+
- **`actionFooter/gap`**
|
|
93
|
+
- **`actionFooter/padding/bottom`**
|
|
94
|
+
- **`actionFooter/padding/horizontal`**
|
|
95
|
+
- **`actionFooter/padding/top`**
|
|
96
|
+
|
|
97
|
+
All tokens support mode-based theming through the `modes` prop.
|
|
98
|
+
## Accessibility
|
|
99
|
+
|
|
100
|
+
The ActionFooter uses `accessibilityRole="toolbar"` to indicate it contains a group of action controls. Provide a meaningful `accessibilityLabel` to describe the footer's purpose to screen reader users.
|
|
101
|
+
|
|
@@ -54,7 +54,7 @@ function Button({
|
|
|
54
54
|
const fontWeight = typeof fontWeightValue === 'number' ? fontWeightValue.toString() : fontWeightValue;
|
|
55
55
|
const lineHeight = getVariableByName('button/lineHeight', modes) || 19;
|
|
56
56
|
const fontSize = getVariableByName('button/fontSize', modes) || 16;
|
|
57
|
-
const textColor = getVariableByName('button/
|
|
57
|
+
const textColor = getVariableByName('button/foreground', modes) || '#0f0d0a';
|
|
58
58
|
const baseLabelTextStyle = {
|
|
59
59
|
color: textColor,
|
|
60
60
|
fontFamily,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","useState","Pressable","Text","View","getVariableByName","usePressableWebSupport","jsx","_jsx","jsxs","_jsxs","Button","label","children","renderContent","leading","trailing","modes","onPress","disabled","style","labelStyle","accessibilityLabel","accessibilityHint","accessibilityState","webAccessibilityProps","rest","backgroundColor","borderColor","borderWidth","radius","paddingHorizontal","paddingVertical","gap","fontFamily","fontWeightValue","fontWeight","toString","lineHeight","fontSize","textColor","baseLabelTextStyle","color","mergedLabelTextStyle","content","undefined","numberOfLines","containerBaseStyle","flexDirection","alignItems","justifyContent","borderRadius","opacity","accessoryOffset","leadingAccessoryStyle","marginRight","trailingAccessoryStyle","marginLeft","defaultAccessibilityLabel","webProps","restProps","isFocused","setIsFocused","isHovered","setIsHovered","pressedStyle","transform","scale","focusStyle","hoverStyle","__DEV__","console","warn","accessibilityRole","onPressIn","e","onPressOut","onFocus","onBlur","onHoverIn","onHoverOut","pressed"],"sourceRoot":"../../../../src","sources":["components/Button/Button.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAChD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAiF,cAAc;AAC7H,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,sBAAsB,QAA6D,gCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAsC5H;A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,GAAGjC,iBAAiB,CAAC,mBAAmB,EAAEY,KAAK,CAAC,IAAI,EAAE;EACtE,MAAMsB,QAAQ,GAAGlC,iBAAiB,CAAC,iBAAiB,EAAEY,KAAK,CAAC,IAAI,EAAE;EAClE,MAAMuB,SAAS,GAAGnC,iBAAiB,CAAC,
|
|
1
|
+
{"version":3,"names":["React","useMemo","useState","Pressable","Text","View","getVariableByName","usePressableWebSupport","jsx","_jsx","jsxs","_jsxs","Button","label","children","renderContent","leading","trailing","modes","onPress","disabled","style","labelStyle","accessibilityLabel","accessibilityHint","accessibilityState","webAccessibilityProps","rest","backgroundColor","borderColor","borderWidth","radius","paddingHorizontal","paddingVertical","gap","fontFamily","fontWeightValue","fontWeight","toString","lineHeight","fontSize","textColor","baseLabelTextStyle","color","mergedLabelTextStyle","content","undefined","numberOfLines","containerBaseStyle","flexDirection","alignItems","justifyContent","borderRadius","opacity","accessoryOffset","leadingAccessoryStyle","marginRight","trailingAccessoryStyle","marginLeft","defaultAccessibilityLabel","webProps","restProps","isFocused","setIsFocused","isHovered","setIsHovered","pressedStyle","transform","scale","focusStyle","hoverStyle","__DEV__","console","warn","accessibilityRole","onPressIn","e","onPressOut","onFocus","onBlur","onHoverIn","onHoverOut","pressed"],"sourceRoot":"../../../../src","sources":["components/Button/Button.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAChD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAiF,cAAc;AAC7H,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,SAASC,sBAAsB,QAA6D,gCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAsC5H;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,MAAMA,CAAC;EACdC,KAAK,GAAG,QAAQ;EAChBC,QAAQ;EACRC,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AACJ,IAAI;MAACgB,KAAK,EAAEkC,qBAAsB;MAAAzC,QAAA,EAChCE;IAAO,CACJ,CAAC,GACL,IAAI,EACP6B,OAAO,EACP5B,QAAQ,gBACPR,IAAA,CAACJ,IAAI;MAACgB,KAAK,EAAEoC,sBAAuB;MAAA3C,QAAA,EACjCG;IAAQ,CACL,CAAC,GACL,IAAI;EAAA,CACC,CAAC;AAEhB;AAEA,eAAeL,MAAM","ignoreList":[]}
|
|
@@ -34,7 +34,7 @@ This component uses the following design token collections. Each collection supp
|
|
|
34
34
|
- **Default:** positive
|
|
35
35
|
|
|
36
36
|
### Context
|
|
37
|
-
- **Modes:** Default | Nudge&Alert
|
|
37
|
+
- **Modes:** Default | Nudge&Alert | CTACard | ListItem
|
|
38
38
|
- **Default:** Default
|
|
39
39
|
|
|
40
40
|
### Button / Size
|
|
@@ -90,7 +90,7 @@ This component uses the following design tokens, resolved through `getVariableBy
|
|
|
90
90
|
- **`button/fontFamily`**
|
|
91
91
|
- **`button/fontSize`**
|
|
92
92
|
- **`button/fontWeight`**
|
|
93
|
-
- **`button/
|
|
93
|
+
- **`button/foreground`**
|
|
94
94
|
- **`button/gap`**
|
|
95
95
|
- **`button/lineHeight`**
|
|
96
96
|
- **`button/padding/horizontal`**
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
import React, { createContext, useContext, isValidElement, cloneElement } from 'react';
|
|
4
4
|
import { View, Text } from 'react-native';
|
|
5
5
|
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import IconComponent from '../../icons/Icon';
|
|
6
7
|
|
|
7
8
|
/**
|
|
8
9
|
* Context to share 'modes' with child components.
|
|
@@ -16,9 +17,15 @@ const CardFeedbackContext = /*#__PURE__*/createContext({});
|
|
|
16
17
|
*/
|
|
17
18
|
export function CardFeedback({
|
|
18
19
|
children,
|
|
19
|
-
modes
|
|
20
|
+
modes: propModes,
|
|
20
21
|
style
|
|
21
22
|
}) {
|
|
23
|
+
const modes = {
|
|
24
|
+
'Appearance.System': 'positive',
|
|
25
|
+
'Context': 'Nudge&Alert',
|
|
26
|
+
'Semantic Intent': 'System',
|
|
27
|
+
...propModes
|
|
28
|
+
};
|
|
22
29
|
// Container Tokens
|
|
23
30
|
const backgroundColor = getVariableByName('cardFeedback/background', modes) || '#dbf0d9';
|
|
24
31
|
const radius = parseFloat(getVariableByName('cardFeedback/radius', modes) || '12');
|
|
@@ -53,19 +60,20 @@ export function CardFeedback({
|
|
|
53
60
|
|
|
54
61
|
/**
|
|
55
62
|
* Icon Wrapper
|
|
56
|
-
* Tokens: cardFeedback/icon/size, cardFeedback/icon/color
|
|
63
|
+
* Tokens: cardFeedback/icon/size, appearanceFeedback/cardFeedback/icon/color
|
|
57
64
|
*/
|
|
58
65
|
export function Icon({
|
|
59
66
|
children,
|
|
60
67
|
style,
|
|
61
|
-
modes: propModes
|
|
68
|
+
modes: propModes,
|
|
69
|
+
icon
|
|
62
70
|
}) {
|
|
63
71
|
const context = useContext(CardFeedbackContext);
|
|
64
72
|
const modes = propModes || context.modes || {};
|
|
65
73
|
const size = parseFloat(getVariableByName('cardFeedback/icon/size', modes) || '20');
|
|
66
|
-
// Color
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
// Color for the icon itself
|
|
75
|
+
const color = getVariableByName('appearanceFeedback/cardFeedback/icon/color', modes);
|
|
76
|
+
console.log(color);
|
|
69
77
|
const containerStyle = {
|
|
70
78
|
width: size,
|
|
71
79
|
height: size,
|
|
@@ -74,11 +82,25 @@ export function Icon({
|
|
|
74
82
|
overflow: 'hidden'
|
|
75
83
|
};
|
|
76
84
|
|
|
77
|
-
//
|
|
78
|
-
|
|
85
|
+
// Pass modes to children (e.g., icon components that accept modes)
|
|
86
|
+
const childrenWithModes = React.Children.map(children, child => {
|
|
87
|
+
if (/*#__PURE__*/isValidElement(child)) {
|
|
88
|
+
return /*#__PURE__*/cloneElement(child, {
|
|
89
|
+
modes: {
|
|
90
|
+
...child.props.modes,
|
|
91
|
+
...modes
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return child;
|
|
96
|
+
});
|
|
79
97
|
return /*#__PURE__*/_jsx(View, {
|
|
80
98
|
style: [containerStyle, style],
|
|
81
|
-
children:
|
|
99
|
+
children: icon ? /*#__PURE__*/_jsx(IconComponent, {
|
|
100
|
+
name: icon,
|
|
101
|
+
size: size,
|
|
102
|
+
color: color
|
|
103
|
+
}) : childrenWithModes
|
|
82
104
|
});
|
|
83
105
|
}
|
|
84
106
|
|
|
@@ -95,12 +117,25 @@ export function Content({
|
|
|
95
117
|
const context = useContext(CardFeedbackContext);
|
|
96
118
|
const modes = propModes || context.modes || {};
|
|
97
119
|
const gap = parseFloat(getVariableByName('cardFeedback/text/gap', modes) || '8');
|
|
120
|
+
|
|
121
|
+
// Pass modes to children (Title, Body, etc.)
|
|
122
|
+
const childrenWithModes = React.Children.map(children, child => {
|
|
123
|
+
if (/*#__PURE__*/isValidElement(child)) {
|
|
124
|
+
return /*#__PURE__*/cloneElement(child, {
|
|
125
|
+
modes: {
|
|
126
|
+
...child.props.modes,
|
|
127
|
+
...modes
|
|
128
|
+
}
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
return child;
|
|
132
|
+
});
|
|
98
133
|
return /*#__PURE__*/_jsx(View, {
|
|
99
134
|
style: [{
|
|
100
135
|
gap,
|
|
101
136
|
width: '100%'
|
|
102
137
|
}, style],
|
|
103
|
-
children:
|
|
138
|
+
children: childrenWithModes
|
|
104
139
|
});
|
|
105
140
|
}
|
|
106
141
|
|
|
@@ -173,7 +208,7 @@ export function Action({
|
|
|
173
208
|
}) {
|
|
174
209
|
const context = useContext(CardFeedbackContext);
|
|
175
210
|
const modes = propModes || context.modes || {};
|
|
176
|
-
const gap = parseFloat(getVariableByName('cardFeedback/actionSlot/gap', modes) || '
|
|
211
|
+
const gap = parseFloat(getVariableByName('cardFeedback/actionSlot/gap', modes) || '0');
|
|
177
212
|
|
|
178
213
|
// "Maximise existing component usage" -> Pass modes to children (Buttons)
|
|
179
214
|
const childrenWithModes = React.Children.map(children, child => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","useContext","isValidElement","cloneElement","View","Text","getVariableByName","jsx","_jsx","CardFeedbackContext","CardFeedback","children","modes","style","backgroundColor","radius","parseFloat","gap","paddingHorizontal","paddingVertical","containerStyle","borderRadius","minHeight","alignItems","flexDirection","Provider","value","Icon","
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","isValidElement","cloneElement","View","Text","getVariableByName","IconComponent","jsx","_jsx","CardFeedbackContext","CardFeedback","children","modes","propModes","style","backgroundColor","radius","parseFloat","gap","paddingHorizontal","paddingVertical","containerStyle","borderRadius","minHeight","alignItems","flexDirection","Provider","value","Icon","icon","context","size","color","console","log","width","height","justifyContent","overflow","childrenWithModes","Children","map","child","props","name","Content","Title","fontSize","fontFamily","lineHeight","fontWeight","textStyle","Body","Action","flexWrap"],"sourceRoot":"../../../../src","sources":["components/CardFeedback/CardFeedback.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,cAAc,EAAEC,YAAY,QAAQ,OAAO;AACtF,SAASC,IAAI,EAAEC,IAAI,QAA2E,cAAc;AAC5G,SAASC,iBAAiB,QAAQ,8CAA8C;AAChF,OAAOC,aAAa,MAAM,kBAAkB;;AAE5C;AACA;AACA;AAFA,SAAAC,GAAA,IAAAC,IAAA;AAGA,MAAMC,mBAAmB,gBAAGV,aAAa,CAAkC,CAAC,CAAC,CAAC;AAiB9E;AACA;AACA;AACA;AACA;AACA,OAAO,SAASW,YAAYA,CAAC;EACzBC,QAAQ;EACRC,KAAK,EAAEC,SAAS;EAChBC;AACe,CAAC,EAAE;EAClB,MAAMF,KAAK,GAAG;IACV,mBAAmB,EAAE,UAAU;IAC/B,SAAS,EAAE,aAAa;IACxB,iBAAiB,EAAE,QAAQ;IAC3B,GAAGC;EACP,CAAC;EACD;EACA,MAAME,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
|
|
|
62
62
|
|
|
63
63
|
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
64
64
|
|
|
65
|
+
- **`appearanceFeedback/cardFeedback/icon/color`**
|
|
65
66
|
- **`cardFeedback/actionSlot/gap`**
|
|
66
67
|
- **`cardFeedback/background`**
|
|
67
68
|
- **`cardFeedback/body/color`**
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View } from 'react-native';
|
|
5
|
+
import { getVariableByName } from '../../design-tokens/figma-variables-resolver';
|
|
6
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
7
|
+
/**
|
|
8
|
+
* Divider component that renders a horizontal or vertical separator line.
|
|
9
|
+
*
|
|
10
|
+
* This component is used to visually separate content sections. It supports
|
|
11
|
+
* both horizontal and vertical orientations based on the `direction` prop.
|
|
12
|
+
*
|
|
13
|
+
* @component
|
|
14
|
+
* @param {Object} props - Component props
|
|
15
|
+
* @param {'horizontal' | 'vertical'} [props.direction='horizontal'] - Direction of the divider
|
|
16
|
+
* @param {Object} [props.modes={}] - Mode configuration for design tokens
|
|
17
|
+
* @param {Object} [props.style] - Optional style overrides
|
|
18
|
+
* @param {string} [props.accessibilityLabel] - Accessibility label for the divider
|
|
19
|
+
*
|
|
20
|
+
* @example
|
|
21
|
+
* ```tsx
|
|
22
|
+
* // Horizontal divider (default)
|
|
23
|
+
* <Divider />
|
|
24
|
+
*
|
|
25
|
+
* // Vertical divider
|
|
26
|
+
* <Divider direction="vertical" />
|
|
27
|
+
*
|
|
28
|
+
* // With custom modes
|
|
29
|
+
* <Divider modes={{ Appearance: 'dark' }} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
function Divider({
|
|
33
|
+
direction = 'horizontal',
|
|
34
|
+
modes = {},
|
|
35
|
+
style,
|
|
36
|
+
accessibilityLabel = 'Divider'
|
|
37
|
+
}) {
|
|
38
|
+
// Resolve design tokens
|
|
39
|
+
const size = getVariableByName('divider/size', modes) ?? 1;
|
|
40
|
+
const color = getVariableByName('divider/color', modes) ?? '#1a1c1f';
|
|
41
|
+
const isVertical = direction === 'vertical';
|
|
42
|
+
const dividerStyle = isVertical ? {
|
|
43
|
+
width: size,
|
|
44
|
+
backgroundColor: color,
|
|
45
|
+
alignSelf: 'stretch'
|
|
46
|
+
} : {
|
|
47
|
+
height: size,
|
|
48
|
+
backgroundColor: color,
|
|
49
|
+
alignSelf: 'stretch'
|
|
50
|
+
};
|
|
51
|
+
return /*#__PURE__*/_jsx(View, {
|
|
52
|
+
style: [dividerStyle, style],
|
|
53
|
+
accessibilityRole: "none",
|
|
54
|
+
accessibilityLabel: accessibilityLabel
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export default Divider;
|
|
58
|
+
//# sourceMappingURL=Divider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","getVariableByName","jsx","_jsx","Divider","direction","modes","style","accessibilityLabel","size","color","isVertical","dividerStyle","width","backgroundColor","alignSelf","height","accessibilityRole"],"sourceRoot":"../../../../src","sources":["components/Divider/Divider.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,QAGC,cAAc;AACrB,SAASC,iBAAiB,QAAQ,8CAA8C;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAyBhF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,OAAOA,CAAC;EACfC,SAAS,GAAG,YAAY;EACxBC,KAAK,GAAG,CAAC,CAAC;EACVC,KAAK;EACLC,kBAAkB,GAAG;AACT,CAAC,EAAE;EACf;EACA,MAAMC,IAAI,GAAGR,iBAAiB,CAAC,cAAc,EAAEK,KAAK,CAAC,IAAI,CAAC;EAC1D,MAAMI,KAAK,GAAGT,iBAAiB,CAAC,eAAe,EAAEK,KAAK,CAAC,IAAI,SAAS;EAEpE,MAAMK,UAAU,GAAGN,SAAS,KAAK,UAAU;EAE3C,MAAMO,YAAuB,GAAGD,UAAU,GACtC;IACEE,KAAK,EAAEJ,IAAI;IACXK,eAAe,EAAEJ,KAAK;IACtBK,SAAS,EAAE;EACb,CAAC,GACD;IACEC,MAAM,EAAEP,IAAI;IACZK,eAAe,EAAEJ,KAAK;IACtBK,SAAS,EAAE;EACb,CAAC;EAEL,oBACEZ,IAAA,CAACH,IAAI;IACHO,KAAK,EAAE,CAACK,YAAY,EAAEL,KAAK,CAAE;IAC7BU,iBAAiB,EAAC,MAAM;IACxBT,kBAAkB,EAAEA;EAAmB,CACxC,CAAC;AAEN;AAEA,eAAeJ,OAAO","ignoreList":[]}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { Meta, Story, Canvas, PureArgsTable as ArgsTable } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as DividerStories from './Divider.stories';
|
|
3
|
+
import Divider from './Divider';
|
|
4
|
+
|
|
5
|
+
<Meta of={DividerStories} />
|
|
6
|
+
|
|
7
|
+
# Divider
|
|
8
|
+
|
|
9
|
+
A simple divider component that renders a horizontal or vertical separator line. Uses design tokens for consistent sizing and color.
|
|
10
|
+
|
|
11
|
+
## Props
|
|
12
|
+
|
|
13
|
+
<ArgsTable of={Divider} />
|
|
14
|
+
|
|
15
|
+
## Available Collections and Modes
|
|
16
|
+
|
|
17
|
+
This component uses the following design token collections. Each collection supports multiple modes that can be configured via the `modes` prop.
|
|
18
|
+
|
|
19
|
+
### Color Mode
|
|
20
|
+
- **Modes:** Light | Dark
|
|
21
|
+
- **Default:** Light
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
### Horizontal Divider
|
|
25
|
+
|
|
26
|
+
The default horizontal divider stretches to fill its container width:
|
|
27
|
+
|
|
28
|
+
<Canvas>
|
|
29
|
+
<Story of={DividerStories.Horizontal} />
|
|
30
|
+
</Canvas>
|
|
31
|
+
|
|
32
|
+
### Vertical Divider
|
|
33
|
+
|
|
34
|
+
Vertical dividers stretch to fill their container height:
|
|
35
|
+
|
|
36
|
+
<Canvas>
|
|
37
|
+
<Story of={DividerStories.Vertical} />
|
|
38
|
+
</Canvas>
|
|
39
|
+
|
|
40
|
+
### In Content Layout
|
|
41
|
+
|
|
42
|
+
Use horizontal dividers to separate content sections:
|
|
43
|
+
|
|
44
|
+
<Canvas>
|
|
45
|
+
<Story of={DividerStories.InContentLayout} />
|
|
46
|
+
</Canvas>
|
|
47
|
+
|
|
48
|
+
### In Row Layout
|
|
49
|
+
|
|
50
|
+
Use vertical dividers to separate items in a horizontal row:
|
|
51
|
+
|
|
52
|
+
<Canvas>
|
|
53
|
+
<Story of={DividerStories.InRowLayout} />
|
|
54
|
+
</Canvas>
|
|
55
|
+
|
|
56
|
+
## Component Usage
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
import { Divider } from 'jsf-components';
|
|
60
|
+
|
|
61
|
+
// Horizontal divider (default)
|
|
62
|
+
<Divider />
|
|
63
|
+
|
|
64
|
+
// Vertical divider
|
|
65
|
+
<Divider direction="vertical" />
|
|
66
|
+
|
|
67
|
+
// In a vertical layout
|
|
68
|
+
<View>
|
|
69
|
+
<Text>Section 1</Text>
|
|
70
|
+
<Divider />
|
|
71
|
+
<Text>Section 2</Text>
|
|
72
|
+
</View>
|
|
73
|
+
|
|
74
|
+
// In a horizontal layout
|
|
75
|
+
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
76
|
+
<Text>Item 1</Text>
|
|
77
|
+
<View style={{ marginHorizontal: 8 }}>
|
|
78
|
+
<Divider direction="vertical" />
|
|
79
|
+
</View>
|
|
80
|
+
<Text>Item 2</Text>
|
|
81
|
+
</View>
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## Design Tokens
|
|
85
|
+
|
|
86
|
+
This component uses the following design tokens, resolved through `getVariableByName`:
|
|
87
|
+
|
|
88
|
+
- **`divider/color`**
|
|
89
|
+
- **`divider/size`**
|
|
90
|
+
|
|
91
|
+
All tokens support mode-based theming through the `modes` prop.
|