@tamagui/list-item 1.15.4 → 1.15.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/dist/cjs/ListItem.js.map +1 -1
- package/dist/esm/ListItem.js.map +1 -1
- package/dist/esm/ListItem.mjs.map +1 -1
- package/dist/jsx/ListItem.js.map +1 -1
- package/dist/jsx/ListItem.mjs.map +1 -1
- package/package.json +7 -7
- package/src/ListItem.tsx +1 -1
- package/types/ListItem.d.ts +24 -48
- package/types/ListItem.d.ts.map +1 -1
package/dist/cjs/ListItem.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
4
|
+
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
5
5
|
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAsNY;AAtNZ,kBAYO;AACP,uBAA4B;AAC5B,6BAA2C;AAC3C,oBAAuC;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ACE;AAAA,QAEH,SAAS,WACR,6CAAC,wBAAO,MAAM,GACX;AAAA,yBAAe,QAAQ,QAAQ,4CAAC,SAAM,MAAa,iBAAM;AAAA,UACzD,WACC,2EACG,iBAAO,aAAa,YAAY,eAAe;AAAA;AAAA;AAAA,YAG9C,4CAAC,YAAS,MAAM,cAAe,oBAAS;AAAA,cAExC,UAEJ,IACE;AAAA,UACH;AAAA,WACH,IAEA;AAAA,QAED,kBACC,4EACE;AAAA,sDAAC,sBAAO,MAAM,WAAW;AAAA,UACxB;AAAA,WACH,IACE;AAAA,SACN;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,wBAAoB,yBAA0C,CAAC,OAAO,QAAQ;AAClF,QAAM,EAAE,OAAO,cAAc,IAAI,YAAY,KAAK;AAClD,SAAO,4CAAC,iBAAc,KAAU,gBAAe,iBAAiB,GAAG,eAAe;AACpF,CAAC;AAEM,MAAM,uBAAuB;AAAA,EAClC,aAAa,oBAAI,IAAI;AAAA;AAAA,IAEnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEO,MAAM,eAAW;AAAA,EACtB,cAAc;AAAA,QACZ,uBAAU,mBAAmB,EAAE,eAAe,KAAK,CAAC;AAAA,IACpD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/esm/ListItem.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
4
|
+
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
5
5
|
"mappings": "AAsNY,mBAEE,KAFF;AAtNZ;AAAA,EAGE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,UAAU,wBAAwB;AAC3C,SAAS,gBAAgB,cAAc;AACvC,SAAS,aAA+B,0BAA0B;AAClE,SAAmC,kBAAkB;AA6CrD,MAAM,OAAO;AAEN,MAAM,gBAAgB,OAAO,gBAAgB;AAAA,EAClD,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,OAAO;AAAA,QACP,aAAa;AAAA,QACb,UAAU;AAAA,QACV,UAAU;AAAA,QACV,eAAe;AAAA,QACf,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,EAAE,OAAO,MAAM;AAC9B,eAAO;AAAA,UACL,WAAW,OAAO,KAAK,GAAG;AAAA,UAC1B,mBAAmB,OAAO,MAAM,GAAG;AAAA,UACnC,iBAAiB,SAAS,KAAK,EAAE;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAAA,IAEA,QAAQ;AAAA,MACN,MAAM;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AA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEO,MAAM,WAAW;AAAA,EACtB,cAAc;AAAA,IACZ,UAAU,mBAAmB,EAAE,eAAe,KAAK,CAAC;AAAA,IACpD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
4
|
+
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
5
5
|
"mappings": "AAsNY,mBAEE,KAFF;AAtNZ;AAAA,EAGE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,UAAU,wBAAwB;AAC3C,SAAS,gBAAgB,cAAc;AACvC,SAAS,aAA+B,0BAA0B;AAClE,SAAmC,kBAAkB;AA6CrD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;AAAA,yBAAe,QAAQ,QAAQ,oBAAC,SAAM,MAAa,iBAAM;AAAA,UACzD,WACC,gCACG,iBAAO,aAAa,YAAY,eAAe;AAAA;AAAA;AAAA,YAG9C,oBAAC,YAAS,MAAM,cAAe,oBAAS;AAAA,cAExC,UAEJ,IACE;AAAA,UACH;AAAA,WACH,IAEA;AAAA,QAED,kBACC,iCACE;AAAA,8BAAC,UAAO,MAAM,WAAW;AAAA,UACxB;AAAA,WACH,IACE;AAAA,SACN;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB,WAA0C,CAAC,OAAO,QAAQ;AAClF,QAAM,EAAE,OAAO,cAAc,IAAI,YAAY,KAAK;AAClD,SAAO,oBAAC,iBAAc,KAAU,gBAAe,iBAAiB,GAAG,eAAe;AACpF,CAAC;AAEM,MAAM,uBAAuB;AAAA,EAClC,aAAa,oBAAI,IAAI;AAAA;AAAA,IAEnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEO,MAAM,WAAW;AAAA,EACtB,cAAc;AAAA,IACZ,UAAU,mBAAmB,EAAE,eAAe,KAAK,CAAC;AAAA,IACpD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/jsx/ListItem.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
4
|
+
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
5
5
|
"mappings": "AAAA;AAAA,EAGE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,UAAU,wBAAwB;AAC3C,SAAS,gBAAgB,cAAc;AACvC,SAAS,aAA+B,0BAA0B;AAClE,SAAmC,kBAAkB;AA6CrD,MAAM,OAAO;AAEN,MAAM,gBAAgB,OAAO,gBAAgB;AAAA,EAClD,MAAM;AAAA,EACN,KAAK;AAAA,EAEL,UAAU;AAAA,IACR,UAAU;AAAA,MACR,OAAO;AAAA,QACL,MAAM;AAAA,QACN,YAAY;AAAA,QACZ,UAAU;AAAA,QACV,OAAO;AAAA,QACP,aAAa;AAAA,QACb,UAAU;AAAA,QACV,UAAU;AAAA,QACV,eAAe;AAAA,QACf,iBAAiB;AAAA,MACnB;AAAA,IACF;AAAA,IAEA,MAAM;AAAA,MACJ,WAAW,CAAC,KAAK,EAAE,OAAO,MAAM;AAC9B,eAAO;AAAA,UACL,WAAW,OAAO,KAAK,GAAG;AAAA,UAC1B,mBAAmB,OAAO,MAAM,GAAG;AAAA,UACnC,iBAAiB,SAAS,KAAK,EAAE;AAAA,QACnC;AAAA,MACF;AAAA,IACF;AAAA,IAEA,QAAQ;AAAA,MACN,MAAM;AAAA,QACJ,YAAY;AAAA,UACV,iBAAiB;AAAA,QACnB;AAAA,MACF;AAAA,IACF;AAAA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ACH;AAEO,MAAM,WAAW;AAAA,EACtB,cAAc;AAAA,IACZ,UAAU,mBAAmB,EAAE,eAAe,KAAK,CAAC;AAAA,IACpD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/ListItem.tsx"],
|
|
4
|
-
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
4
|
+
"sourcesContent": ["import {\n FontSizeTokens,\n GetProps,\n Spacer,\n TamaguiElement,\n ThemeableProps,\n getTokens,\n getVariableValue,\n styled,\n themeable,\n useMediaPropsActive,\n withStaticProperties,\n} from '@tamagui/core'\nimport { getFontSize } from '@tamagui/font-size'\nimport { getSpace, useGetThemedIcon } from '@tamagui/helpers-tamagui'\nimport { ThemeableStack, YStack } from '@tamagui/stacks'\nimport { SizableText, TextParentStyles, wrapChildrenInText } from '@tamagui/text'\nimport React, { FunctionComponent, forwardRef } from 'react'\n\ntype ListItemIconProps = { color?: string; size?: number }\ntype IconProp = JSX.Element | FunctionComponent<ListItemIconProps> | null\n\nexport type ListItemProps = Omit<TextParentStyles, 'TextComponent' | 'noTextWrap'> &\n GetProps<typeof ListItemFrame> &\n ThemeableProps & {\n /**\n * add icon before, passes color and size automatically if Component\n */\n icon?: IconProp\n /**\n * add icon after, passes color and size automatically if Component\n */\n iconAfter?: IconProp\n /**\n * adjust icon relative to size\n */\n /**\n * default: -1\n */\n scaleIcon?: number\n /**\n * make the spacing elements flex\n */\n spaceFlex?: number | boolean\n /**\n * adjust internal space relative to icon size\n */\n scaleSpace?: number\n /**\n * title\n */\n title?: React.ReactNode\n /**\n * subtitle\n */\n subTitle?: React.ReactNode\n /**\n * will not wrap text around `children` only, \"all\" will not wrap title or subTitle\n */\n noTextWrap?: boolean | 'all'\n }\n\nconst NAME = 'ListItem'\n\nexport const ListItemFrame = styled(ThemeableStack, {\n name: NAME,\n tag: 'li',\n\n variants: {\n unstyled: {\n false: {\n size: '$true',\n alignItems: 'center',\n flexWrap: 'nowrap',\n width: '100%',\n borderColor: '$borderColor',\n maxWidth: '100%',\n overflow: 'hidden',\n flexDirection: 'row',\n backgroundColor: '$background',\n },\n },\n\n size: {\n '...size': (val, { tokens }) => {\n return {\n minHeight: tokens.size[val],\n paddingHorizontal: tokens.space[val],\n paddingVertical: getSpace(val, -2),\n }\n },\n },\n\n active: {\n true: {\n hoverStyle: {\n backgroundColor: '$background',\n },\n },\n },\n\n disabled: {\n true: {\n opacity: 0.5,\n // TODO breaking types\n pointerEvents: 'none' as any,\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemText = styled(SizableText, {\n name: 'ListItemText',\n\n variants: {\n unstyled: {\n false: {\n color: '$color',\n flexGrow: 1,\n flexShrink: 1,\n ellipse: true,\n cursor: 'default',\n },\n },\n },\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemSubtitle = styled(ListItemText, {\n name: 'ListItemSubtitle',\n\n variants: {\n unstyled: {\n false: {\n opacity: 0.6,\n maxWidth: '100%',\n size: '$3',\n color: '$color',\n },\n },\n } as const,\n\n defaultVariants: {\n unstyled: false,\n },\n})\n\nexport const ListItemTitle = styled(ListItemText, {\n name: 'ListItemTitle',\n})\n\nexport const useListItem = (\n props: ListItemProps,\n {\n Text = ListItemText,\n Subtitle = ListItemSubtitle,\n Title = ListItemTitle,\n }: {\n Title?: any\n Subtitle?: any\n Text?: any\n } = { Text: ListItemText, Subtitle: ListItemSubtitle, Title: ListItemTitle }\n) => {\n // careful not to desctructure and re-order props, order is important\n const {\n children,\n icon,\n iconAfter,\n noTextWrap,\n theme: themeName,\n space,\n spaceFlex,\n scaleIcon = 1,\n scaleSpace = 1,\n subTitle,\n\n // text props\n color,\n fontWeight,\n letterSpacing,\n fontSize,\n fontFamily,\n textAlign,\n textProps,\n title,\n ...rest\n } = props\n\n const mediaActiveProps = useMediaPropsActive(props)\n const size = mediaActiveProps.size || '$true'\n const subtitleSize = `$${+String(size).replace('$', '') - 1}` as FontSizeTokens\n const iconSize = getFontSize(size) * scaleIcon\n const getThemedIcon = useGetThemedIcon({ size: iconSize, color })\n const [themedIcon, themedIconAfter] = [icon, iconAfter].map(getThemedIcon)\n const spaceSize =\n getVariableValue(getTokens().space[mediaActiveProps.space as any] ?? iconSize) *\n scaleSpace\n // @ts-ignore noTextWrap = all is ok\n const contents = wrapChildrenInText(Text, mediaActiveProps)\n\n return {\n props: {\n fontFamily,\n ...rest,\n children: (\n <>\n {themedIcon ? (\n <>\n {themedIcon}\n <Spacer size={spaceSize} />\n </>\n ) : null}\n {/* helper for common title/subtitle pttern */}\n {title || subTitle ? (\n <YStack flex={1}>\n {noTextWrap === 'all' ? title : <Title size={size}>{title}</Title>}\n {subTitle ? (\n <>\n {typeof subTitle === 'string' && noTextWrap !== 'all' ? (\n // TODO can use theme but we need to standardize to alt themes\n // or standardize on subtle colors in themes\n <Subtitle size={subtitleSize}>{subTitle}</Subtitle>\n ) : (\n subTitle\n )}\n </>\n ) : null}\n {contents}\n </YStack>\n ) : (\n contents\n )}\n {themedIconAfter ? (\n <>\n <Spacer size={spaceSize} />\n {themedIconAfter}\n </>\n ) : null}\n </>\n ),\n },\n }\n}\n\nconst ListItemComponent = forwardRef<TamaguiElement, ListItemProps>((props, ref) => {\n const { props: listItemProps } = useListItem(props)\n return <ListItemFrame ref={ref} justifyContent=\"space-between\" {...listItemProps} />\n})\n\nexport const listItemStaticConfig = {\n inlineProps: new Set([\n // text props go here (can't really optimize them, but we never fully extract listItem anyway)\n 'color',\n 'fontWeight',\n 'fontSize',\n 'fontFamily',\n 'letterSpacing',\n 'textAlign',\n ]),\n}\n\nexport const ListItem = withStaticProperties(\n ListItemFrame.extractable(\n themeable(ListItemComponent, { componentName: NAME }),\n listItemStaticConfig\n ),\n {\n Text: ListItemText,\n Subtitle: ListItemSubtitle,\n }\n)\n"],
|
|
5
5
|
"mappings": "AAAA;AAAA,EAGE;AAAA,EAGA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;AACP,SAAS,mBAAmB;AAC5B,SAAS,UAAU,wBAAwB;AAC3C,SAAS,gBAAgB,cAAc;AACvC,SAAS,aAA+B,0BAA0B;AAClE,SAAmC,kBAAkB;AA6CrD,MAAM,OAAO;AAEN,MAAM,gBAAgB,OAAO,gBAAgB;AAAA,EAClD,MAAM;AAAA,EACN,KAAK;AAAA,EAE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YAAY,eAAe;AAAA;AAAA;AAAA,YAG9C,CAAC,SAAS,MAAM,eAAe,SAAS,EAAvC;AAAA,cAED,SAEJ,MACE;AAAA,WACH;AAAA,QACH,EAdC,UAgBD;AAAA,SAED,kBACC;AAAA,UACE,CAAC,OAAO,MAAM,WAAW;AAAA,WACxB;AAAA,QACH,MACE;AAAA,MACN;AAAA,IAEJ;AAAA,EACF;AACF;AAEA,MAAM,oBAAoB,WAA0C,CAAC,OAAO,QAAQ;AAClF,QAAM,EAAE,OAAO,cAAc,IAAI,YAAY,KAAK;AAClD,SAAO,CAAC,cAAc,KAAK,KAAK,eAAe,oBAAoB,eAAe;AACpF,CAAC;AAEM,MAAM,uBAAuB;AAAA,EAClC,aAAa,oBAAI,IAAI;AAAA;AAAA,IAEnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,CAAC;AACH;AAEO,MAAM,WAAW;AAAA,EACtB,cAAc;AAAA,IACZ,UAAU,mBAAmB,EAAE,eAAe,KAAK,CAAC;AAAA,IACpD;AAAA,EACF;AAAA,EACA;AAAA,IACE,MAAM;AAAA,IACN,UAAU;AAAA,EACZ;AACF;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tamagui/list-item",
|
|
3
|
-
"version": "1.15.
|
|
3
|
+
"version": "1.15.6",
|
|
4
4
|
"sideEffects": [
|
|
5
5
|
"*.css"
|
|
6
6
|
],
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"watch": "tamagui-build --watch"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@tamagui/core": "1.15.
|
|
25
|
-
"@tamagui/font-size": "1.15.
|
|
26
|
-
"@tamagui/get-size": "1.15.
|
|
27
|
-
"@tamagui/helpers-tamagui": "1.15.
|
|
28
|
-
"@tamagui/text": "1.15.
|
|
24
|
+
"@tamagui/core": "1.15.6",
|
|
25
|
+
"@tamagui/font-size": "1.15.6",
|
|
26
|
+
"@tamagui/get-size": "1.15.6",
|
|
27
|
+
"@tamagui/helpers-tamagui": "1.15.6",
|
|
28
|
+
"@tamagui/text": "1.15.6"
|
|
29
29
|
},
|
|
30
30
|
"peerDependencies": {
|
|
31
31
|
"react": "*"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tamagui/build": "1.15.
|
|
34
|
+
"@tamagui/build": "1.15.6",
|
|
35
35
|
"react": "^18.2.0"
|
|
36
36
|
},
|
|
37
37
|
"publishConfig": {
|
package/src/ListItem.tsx
CHANGED
package/types/ListItem.d.ts
CHANGED
|
@@ -145,43 +145,31 @@ export declare const ListItemText: import("@tamagui/core").TamaguiComponent<Omit
|
|
|
145
145
|
}, {
|
|
146
146
|
displayName: string | undefined;
|
|
147
147
|
}>;
|
|
148
|
-
export declare const ListItemSubtitle: import("@tamagui/core").TamaguiComponent<
|
|
149
|
-
readonly size?: FontSizeTokens | undefined;
|
|
150
|
-
}, "unstyled"> & {
|
|
151
|
-
unstyled?: boolean | undefined;
|
|
152
|
-
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
153
|
-
readonly size?: FontSizeTokens | undefined;
|
|
154
|
-
}, "unstyled"> & {
|
|
155
|
-
unstyled?: boolean | undefined;
|
|
156
|
-
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
157
|
-
readonly size?: FontSizeTokens | undefined;
|
|
158
|
-
}, "unstyled"> & {
|
|
159
|
-
unstyled?: boolean | undefined;
|
|
160
|
-
}>>) | (Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
148
|
+
export declare const ListItemSubtitle: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
161
149
|
readonly size?: FontSizeTokens | undefined;
|
|
162
150
|
} & {
|
|
163
151
|
unstyled?: boolean | undefined;
|
|
164
|
-
},
|
|
165
|
-
|
|
152
|
+
}, "unstyled"> & {
|
|
153
|
+
readonly unstyled?: boolean | undefined;
|
|
166
154
|
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
167
155
|
readonly size?: FontSizeTokens | undefined;
|
|
168
156
|
} & {
|
|
169
157
|
unstyled?: boolean | undefined;
|
|
170
|
-
},
|
|
171
|
-
|
|
158
|
+
}, "unstyled"> & {
|
|
159
|
+
readonly unstyled?: boolean | undefined;
|
|
172
160
|
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
173
161
|
readonly size?: FontSizeTokens | undefined;
|
|
174
162
|
} & {
|
|
175
163
|
unstyled?: boolean | undefined;
|
|
176
|
-
},
|
|
177
|
-
|
|
178
|
-
}
|
|
164
|
+
}, "unstyled"> & {
|
|
165
|
+
readonly unstyled?: boolean | undefined;
|
|
166
|
+
}>>, TamaguiElement, import("@tamagui/core").TextPropsBase, {
|
|
179
167
|
readonly size?: FontSizeTokens | undefined;
|
|
180
168
|
} & {
|
|
181
169
|
unstyled?: boolean | undefined;
|
|
182
|
-
} &
|
|
183
|
-
|
|
184
|
-
}
|
|
170
|
+
} & {
|
|
171
|
+
readonly unstyled?: boolean | undefined;
|
|
172
|
+
}, {
|
|
185
173
|
displayName: string | undefined;
|
|
186
174
|
}>;
|
|
187
175
|
export declare const ListItemTitle: import("@tamagui/core").TamaguiComponent<(Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
@@ -218,9 +206,9 @@ export declare const ListItemTitle: import("@tamagui/core").TamaguiComponent<(Om
|
|
|
218
206
|
readonly size?: FontSizeTokens | undefined;
|
|
219
207
|
} & {
|
|
220
208
|
unstyled?: boolean | undefined;
|
|
221
|
-
} &
|
|
209
|
+
} & {
|
|
222
210
|
[x: string]: undefined;
|
|
223
|
-
}
|
|
211
|
+
}, {
|
|
224
212
|
displayName: string | undefined;
|
|
225
213
|
}>;
|
|
226
214
|
export declare const useListItem: (props: ListItemProps, { Text, Subtitle, Title, }?: {
|
|
@@ -698,43 +686,31 @@ export declare const ListItem: ((props: Omit<Omit<TextParentStyles, "TextCompone
|
|
|
698
686
|
}, {
|
|
699
687
|
displayName: string | undefined;
|
|
700
688
|
}>;
|
|
701
|
-
Subtitle: import("@tamagui/core").TamaguiComponent<
|
|
702
|
-
readonly size?: FontSizeTokens | undefined;
|
|
703
|
-
}, "unstyled"> & {
|
|
704
|
-
unstyled?: boolean | undefined;
|
|
705
|
-
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
706
|
-
readonly size?: FontSizeTokens | undefined;
|
|
707
|
-
}, "unstyled"> & {
|
|
708
|
-
unstyled?: boolean | undefined;
|
|
709
|
-
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
710
|
-
readonly size?: FontSizeTokens | undefined;
|
|
711
|
-
}, "unstyled"> & {
|
|
712
|
-
unstyled?: boolean | undefined;
|
|
713
|
-
}>>) | (Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
689
|
+
Subtitle: import("@tamagui/core").TamaguiComponent<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
714
690
|
readonly size?: FontSizeTokens | undefined;
|
|
715
691
|
} & {
|
|
716
692
|
unstyled?: boolean | undefined;
|
|
717
|
-
},
|
|
718
|
-
|
|
693
|
+
}, "unstyled"> & {
|
|
694
|
+
readonly unstyled?: boolean | undefined;
|
|
719
695
|
} & import("@tamagui/core").MediaProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
720
696
|
readonly size?: FontSizeTokens | undefined;
|
|
721
697
|
} & {
|
|
722
698
|
unstyled?: boolean | undefined;
|
|
723
|
-
},
|
|
724
|
-
|
|
699
|
+
}, "unstyled"> & {
|
|
700
|
+
readonly unstyled?: boolean | undefined;
|
|
725
701
|
}>> & import("@tamagui/core").PseudoProps<Partial<Omit<import("react-native").TextProps, "children" | ("onLayout" | keyof import("react-native").GestureResponderHandlers)> & import("@tamagui/core").ExtendsBaseTextProps & import("@tamagui/core").TamaguiComponentPropsBase & import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase> & import("@tamagui/core").WithShorthands<import("@tamagui/core").WithThemeValues<import("@tamagui/core").TextStylePropsBase>> & Omit<{
|
|
726
702
|
readonly size?: FontSizeTokens | undefined;
|
|
727
703
|
} & {
|
|
728
704
|
unstyled?: boolean | undefined;
|
|
729
|
-
},
|
|
730
|
-
|
|
731
|
-
}
|
|
705
|
+
}, "unstyled"> & {
|
|
706
|
+
readonly unstyled?: boolean | undefined;
|
|
707
|
+
}>>, TamaguiElement, import("@tamagui/core").TextPropsBase, {
|
|
732
708
|
readonly size?: FontSizeTokens | undefined;
|
|
733
709
|
} & {
|
|
734
710
|
unstyled?: boolean | undefined;
|
|
735
|
-
} &
|
|
736
|
-
|
|
737
|
-
}
|
|
711
|
+
} & {
|
|
712
|
+
readonly unstyled?: boolean | undefined;
|
|
713
|
+
}, {
|
|
738
714
|
displayName: string | undefined;
|
|
739
715
|
}>;
|
|
740
716
|
};
|
package/types/ListItem.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../src/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,cAAc,EACd,QAAQ,EAER,cAAc,EACd,cAAc,EAOf,MAAM,eAAe,CAAA;AAItB,OAAO,EAAe,gBAAgB,EAAsB,MAAM,eAAe,CAAA;AACjF,OAAO,KAAK,EAAE,EAAE,iBAAiB,EAAc,MAAM,OAAO,CAAA;AAE5D,KAAK,iBAAiB,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA;AAC1D,KAAK,QAAQ,GAAG,GAAG,CAAC,OAAO,GAAG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