@fountain-ui/core 3.0.0-alpha.22 → 3.0.0-alpha.24

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/build/commonjs/Chip/Chip.js +8 -4
  2. package/build/commonjs/Chip/Chip.js.map +1 -1
  3. package/build/commonjs/Chip/useChipStyle.js +25 -15
  4. package/build/commonjs/Chip/useChipStyle.js.map +1 -1
  5. package/build/commonjs/Dialog/useDialogStyle.js +1 -1
  6. package/build/commonjs/Dialog/useDialogStyle.js.map +1 -1
  7. package/build/commonjs/Image/Image.js +1 -1
  8. package/build/commonjs/Image/Image.js.map +1 -1
  9. package/build/commonjs/TextField/useVariantStyleMap.js +7 -5
  10. package/build/commonjs/TextField/useVariantStyleMap.js.map +1 -1
  11. package/build/commonjs/hooks/useContentContainerStyle.js +24 -3
  12. package/build/commonjs/hooks/useContentContainerStyle.js.map +1 -1
  13. package/build/commonjs/internal/icons/ChipClose.js +23 -0
  14. package/build/commonjs/internal/icons/ChipClose.js.map +1 -0
  15. package/build/commonjs/internal/icons/index.js +8 -0
  16. package/build/commonjs/internal/icons/index.js.map +1 -1
  17. package/build/module/Chip/Chip.js +9 -5
  18. package/build/module/Chip/Chip.js.map +1 -1
  19. package/build/module/Chip/useChipStyle.js +25 -15
  20. package/build/module/Chip/useChipStyle.js.map +1 -1
  21. package/build/module/Dialog/useDialogStyle.js +1 -1
  22. package/build/module/Dialog/useDialogStyle.js.map +1 -1
  23. package/build/module/Image/Image.js +1 -1
  24. package/build/module/Image/Image.js.map +1 -1
  25. package/build/module/TextField/useVariantStyleMap.js +7 -5
  26. package/build/module/TextField/useVariantStyleMap.js.map +1 -1
  27. package/build/module/hooks/useContentContainerStyle.js +24 -3
  28. package/build/module/hooks/useContentContainerStyle.js.map +1 -1
  29. package/build/module/internal/icons/ChipClose.js +9 -0
  30. package/build/module/internal/icons/ChipClose.js.map +1 -0
  31. package/build/module/internal/icons/index.js +1 -0
  32. package/build/module/internal/icons/index.js.map +1 -1
  33. package/build/typescript/Chip/useChipStyle.d.ts +3 -1
  34. package/build/typescript/hooks/useContentContainerStyle.d.ts +1 -0
  35. package/build/typescript/internal/icons/ChipClose.d.ts +131 -0
  36. package/build/typescript/internal/icons/index.d.ts +1 -0
  37. package/package.json +2 -2
  38. package/src/Chip/Chip.tsx +10 -6
  39. package/src/Chip/useChipStyle.ts +29 -16
  40. package/src/Dialog/useDialogStyle.ts +1 -1
  41. package/src/Image/Image.tsx +2 -2
  42. package/src/TextField/useVariantStyleMap.ts +4 -3
  43. package/src/hooks/useContentContainerStyle.ts +22 -2
  44. package/src/internal/icons/ChipClose.tsx +13 -0
  45. package/src/internal/icons/index.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","createFontStyle","useTheme","useChipStyle","size","startElementVariant","color","selected","theme","fontStyleMap","small","selector","typography","caption1","medium","palette","text","strongInverse","strong","large","body2","closeButtonStyleMap","height","marginLeft","spacing","width","baseContainerStyle","alignItems","backgroundColor","fill","base","surface","weaker","borderRadius","shape","radius","full","flexDirection","overflow","isLarge","variantStyleMap","avatar","container","paddingLeft","paddingRight","paddingVertical","startElement","startElementContainer","marginRight","icon","justifyContent","image","default","paddingBottom","paddingHorizontal","paddingTop","closeButton","label"],"sources":["useChipStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';\n\ninterface ChipStyle {\n container: FountainUiStyle;\n closeButton?: FountainUiStyle;\n label: TextStyle;\n startElement?: FountainUiStyle;\n startElementContainer?: FountainUiStyle;\n}\n\ntype VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;\n\n// TODO: need to refactoring...\nexport default function useChipStyle(\n size: ChipSize,\n startElementVariant: ChipStartElementVariant,\n color: ChipColor,\n selected: boolean,\n): ChipStyle {\n const theme = useTheme();\n\n return useMemo<ChipStyle>(() => {\n const fontStyleMap: Record<ChipSize, TextStyle> = {\n small: createFontStyle(theme, {\n selector: (typography) => typography.caption1.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n selector: (typography) => typography.body2.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n };\n\n const closeButtonStyleMap: Record<ChipSize, FountainUiStyle> = {\n small: {\n height: 14,\n marginLeft: theme.spacing(2),\n width: 8.17,\n },\n large: {\n height: 17,\n marginLeft: theme.spacing(2.5),\n width: 9,\n },\n };\n\n const baseContainerStyle: FountainUiStyle = {\n alignItems: 'center',\n backgroundColor: selected ? theme.palette.fill.base\n : color === 'white'\n ? theme.palette.surface.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n overflow: 'hidden',\n };\n\n const isLarge = size === 'large';\n\n const variantStyleMap: VariantStyleMap = {\n avatar: {\n container: {\n paddingLeft: theme.spacing(isLarge ? 1.5 : 1.25),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.25 : 1),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 26 : 23,\n width: isLarge ? 26 : 23,\n },\n startElementContainer: {\n marginRight: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n },\n icon: {\n container: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n startElement: {\n color: selected\n ? theme.palette.icon.strongInverse\n : theme.palette.icon.strong,\n height: isLarge ? 17 : 16,\n width: isLarge ? 17 : 16,\n },\n startElementContainer: {\n alignItems: 'center',\n height: isLarge ? 24 : 21,\n justifyContent: 'center',\n marginRight: theme.spacing(isLarge ? 1 : 0.75),\n width: isLarge ? 24 : 21,\n },\n },\n image: {\n container: {\n alignItems: 'center',\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 36 : 31,\n width: isLarge ? 48 : 40,\n },\n startElementContainer: {\n marginRight: theme.spacing(1.5),\n },\n },\n default: {\n container: {\n paddingBottom: theme.spacing(1.75),\n paddingHorizontal: theme.spacing(isLarge ? 3.5 : 3),\n paddingTop: theme.spacing(1.5),\n },\n },\n };\n\n return {\n container: {\n ...baseContainerStyle,\n ...variantStyleMap[startElementVariant]?.container,\n ...(selected ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),\n },\n closeButton: closeButtonStyleMap[size],\n label: fontStyleMap[size],\n startElement: variantStyleMap[startElementVariant]?.startElement,\n startElementContainer: variantStyleMap[startElementVariant]?.startElementContainer,\n };\n }, [theme, size, startElementVariant, color, selected]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAGA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;AAaA;AACA,eAAe,SAASC,YAAT,CACXC,IADW,EAEXC,mBAFW,EAGXC,KAHW,EAIXC,QAJW,EAKF;EACT,MAAMC,KAAK,GAAGN,QAAQ,EAAtB;EAEA,OAAOF,OAAO,CAAY,MAAM;IAAA;;IAC5B,MAAMS,YAAyC,GAAG;MAC9CC,KAAK,EAAET,eAAe,CAACO,KAAD,EAAQ;QAC1BG,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,QAAX,CAAoBC,MADpB;QAE1BR,KAAK,EAAEC,QAAQ,GAAGC,KAAK,CAACO,OAAN,CAAcC,IAAd,CAAmBC,aAAtB,GAAsCT,KAAK,CAACO,OAAN,CAAcC,IAAd,CAAmBE;MAF9C,CAAR,CADwB;MAK9CC,KAAK,EAAElB,eAAe,CAACO,KAAD,EAAQ;QAC1BG,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACQ,KAAX,CAAiBN,MADjB;QAE1BR,KAAK,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GH"}
