app-studio 0.1.21 → 0.1.23
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/app-studio.cjs.development.js +110 -92
- package/dist/app-studio.cjs.development.js.map +1 -1
- package/dist/app-studio.cjs.production.min.js +3 -3
- package/dist/app-studio.cjs.production.min.js.map +1 -1
- package/dist/app-studio.esm.js +111 -93
- package/dist/app-studio.esm.js.map +1 -1
- package/dist/components/Element.d.ts +2 -4
- package/dist/components/Image.d.ts +2 -2
- package/dist/components/Text.d.ts +2 -2
- package/package.json +1 -1
- package/dist/stories/Button.d.ts +0 -29
- package/dist/stories/Header.d.ts +0 -13
- package/dist/stories/Page.d.ts +0 -3
- package/dist/stories/Page.stories.d.ts +0 -13
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-studio.cjs.production.min.js","sources":["../src/utils/colors.ts","../src/providers/Theme.tsx","../src/utils/shadow.ts","../src/utils/style.ts","../src/components/Element.tsx","../src/components/View.tsx","../src/utils/env.ts","../src/providers/Responsive.tsx","../src/hooks/useMount.ts","../src/hooks/useResponsive.ts","../src/components/Form.tsx","../src/components/Image.tsx","../src/components/Text.tsx","../src/utils/typography.ts"],"sourcesContent":["export type ColorPalette = Record<string, Record<number, string>>;\n\nexport type ColorSingleton = Record<\n string,\n {\n 50: string;\n 100: string;\n 200: string;\n 300: string;\n 400: string;\n 500: string;\n 600: string;\n 700: string;\n 800: string;\n 900: string;\n }\n>;\n\nexport const palette: ColorPalette = {\n white: {\n 50: 'rgba(255, 255, 255, 0.04)',\n 100: 'rgba(255, 255, 255, 0.08)',\n 200: 'rgba(255, 255, 255, 0.16)',\n 300: 'rgba(255, 255, 255, 0.24)',\n 400: 'rgba(255, 255, 255, 0.36)',\n 500: 'rgba(255, 255, 255, 0.48)',\n 600: 'rgba(255, 255, 255, 0.64)',\n 700: 'rgba(255, 255, 255, 0.80)',\n 800: 'rgba(255, 255, 255, 0.92)',\n 900: 'rgba(255, 255, 255, 1)',\n },\n\n black: {\n 50: 'rgba(0, 0, 0, 0.04)',\n 100: 'rgba(0, 0, 0, 0.08)',\n 200: 'rgba(0, 0, 0, 0.16)',\n 300: 'rgba(0, 0, 0, 0.24)',\n 400: 'rgba(0, 0, 0, 0.36)',\n 500: 'rgba(0, 0, 0, 0.48)',\n 600: 'rgba(0, 0, 0, 0.64)',\n 700: 'rgba(0, 0, 0, 0.80)',\n 800: 'rgba(0, 0, 0, 0.92)',\n 900: 'rgba(0, 0, 0, 1)',\n },\n rose: {\n 50: '#fff1f2',\n 100: '#ffe4e6',\n 200: '#fecdd3',\n 300: '#fda4af',\n 400: '#fb7185',\n 500: '#f43f5e',\n 600: '#e11d48',\n 700: '#be123c',\n 800: '#9f1239',\n 900: '#881337',\n },\n pink: {\n 50: '#fdf2f8',\n 100: '#fce7f3',\n 200: '#fbcfe8',\n 300: '#f9a8d4',\n 400: '#f472b6',\n 500: '#ec4899',\n 600: '#db2777',\n 700: '#be185d',\n 800: '#9d174d',\n 900: '#831843',\n },\n fuchsia: {\n 50: '#fdf4ff',\n 100: '#fae8ff',\n 200: '#f5d0fe',\n 300: '#f0abfc',\n 400: '#e879f9',\n 500: '#d946ef',\n 600: '#c026d3',\n 700: '#a21caf',\n 800: '#86198f',\n 900: '#701a75',\n },\n purple: {\n 50: '#faf5ff',\n 100: '#f3e8ff',\n 200: '#e9d5ff',\n 300: '#d8b4fe',\n 400: '#c084fc',\n 500: '#a855f7',\n 600: '#9333ea',\n 700: '#7e22ce',\n 800: '#6b21a8',\n 900: '#581c87',\n },\n violet: {\n 50: '#f5f3ff',\n 100: '#ede9fe',\n 200: '#ddd6fe',\n 300: '#c4b5fd',\n 400: '#a78bfa',\n 500: '#8b5cf6',\n 600: '#7c3aed',\n 700: '#6d28d9',\n 800: '#5b21b6',\n 900: '#4c1d95',\n },\n indigo: {\n 50: '#eef2ff',\n 100: '#e0e7ff',\n 200: '#c7d2fe',\n 300: '#a5b4fc',\n 400: '#818cf8',\n 500: '#6366f1',\n 600: '#4f46e5',\n 700: '#4338ca',\n 800: '#3730a3',\n 900: '#312e81',\n },\n blue: {\n 50: '#eff6ff',\n 100: '#dbeafe',\n 200: '#bfdbfe',\n 300: '#93c5fd',\n 400: '#60a5fa',\n 500: '#3b82f6',\n 600: '#2563eb',\n 700: '#1d4ed8',\n 800: '#1e40af',\n 900: '#1e3a8a',\n },\n lightBlue: {\n 50: '#f0f9ff',\n 100: '#e0f2fe',\n 200: '#bae6fd',\n 300: '#7dd3fc',\n 400: '#38bdf8',\n 500: '#0ea5e9',\n 600: '#0284c7',\n 700: '#0369a1',\n 800: '#075985',\n 900: '#0c4a6e',\n },\n cyan: {\n 50: '#ecfeff',\n 100: '#cffafe',\n 200: '#a5f3fc',\n 300: '#67e8f9',\n 400: '#22d3ee',\n 500: '#06b6d4',\n 600: '#0891b2',\n 700: '#0e7490',\n 800: '#155e75',\n 900: '#164e63',\n },\n teal: {\n 50: '#f0fdfa',\n 100: '#ccfbf1',\n 200: '#99f6e4',\n 300: '#5eead4',\n 400: '#2dd4bf',\n 500: '#14b8a6',\n 600: '#0d9488',\n 700: '#0f766e',\n 800: '#115e59',\n 900: '#134e4a',\n },\n emerald: {\n 50: '#ecfdf5',\n 100: '#d1fae5',\n 200: '#a7f3d0',\n 300: '#6ee7b7',\n 400: '#34d399',\n 500: '#10b981',\n 600: '#059669',\n 700: '#047857',\n 800: '#065f46',\n 900: '#064e3b',\n },\n green: {\n 50: '#f0fdf4',\n 100: '#dcfce7',\n 200: '#bbf7d0',\n 300: '#86efac',\n 400: '#4ade80',\n 500: '#22c55e',\n 600: '#16a34a',\n 700: '#15803d',\n 800: '#166534',\n 900: '#14532d',\n },\n lime: {\n 50: '#f7fee7',\n 100: '#ecfccb',\n 200: '#d9f99d',\n 300: '#bef264',\n 400: '#a3e635',\n 500: '#84cc16',\n 600: '#65a30d',\n 700: '#4d7c0f',\n 800: '#3f6212',\n 900: '#365314',\n },\n yellow: {\n 50: '#fefce8',\n 100: '#fef9c3',\n 200: '#fef08a',\n 300: '#fde047',\n 400: '#facc15',\n 500: '#eab308',\n 600: '#ca8a04',\n 700: '#a16207',\n 800: '#854d0e',\n 900: '#713f12',\n },\n amber: {\n 50: '#fffbeb',\n 100: '#fef3c7',\n 200: '#fde68a',\n 300: '#fcd34d',\n 400: '#fbbf24',\n 500: '#f59e0b',\n 600: '#d97706',\n 700: '#b45309',\n 800: '#92400e',\n 900: '#78350f',\n },\n orange: {\n 50: '#fff7ed',\n 100: '#ffedd5',\n 200: '#fed7aa',\n 300: '#fdba74',\n 400: '#fb923c',\n 500: '#f97316',\n 600: '#ea580c',\n 700: '#c2410c',\n 800: '#9a3412',\n 900: '#7c2d12',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n },\n warmGray: {\n 50: '#fafaf9',\n 100: '#f5f5f4',\n 200: '#e7e5e4',\n 300: '#d6d3d1',\n 400: '#a8a29e',\n 500: '#78716c',\n 600: '#57534e',\n 700: '#44403c',\n 800: '#292524',\n 900: '#1c1917',\n },\n trueGray: {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#e5e5e5',\n 300: '#d4d4d4',\n 400: '#a3a3a3',\n 500: '#737373',\n 600: '#525252',\n 700: '#404040',\n 800: '#262626',\n 900: '#171717',\n },\n gray: {\n 50: '#fafafa',\n 100: '#f4f4f5',\n 200: '#e4e4e7',\n 300: '#d4d4d8',\n 400: '#a1a1aa',\n 500: '#71717a',\n 600: '#52525b',\n 700: '#3f3f46',\n 800: '#27272a',\n 900: '#18181b',\n },\n dark: {\n 50: '#18181b',\n 100: '#27272a',\n 200: '#3f3f46',\n 300: '#52525b',\n 400: '#71717a',\n 500: '#a1a1aa',\n 600: '#d4d4d8',\n 700: '#e4e4e7',\n 800: '#f4f4f5',\n 900: '#fafafa',\n },\n coolGray: {\n 50: '#f9fafb',\n 100: '#f3f4f6',\n 200: '#e5e7eb',\n 300: '#d1d5db',\n 400: '#9ca3af',\n 500: '#6b7280',\n 600: '#4b5563',\n 700: '#374151',\n 800: '#1f2937',\n 900: '#111827',\n },\n blueGray: {\n 50: '#f8fafc',\n 100: '#f1f5f9',\n 200: '#e2e8f0',\n 300: '#cbd5e1',\n 400: '#94a3b8',\n 500: '#64748b',\n 600: '#475569',\n 700: '#334155',\n 800: '#1e293b',\n 900: '#0f172a',\n },\n};\n","import React from 'react';\n\nimport { createContext, useContext } from 'react';\nimport { palette as defaultPalette } from '../utils/colors';\n\ntype ColorConfig = Record<string, string>;\n\ntype VariantColorConfig = Record<string, Record<string, string>>;\n\nexport const defaultThemeMain: ColorConfig = {\n primary: 'color.black',\n secondary: 'color.blue',\n success: 'color.green.500',\n error: 'color.red.500',\n warning: 'color.orange.500',\n disabled: 'color.gray.500',\n loading: 'color.dark.500',\n};\n\nexport const defaultColors: ColorConfig = {\n white: '#FFFFFF',\n black: '#000000',\n red: '#FF0000',\n green: '#00FF00',\n blue: '#0000FF',\n yellow: '#FFFF00',\n cyan: '#00FFFF',\n magenta: '#FF00FF',\n grey: '#808080',\n orange: '#FFA500',\n brown: '#A52A2A',\n purple: '#800080',\n pink: '#FFC0CB',\n lime: '#00FF00',\n teal: '#008080',\n navy: '#000080',\n olive: '#808000',\n maroon: '#800000',\n gold: '#FFD700',\n silver: '#C0C0C0',\n indigo: '#4B0082',\n violet: '#EE82EE',\n beige: '#F5F5DC',\n turquoise: '#40E0D0',\n coral: '#FF7F50',\n chocolate: '#D2691E',\n skyBlue: '#87CEEB',\n plum: '#DDA0DD',\n darkGreen: '#006400',\n salmon: '#FA8072',\n};\n\nexport const ThemeContext = createContext<{\n getColor: (color: string) => string;\n theme?: {\n main: { [key: string]: string };\n components?: { [key: string]: { [key: string]: string } };\n };\n colors?: {\n main?: ColorConfig;\n palette?: VariantColorConfig;\n };\n}>({\n getColor: (name: string): string => {\n return name;\n },\n colors: {\n main: defaultColors,\n palette: defaultPalette,\n },\n theme: { main: defaultThemeMain, components: {} },\n});\n\nexport const useTheme = () => useContext(ThemeContext);\n\nexport const ThemeProvider = ({\n theme = {\n main: defaultThemeMain,\n components: {},\n },\n colors = {\n main: defaultColors,\n palette: defaultPalette,\n },\n children,\n}: {\n theme?: {\n main: { [key: string]: string };\n components: { [key: string]: { [key: string]: string } };\n };\n colors?: {\n main?: ColorConfig;\n palette?: VariantColorConfig;\n };\n children: any;\n}): React.ReactElement => {\n const getColor = (name: string): string => {\n if (name === 'transparent') return name;\n\n try {\n // Si le nom commence par \"theme.\", nous recherchons dans les couleurs du thème\n if (name.startsWith('theme.')) {\n const keys = name.split('.');\n if (\n keys[1] !== undefined &&\n typeof theme.components[keys[1]] == 'object' &&\n theme.components[keys[1]][keys[2]] !== undefined\n ) {\n return getColor(theme.components[keys[1]][keys[2]]);\n } else if (theme.main[keys[1]] && theme.main[keys[1]] !== undefined) {\n return getColor(theme.main[keys[1]]);\n } else {\n console.log('Color ' + name + ' not found');\n }\n }\n // Si le nom commence par \"color.\", nous recherchons dans la palette\n else if (name.startsWith('color.')) {\n const keys = name.split('.'); // Retirer le préfixe \"color.\"\n\n if (colors.palette && colors.palette[keys[1]][keys[2]] !== undefined) {\n return colors.palette[keys[1]][keys[2]];\n } else if (\n colors.palette &&\n colors.palette[keys[1]][parseInt(keys[2])] !== undefined\n ) {\n return colors.palette[keys[1]][parseInt(keys[2])];\n } else if (colors.main && colors.main[keys[1]] !== undefined) {\n return colors.main[keys[1]];\n } else {\n console.log('Color ' + name + ' not found');\n }\n }\n } catch (e) {}\n\n return name;\n };\n\n return (\n <ThemeContext.Provider\n value={{\n getColor,\n theme: {\n main: {\n ...defaultThemeMain,\n ...theme.main,\n },\n components: {\n ...theme.components,\n },\n },\n colors: {\n main: {\n ...defaultColors,\n ...colors.main,\n },\n palette: {\n ...defaultPalette,\n ...colors.palette,\n },\n },\n }}\n >\n {children}\n </ThemeContext.Provider>\n );\n};\n","export type Shadow = {\n shadowColor: string;\n shadowOffset: {\n width: number;\n height: number;\n };\n shadowOpacity: number;\n shadowRadius: number;\n};\n\nexport const Shadows: Record<number, Shadow> = {\n 0: {\n shadowColor: '#000',\n shadowOffset: {\n width: 1,\n height: 2,\n },\n shadowOpacity: 0.18,\n shadowRadius: 1.0,\n },\n 1: {\n shadowColor: '#000',\n shadowOffset: {\n width: 2,\n height: 2,\n },\n shadowOpacity: 0.2,\n shadowRadius: 1.41,\n },\n 2: {\n shadowColor: '#000',\n shadowOffset: {\n width: 3,\n height: 3,\n },\n shadowOpacity: 0.22,\n shadowRadius: 2.22,\n },\n 3: {\n shadowColor: '#000',\n shadowOffset: {\n width: 4,\n height: 4,\n },\n shadowOpacity: 0.23,\n shadowRadius: 2.62,\n },\n 4: {\n shadowColor: '#000',\n shadowOffset: {\n width: 5,\n height: 5,\n },\n shadowOpacity: 0.25,\n shadowRadius: 3.84,\n },\n 5: {\n shadowColor: '#000',\n shadowOffset: {\n width: 6,\n height: 6,\n },\n shadowOpacity: 0.27,\n shadowRadius: 4.65,\n },\n 6: {\n shadowColor: '#000',\n shadowOffset: {\n width: 7,\n height: 7,\n },\n shadowOpacity: 0.29,\n shadowRadius: 4.65,\n },\n 7: {\n shadowColor: '#000',\n shadowOffset: {\n width: 8,\n height: 8,\n },\n shadowOpacity: 0.3,\n shadowRadius: 4.65,\n },\n 8: {\n shadowColor: '#000',\n shadowOffset: {\n width: 9,\n height: 9,\n },\n shadowOpacity: 0.32,\n shadowRadius: 5.46,\n },\n 9: {\n shadowColor: '#000',\n shadowOffset: {\n width: 10,\n height: 10,\n },\n shadowOpacity: 0.34,\n shadowRadius: 6.27,\n },\n};\n","import unitlessKeys from '@emotion/unitless';\n\nexport const unitlessStyleProps = Object.keys(unitlessKeys);\n\nexport const validStyleProps = [\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'alignmentBaseline',\n 'all',\n 'animation',\n 'animationDelay',\n 'animationDirection',\n 'animationDuration',\n 'animationFillMode',\n 'animationIterationCount',\n 'animationName',\n 'animationPlayState',\n 'animationTimingFunction',\n 'appearance',\n 'backdropFilter',\n 'backfaceVisibility',\n 'background',\n 'backgroundAttachment',\n 'backgroundBlendMode',\n 'backgroundClip',\n 'backgroundColor',\n 'backgroundImage',\n 'backgroundOrigin',\n 'backgroundPosition',\n 'backgroundPositionX',\n 'backgroundPositionY',\n 'backgroundRepeat',\n 'backgroundRepeatX',\n 'backgroundRepeatY',\n 'backgroundSize',\n 'baselineShift',\n 'blockSize',\n 'border',\n 'borderBlockEnd',\n 'borderBlockEndColor',\n 'borderBlockEndStyle',\n 'borderBlockEndWidth',\n 'borderBlockStart',\n 'borderBlockStartColor',\n 'borderBlockStartStyle',\n 'borderBlockStartWidth',\n 'borderBottom',\n 'borderBottomColor',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderBottomStyle',\n 'borderBottomWidth',\n 'borderCollapse',\n 'borderColor',\n 'borderImage',\n 'borderImageOutset',\n 'borderImageRepeat',\n 'borderImageSlice',\n 'borderImageSource',\n 'borderImageWidth',\n 'borderInlineEnd',\n 'borderInlineEndColor',\n 'borderInlineEndStyle',\n 'borderInlineEndWidth',\n 'borderInlineStart',\n 'borderInlineStartColor',\n 'borderInlineStartStyle',\n 'borderInlineStartWidth',\n 'borderLeft',\n 'borderLeftColor',\n 'borderLeftStyle',\n 'borderLeftWidth',\n 'borderRadius',\n 'borderRight',\n 'borderRightColor',\n 'borderRightStyle',\n 'borderRightWidth',\n 'borderSpacing',\n 'borderStyle',\n 'borderTop',\n 'borderTopColor',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderTopStyle',\n 'borderTopWidth',\n 'borderWidth',\n 'bottom',\n 'boxShadow',\n 'boxSizing',\n 'breakAfter',\n 'breakBefore',\n 'breakInside',\n 'bufferedRendering',\n 'captionSide',\n 'caretColor',\n 'clear',\n 'clip',\n 'clipPath',\n 'clipRule',\n 'color',\n 'colorInterpolation',\n 'colorInterpolationFilters',\n 'colorRendering',\n 'columnCount',\n 'columnFill',\n 'columnGap',\n 'columnRule',\n 'columnRuleColor',\n 'columnRuleStyle',\n 'columnRuleWidth',\n 'columnSpan',\n 'columnWidth',\n 'columns',\n 'contain',\n 'content',\n 'counterIncrement',\n 'counterReset',\n 'cursor',\n 'cx',\n 'cy',\n 'd',\n 'direction',\n 'display',\n 'dominantBaseline',\n 'emptyCells',\n 'fill',\n 'fillOpacity',\n 'fillRule',\n 'filter',\n 'flex',\n 'flexBasis',\n 'flexDirection',\n 'flexFlow',\n 'flexGrow',\n 'flexShrink',\n 'flexWrap',\n 'float',\n 'floodColor',\n 'floodOpacity',\n 'font',\n 'fontDisplay',\n 'fontFamily',\n 'fontFeatureSettings',\n 'fontKerning',\n 'fontSize',\n 'fontStretch',\n 'fontStyle',\n 'fontVariant',\n 'fontVariantCaps',\n 'fontVariantEastAsian',\n 'fontVariantLigatures',\n 'fontVariantNumeric',\n 'fontVariationSettings',\n 'fontWeight',\n 'gap',\n 'grid',\n 'gridArea',\n 'gridAutoColumns',\n 'gridAutoFlow',\n 'gridAutoRows',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnGap',\n 'gridColumnStart',\n 'gridGap',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowGap',\n 'gridRowStart',\n 'gridTemplate',\n 'gridTemplateAreas',\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'height',\n 'hyphens',\n 'imageRendering',\n 'inlineSize',\n 'isolation',\n 'justifyContent',\n 'justifyItems',\n 'justifySelf',\n 'left',\n 'letterSpacing',\n 'lightingColor',\n 'lineBreak',\n 'lineHeight',\n 'listStyle',\n 'listStyleImage',\n 'listStylePosition',\n 'listStyleType',\n 'margin',\n 'marginBlockEnd',\n 'marginBlockStart',\n 'marginBottom',\n 'marginInlineEnd',\n 'marginInlineStart',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marker',\n 'markerEnd',\n 'markerMid',\n 'markerStart',\n 'mask',\n 'maskType',\n 'maxBlockSize',\n 'maxHeight',\n 'maxInlineSize',\n 'maxWidth',\n 'maxZoom',\n 'minBlockSize',\n 'minHeight',\n 'minInlineSize',\n 'minWidth',\n 'minZoom',\n 'mixBlendMode',\n 'objectFit',\n 'objectPosition',\n 'offset',\n 'offsetDistance',\n 'offsetPath',\n 'offsetRotate',\n 'opacity',\n 'order',\n 'orientation',\n 'orphans',\n 'outline',\n 'outlineColor',\n 'outlineOffset',\n 'outlineStyle',\n 'outlineWidth',\n 'overflow',\n 'overflowAnchor',\n 'overflowWrap',\n 'overflowX',\n 'overflowY',\n 'overscrollBehavior',\n 'overscrollBehaviorBlock',\n 'overscrollBehaviorInline',\n 'overscrollBehaviorX',\n 'overscrollBehaviorY',\n 'padding',\n 'paddingBlockEnd',\n 'paddingBlockStart',\n 'paddingBottom',\n 'paddingInlineEnd',\n 'paddingInlineStart',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'page',\n 'pageBreakAfter',\n 'pageBreakBefore',\n 'pageBreakInside',\n 'paintOrder',\n 'perspective',\n 'perspectiveOrigin',\n 'placeContent',\n 'placeItems',\n 'placeSelf',\n 'pointerEvents',\n 'position',\n 'quotes',\n 'r',\n 'resize',\n 'right',\n 'rowGap',\n 'rx',\n 'ry',\n 'scrollBehavior',\n 'scrollMargin',\n 'scrollMarginBlock',\n 'scrollMarginBlockEnd',\n 'scrollMarginBlockStart',\n 'scrollMarginBottom',\n 'scrollMarginInline',\n 'scrollMarginInlineEnd',\n 'scrollMarginInlineStart',\n 'scrollMarginLeft',\n 'scrollMarginRight',\n 'scrollMarginTop',\n 'scrollPadding',\n 'scrollPaddingBlock',\n 'scrollPaddingBlockEnd',\n 'scrollPaddingBlockStart',\n 'scrollPaddingBottom',\n 'scrollPaddingInline',\n 'scrollPaddingInlineEnd',\n 'scrollPaddingInlineStart',\n 'scrollPaddingLeft',\n 'scrollPaddingRight',\n 'scrollPaddingTop',\n 'scrollSnapAlign',\n 'scrollSnapStop',\n 'scrollSnapType',\n 'shapeImageThreshold',\n 'shapeMargin',\n 'shapeOutside',\n 'shapeRendering',\n 'size',\n 'speak',\n 'src',\n 'stopColor',\n 'stopOpacity',\n 'stroke',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n 'tabSize',\n 'tableLayout',\n 'textAlign',\n 'textAlignLast',\n 'textAnchor',\n 'textCombineUpright',\n 'textDecoration',\n 'textDecorationColor',\n 'textDecorationLine',\n 'textDecorationSkipInk',\n 'textDecorationStyle',\n 'textIndent',\n 'textOrientation',\n 'textOverflow',\n 'textRendering',\n 'textShadow',\n 'textSizeAdjust',\n 'textTransform',\n 'textUnderlinePosition',\n 'top',\n 'touchAction',\n 'transform',\n 'transformBox',\n 'transformOrigin',\n 'transformStyle',\n 'transition',\n 'transitionDelay',\n 'transitionDuration',\n 'transitionProperty',\n 'transitionTimingFunction',\n 'unicodeBidi',\n 'unicodeRange',\n 'userSelect',\n 'userZoom',\n 'vectorEffect',\n 'verticalAlign',\n 'visibility',\n 'whiteSpace',\n 'widows',\n 'width',\n 'willChange',\n 'wordBreak',\n 'wordSpacing',\n 'wordWrap',\n 'writingMode',\n 'x',\n 'y',\n 'zIndex',\n 'zoom',\n 'alwaysBounceHorizontal',\n 'alwaysBounceVertical',\n 'automaticallyAdjustContentInsets',\n 'bounces',\n 'bouncesZoom',\n 'canCancelContentTouches',\n 'centerContent',\n 'contentLayoutStyle',\n 'contentInset',\n 'contentInsetAdjustmentBehavior',\n 'contentOffset',\n 'decelerationRate',\n 'directionalLockEnabled',\n 'disableIntervalMomentum',\n 'disableScrollViewPanResponder',\n 'endFillColor',\n 'fadingEdgeLength',\n 'horizontal',\n 'indicatorStyle',\n 'invertStickyHeaders',\n 'keyboardDismissMode',\n 'keyboardShouldPersistTaps',\n 'maintainVisibleContentPosition',\n 'maximumZoomScale',\n 'minimumZoomScale',\n 'nestedScrollEnabled',\n 'onContentSizeChange',\n 'onMomentumScrollBegin',\n 'onMomentumScrollEnd',\n 'onScroll',\n 'onScrollBeginDrag',\n 'onScrollEndDrag',\n 'onScrollToTop',\n 'overScrollMode',\n 'pagingEnabled',\n 'persistentScrollbar',\n 'pinchGestureEnabled',\n 'refreshControl',\n 'removeClippedSubviews',\n 'scrollBarThumbImage',\n 'scrollEnabled',\n 'scrollEventThrottle',\n 'scrollIndicatorInsets',\n 'scrollPerfTag',\n 'scrollToOverflowEnabled',\n 'scrollsToTop',\n 'DEPRECATED_sendUpdatedChildFrames',\n 'showsHorizontalScrollIndicator',\n 'showsVerticalScrollIndicator',\n 'snapToAlignment',\n 'snapToEnd',\n 'snapToInterval',\n 'snapToOffsets',\n 'snapToStart',\n 'stickyHeaderIndices',\n 'zoomScale',\n 'borderRightColor',\n 'backfaceVisibility',\n 'borderBottomColor',\n 'borderBottomEndRadius',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderBottomStartRadius',\n 'borderBottomWidth',\n 'borderColor',\n 'borderEndColor',\n 'borderLeftColor',\n 'borderLeftWidth',\n 'borderRadius',\n 'backgroundColor',\n 'borderRightWidth',\n 'borderStartColor',\n 'borderStyle',\n 'borderTopColor',\n 'borderTopEndRadius',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderTopStartRadius',\n 'borderTopWidth',\n 'borderWidth',\n 'border',\n 'opacity',\n 'elevation',\n 'shadowColor',\n 'shadowOffset',\n 'shadowOpacity',\n 'shadowRadius',\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'aspectRatio',\n 'borderBottomWidth',\n 'borderEndWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderStartWidth',\n 'borderTopWidth',\n 'borderWidth',\n 'bottom',\n 'direction',\n 'display',\n 'end',\n 'flex',\n 'flexBasis',\n 'flexDirection',\n 'flexGrow',\n 'flexShrink',\n 'flexWrap',\n 'height',\n 'justifyContent',\n 'left',\n 'margin',\n 'marginBottom',\n 'marginEnd',\n 'marginHorizontal',\n 'marginLeft',\n 'marginRight',\n 'marginStart',\n 'marginTop',\n 'marginVertical',\n 'maxHeight',\n 'maxWidth',\n 'minHeight',\n 'minWidth',\n 'overflow',\n 'overflowX',\n 'overflowY',\n 'padding',\n 'paddingBottom',\n 'paddingEnd',\n 'paddingHorizontal',\n 'paddingLeft',\n 'paddingRight',\n 'paddingStart',\n 'paddingTop',\n 'paddingVertical',\n 'position',\n 'right',\n 'start',\n 'top',\n 'width',\n 'zIndex',\n 'borderTopRightRadius',\n 'backfaceVisibility',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderColor',\n 'borderRadius',\n 'borderTopLeftRadius',\n 'backgroundColor',\n 'borderWidth',\n 'opacity',\n 'overflow',\n 'overflowX',\n 'overflowY',\n 'resizeMode',\n 'tintColor',\n 'overlayColor',\n 'transform',\n 'transformMatrix',\n 'rotation',\n 'scaleX',\n 'scaleY',\n 'translateX',\n 'translateY',\n 'perspective',\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'scale',\n 'skewX',\n 'skewY',\n 'testID',\n 'decomposedMatrix',\n];\n\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\nfunction prefixKey(prefix: string, key: string) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nconst prefixes = ['webkit', 'ms', 'moz'];\n\n/**\n * Add vendor prefixing to unitless style keys.\n */\nunitlessStyleProps.forEach((prop) => {\n prefixes.forEach((prefix) => {\n unitlessStyleProps.push(prefixKey(prefix, prop));\n });\n});\n\n/**\n * Add all unitless style keys to valid style keys.\n */\nunitlessStyleProps.forEach((prop) => {\n if (validStyleProps.includes(prop)) {\n validStyleProps.push(prop);\n }\n});\n\nexport const StyleProps: any = {};\nvalidStyleProps.map((property) => {\n StyleProps[property] = true;\n});\n\nexport const isStyleProp = (property: string): boolean => {\n return StyleProps[property] !== undefined;\n};\n","import React from 'react';\nimport Color from 'color-convert';\nimport styled, { CSSProperties } from 'styled-components';\n\nimport { useTheme } from '../providers/Theme';\nimport { Shadows, Shadow } from '../utils/shadow';\nimport { isStyleProp } from '../utils/style';\nimport { useResponsiveContext } from '..';\n\nexport interface ElementProps {\n children?: any;\n size?: number;\n on?: Record<string, CSSProperties>;\n media?: Record<string, CSSProperties>;\n paddingHorizontal?: number | string;\n marginHorizontal?: number | string;\n paddingVertical?: number | string;\n marginVertical?: number | string;\n shadow?: boolean | number | Shadow;\n only?: string[];\n}\n\nconst NumberPropsStyle: any = {};\nconst NumberProps = [\n 'numberOfLines',\n 'fontWeight',\n 'timeStamp',\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'order',\n 'zIndex',\n 'aspectRatio',\n 'shadowOpacity',\n 'shadowRadius',\n 'scale',\n 'opacity',\n 'min',\n 'max',\n 'now',\n];\n\nNumberProps.map((property: string) => {\n NumberPropsStyle[property] = true;\n});\n\nexport const setSize = (newSize: string | number, styleProps: any) => {\n styleProps.height = styleProps.width = newSize;\n};\n\nexport const applyStyle = (props: any) => {\n //console.log({ applyStyle: props });\n\n const { getColor } = useTheme();\n const { mediaQueries, devices } = useResponsiveContext();\n\n const styleProps: any = {};\n //const otherProps: any = {};\n\n if (props.onClick && styleProps.cursor == undefined) {\n styleProps.cursor = 'pointer';\n }\n\n const size =\n props.height !== undefined &&\n props.width !== undefined &&\n props.height === props.width\n ? props.height\n : props.size\n ? props.size\n : null;\n\n if (size) {\n setSize(size, styleProps);\n }\n\n if (props.paddingHorizontal) {\n styleProps.paddingLeft = props.paddingHorizontal;\n styleProps.paddingRight = props.paddingHorizontal;\n }\n\n if (props.marginHorizontal) {\n styleProps.marginLeft = props.marginHorizontal;\n styleProps.marginRight = props.marginHorizontal;\n }\n\n if (props.paddingVertical) {\n styleProps.paddingTop = props.paddingVertical;\n styleProps.paddingBottom = props.paddingVertical;\n }\n\n if (props.marginVertical) {\n styleProps.marginTop = props.marginVertical;\n styleProps.marginBottom = props.marginVertical;\n }\n\n if (props.shadow) {\n if (typeof props.shadow === 'number' || typeof props.shadow === 'boolean') {\n const shawdowValue: number =\n typeof props.shadow === 'number' && Shadows[props.shadow] !== undefined\n ? props.shadow\n : 2;\n\n if (Shadows[shawdowValue]) {\n const shadowColor = Color.hex\n .rgb(Shadows[shawdowValue].shadowColor)\n .join(',');\n\n styleProps[\n 'boxShadow'\n ] = `${Shadows[shawdowValue].shadowOffset.height}px ${Shadows[shawdowValue].shadowOffset.width}px ${Shadows[shawdowValue].shadowRadius}px rgba(${shadowColor},${Shadows[shawdowValue].shadowOpacity})`;\n }\n } else {\n const shadowColor = Color.hex.rgb(props.shadow.shadowColor).join(',');\n\n styleProps[\n 'boxShadow'\n ] = `${props.shadow.shadowOffset.height}px ${props.shadow.shadowOffset.width}px ${props.shadow.shadowRadius}px rgba(${shadowColor},${props.shadow.shadowOpacity})`;\n }\n }\n\n if (props.only) {\n const { only, ...newProps } = props;\n // eslint-disable-next-line prefer-const\n let onlyProps: any = {\n media: {},\n };\n\n only.map((o: string) => {\n if (onlyProps.media[o] == undefined) {\n onlyProps.media[o] = {};\n }\n });\n\n const styleKeys = Object.keys(newProps).filter((key) => isStyleProp(key));\n styleKeys.map((key: string) => {\n only.map((o: string) => {\n props.media[o][key] = newProps[key];\n });\n delete props[key];\n });\n }\n\n Object.keys(props).map((property) => {\n if (isStyleProp(property) || property == 'on' || property == 'media') {\n if (typeof props[property] === 'object') {\n if (property === 'on') {\n for (const event in props[property]) {\n styleProps['&:' + event] = applyStyle(props[property][event]);\n }\n } else if (property === 'media') {\n for (const screenOrDevices in props[property]) {\n // console.log(screenOrDevices, mediaQueries[screenOrDevices]);\n if (\n mediaQueries[screenOrDevices] !== undefined &&\n props[property][screenOrDevices] !== undefined\n ) {\n styleProps['@media ' + mediaQueries[screenOrDevices]] =\n applyStyle(props[property][screenOrDevices]);\n } else if (devices[screenOrDevices] !== undefined) {\n // console.log(screen, devices[screenOrDevices], 'screen');\n for (const deviceScreen in devices[screenOrDevices]) {\n if (\n mediaQueries[devices[screenOrDevices][deviceScreen]] !==\n undefined &&\n props[property][screenOrDevices] !== undefined\n ) {\n // console.log(\n // screenOrDevices,\n // props[property][screenOrDevices]\n // );\n styleProps[\n '@media ' +\n mediaQueries[devices[screenOrDevices][deviceScreen]]\n ] = applyStyle(props[property][screenOrDevices]);\n }\n }\n }\n }\n } else {\n styleProps[property] = applyStyle(props[property]);\n }\n } else if (\n typeof props[property] === 'number' &&\n NumberPropsStyle[property] === undefined\n ) {\n styleProps[property] = props[property] + 'px';\n } else if (property.toLowerCase().indexOf('color') !== -1) {\n styleProps[property] = getColor(props[property]);\n } else {\n styleProps[property] = props[property];\n }\n }\n });\n\n return styleProps;\n};\n\n// function convertToCSS(props: any) {\n// return Object.entries(props).reduce((str, [key, val]) => {\n// const casedKey = key.replace(\n// /[A-Z]/g,\n// (match) => `-${match.toLowerCase()}`\n// );\n// return `${str}${casedKey}:${typeof val === 'number' ? val + 'px' : val};\\n`;\n// }, '');\n// }\n\n// export const getResponsiveMediaQueries = (props: any) => {\n// const { breakpoints, devices } = useResponsiveContext();\n// console.log('mediaQueries', props);\n\n// const mediaQueries = breakpointKeys\n// .map((size) => {\n// return props && props[size] !== undefined\n// ? `\n// @media ${\n// breakpoints[size].min\n// ? ' (min-width:' +\n// (breakpoints[size].min > 0 ? breakpoints[size].min : 0) +\n// 'px)'\n// : ''\n// } ${\n// breakpoints[size].min &&\n// breakpoints[size].max &&\n// breakpoints[size].max >= 0 &&\n// breakpoints[size].max < Infinity\n// ? ' and '\n// : ''\n// } ${\n// breakpoints[size].max &&\n// breakpoints[size].max >= 0 &&\n// breakpoints[size].max < Infinity\n// ? ' (max-width:' + breakpoints[size].max + 'px)'\n// : ''\n// } {\n// ${convertToCSS(props[size])}\n// }`\n// : '';\n// })\n// .join('\\n');\n\n// return mediaQueries;\n// };\n\nconst dynamicStyle = (props: any) => applyStyle(props);\n\nconst ElementComponent = styled.div`\n ${dynamicStyle};\n`;\n\nexport class Element extends React.PureComponent<any> {\n render() {\n return (\n <ElementComponent\n {...this.props}\n onClick={\n this.props.onPress !== undefined\n ? this.props.onPress\n : this.props.onClick\n }\n />\n );\n }\n}\n","import React from 'react';\nimport { Element, ElementProps } from './Element';\nimport { ViewStyleProps } from '../types/style';\nimport { CSSProperties } from 'styled-components';\n\nexport interface ViewProps\n extends Omit<\n ViewStyleProps,\n 'children' | 'translate' | 'style' | 'pointerEvents'\n >,\n Omit<CSSProperties, 'translate'>,\n ElementProps {\n onPress?: (..._args: any) => void;\n}\n\nexport const View = (props: ViewProps) => <Element {...props} />;\n\nexport const Div = View;\n\nexport const SafeArea = View;\n\nexport const Scroll = (props: any) => <View overflow={'auto'} {...props} />;\n\nexport const Span = (props: ViewProps) => <Element {...props} as=\"span\" />;\n","/**\n * whether in browser env\n */\nexport const isBrowser = (): boolean =>\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined';\n\n/**\n * get window.g_initialProps\n */\nexport const getWindowInitialProps = () =>\n isBrowser() ? (window as any).g_initialProps : undefined;\n\n/**\n * whether SSR success in client\n */\nexport const isSSR = !isBrowser();\n\nexport function isDev() {\n let dev = false;\n\n if (isBrowser()) {\n dev = !(window.location.hostname.indexOf('localhost') === -1);\n }\n return dev;\n}\n\nexport function isProd() {\n if (isBrowser()) {\n if (window && window.location && window.location.hostname) {\n return (\n window.location.hostname.includes('localhost') ||\n window.location.hostname.includes('develop')\n );\n }\n }\n return false;\n}\n\nexport function isMobile() {\n return navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i);\n}\n","import React, { ReactNode, createContext, useContext } from 'react';\n\nexport type ScreenSizeRange = {\n breakpoint: string;\n min: number;\n max?: number;\n};\nexport type ResponsiveConfig = Record<string, number>;\nconst defaultBreakpointsConfig: ResponsiveConfig = {\n xs: 0,\n sm: 340,\n md: 560,\n lg: 1080,\n xl: 1300,\n};\n\nexport type DeviceConfig = Record<string, string[]>;\nexport type QueryConfig = Record<string, string>;\nconst defaultDeviceConfig: DeviceConfig = {\n mobile: ['xs', 'sm'],\n tablet: ['md', 'lg'],\n desktop: ['lg', 'xl'],\n};\n\nexport type ScreenConfig = {\n breakpoints: ResponsiveConfig;\n devices: DeviceConfig;\n mediaQueries: QueryConfig;\n};\n\nexport type ScreenOrientation = 'landscape' | 'portrait';\n\nconst getMediaQueries = (b: ResponsiveConfig) => {\n const defaultKeys = Object.keys(b);\n\n const breakpointValue = defaultKeys\n .map((breakpoint) => {\n const value: ScreenSizeRange = {\n breakpoint: breakpoint as keyof typeof b,\n min: b[breakpoint],\n max: 0,\n };\n\n return value;\n })\n .sort((a, b) => a.min - b.min);\n\n breakpointValue.reduce((a, b) => {\n if (b) a.max = b.min;\n\n return b;\n });\n\n const query: Record<keyof typeof defaultBreakpointsConfig, string> = {};\n breakpointValue.map((sizeScreen) => {\n query[sizeScreen.breakpoint] = `only screen ${\n sizeScreen.min && sizeScreen.min >= 0\n ? 'and (min-width:' + sizeScreen.min + 'px)'\n : ''\n } ${\n sizeScreen.max && sizeScreen.max >= 0\n ? 'and (max-width:' + sizeScreen.max + 'px)'\n : ''\n }`;\n });\n\n return query;\n};\n\nconst defaultScreenConfig: ScreenConfig = {\n breakpoints: defaultBreakpointsConfig,\n devices: defaultDeviceConfig,\n mediaQueries: getMediaQueries(defaultBreakpointsConfig),\n};\n\nexport const ResponsiveContext =\n createContext<ScreenConfig>(defaultScreenConfig);\n\nexport const useResponsiveContext = () => useContext(ResponsiveContext);\n\nexport const ResponsiveProvider = ({\n breakpoints = defaultBreakpointsConfig,\n devices = defaultDeviceConfig,\n children,\n}: {\n breakpoints?: ResponsiveConfig;\n devices?: DeviceConfig;\n\n children?: ReactNode;\n}): React.ReactElement => {\n return (\n <ResponsiveContext.Provider\n value={{\n breakpoints,\n devices,\n mediaQueries: getMediaQueries(breakpoints),\n }}\n >\n {children}\n </ResponsiveContext.Provider>\n );\n};\n","import { useEffect } from 'react';\nexport const useMount = (callback: () => void) => {\n useEffect(() => {\n callback();\n }, []);\n};\n","import { useState } from 'react';\nimport {\n useResponsiveContext,\n ScreenOrientation,\n} from '../providers/Responsive';\n\nimport { useMount } from './useMount';\n\nexport const createQuery = (keyScreen: string, query: string, set: any) => {\n const mql = window.matchMedia(query);\n const onChange = () => {\n if (!!mql.matches) {\n set(keyScreen);\n }\n };\n\n mql.addListener(onChange);\n if (!!mql.matches) {\n set(keyScreen);\n }\n\n return () => {\n mql.removeListener(onChange);\n };\n};\n\nexport const useResponsive = () => {\n const { breakpoints, devices, mediaQueries } = useResponsiveContext();\n const [screen, setScreen] = useState('xs');\n const [orientation, setOrientation] = useState(\n 'landscape' as ScreenOrientation\n );\n\n useMount(() => {\n for (const screenSize in mediaQueries) {\n createQuery(screenSize, mediaQueries[screenSize], setScreen);\n }\n createQuery(\n 'landscape',\n 'only screen and (orientation: landscape)',\n setOrientation\n );\n createQuery(\n 'portrait',\n 'only screen and (orientation: portrait)',\n setOrientation\n );\n });\n\n const on = (device: keyof typeof devices) => {\n return devices[device].includes(screen);\n };\n\n const is = (s: keyof typeof breakpoints) => {\n return s == screen;\n };\n\n return {\n breakpoints,\n devices,\n orientation,\n screen,\n on,\n is,\n };\n};\n","import React from 'react';\nimport { Element, ElementProps } from './Element';\nimport { ViewStyleProps } from '../types/style';\nimport { CSSProperties } from 'styled-components';\nimport { Shadow } from '../utils/shadow';\n\nexport interface FormProps\n extends Omit<ViewStyleProps, 'children' | 'style' | 'pointerEvents'>,\n Omit<\n Partial<HTMLFormElement>,\n | 'width'\n | 'height'\n | 'children'\n | 'translate'\n | 'target'\n | 'border'\n | 'draggable'\n >,\n CSSProperties,\n ElementProps {}\n\nexport interface ButtonProps\n extends Omit<ViewStyleProps, 'children' | 'style' | 'pointerEvents'>,\n Omit<\n Partial<HTMLButtonElement>,\n | 'width'\n | 'height'\n | 'children'\n | 'translate'\n | 'type'\n | 'border'\n | 'draggable'\n >,\n CSSProperties {\n children?: any;\n size?: number;\n on?: Record<string, CSSProperties>;\n paddingHorizontal?: number | string;\n marginHorizontal?: number | string;\n paddingVertical?: number | string;\n marginVertical?: number | string;\n shadow?: boolean | number | Shadow;\n onClick?: any;\n media?: Record<string, CSSProperties>;\n}\n\nexport interface InputProps\n extends ElementProps,\n Omit<ViewStyleProps, 'style' | 'pointerEvents' | 'onPress' | 'dir'>,\n Omit<Partial<HTMLInputElement>, 'width' | 'height' | 'children'>,\n Omit<CSSProperties, 'style' | 'dir' | 'translate'> {}\n\nexport const Form = (props: FormProps) => <Element {...props} as=\"form\" />;\n\nexport const Input = (props: InputProps) => <Element {...props} as=\"input\" />;\n\nexport const Button = (props: ButtonProps) => (\n <Element {...props} as=\"button\" />\n);\n","import React from 'react';\nimport { CSSProperties } from 'styled-components';\nimport { Element, ElementProps } from './Element';\nimport { ImageStyleProps } from '../types/style';\n\nexport interface ImageProps\n extends Omit<ImageStyleProps, 'children' | 'style' | 'pointerEvents'>,\n Omit<\n Partial<HTMLImageElement>,\n | 'width'\n | 'height'\n | 'children'\n | 'translate'\n | 'target'\n | 'border'\n | 'draggable'\n >,\n CSSProperties,\n ElementProps {}\n\nexport const Image = (props: ImageProps) => <Element {...props} as=\"img\" />;\n","import React from 'react';\nimport { CSSProperties } from 'styled-components';\nimport { Element, ElementProps } from './Element';\nimport { TextStyleProps } from '../types/style';\n\nexport interface TextProps\n extends Omit<TextStyleProps, 'children' | 'style' | 'pointerEvents'>,\n CSSProperties,\n ElementProps {\n toUpperCase?: boolean;\n}\n\nexport const Text = (props: TextProps) => {\n return <Element {...props} />;\n};\n","export const Typography = {\n letterSpacings: {\n tighter: -0.08,\n tight: -0.4,\n normal: 0,\n wide: 0.4,\n wider: 0.8,\n widest: 1.6,\n },\n lineHeights: {\n xs: 12,\n sm: 14,\n md: 16,\n lg: 18,\n xl: 20,\n '2xl': 24,\n '3xl': 30,\n '4xl': 36,\n '5xl': 48,\n '6xl': 64,\n },\n fontWeights: {\n hairline: 100,\n thin: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n extraBold: 800,\n black: 900,\n },\n fontSizes: {\n xs: 12,\n sm: 14,\n md: 16,\n lg: 18,\n xl: 20,\n '2xl': 24,\n '3xl': 30,\n '4xl': 36,\n '5xl': 48,\n '6xl': 64,\n },\n};\n"],"names":["palette","white","50","100","200","300","400","500","600","700","800","900","black","rose","pink","fuchsia","purple","violet","indigo","blue","lightBlue","cyan","teal","emerald","green","lime","yellow","amber","orange","red","warmGray","trueGray","gray","dark","coolGray","blueGray","defaultThemeMain","primary","secondary","success","error","warning","disabled","loading","defaultColors","magenta","grey","brown","navy","olive","maroon","gold","silver","beige","turquoise","coral","chocolate","skyBlue","plum","darkGreen","salmon","ThemeContext","createContext","getColor","name","colors","main","defaultPalette","theme","components","useTheme","useContext","Shadows","0","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","1","2","3","4","5","6","7","8","9","unitlessStyleProps","Object","keys","unitlessKeys","validStyleProps","prefixes","forEach","prop","prefix","push","key","charAt","toUpperCase","substring","prefixKey","includes","StyleProps","map","property","isStyleProp","undefined","NumberPropsStyle","setSize","newSize","styleProps","applyStyle","props","mediaQueries","devices","useResponsiveContext","onClick","cursor","size","paddingHorizontal","paddingLeft","paddingRight","marginHorizontal","marginLeft","marginRight","paddingVertical","paddingTop","paddingBottom","marginVertical","marginTop","marginBottom","shadow","shawdowValue","Color","hex","rgb","join","only","newProps","o","filter","media","event","screenOrDevices","deviceScreen","toLowerCase","indexOf","ElementComponent","styled","div","Element","React","PureComponent","render","this","onPress","View","Div","SafeArea","isBrowser","window","document","createElement","isSSR","defaultBreakpointsConfig","xs","sm","md","lg","xl","defaultDeviceConfig","mobile","tablet","desktop","getMediaQueries","b","breakpointValue","breakpoint","min","max","sort","a","reduce","query","sizeScreen","ResponsiveContext","breakpoints","useMount","callback","useEffect","createQuery","keyScreen","set","mql","matchMedia","onChange","matches","addListener","removeListener","as","_ref","children","Provider","value","overflow","startsWith","split","console","log","parseInt","e","letterSpacings","tighter","tight","normal","wide","wider","widest","lineHeights","2xl","3xl","4xl","5xl","6xl","fontWeights","hairline","thin","light","medium","semiBold","bold","extraBold","fontSizes","getWindowInitialProps","g_initialProps","dev","location","hostname","navigator","userAgent","match","useResponsive","screen","setScreen","useState","orientation","setOrientation","screenSize","on","device","is","s"],"mappings":"gRAkBaA,EAAwB,CACnCC,MAAO,CACLC,GAAI,4BACJC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,0BAGPC,MAAO,CACLV,GAAI,sBACJC,IAAK,sBACLC,IAAK,sBACLC,IAAK,sBACLC,IAAK,sBACLC,IAAK,sBACLC,IAAK,sBACLC,IAAK,sBACLC,IAAK,sBACLC,IAAK,oBAEPE,KAAM,CACJX,GAAI,UACJC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,WAEPG,KAAM,CACJZ,GAAI,UACJC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,WAEPI,QAAS,CACPb,GAAI,UACJC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,WAEPK,OAAQ,CACNd,GAAI,UACJC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,UACLC,IAAK,WAEPM,OAAQ,CACNf,GAAI,UACJC,IAAK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ACbC,aAAc,CACZC,MAAO,EACPC,OAAQ,GAEVC,cAAe,IACfC,aAAc,MAEhBM,EAAG,CACDX,YAAa,OACbC,aAAc,CACZC,MAAO,EACPC,OAAQ,GAEVC,cAAe,IACfC,aAAc,MAEhBO,EAAG,CACDZ,YAAa,OACbC,aAAc,CACZC,MAAO,EACPC,OAAQ,GAEVC,cAAe,GACfC,aAAc,MAEhBQ,EAAG,CACDb,YAAa,OACbC,aAAc,CACZC,MAAO,EACPC,OAAQ,GAEVC,cAAe,IACfC,aAAc,MAEhBS,EAAG,CACDd,YAAa,OACbC,aAAc,CACZC,MAAO,GACPC,OAAQ,IAEVC,cAAe,IACfC,aAAc,OCjGLU,EAAqBC,OAAOC,KAAKC,GAEjCC,EAAkB,CAC7B,eACA,aACA,YACA,oBACA,MACA,YACA,iBACA,qBACA,oBACA,oBACA,0BACA,gBACA,qBACA,0BACA,aACA,iBACA,qBACA,aACA,uBACA,sBACA,iBACA,kBACA,kBACA,mBACA,qBACA,sBACA,sBACA,mBACA,oBACA,oBACA,iBACA,gBACA,YACA,SACA,iBACA,sBACA,sBACA,sBACA,mBACA,wBACA,wBACA,wBACA,eACA,oBACA,yBACA,0BACA,oBACA,oBACA,iBACA,cACA,cACA,oBACA,oBACA,mBACA,oBACA,mBACA,kBACA,uBACA,uBACA,uBACA,oBACA,yBACA,yBACA,yBACA,aACA,kBACA,kBACA,kBACA,eACA,cACA,mBACA,mBACA,mBACA,gBACA,cACA,YACA,iBACA,sBACA,uBACA,iBACA,iBACA,cACA,SACA,YACA,YACA,aACA,cACA,cACA,oBACA,cACA,aACA,QACA,OACA,WACA,WACA,QACA,qBACA,4BACA,iBACA,cACA,aACA,YACA,aACA,kBACA,kBACA,kBACA,aACA,cACA,UACA,UACA,UACA,mBACA,eACA,SACA,KACA,KACA,IACA,YACA,UACA,mBACA,aACA,OACA,cACA,WACA,SACA,OACA,YACA,gBACA,WACA,WACA,aACA,WACA,QACA,aACA,eACA,OACA,cACA,aACA,sBACA,cACA,WACA,cACA,YACA,cACA,kBACA,uBACA,uBACA,qBACA,wBACA,aACA,MACA,OACA,WACA,kBACA,eACA,eACA,aACA,gBACA,gBACA,kBACA,UACA,UACA,aACA,aACA,eACA,eACA,oBACA,sBACA,mBACA,SACA,UACA,iBACA,aACA,YACA,iBACA,eACA,cACA,OACA,gBACA,gBACA,YACA,aACA,YACA,iBACA,oBACA,gBACA,SACA,iBACA,mBACA,eACA,kBACA,oBACA,aACA,cACA,YACA,SACA,YACA,YACA,cACA,OACA,WACA,eACA,YACA,gBACA,WACA,UACA,eACA,YACA,gBACA,WACA,UACA,eACA,YACA,iBACA,SACA,iBACA,aACA,eACA,UACA,QACA,cACA,UACA,UACA,eACA,gBACA,eACA,eACA,WACA,iBACA,eACA,YACA,YACA,qBACA,0BACA,2BACA,sBACA,sBACA,UACA,kBACA,oBACA,gBACA,mBACA,qBACA,cACA,eACA,aACA,OACA,iBACA,kBACA,kBACA,aACA,cACA,oBACA,eACA,aACA,YACA,gBACA,WACA,SACA,IACA,SACA,QACA,SACA,KACA,KACA,iBACA,eACA,oBACA,uBACA,yBACA,qBACA,qBACA,wBACA,0BACA,mBACA,oBACA,kBACA,gBACA,qBACA,wBACA,0BACA,sBACA,sBACA,yBACA,2BACA,oBACA,qBACA,mBACA,kBACA,iBACA,iBACA,sBACA,cACA,eACA,iBACA,OACA,QACA,MACA,YACA,cACA,SACA,kBACA,mBACA,gBACA,iBACA,mBACA,gBACA,cACA,UACA,cACA,YACA,gBACA,aACA,qBACA,iBACA,sBACA,qBACA,wBACA,sBACA,aACA,kBACA,eACA,gBACA,aACA,iBACA,gBACA,wBACA,MACA,cACA,YACA,eACA,kBACA,iBACA,aACA,kBACA,qBACA,qBACA,2BACA,cACA,eACA,aACA,WACA,eACA,gBACA,aACA,aACA,SACA,QACA,aACA,YACA,cACA,WACA,cACA,IACA,IACA,SACA,OACA,yBACA,uBACA,mCACA,UACA,cACA,0BACA,gBACA,qBACA,eACA,iCACA,gBACA,mBACA,yBACA,0BACA,gCACA,eACA,mBACA,aACA,iBACA,sBACA,sBACA,4BACA,iCACA,mBACA,mBACA,sBACA,sBACA,wBACA,sBACA,WACA,oBACA,kBACA,gBACA,iBACA,gBACA,sBACA,sBACA,iBACA,wBACA,sBACA,gBACA,sBACA,wBACA,gBACA,0BACA,eACA,oCACA,iCACA,+BACA,kBACA,YACA,iBACA,gBACA,cACA,sBACA,YACA,mBACA,qBACA,oBACA,wBACA,yBACA,0BACA,0BACA,oBACA,cACA,iBACA,kBACA,kBACA,eACA,kBACA,mBACA,mBACA,cACA,iBACA,qBACA,sBACA,uBACA,uBACA,iBACA,cACA,SACA,UACA,YACA,cACA,eACA,gBACA,eACA,eACA,aACA,YACA,cACA,oBACA,iBACA,kBACA,mBACA,mBACA,iBACA,cACA,SACA,YACA,UACA,MACA,OACA,YACA,gBACA,WACA,aACA,WACA,SACA,iBACA,OACA,SACA,eACA,YACA,mBACA,aACA,cACA,cACA,YACA,iBACA,YACA,WACA,YACA,WACA,WACA,YACA,YACA,UACA,gBACA,aACA,oBACA,cACA,eACA,eACA,aACA,kBACA,WACA,QACA,QACA,MACA,QACA,SACA,uBACA,qBACA,yBACA,0BACA,cACA,eACA,sBACA,kBACA,cACA,UACA,WACA,YACA,YACA,aACA,YACA,eACA,YACA,kBACA,WACA,SACA,SACA,aACA,aACA,cACA,SACA,UACA,UACA,UACA,QACA,QACA,QACA,SACA,oBAiBIC,EAAW,CAAC,SAAU,KAAM,OAKlCL,EAAmBM,QAASC,IAC1BF,EAASC,QAASE,IAChBR,EAAmBS,KAfvB,SAAmBD,EAAgBE,GACjC,OAAOF,EAASE,EAAIC,OAAO,GAAGC,cAAgBF,EAAIG,UAAU,GAclCC,CAAUN,EAAQD,QAO9CP,EAAmBM,QAASC,IACtBH,EAAgBW,SAASR,IAC3BH,EAAgBK,KAAKF,KAIlB,MAAMS,EAAkB,GAC/BZ,EAAgBa,IAAKC,IACnBF,EAAWE,IAAY,IAGlB,MAAMC,EAAeD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,OAAQ,IACRc,OAAQ,IACRC,SAAU,IACVC,KAAM,IACNC,UAAW,IACX9N,MAAO,KAET+N,UAAW,CACTnE,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJC,GAAI,GACJkD,MAAO,GACPC,MAAO,GACPC,MAAO,GACPC,MAAO,GACPC,MAAO,gJP/B0BU,IACnC1E,IAAeC,OAAe0E,oBAAiBhI,oCAOjD,WACE,IAAIiI,GAAM,EAKV,OAHI5E,MACF4E,KAA2D,IAAnD3E,OAAO4E,SAASC,SAAS3F,QAAQ,eAEpCyF,oBAeT,WACE,OAAOG,UAAUC,UAAUC,MAAM,mDAbnC,WACE,SAAIjF,KACEC,QAAUA,OAAO4E,UAAY5E,OAAO4E,SAASC,YAE7C7E,OAAO4E,SAASC,SAASxI,SAAS,cAClC2D,OAAO4E,SAASC,SAASxI,SAAS,0GGPb4I,KAC3B,MAAMvD,YAAEA,EAAWxE,QAAEA,EAAOD,aAAEA,GAAiBE,KACxC+H,EAAQC,GAAaC,WAAS,OAC9BC,EAAaC,GAAkBF,WACpC,aA2BF,OAxBAzD,EAAS,KACP,IAAK,MAAM4D,KAActI,EACvB6E,EAAYyD,EAAYtI,EAAasI,GAAaJ,GAEpDrD,EACE,YACA,2CACAwD,GAEFxD,EACE,WACA,0CACAwD,KAYG,CACL5D,YAAAA,EACAxE,QAAAA,EACAmI,YAAAA,EACAH,OAAAA,EACAM,GAbUC,GACHvI,EAAQuI,GAAQpJ,SAAS6I,GAahCQ,GAVUC,GACHA,GAAKT"}
|
|
1
|
+
{"version":3,"file":"app-studio.cjs.production.min.js","sources":["../src/utils/colors.ts","../src/providers/Theme.tsx","../src/utils/shadow.ts","../src/utils/style.ts","../src/providers/Responsive.tsx","../src/components/Element.tsx","../src/components/View.tsx","../src/utils/env.ts","../src/hooks/useMount.ts","../src/hooks/useResponsive.ts","../src/components/Form.tsx","../src/components/Image.tsx","../src/components/Text.tsx","../src/utils/typography.ts"],"sourcesContent":["export type ColorPalette = Record<string, Record<number, string>>;\n\nexport type ColorSingleton = Record<\n string,\n {\n 50: string;\n 100: string;\n 200: string;\n 300: string;\n 400: string;\n 500: string;\n 600: string;\n 700: string;\n 800: string;\n 900: string;\n }\n>;\n\nexport const palette: ColorPalette = {\n white: {\n 50: 'rgba(255, 255, 255, 0.04)',\n 100: 'rgba(255, 255, 255, 0.08)',\n 200: 'rgba(255, 255, 255, 0.16)',\n 300: 'rgba(255, 255, 255, 0.24)',\n 400: 'rgba(255, 255, 255, 0.36)',\n 500: 'rgba(255, 255, 255, 0.48)',\n 600: 'rgba(255, 255, 255, 0.64)',\n 700: 'rgba(255, 255, 255, 0.80)',\n 800: 'rgba(255, 255, 255, 0.92)',\n 900: 'rgba(255, 255, 255, 1)',\n },\n\n black: {\n 50: 'rgba(0, 0, 0, 0.04)',\n 100: 'rgba(0, 0, 0, 0.08)',\n 200: 'rgba(0, 0, 0, 0.16)',\n 300: 'rgba(0, 0, 0, 0.24)',\n 400: 'rgba(0, 0, 0, 0.36)',\n 500: 'rgba(0, 0, 0, 0.48)',\n 600: 'rgba(0, 0, 0, 0.64)',\n 700: 'rgba(0, 0, 0, 0.80)',\n 800: 'rgba(0, 0, 0, 0.92)',\n 900: 'rgba(0, 0, 0, 1)',\n },\n rose: {\n 50: '#fff1f2',\n 100: '#ffe4e6',\n 200: '#fecdd3',\n 300: '#fda4af',\n 400: '#fb7185',\n 500: '#f43f5e',\n 600: '#e11d48',\n 700: '#be123c',\n 800: '#9f1239',\n 900: '#881337',\n },\n pink: {\n 50: '#fdf2f8',\n 100: '#fce7f3',\n 200: '#fbcfe8',\n 300: '#f9a8d4',\n 400: '#f472b6',\n 500: '#ec4899',\n 600: '#db2777',\n 700: '#be185d',\n 800: '#9d174d',\n 900: '#831843',\n },\n fuchsia: {\n 50: '#fdf4ff',\n 100: '#fae8ff',\n 200: '#f5d0fe',\n 300: '#f0abfc',\n 400: '#e879f9',\n 500: '#d946ef',\n 600: '#c026d3',\n 700: '#a21caf',\n 800: '#86198f',\n 900: '#701a75',\n },\n purple: {\n 50: '#faf5ff',\n 100: '#f3e8ff',\n 200: '#e9d5ff',\n 300: '#d8b4fe',\n 400: '#c084fc',\n 500: '#a855f7',\n 600: '#9333ea',\n 700: '#7e22ce',\n 800: '#6b21a8',\n 900: '#581c87',\n },\n violet: {\n 50: '#f5f3ff',\n 100: '#ede9fe',\n 200: '#ddd6fe',\n 300: '#c4b5fd',\n 400: '#a78bfa',\n 500: '#8b5cf6',\n 600: '#7c3aed',\n 700: '#6d28d9',\n 800: '#5b21b6',\n 900: '#4c1d95',\n },\n indigo: {\n 50: '#eef2ff',\n 100: '#e0e7ff',\n 200: '#c7d2fe',\n 300: '#a5b4fc',\n 400: '#818cf8',\n 500: '#6366f1',\n 600: '#4f46e5',\n 700: '#4338ca',\n 800: '#3730a3',\n 900: '#312e81',\n },\n blue: {\n 50: '#eff6ff',\n 100: '#dbeafe',\n 200: '#bfdbfe',\n 300: '#93c5fd',\n 400: '#60a5fa',\n 500: '#3b82f6',\n 600: '#2563eb',\n 700: '#1d4ed8',\n 800: '#1e40af',\n 900: '#1e3a8a',\n },\n lightBlue: {\n 50: '#f0f9ff',\n 100: '#e0f2fe',\n 200: '#bae6fd',\n 300: '#7dd3fc',\n 400: '#38bdf8',\n 500: '#0ea5e9',\n 600: '#0284c7',\n 700: '#0369a1',\n 800: '#075985',\n 900: '#0c4a6e',\n },\n cyan: {\n 50: '#ecfeff',\n 100: '#cffafe',\n 200: '#a5f3fc',\n 300: '#67e8f9',\n 400: '#22d3ee',\n 500: '#06b6d4',\n 600: '#0891b2',\n 700: '#0e7490',\n 800: '#155e75',\n 900: '#164e63',\n },\n teal: {\n 50: '#f0fdfa',\n 100: '#ccfbf1',\n 200: '#99f6e4',\n 300: '#5eead4',\n 400: '#2dd4bf',\n 500: '#14b8a6',\n 600: '#0d9488',\n 700: '#0f766e',\n 800: '#115e59',\n 900: '#134e4a',\n },\n emerald: {\n 50: '#ecfdf5',\n 100: '#d1fae5',\n 200: '#a7f3d0',\n 300: '#6ee7b7',\n 400: '#34d399',\n 500: '#10b981',\n 600: '#059669',\n 700: '#047857',\n 800: '#065f46',\n 900: '#064e3b',\n },\n green: {\n 50: '#f0fdf4',\n 100: '#dcfce7',\n 200: '#bbf7d0',\n 300: '#86efac',\n 400: '#4ade80',\n 500: '#22c55e',\n 600: '#16a34a',\n 700: '#15803d',\n 800: '#166534',\n 900: '#14532d',\n },\n lime: {\n 50: '#f7fee7',\n 100: '#ecfccb',\n 200: '#d9f99d',\n 300: '#bef264',\n 400: '#a3e635',\n 500: '#84cc16',\n 600: '#65a30d',\n 700: '#4d7c0f',\n 800: '#3f6212',\n 900: '#365314',\n },\n yellow: {\n 50: '#fefce8',\n 100: '#fef9c3',\n 200: '#fef08a',\n 300: '#fde047',\n 400: '#facc15',\n 500: '#eab308',\n 600: '#ca8a04',\n 700: '#a16207',\n 800: '#854d0e',\n 900: '#713f12',\n },\n amber: {\n 50: '#fffbeb',\n 100: '#fef3c7',\n 200: '#fde68a',\n 300: '#fcd34d',\n 400: '#fbbf24',\n 500: '#f59e0b',\n 600: '#d97706',\n 700: '#b45309',\n 800: '#92400e',\n 900: '#78350f',\n },\n orange: {\n 50: '#fff7ed',\n 100: '#ffedd5',\n 200: '#fed7aa',\n 300: '#fdba74',\n 400: '#fb923c',\n 500: '#f97316',\n 600: '#ea580c',\n 700: '#c2410c',\n 800: '#9a3412',\n 900: '#7c2d12',\n },\n red: {\n 50: '#fef2f2',\n 100: '#fee2e2',\n 200: '#fecaca',\n 300: '#fca5a5',\n 400: '#f87171',\n 500: '#ef4444',\n 600: '#dc2626',\n 700: '#b91c1c',\n 800: '#991b1b',\n 900: '#7f1d1d',\n },\n warmGray: {\n 50: '#fafaf9',\n 100: '#f5f5f4',\n 200: '#e7e5e4',\n 300: '#d6d3d1',\n 400: '#a8a29e',\n 500: '#78716c',\n 600: '#57534e',\n 700: '#44403c',\n 800: '#292524',\n 900: '#1c1917',\n },\n trueGray: {\n 50: '#fafafa',\n 100: '#f5f5f5',\n 200: '#e5e5e5',\n 300: '#d4d4d4',\n 400: '#a3a3a3',\n 500: '#737373',\n 600: '#525252',\n 700: '#404040',\n 800: '#262626',\n 900: '#171717',\n },\n gray: {\n 50: '#fafafa',\n 100: '#f4f4f5',\n 200: '#e4e4e7',\n 300: '#d4d4d8',\n 400: '#a1a1aa',\n 500: '#71717a',\n 600: '#52525b',\n 700: '#3f3f46',\n 800: '#27272a',\n 900: '#18181b',\n },\n dark: {\n 50: '#18181b',\n 100: '#27272a',\n 200: '#3f3f46',\n 300: '#52525b',\n 400: '#71717a',\n 500: '#a1a1aa',\n 600: '#d4d4d8',\n 700: '#e4e4e7',\n 800: '#f4f4f5',\n 900: '#fafafa',\n },\n coolGray: {\n 50: '#f9fafb',\n 100: '#f3f4f6',\n 200: '#e5e7eb',\n 300: '#d1d5db',\n 400: '#9ca3af',\n 500: '#6b7280',\n 600: '#4b5563',\n 700: '#374151',\n 800: '#1f2937',\n 900: '#111827',\n },\n blueGray: {\n 50: '#f8fafc',\n 100: '#f1f5f9',\n 200: '#e2e8f0',\n 300: '#cbd5e1',\n 400: '#94a3b8',\n 500: '#64748b',\n 600: '#475569',\n 700: '#334155',\n 800: '#1e293b',\n 900: '#0f172a',\n },\n};\n","import React from 'react';\n\nimport { createContext, useContext } from 'react';\nimport { palette as defaultPalette } from '../utils/colors';\n\ntype ColorConfig = Record<string, string>;\n\ntype VariantColorConfig = Record<string, Record<string, string>>;\n\nexport const defaultThemeMain: ColorConfig = {\n primary: 'color.black',\n secondary: 'color.blue',\n success: 'color.green.500',\n error: 'color.red.500',\n warning: 'color.orange.500',\n disabled: 'color.gray.500',\n loading: 'color.dark.500',\n};\n\nexport const defaultColors: ColorConfig = {\n white: '#FFFFFF',\n black: '#000000',\n red: '#FF0000',\n green: '#00FF00',\n blue: '#0000FF',\n yellow: '#FFFF00',\n cyan: '#00FFFF',\n magenta: '#FF00FF',\n grey: '#808080',\n orange: '#FFA500',\n brown: '#A52A2A',\n purple: '#800080',\n pink: '#FFC0CB',\n lime: '#00FF00',\n teal: '#008080',\n navy: '#000080',\n olive: '#808000',\n maroon: '#800000',\n gold: '#FFD700',\n silver: '#C0C0C0',\n indigo: '#4B0082',\n violet: '#EE82EE',\n beige: '#F5F5DC',\n turquoise: '#40E0D0',\n coral: '#FF7F50',\n chocolate: '#D2691E',\n skyBlue: '#87CEEB',\n plum: '#DDA0DD',\n darkGreen: '#006400',\n salmon: '#FA8072',\n};\n\nexport const ThemeContext = createContext<{\n getColor: (color: string) => string;\n theme?: {\n main: { [key: string]: string };\n components?: { [key: string]: { [key: string]: string } };\n };\n colors?: {\n main?: ColorConfig;\n palette?: VariantColorConfig;\n };\n}>({\n getColor: (name: string): string => {\n return name;\n },\n colors: {\n main: defaultColors,\n palette: defaultPalette,\n },\n theme: { main: defaultThemeMain, components: {} },\n});\n\nexport const useTheme = () => useContext(ThemeContext);\n\nexport const ThemeProvider = ({\n theme = {\n main: defaultThemeMain,\n components: {},\n },\n colors = {\n main: defaultColors,\n palette: defaultPalette,\n },\n children,\n}: {\n theme?: {\n main: { [key: string]: string };\n components: { [key: string]: { [key: string]: string } };\n };\n colors?: {\n main?: ColorConfig;\n palette?: VariantColorConfig;\n };\n children: any;\n}): React.ReactElement => {\n const getColor = (name: string): string => {\n if (name === 'transparent') return name;\n\n try {\n // Si le nom commence par \"theme.\", nous recherchons dans les couleurs du thème\n if (name.startsWith('theme.')) {\n const keys = name.split('.');\n if (\n keys[1] !== undefined &&\n typeof theme.components[keys[1]] == 'object' &&\n theme.components[keys[1]][keys[2]] !== undefined\n ) {\n return getColor(theme.components[keys[1]][keys[2]]);\n } else if (theme.main[keys[1]] && theme.main[keys[1]] !== undefined) {\n return getColor(theme.main[keys[1]]);\n } else {\n console.log('Color ' + name + ' not found');\n }\n }\n // Si le nom commence par \"color.\", nous recherchons dans la palette\n else if (name.startsWith('color.')) {\n const keys = name.split('.'); // Retirer le préfixe \"color.\"\n\n if (colors.palette && colors.palette[keys[1]][keys[2]] !== undefined) {\n return colors.palette[keys[1]][keys[2]];\n } else if (\n colors.palette &&\n colors.palette[keys[1]][parseInt(keys[2])] !== undefined\n ) {\n return colors.palette[keys[1]][parseInt(keys[2])];\n } else if (colors.main && colors.main[keys[1]] !== undefined) {\n return colors.main[keys[1]];\n } else {\n console.log('Color ' + name + ' not found');\n }\n }\n } catch (e) {}\n\n return name;\n };\n\n return (\n <ThemeContext.Provider\n value={{\n getColor,\n theme: {\n main: {\n ...defaultThemeMain,\n ...theme.main,\n },\n components: {\n ...theme.components,\n },\n },\n colors: {\n main: {\n ...defaultColors,\n ...colors.main,\n },\n palette: {\n ...defaultPalette,\n ...colors.palette,\n },\n },\n }}\n >\n {children}\n </ThemeContext.Provider>\n );\n};\n","export type Shadow = {\n shadowColor: string;\n shadowOffset: {\n width: number;\n height: number;\n };\n shadowOpacity: number;\n shadowRadius: number;\n};\n\nexport const Shadows: Record<number, Shadow> = {\n 0: {\n shadowColor: '#000',\n shadowOffset: {\n width: 1,\n height: 2,\n },\n shadowOpacity: 0.18,\n shadowRadius: 1.0,\n },\n 1: {\n shadowColor: '#000',\n shadowOffset: {\n width: 2,\n height: 2,\n },\n shadowOpacity: 0.2,\n shadowRadius: 1.41,\n },\n 2: {\n shadowColor: '#000',\n shadowOffset: {\n width: 3,\n height: 3,\n },\n shadowOpacity: 0.22,\n shadowRadius: 2.22,\n },\n 3: {\n shadowColor: '#000',\n shadowOffset: {\n width: 4,\n height: 4,\n },\n shadowOpacity: 0.23,\n shadowRadius: 2.62,\n },\n 4: {\n shadowColor: '#000',\n shadowOffset: {\n width: 5,\n height: 5,\n },\n shadowOpacity: 0.25,\n shadowRadius: 3.84,\n },\n 5: {\n shadowColor: '#000',\n shadowOffset: {\n width: 6,\n height: 6,\n },\n shadowOpacity: 0.27,\n shadowRadius: 4.65,\n },\n 6: {\n shadowColor: '#000',\n shadowOffset: {\n width: 7,\n height: 7,\n },\n shadowOpacity: 0.29,\n shadowRadius: 4.65,\n },\n 7: {\n shadowColor: '#000',\n shadowOffset: {\n width: 8,\n height: 8,\n },\n shadowOpacity: 0.3,\n shadowRadius: 4.65,\n },\n 8: {\n shadowColor: '#000',\n shadowOffset: {\n width: 9,\n height: 9,\n },\n shadowOpacity: 0.32,\n shadowRadius: 5.46,\n },\n 9: {\n shadowColor: '#000',\n shadowOffset: {\n width: 10,\n height: 10,\n },\n shadowOpacity: 0.34,\n shadowRadius: 6.27,\n },\n};\n","import unitlessKeys from '@emotion/unitless';\n\nexport const unitlessStyleProps = Object.keys(unitlessKeys);\n\nexport const validStyleProps = [\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'alignmentBaseline',\n 'all',\n 'animation',\n 'animationDelay',\n 'animationDirection',\n 'animationDuration',\n 'animationFillMode',\n 'animationIterationCount',\n 'animationName',\n 'animationPlayState',\n 'animationTimingFunction',\n 'appearance',\n 'backdropFilter',\n 'backfaceVisibility',\n 'background',\n 'backgroundAttachment',\n 'backgroundBlendMode',\n 'backgroundClip',\n 'backgroundColor',\n 'backgroundImage',\n 'backgroundOrigin',\n 'backgroundPosition',\n 'backgroundPositionX',\n 'backgroundPositionY',\n 'backgroundRepeat',\n 'backgroundRepeatX',\n 'backgroundRepeatY',\n 'backgroundSize',\n 'baselineShift',\n 'blockSize',\n 'border',\n 'borderBlockEnd',\n 'borderBlockEndColor',\n 'borderBlockEndStyle',\n 'borderBlockEndWidth',\n 'borderBlockStart',\n 'borderBlockStartColor',\n 'borderBlockStartStyle',\n 'borderBlockStartWidth',\n 'borderBottom',\n 'borderBottomColor',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderBottomStyle',\n 'borderBottomWidth',\n 'borderCollapse',\n 'borderColor',\n 'borderImage',\n 'borderImageOutset',\n 'borderImageRepeat',\n 'borderImageSlice',\n 'borderImageSource',\n 'borderImageWidth',\n 'borderInlineEnd',\n 'borderInlineEndColor',\n 'borderInlineEndStyle',\n 'borderInlineEndWidth',\n 'borderInlineStart',\n 'borderInlineStartColor',\n 'borderInlineStartStyle',\n 'borderInlineStartWidth',\n 'borderLeft',\n 'borderLeftColor',\n 'borderLeftStyle',\n 'borderLeftWidth',\n 'borderRadius',\n 'borderRight',\n 'borderRightColor',\n 'borderRightStyle',\n 'borderRightWidth',\n 'borderSpacing',\n 'borderStyle',\n 'borderTop',\n 'borderTopColor',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderTopStyle',\n 'borderTopWidth',\n 'borderWidth',\n 'bottom',\n 'boxShadow',\n 'boxSizing',\n 'breakAfter',\n 'breakBefore',\n 'breakInside',\n 'bufferedRendering',\n 'captionSide',\n 'caretColor',\n 'clear',\n 'clip',\n 'clipPath',\n 'clipRule',\n 'color',\n 'colorInterpolation',\n 'colorInterpolationFilters',\n 'colorRendering',\n 'columnCount',\n 'columnFill',\n 'columnGap',\n 'columnRule',\n 'columnRuleColor',\n 'columnRuleStyle',\n 'columnRuleWidth',\n 'columnSpan',\n 'columnWidth',\n 'columns',\n 'contain',\n 'content',\n 'counterIncrement',\n 'counterReset',\n 'cursor',\n 'cx',\n 'cy',\n 'd',\n 'direction',\n 'display',\n 'dominantBaseline',\n 'emptyCells',\n 'fill',\n 'fillOpacity',\n 'fillRule',\n 'filter',\n 'flex',\n 'flexBasis',\n 'flexDirection',\n 'flexFlow',\n 'flexGrow',\n 'flexShrink',\n 'flexWrap',\n 'float',\n 'floodColor',\n 'floodOpacity',\n 'font',\n 'fontDisplay',\n 'fontFamily',\n 'fontFeatureSettings',\n 'fontKerning',\n 'fontSize',\n 'fontStretch',\n 'fontStyle',\n 'fontVariant',\n 'fontVariantCaps',\n 'fontVariantEastAsian',\n 'fontVariantLigatures',\n 'fontVariantNumeric',\n 'fontVariationSettings',\n 'fontWeight',\n 'gap',\n 'grid',\n 'gridArea',\n 'gridAutoColumns',\n 'gridAutoFlow',\n 'gridAutoRows',\n 'gridColumn',\n 'gridColumnEnd',\n 'gridColumnGap',\n 'gridColumnStart',\n 'gridGap',\n 'gridRow',\n 'gridRowEnd',\n 'gridRowGap',\n 'gridRowStart',\n 'gridTemplate',\n 'gridTemplateAreas',\n 'gridTemplateColumns',\n 'gridTemplateRows',\n 'height',\n 'hyphens',\n 'imageRendering',\n 'inlineSize',\n 'isolation',\n 'justifyContent',\n 'justifyItems',\n 'justifySelf',\n 'left',\n 'letterSpacing',\n 'lightingColor',\n 'lineBreak',\n 'lineHeight',\n 'listStyle',\n 'listStyleImage',\n 'listStylePosition',\n 'listStyleType',\n 'margin',\n 'marginBlockEnd',\n 'marginBlockStart',\n 'marginBottom',\n 'marginInlineEnd',\n 'marginInlineStart',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marker',\n 'markerEnd',\n 'markerMid',\n 'markerStart',\n 'mask',\n 'maskType',\n 'maxBlockSize',\n 'maxHeight',\n 'maxInlineSize',\n 'maxWidth',\n 'maxZoom',\n 'minBlockSize',\n 'minHeight',\n 'minInlineSize',\n 'minWidth',\n 'minZoom',\n 'mixBlendMode',\n 'objectFit',\n 'objectPosition',\n 'offset',\n 'offsetDistance',\n 'offsetPath',\n 'offsetRotate',\n 'opacity',\n 'order',\n 'orientation',\n 'orphans',\n 'outline',\n 'outlineColor',\n 'outlineOffset',\n 'outlineStyle',\n 'outlineWidth',\n 'overflow',\n 'overflowAnchor',\n 'overflowWrap',\n 'overflowX',\n 'overflowY',\n 'overscrollBehavior',\n 'overscrollBehaviorBlock',\n 'overscrollBehaviorInline',\n 'overscrollBehaviorX',\n 'overscrollBehaviorY',\n 'padding',\n 'paddingBlockEnd',\n 'paddingBlockStart',\n 'paddingBottom',\n 'paddingInlineEnd',\n 'paddingInlineStart',\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'page',\n 'pageBreakAfter',\n 'pageBreakBefore',\n 'pageBreakInside',\n 'paintOrder',\n 'perspective',\n 'perspectiveOrigin',\n 'placeContent',\n 'placeItems',\n 'placeSelf',\n 'pointerEvents',\n 'position',\n 'quotes',\n 'r',\n 'resize',\n 'right',\n 'rowGap',\n 'rx',\n 'ry',\n 'scrollBehavior',\n 'scrollMargin',\n 'scrollMarginBlock',\n 'scrollMarginBlockEnd',\n 'scrollMarginBlockStart',\n 'scrollMarginBottom',\n 'scrollMarginInline',\n 'scrollMarginInlineEnd',\n 'scrollMarginInlineStart',\n 'scrollMarginLeft',\n 'scrollMarginRight',\n 'scrollMarginTop',\n 'scrollPadding',\n 'scrollPaddingBlock',\n 'scrollPaddingBlockEnd',\n 'scrollPaddingBlockStart',\n 'scrollPaddingBottom',\n 'scrollPaddingInline',\n 'scrollPaddingInlineEnd',\n 'scrollPaddingInlineStart',\n 'scrollPaddingLeft',\n 'scrollPaddingRight',\n 'scrollPaddingTop',\n 'scrollSnapAlign',\n 'scrollSnapStop',\n 'scrollSnapType',\n 'shapeImageThreshold',\n 'shapeMargin',\n 'shapeOutside',\n 'shapeRendering',\n 'size',\n 'speak',\n 'src',\n 'stopColor',\n 'stopOpacity',\n 'stroke',\n 'strokeDasharray',\n 'strokeDashoffset',\n 'strokeLinecap',\n 'strokeLinejoin',\n 'strokeMiterlimit',\n 'strokeOpacity',\n 'strokeWidth',\n 'tabSize',\n 'tableLayout',\n 'textAlign',\n 'textAlignLast',\n 'textAnchor',\n 'textCombineUpright',\n 'textDecoration',\n 'textDecorationColor',\n 'textDecorationLine',\n 'textDecorationSkipInk',\n 'textDecorationStyle',\n 'textIndent',\n 'textOrientation',\n 'textOverflow',\n 'textRendering',\n 'textShadow',\n 'textSizeAdjust',\n 'textTransform',\n 'textUnderlinePosition',\n 'top',\n 'touchAction',\n 'transform',\n 'transformBox',\n 'transformOrigin',\n 'transformStyle',\n 'transition',\n 'transitionDelay',\n 'transitionDuration',\n 'transitionProperty',\n 'transitionTimingFunction',\n 'unicodeBidi',\n 'unicodeRange',\n 'userSelect',\n 'userZoom',\n 'vectorEffect',\n 'verticalAlign',\n 'visibility',\n 'whiteSpace',\n 'widows',\n 'width',\n 'willChange',\n 'wordBreak',\n 'wordSpacing',\n 'wordWrap',\n 'writingMode',\n 'x',\n 'y',\n 'zIndex',\n 'zoom',\n 'alwaysBounceHorizontal',\n 'alwaysBounceVertical',\n 'automaticallyAdjustContentInsets',\n 'bounces',\n 'bouncesZoom',\n 'canCancelContentTouches',\n 'centerContent',\n 'contentLayoutStyle',\n 'contentInset',\n 'contentInsetAdjustmentBehavior',\n 'contentOffset',\n 'decelerationRate',\n 'directionalLockEnabled',\n 'disableIntervalMomentum',\n 'disableScrollViewPanResponder',\n 'endFillColor',\n 'fadingEdgeLength',\n 'horizontal',\n 'indicatorStyle',\n 'invertStickyHeaders',\n 'keyboardDismissMode',\n 'keyboardShouldPersistTaps',\n 'maintainVisibleContentPosition',\n 'maximumZoomScale',\n 'minimumZoomScale',\n 'nestedScrollEnabled',\n 'onContentSizeChange',\n 'onMomentumScrollBegin',\n 'onMomentumScrollEnd',\n 'onScroll',\n 'onScrollBeginDrag',\n 'onScrollEndDrag',\n 'onScrollToTop',\n 'overScrollMode',\n 'pagingEnabled',\n 'persistentScrollbar',\n 'pinchGestureEnabled',\n 'refreshControl',\n 'removeClippedSubviews',\n 'scrollBarThumbImage',\n 'scrollEnabled',\n 'scrollEventThrottle',\n 'scrollIndicatorInsets',\n 'scrollPerfTag',\n 'scrollToOverflowEnabled',\n 'scrollsToTop',\n 'DEPRECATED_sendUpdatedChildFrames',\n 'showsHorizontalScrollIndicator',\n 'showsVerticalScrollIndicator',\n 'snapToAlignment',\n 'snapToEnd',\n 'snapToInterval',\n 'snapToOffsets',\n 'snapToStart',\n 'stickyHeaderIndices',\n 'zoomScale',\n 'borderRightColor',\n 'backfaceVisibility',\n 'borderBottomColor',\n 'borderBottomEndRadius',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderBottomStartRadius',\n 'borderBottomWidth',\n 'borderColor',\n 'borderEndColor',\n 'borderLeftColor',\n 'borderLeftWidth',\n 'borderRadius',\n 'backgroundColor',\n 'borderRightWidth',\n 'borderStartColor',\n 'borderStyle',\n 'borderTopColor',\n 'borderTopEndRadius',\n 'borderTopLeftRadius',\n 'borderTopRightRadius',\n 'borderTopStartRadius',\n 'borderTopWidth',\n 'borderWidth',\n 'border',\n 'opacity',\n 'elevation',\n 'shadowColor',\n 'shadowOffset',\n 'shadowOpacity',\n 'shadowRadius',\n 'alignContent',\n 'alignItems',\n 'alignSelf',\n 'aspectRatio',\n 'borderBottomWidth',\n 'borderEndWidth',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderStartWidth',\n 'borderTopWidth',\n 'borderWidth',\n 'bottom',\n 'direction',\n 'display',\n 'end',\n 'flex',\n 'flexBasis',\n 'flexDirection',\n 'flexGrow',\n 'flexShrink',\n 'flexWrap',\n 'height',\n 'justifyContent',\n 'left',\n 'margin',\n 'marginBottom',\n 'marginEnd',\n 'marginHorizontal',\n 'marginLeft',\n 'marginRight',\n 'marginStart',\n 'marginTop',\n 'marginVertical',\n 'maxHeight',\n 'maxWidth',\n 'minHeight',\n 'minWidth',\n 'overflow',\n 'overflowX',\n 'overflowY',\n 'padding',\n 'paddingBottom',\n 'paddingEnd',\n 'paddingHorizontal',\n 'paddingLeft',\n 'paddingRight',\n 'paddingStart',\n 'paddingTop',\n 'paddingVertical',\n 'position',\n 'right',\n 'start',\n 'top',\n 'width',\n 'zIndex',\n 'borderTopRightRadius',\n 'backfaceVisibility',\n 'borderBottomLeftRadius',\n 'borderBottomRightRadius',\n 'borderColor',\n 'borderRadius',\n 'borderTopLeftRadius',\n 'backgroundColor',\n 'borderWidth',\n 'opacity',\n 'overflow',\n 'overflowX',\n 'overflowY',\n 'resizeMode',\n 'tintColor',\n 'overlayColor',\n 'transform',\n 'transformMatrix',\n 'rotation',\n 'scaleX',\n 'scaleY',\n 'translateX',\n 'translateY',\n 'perspective',\n 'rotate',\n 'rotateX',\n 'rotateY',\n 'rotateZ',\n 'scale',\n 'skewX',\n 'skewY',\n 'testID',\n 'decomposedMatrix',\n];\n\n/**\n * @param {string} prefix vendor-specific prefix, eg: Webkit\n * @param {string} key style name, eg: transitionDuration\n * @return {string} style name prefixed with `prefix`, properly camelCased, eg:\n * WebkitTransitionDuration\n */\nfunction prefixKey(prefix: string, key: string) {\n return prefix + key.charAt(0).toUpperCase() + key.substring(1);\n}\n\n/**\n * Support style names that may come passed in prefixed by adding permutations\n * of vendor prefixes.\n */\nconst prefixes = ['webkit', 'ms', 'moz'];\n\n/**\n * Add vendor prefixing to unitless style keys.\n */\nunitlessStyleProps.forEach((prop) => {\n prefixes.forEach((prefix) => {\n unitlessStyleProps.push(prefixKey(prefix, prop));\n });\n});\n\n/**\n * Add all unitless style keys to valid style keys.\n */\nunitlessStyleProps.forEach((prop) => {\n if (validStyleProps.includes(prop)) {\n validStyleProps.push(prop);\n }\n});\n\nexport const StyleProps: any = {};\nvalidStyleProps.map((property) => {\n StyleProps[property] = true;\n});\n\nexport const isStyleProp = (property: string): boolean => {\n return StyleProps[property] !== undefined;\n};\n","import React, { ReactNode, createContext, useContext } from 'react';\n\nexport type ScreenSizeRange = {\n breakpoint: string;\n min: number;\n max?: number;\n};\nexport type ResponsiveConfig = Record<string, number>;\nconst defaultBreakpointsConfig: ResponsiveConfig = {\n xs: 0,\n sm: 340,\n md: 560,\n lg: 1080,\n xl: 1300,\n};\n\nexport type DeviceConfig = Record<string, string[]>;\nexport type QueryConfig = Record<string, string>;\nconst defaultDeviceConfig: DeviceConfig = {\n mobile: ['xs', 'sm'],\n tablet: ['md', 'lg'],\n desktop: ['lg', 'xl'],\n};\n\nexport type ScreenConfig = {\n breakpoints: ResponsiveConfig;\n devices: DeviceConfig;\n mediaQueries: QueryConfig;\n};\n\nexport type ScreenOrientation = 'landscape' | 'portrait';\n\nconst getMediaQueries = (b: ResponsiveConfig) => {\n const defaultKeys = Object.keys(b);\n\n const breakpointValue = defaultKeys\n .map((breakpoint) => {\n const value: ScreenSizeRange = {\n breakpoint: breakpoint as keyof typeof b,\n min: b[breakpoint],\n max: 0,\n };\n\n return value;\n })\n .sort((a, b) => a.min - b.min);\n\n breakpointValue.reduce((a, b) => {\n if (b) a.max = b.min;\n\n return b;\n });\n\n const query: Record<keyof typeof defaultBreakpointsConfig, string> = {};\n breakpointValue.map((sizeScreen) => {\n query[sizeScreen.breakpoint] = `only screen ${\n sizeScreen.min && sizeScreen.min >= 0\n ? 'and (min-width:' + sizeScreen.min + 'px)'\n : ''\n } ${\n sizeScreen.max && sizeScreen.max >= 0\n ? 'and (max-width:' + sizeScreen.max + 'px)'\n : ''\n }`;\n });\n\n return query;\n};\n\nconst defaultScreenConfig: ScreenConfig = {\n breakpoints: defaultBreakpointsConfig,\n devices: defaultDeviceConfig,\n mediaQueries: getMediaQueries(defaultBreakpointsConfig),\n};\n\nexport const ResponsiveContext =\n createContext<ScreenConfig>(defaultScreenConfig);\n\nexport const useResponsiveContext = () => useContext(ResponsiveContext);\n\nexport const ResponsiveProvider = ({\n breakpoints = defaultBreakpointsConfig,\n devices = defaultDeviceConfig,\n children,\n}: {\n breakpoints?: ResponsiveConfig;\n devices?: DeviceConfig;\n\n children?: ReactNode;\n}): React.ReactElement => {\n return (\n <ResponsiveContext.Provider\n value={{\n breakpoints,\n devices,\n mediaQueries: getMediaQueries(breakpoints),\n }}\n >\n {children}\n </ResponsiveContext.Provider>\n );\n};\n","import React, { useMemo } from 'react';\nimport Color from 'color-convert';\nimport styled, { CSSProperties } from 'styled-components';\n\nimport { useTheme } from '../providers/Theme';\nimport { Shadows, Shadow } from '../utils/shadow';\nimport { isStyleProp } from '../utils/style';\nimport { useResponsiveContext } from '../providers/Responsive';\n\nexport interface ElementProps {\n children?: any;\n size?: number;\n on?: Record<string, CSSProperties>;\n media?: Record<string, CSSProperties>;\n paddingHorizontal?: number | string;\n marginHorizontal?: number | string;\n paddingVertical?: number | string;\n marginVertical?: number | string;\n shadow?: boolean | number | Shadow;\n only?: string[];\n}\n\nconst NumberPropsStyle: any = {};\nconst NumberProps = [\n 'numberOfLines',\n 'fontWeight',\n 'timeStamp',\n 'flex',\n 'flexGrow',\n 'flexShrink',\n 'order',\n 'zIndex',\n 'aspectRatio',\n 'shadowOpacity',\n 'shadowRadius',\n 'scale',\n 'opacity',\n 'min',\n 'max',\n 'now',\n];\n\nNumberProps.map((property: string) => {\n NumberPropsStyle[property] = true;\n});\n\nexport const setSize = (newSize: string | number, styleProps: any) => {\n styleProps.height = styleProps.width = newSize;\n};\n\nexport const applyStyle = (oldProps: any) => {\n //console.log({ applyStyle: props });\n // eslint-disable-next-line prefer-const\n let { ...props } = oldProps;\n const { getColor } = useTheme();\n const { mediaQueries, devices } = useResponsiveContext();\n\n // eslint-disable-next-line prefer-const\n let styleProps: any = {\n native: {},\n };\n //const otherProps: any = {};\n\n if (props.onClick && styleProps.cursor == undefined) {\n styleProps.cursor = 'pointer';\n }\n\n const size =\n props.height !== undefined &&\n props.width !== undefined &&\n props.height === props.width\n ? props.height\n : props.size\n ? props.size\n : null;\n\n if (size) {\n setSize(size, styleProps);\n }\n\n if (props.paddingHorizontal) {\n styleProps.paddingLeft = props.paddingHorizontal;\n styleProps.paddingRight = props.paddingHorizontal;\n }\n\n if (props.marginHorizontal) {\n styleProps.marginLeft = props.marginHorizontal;\n styleProps.marginRight = props.marginHorizontal;\n }\n\n if (props.paddingVertical) {\n styleProps.paddingTop = props.paddingVertical;\n styleProps.paddingBottom = props.paddingVertical;\n }\n\n if (props.marginVertical) {\n styleProps.marginTop = props.marginVertical;\n styleProps.marginBottom = props.marginVertical;\n }\n\n if (props.shadow) {\n if (typeof props.shadow === 'number' || typeof props.shadow === 'boolean') {\n const shawdowValue: number =\n typeof props.shadow === 'number' && Shadows[props.shadow] !== undefined\n ? props.shadow\n : 2;\n\n if (Shadows[shawdowValue]) {\n const shadowColor = Color.hex\n .rgb(Shadows[shawdowValue].shadowColor)\n .join(',');\n\n styleProps[\n 'boxShadow'\n ] = `${Shadows[shawdowValue].shadowOffset.height}px ${Shadows[shawdowValue].shadowOffset.width}px ${Shadows[shawdowValue].shadowRadius}px rgba(${shadowColor},${Shadows[shawdowValue].shadowOpacity})`;\n }\n } else {\n const shadowColor = Color.hex.rgb(props.shadow.shadowColor).join(',');\n\n styleProps[\n 'boxShadow'\n ] = `${props.shadow.shadowOffset.height}px ${props.shadow.shadowOffset.width}px ${props.shadow.shadowRadius}px rgba(${shadowColor},${props.shadow.shadowOpacity})`;\n }\n delete props['shadow'];\n }\n\n if (props.only) {\n const { only, ...newProps } = props;\n // eslint-disable-next-line prefer-const\n let onlyProps: any = {\n media: {},\n };\n\n only.map((o: string) => {\n if (onlyProps.media[o] == undefined) {\n onlyProps.media[o] = {};\n }\n });\n\n const styleKeys = Object.keys(newProps).filter((key) => isStyleProp(key));\n styleKeys.map((key: string) => {\n only.map((o: string) => {\n props.media[o][key] = newProps[key];\n });\n delete props[key];\n });\n }\n\n Object.keys(props).map((property) => {\n if (property !== 'shadow' && property !== 'size') {\n if (isStyleProp(property) || property == 'on' || property == 'media') {\n if (typeof props[property] === 'object') {\n if (property === 'on') {\n for (const event in props[property]) {\n styleProps['&:' + event] = applyStyle(props[property][event]);\n }\n } else if (property === 'media') {\n for (const screenOrDevices in props[property]) {\n // console.log(screenOrDevices, mediaQueries[screenOrDevices]);\n if (\n mediaQueries[screenOrDevices] !== undefined &&\n props[property][screenOrDevices] !== undefined\n ) {\n styleProps['@media ' + mediaQueries[screenOrDevices]] =\n applyStyle(props[property][screenOrDevices]);\n } else if (devices[screenOrDevices] !== undefined) {\n // console.log(screen, devices[screenOrDevices], 'screen');\n for (const deviceScreen in devices[screenOrDevices]) {\n if (\n mediaQueries[devices[screenOrDevices][deviceScreen]] !==\n undefined &&\n props[property][screenOrDevices] !== undefined\n ) {\n // console.log(\n // screenOrDevices,\n // props[property][screenOrDevices]\n // );\n styleProps[\n '@media ' +\n mediaQueries[devices[screenOrDevices][deviceScreen]]\n ] = applyStyle(props[property][screenOrDevices]);\n }\n }\n }\n }\n } else {\n styleProps[property] = applyStyle(props[property]);\n }\n } else if (\n typeof props[property] === 'number' &&\n NumberPropsStyle[property] === undefined\n ) {\n styleProps[property] = props[property] + 'px';\n } else if (property.toLowerCase().indexOf('color') !== -1) {\n styleProps[property] = getColor(props[property]);\n } else {\n styleProps[property] = props[property];\n }\n } else {\n styleProps['native'][property] = props[property];\n }\n }\n });\n\n return styleProps;\n};\n\n// function convertToCSS(props: any) {\n// return Object.entries(props).reduce((str, [key, val]) => {\n// const casedKey = key.replace(\n// /[A-Z]/g,\n// (match) => `-${match.toLowerCase()}`\n// );\n// return `${str}${casedKey}:${typeof val === 'number' ? val + 'px' : val};\\n`;\n// }, '');\n// }\n\n// export const getResponsiveMediaQueries = (props: any) => {\n// const { breakpoints, devices } = useResponsiveContext();\n// console.log('mediaQueries', props);\n\n// const mediaQueries = breakpointKeys\n// .map((size) => {\n// return props && props[size] !== undefined\n// ? `\n// @media ${\n// breakpoints[size].min\n// ? ' (min-width:' +\n// (breakpoints[size].min > 0 ? breakpoints[size].min : 0) +\n// 'px)'\n// : ''\n// } ${\n// breakpoints[size].min &&\n// breakpoints[size].max &&\n// breakpoints[size].max >= 0 &&\n// breakpoints[size].max < Infinity\n// ? ' and '\n// : ''\n// } ${\n// breakpoints[size].max &&\n// breakpoints[size].max >= 0 &&\n// breakpoints[size].max < Infinity\n// ? ' (max-width:' + breakpoints[size].max + 'px)'\n// : ''\n// } {\n// ${convertToCSS(props[size])}\n// }`\n// : '';\n// })\n// .join('\\n');\n\n// return mediaQueries;\n// };\n\nconst getElementComponent = (cssData: any) => styled.div`\n ${cssData}\n`;\n\nexport const Element = (props: any) => {\n // Utilisez useMemo pour mémoriser le résultat de `applyStyle`\n const { native = {}, ...cssData } = useMemo(() => applyStyle(props), [props]);\n\n // Mémoriser le composant stylisé pour éviter de le recréer inutilement\n const ElementComponent = useMemo(\n () => getElementComponent(cssData),\n [cssData]\n );\n\n // Gérer le clic en un seul endroit pour éviter la duplication et l'incohérence\n const handleClick =\n props.onPress !== undefined ? props.onPress : props.onClick;\n\n return <ElementComponent {...native} onClick={handleClick} />;\n};\n","import React from 'react';\nimport { Element, ElementProps } from './Element';\nimport { ViewStyleProps } from '../types/style';\nimport { CSSProperties } from 'styled-components';\n\nexport interface ViewProps\n extends Omit<\n ViewStyleProps,\n 'children' | 'translate' | 'style' | 'pointerEvents'\n >,\n Omit<CSSProperties, 'translate'>,\n ElementProps {\n onPress?: (..._args: any) => void;\n}\n\nexport const View = (props: ViewProps) => <Element {...props} />;\n\nexport const Div = View;\n\nexport const SafeArea = View;\n\nexport const Scroll = (props: any) => <View overflow={'auto'} {...props} />;\n\nexport const Span = (props: ViewProps) => <Element {...props} as=\"span\" />;\n","/**\n * whether in browser env\n */\nexport const isBrowser = (): boolean =>\n typeof window !== 'undefined' &&\n typeof window.document !== 'undefined' &&\n typeof window.document.createElement !== 'undefined';\n\n/**\n * get window.g_initialProps\n */\nexport const getWindowInitialProps = () =>\n isBrowser() ? (window as any).g_initialProps : undefined;\n\n/**\n * whether SSR success in client\n */\nexport const isSSR = !isBrowser();\n\nexport function isDev() {\n let dev = false;\n\n if (isBrowser()) {\n dev = !(window.location.hostname.indexOf('localhost') === -1);\n }\n return dev;\n}\n\nexport function isProd() {\n if (isBrowser()) {\n if (window && window.location && window.location.hostname) {\n return (\n window.location.hostname.includes('localhost') ||\n window.location.hostname.includes('develop')\n );\n }\n }\n return false;\n}\n\nexport function isMobile() {\n return navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i);\n}\n","import { useEffect } from 'react';\nexport const useMount = (callback: () => void) => {\n useEffect(() => {\n callback();\n }, []);\n};\n","import { useState } from 'react';\nimport {\n useResponsiveContext,\n ScreenOrientation,\n} from '../providers/Responsive';\n\nimport { useMount } from './useMount';\n\nexport const createQuery = (keyScreen: string, query: string, set: any) => {\n const mql = window.matchMedia(query);\n const onChange = () => {\n if (!!mql.matches) {\n set(keyScreen);\n }\n };\n\n mql.addListener(onChange);\n if (!!mql.matches) {\n set(keyScreen);\n }\n\n return () => {\n mql.removeListener(onChange);\n };\n};\n\nexport const useResponsive = () => {\n const { breakpoints, devices, mediaQueries } = useResponsiveContext();\n const [screen, setScreen] = useState('xs');\n const [orientation, setOrientation] = useState(\n 'landscape' as ScreenOrientation\n );\n\n useMount(() => {\n for (const screenSize in mediaQueries) {\n createQuery(screenSize, mediaQueries[screenSize], setScreen);\n }\n createQuery(\n 'landscape',\n 'only screen and (orientation: landscape)',\n setOrientation\n );\n createQuery(\n 'portrait',\n 'only screen and (orientation: portrait)',\n setOrientation\n );\n });\n\n const on = (device: keyof typeof devices) => {\n return devices[device].includes(screen);\n };\n\n const is = (s: keyof typeof breakpoints) => {\n return s == screen;\n };\n\n return {\n breakpoints,\n devices,\n orientation,\n screen,\n on,\n is,\n };\n};\n","import React from 'react';\nimport { Element, ElementProps } from './Element';\nimport { ViewStyleProps } from '../types/style';\nimport { CSSProperties } from 'styled-components';\nimport { Shadow } from '../utils/shadow';\n\nexport interface FormProps\n extends Omit<ViewStyleProps, 'children' | 'style' | 'pointerEvents'>,\n Omit<\n Partial<HTMLFormElement>,\n | 'width'\n | 'height'\n | 'children'\n | 'translate'\n | 'target'\n | 'border'\n | 'draggable'\n >,\n CSSProperties,\n ElementProps {}\n\nexport interface ButtonProps\n extends Omit<ViewStyleProps, 'children' | 'style' | 'pointerEvents'>,\n Omit<\n Partial<HTMLButtonElement>,\n | 'width'\n | 'height'\n | 'children'\n | 'translate'\n | 'type'\n | 'border'\n | 'draggable'\n >,\n CSSProperties {\n children?: any;\n size?: number;\n on?: Record<string, CSSProperties>;\n paddingHorizontal?: number | string;\n marginHorizontal?: number | string;\n paddingVertical?: number | string;\n marginVertical?: number | string;\n shadow?: boolean | number | Shadow;\n onClick?: any;\n media?: Record<string, CSSProperties>;\n}\n\nexport interface InputProps\n extends ElementProps,\n Omit<ViewStyleProps, 'style' | 'pointerEvents' | 'onPress' | 'dir'>,\n Omit<Partial<HTMLInputElement>, 'width' | 'height' | 'children'>,\n Omit<CSSProperties, 'style' | 'dir' | 'translate'> {}\n\nexport const Form = (props: FormProps) => <Element {...props} as=\"form\" />;\n\nexport const Input = (props: InputProps) => <Element {...props} as=\"input\" />;\n\nexport const Button = (props: ButtonProps) => (\n <Element {...props} as=\"button\" />\n);\n","import React from 'react';\nimport { CSSProperties } from 'styled-components';\nimport { Element, ElementProps } from './Element';\nimport { ImageStyleProps } from '../types/style';\n\nexport interface ImageProps\n extends Omit<ImageStyleProps, 'children' | 'style' | 'pointerEvents'>,\n Omit<\n Partial<HTMLImageElement>,\n | 'width'\n | 'height'\n | 'children'\n | 'translate'\n | 'target'\n | 'border'\n | 'draggable'\n >,\n CSSProperties,\n ElementProps {}\n\nexport const Image = (props: ImageProps) => <Element {...props} as=\"img\" />;\n","import React from 'react';\nimport { CSSProperties } from 'styled-components';\nimport { Element, ElementProps } from './Element';\nimport { TextStyleProps } from '../types/style';\n\nexport interface TextProps\n extends Omit<TextStyleProps, 'children' | 'style' | 'pointerEvents'>,\n CSSProperties,\n ElementProps {\n toUpperCase?: boolean;\n}\n\nexport const Text = (props: TextProps) => {\n return <Element {...props} />;\n};\n","export const Typography = {\n letterSpacings: {\n tighter: -0.08,\n tight: -0.4,\n normal: 0,\n wide: 0.4,\n wider: 0.8,\n widest: 1.6,\n },\n lineHeights: {\n xs: 12,\n sm: 14,\n md: 16,\n lg: 18,\n xl: 20,\n '2xl': 24,\n '3xl': 30,\n '4xl': 36,\n '5xl': 48,\n '6xl': 64,\n },\n fontWeights: {\n hairline: 100,\n thin: 200,\n light: 300,\n normal: 400,\n medium: 500,\n semiBold: 600,\n bold: 700,\n extraBold: 800,\n black: 900,\n },\n fontSizes: {\n xs: 12,\n sm: 14,\n md: 16,\n lg: 18,\n xl: 20,\n '2xl': 24,\n '3xl': 30,\n '4xl': 36,\n '5xl': 48,\n '6xl': 64,\n },\n};\n"],"names":["palette","white","50","100","200","300","400","500","600","700","800","900","black","rose","pink","fuchsia","purple","violet","indigo","blue","lightBlue","cyan","teal","emerald","green","lime","yellow","amber","orange","red","warmGray","trueGray","gray","dark","coolGray","blueGray","defaultThemeMain","primary","secondary","success","error","warning","disabled","loading","defaultColors","magenta","grey","brown","navy","olive","maroon","gold","silver","beige","turquoise","coral","chocolate","skyBlue","plum","darkGreen","salmon","ThemeContext","createContext","getColor","name","colors","main","defaultPalette","theme","components","useTheme","useContext","Shadows","0","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","1","2","3","4","5","6","7","8","9","unitlessStyleProps","Object","keys","unitlessKeys","validStyleProps","prefixes","forEach","prop","prefix","push","key","charAt","toUpperCase","substring","prefixKey","includes","StyleProps","map","property","isStyleProp","undefined","defaultBreakpointsConfig","xs","sm","md","lg","xl","defaultDeviceConfig","mobile","tablet","desktop","getMediaQueries","b","breakpointValue","breakpoint","min","max","sort","a","reduce","query","sizeScreen","ResponsiveContext","breakpoints","devices","mediaQueries","useResponsiveContext","NumberPropsStyle","setSize","newSize","styleProps","applyStyle","oldProps","props","native","onClick","cursor","size","paddingHorizontal","paddingLeft","paddingRight","marginHorizontal","marginLeft","marginRight","paddingVertical","paddingTop","paddingBottom","marginVertical","marginTop","marginBottom","shadow","shawdowValue","Color","hex","rgb","join","only","newProps","o","filter","media","event","screenOrDevices","deviceScreen","toLowerCase","indexOf","Element","cssData","useMemo","ElementComponent","styled","div","getElementComponent","React","onPress","View","Div","SafeArea","isBrowser","window","document","createElement","isSSR","useMount","callback","useEffect","createQuery","keyScreen","set","mql","matchMedia","onChange","matches","addListener","removeListener","as","_ref","children","Provider","value","overflow","startsWith","split","console","log","parseInt","e","letterSpacings","tighter","tight","normal","wide","wider","widest","lineHeights","2xl","3xl","4xl","5xl","6xl","fontWeights","hairline","thin","light","medium","semiBold","bold","extraBold","fontSizes","getWindowInitialProps","g_initialProps","dev","location","hostname","navigator","userAgent","match","useResponsive","screen","setScreen","useState","orientation","setOrientation","screenSize","on","device","is","s"],"mappings":"gRAkBaA,EAAwB,CACnCC,MAAO,CACLC,GAAI,4BACJC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,4BACLC,IAAK,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,EAAkB,CAC7B,eACA,aACA,YACA,oBACA,MACA,YACA,iBACA,qBACA,oBACA,oBACA,0BACA,gBACA,qBACA,0BACA,aACA,iBACA,qBACA,aACA,uBACA,sBACA,iBACA,kBACA,kBACA,mBACA,qBACA,sBACA,sBACA,mBACA,oBACA,oBACA,iBACA,gBACA,YACA,SACA,iBACA,sBACA,sBACA,sBACA,mBACA,wBACA,wBACA,wBACA,eACA,oBACA,yBACA,0BACA,oBACA,oBACA,iBACA,cACA,cACA,oBACA,oBACA,mBACA,oBACA,mBACA,kBACA,uBACA,uBACA,uBACA,oBACA,yBACA,yBACA,yBACA,aACA,kBACA,kBACA,kBACA,eACA,cACA,mBACA,mBACA,mBACA,gBACA,cACA,YACA,iBACA,sBACA,uBACA,iBACA,iBACA,cACA,SACA,YACA,YACA,aACA,cACA,cACA,oBACA,cACA,aACA,QACA,OACA,WACA,WACA,QACA,qBACA,4BACA,iBACA,cACA,aACA,YACA,aACA,kBACA,kBACA,kBACA,aACA,cACA,UACA,UACA,UACA,mBACA,eACA,SACA,KACA,KACA,IACA,YACA,UACA,mBACA,aACA,OACA,cACA,WACA,SACA,OACA,YACA,gBACA,WACA,WACA,aACA,WACA,QACA,aACA,eACA,OACA,cACA,aACA,sBACA,cACA,WACA,cACA,YACA,cACA,kBACA,uBACA,uBACA,qBACA,wBACA,aACA,MACA,OACA,WACA,kBACA,eACA,eACA,aACA,gBACA,gBACA,kBACA,UACA,UACA,aACA,aACA,eACA,eACA,oBACA,sBACA,mBACA,SACA,UACA,iBACA,aACA,YACA,iBACA,eACA,cACA,OACA,gBACA,gBACA,YACA,aACA,YACA,iBACA,oBACA,gBACA,SACA,iBACA,mBACA,eACA,kBACA,oBACA,aACA,cACA,YACA,SACA,YACA,YACA,cACA,OACA,WACA,eACA,YACA,gBACA,WACA,UACA,eACA,YACA,gBACA,WACA,UACA,eACA,YACA,iBACA,SACA,iBACA,aACA,eACA,UACA,QACA,cACA,UACA,UACA,eACA,gBACA,eACA,eACA,WACA,iBACA,eACA,YACA,YACA,qBACA,0BACA,2BACA,sBACA,sBACA,UACA,kBACA,oBACA,gBACA,mBACA,qBACA,cACA,eACA,aACA,OACA,iBACA,kBACA,kBACA,aACA,cACA,oBACA,eACA,aACA,YACA,gBACA,WACA,SACA,IACA,SACA,QACA,SACA,KACA,KACA,iBACA,eACA,oBACA,uBACA,yBACA,qBACA,qBACA,wBACA,0BACA,mBACA,oBACA,kBACA,gBACA,qBACA,wBACA,0BACA,sBACA,sBACA,yBACA,2BACA,oBACA,qBACA,mBACA,kBACA,iBACA,iBACA,sBACA,cACA,eACA,iBACA,OACA,QACA,MACA,YACA,cACA,SACA,kBACA,mBACA,gBACA,iBACA,mBACA,gBACA,cACA,UACA,cACA,YACA,gBACA,aACA,qBACA,iBACA,sBACA,qBACA,wBACA,sBACA,aACA,kBACA,eACA,gBACA,aACA,iBACA,gBACA,wBACA,MACA,cACA,YACA,eACA,kBACA,iBACA,aACA,kBACA,qBACA,qBACA,2BACA,cACA,eACA,aACA,WACA,eACA,gBACA,aACA,aACA,SACA,QACA,aACA,YACA,cACA,WACA,cACA,IACA,IACA,SACA,OACA,yBACA,uBACA,mCACA,UACA,cACA,0BACA,gBACA,qBACA,eACA,iCACA,gBACA,mBACA,yBACA,0BACA,gCACA,eACA,mBACA,aACA,iBACA,sBACA,sBACA,4BACA,iCACA,mBACA,mBACA,sBACA,sBACA,wBACA,sBACA,WACA,oBACA,kBACA,gBACA,iBACA,gBACA,sBACA,sBACA,iBACA,wBACA,sBACA,gBACA,sBACA,wBACA,gBACA,0BACA,eACA,oCACA,iCACA,+BACA,kBACA,YACA,iBACA,gBACA,cACA,sBACA,YACA,mBACA,qBACA,oBACA,wBACA,yBACA,0BACA,0BACA,oBACA,cACA,iBACA,kBACA,kBACA,eACA,kBACA,mBACA,mBACA,cACA,iBACA,qBACA,sBACA,uBACA,uBACA,iBACA,cACA,SACA,UACA,YACA,cACA,eACA,gBACA,eACA,eACA,aACA,YACA,cACA,oBACA,iBACA,kBACA,mBACA,mBACA,iBACA,cACA,SACA,YACA,UACA,MACA,OACA,YACA,gBACA,WACA,aACA,WACA,SACA,iBACA,OACA,SACA,eACA,YACA,mBACA,aACA,cACA,cACA,YACA,iBACA,YACA,WACA,YACA,WACA,WACA,YACA,YACA,UACA,gBACA,aACA,oBACA,cACA,eACA,eACA,aACA,kBACA,WACA,QACA,QACA,MACA,QACA,SACA,uBACA,qBACA,yBACA,0BACA,cACA,eACA,sBACA,kBACA,cACA,UACA,WACA,YACA,YACA,aACA,YACA,eACA,YACA,kBACA,WACA,SACA,SACA,aACA,aACA,cACA,SACA,UACA,UACA,UACA,QACA,QACA,QACA,SACA,oBAiBIC,EAAW,CAAC,SAAU,KAAM,OAKlCL,EAAmBM,QAASC,IAC1BF,EAASC,QAASE,IAChBR,EAAmBS,KAfvB,SAAmBD,EAAgBE,GACjC,OAAOF,EAASE,EAAIC,OAAO,GAAGC,cAAgBF,EAAIG,UAAU,GAclCC,CAAUN,EAAQD,QAO9CP,EAAmBM,QAASC,IACtBH,EAAgBW,SAASR,IAC3BH,EAAgBK,KAAKF,KAIlB,MAAMS,EAAkB,GAC/BZ,EAAgBa,IAAKC,IACnBF,EAAWE,IAAY,IAGlB,MAAMC,EAAeD,QACME,IAAzBJ,EAAWE,GC3jBdG,EAA6C,CACjDC,GAAI,EACJC,GAAI,IACJC,GAAI,IACJC,GAAI,KACJC,GAAI,MAKAC,EAAoC,CACxCC,OAAQ,CAAC,KAAM,MACfC,OAAQ,CAAC,KAAM,MACfC,QAAS,CAAC,KAAM,OAWZC,EAAmBC,IACvB,MAEMC,EAFchC,OAAOC,KAAK8B,GAG7Bf,IAAKiB,IAC2B,CAC7BA,WAAYA,EACZC,IAAKH,EAAEE,GACPE,IAAK,KAKRC,KAAK,CAACC,EAAGN,IAAMM,EAAEH,IAAMH,EAAEG,KAE5BF,EAAgBM,OAAO,CAACD,EAAGN,KACrBA,IAAGM,EAAEF,IAAMJ,EAAEG,KAEVH,IAGT,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N/B0BU,IACnCnD,IAAeC,OAAemD,oBAAiBlI,oCAOjD,WACE,IAAImI,GAAM,EAKV,OAHIrD,MACFqD,KAA2D,IAAnDpD,OAAOqD,SAASC,SAASpE,QAAQ,eAEpCkE,oBAeT,WACE,OAAOG,UAAUC,UAAUC,MAAM,mDAbnC,WACE,SAAI1D,KACEC,QAAUA,OAAOqD,UAAYrD,OAAOqD,SAASC,YAE7CtD,OAAOqD,SAASC,SAAS1I,SAAS,cAClCoF,OAAOqD,SAASC,SAAS1I,SAAS,0GEPb8I,KAC3B,MAAMlH,YAAEA,EAAWC,QAAEA,EAAOC,aAAEA,GAAiBC,KACxCgH,EAAQC,GAAaC,WAAS,OAC9BC,EAAaC,GAAkBF,WACpC,aA2BF,OAxBAzD,EAAS,KACP,IAAK,MAAM4D,KAActH,EACvB6D,EAAYyD,EAAYtH,EAAasH,GAAaJ,GAEpDrD,EACE,YACA,2CACAwD,GAEFxD,EACE,WACA,0CACAwD,KAYG,CACLvH,YAAAA,EACAC,QAAAA,EACAqH,YAAAA,EACAH,OAAAA,EACAM,GAbUC,GACHzH,EAAQyH,GAAQtJ,SAAS+I,GAahCQ,GAVUC,GACHA,GAAKT"}
|
package/dist/app-studio.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext, useContext, useEffect, useState } from 'react';
|
|
1
|
+
import React, { createContext, useContext, useMemo, useEffect, useState } from 'react';
|
|
2
2
|
import Color from 'color-convert';
|
|
3
3
|
import styled from 'styled-components';
|
|
4
4
|
import unitlessKeys from '@emotion/unitless';
|
|
@@ -562,6 +562,60 @@ const isStyleProp = property => {
|
|
|
562
562
|
return StyleProps[property] !== undefined;
|
|
563
563
|
};
|
|
564
564
|
|
|
565
|
+
const defaultBreakpointsConfig = {
|
|
566
|
+
xs: 0,
|
|
567
|
+
sm: 340,
|
|
568
|
+
md: 560,
|
|
569
|
+
lg: 1080,
|
|
570
|
+
xl: 1300
|
|
571
|
+
};
|
|
572
|
+
const defaultDeviceConfig = {
|
|
573
|
+
mobile: ['xs', 'sm'],
|
|
574
|
+
tablet: ['md', 'lg'],
|
|
575
|
+
desktop: ['lg', 'xl']
|
|
576
|
+
};
|
|
577
|
+
const getMediaQueries = b => {
|
|
578
|
+
const defaultKeys = Object.keys(b);
|
|
579
|
+
const breakpointValue = defaultKeys.map(breakpoint => {
|
|
580
|
+
const value = {
|
|
581
|
+
breakpoint: breakpoint,
|
|
582
|
+
min: b[breakpoint],
|
|
583
|
+
max: 0
|
|
584
|
+
};
|
|
585
|
+
return value;
|
|
586
|
+
}).sort((a, b) => a.min - b.min);
|
|
587
|
+
breakpointValue.reduce((a, b) => {
|
|
588
|
+
if (b) a.max = b.min;
|
|
589
|
+
return b;
|
|
590
|
+
});
|
|
591
|
+
const query = {};
|
|
592
|
+
breakpointValue.map(sizeScreen => {
|
|
593
|
+
query[sizeScreen.breakpoint] = `only screen ${sizeScreen.min && sizeScreen.min >= 0 ? 'and (min-width:' + sizeScreen.min + 'px)' : ''} ${sizeScreen.max && sizeScreen.max >= 0 ? 'and (max-width:' + sizeScreen.max + 'px)' : ''}`;
|
|
594
|
+
});
|
|
595
|
+
return query;
|
|
596
|
+
};
|
|
597
|
+
const defaultScreenConfig = {
|
|
598
|
+
breakpoints: defaultBreakpointsConfig,
|
|
599
|
+
devices: defaultDeviceConfig,
|
|
600
|
+
mediaQueries: /*#__PURE__*/getMediaQueries(defaultBreakpointsConfig)
|
|
601
|
+
};
|
|
602
|
+
const ResponsiveContext = /*#__PURE__*/createContext(defaultScreenConfig);
|
|
603
|
+
const useResponsiveContext = () => useContext(ResponsiveContext);
|
|
604
|
+
const ResponsiveProvider = _ref => {
|
|
605
|
+
let {
|
|
606
|
+
breakpoints = defaultBreakpointsConfig,
|
|
607
|
+
devices = defaultDeviceConfig,
|
|
608
|
+
children
|
|
609
|
+
} = _ref;
|
|
610
|
+
return /*#__PURE__*/React.createElement(ResponsiveContext.Provider, {
|
|
611
|
+
value: {
|
|
612
|
+
breakpoints,
|
|
613
|
+
devices,
|
|
614
|
+
mediaQueries: getMediaQueries(breakpoints)
|
|
615
|
+
}
|
|
616
|
+
}, children);
|
|
617
|
+
};
|
|
618
|
+
|
|
565
619
|
const NumberPropsStyle = {};
|
|
566
620
|
const NumberProps = ['numberOfLines', 'fontWeight', 'timeStamp', 'flex', 'flexGrow', 'flexShrink', 'order', 'zIndex', 'aspectRatio', 'shadowOpacity', 'shadowRadius', 'scale', 'opacity', 'min', 'max', 'now'];
|
|
567
621
|
NumberProps.map(property => {
|
|
@@ -570,8 +624,12 @@ NumberProps.map(property => {
|
|
|
570
624
|
const setSize = (newSize, styleProps) => {
|
|
571
625
|
styleProps.height = styleProps.width = newSize;
|
|
572
626
|
};
|
|
573
|
-
const applyStyle =
|
|
627
|
+
const applyStyle = oldProps => {
|
|
574
628
|
//console.log({ applyStyle: props });
|
|
629
|
+
// eslint-disable-next-line prefer-const
|
|
630
|
+
let {
|
|
631
|
+
...props
|
|
632
|
+
} = oldProps;
|
|
575
633
|
const {
|
|
576
634
|
getColor
|
|
577
635
|
} = useTheme();
|
|
@@ -579,7 +637,10 @@ const applyStyle = props => {
|
|
|
579
637
|
mediaQueries,
|
|
580
638
|
devices
|
|
581
639
|
} = useResponsiveContext();
|
|
582
|
-
|
|
640
|
+
// eslint-disable-next-line prefer-const
|
|
641
|
+
let styleProps = {
|
|
642
|
+
native: {}
|
|
643
|
+
};
|
|
583
644
|
//const otherProps: any = {};
|
|
584
645
|
if (props.onClick && styleProps.cursor == undefined) {
|
|
585
646
|
styleProps.cursor = 'pointer';
|
|
@@ -615,6 +676,7 @@ const applyStyle = props => {
|
|
|
615
676
|
const shadowColor = Color.hex.rgb(props.shadow.shadowColor).join(',');
|
|
616
677
|
styleProps['boxShadow'] = `${props.shadow.shadowOffset.height}px ${props.shadow.shadowOffset.width}px ${props.shadow.shadowRadius}px rgba(${shadowColor},${props.shadow.shadowOpacity})`;
|
|
617
678
|
}
|
|
679
|
+
delete props['shadow'];
|
|
618
680
|
}
|
|
619
681
|
if (props.only) {
|
|
620
682
|
const {
|
|
@@ -632,39 +694,43 @@ const applyStyle = props => {
|
|
|
632
694
|
});
|
|
633
695
|
}
|
|
634
696
|
Object.keys(props).map(property => {
|
|
635
|
-
if (
|
|
636
|
-
if (
|
|
637
|
-
if (property === '
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
697
|
+
if (property !== 'shadow' && property !== 'size') {
|
|
698
|
+
if (isStyleProp(property) || property == 'on' || property == 'media') {
|
|
699
|
+
if (typeof props[property] === 'object') {
|
|
700
|
+
if (property === 'on') {
|
|
701
|
+
for (const event in props[property]) {
|
|
702
|
+
styleProps['&:' + event] = applyStyle(props[property][event]);
|
|
703
|
+
}
|
|
704
|
+
} else if (property === 'media') {
|
|
705
|
+
for (const screenOrDevices in props[property]) {
|
|
706
|
+
// console.log(screenOrDevices, mediaQueries[screenOrDevices]);
|
|
707
|
+
if (mediaQueries[screenOrDevices] !== undefined && props[property][screenOrDevices] !== undefined) {
|
|
708
|
+
styleProps['@media ' + mediaQueries[screenOrDevices]] = applyStyle(props[property][screenOrDevices]);
|
|
709
|
+
} else if (devices[screenOrDevices] !== undefined) {
|
|
710
|
+
// console.log(screen, devices[screenOrDevices], 'screen');
|
|
711
|
+
for (const deviceScreen in devices[screenOrDevices]) {
|
|
712
|
+
if (mediaQueries[devices[screenOrDevices][deviceScreen]] !== undefined && props[property][screenOrDevices] !== undefined) {
|
|
713
|
+
// console.log(
|
|
714
|
+
// screenOrDevices,
|
|
715
|
+
// props[property][screenOrDevices]
|
|
716
|
+
// );
|
|
717
|
+
styleProps['@media ' + mediaQueries[devices[screenOrDevices][deviceScreen]]] = applyStyle(props[property][screenOrDevices]);
|
|
718
|
+
}
|
|
655
719
|
}
|
|
656
720
|
}
|
|
657
721
|
}
|
|
722
|
+
} else {
|
|
723
|
+
styleProps[property] = applyStyle(props[property]);
|
|
658
724
|
}
|
|
725
|
+
} else if (typeof props[property] === 'number' && NumberPropsStyle[property] === undefined) {
|
|
726
|
+
styleProps[property] = props[property] + 'px';
|
|
727
|
+
} else if (property.toLowerCase().indexOf('color') !== -1) {
|
|
728
|
+
styleProps[property] = getColor(props[property]);
|
|
659
729
|
} else {
|
|
660
|
-
styleProps[property] =
|
|
730
|
+
styleProps[property] = props[property];
|
|
661
731
|
}
|
|
662
|
-
} else if (typeof props[property] === 'number' && NumberPropsStyle[property] === undefined) {
|
|
663
|
-
styleProps[property] = props[property] + 'px';
|
|
664
|
-
} else if (property.toLowerCase().indexOf('color') !== -1) {
|
|
665
|
-
styleProps[property] = getColor(props[property]);
|
|
666
732
|
} else {
|
|
667
|
-
styleProps[property] = props[property];
|
|
733
|
+
styleProps['native'][property] = props[property];
|
|
668
734
|
}
|
|
669
735
|
}
|
|
670
736
|
});
|
|
@@ -713,17 +779,23 @@ const applyStyle = props => {
|
|
|
713
779
|
// .join('\n');
|
|
714
780
|
// return mediaQueries;
|
|
715
781
|
// };
|
|
716
|
-
const
|
|
717
|
-
|
|
718
|
-
${dynamicStyle};
|
|
782
|
+
const getElementComponent = cssData => styled.div`
|
|
783
|
+
${cssData}
|
|
719
784
|
`;
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
726
|
-
|
|
785
|
+
const Element = props => {
|
|
786
|
+
// Utilisez useMemo pour mémoriser le résultat de `applyStyle`
|
|
787
|
+
const {
|
|
788
|
+
native = {},
|
|
789
|
+
...cssData
|
|
790
|
+
} = useMemo(() => applyStyle(props), [props]);
|
|
791
|
+
// Mémoriser le composant stylisé pour éviter de le recréer inutilement
|
|
792
|
+
const ElementComponent = useMemo(() => getElementComponent(cssData), [cssData]);
|
|
793
|
+
// Gérer le clic en un seul endroit pour éviter la duplication et l'incohérence
|
|
794
|
+
const handleClick = props.onPress !== undefined ? props.onPress : props.onClick;
|
|
795
|
+
return /*#__PURE__*/React.createElement(ElementComponent, Object.assign({}, native, {
|
|
796
|
+
onClick: handleClick
|
|
797
|
+
}));
|
|
798
|
+
};
|
|
727
799
|
|
|
728
800
|
const View = props => /*#__PURE__*/React.createElement(Element, Object.assign({}, props));
|
|
729
801
|
const Div = View;
|
|
@@ -830,60 +902,6 @@ function isMobile() {
|
|
|
830
902
|
return navigator.userAgent.match(/(iPhone|iPod|Android|ios|iPad)/i);
|
|
831
903
|
}
|
|
832
904
|
|
|
833
|
-
const defaultBreakpointsConfig = {
|
|
834
|
-
xs: 0,
|
|
835
|
-
sm: 340,
|
|
836
|
-
md: 560,
|
|
837
|
-
lg: 1080,
|
|
838
|
-
xl: 1300
|
|
839
|
-
};
|
|
840
|
-
const defaultDeviceConfig = {
|
|
841
|
-
mobile: ['xs', 'sm'],
|
|
842
|
-
tablet: ['md', 'lg'],
|
|
843
|
-
desktop: ['lg', 'xl']
|
|
844
|
-
};
|
|
845
|
-
const getMediaQueries = b => {
|
|
846
|
-
const defaultKeys = Object.keys(b);
|
|
847
|
-
const breakpointValue = defaultKeys.map(breakpoint => {
|
|
848
|
-
const value = {
|
|
849
|
-
breakpoint: breakpoint,
|
|
850
|
-
min: b[breakpoint],
|
|
851
|
-
max: 0
|
|
852
|
-
};
|
|
853
|
-
return value;
|
|
854
|
-
}).sort((a, b) => a.min - b.min);
|
|
855
|
-
breakpointValue.reduce((a, b) => {
|
|
856
|
-
if (b) a.max = b.min;
|
|
857
|
-
return b;
|
|
858
|
-
});
|
|
859
|
-
const query = {};
|
|
860
|
-
breakpointValue.map(sizeScreen => {
|
|
861
|
-
query[sizeScreen.breakpoint] = `only screen ${sizeScreen.min && sizeScreen.min >= 0 ? 'and (min-width:' + sizeScreen.min + 'px)' : ''} ${sizeScreen.max && sizeScreen.max >= 0 ? 'and (max-width:' + sizeScreen.max + 'px)' : ''}`;
|
|
862
|
-
});
|
|
863
|
-
return query;
|
|
864
|
-
};
|
|
865
|
-
const defaultScreenConfig = {
|
|
866
|
-
breakpoints: defaultBreakpointsConfig,
|
|
867
|
-
devices: defaultDeviceConfig,
|
|
868
|
-
mediaQueries: /*#__PURE__*/getMediaQueries(defaultBreakpointsConfig)
|
|
869
|
-
};
|
|
870
|
-
const ResponsiveContext = /*#__PURE__*/createContext(defaultScreenConfig);
|
|
871
|
-
const useResponsiveContext = () => useContext(ResponsiveContext);
|
|
872
|
-
const ResponsiveProvider = _ref => {
|
|
873
|
-
let {
|
|
874
|
-
breakpoints = defaultBreakpointsConfig,
|
|
875
|
-
devices = defaultDeviceConfig,
|
|
876
|
-
children
|
|
877
|
-
} = _ref;
|
|
878
|
-
return /*#__PURE__*/React.createElement(ResponsiveContext.Provider, {
|
|
879
|
-
value: {
|
|
880
|
-
breakpoints,
|
|
881
|
-
devices,
|
|
882
|
-
mediaQueries: getMediaQueries(breakpoints)
|
|
883
|
-
}
|
|
884
|
-
}, children);
|
|
885
|
-
};
|
|
886
|
-
|
|
887
905
|
const useMount = callback => {
|
|
888
906
|
useEffect(() => {
|
|
889
907
|
callback();
|