@cdx-ui/components 0.0.1-beta.4 → 0.0.1-beta.6
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/README.md +1 -1
- package/lib/commonjs/components/Card/styles.js +4 -5
- package/lib/commonjs/components/Card/styles.js.map +1 -1
- package/lib/commonjs/components/ListItem/index.js +283 -0
- package/lib/commonjs/components/ListItem/index.js.map +1 -0
- package/lib/commonjs/components/ListItem/styles.js +130 -0
- package/lib/commonjs/components/ListItem/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +12 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/module/components/Card/styles.js +4 -5
- package/lib/module/components/Card/styles.js.map +1 -1
- package/lib/module/components/ListItem/index.js +226 -0
- package/lib/module/components/ListItem/index.js.map +1 -0
- package/lib/module/components/ListItem/styles.js +127 -0
- package/lib/module/components/ListItem/styles.js.map +1 -0
- package/lib/module/components/index.js +1 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/typescript/components/Card/styles.d.ts.map +1 -1
- package/lib/typescript/components/ListItem/index.d.ts +49 -0
- package/lib/typescript/components/ListItem/index.d.ts.map +1 -0
- package/lib/typescript/components/ListItem/styles.d.ts +30 -0
- package/lib/typescript/components/ListItem/styles.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +1 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/components/Card/styles.ts +8 -15
- package/src/components/ListItem/index.tsx +285 -0
- package/src/components/ListItem/styles.ts +160 -0
- package/src/components/index.ts +1 -0
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { forwardRef } from 'react';
|
|
4
|
+
import { Pressable, Text, View } from 'react-native';
|
|
5
|
+
import { createListItem } from '@cdx-ui/primitives';
|
|
6
|
+
import { cn, useStyleContext, withStyleContext } from '@cdx-ui/utils';
|
|
7
|
+
import { listItemContentVariants, listItemDescriptionVariants, listItemLeadingSlotVariants, listItemMetaVariants, listItemRootVariants, listItemSectionHeaderLabelVariants, listItemSectionHeaderVariants, listItemTitleVariants, listItemTrailingSlotVariants } from './styles';
|
|
8
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
9
|
+
const SCOPE = 'LIST_ITEM';
|
|
10
|
+
const RootView = withStyleContext(View, SCOPE);
|
|
11
|
+
const RootPressable = withStyleContext(Pressable, SCOPE);
|
|
12
|
+
const ListItemPrimitive = createListItem({
|
|
13
|
+
View: RootView,
|
|
14
|
+
Pressable: RootPressable,
|
|
15
|
+
LeadingSlot: View,
|
|
16
|
+
Content: View,
|
|
17
|
+
Title: Text,
|
|
18
|
+
Description: Text,
|
|
19
|
+
Meta: Text,
|
|
20
|
+
TrailingSlot: View,
|
|
21
|
+
SectionHeader: View
|
|
22
|
+
});
|
|
23
|
+
const useListItemStyleContext = () => {
|
|
24
|
+
const ctx = useStyleContext(SCOPE);
|
|
25
|
+
return {
|
|
26
|
+
size: ctx?.size ?? 'default',
|
|
27
|
+
crossAlign: ctx?.crossAlign ?? 'center'
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
// =============================================================================
|
|
32
|
+
// ROOT
|
|
33
|
+
// =============================================================================
|
|
34
|
+
|
|
35
|
+
const ListItemRoot = /*#__PURE__*/forwardRef(({
|
|
36
|
+
size = 'default',
|
|
37
|
+
surface = 'default',
|
|
38
|
+
showSeparator = true,
|
|
39
|
+
crossAlign = 'center',
|
|
40
|
+
className,
|
|
41
|
+
style,
|
|
42
|
+
...props
|
|
43
|
+
}, ref) => {
|
|
44
|
+
const computedClassName = cn(listItemRootVariants({
|
|
45
|
+
size,
|
|
46
|
+
surface,
|
|
47
|
+
showSeparator,
|
|
48
|
+
crossAlign
|
|
49
|
+
}), className);
|
|
50
|
+
return /*#__PURE__*/_jsx(ListItemPrimitive, {
|
|
51
|
+
ref: ref,
|
|
52
|
+
className: computedClassName,
|
|
53
|
+
context: {
|
|
54
|
+
size,
|
|
55
|
+
surface,
|
|
56
|
+
showSeparator,
|
|
57
|
+
crossAlign
|
|
58
|
+
},
|
|
59
|
+
crossAlign: crossAlign,
|
|
60
|
+
showSeparator: showSeparator,
|
|
61
|
+
size: size,
|
|
62
|
+
style: style,
|
|
63
|
+
surface: surface,
|
|
64
|
+
...props
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
ListItemRoot.displayName = 'ListItem';
|
|
68
|
+
|
|
69
|
+
// =============================================================================
|
|
70
|
+
// SLOTS & TEXT
|
|
71
|
+
// =============================================================================
|
|
72
|
+
|
|
73
|
+
const ListItemLeadingSlot = /*#__PURE__*/forwardRef(({
|
|
74
|
+
className,
|
|
75
|
+
style,
|
|
76
|
+
...props
|
|
77
|
+
}, ref) => /*#__PURE__*/_jsx(ListItemPrimitive.LeadingSlot, {
|
|
78
|
+
ref: ref,
|
|
79
|
+
className: cn(listItemLeadingSlotVariants(), className),
|
|
80
|
+
style: style,
|
|
81
|
+
...props
|
|
82
|
+
}));
|
|
83
|
+
ListItemLeadingSlot.displayName = 'ListItem.LeadingSlot';
|
|
84
|
+
const ListItemContent = /*#__PURE__*/forwardRef(({
|
|
85
|
+
className,
|
|
86
|
+
style,
|
|
87
|
+
...props
|
|
88
|
+
}, ref) => {
|
|
89
|
+
const {
|
|
90
|
+
crossAlign
|
|
91
|
+
} = useListItemStyleContext();
|
|
92
|
+
return /*#__PURE__*/_jsx(ListItemPrimitive.Content, {
|
|
93
|
+
ref: ref,
|
|
94
|
+
className: cn(listItemContentVariants({
|
|
95
|
+
crossAlign
|
|
96
|
+
}), className),
|
|
97
|
+
style: style,
|
|
98
|
+
...props
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
ListItemContent.displayName = 'ListItem.Content';
|
|
102
|
+
const ListItemTitle = /*#__PURE__*/forwardRef(({
|
|
103
|
+
className,
|
|
104
|
+
numberOfLines = 1,
|
|
105
|
+
style,
|
|
106
|
+
...props
|
|
107
|
+
}, ref) => {
|
|
108
|
+
const {
|
|
109
|
+
size
|
|
110
|
+
} = useListItemStyleContext();
|
|
111
|
+
return /*#__PURE__*/_jsx(ListItemPrimitive.Title, {
|
|
112
|
+
ref: ref,
|
|
113
|
+
className: cn(listItemTitleVariants({
|
|
114
|
+
size
|
|
115
|
+
}), className),
|
|
116
|
+
numberOfLines: numberOfLines,
|
|
117
|
+
style: style,
|
|
118
|
+
...props
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
ListItemTitle.displayName = 'ListItem.Title';
|
|
122
|
+
const ListItemDescription = /*#__PURE__*/forwardRef(({
|
|
123
|
+
className,
|
|
124
|
+
style,
|
|
125
|
+
...props
|
|
126
|
+
}, ref) => {
|
|
127
|
+
const {
|
|
128
|
+
size
|
|
129
|
+
} = useListItemStyleContext();
|
|
130
|
+
return /*#__PURE__*/_jsx(ListItemPrimitive.Description, {
|
|
131
|
+
ref: ref,
|
|
132
|
+
className: cn(listItemDescriptionVariants({
|
|
133
|
+
size
|
|
134
|
+
}), className),
|
|
135
|
+
style: style,
|
|
136
|
+
...props
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
ListItemDescription.displayName = 'ListItem.Description';
|
|
140
|
+
const ListItemMeta = /*#__PURE__*/forwardRef(({
|
|
141
|
+
className,
|
|
142
|
+
numberOfLines = 1,
|
|
143
|
+
style,
|
|
144
|
+
...props
|
|
145
|
+
}, ref) => {
|
|
146
|
+
const {
|
|
147
|
+
size
|
|
148
|
+
} = useListItemStyleContext();
|
|
149
|
+
return /*#__PURE__*/_jsx(ListItemPrimitive.Meta, {
|
|
150
|
+
ref: ref,
|
|
151
|
+
className: cn(listItemMetaVariants({
|
|
152
|
+
size
|
|
153
|
+
}), className),
|
|
154
|
+
numberOfLines: numberOfLines,
|
|
155
|
+
style: style,
|
|
156
|
+
...props
|
|
157
|
+
});
|
|
158
|
+
});
|
|
159
|
+
ListItemMeta.displayName = 'ListItem.Meta';
|
|
160
|
+
const ListItemTrailingSlot = /*#__PURE__*/forwardRef(({
|
|
161
|
+
className,
|
|
162
|
+
style,
|
|
163
|
+
...props
|
|
164
|
+
}, ref) => {
|
|
165
|
+
const {
|
|
166
|
+
crossAlign
|
|
167
|
+
} = useListItemStyleContext();
|
|
168
|
+
return /*#__PURE__*/_jsx(ListItemPrimitive.TrailingSlot, {
|
|
169
|
+
ref: ref,
|
|
170
|
+
className: cn(listItemTrailingSlotVariants({
|
|
171
|
+
crossAlign
|
|
172
|
+
}), className),
|
|
173
|
+
style: style,
|
|
174
|
+
...props
|
|
175
|
+
});
|
|
176
|
+
});
|
|
177
|
+
ListItemTrailingSlot.displayName = 'ListItem.TrailingSlot';
|
|
178
|
+
const wrapSectionHeaderLabel = children => {
|
|
179
|
+
if (typeof children === 'string' || typeof children === 'number') {
|
|
180
|
+
return /*#__PURE__*/_jsx(Text, {
|
|
181
|
+
className: cn(listItemSectionHeaderLabelVariants()),
|
|
182
|
+
children: children
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
return children;
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
// =============================================================================
|
|
189
|
+
// SECTION HEADER
|
|
190
|
+
// =============================================================================
|
|
191
|
+
|
|
192
|
+
const ListItemSectionHeader = /*#__PURE__*/forwardRef(({
|
|
193
|
+
children,
|
|
194
|
+
className,
|
|
195
|
+
showDivider = true,
|
|
196
|
+
style,
|
|
197
|
+
trailing,
|
|
198
|
+
...props
|
|
199
|
+
}, ref) => /*#__PURE__*/_jsx(ListItemPrimitive.SectionHeader, {
|
|
200
|
+
ref: ref,
|
|
201
|
+
className: cn(listItemSectionHeaderVariants({
|
|
202
|
+
showDivider
|
|
203
|
+
}), className),
|
|
204
|
+
showDivider: showDivider,
|
|
205
|
+
style: style,
|
|
206
|
+
trailing: trailing,
|
|
207
|
+
...props,
|
|
208
|
+
children: wrapSectionHeaderLabel(children)
|
|
209
|
+
}));
|
|
210
|
+
ListItemSectionHeader.displayName = 'ListItem.SectionHeader';
|
|
211
|
+
|
|
212
|
+
// =============================================================================
|
|
213
|
+
// COMPOUND EXPORT
|
|
214
|
+
// =============================================================================
|
|
215
|
+
|
|
216
|
+
export const ListItem = Object.assign(ListItemRoot, {
|
|
217
|
+
LeadingSlot: ListItemLeadingSlot,
|
|
218
|
+
Content: ListItemContent,
|
|
219
|
+
Title: ListItemTitle,
|
|
220
|
+
Description: ListItemDescription,
|
|
221
|
+
Meta: ListItemMeta,
|
|
222
|
+
TrailingSlot: ListItemTrailingSlot,
|
|
223
|
+
SectionHeader: ListItemSectionHeader
|
|
224
|
+
});
|
|
225
|
+
export { listItemContentVariants, listItemDescriptionVariants, listItemLeadingSlotVariants, listItemMetaVariants, listItemRootVariants, listItemSectionHeaderLabelVariants, listItemSectionHeaderVariants, listItemTitleVariants, listItemTrailingSlotVariants } from './styles';
|
|
226
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["forwardRef","Pressable","Text","View","createListItem","cn","useStyleContext","withStyleContext","listItemContentVariants","listItemDescriptionVariants","listItemLeadingSlotVariants","listItemMetaVariants","listItemRootVariants","listItemSectionHeaderLabelVariants","listItemSectionHeaderVariants","listItemTitleVariants","listItemTrailingSlotVariants","jsx","_jsx","SCOPE","RootView","RootPressable","ListItemPrimitive","LeadingSlot","Content","Title","Description","Meta","TrailingSlot","SectionHeader","useListItemStyleContext","ctx","size","crossAlign","ListItemRoot","surface","showSeparator","className","style","props","ref","computedClassName","context","displayName","ListItemLeadingSlot","ListItemContent","ListItemTitle","numberOfLines","ListItemDescription","ListItemMeta","ListItemTrailingSlot","wrapSectionHeaderLabel","children","ListItemSectionHeader","showDivider","trailing","ListItem","Object","assign"],"sourceRoot":"../../../../src","sources":["components/ListItem/index.tsx"],"mappings":";;AAAA,SAASA,UAAU,QAAwB,OAAO;AAClD,SAASC,SAAS,EAAEC,IAAI,EAAEC,IAAI,QAAwC,cAAc;AACpF,SACEC,cAAc,QAKT,oBAAoB;AAC3B,SAASC,EA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,KAAK;EAAEiB,QAAQ;EAAE,GAAGhB;AAAM,CAAC,EAAEC,GAAG,kBAC1EtB,IAAA,CAACI,iBAAiB,CAACO,aAAa;EAC9BW,GAAG,EAAEA,GAAa;EAClBH,SAAS,EAAEhC,EAAE,CAACS,6BAA6B,CAAC;IAAEwC;EAAY,CAAC,CAAC,EAAEjB,SAAS,CAAE;EACzEiB,WAAW,EAAEA,WAAY;EACzBhB,KAAK,EAAEA,KAAM;EACbiB,QAAQ,EAAEA,QAAS;EAAA,GACfhB,KAAK;EAAAa,QAAA,EAERD,sBAAsB,CAACC,QAAQ;AAAC,CACF,CAErC,CAAC;AAEDC,qBAAqB,CAACV,WAAW,GAAG,wBAAwB;;AAE5D;AACA;AACA;;AAYA,OAAO,MAAMa,QAAQ,GAAGC,MAAM,CAACC,MAAM,CAACxB,YAAY,EAAE;EAClDX,WAAW,EAAEqB,mBAAmB;EAChCpB,OAAO,EAAEqB,eAAe;EACxBpB,KAAK,EAAEqB,aAAa;EACpBpB,WAAW,EAAEsB,mBAAmB;EAChCrB,IAAI,EAAEsB,YAAY;EAClBrB,YAAY,EAAEsB,oBAAoB;EAClCrB,aAAa,EAAEwB;AACjB,CAAC,CAAqB;AAGtB,SACE7C,uBAAuB,EACvBC,2BAA2B,EAC3BC,2BAA2B,EAC3BC,oBAAoB,EACpBC,oBAAoB,EACpBC,kCAAkC,EAClCC,6BAA6B,EAC7BC,qBAAqB,EACrBC,4BAA4B,QACvB,UAAU","ignoreList":[]}
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { cva } from 'class-variance-authority';
|
|
5
|
+
import { COLOR_BORDER_DEFAULT, COLOR_TEXT_MUTED, COLOR_TEXT_PRIMARY, COLOR_TEXT_SECONDARY, TRANSITION_COLORS } from '../../styles/primitives';
|
|
6
|
+
|
|
7
|
+
// ── Root (row): density, surface, separator, interactive feedback ──────────
|
|
8
|
+
|
|
9
|
+
export const listItemRootVariants = cva(['flex-row self-stretch w-full px-4', 'data-[disabled=true]:opacity-50 data-[disabled=true]:pointer-events-none', 'data-[active=true]:opacity-70', TRANSITION_COLORS, Platform.select({
|
|
10
|
+
web: ['outline-none', 'web:data-[hovered=true]:bg-slate-50', 'web:focus-visible:data-[disabled=false]:bg-slate-50', 'web:focus-visible:data-[disabled=false]:ring-2 web:focus-visible:data-[disabled=false]:ring-slate-400/40 web:focus-visible:data-[disabled=false]:ring-offset-2'].join(' '),
|
|
11
|
+
default: ''
|
|
12
|
+
})], {
|
|
13
|
+
variants: {
|
|
14
|
+
size: {
|
|
15
|
+
default: 'gap-3 py-4',
|
|
16
|
+
compact: 'gap-2 py-3'
|
|
17
|
+
},
|
|
18
|
+
surface: {
|
|
19
|
+
default: 'bg-white',
|
|
20
|
+
negative: 'bg-red-50'
|
|
21
|
+
},
|
|
22
|
+
showSeparator: {
|
|
23
|
+
true: ['border-b border-solid', COLOR_BORDER_DEFAULT],
|
|
24
|
+
false: 'border-b-0'
|
|
25
|
+
},
|
|
26
|
+
crossAlign: {
|
|
27
|
+
center: 'items-center',
|
|
28
|
+
start: 'items-start'
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
compoundVariants: [{
|
|
32
|
+
surface: 'negative',
|
|
33
|
+
className: Platform.select({
|
|
34
|
+
web: 'web:data-[hovered=true]:bg-red-100/90',
|
|
35
|
+
default: ''
|
|
36
|
+
})
|
|
37
|
+
}],
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
size: 'default',
|
|
40
|
+
surface: 'default',
|
|
41
|
+
showSeparator: true,
|
|
42
|
+
crossAlign: 'center'
|
|
43
|
+
}
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
// ── Leading / trailing slots ─────────────────────────────────────────────────
|
|
47
|
+
|
|
48
|
+
export const listItemLeadingSlotVariants = cva(['flex shrink-0 items-center justify-center']);
|
|
49
|
+
export const listItemTrailingSlotVariants = cva(['flex shrink-0 flex-row justify-end gap-2'], {
|
|
50
|
+
variants: {
|
|
51
|
+
crossAlign: {
|
|
52
|
+
center: 'items-center',
|
|
53
|
+
start: 'items-start self-start'
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
defaultVariants: {
|
|
57
|
+
crossAlign: 'center'
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
|
|
61
|
+
// ── Content stack (title / description / meta) ───────────────────────────────
|
|
62
|
+
|
|
63
|
+
export const listItemContentVariants = cva(['flex min-w-0 flex-1 flex-col gap-1'], {
|
|
64
|
+
variants: {
|
|
65
|
+
crossAlign: {
|
|
66
|
+
center: 'justify-center',
|
|
67
|
+
start: 'justify-start'
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
defaultVariants: {
|
|
71
|
+
crossAlign: 'center'
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
|
|
75
|
+
// ── Typography ───────────────────────────────────────────────────────────────
|
|
76
|
+
|
|
77
|
+
export const listItemTitleVariants = cva([COLOR_TEXT_PRIMARY, 'font-medium'], {
|
|
78
|
+
variants: {
|
|
79
|
+
size: {
|
|
80
|
+
default: 'text-base leading-snug',
|
|
81
|
+
compact: 'text-sm leading-snug'
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
defaultVariants: {
|
|
85
|
+
size: 'default'
|
|
86
|
+
}
|
|
87
|
+
});
|
|
88
|
+
export const listItemDescriptionVariants = cva([COLOR_TEXT_SECONDARY], {
|
|
89
|
+
variants: {
|
|
90
|
+
size: {
|
|
91
|
+
default: 'text-sm leading-normal',
|
|
92
|
+
compact: 'text-xs leading-normal'
|
|
93
|
+
}
|
|
94
|
+
},
|
|
95
|
+
defaultVariants: {
|
|
96
|
+
size: 'default'
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export const listItemMetaVariants = cva([COLOR_TEXT_MUTED], {
|
|
100
|
+
variants: {
|
|
101
|
+
size: {
|
|
102
|
+
default: 'text-xs leading-normal',
|
|
103
|
+
compact: 'text-[11px] leading-normal'
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
defaultVariants: {
|
|
107
|
+
size: 'default'
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// ── Section header (group label row inside lists / cards) ───────────────────
|
|
112
|
+
|
|
113
|
+
export const listItemSectionHeaderVariants = cva(['flex-row items-center justify-between gap-2 border-b border-solid px-4 py-3', COLOR_BORDER_DEFAULT], {
|
|
114
|
+
variants: {
|
|
115
|
+
showDivider: {
|
|
116
|
+
true: ['border-t-4 border-solid border-t-surface-brand-strong/40', 'border-x-0'],
|
|
117
|
+
false: 'border-t-0'
|
|
118
|
+
}
|
|
119
|
+
},
|
|
120
|
+
defaultVariants: {
|
|
121
|
+
showDivider: true
|
|
122
|
+
}
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
/** Default section-title typography; applied by `ListItem.SectionHeader` for string/number children. Exported for rare custom composition. */
|
|
126
|
+
export const listItemSectionHeaderLabelVariants = cva(['text-xs font-semibold uppercase tracking-wide', COLOR_TEXT_SECONDARY]);
|
|
127
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","cva","COLOR_BORDER_DEFAULT","COLOR_TEXT_MUTED","COLOR_TEXT_PRIMARY","COLOR_TEXT_SECONDARY","TRANSITION_COLORS","listItemRootVariants","select","web","join","default","variants","size","compact","surface","negative","showSeparator","true","false","crossAlign","center","start","compoundVariants","className","defaultVariants","listItemLeadingSlotVariants","listItemTrailingSlotVariants","listItemContentVariants","listItemTitleVariants","listItemDescriptionVariants","listItemMetaVariants","listItemSectionHeaderVariants","showDivider","listItemSectionHeaderLabelVariants"],"sourceRoot":"../../../../src","sources":["components/ListItem/styles.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AACvC,SAASC,GAAG,QAA2B,0BAA0B;AACjE,SACEC,oBAAoB,EACpBC,gBAAgB,EAChBC,kB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AAE,YAAY,CAAC;MAChFC,KAAK,EAAE;IACT;EACF,CAAC;EACDM,eAAe,EAAE;IACfQ,WAAW,EAAE;EACf;AACF,CACF,CAAC;;AAED;AACA,OAAO,MAAMC,kCAAkC,GAAGjC,GAAG,CAAC,CACpD,+CAA+C,EAC/CI,oBAAoB,CACrB,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["HStack","VStack"],"sourceRoot":"../../../src","sources":["components/index.ts"],"mappings":";;AAAA,cAAc,eAAe;AAC7B,cAAc,UAAU;AACxB,cAAc,eAAe;AAC7B,cAAc,OAAO;AACrB,cAAc,UAAU;AACxB,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,UAAU;AACxB,cAAc,SAAS;AACvB,cAAc,QAAQ;AACtB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,YAAY;AAC1B,cAAc,QAAQ;AACtB,cAAc,YAAY;AAC1B,cAAc,eAAe;AAC7B,cAAc,qBAAqB;AACnC,cAAc,UAAU;AACxB,cAAc,mBAAmB;AACjC,cAAc,UAAU;AACxB,SAASA,MAAM,EAAEC,MAAM,QAAQ,SAAS;AACxC,cAAc,WAAW;AACzB,cAAc,QAAQ;AACtB,cAAc,QAAQ;AACtB,cAAc,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/styles.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/Card/styles.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,gBAAgB,oFAK3B,CAAC;AAIH,eAAO,MAAM,kBAAkB,oFAI7B,CAAC;AAIH,eAAO,MAAM,iBAAiB,oFAAkB,CAAC;AAIjD,eAAO,MAAM,mBAAmB,oFAAuC,CAAC;AAIxE,eAAO,MAAM,kBAAkB,oFAI7B,CAAC"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { Text, View, type TextProps, type ViewProps } from 'react-native';
|
|
2
|
+
import { type IListItemLeadingSlotProps, type IListItemProps, type IListItemSectionHeaderProps, type ListItemCrossAlign } from '@cdx-ui/primitives';
|
|
3
|
+
import { type WithStyleContextProps } from '@cdx-ui/utils';
|
|
4
|
+
import { type ListItemVariantProps } from './styles';
|
|
5
|
+
export interface ListItemProps extends IListItemProps, WithStyleContextProps {
|
|
6
|
+
className?: string;
|
|
7
|
+
}
|
|
8
|
+
declare const ListItemRoot: import("react").ForwardRefExoticComponent<ListItemProps & import("react").RefAttributes<View>>;
|
|
9
|
+
export interface ListItemLeadingSlotProps extends IListItemLeadingSlotProps {
|
|
10
|
+
className?: string;
|
|
11
|
+
}
|
|
12
|
+
declare const ListItemLeadingSlot: import("react").ForwardRefExoticComponent<ListItemLeadingSlotProps & import("react").RefAttributes<View>>;
|
|
13
|
+
export interface ListItemContentProps extends ViewProps {
|
|
14
|
+
className?: string;
|
|
15
|
+
}
|
|
16
|
+
declare const ListItemContent: import("react").ForwardRefExoticComponent<ListItemContentProps & import("react").RefAttributes<View>>;
|
|
17
|
+
export interface ListItemTitleProps extends TextProps {
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const ListItemTitle: import("react").ForwardRefExoticComponent<ListItemTitleProps & import("react").RefAttributes<Text>>;
|
|
21
|
+
export interface ListItemDescriptionProps extends TextProps {
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
declare const ListItemDescription: import("react").ForwardRefExoticComponent<ListItemDescriptionProps & import("react").RefAttributes<Text>>;
|
|
25
|
+
export interface ListItemMetaProps extends TextProps {
|
|
26
|
+
className?: string;
|
|
27
|
+
}
|
|
28
|
+
declare const ListItemMeta: import("react").ForwardRefExoticComponent<ListItemMetaProps & import("react").RefAttributes<Text>>;
|
|
29
|
+
export interface ListItemTrailingSlotProps extends ViewProps {
|
|
30
|
+
className?: string;
|
|
31
|
+
}
|
|
32
|
+
declare const ListItemTrailingSlot: import("react").ForwardRefExoticComponent<ListItemTrailingSlotProps & import("react").RefAttributes<View>>;
|
|
33
|
+
export interface ListItemSectionHeaderComponentProps extends IListItemSectionHeaderProps {
|
|
34
|
+
className?: string;
|
|
35
|
+
}
|
|
36
|
+
declare const ListItemSectionHeader: import("react").ForwardRefExoticComponent<ListItemSectionHeaderComponentProps & import("react").RefAttributes<View>>;
|
|
37
|
+
type ListItemCompound = typeof ListItemRoot & {
|
|
38
|
+
LeadingSlot: typeof ListItemLeadingSlot;
|
|
39
|
+
Content: typeof ListItemContent;
|
|
40
|
+
Title: typeof ListItemTitle;
|
|
41
|
+
Description: typeof ListItemDescription;
|
|
42
|
+
Meta: typeof ListItemMeta;
|
|
43
|
+
TrailingSlot: typeof ListItemTrailingSlot;
|
|
44
|
+
SectionHeader: typeof ListItemSectionHeader;
|
|
45
|
+
};
|
|
46
|
+
export declare const ListItem: ListItemCompound;
|
|
47
|
+
export type { ListItemCrossAlign, ListItemVariantProps };
|
|
48
|
+
export { listItemContentVariants, listItemDescriptionVariants, listItemLeadingSlotVariants, listItemMetaVariants, listItemRootVariants, listItemSectionHeaderLabelVariants, listItemSectionHeaderVariants, listItemTitleVariants, listItemTrailingSlotVariants, } from './styles';
|
|
49
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/ListItem/index.tsx"],"names":[],"mappings":"AACA,OAAO,EAAa,IAAI,EAAE,IAAI,EAAE,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AACrF,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,cAAc,EACnB,KAAK,2BAA2B,EAChC,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAyC,KAAK,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAClG,OAAO,EAUL,KAAK,oBAAoB,EAC1B,MAAM,UAAU,CAAC;AA4BlB,MAAM,WAAW,aAAc,SAAQ,cAAc,EAAE,qBAAqB;IAC1E,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,gGAgCjB,CAAC;AAQF,MAAM,WAAW,wBAAyB,SAAQ,yBAAyB;IACzE,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,2GASxB,CAAC;AAIF,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,eAAe,uGAapB,CAAC;AAIF,MAAM,WAAW,kBAAmB,SAAQ,SAAS;IACnD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,aAAa,qGAclB,CAAC;AAIF,MAAM,WAAW,wBAAyB,SAAQ,SAAS;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,mBAAmB,2GAaxB,CAAC;AAIF,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,YAAY,oGAcjB,CAAC;AAIF,MAAM,WAAW,yBAA0B,SAAQ,SAAS;IAC1D,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,oBAAoB,4GAazB,CAAC;AAeF,MAAM,WAAW,mCAAoC,SAAQ,2BAA2B;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,QAAA,MAAM,qBAAqB,sHAa1B,CAAC;AAQF,KAAK,gBAAgB,GAAG,OAAO,YAAY,GAAG;IAC5C,WAAW,EAAE,OAAO,mBAAmB,CAAC;IACxC,OAAO,EAAE,OAAO,eAAe,CAAC;IAChC,KAAK,EAAE,OAAO,aAAa,CAAC;IAC5B,WAAW,EAAE,OAAO,mBAAmB,CAAC;IACxC,IAAI,EAAE,OAAO,YAAY,CAAC;IAC1B,YAAY,EAAE,OAAO,oBAAoB,CAAC;IAC1C,aAAa,EAAE,OAAO,qBAAqB,CAAC;CAC7C,CAAC;AAEF,eAAO,MAAM,QAAQ,EAQf,gBAAgB,CAAC;AAEvB,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,CAAC;AACzD,OAAO,EACL,uBAAuB,EACvB,2BAA2B,EAC3B,2BAA2B,EAC3B,oBAAoB,EACpB,oBAAoB,EACpB,kCAAkC,EAClC,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,GAC7B,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
2
|
+
export declare const listItemRootVariants: (props?: ({
|
|
3
|
+
size?: "default" | "compact" | null | undefined;
|
|
4
|
+
surface?: "default" | "negative" | null | undefined;
|
|
5
|
+
showSeparator?: boolean | null | undefined;
|
|
6
|
+
crossAlign?: "start" | "center" | null | undefined;
|
|
7
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
8
|
+
export declare const listItemLeadingSlotVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
|
+
export declare const listItemTrailingSlotVariants: (props?: ({
|
|
10
|
+
crossAlign?: "start" | "center" | null | undefined;
|
|
11
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
12
|
+
export declare const listItemContentVariants: (props?: ({
|
|
13
|
+
crossAlign?: "start" | "center" | null | undefined;
|
|
14
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
15
|
+
export declare const listItemTitleVariants: (props?: ({
|
|
16
|
+
size?: "default" | "compact" | null | undefined;
|
|
17
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
18
|
+
export declare const listItemDescriptionVariants: (props?: ({
|
|
19
|
+
size?: "default" | "compact" | null | undefined;
|
|
20
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
21
|
+
export declare const listItemMetaVariants: (props?: ({
|
|
22
|
+
size?: "default" | "compact" | null | undefined;
|
|
23
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
24
|
+
export declare const listItemSectionHeaderVariants: (props?: ({
|
|
25
|
+
showDivider?: boolean | null | undefined;
|
|
26
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
27
|
+
/** Default section-title typography; applied by `ListItem.SectionHeader` for string/number children. Exported for rare custom composition. */
|
|
28
|
+
export declare const listItemSectionHeaderLabelVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
29
|
+
export type ListItemVariantProps = VariantProps<typeof listItemRootVariants>;
|
|
30
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/components/ListItem/styles.ts"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAW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
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.0.1-beta.
|
|
3
|
+
"version": "0.0.1-beta.6",
|
|
4
4
|
"main": "lib/commonjs/index.js",
|
|
5
5
|
"module": "lib/module/index.js",
|
|
6
6
|
"react-native": "src/index.ts",
|
|
@@ -67,9 +67,9 @@
|
|
|
67
67
|
"@gorhom/bottom-sheet": "^5.2.6",
|
|
68
68
|
"class-variance-authority": "^0.7.1",
|
|
69
69
|
"uniwind": "1.6.1",
|
|
70
|
-
"@cdx-ui/
|
|
71
|
-
"@cdx-ui/
|
|
72
|
-
"@cdx-ui/icons": "0.0.1-beta.
|
|
70
|
+
"@cdx-ui/primitives": "0.0.1-beta.6",
|
|
71
|
+
"@cdx-ui/utils": "0.0.1-beta.6",
|
|
72
|
+
"@cdx-ui/icons": "0.0.1-beta.6"
|
|
73
73
|
},
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@types/react": "*",
|
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
import { cva } from 'class-variance-authority';
|
|
2
|
-
import {
|
|
3
|
-
COLOR_BG_PRIMARY,
|
|
4
|
-
COLOR_BORDER_DEFAULT,
|
|
5
|
-
COLOR_TEXT_PRIMARY,
|
|
6
|
-
RADIUS_SM,
|
|
7
|
-
SHADOW_SM,
|
|
8
|
-
} from '../../styles/primitives';
|
|
9
2
|
|
|
10
3
|
// ── Root ────────────────────────────────────────────────────
|
|
11
4
|
|
|
12
5
|
export const cardRootVariants = cva([
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
SHADOW_SM,
|
|
6
|
+
'bg-surface-primary',
|
|
7
|
+
'border border-stroke-secondary',
|
|
8
|
+
'rounded-[var(--border-radius-default)]',
|
|
17
9
|
'overflow-hidden',
|
|
18
10
|
]);
|
|
19
11
|
|
|
20
12
|
// ── Header ──────────────────────────────────────────────────
|
|
21
13
|
|
|
22
14
|
export const cardHeaderVariants = cva([
|
|
23
|
-
'flex-row items-center justify-between p-4
|
|
24
|
-
|
|
15
|
+
'flex-row items-center justify-between p-4',
|
|
16
|
+
'border-t-8 border-t-surface-brand-strong',
|
|
17
|
+
'border-b border-b-solid border-b-stroke-secondary',
|
|
25
18
|
]);
|
|
26
19
|
|
|
27
20
|
// ── Title ───────────────────────────────────────────────────
|
|
@@ -30,12 +23,12 @@ export const cardTitleVariants = cva(['flex-1']);
|
|
|
30
23
|
|
|
31
24
|
// ── Content ─────────────────────────────────────────────────
|
|
32
25
|
|
|
33
|
-
export const cardContentVariants = cva([
|
|
26
|
+
export const cardContentVariants = cva(['text-content-primary', 'p-4']);
|
|
34
27
|
|
|
35
28
|
// ── Footer ──────────────────────────────────────────────────
|
|
36
29
|
|
|
37
30
|
export const cardFooterVariants = cva([
|
|
38
31
|
'p-4 border-t',
|
|
39
|
-
|
|
32
|
+
'border-stroke-secondary',
|
|
40
33
|
'flex-row items-center gap-2',
|
|
41
34
|
]);
|