1
+ {"version":3,"names":["useMemo","createFontStyle","useTheme","closeButtonContainerStyleMap","small","marginLeft","paddingTop","large","closeIconSize","height","width","useChipStyle","size","startElementVariant","color","selected","theme","fontStyleMap","selector","typography","caption1","medium","palette","text","strongInverse","strong","body2","baseContainerStyle","alignItems","backgroundColor","fill","base","surface","weaker","borderRadius","shape","radius","full","flexDirection","overflow","isLarge","variantStyleMap","avatar","container","paddingLeft","spacing","paddingRight","paddingVertical","startElement","startElementContainer","marginRight","icon","justifyContent","image","default","paddingBottom","closeButtonContainer","label"],"sources":["useChipStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { TextStyle } from 'react-native';\nimport type { FountainUiStyle } from '@fountain-ui/styles';\nimport type { SvgIconProps } from '../SvgIcon';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';\n\ninterface ChipStyle {\n container: FountainUiStyle;\n closeButtonContainer?: FountainUiStyle;\n closeIconSize?: Pick<SvgIconProps, 'height' | 'width'>;\n label: TextStyle;\n startElement?: FountainUiStyle;\n startElementContainer?: FountainUiStyle;\n}\n\ntype VariantStyleMap = Record<ChipStartElementVariant, Partial<ChipStyle>>;\n\nconst closeButtonContainerStyleMap: Record<ChipSize, FountainUiStyle> = {\n small: {\n marginLeft: 8,\n paddingTop: 1,\n },\n large: {\n marginLeft: 10,\n paddingTop: 1,\n },\n};\n\nconst closeIconSize: Record<ChipSize, ChipStyle['closeIconSize']> = {\n small: {\n height: 14,\n width: 8.17,\n },\n large: {\n height: 16,\n width: 9,\n },\n};\n\n// TODO: need to refactoring...\nexport default function useChipStyle(\n size: ChipSize,\n startElementVariant: ChipStartElementVariant,\n color: ChipColor,\n selected: boolean,\n): ChipStyle {\n const theme = useTheme();\n\n return useMemo<ChipStyle>(() => {\n const fontStyleMap: Record<ChipSize, TextStyle> = {\n small: createFontStyle(theme, {\n selector: (typography) => typography.caption1.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n large: createFontStyle(theme, {\n selector: (typography) => typography.body2.medium,\n color: selected ? theme.palette.text.strongInverse : theme.palette.text.strong,\n }),\n };\n\n const baseContainerStyle: FountainUiStyle = {\n alignItems: 'center',\n backgroundColor: selected ? theme.palette.fill.base\n : color === 'white'\n ? theme.palette.surface.base\n : theme.palette.fill.weaker,\n borderRadius: theme.shape.radius.full,\n flexDirection: 'row',\n overflow: 'hidden',\n };\n\n const isLarge = size === 'large';\n\n const variantStyleMap: VariantStyleMap = {\n avatar: {\n container: {\n paddingLeft: theme.spacing(isLarge ? 1.5 : 1.25),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.25 : 1),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 26 : 23,\n width: isLarge ? 26 : 23,\n },\n startElementContainer: {\n marginRight: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n },\n icon: {\n container: {\n paddingLeft: theme.spacing(1.5),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingVertical: theme.spacing(isLarge ? 1.5 : 1.25),\n },\n startElement: {\n color: selected\n ? theme.palette.icon.strongInverse\n : theme.palette.icon.strong,\n height: isLarge ? 17 : 16,\n width: isLarge ? 17 : 16,\n },\n startElementContainer: {\n alignItems: 'center',\n height: isLarge ? 24 : 21,\n justifyContent: 'center',\n marginRight: theme.spacing(isLarge ? 1 : 0.75),\n width: isLarge ? 24 : 21,\n },\n },\n image: {\n container: {\n alignItems: 'center',\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n },\n startElement: {\n borderRadius: theme.shape.radius.full,\n height: isLarge ? 36 : 31,\n width: isLarge ? 48 : 40,\n },\n startElementContainer: {\n marginRight: theme.spacing(1.5),\n },\n },\n default: {\n container: {\n paddingBottom: theme.spacing(1.75),\n paddingLeft: theme.spacing(isLarge ? 3.5 : 3),\n paddingRight: theme.spacing(isLarge ? 3.5 : 3),\n paddingTop: theme.spacing(1.5),\n },\n },\n };\n\n return {\n container: {\n ...baseContainerStyle,\n ...variantStyleMap[startElementVariant]?.container,\n ...(selected ? { paddingRight: theme.spacing(isLarge ? 2.5 : 2.25) } : {}),\n },\n closeButtonContainer: closeButtonContainerStyleMap[size],\n closeIconSize: closeIconSize[size],\n label: fontStyleMap[size],\n startElement: variantStyleMap[startElementVariant]?.startElement,\n startElementContainer: variantStyleMap[startElementVariant]?.startElementContainer,\n };\n }, [theme, size, startElementVariant, color, selected]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAIA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;AAcA,MAAMC,4BAA+D,GAAG;EACpEC,KAAK,EAAE;IACHC,UAAU,EAAE,CADT;IAEHC,UAAU,EAAE;EAFT,CAD6D;EAKpEC,KAAK,EAAE;IACHF,UAAU,EAAE,EADT;IAEHC,UAAU,EAAE;EAFT;AAL6D,CAAxE;AAWA,MAAME,aAA2D,GAAG;EAChEJ,KAAK,EAAE;IACHK,MAAM,EAAE,EADL;IAEHC,KAAK,EAAE;EAFJ,CADyD;EAKhEH,KAAK,EAAE;IACHE,MAAM,EAAE,EADL;IAEHC,KAAK,EAAE;EAFJ;AALyD,CAApE,C,CAWA;;AACA,eAAe,SAASC,YAAT,CACXC,IADW,EAEXC,mBAFW,EAGXC,KAHW,EAIXC,QAJW,EAKF;EACT,MAAMC,KAAK,GAAGd,QAAQ,EAAtB;EAEA,OAAOF,OAAO,CAAY,MAAM;IAAA;;IAC5B,MAAMiB,YAAyC,GAAG;MAC9Cb,KAAK,EAAEH,eAAe,CAACe,KAAD,EAAQ;QAC1BE,QAAQ,EAAGC,UAAD,IAAgBA,UAAU,CAACC,QAAX,CAAoBC,MADpB;QAE1BP,KAAK,EAAEC,QAAQ,GAAGC,KAAK,CAACM,OAAN,CAAcC,IAAd,CAAmBC,aAAtB,GAAsCR,KAAK,CAACM,OAAN,CAAcC,IAAd,CAAmBE;MAF9C,CAAR,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mGH"}
@@ -29,7 +29,7 @@ export default function useDialogStyle(size) {
29
29
  },
30
30
  full: {
31
31
  paddingBottom: bottomSafeAreaInset,
32
- paddingTop: topSafeAreaInset
32
+ paddingTop: Math.max(0, topSafeAreaInset - 3)
33
33
  }
34
34
  };
35
35
  const containerPaddingVertical = 24;
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","useWindowDimensions","useSafeAreaInsets","useTheme","useDialogStyle","size","theme","height","windowHeight","width","windowWidth","bottom","bottomSafeAreaInset","top","topSafeAreaInset","sizeStyleMap","small","maxWidth","medium","large","minHeight","full","paddingBottom","paddingTop","containerPaddingVertical","dialogMaxHeight","dialogMaxWidth","isFullScreen","root","alignItems","justifyContent","zIndex","dialog","container","paddingHorizontal","breakpoints","values","xs","paddingVertical","paper","backgroundColor","palette","surface","base","borderRadius","shape","radius","xl","maxHeight","overflow","topElementContainer","topElementContent","position"],"sources":["useDialogStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { DialogSize } from './DialogProps';\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent';\n\ntype DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;\n\nexport default function useDialogStyle(size: DialogSize): DialogStyles {\n const theme = useTheme();\n\n const {\n height: windowHeight,\n width: windowWidth,\n } = useWindowDimensions();\n\n const {\n bottom: bottomSafeAreaInset,\n top: topSafeAreaInset,\n } = useSafeAreaInsets();\n\n return useMemo(() => {\n const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n maxWidth: 260,\n },\n medium: {\n maxWidth: 400,\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n width: 512,\n },\n full: {\n paddingBottom: bottomSafeAreaInset,\n paddingTop: topSafeAreaInset,\n },\n };\n\n const containerPaddingVertical = 24;\n const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;\n const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;\n\n const isFullScreen = size === 'full';\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.dialog,\n },\n container: isFullScreen ? {\n height: '100%',\n width: '100%',\n } : {\n alignItems: 'center',\n paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,\n paddingVertical: containerPaddingVertical,\n width: '100%',\n },\n paper: isFullScreen ? {\n backgroundColor: theme.palette.surface.base,\n height: '100%',\n width: '100%',\n ...sizeStyleMap[size],\n } : {\n backgroundColor: theme.palette.surface.base,\n borderRadius: theme.shape.radius.xl,\n maxHeight: dialogMaxHeight,\n overflow: 'hidden',\n width: '100%',\n ...sizeStyleMap[size],\n },\n topElementContainer: {\n maxWidth: dialogMaxWidth,\n width: '100%',\n },\n topElementContent: {\n position: 'absolute',\n bottom: 0,\n width: '100%',\n },\n };\n }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AAYA,eAAe,SAASC,cAAT,CAAwBC,IAAxB,EAAwD;EACnE,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAM;IACFI,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IAGFT,mBAAmB,EAHvB;EAKA,MAAM;IACFU,MAAM,EAAEC,mBADN;IAEFC,GAAG,EAAEC;EAFH,IAGFZ,iBAAiB,EAHrB;EAKA,OAAOF,OAAO,CAAC,MAAM;IAAA;;IACjB,MAAMe,YAAiD,GAAG;MACtDC,KAAK,EAAE;QACHC,QAAQ,EAAE;MADP,CAD+C;MAItDC,MAAM,EAAE;QACJD,QA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EvB,eAHX;QAIAwB,QAAQ,EAAE,QAJV;QAKAxC,KAAK,EAAE,MALP;QAMA,GAAGM,YAAY,CAACV,IAAD;MANf,CApBD;MA4BH6C,mBAAmB,EAAE;QACjBjC,QAAQ,EAAES,cADO;QAEjBjB,KAAK,EAAE;MAFU,CA5BlB;MAgCH0C,iBAAiB,EAAE;QACfC,QAAQ,EAAE,UADK;QAEfzC,MAAM,EAAE,CAFO;QAGfF,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CA/Da,EA+DX,CAACH,KAAD,EAAQE,YAAR,EAAsBE,WAAtB,EAAmCL,IAAnC,EAAyCO,mBAAzC,EAA8DE,gBAA9D,CA/DW,CAAd;AAgEH"}
1
+ {"version":3,"names":["useMemo","useWindowDimensions","useSafeAreaInsets","useTheme","useDialogStyle","size","theme","height","windowHeight","width","windowWidth","bottom","bottomSafeAreaInset","top","topSafeAreaInset","sizeStyleMap","small","maxWidth","medium","large","minHeight","full","paddingBottom","paddingTop","Math","max","containerPaddingVertical","dialogMaxHeight","dialogMaxWidth","isFullScreen","root","alignItems","justifyContent","zIndex","dialog","container","paddingHorizontal","breakpoints","values","xs","paddingVertical","paper","backgroundColor","palette","surface","base","borderRadius","shape","radius","xl","maxHeight","overflow","topElementContainer","topElementContent","position"],"sources":["useDialogStyle.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport { useWindowDimensions } from 'react-native';\nimport { useSafeAreaInsets } from 'react-native-safe-area-context';\nimport type { FountainUiStyle, NamedStylesStringUnion } from '@fountain-ui/styles';\nimport { useTheme } from '../styles';\nimport type { DialogSize } from './DialogProps';\n\ntype DialogStyleKeys =\n | 'root'\n | 'container'\n | 'paper'\n | 'topElementContainer'\n | 'topElementContent';\n\ntype DialogStyles = NamedStylesStringUnion<DialogStyleKeys>;\n\nexport default function useDialogStyle(size: DialogSize): DialogStyles {\n const theme = useTheme();\n\n const {\n height: windowHeight,\n width: windowWidth,\n } = useWindowDimensions();\n\n const {\n bottom: bottomSafeAreaInset,\n top: topSafeAreaInset,\n } = useSafeAreaInsets();\n\n return useMemo(() => {\n const sizeStyleMap: Record<DialogSize, FountainUiStyle> = {\n small: {\n maxWidth: 260,\n },\n medium: {\n maxWidth: 400,\n },\n large: {\n maxWidth: 512,\n minHeight: 360,\n width: 512,\n },\n full: {\n paddingBottom: bottomSafeAreaInset,\n paddingTop: Math.max(0, topSafeAreaInset - 3),\n },\n };\n\n const containerPaddingVertical = 24;\n const dialogMaxHeight = windowHeight - containerPaddingVertical * 2;\n const dialogMaxWidth = sizeStyleMap[size]?.maxWidth;\n\n const isFullScreen = size === 'full';\n\n return {\n root: {\n alignItems: 'center',\n justifyContent: 'center',\n zIndex: theme.zIndex.dialog,\n },\n container: isFullScreen ? {\n height: '100%',\n width: '100%',\n } : {\n alignItems: 'center',\n paddingHorizontal: windowWidth > theme.breakpoints.values.xs ? 24 : 16,\n paddingVertical: containerPaddingVertical,\n width: '100%',\n },\n paper: isFullScreen ? {\n backgroundColor: theme.palette.surface.base,\n height: '100%',\n width: '100%',\n ...sizeStyleMap[size],\n } : {\n backgroundColor: theme.palette.surface.base,\n borderRadius: theme.shape.radius.xl,\n maxHeight: dialogMaxHeight,\n overflow: 'hidden',\n width: '100%',\n ...sizeStyleMap[size],\n },\n topElementContainer: {\n maxWidth: dialogMaxWidth,\n width: '100%',\n },\n topElementContent: {\n position: 'absolute',\n bottom: 0,\n width: '100%',\n },\n };\n }, [theme, windowHeight, windowWidth, size, bottomSafeAreaInset, topSafeAreaInset]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AACA,SAASC,mBAAT,QAAoC,cAApC;AACA,SAASC,iBAAT,QAAkC,gCAAlC;AAEA,SAASC,QAAT,QAAyB,WAAzB;AAYA,eAAe,SAASC,cAAT,CAAwBC,IAAxB,EAAwD;EACnE,MAAMC,KAAK,GAAGH,QAAQ,EAAtB;EAEA,MAAM;IACFI,MAAM,EAAEC,YADN;IAEFC,KAAK,EAAEC;EAFL,IA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e,EAAEpC,KAAK,CAACqC,OAAN,CAAcC,OAAd,CAAsBC,IADrB;QAElBtC,MAAM,EAAE,MAFU;QAGlBE,KAAK,EAAE,MAHW;QAIlB,GAAGM,YAAY,CAACV,IAAD;MAJG,CAAH,GAKf;QACAqC,eAAe,EAAEpC,KAAK,CAACqC,OAAN,CAAcC,OAAd,CAAsBC,IADvC;QAEAC,YAAY,EAAExC,KAAK,CAACyC,KAAN,CAAYC,MAAZ,CAAmBC,EAFjC;QAGAC,SAAS,EAAEvB,eAHX;QAIAwB,QAAQ,EAAE,QAJV;QAKA1C,KAAK,EAAE,MALP;QAMA,GAAGM,YAAY,CAACV,IAAD;MANf,CApBD;MA4BH+C,mBAAmB,EAAE;QACjBnC,QAAQ,EAAEW,cADO;QAEjBnB,KAAK,EAAE;MAFU,CA5BlB;MAgCH4C,iBAAiB,EAAE;QACfC,QAAQ,EAAE,UADK;QAEf3C,MAAM,EAAE,CAFO;QAGfF,KAAK,EAAE;MAHQ;IAhChB,CAAP;EAsCH,CA/Da,EA+DX,CAACH,KAAD,EAAQE,YAAR,EAAsBE,WAAtB,EAAmCL,IAAnC,EAAyCO,mBAAzC,EAA8DE,gBAA9D,CA/DW,CAAd;AAgEH"}
@@ -17,7 +17,7 @@ const useStyles = function () {
17
17
  backgroundColor: theme.palette.paper.grey
18
18
  },
19
19
  outlined: {
20
- borderWidth: StyleSheet.hairlineWidth,
20
+ borderWidth: 0.5,
21
21
  borderStyle: 'solid',
22
22
  borderColor: theme.palette.border.weak
23
23
  },
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","Text","View","ImageCore","css","StyleSheet","useTheme","useStyles","theme","root","rounded","borderRadius","shape","roundness","overflow","placeholder","backgroundColor","palette","paper","grey","outlined","borderWidth","hairlineWidth","borderStyle","borderColor","border","weak","error","alignItems","height","justifyContent","width","errorText","color","text","primary","fontFamily","fontSize","letterSpacing","lineHeight","textAlign","determinePlaceholderMode","props","disablePlaceholder","Image","alt","cache","disableDrag","disableLongClick","disableOutline","loading","onError","onErrorProp","onLoad","onLoadProp","overlaidChildren","resizeMode","source","style","square","otherProps","failed","setFailed","styles","placeholderMode","undefined","absoluteFill","zIndex","uri"],"sources":["Image.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport type { ImageCoreProps } from '../ImageCore';\nimport ImageCore from '../ImageCore';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type ImageProps from './ImageProps';\n\ntype PlaceholderMode =\n | 'default'\n | 'custom'\n | 'none';\n\ntype ImageStyleKeys =\n | 'root'\n | 'rounded'\n | 'placeholder'\n | 'outlined'\n | 'error'\n | 'errorText';\n\ntype ImageStyles = NamedStylesStringUnion<ImageStyleKeys>;\n\nconst useStyles: UseStyles<ImageStyles> = function (): ImageStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rounded: {\n borderRadius: theme.shape.roundness,\n overflow: 'hidden',\n },\n placeholder: {\n backgroundColor: theme.palette.paper.grey,\n },\n outlined: {\n borderWidth: StyleSheet.hairlineWidth,\n borderStyle: 'solid',\n borderColor: theme.palette.border.weak,\n },\n error: {\n alignItems: 'center',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n errorText: {\n color: theme.palette.text.primary,\n fontFamily: 'Inter-Medium',\n fontSize: 12,\n letterSpacing: 0,\n lineHeight: 18,\n textAlign: 'center',\n },\n };\n};\n\nfunction determinePlaceholderMode(props: ImageProps): PlaceholderMode {\n if (props.disablePlaceholder) {\n return 'none';\n }\n\n return props.placeholder ? 'custom' : 'default';\n}\n\nexport default function Image(props: ImageProps) {\n const {\n alt,\n cache = 'immutable',\n disableDrag,\n disableLongClick,\n disableOutline,\n disablePlaceholder,\n error,\n loading = 'lazy',\n onError: onErrorProp,\n onLoad: onLoadProp,\n overlaidChildren,\n placeholder,\n resizeMode = 'cover',\n source,\n style,\n square = false,\n ...otherProps\n } = props;\n\n const [failed, setFailed] = useState(false);\n\n const styles = useStyles();\n\n const onLoad: ImageCoreProps['onLoad'] = () => {\n setFailed(false);\n\n onLoadProp?.();\n };\n\n const onError: ImageCoreProps['onError'] = () => {\n setFailed(true);\n\n onErrorProp?.();\n };\n\n const placeholderMode = determinePlaceholderMode(props);\n\n return (\n <View\n style={css([\n styles.root,\n !disableOutline ? styles.outlined : undefined,\n !square ? styles.rounded : undefined,\n placeholderMode === 'default' ? styles.placeholder : undefined,\n style,\n ])}\n {...otherProps}\n >\n {placeholderMode === 'custom' ? (\n <View\n style={css([\n StyleSheet.absoluteFill,\n { zIndex: -1 },\n ])}\n >\n {placeholder}\n </View>\n ) : null}\n\n {failed ? (\n <View style={styles.error}>\n {error ?? (\n <Text\n children={alt}\n style={styles.errorText}\n />\n )}\n </View>\n ) : source.uri ? (\n <ImageCore\n alt={alt}\n cache={cache}\n disableDrag={disableDrag}\n disableLongClick={disableLongClick}\n height={'100%'}\n loading={loading}\n onError={onError}\n onLoad={onLoad}\n resizeMode={resizeMode}\n source={source}\n width={'100%'}\n />\n ) : null}\n\n {overlaidChildren ? (\n <View style={StyleSheet.absoluteFill}>\n {overlaidChildren}\n </View>\n ) : null}\n </View>\n );\n};"],"mappings":";;AAAA,OAAOA,KAAP,IAAgBC,QAAhB,QAAgC,OAAhC;AACA,SAASC,IAAT,EAAeC,IAAf,QAA2B,cAA3B;AAGA,OAAOC,SAAP,MAAsB,cAAtB;AACA,SAASC,GAAT,EAAcC,UAAd,EAA0BC,QAA1B,QAA0C,WAA1C;;AAkBA,MAAMC,SAAiC,GAAG,YAAyB;EAC/D,MAAMC,KAAK,GAAGF,QAAQ,EAAtB;EAEA,OAAO;IACHG,IAAI,EAAE,EADH;IAEHC,OAAO,EAAE;MACLC,YAAY,EAAEH,KAAK,CAACI,KAAN,CAAYC,SADrB;MAELC,QAAQ,EAAE;IAFL,CAFN;IAMHC,WAAW,EAAE;MACTC,eAAe,EAAER,KAAK,CAACS,OAAN,CAAcC,KAAd,CAAoBC;IAD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,UAAU,EAAEG,UAThB;IAUI,MAAM,EAAEC,MAVZ;IAWI,KAAK,EAAE;EAXX,EADA,GAcA,IA5CR,EA8CKF,gBAAgB,gBACb,oBAAC,IAAD;IAAM,KAAK,EAAElD,UAAU,CAAC6D;EAAxB,GACKX,gBADL,CADa,GAIb,IAlDR,CADJ;AAsDH;AAAA"}
1
+ {"version":3,"names":["React","useState","Text","View","ImageCore","css","StyleSheet","useTheme","useStyles","theme","root","rounded","borderRadius","shape","roundness","overflow","placeholder","backgroundColor","palette","paper","grey","outlined","borderWidth","borderStyle","borderColor","border","weak","error","alignItems","height","justifyContent","width","errorText","color","text","primary","fontFamily","fontSize","letterSpacing","lineHeight","textAlign","determinePlaceholderMode","props","disablePlaceholder","Image","alt","cache","disableDrag","disableLongClick","disableOutline","loading","onError","onErrorProp","onLoad","onLoadProp","overlaidChildren","resizeMode","source","style","square","otherProps","failed","setFailed","styles","placeholderMode","undefined","absoluteFill","zIndex","uri"],"sources":["Image.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { Text, View } from 'react-native';\nimport type { NamedStylesStringUnion, UseStyles } from '@fountain-ui/styles';\nimport type { ImageCoreProps } from '../ImageCore';\nimport ImageCore from '../ImageCore';\nimport { css, StyleSheet, useTheme } from '../styles';\nimport type ImageProps from './ImageProps';\n\ntype PlaceholderMode =\n | 'default'\n | 'custom'\n | 'none';\n\ntype ImageStyleKeys =\n | 'root'\n | 'rounded'\n | 'placeholder'\n | 'outlined'\n | 'error'\n | 'errorText';\n\ntype ImageStyles = NamedStylesStringUnion<ImageStyleKeys>;\n\nconst useStyles: UseStyles<ImageStyles> = function (): ImageStyles {\n const theme = useTheme();\n\n return {\n root: {},\n rounded: {\n borderRadius: theme.shape.roundness,\n overflow: 'hidden',\n },\n placeholder: {\n backgroundColor: theme.palette.paper.grey,\n },\n outlined: {\n borderWidth: 0.5,\n borderStyle: 'solid',\n borderColor: theme.palette.border.weak,\n },\n error: {\n alignItems: 'center',\n height: '100%',\n justifyContent: 'center',\n width: '100%',\n },\n errorText: {\n color: theme.palette.text.primary,\n fontFamily: 'Inter-Medium',\n fontSize: 12,\n letterSpacing: 0,\n lineHeight: 18,\n textAlign: 'center',\n },\n };\n};\n\nfunction determinePlaceholderMode(props: ImageProps): PlaceholderMode {\n if (props.disablePlaceholder) {\n return 'none';\n }\n\n return props.placeholder ? 'custom' : 'default';\n}\n\nexport default function Image(props: ImageProps) {\n const {\n alt,\n cache = 'immutable',\n disableDrag,\n disableLongClick,\n disableOutline,\n disablePlaceholder,\n error,\n loading = 'lazy',\n onError: onErrorProp,\n onLoad: onLoadProp,\n overlaidChildren,\n placeholder,\n resizeMode = 'cover',\n source,\n style,\n square = false,\n ...otherProps\n } = props;\n\n const [failed, setFailed] = useState(false);\n\n const styles = useStyles();\n\n const onLoad: ImageCoreProps['onLoad'] = () => {\n setFailed(false);\n\n onLoadProp?.();\n };\n\n const onError: ImageCoreProps['onError'] = () => {\n setFailed(true);\n\n onErrorProp?.();\n };\n\n const placeholderMode = determinePlaceholderMode(props);\n\n return (\n <View\n style={css([\n styles.root,\n !disableOutline ? styles.outlined : undefined,\n !square ? styles.rounded : undefined,\n placeholderMode === 'default' ? styles.placeholder : undefined,\n style,\n ])}\n {...otherProps}\n >\n {placeholderMode === 'custom' ? (\n <View\n style={css([\n StyleSheet.absoluteFill,\n { zIndex: -1 },\n ])}\n >\n {placeholder}\n </View>\n ) : null}\n\n {failed ? (\n <View style={styles.error}>\n {error ?? (\n <Text\n children={alt}\n style={styles.errorText}\n />\n )}\n </View>\n ) : source.uri ? (\n <ImageCore\n alt={alt}\n cache={cache}\n disableDrag={disableDrag}\n disableLongClick={disableLongClick}\n height={'100%'}\n loading={loading}\n onError={onError}\n onLoad={onLoad}\n resizeMode={resizeMode}\n source={source}\n width={'100%'}\n />\n ) : null}\n\n {overlaidChildren ? (\n <View style={StyleSheet.absoluteFill}>\n {overlaidChildren}\n </View>\n ) : null}\n </View>\n );\n};\n"],"mappings":";;AAAA,OAA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L,CADH,GASG,IAnBR,EAqBK6C,MAAM,gBACH,oBAAC,IAAD;IAAM,KAAK,EAAEE,MAAM,CAACpC;EAApB,GACKA,KAAK,iBACF,oBAAC,IAAD;IACI,QAAQ,EAAEkB,GADd;IAEI,KAAK,EAAEkB,MAAM,CAAC/B;EAFlB,EAFR,CADG,GASHyB,MAAM,CAACW,GAAP,gBACA,oBAAC,SAAD;IACI,GAAG,EAAEvB,GADT;IAEI,KAAK,EAAEC,KAFX;IAGI,WAAW,EAAEC,WAHjB;IAII,gBAAgB,EAAEC,gBAJtB;IAKI,MAAM,EAAE,MALZ;IAMI,OAAO,EAAEE,OANb;IAOI,OAAO,EAAEC,OAPb;IAQI,MAAM,EAAEE,MARZ;IASI,UAAU,EAAEG,UAThB;IAUI,MAAM,EAAEC,MAVZ;IAWI,KAAK,EAAE;EAXX,EADA,GAcA,IA5CR,EA8CKF,gBAAgB,gBACb,oBAAC,IAAD;IAAM,KAAK,EAAEjD,UAAU,CAAC4D;EAAxB,GACKX,gBADL,CADa,GAIb,IAlDR,CADJ;AAsDH;AAAA"}
@@ -39,12 +39,12 @@ export default function useVariantStyleMap(variant, status, isFocused) {
39
39
  containerStyle: {
40
40
  borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,
41
41
  borderBottomWidth: 1,
42
- minHeight: 60
42
+ minHeight: 60,
43
+ paddingVertical: 16
43
44
  },
44
45
  inputStyle: {
45
- paddingLeft: 0,
46
- paddingRight: theme.spacing(4),
47
- paddingVertical: theme.spacing(4),
46
+ padding: 0,
47
+ paddingRight: 16,
48
48
  ...createFontStyle(theme, {
49
49
  selector: _ => typographyOf({
50
50
  fontSize: 18,
@@ -75,7 +75,9 @@ export default function useVariantStyleMap(variant, status, isFocused) {
75
75
  paddingHorizontal: 39,
76
76
  paddingTop: 11
77
77
  },
78
- inputStyle: { ...createFontStyle(theme, {
78
+ inputStyle: {
79
+ padding: 0,
80
+ ...createFontStyle(theme, {
79
81
  selector: _ => typographyOf({
80
82
  fontSize: 16,
81
83
  lineHeight: 19.2,
@@ -1 +1 @@
1
- {"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useStatusColor","theme","status","borderColor","palette","border","base","hintColor","text","weak","success","danger","useVariantStyleMap","variant","isFocused","containerStyle","borderBottomColor","strong","borderBottomWidth","minHeight","inputStyle","paddingLeft","paddingRight","spacing","paddingVertical","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","hintStyle","marginTop","typography","caption1","backgroundColor","surface","supportive","borderRadius","shape","radius","md","borderWidth","paddingBottom","paddingHorizontal","paddingTop"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\n\ninterface VariantStyleMap {\n containerStyle?: FountainUiStyle;\n inputStyle?: FountainUiStyle;\n hintStyle?: FountainUiStyle;\n}\n\nfunction useStatusColor(theme: Theme, status: TextFieldStatus): { borderColor: string; hintColor: string; } {\n switch (status) {\n default:\n case 'default':\n return {\n borderColor: theme.palette.border.base,\n hintColor: theme.palette.text.weak,\n };\n case 'success':\n return {\n borderColor: theme.palette.status.success,\n hintColor: theme.palette.status.success,\n };\n case 'error':\n return {\n borderColor: theme.palette.status.danger,\n hintColor: theme.palette.status.danger,\n };\n }\n}\n\nexport default function useVariantStyleMap(variant: TextFieldVariant, status: TextFieldStatus, isFocused: boolean): VariantStyleMap {\n const theme = useTheme();\n\n const {\n borderColor,\n hintColor,\n } = useStatusColor(theme, status);\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'default':\n return {\n containerStyle: {\n borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,\n borderBottomWidth: 1,\n minHeight: 60,\n },\n inputStyle: {\n paddingLeft: 0,\n paddingRight: theme.spacing(4),\n paddingVertical: theme.spacing(4),\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 18,\n lineHeight: 27,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n },\n hintStyle: {\n marginTop: theme.spacing(2),\n ...createFontStyle(theme, {\n selector: (typography) => typography.caption1['regular'],\n color: hintColor,\n }),\n },\n };\n case 'search':\n return {\n containerStyle: {\n backgroundColor: theme.palette.surface.supportive,\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.md,\n borderWidth: 0.5,\n paddingBottom: 12,\n paddingHorizontal: 39,\n paddingTop: 11,\n },\n inputStyle: {\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: -0.16,\n }),\n color: theme.palette.text.strong,\n }),\n },\n };\n }\n }, [theme, borderColor, hintColor, variant, isFocused]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;;AASA,SAASC,cAAT,CAAwBC,KAAxB,EAAsCC,MAAtC,EAA4G;EACxG,QAAQA,MAAR;IACI;IACA,KAAK,SAAL;MACI,OAAO;QACHC,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,IAD/B;QAEHC,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBC;MAF3B,CAAP;;IAIJ,KAAK,SAAL;MACI,OAAO;QACHN,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ,OAD/B;QAEHH,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ;MAF7B,CAAP;;IAIJ,KAAK,OAAL;MACI,OAAO;QACHP,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS,MAD/B;QAEHJ,SAAS,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;YAFe,CAAR;UAFX;QApBR,CAAP;;MA4BJ,KAAK,QAAL;QACI,OAAO;UACHQ,cAAc,EAAE;YACZqB,eAAe,EAAEnC,KAAK,CAACG,OAAN,CAAciC,OAAd,CAAsBC,UAD3B;YAEZnC,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,IAFtB;YAGZiC,YAAY,EAAEtC,KAAK,CAACuC,KAAN,CAAYC,MAAZ,CAAmBC,EAHrB;YAIZC,WAAW,EAAE,GAJD;YAKZC,aAAa,EAAE,EALH;YAMZC,iBAAiB,EAAE,EANP;YAOZC,UAAU,EAAE;UAPA,CADb;UAUH1B,UAAU,EAAE,EACR,GAAGtB,eAAe,CAACG,KAAD,EAAQ;cACtBwB,QAAQ,EAAGC,CAAD,IAAO7B,YAAY,CAAC;gBAC1B8B,QAAQ,EAAE,EADgB;gBAE1BC,UAAU,EAAE,IAFc;gBAG1BC,UAAU,EAAE,wBAHc;gBAI1BC,aAAa,EAAE,CAAC;cAJU,CAAD,CADP;cAOtBC,KAAK,EAAE9B,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBS;YAPJ,CAAR;UADV;QAVT,CAAP;IAhCR;EAuDH,CAxDa,EAwDX,CAAChB,KAAD,EAAQE,WAAR,EAAqBI,SAArB,EAAgCM,OAAhC,EAAyCC,SAAzC,CAxDW,CAAd;AAyDH"}
1
+ {"version":3,"names":["useMemo","typographyOf","createFontStyle","useTheme","useStatusColor","theme","status","borderColor","palette","border","base","hintColor","text","weak","success","danger","useVariantStyleMap","variant","isFocused","containerStyle","borderBottomColor","strong","borderBottomWidth","minHeight","paddingVertical","inputStyle","padding","paddingRight","selector","_","fontSize","lineHeight","fontFamily","letterSpacing","color","hintStyle","marginTop","spacing","typography","caption1","backgroundColor","surface","supportive","borderRadius","shape","radius","md","borderWidth","paddingBottom","paddingHorizontal","paddingTop"],"sources":["useVariantStyleMap.ts"],"sourcesContent":["import { useMemo } from 'react';\nimport type { FountainUiStyle, Theme } from '@fountain-ui/styles';\nimport { typographyOf } from '@fountain-ui/styles';\nimport { createFontStyle, useTheme } from '../styles';\nimport type { TextFieldStatus, TextFieldVariant } from './TextFieldProps';\n\ninterface VariantStyleMap {\n containerStyle?: FountainUiStyle;\n inputStyle?: FountainUiStyle;\n hintStyle?: FountainUiStyle;\n}\n\nfunction useStatusColor(theme: Theme, status: TextFieldStatus): { borderColor: string; hintColor: string; } {\n switch (status) {\n default:\n case 'default':\n return {\n borderColor: theme.palette.border.base,\n hintColor: theme.palette.text.weak,\n };\n case 'success':\n return {\n borderColor: theme.palette.status.success,\n hintColor: theme.palette.status.success,\n };\n case 'error':\n return {\n borderColor: theme.palette.status.danger,\n hintColor: theme.palette.status.danger,\n };\n }\n}\n\nexport default function useVariantStyleMap(variant: TextFieldVariant, status: TextFieldStatus, isFocused: boolean): VariantStyleMap {\n const theme = useTheme();\n\n const {\n borderColor,\n hintColor,\n } = useStatusColor(theme, status);\n\n return useMemo(() => {\n switch (variant) {\n default:\n case 'default':\n return {\n containerStyle: {\n borderBottomColor: status === 'default' && isFocused ? theme.palette.border.strong : borderColor,\n borderBottomWidth: 1,\n minHeight: 60,\n paddingVertical: 16,\n },\n inputStyle: {\n padding: 0,\n paddingRight: 16,\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 18,\n lineHeight: 27,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: 0,\n }),\n color: theme.palette.text.strong,\n }),\n },\n hintStyle: {\n marginTop: theme.spacing(2),\n ...createFontStyle(theme, {\n selector: (typography) => typography.caption1['regular'],\n color: hintColor,\n }),\n },\n };\n case 'search':\n return {\n containerStyle: {\n backgroundColor: theme.palette.surface.supportive,\n borderColor: theme.palette.border.base,\n borderRadius: theme.shape.radius.md,\n borderWidth: 0.5,\n paddingBottom: 12,\n paddingHorizontal: 39,\n paddingTop: 11,\n },\n inputStyle: {\n padding: 0,\n ...createFontStyle(theme, {\n selector: (_) => typographyOf({\n fontSize: 16,\n lineHeight: 19.2,\n fontFamily: 'PretendardStd-SemiBold',\n letterSpacing: -0.16,\n }),\n color: theme.palette.text.strong,\n }),\n },\n };\n }\n }, [theme, borderColor, hintColor, variant, isFocused]);\n}\n"],"mappings":"AAAA,SAASA,OAAT,QAAwB,OAAxB;AAEA,SAASC,YAAT,QAA6B,qBAA7B;AACA,SAASC,eAAT,EAA0BC,QAA1B,QAA0C,WAA1C;;AASA,SAASC,cAAT,CAAwBC,KAAxB,EAAsCC,MAAtC,EAA4G;EACxG,QAAQA,MAAR;IACI;IACA,KAAK,SAAL;MACI,OAAO;QACHC,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcC,MAAd,CAAqBC,IAD/B;QAEHC,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBC;MAF3B,CAAP;;IAIJ,KAAK,SAAL;MACI,OAAO;QACHN,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ,OAD/B;QAEHH,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBQ;MAF7B,CAAP;;IAIJ,KAAK,OAAL;MACI,OAAO;QACHP,WAAW,EAAEF,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS,MAD/B;QAEHJ,SAAS,EAAEN,KAAK,CAACG,OAAN,CAAcF,MAAd,CAAqBS;MAF7B,CAAP;EAbR;AAkBH;;AAED,eAAe,SAASC,kBAAT,CAA4BC,OAA5B,EAAuDX,MAAvD,EAAgFY,SAAhF,EAAqH;EAChI,MAAMb,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAM;IACFI,WADE;IAEFI;EAFE,IAGFP,cAAc,CAACC,KAAD,EAAQC,MAAR,CAHlB;EAKA,OAAON,OAAO,CAAC,MAAM;IACjB,QAAQiB,OAAR;MACI;MACA,KAAK,SAAL;QACI,OAAO;UACHE,cAAc,EAAE;YACZC,iBAAiB,EAAEd,MAAM,KAAK,SAAX,IAAwBY,SAAxB,GAAoCb,KA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,IAAO5B,YAAY,CAAC;gBAC1B6B,QAAQ,EAAE,EADgB;gBAE1BC,UAAU,EAAE,IAFc;gBAG1BC,UAAU,EAAE,wBAHc;gBAI1BC,aAAa,EAAE,CAAC;cAJU,CAAD,CADP;cAOtBC,KAAK,EAAE7B,KAAK,CAACG,OAAN,CAAcI,IAAd,CAAmBS;YAPJ,CAAR;UAFV;QAVT,CAAP;IAhCR;EAwDH,CAzDa,EAyDX,CAAChB,KAAD,EAAQE,WAAR,EAAqBI,SAArB,EAAgCM,OAAhC,EAAyCC,SAAzC,CAzDW,CAAd;AA0DH"}
@@ -11,7 +11,27 @@ function getMaxWidth(theme, breakpoint, customMaxWidth) {
11
11
  }
12
12
  }
13
13
 
14
- function getPaddingHorizontal(theme, breakpoint) {
14
+ function getHomeScreenPaddingHorizontal(theme, breakpoint) {
15
+ switch (breakpoint) {
16
+ case 'xxs':
17
+ case 'xs':
18
+ return theme.spacing(3);
19
+
20
+ case 'sm':
21
+ return theme.spacing(6);
22
+
23
+ case 'md':
24
+ case 'lg':
25
+ default:
26
+ return theme.spacing(4);
27
+ }
28
+ }
29
+
30
+ function getPaddingHorizontal(theme, breakpoint, isHomeScreen) {
31
+ if (isHomeScreen) {
32
+ return getHomeScreenPaddingHorizontal(theme, breakpoint);
33
+ }
34
+
15
35
  switch (breakpoint) {
16
36
  case 'sm':
17
37
  return theme.spacing(6);
@@ -25,7 +45,8 @@ export default function useContentContainerStyle() {
25
45
  let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
26
46
  const {
27
47
  maxWidth: customMaxWidth,
28
- styleProvider
48
+ styleProvider,
49
+ isHomeScreen = false
29
50
  } = config;
30
51
  const theme = useTheme();
31
52
  const currentBreakpoint = theme.breakpoints.current;
@@ -33,7 +54,7 @@ export default function useContentContainerStyle() {
33
54
  return css([{
34
55
  alignSelf: 'center',
35
56
  maxWidth: getMaxWidth(theme, currentBreakpoint, customMaxWidth),
36
- paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint),
57
+ paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint, isHomeScreen),
37
58
  width: '100%'
38
59
  }, additionalStyle]);
39
60
  }
@@ -1 +1 @@
1
- {"version":3,"names":["css","useTheme","getMaxWidth","theme","breakpoint","customMaxWidth","breakpoints","values","undefined","getPaddingHorizontal","spacing","useContentContainerStyle","config","maxWidth","styleProvider","currentBreakpoint","current","additionalStyle","alignSelf","paddingHorizontal","width"],"sources":["useContentContainerStyle.ts"],"sourcesContent":["import type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type { Theme } from '../types';\n\ntype Breakpoint = keyof Theme['breakpoints']['values'];\n\nexport interface Config {\n maxWidth?: number;\n styleProvider?: (theme: Theme) => FountainUiStyle;\n}\n\nfunction getMaxWidth(theme: Theme, breakpoint: Breakpoint, customMaxWidth?: number): number | undefined {\n switch (breakpoint) {\n case 'lg':\n case 'md':\n return customMaxWidth ?? theme.breakpoints.values[breakpoint];\n default:\n return undefined;\n }\n}\n\nfunction getPaddingHorizontal(theme: Theme, breakpoint: Breakpoint): number {\n switch (breakpoint) {\n case 'sm':\n return theme.spacing(6);\n default:\n return theme.spacing(4);\n }\n}\n\nexport default function useContentContainerStyle(config: Config = {}): FountainUiStyle {\n const {\n maxWidth: customMaxWidth,\n styleProvider,\n } = config;\n\n const theme = useTheme();\n\n const currentBreakpoint = theme.breakpoints.current;\n\n const additionalStyle = styleProvider?.(theme);\n\n return css([\n {\n alignSelf: 'center',\n maxWidth: getMaxWidth(theme, currentBreakpoint, customMaxWidth),\n paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint),\n width: '100%',\n },\n additionalStyle,\n ]);\n};\n"],"mappings":"AACA,SAASA,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAUA,SAASC,WAAT,CAAqBC,KAArB,EAAmCC,UAAnC,EAA2DC,cAA3D,EAAwG;EACpG,QAAQD,UAAR;IACI,KAAK,IAAL;IACA,KAAK,IAAL;MACI,OAAOC,cAAc,IAAIF,KAAK,CAACG,WAAN,CAAkBC,MAAlB,CAAyBH,UAAzB,CAAzB;;IACJ;MACI,OAAOI,SAAP;EALR;AAOH;;AAED,SAASC,oBAAT,CAA8BN,KAA9B,EAA4CC,UAA5C,EAA4E;EACxE,QAAQA,UAAR;IACI,KAAK,IAAL;MACI,OAAOD,KAAK,CAACO,OAAN,CAAc,CAAd,CAAP;;IACJ;MACI,OAAOP,KAAK,CAACO,OAAN,CAAc,CAAd,CAAP;EAJR;AAMH;;AAED,eAAe,SAASC,wBAAT,GAAwE;EAAA,IAAtCC,MAAsC,uEAArB,EAAqB;EACnF,MAAM;IACFC,QAAQ,EAAER,cADR;IAEFS;EAFE,IAGFF,MAHJ;EAKA,MAAMT,KAAK,GAAGF,QAAQ,EAAtB;EAEA,MAAMc,iBAAiB,GAAGZ,KAAK,CAACG,WAAN,CAAkBU,OAA5C;EAEA,MAAMC,eAAe,GAAGH,aAAH,aAAGA,aAAH,uBAAGA,aAAa,CAAGX,KAAH,CAArC;EAEA,OAAOH,GAAG,CAAC,CACP;IACIkB,SAAS,EAAE,QADf;IAEIL,QAAQ,EAAEX,WAAW,CAACC,KAAD,EAAQY,iBAAR,EAA2BV,cAA3B,CAFzB;IAGIc,iBAAiB,EAAEV,oBAAoB,CAACN,KAAD,EAAQY,iBAAR,CAH3C;IAIIK,KAAK,EAAE;EAJX,CADO,EAOPH,eAPO,CAAD,CAAV;AASH;AAAA"}
1
+ {"version":3,"names":["css","useTheme","getMaxWidth","theme","breakpoint","customMaxWidth","breakpoints","values","undefined","getHomeScreenPaddingHorizontal","spacing","getPaddingHorizontal","isHomeScreen","useContentContainerStyle","config","maxWidth","styleProvider","currentBreakpoint","current","additionalStyle","alignSelf","paddingHorizontal","width"],"sources":["useContentContainerStyle.ts"],"sourcesContent":["import type { FountainUiStyle } from '@fountain-ui/styles';\nimport { css, useTheme } from '../styles';\nimport type { Theme } from '../types';\n\ntype Breakpoint = keyof Theme['breakpoints']['values'];\n\nexport interface Config {\n maxWidth?: number;\n styleProvider?: (theme: Theme) => FountainUiStyle;\n isHomeScreen?: boolean;\n}\n\nfunction getMaxWidth(theme: Theme, breakpoint: Breakpoint, customMaxWidth?: number): number | undefined {\n switch (breakpoint) {\n case 'lg':\n case 'md':\n return customMaxWidth ?? theme.breakpoints.values[breakpoint];\n default:\n return undefined;\n }\n}\n\nfunction getHomeScreenPaddingHorizontal(theme: Theme, breakpoint: Breakpoint): number {\n switch (breakpoint) {\n case 'xxs':\n case 'xs':\n return theme.spacing(3);\n case 'sm':\n return theme.spacing(6);\n case 'md':\n case 'lg':\n default:\n return theme.spacing(4);\n }\n}\n\nfunction getPaddingHorizontal(theme: Theme, breakpoint: Breakpoint, isHomeScreen?: boolean): number {\n if (isHomeScreen) {\n return getHomeScreenPaddingHorizontal(theme, breakpoint);\n }\n\n switch (breakpoint) {\n case 'sm':\n return theme.spacing(6);\n default:\n return theme.spacing(4);\n }\n}\n\nexport default function useContentContainerStyle(config: Config = {}): FountainUiStyle {\n const {\n maxWidth: customMaxWidth,\n styleProvider,\n isHomeScreen = false,\n } = config;\n\n const theme = useTheme();\n\n const currentBreakpoint = theme.breakpoints.current;\n\n const additionalStyle = styleProvider?.(theme);\n\n return css([\n {\n alignSelf: 'center',\n maxWidth: getMaxWidth(theme, currentBreakpoint, customMaxWidth),\n paddingHorizontal: getPaddingHorizontal(theme, currentBreakpoint, isHomeScreen),\n width: '100%',\n },\n additionalStyle,\n ]);\n};\n"],"mappings":"AACA,SAASA,GAAT,EAAcC,QAAd,QAA8B,WAA9B;;AAWA,SAASC,WAAT,CAAqBC,KAArB,EAAmCC,UAAnC,EAA2DC,cAA3D,EAAwG;EACpG,QAAQD,UAAR;IACI,KAAK,IAAL;IACA,KAAK,IAAL;MACI,OAAOC,cAAc,IAAIF,KAAK,CAACG,WAAN,CAAkBC,MAAlB,CAAyBH,UAAzB,CAAzB;;IACJ;MACI,OAAOI,SAAP;EALR;AAOH;;AAED,SAASC,8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AV;AASH;AAAA"}
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import { Path } from 'react-native-svg';
3
+ import { createSvgIcon } from '../../utils';
4
+ export default createSvgIcon( /*#__PURE__*/React.createElement(Path, {
5
+ fillRule: "evenodd",
6
+ clipRule: "evenodd",
7
+ d: "M0.170854 3.58753C0.39866 3.35972 0.768006 3.35972 0.995812 3.58753L4.08333 6.67505L7.17085 3.58753C7.39866 3.35972 7.76801 3.35972 7.99581 3.58753C8.22362 3.81533 8.22362 4.18468 7.99581 4.41248L4.90829 7.5L7.99581 10.5875C8.22362 10.8153 8.22362 11.1847 7.99581 11.4125C7.76801 11.6403 7.39866 11.6403 7.17085 11.4125L4.08333 8.32496L0.995812 11.4125C0.768006 11.6403 0.39866 11.6403 0.170854 11.4125C-0.0569515 11.1847 -0.0569515 10.8153 0.170854 10.5875L3.25838 7.5L0.170854 4.41248C-0.0569515 4.18468 -0.0569515 3.81533 0.170854 3.58753Z"
8
+ }), 'ChipClose', '0 0 9 15');
9
+ //# sourceMappingURL=ChipClose.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Path","createSvgIcon"],"sources":["ChipClose.tsx"],"sourcesContent":["import React from 'react';\nimport { Path } from 'react-native-svg';\nimport { createSvgIcon } from '../../utils';\n\nexport default createSvgIcon(\n <Path\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M0.170854 3.58753C0.39866 3.35972 0.768006 3.35972 0.995812 3.58753L4.08333 6.67505L7.17085 3.58753C7.39866 3.35972 7.76801 3.35972 7.99581 3.58753C8.22362 3.81533 8.22362 4.18468 7.99581 4.41248L4.90829 7.5L7.99581 10.5875C8.22362 10.8153 8.22362 11.1847 7.99581 11.4125C7.76801 11.6403 7.39866 11.6403 7.17085 11.4125L4.08333 8.32496L0.995812 11.4125C0.768006 11.6403 0.39866 11.6403 0.170854 11.4125C-0.0569515 11.1847 -0.0569515 10.8153 0.170854 10.5875L3.25838 7.5L0.170854 4.41248C-0.0569515 4.18468 -0.0569515 3.81533 0.170854 3.58753Z\"\n />,\n 'ChipClose',\n '0 0 9 15',\n);\n"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,IAAT,QAAqB,kBAArB;AACA,SAASC,aAAT,QAA8B,aAA9B;AAEA,eAAeA,aAAa,eACxB,oBAAC,IAAD;EACI,QAAQ,EAAC,SADb;EAEI,QAAQ,EAAC,SAFb;EAGI,CAAC,EAAC;AAHN,EADwB,EAMxB,WANwB,EAOxB,UAPwB,CAA5B"}
@@ -7,6 +7,7 @@ export { default as CheckCircle } from './CheckCircle';
7
7
  export { default as ChevronDown } from './ChevronDown';
8
8
  export { default as ChevronLeft } from './ChevronLeft';
9
9
  export { default as ChevronRight } from './ChevronRight';
10
+ export { default as ChipClose } from './ChipClose';
10
11
  export { default as CircularProgress } from './CircularProgress';
11
12
  export { default as Clear } from './Clear';
12
13
  export { default as Close } from './Close';
@@ -1 +1 @@
1
- {"version":3,"names":["default","AppBarChevronLeft","Check","Checkbox","CheckboxChecked","CheckboxOn","CheckCircle","ChevronDown","ChevronLeft","ChevronRight","CircularProgress","Clear","Close","EyeOff","EyeOn","InfoCircle","LoadingSpinner","Radio","RadioChecked","Search"],"sources":["index.ts"],"sourcesContent":["export { default as AppBarChevronLeft } from './AppBarChevronLeft';\nexport { default as Check } from './Check';\nexport { default as Checkbox } from './Checkbox';\nexport { default as CheckboxChecked } from './CheckboxChecked';\nexport { default as CheckboxOn } from './CheckboxOn';\nexport { default as CheckCircle } from './CheckCircle';\nexport { default as ChevronDown } from './ChevronDown';\nexport { default as ChevronLeft } from './ChevronLeft';\nexport { default as ChevronRight } from './ChevronRight';\nexport { default as CircularProgress } from './CircularProgress';\nexport { default as Clear } from './Clear';\nexport { default as Close } from './Close';\nexport { default as EyeOff } from './EyeOff';\nexport { default as EyeOn } from './EyeOn';\nexport { default as InfoCircle } from './InfoCircle';\nexport { default as LoadingSpinner } from './LoadingSpinner';\nexport { default as Radio } from './Radio';\nexport { default as RadioChecked } from './RadioChecked';\nexport { default as Search } from './Search';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAApB,QAA6C,qBAA7C;AACA,SAASD,OAAO,IAAIE,KAApB,QAAiC,SAAjC;AACA,SAASF,OAAO,IAAIG,QAApB,QAAoC,YAApC;AACA,SAASH,OAAO,IAAII,eAApB,QAA2C,mBAA3C;AACA,SAASJ,OAAO,IAAIK,UAApB,QAAsC,cAAtC;AACA,SAASL,OAAO,IAAIM,WAApB,QAAuC,eAAvC;AACA,SAASN,OAAO,IAAIO,WAApB,QAAuC,eAAvC;AACA,SAASP,OAAO,IAAIQ,WAApB,QAAuC,eAAvC;AACA,SAASR,OAAO,IAAIS,YAApB,QAAwC,gBAAxC;AACA,SAAST,OAAO,IAAIU,gBAApB,QAA4C,oBAA5C;AACA,SAASV,OAAO,IAAIW,KAApB,QAAiC,SAAjC;AACA,SAASX,OAAO,IAAIY,KAApB,QAAiC,SAAjC;AACA,SAASZ,OAAO,IAAIa,MAApB,QAAkC,UAAlC;AACA,SAASb,OAAO,IAAIc,KAApB,QAAiC,SAAjC;AACA,SAASd,OAAO,IAAIe,UAApB,QAAsC,cAAtC;AACA,SAASf,OAAO,IAAIgB,cAApB,QAA0C,kBAA1C;AACA,SAAShB,OAAO,IAAIiB,KAApB,QAAiC,SAAjC;AACA,SAASjB,OAAO,IAAIkB,YAApB,QAAwC,gBAAxC;AACA,SAASlB,OAAO,IAAImB,MAApB,QAAkC,UAAlC"}
1
+ {"version":3,"names":["default","AppBarChevronLeft","Check","Checkbox","CheckboxChecked","CheckboxOn","CheckCircle","ChevronDown","ChevronLeft","ChevronRight","ChipClose","CircularProgress","Clear","Close","EyeOff","EyeOn","InfoCircle","LoadingSpinner","Radio","RadioChecked","Search"],"sources":["index.ts"],"sourcesContent":["export { default as AppBarChevronLeft } from './AppBarChevronLeft';\nexport { default as Check } from './Check';\nexport { default as Checkbox } from './Checkbox';\nexport { default as CheckboxChecked } from './CheckboxChecked';\nexport { default as CheckboxOn } from './CheckboxOn';\nexport { default as CheckCircle } from './CheckCircle';\nexport { default as ChevronDown } from './ChevronDown';\nexport { default as ChevronLeft } from './ChevronLeft';\nexport { default as ChevronRight } from './ChevronRight';\nexport { default as ChipClose } from './ChipClose';\nexport { default as CircularProgress } from './CircularProgress';\nexport { default as Clear } from './Clear';\nexport { default as Close } from './Close';\nexport { default as EyeOff } from './EyeOff';\nexport { default as EyeOn } from './EyeOn';\nexport { default as InfoCircle } from './InfoCircle';\nexport { default as LoadingSpinner } from './LoadingSpinner';\nexport { default as Radio } from './Radio';\nexport { default as RadioChecked } from './RadioChecked';\nexport { default as Search } from './Search';\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,iBAApB,QAA6C,qBAA7C;AACA,SAASD,OAAO,IAAIE,KAApB,QAAiC,SAAjC;AACA,SAASF,OAAO,IAAIG,QAApB,QAAoC,YAApC;AACA,SAASH,OAAO,IAAII,eAApB,QAA2C,mBAA3C;AACA,SAASJ,OAAO,IAAIK,UAApB,QAAsC,cAAtC;AACA,SAASL,OAAO,IAAIM,WAApB,QAAuC,eAAvC;AACA,SAASN,OAAO,IAAIO,WAApB,QAAuC,eAAvC;AACA,SAASP,OAAO,IAAIQ,WAApB,QAAuC,eAAvC;AACA,SAASR,OAAO,IAAIS,YAApB,QAAwC,gBAAxC;AACA,SAAST,OAAO,IAAIU,SAApB,QAAqC,aAArC;AACA,SAASV,OAAO,IAAIW,gBAApB,QAA4C,oBAA5C;AACA,SAASX,OAAO,IAAIY,KAApB,QAAiC,SAAjC;AACA,SAASZ,OAAO,IAAIa,KAApB,QAAiC,SAAjC;AACA,SAASb,OAAO,IAAIc,MAApB,QAAkC,UAAlC;AACA,SAASd,OAAO,IAAIe,KAApB,QAAiC,SAAjC;AACA,SAASf,OAAO,IAAIgB,UAApB,QAAsC,cAAtC;AACA,SAAShB,OAAO,IAAIiB,cAApB,QAA0C,kBAA1C;AACA,SAASjB,OAAO,IAAIkB,KAApB,QAAiC,SAAjC;AACA,SAASlB,OAAO,IAAImB,YAApB,QAAwC,gBAAxC;AACA,SAASnB,OAAO,IAAIoB,MAApB,QAAkC,UAAlC"}
@@ -1,9 +1,11 @@
1
1
  import type { TextStyle } from 'react-native';
2
2
  import type { FountainUiStyle } from '@fountain-ui/styles';
3
+ import type { SvgIconProps } from '../SvgIcon';
3
4
  import type { ChipColor, ChipSize, ChipStartElementVariant } from './ChipProps';
4
5
  interface ChipStyle {
5
6
  container: FountainUiStyle;
6
- closeButton?: FountainUiStyle;
7
+ closeButtonContainer?: FountainUiStyle;
8
+ closeIconSize?: Pick<SvgIconProps, 'height' | 'width'>;
7
9
  label: TextStyle;
8
10
  startElement?: FountainUiStyle;
9
11
  startElementContainer?: FountainUiStyle;
@@ -3,5 +3,6 @@ import type { Theme } from '../types';
3
3
  export interface Config {
4
4
  maxWidth?: number;
5
5
  styleProvider?: (theme: Theme) => FountainUiStyle;
6
+ isHomeScreen?: boolean;
6
7
  }
7
8
  export default function useContentContainerStyle(config?: Config): FountainUiStyle;
@@ -0,0 +1,131 @@
1
+ import React from 'react';
2
+ declare const _default: React.MemoExoticComponent<{
3
+ (props: {
4
+ readonly color?: "accent" | "base" | "strong" | "strongInverse" | "baseInverse" | "baseOpacity" | "baseOpacityInverse" | "weak" | "weakInverse" | "weakOpacity" | "weakOpacityInverse" | "accentAlt" | undefined;
5
+ fontFamily?: string | undefined;
6
+ fontSize?: import("react-native-svg").NumberProp | undefined;
7
+ fontWeight?: import("react-native-svg").FontWeight | undefined;
8
+ letterSpacing?: import("react-native-svg").NumberProp | undefined;
9
+ readonly fill?: import("react-native").ColorValue | undefined;
10
+ fontStyle?: import("react-native-svg").FontStyle | undefined;
11
+ testID?: string | undefined;
12
+ fontVariant?: import("react-native-svg").FontVariant | undefined;
13
+ opacity?: import("react-native-svg").NumberProp | undefined;
14
+ readonly height?: import("react-native-svg").NumberProp | undefined;
15
+ readonly width?: import("react-native-svg").NumberProp | undefined;
16
+ transform?: string | (import("react-native").PerpectiveTransform | import("react-native").RotateTransform | import("react-native").RotateXTransform | import("react-native").RotateYTransform | import("react-native").RotateZTransform | import("react-native").ScaleTransform | import("react-native").ScaleXTransform | import("react-native").ScaleYTransform | import("react-native").TranslateXTransform | import("react-native").TranslateYTransform | import("react-native").SkewXTransform | import("react-native").SkewYTransform | import("react-native").MatrixTransform)[] | import("react-native-svg").ColumnMajorTransformMatrix | undefined;
17
+ rotation?: import("react-native-svg").NumberProp | undefined;
18
+ scaleX?: import("react-native-svg").NumberProp | undefined;
19
+ scaleY?: import("react-native-svg").NumberProp | undefined;
20
+ translateX?: import("react-native-svg").NumberProp | undefined;
21
+ translateY?: import("react-native-svg").NumberProp | undefined;
22
+ readonly style?: import("@fountain-ui/styles").FountainUiStyle | import("@fountain-ui/styles").FountainUiStyle[] | undefined;
23
+ onLayout?: ((event: import("react-native").LayoutChangeEvent) => void) | undefined;
24
+ title?: string | undefined;
25
+ clipPath?: string | undefined;
26
+ marker?: string | undefined;
27
+ mask?: string | undefined;
28
+ scale?: import("react-native-svg").NumberArray | undefined;
29
+ skewX?: import("react-native-svg").NumberProp | undefined;
30
+ skewY?: import("react-native-svg").NumberProp | undefined;
31
+ readonly viewBox?: string | undefined;
32
+ preserveAspectRatio?: string | undefined;
33
+ fillOpacity?: import("react-native-svg").NumberProp | undefined;
34
+ fillRule?: import("react-native-svg").FillRule | undefined;
35
+ stroke?: import("react-native").ColorValue | undefined;
36
+ strokeWidth?: import("react-native-svg").NumberProp | undefined;
37
+ strokeOpacity?: import("react-native-svg").NumberProp | undefined;
38
+ strokeDasharray?: import("react-native-svg").NumberProp | readonly import("react-native-svg").NumberProp[] | undefined;
39
+ strokeDashoffset?: import("react-native-svg").NumberProp | undefined;
40
+ strokeLinecap?: import("react-native-svg").Linecap | undefined;
41
+ strokeLinejoin?: import("react-native-svg").Linejoin | undefined;
42
+ strokeMiterlimit?: import("react-native-svg").NumberProp | undefined;
43
+ vectorEffect?: import("react-native-svg").VectorEffect | undefined;
44
+ clipRule?: import("react-native-svg").FillRule | undefined;
45
+ translate?: import("react-native-svg").NumberArray | undefined;
46
+ origin?: import("react-native-svg").NumberArray | undefined;
47
+ originX?: import("react-native-svg").NumberProp | undefined;
48
+ originY?: import("react-native-svg").NumberProp | undefined;
49
+ skew?: import("react-native-svg").NumberArray | undefined;
50
+ x?: import("react-native-svg").NumberArray | undefined;
51
+ y?: import("react-native-svg").NumberArray | undefined;
52
+ pointerEvents?: "auto" | "none" | "box-none" | "box-only" | undefined;
53
+ onStartShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
54
+ onMoveShouldSetResponder?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
55
+ onResponderEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
56
+ onResponderGrant?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
57
+ onResponderReject?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
58
+ onResponderMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
59
+ onResponderRelease?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
60
+ onResponderStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
61
+ onResponderTerminationRequest?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
62
+ onResponderTerminate?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
63
+ onStartShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
64
+ onMoveShouldSetResponderCapture?: ((event: import("react-native").GestureResponderEvent) => boolean) | undefined;
65
+ disabled?: boolean | undefined;
66
+ onPress?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
67
+ onPressIn?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
68
+ onPressOut?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
69
+ onLongPress?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
70
+ delayPressIn?: number | undefined;
71
+ delayPressOut?: number | undefined;
72
+ delayLongPress?: number | undefined;
73
+ id?: string | undefined;
74
+ markerStart?: string | undefined;
75
+ markerMid?: string | undefined;
76
+ markerEnd?: string | undefined;
77
+ accessibilityLabel?: string | undefined;
78
+ accessible?: boolean | undefined;
79
+ font?: import("react-native-svg").FontObject | undefined;
80
+ fontStretch?: import("react-native-svg").FontStretch | undefined;
81
+ textAnchor?: import("react-native-svg").TextAnchor | undefined;
82
+ textDecoration?: import("react-native-svg").TextDecoration | undefined;
83
+ wordSpacing?: import("react-native-svg").NumberProp | undefined;
84
+ kerning?: import("react-native-svg").NumberProp | undefined;
85
+ fontFeatureSettings?: string | undefined;
86
+ fontVariantLigatures?: import("react-native-svg").FontVariantLigatures | undefined;
87
+ fontVariationSettings?: string | undefined;
88
+ hitSlop?: import("react-native").Insets | undefined;
89
+ removeClippedSubviews?: boolean | undefined;
90
+ nativeID?: string | undefined;
91
+ collapsable?: boolean | undefined;
92
+ needsOffscreenAlphaCompositing?: boolean | undefined;
93
+ renderToHardwareTextureAndroid?: boolean | undefined;
94
+ focusable?: boolean | undefined;
95
+ shouldRasterizeIOS?: boolean | undefined;
96
+ isTVSelectable?: boolean | undefined;
97
+ hasTVPreferredFocus?: boolean | undefined;
98
+ tvParallaxProperties?: import("react-native").TVParallaxProperties | undefined;
99
+ tvParallaxShiftDistanceX?: number | undefined;
100
+ tvParallaxShiftDistanceY?: number | undefined;
101
+ tvParallaxTiltAngle?: number | undefined;
102
+ tvParallaxMagnification?: number | undefined;
103
+ onTouchStart?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
104
+ onTouchMove?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
105
+ onTouchEnd?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
106
+ onTouchCancel?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
107
+ onTouchEndCapture?: ((event: import("react-native").GestureResponderEvent) => void) | undefined;
108
+ accessibilityActions?: readonly Readonly<{
109
+ name: string;
110
+ label?: string | undefined;
111
+ }>[] | undefined;
112
+ accessibilityRole?: import("react-native").AccessibilityRole | undefined;
113
+ accessibilityState?: import("react-native").AccessibilityState | undefined;
114
+ accessibilityHint?: string | undefined;
115
+ accessibilityValue?: import("react-native").AccessibilityValue | undefined;
116
+ onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => void) | undefined;
117
+ accessibilityLabelledBy?: string | string[] | undefined;
118
+ accessibilityLiveRegion?: "none" | "polite" | "assertive" | undefined;
119
+ importantForAccessibility?: "auto" | "yes" | "no" | "no-hide-descendants" | undefined;
120
+ accessibilityElementsHidden?: boolean | undefined;
121
+ accessibilityLanguage?: string | undefined;
122
+ accessibilityViewIsModal?: boolean | undefined;
123
+ onAccessibilityEscape?: (() => void) | undefined;
124
+ onAccessibilityTap?: (() => void) | undefined;
125
+ onMagicTap?: (() => void) | undefined;
126
+ accessibilityIgnoresInvertColors?: boolean | undefined;
127
+ readonly size?: "medium" | "small" | "large" | undefined;
128
+ }): JSX.Element;
129
+ displayName: string;
130
+ }>;
131
+ export default _default;
@@ -7,6 +7,7 @@ export { default as CheckCircle } from './CheckCircle';
7
7
  export { default as ChevronDown } from './ChevronDown';
8
8
  export { default as ChevronLeft } from './ChevronLeft';
9
9
  export { default as ChevronRight } from './ChevronRight';
10
+ export { default as ChipClose } from './ChipClose';
10
11
  export { default as CircularProgress } from './CircularProgress';
11
12
  export { default as Clear } from './Clear';
12
13
  export { default as Close } from './Close';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fountain-ui/core",
3
- "version": "3.0.0-alpha.22",
3
+ "version": "3.0.0-alpha.24",
4
4
  "author": "Fountain-UI Team",
5
5
  "description": "React components that implement Tappytoon's Fountain Design.",
6
6
  "license": "MIT",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "5ddf3c13c461c1e0909a2ff27e5272dbf0d357a3"
70
+ "gitHead": "0476888c17d395e280cec48f558280c9816189ea"
71
71
  }
package/src/Chip/Chip.tsx CHANGED
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { Text, View } from 'react-native';
3
3
  import ButtonBase from '../ButtonBase';
4
- import { Close } from '../internal';
4
+ import { ChipClose } from '../internal';
5
5
  import { css } from '../styles';
6
6
  import { cloneElementSafely } from '../utils';
7
7
  import type ChipProps from './ChipProps';
@@ -24,7 +24,8 @@ export default function Chip(props: ChipProps) {
24
24
 
25
25
  const {
26
26
  container: containerStyle,
27
- closeButton: closeButtonStyle,
27
+ closeButtonContainer: closeButtonContainerStyle,
28
+ closeIconSize,
28
29
  label: labelStyle,
29
30
  startElement: startElementStyle,
30
31
  startElementContainer: startElementContainerStyle,
@@ -57,10 +58,13 @@ export default function Chip(props: ChipProps) {
57
58
  />
58
59
 
59
60
  {selected ? (
60
- <Close
61
- color={'baseInverse'}
62
- style={closeButtonStyle}
63
- />
61
+ <View style={closeButtonContainerStyle}>
62
+ <ChipClose
63
+ color={'baseInverse'}
64
+ height={closeIconSize?.height}
65
+ width={closeIconSize?.width}
66
+ />
67
+ </View>
64
68
  ) : null}
65
69
  </ButtonBase>
66
70
  );