@lmb-it/kitsconcerto-native 0.1.288 → 0.1.290
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/apps/mobile/src/Core/Dropdown/index.cjs +1 -0
- package/apps/mobile/src/Core/Dropdown/index.cjs.map +1 -1
- package/apps/mobile/src/Core/Dropdown/index.js +1 -0
- package/apps/mobile/src/Core/Dropdown/index.js.map +1 -1
- package/apps/mobile/src/Core/Trees/components/CoreToolbar.cjs +1 -0
- package/apps/mobile/src/Core/Trees/components/CoreToolbar.cjs.map +1 -1
- package/apps/mobile/src/Core/Trees/components/CoreToolbar.js +1 -0
- package/apps/mobile/src/Core/Trees/components/CoreToolbar.js.map +1 -1
- package/apps/mobile/src/Factory/ResponsiveElement.cjs +1 -0
- package/apps/mobile/src/Factory/ResponsiveElement.cjs.map +1 -1
- package/apps/mobile/src/Factory/ResponsiveElement.js +1 -0
- package/apps/mobile/src/Factory/ResponsiveElement.js.map +1 -1
- package/apps/mobile/src/Factory/helpers/cssVarMap.cjs +1 -0
- package/apps/mobile/src/Factory/helpers/cssVarMap.cjs.map +1 -1
- package/apps/mobile/src/Factory/helpers/cssVarMap.js +1 -0
- package/apps/mobile/src/Factory/helpers/cssVarMap.js.map +1 -1
- package/apps/mobile/src/Factory/helpers/style.cjs +1 -0
- package/apps/mobile/src/Factory/helpers/style.cjs.map +1 -1
- package/apps/mobile/src/Factory/helpers/style.js +1 -0
- package/apps/mobile/src/Factory/helpers/style.js.map +1 -1
- package/apps/mobile/src/Factory/useSeparator.cjs +1 -0
- package/apps/mobile/src/Factory/useSeparator.cjs.map +1 -1
- package/apps/mobile/src/Factory/useSeparator.js +1 -0
- package/apps/mobile/src/Factory/useSeparator.js.map +1 -1
- package/components/Accordion/accordion.cjs +1 -0
- package/components/Accordion/accordion.cjs.map +1 -1
- package/components/Accordion/accordion.js +1 -0
- package/components/Accordion/accordion.js.map +1 -1
- package/components/Badge/index.cjs +1 -0
- package/components/Badge/index.cjs.map +1 -1
- package/components/Badge/index.js +1 -0
- package/components/Badge/index.js.map +1 -1
- package/components/BottomTabBar/index.cjs +1 -0
- package/components/BottomTabBar/index.cjs.map +1 -1
- package/components/BottomTabBar/index.js +1 -0
- package/components/BottomTabBar/index.js.map +1 -1
- package/components/Button/Button.cjs +1 -0
- package/components/Button/Button.cjs.map +1 -1
- package/components/Button/Button.js +1 -0
- package/components/Button/Button.js.map +1 -1
- package/components/ImageCropper/index.cjs +584 -550
- package/components/ImageCropper/index.cjs.map +1 -1
- package/components/ImageCropper/index.js +585 -551
- package/components/ImageCropper/index.js.map +1 -1
- package/components/MessageComposer/index.cjs +1 -0
- package/components/MessageComposer/index.cjs.map +1 -1
- package/components/MessageComposer/index.js +1 -0
- package/components/MessageComposer/index.js.map +1 -1
- package/components/SegmentedControl/index.cjs +1 -0
- package/components/SegmentedControl/index.cjs.map +1 -1
- package/components/SegmentedControl/index.js +1 -0
- package/components/SegmentedControl/index.js.map +1 -1
- package/components/SkeletonText/index.cjs +1 -0
- package/components/SkeletonText/index.cjs.map +1 -1
- package/components/SkeletonText/index.js +1 -0
- package/components/SkeletonText/index.js.map +1 -1
- package/components/Tabs/index.cjs +3 -2
- package/components/Tabs/index.cjs.map +1 -1
- package/components/Tabs/index.js +3 -2
- package/components/Tabs/index.js.map +1 -1
- package/contexts/Locale/index.cjs +1 -0
- package/contexts/Locale/index.cjs.map +1 -1
- package/contexts/Locale/index.js +1 -0
- package/contexts/Locale/index.js.map +1 -1
- package/contexts/Main/index.cjs +1 -0
- package/contexts/Main/index.cjs.map +1 -1
- package/contexts/Main/index.js +1 -0
- package/contexts/Main/index.js.map +1 -1
- package/contexts/Theme/index.cjs +1 -0
- package/contexts/Theme/index.cjs.map +1 -1
- package/contexts/Theme/index.js +1 -0
- package/contexts/Theme/index.js.map +1 -1
- package/data/DataView/Pagination/index.cjs +1 -0
- package/data/DataView/Pagination/index.cjs.map +1 -1
- package/data/DataView/Pagination/index.js +1 -0
- package/data/DataView/Pagination/index.js.map +1 -1
- package/data/TreeView/index.cjs +1 -0
- package/data/TreeView/index.cjs.map +1 -1
- package/data/TreeView/index.js +1 -0
- package/data/TreeView/index.js.map +1 -1
- package/form/controls/Checkbox/checkbox.cjs +1 -0
- package/form/controls/Checkbox/checkbox.cjs.map +1 -1
- package/form/controls/Checkbox/checkbox.js +1 -0
- package/form/controls/Checkbox/checkbox.js.map +1 -1
- package/form/controls/RadioButton/radiobutton.cjs +1 -0
- package/form/controls/RadioButton/radiobutton.cjs.map +1 -1
- package/form/controls/RadioButton/radiobutton.js +1 -0
- package/form/controls/RadioButton/radiobutton.js.map +1 -1
- package/form/controls/SelectButton/index.cjs +1 -0
- package/form/controls/SelectButton/index.cjs.map +1 -1
- package/form/controls/SelectButton/index.js +1 -0
- package/form/controls/SelectButton/index.js.map +1 -1
- package/form/controls/TriStateCheckbox/index.cjs +1 -0
- package/form/controls/TriStateCheckbox/index.cjs.map +1 -1
- package/form/controls/TriStateCheckbox/index.js +1 -0
- package/form/controls/TriStateCheckbox/index.js.map +1 -1
- package/form/file-pickers/MainUploader/index.cjs +1 -0
- package/form/file-pickers/MainUploader/index.cjs.map +1 -1
- package/form/file-pickers/MainUploader/index.js +1 -0
- package/form/file-pickers/MainUploader/index.js.map +1 -1
- package/form/helpers/ErrorMessage/errormessage.cjs +1 -0
- package/form/helpers/ErrorMessage/errormessage.cjs.map +1 -1
- package/form/helpers/ErrorMessage/errormessage.js +1 -0
- package/form/helpers/ErrorMessage/errormessage.js.map +1 -1
- package/form/helpers/FormContainer/index.cjs +1 -0
- package/form/helpers/FormContainer/index.cjs.map +1 -1
- package/form/helpers/FormContainer/index.js +1 -0
- package/form/helpers/FormContainer/index.js.map +1 -1
- package/form/helpers/Label/label.cjs +1 -0
- package/form/helpers/Label/label.cjs.map +1 -1
- package/form/helpers/Label/label.js +1 -0
- package/form/helpers/Label/label.js.map +1 -1
- package/form/inputs/InputMask/index.cjs +1 -0
- package/form/inputs/InputMask/index.cjs.map +1 -1
- package/form/inputs/InputMask/index.js +1 -0
- package/form/inputs/InputMask/index.js.map +1 -1
- package/form/inputs/InputNumber/index.cjs +1 -0
- package/form/inputs/InputNumber/index.cjs.map +1 -1
- package/form/inputs/InputNumber/index.js +1 -0
- package/form/inputs/InputNumber/index.js.map +1 -1
- package/form/inputs/InputPassword/index.cjs +1 -0
- package/form/inputs/InputPassword/index.cjs.map +1 -1
- package/form/inputs/InputPassword/index.js +1 -0
- package/form/inputs/InputPassword/index.js.map +1 -1
- package/form/inputs/InputSwitch/index.cjs +1 -0
- package/form/inputs/InputSwitch/index.cjs.map +1 -1
- package/form/inputs/InputSwitch/index.js +1 -0
- package/form/inputs/InputSwitch/index.js.map +1 -1
- package/form/inputs/InputText/index.cjs +1 -0
- package/form/inputs/InputText/index.cjs.map +1 -1
- package/form/inputs/InputText/index.js +1 -0
- package/form/inputs/InputText/index.js.map +1 -1
- package/form/inputs/InputTextarea/index.cjs +1 -0
- package/form/inputs/InputTextarea/index.cjs.map +1 -1
- package/form/inputs/InputTextarea/index.js +1 -0
- package/form/inputs/InputTextarea/index.js.map +1 -1
- package/form/inputs/PhoneInput/index.cjs +1 -0
- package/form/inputs/PhoneInput/index.cjs.map +1 -1
- package/form/inputs/PhoneInput/index.js +1 -0
- package/form/inputs/PhoneInput/index.js.map +1 -1
- package/form/inputs/RadiusPicker/components/NumericRadiusInput.cjs +1 -0
- package/form/inputs/RadiusPicker/components/NumericRadiusInput.cjs.map +1 -1
- package/form/inputs/RadiusPicker/components/NumericRadiusInput.js +1 -0
- package/form/inputs/RadiusPicker/components/NumericRadiusInput.js.map +1 -1
- package/form/selects/AutoComplete/index.cjs +1 -0
- package/form/selects/AutoComplete/index.cjs.map +1 -1
- package/form/selects/AutoComplete/index.js +1 -0
- package/form/selects/AutoComplete/index.js.map +1 -1
- package/form/selects/Dropdown/index.cjs +1 -0
- package/form/selects/Dropdown/index.cjs.map +1 -1
- package/form/selects/Dropdown/index.js +1 -0
- package/form/selects/Dropdown/index.js.map +1 -1
- package/form/selects/ListBox/index.cjs +1 -0
- package/form/selects/ListBox/index.cjs.map +1 -1
- package/form/selects/ListBox/index.js +1 -0
- package/form/selects/ListBox/index.js.map +1 -1
- package/form/selects/MultiSelect/index.cjs +1 -0
- package/form/selects/MultiSelect/index.cjs.map +1 -1
- package/form/selects/MultiSelect/index.js +1 -0
- package/form/selects/MultiSelect/index.js.map +1 -1
- package/form/selects/TreeSelect/index.cjs +1 -0
- package/form/selects/TreeSelect/index.cjs.map +1 -1
- package/form/selects/TreeSelect/index.js +1 -0
- package/form/selects/TreeSelect/index.js.map +1 -1
- package/form/selects/helpers/SelectPopupOverlay.cjs +1 -0
- package/form/selects/helpers/SelectPopupOverlay.cjs.map +1 -1
- package/form/selects/helpers/SelectPopupOverlay.js +1 -0
- package/form/selects/helpers/SelectPopupOverlay.js.map +1 -1
- package/form-renderer/components/layout/FieldWrapper.cjs +1 -0
- package/form-renderer/components/layout/FieldWrapper.cjs.map +1 -1
- package/form-renderer/components/layout/FieldWrapper.js +1 -0
- package/form-renderer/components/layout/FieldWrapper.js.map +1 -1
- package/hooks/shadowPresets.cjs +1 -0
- package/hooks/shadowPresets.cjs.map +1 -1
- package/hooks/shadowPresets.js +1 -0
- package/hooks/shadowPresets.js.map +1 -1
- package/hooks/useFocusStyles.cjs +1 -0
- package/hooks/useFocusStyles.cjs.map +1 -1
- package/hooks/useFocusStyles.js +1 -0
- package/hooks/useFocusStyles.js.map +1 -1
- package/index.cjs +2 -0
- package/index.cjs.map +1 -1
- package/index.d.ts +117 -5
- package/index.js +1 -0
- package/index.js.map +1 -1
- package/layout/Center/index.cjs +1 -0
- package/layout/Center/index.cjs.map +1 -1
- package/layout/Center/index.js +1 -0
- package/layout/Center/index.js.map +1 -1
- package/layout/Container/container.cjs +1 -0
- package/layout/Container/container.cjs.map +1 -1
- package/layout/Container/container.js +1 -0
- package/layout/Container/container.js.map +1 -1
- package/layout/Flex/index.cjs +1 -0
- package/layout/Flex/index.cjs.map +1 -1
- package/layout/Flex/index.js +1 -0
- package/layout/Flex/index.js.map +1 -1
- package/layout/HStack/index.cjs +1 -0
- package/layout/HStack/index.cjs.map +1 -1
- package/layout/HStack/index.js +1 -0
- package/layout/HStack/index.js.map +1 -1
- package/layout/List/index.cjs +1 -0
- package/layout/List/index.cjs.map +1 -1
- package/layout/List/index.js +1 -0
- package/layout/List/index.js.map +1 -1
- package/layout/ListItem/index.cjs +1 -0
- package/layout/ListItem/index.cjs.map +1 -1
- package/layout/ListItem/index.js +1 -0
- package/layout/ListItem/index.js.map +1 -1
- package/layout/ScrollView/index.cjs +1 -0
- package/layout/ScrollView/index.cjs.map +1 -1
- package/layout/ScrollView/index.js +1 -0
- package/layout/ScrollView/index.js.map +1 -1
- package/layout/VStack/index.cjs +1 -0
- package/layout/VStack/index.cjs.map +1 -1
- package/layout/VStack/index.js +1 -0
- package/layout/VStack/index.js.map +1 -1
- package/package.json +1 -1
- package/packages/types/src/Theme/resolvers.cjs +2 -55
- package/packages/types/src/Theme/resolvers.cjs.map +1 -1
- package/packages/types/src/Theme/resolvers.js +2 -55
- package/packages/types/src/Theme/resolvers.js.map +1 -1
- package/packages/types/src/Theme/semanticTokenNames.cjs +64 -0
- package/packages/types/src/Theme/semanticTokenNames.cjs.map +1 -0
- package/packages/types/src/Theme/semanticTokenNames.js +62 -0
- package/packages/types/src/Theme/semanticTokenNames.js.map +1 -0
- package/primitives/Box/index.cjs +1 -0
- package/primitives/Box/index.cjs.map +1 -1
- package/primitives/Box/index.js +1 -0
- package/primitives/Box/index.js.map +1 -1
- package/primitives/Card/index.cjs +1 -0
- package/primitives/Card/index.cjs.map +1 -1
- package/primitives/Card/index.js +1 -0
- package/primitives/Card/index.js.map +1 -1
- package/primitives/Divider/index.cjs +1 -0
- package/primitives/Divider/index.cjs.map +1 -1
- package/primitives/Divider/index.js +1 -0
- package/primitives/Divider/index.js.map +1 -1
- package/primitives/Heading/index.cjs +1 -0
- package/primitives/Heading/index.cjs.map +1 -1
- package/primitives/Heading/index.js +1 -0
- package/primitives/Heading/index.js.map +1 -1
- package/primitives/Image/index.cjs +1 -0
- package/primitives/Image/index.cjs.map +1 -1
- package/primitives/Image/index.js +1 -0
- package/primitives/Image/index.js.map +1 -1
- package/primitives/Skeleton/index.cjs +1 -0
- package/primitives/Skeleton/index.cjs.map +1 -1
- package/primitives/Skeleton/index.js +1 -0
- package/primitives/Skeleton/index.js.map +1 -1
- package/primitives/Svg/index.cjs +1 -0
- package/primitives/Svg/index.cjs.map +1 -1
- package/primitives/Svg/index.js +1 -0
- package/primitives/Svg/index.js.map +1 -1
- package/primitives/Text/index.cjs +1 -0
- package/primitives/Text/index.cjs.map +1 -1
- package/primitives/Text/index.js +1 -0
- package/primitives/Text/index.js.map +1 -1
|
@@ -61,6 +61,7 @@ require('yup');
|
|
|
61
61
|
require('../../packages/types/src/Css/map/index.cjs');
|
|
62
62
|
require('../../packages/types/src/Theme/shadows.cjs');
|
|
63
63
|
require('../../packages/types/src/Theme/defaultTheme.cjs');
|
|
64
|
+
require('../../packages/types/src/Theme/resolvers.cjs');
|
|
64
65
|
require('../../packages/types/src/Theme/alphaColors.cjs');
|
|
65
66
|
require('../../apps/mobile/src/Factory/helpers/cssVarMap.cjs');
|
|
66
67
|
require('../../apps/mobile/src/Factory/DimensionsContext.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Divider/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text, StyleSheet} from 'react-native';\nimport type {IDividerComponent} from '@lmb-it/kitsconcerto-types';\nimport {useSeparator} from \"../../factory\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\nimport {useKitsTheme} from '../../contexts/Theme';\nimport useThemedFont from '../../hooks/useThemedFont';\n\nconst Divider: React.FC<IDividerComponent> = (props) => {\n const {nativeProps} = useSeparator<any>(props);\n /*\n * ⛔ ARABIC CLIPS WITHOUT AN EXPLICIT LINE BOX — a raw react-native <Text>\n * with a fontSize and no lineHeight gets the FONT'S natural box, and\n * NotoKufiArabic's is too short for its own ascenders. In an RTL script\n * that reads as a BAD TRANSLATION rather than as clipping: ش/س, غ/ع and\n * ة/ه differ only by marks above the baseline.\n * ⚠️ undefined in LTR, so no English layout moves.\n */\n const rtlLineHeight = useRtlLineHeight(undefined, 14);\n const {\n align = 'center',\n children,\n layout = 'horizontal',\n type: borderType = 'solid',\n unstyled = false,\n ...rest\n } = nativeProps;\n\n const {resolveToken} = useKitsTheme();\n // `color` overrides the line colour (resolved through the theme — token,\n // hex, or named); falls back to the `divider` token when omitted.\n const dividerColor = typeof props.color === 'string'\n ? resolveToken(props.color)\n : resolveToken('divider');\n const contentFont = useThemedFont('body');\n\n const isHorizontal = layout === 'horizontal';\n\n if (unstyled) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n rest.style,\n ]}\n />\n );\n }\n\n const lineStyle = isHorizontal\n ? [styles.horizontalLine, {borderBottomStyle: borderType, borderBottomColor: dividerColor}]\n : [styles.verticalLine, {borderLeftStyle: borderType, borderLeftColor: dividerColor}];\n\n if (!children) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n isHorizontal\n ? {borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: dividerColor, borderStyle: borderType}\n : {borderLeftWidth: StyleSheet.hairlineWidth, borderLeftColor: dividerColor, borderStyle: borderType},\n rest.style,\n ]}\n />\n );\n }\n\n const alignMap: Record<string, 'flex-start' | 'center' | 'flex-end'> = {\n left: 'flex-start',\n top: 'flex-start',\n center: 'center',\n right: 'flex-end',\n bottom: 'flex-end',\n };\n const justifyContent = alignMap[align] ?? 'center';\n\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontalWithContent : styles.verticalWithContent,\n {justifyContent},\n rest.style,\n ]}>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'left' || align === 'top' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n <Text style={[styles.contentText, {color: resolveToken('text-secondary')}, rtlLineHeight != null ? {lineHeight: rtlLineHeight} : null, contentFont ? {fontFamily: contentFont} : null]}>\n {children}\n </Text>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'right' || align === 'bottom' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n horizontal: {\n width: '100%',\n flexDirection: 'row',\n },\n vertical: {\n height: '100%',\n flexDirection: 'column',\n },\n horizontalWithContent: {\n width: '100%',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n verticalWithContent: {\n height: '100%',\n flexDirection: 'column',\n alignItems: 'center',\n gap: 12,\n },\n horizontalLine: {\n width: '100%',\n },\n verticalLine: {\n height: '100%',\n },\n lineSegment: {\n height: StyleSheet.hairlineWidth,\n flex: 1,\n },\n lineSegmentVertical: {\n width: StyleSheet.hairlineWidth,\n flex: 1,\n },\n contentText: {\n fontSize: 14,\n },\n});\n\nexport default Divider;\n"],"names":["useSeparator","useRtlLineHeight","useKitsTheme","useThemedFont","jsx","View","StyleSheet","jsxs","Text"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Divider/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text, StyleSheet} from 'react-native';\nimport type {IDividerComponent} from '@lmb-it/kitsconcerto-types';\nimport {useSeparator} from \"../../factory\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\nimport {useKitsTheme} from '../../contexts/Theme';\nimport useThemedFont from '../../hooks/useThemedFont';\n\nconst Divider: React.FC<IDividerComponent> = (props) => {\n const {nativeProps} = useSeparator<any>(props);\n /*\n * ⛔ ARABIC CLIPS WITHOUT AN EXPLICIT LINE BOX — a raw react-native <Text>\n * with a fontSize and no lineHeight gets the FONT'S natural box, and\n * NotoKufiArabic's is too short for its own ascenders. In an RTL script\n * that reads as a BAD TRANSLATION rather than as clipping: ش/س, غ/ع and\n * ة/ه differ only by marks above the baseline.\n * ⚠️ undefined in LTR, so no English layout moves.\n */\n const rtlLineHeight = useRtlLineHeight(undefined, 14);\n const {\n align = 'center',\n children,\n layout = 'horizontal',\n type: borderType = 'solid',\n unstyled = false,\n ...rest\n } = nativeProps;\n\n const {resolveToken} = useKitsTheme();\n // `color` overrides the line colour (resolved through the theme — token,\n // hex, or named); falls back to the `divider` token when omitted.\n const dividerColor = typeof props.color === 'string'\n ? resolveToken(props.color)\n : resolveToken('divider');\n const contentFont = useThemedFont('body');\n\n const isHorizontal = layout === 'horizontal';\n\n if (unstyled) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n rest.style,\n ]}\n />\n );\n }\n\n const lineStyle = isHorizontal\n ? [styles.horizontalLine, {borderBottomStyle: borderType, borderBottomColor: dividerColor}]\n : [styles.verticalLine, {borderLeftStyle: borderType, borderLeftColor: dividerColor}];\n\n if (!children) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n isHorizontal\n ? {borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: dividerColor, borderStyle: borderType}\n : {borderLeftWidth: StyleSheet.hairlineWidth, borderLeftColor: dividerColor, borderStyle: borderType},\n rest.style,\n ]}\n />\n );\n }\n\n const alignMap: Record<string, 'flex-start' | 'center' | 'flex-end'> = {\n left: 'flex-start',\n top: 'flex-start',\n center: 'center',\n right: 'flex-end',\n bottom: 'flex-end',\n };\n const justifyContent = alignMap[align] ?? 'center';\n\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontalWithContent : styles.verticalWithContent,\n {justifyContent},\n rest.style,\n ]}>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'left' || align === 'top' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n <Text style={[styles.contentText, {color: resolveToken('text-secondary')}, rtlLineHeight != null ? {lineHeight: rtlLineHeight} : null, contentFont ? {fontFamily: contentFont} : null]}>\n {children}\n </Text>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'right' || align === 'bottom' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n horizontal: {\n width: '100%',\n flexDirection: 'row',\n },\n vertical: {\n height: '100%',\n flexDirection: 'column',\n },\n horizontalWithContent: {\n width: '100%',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n verticalWithContent: {\n height: '100%',\n flexDirection: 'column',\n alignItems: 'center',\n gap: 12,\n },\n horizontalLine: {\n width: '100%',\n },\n verticalLine: {\n height: '100%',\n },\n lineSegment: {\n height: StyleSheet.hairlineWidth,\n flex: 1,\n },\n lineSegmentVertical: {\n width: StyleSheet.hairlineWidth,\n flex: 1,\n },\n contentText: {\n fontSize: 14,\n },\n});\n\nexport default Divider;\n"],"names":["useSeparator","useRtlLineHeight","useKitsTheme","useThemedFont","jsx","View","StyleSheet","jsxs","Text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,OAAA,GAAuC,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAC,WAAA,EAAW,GAAIA,oBAAA,CAAkB,KAAK,CAAA;AAS7C,EAAA,MAAM,aAAA,GAAgBC,wBAAA,CAAiB,MAAA,EAAW,EAAE,CAAA;AACpD,EAAA,MAAM;AAAA,IACF,K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,aAAA;AAAA,IAClB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,WAAA,EAAa;AAAA,IACT,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
|
|
@@ -57,6 +57,7 @@ import 'yup';
|
|
|
57
57
|
import '../../packages/types/src/Css/map/index.js';
|
|
58
58
|
import '../../packages/types/src/Theme/shadows.js';
|
|
59
59
|
import '../../packages/types/src/Theme/defaultTheme.js';
|
|
60
|
+
import '../../packages/types/src/Theme/resolvers.js';
|
|
60
61
|
import '../../packages/types/src/Theme/alphaColors.js';
|
|
61
62
|
import '../../apps/mobile/src/Factory/helpers/cssVarMap.js';
|
|
62
63
|
import '../../apps/mobile/src/Factory/DimensionsContext.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Divider/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text, StyleSheet} from 'react-native';\nimport type {IDividerComponent} from '@lmb-it/kitsconcerto-types';\nimport {useSeparator} from \"../../factory\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\nimport {useKitsTheme} from '../../contexts/Theme';\nimport useThemedFont from '../../hooks/useThemedFont';\n\nconst Divider: React.FC<IDividerComponent> = (props) => {\n const {nativeProps} = useSeparator<any>(props);\n /*\n * ⛔ ARABIC CLIPS WITHOUT AN EXPLICIT LINE BOX — a raw react-native <Text>\n * with a fontSize and no lineHeight gets the FONT'S natural box, and\n * NotoKufiArabic's is too short for its own ascenders. In an RTL script\n * that reads as a BAD TRANSLATION rather than as clipping: ش/س, غ/ع and\n * ة/ه differ only by marks above the baseline.\n * ⚠️ undefined in LTR, so no English layout moves.\n */\n const rtlLineHeight = useRtlLineHeight(undefined, 14);\n const {\n align = 'center',\n children,\n layout = 'horizontal',\n type: borderType = 'solid',\n unstyled = false,\n ...rest\n } = nativeProps;\n\n const {resolveToken} = useKitsTheme();\n // `color` overrides the line colour (resolved through the theme — token,\n // hex, or named); falls back to the `divider` token when omitted.\n const dividerColor = typeof props.color === 'string'\n ? resolveToken(props.color)\n : resolveToken('divider');\n const contentFont = useThemedFont('body');\n\n const isHorizontal = layout === 'horizontal';\n\n if (unstyled) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n rest.style,\n ]}\n />\n );\n }\n\n const lineStyle = isHorizontal\n ? [styles.horizontalLine, {borderBottomStyle: borderType, borderBottomColor: dividerColor}]\n : [styles.verticalLine, {borderLeftStyle: borderType, borderLeftColor: dividerColor}];\n\n if (!children) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n isHorizontal\n ? {borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: dividerColor, borderStyle: borderType}\n : {borderLeftWidth: StyleSheet.hairlineWidth, borderLeftColor: dividerColor, borderStyle: borderType},\n rest.style,\n ]}\n />\n );\n }\n\n const alignMap: Record<string, 'flex-start' | 'center' | 'flex-end'> = {\n left: 'flex-start',\n top: 'flex-start',\n center: 'center',\n right: 'flex-end',\n bottom: 'flex-end',\n };\n const justifyContent = alignMap[align] ?? 'center';\n\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontalWithContent : styles.verticalWithContent,\n {justifyContent},\n rest.style,\n ]}>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'left' || align === 'top' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n <Text style={[styles.contentText, {color: resolveToken('text-secondary')}, rtlLineHeight != null ? {lineHeight: rtlLineHeight} : null, contentFont ? {fontFamily: contentFont} : null]}>\n {children}\n </Text>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'right' || align === 'bottom' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n horizontal: {\n width: '100%',\n flexDirection: 'row',\n },\n vertical: {\n height: '100%',\n flexDirection: 'column',\n },\n horizontalWithContent: {\n width: '100%',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n verticalWithContent: {\n height: '100%',\n flexDirection: 'column',\n alignItems: 'center',\n gap: 12,\n },\n horizontalLine: {\n width: '100%',\n },\n verticalLine: {\n height: '100%',\n },\n lineSegment: {\n height: StyleSheet.hairlineWidth,\n flex: 1,\n },\n lineSegmentVertical: {\n width: StyleSheet.hairlineWidth,\n flex: 1,\n },\n contentText: {\n fontSize: 14,\n },\n});\n\nexport default Divider;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Divider/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {View, Text, StyleSheet} from 'react-native';\nimport type {IDividerComponent} from '@lmb-it/kitsconcerto-types';\nimport {useSeparator} from \"../../factory\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\nimport {useKitsTheme} from '../../contexts/Theme';\nimport useThemedFont from '../../hooks/useThemedFont';\n\nconst Divider: React.FC<IDividerComponent> = (props) => {\n const {nativeProps} = useSeparator<any>(props);\n /*\n * ⛔ ARABIC CLIPS WITHOUT AN EXPLICIT LINE BOX — a raw react-native <Text>\n * with a fontSize and no lineHeight gets the FONT'S natural box, and\n * NotoKufiArabic's is too short for its own ascenders. In an RTL script\n * that reads as a BAD TRANSLATION rather than as clipping: ش/س, غ/ع and\n * ة/ه differ only by marks above the baseline.\n * ⚠️ undefined in LTR, so no English layout moves.\n */\n const rtlLineHeight = useRtlLineHeight(undefined, 14);\n const {\n align = 'center',\n children,\n layout = 'horizontal',\n type: borderType = 'solid',\n unstyled = false,\n ...rest\n } = nativeProps;\n\n const {resolveToken} = useKitsTheme();\n // `color` overrides the line colour (resolved through the theme — token,\n // hex, or named); falls back to the `divider` token when omitted.\n const dividerColor = typeof props.color === 'string'\n ? resolveToken(props.color)\n : resolveToken('divider');\n const contentFont = useThemedFont('body');\n\n const isHorizontal = layout === 'horizontal';\n\n if (unstyled) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n rest.style,\n ]}\n />\n );\n }\n\n const lineStyle = isHorizontal\n ? [styles.horizontalLine, {borderBottomStyle: borderType, borderBottomColor: dividerColor}]\n : [styles.verticalLine, {borderLeftStyle: borderType, borderLeftColor: dividerColor}];\n\n if (!children) {\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontal : styles.vertical,\n isHorizontal\n ? {borderBottomWidth: StyleSheet.hairlineWidth, borderBottomColor: dividerColor, borderStyle: borderType}\n : {borderLeftWidth: StyleSheet.hairlineWidth, borderLeftColor: dividerColor, borderStyle: borderType},\n rest.style,\n ]}\n />\n );\n }\n\n const alignMap: Record<string, 'flex-start' | 'center' | 'flex-end'> = {\n left: 'flex-start',\n top: 'flex-start',\n center: 'center',\n right: 'flex-end',\n bottom: 'flex-end',\n };\n const justifyContent = alignMap[align] ?? 'center';\n\n return (\n <View\n {...rest}\n style={[\n isHorizontal ? styles.horizontalWithContent : styles.verticalWithContent,\n {justifyContent},\n rest.style,\n ]}>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'left' || align === 'top' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n <Text style={[styles.contentText, {color: resolveToken('text-secondary')}, rtlLineHeight != null ? {lineHeight: rtlLineHeight} : null, contentFont ? {fontFamily: contentFont} : null]}>\n {children}\n </Text>\n <View style={[\n isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,\n {backgroundColor: dividerColor},\n align === 'right' || align === 'bottom' ? {flex: 0, width: isHorizontal ? 24 : undefined, height: !isHorizontal ? 24 : undefined} : {flex: 1},\n ]} />\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n horizontal: {\n width: '100%',\n flexDirection: 'row',\n },\n vertical: {\n height: '100%',\n flexDirection: 'column',\n },\n horizontalWithContent: {\n width: '100%',\n flexDirection: 'row',\n alignItems: 'center',\n gap: 12,\n },\n verticalWithContent: {\n height: '100%',\n flexDirection: 'column',\n alignItems: 'center',\n gap: 12,\n },\n horizontalLine: {\n width: '100%',\n },\n verticalLine: {\n height: '100%',\n },\n lineSegment: {\n height: StyleSheet.hairlineWidth,\n flex: 1,\n },\n lineSegmentVertical: {\n width: StyleSheet.hairlineWidth,\n flex: 1,\n },\n contentText: {\n fontSize: 14,\n },\n});\n\nexport default Divider;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,MAAM,OAAA,GAAuC,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAC,WAAA,EAAW,GAAI,YAAA,CAAkB,KAAK,CAAA;AAS7C,EAAA,MAAM,aAAA,GAAgB,gBAAA,CAAiB,MAAA,EAAW,EAAE,CAAA;AACpD,EAAA,MAAM;AAAA,IACF,KAAA,GAAQ,QAAA;AAAA,IACR,QAAA;AAAA,IACA,MAAA,GAAS,YAAA;AAAA,IACT,MAAM,UAAA,GAAa,OAAA;AAAA,IACnB,QAAA,GAAW,KAAA;AAAA,IACX,GAAG;AAAA,GACP,GAAI,WAAA;AAEJ,EAAA,MAAM,EAAC,YAAA,EAAY,GAAI,YAAA,EAAa;AAGpC,EAAA,MAAM,YAAA,GAAe,OAAO,KAAA,CAAM,KAAA,KAAU,QAAA,GACtC,aAAa,KAAA,CAAM,KAAK,CAAA,GACxB,YAAA,CAAa,SAAS,CAAA;AAC5B,EAAA,MAAM,WAAA,GAAc,cAAc,MAAM,CAAA;AAExC,EAAA,MAAM,eAAe,MAAA,KAAW,YAAA;AAEhC,EAAA,IAAI,QAAA,EAAU;AACV,IAAA,uBACI,GAAA;AAAA,MAAC,IA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AAAA,IACP,aAAA,EAAe;AAAA,GACnB;AAAA,EACA,QAAA,EAAU;AAAA,IACN,MAAA,EAAQ,MAAA;AAAA,IACR,aAAA,EAAe;AAAA,GACnB;AAAA,EACA,qBAAA,EAAuB;AAAA,IACnB,KAAA,EAAO,MAAA;AAAA,IACP,aAAA,EAAe,KAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,GAAA,EAAK;AAAA,GACT;AAAA,EACA,mBAAA,EAAqB;AAAA,IACjB,MAAA,EAAQ,MAAA;AAAA,IACR,aAAA,EAAe,QAAA;AAAA,IACf,UAAA,EAAY,QAAA;AAAA,IACZ,GAAA,EAAK;AAAA,GACT;AAAA,EACA,cAAA,EAAgB;AAAA,IACZ,KAAA,EAAO;AAAA,GACX;AAAA,EACA,YAAA,EAAc;AAAA,IACV,MAAA,EAAQ;AAAA,GACZ;AAAA,EACA,WAAA,EAAa;AAAA,IACT,QAAQ,UAAA,CAAW,aAAA;AAAA,IACnB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,mBAAA,EAAqB;AAAA,IACjB,OAAO,UAAA,CAAW,aAAA;AAAA,IAClB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,WAAA,EAAa;AAAA,IACT,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
|
|
@@ -61,6 +61,7 @@ require('yup');
|
|
|
61
61
|
require('../../packages/types/src/Css/map/index.cjs');
|
|
62
62
|
require('../../packages/types/src/Theme/shadows.cjs');
|
|
63
63
|
require('../../packages/types/src/Theme/defaultTheme.cjs');
|
|
64
|
+
require('../../packages/types/src/Theme/resolvers.cjs');
|
|
64
65
|
require('../../packages/types/src/Theme/alphaColors.cjs');
|
|
65
66
|
require('../../apps/mobile/src/Factory/helpers/cssVarMap.cjs');
|
|
66
67
|
var useSeparator = require('../../apps/mobile/src/Factory/useSeparator.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Heading/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {IHeadingComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, IHeadingComponent[\"size\"]> = {\n h1: \"5xl\",\n h2: \"4xl\",\n h3: \"3xl\",\n h4: \"2xl\",\n h5: \"xl\",\n h6: \"lg\",\n};\n\nconst Heading: React.FC<IHeadingComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"h2\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n // Match Text/index.native.tsx: apply theme.fonts.heading as the default\n // fontFamily so consumers overriding via `extendTheme({ fonts: { heading\n // : 'NotoKufiArabic-Bold' } })` see the font on every Heading. Per-call\n // `style.fontFamily` (passed through cssProps via useSeparator) wins.\n const fontFamily = typeof theme.fonts.heading === 'string' ? theme.fonts.heading : undefined;\n\n // RTL: headroom so tall Arabic glyphs aren't clipped at the top.\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number' ? (cssProps as any).fontSize : undefined,\n );\n\n return (\n <ResponsiveElement\n as=\"Heading\"\n cssProps={cssProps}\n additionalStyles={{\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Heading;\n"],"names":["useKitsTheme","useSeparator","useRtlLineHeight","jsx","ResponsiveElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Heading/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {IHeadingComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, IHeadingComponent[\"size\"]> = {\n h1: \"5xl\",\n h2: \"4xl\",\n h3: \"3xl\",\n h4: \"2xl\",\n h5: \"xl\",\n h6: \"lg\",\n};\n\nconst Heading: React.FC<IHeadingComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"h2\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n // Match Text/index.native.tsx: apply theme.fonts.heading as the default\n // fontFamily so consumers overriding via `extendTheme({ fonts: { heading\n // : 'NotoKufiArabic-Bold' } })` see the font on every Heading. Per-call\n // `style.fontFamily` (passed through cssProps via useSeparator) wins.\n const fontFamily = typeof theme.fonts.heading === 'string' ? theme.fonts.heading : undefined;\n\n // RTL: headroom so tall Arabic glyphs aren't clipped at the top.\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number' ? (cssProps as any).fontSize : undefined,\n );\n\n return (\n <ResponsiveElement\n as=\"Heading\"\n cssProps={cssProps}\n additionalStyles={{\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Heading;\n"],"names":["useKitsTheme","useSeparator","useRtlLineHeight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gBAAA,EAAkB;AAAA,QACd,GAAI,UAAA,GAAa,EAAE,UAAA,KAAe,EAAC;AAAA,QACnC,GAAI,aAAA,IAAiB,IAAA,GAAO,EAAE,UAAA,EAAY,aAAA,KAAkB;AAAC,OACjE;AAAA,MACA,WAAA,EAAa;AAAA,QACT,GAAG,IAAA;AAAA,QACH,IAAA,EAAM,YAAA;AAAA,QACN,WAAA;AAAA,QACA,IAAA;AAAA,QACA,SAAA;AAAA,QACA,aAAA;AAAA,QACA,GAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA,OACJ;AAAA,MAEC;AAAA;AAAA,GACL;AAER;;;;"}
|
|
@@ -57,6 +57,7 @@ import 'yup';
|
|
|
57
57
|
import '../../packages/types/src/Css/map/index.js';
|
|
58
58
|
import '../../packages/types/src/Theme/shadows.js';
|
|
59
59
|
import '../../packages/types/src/Theme/defaultTheme.js';
|
|
60
|
+
import '../../packages/types/src/Theme/resolvers.js';
|
|
60
61
|
import '../../packages/types/src/Theme/alphaColors.js';
|
|
61
62
|
import '../../apps/mobile/src/Factory/helpers/cssVarMap.js';
|
|
62
63
|
import useSeparator from '../../apps/mobile/src/Factory/useSeparator.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Heading/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {IHeadingComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, IHeadingComponent[\"size\"]> = {\n h1: \"5xl\",\n h2: \"4xl\",\n h3: \"3xl\",\n h4: \"2xl\",\n h5: \"xl\",\n h6: \"lg\",\n};\n\nconst Heading: React.FC<IHeadingComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"h2\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n // Match Text/index.native.tsx: apply theme.fonts.heading as the default\n // fontFamily so consumers overriding via `extendTheme({ fonts: { heading\n // : 'NotoKufiArabic-Bold' } })` see the font on every Heading. Per-call\n // `style.fontFamily` (passed through cssProps via useSeparator) wins.\n const fontFamily = typeof theme.fonts.heading === 'string' ? theme.fonts.heading : undefined;\n\n // RTL: headroom so tall Arabic glyphs aren't clipped at the top.\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number' ? (cssProps as any).fontSize : undefined,\n );\n\n return (\n <ResponsiveElement\n as=\"Heading\"\n cssProps={cssProps}\n additionalStyles={{\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Heading;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Heading/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {IHeadingComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, IHeadingComponent[\"size\"]> = {\n h1: \"5xl\",\n h2: \"4xl\",\n h3: \"3xl\",\n h4: \"2xl\",\n h5: \"xl\",\n h6: \"lg\",\n};\n\nconst Heading: React.FC<IHeadingComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"h2\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n // Match Text/index.native.tsx: apply theme.fonts.heading as the default\n // fontFamily so consumers overriding via `extendTheme({ fonts: { heading\n // : 'NotoKufiArabic-Bold' } })` see the font on every Heading. Per-call\n // `style.fontFamily` (passed through cssProps via useSeparator) wins.\n const fontFamily = typeof theme.fonts.heading === 'string' ? theme.fonts.heading : undefined;\n\n // RTL: headroom so tall Arabic glyphs aren't clipped at the top.\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number' ? (cssProps as any).fontSize : undefined,\n );\n\n return (\n <ResponsiveElement\n as=\"Heading\"\n cssProps={cssProps}\n additionalStyles={{\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n color,\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Heading;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,WAAA,GAAyD;AAAA,EAC3D,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,KAAA;AAAA,EACJ,EAAA,EAAI,IAAA;AAAA,EACJ,EAAA,EAAI;AACR,CAAA;AAEA,MAAM,OAAA,GAAuC,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAE,KAAA,EAAM,GAAI,YAAA,EAAa;AAC/B,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAY,GAAI,aAAkB,KAAK,CAAA;AACzD,EAAA,MAAM;AAAA,IACF,EAAA,GAAK,IAAA;AAAA,IACL,IAAA;AAAA,IACA,QAAA;AAAA,IACA,WAAA;AAAA,IACA,IAAA;AAAA,IACA,SAAA;AAAA,IACA,aAAA;AAAA,IACA,GAAA;AAAA,IACA,MAAA;AAAA,IACA,SAAA;AAAA,IACA,KAAA;AAAA,IACA,GAAG;AAAA,GACP,GAAI,WAAA;AAEJ,EAAA,MAAM,YAAA,GAAe,IAAA,IAAQ,WAAA,CAAY,EAAE,CAAA,IAAK,IAAA;AAMhD,EAAA,MAAM,UAAA,GAAa,OAAO,KAAA,CAAM,KAAA,CAAM,YAAY,QAAA,GAAW,KAAA,CAAM,MAAM,OAAA,GAAU,MAAA;AAGnF,EAAA,MAAM,aAAA,GAAgB,gBAAA;AAAA,IAClB,YAAA;AAAA,IACA,OAAQ,QAAA,EAAkB,QAAA,KAAa,QAAA,GAAY,SAAiB,QAAA,GAAW;AAAA,GACnF;AAEA,EAAA,uBACI,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACG,EAAA,EAAG,SAAA;AAAA,MACH,QAAA;AAAA,MACA,gBAAA,EAAkB;AAAA,QACd,GAAI,UAAA,GAAa,EAAE,UAAA,KAAe,EAAC;AAAA,QACnC,GAAI,aAAA,IAAiB,IAAA,GAAO,EAAE,UAAA,EAAY,aAAA,KAAkB;AAAC,OACjE;AAAA,MACA,WAAA,EAAa;AAAA,QACT,GAAG,IAAA;AAAA,QACH,IAAA,EAAM,YAAA;AAAA,QACN,WAAA;AAAA,QACA,IAAA;AAAA,QACA,SAAA;AAAA,QACA,aAAA;AAAA,QACA,GAAA;AAAA,QACA,MAAA;AAAA,QACA,SAAA;AAAA,QACA;AAAA,OACJ;AAAA,MAEC;AAAA;AAAA,GACL;AAER;;;;"}
|
|
@@ -61,6 +61,7 @@ require('yup');
|
|
|
61
61
|
require('../../packages/types/src/Css/map/index.cjs');
|
|
62
62
|
require('../../packages/types/src/Theme/shadows.cjs');
|
|
63
63
|
require('../../packages/types/src/Theme/defaultTheme.cjs');
|
|
64
|
+
require('../../packages/types/src/Theme/resolvers.cjs');
|
|
64
65
|
require('../../packages/types/src/Theme/alphaColors.cjs');
|
|
65
66
|
require('../../apps/mobile/src/Factory/helpers/cssVarMap.cjs');
|
|
66
67
|
var useSeparator = require('../../apps/mobile/src/Factory/useSeparator.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Image/index.native.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type {IImageComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\n\nconst mapImageStylingProps = (props: IImageComponent) => {\n let resizeMode: undefined | 'cover'| 'contain' | 'stretch' | 'repeat' | 'center';\n\n if (props.objectFit) {\n resizeMode = props.objectFit;\n }else{\n resizeMode = undefined\n }\n\n return { resizeMode };\n};\nconst Image = ({style, ref, src, ...props}: IImageComponent) => {\n const source = src ? { uri: src } : props.source;\n const stylingProps = mapImageStylingProps(props);\n const { cssProps, nativeProps } = useSeparator<Record<any, any>>(props);\n\n return (\n <ResponsiveElement\n nativeProps={{...nativeProps, ...stylingProps, source}}\n ref={ref}\n cssProps={cssProps}\n as={\"Image\"}\n />\n );\n}\n\nexport default Image;\n"],"names":["useSeparator","jsx","ResponsiveElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Image/index.native.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type {IImageComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\n\nconst mapImageStylingProps = (props: IImageComponent) => {\n let resizeMode: undefined | 'cover'| 'contain' | 'stretch' | 'repeat' | 'center';\n\n if (props.objectFit) {\n resizeMode = props.objectFit;\n }else{\n resizeMode = undefined\n }\n\n return { resizeMode };\n};\nconst Image = ({style, ref, src, ...props}: IImageComponent) => {\n const source = src ? { uri: src } : props.source;\n const stylingProps = mapImageStylingProps(props);\n const { cssProps, nativeProps } = useSeparator<Record<any, any>>(props);\n\n return (\n <ResponsiveElement\n nativeProps={{...nativeProps, ...stylingProps, source}}\n ref={ref}\n cssProps={cssProps}\n as={\"Image\"}\n />\n );\n}\n\nexport default Image;\n"],"names":["useSeparator","jsx","ResponsiveElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAA2B;AACrD,EAAA,IAAI,UAAA;AAEJ,EAAA,IAAI,MAAM,SAAA,EAAW;AACjB,IAAA,UAAA,GAAa,KAAA,CAAM,SAAA;AAAA,EACvB,CAAA,MAAK;AACD,IAAA,UAAA,GAAa,MAAA;AAAA,EACjB;AAEA,EAAA,OAAO,EAAE,UAAA,EAAW;AACxB,CAAA;AACA,MAAM,KAAA,GAAQ,CAAC,EAAC,KAAA,EAAO,KAAK,GAAA,EAAK,GAAG,OAAK,KAAuB;AAC5D,EAAA,MAAM,SAAS,GAAA,GAAM,EAAE,GAAA,EAAK,GAAA,KAAQ,KAAA,CAAM,MAAA;AAC1C,EAAA,MAAM,YAAA,GAAe,qBAAqB,KAAK,CAAA;AAC/C,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAY,GAAIA,qBAA+B,KAAK,CAAA;AAEtE,EAAA,uBACIC,cAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MACG,aAAa,EAAC,GAAG,WAAA,EAAa,GAAG,cAAc,MAAA,EAAM;AAAA,MACrD,GAAA;AAAA,MACA,QAAA;AAAA,MACA,EAAA,EAAI;AAAA;AAAA,GACR;AAER;;;;"}
|
|
@@ -57,6 +57,7 @@ import 'yup';
|
|
|
57
57
|
import '../../packages/types/src/Css/map/index.js';
|
|
58
58
|
import '../../packages/types/src/Theme/shadows.js';
|
|
59
59
|
import '../../packages/types/src/Theme/defaultTheme.js';
|
|
60
|
+
import '../../packages/types/src/Theme/resolvers.js';
|
|
60
61
|
import '../../packages/types/src/Theme/alphaColors.js';
|
|
61
62
|
import '../../apps/mobile/src/Factory/helpers/cssVarMap.js';
|
|
62
63
|
import useSeparator from '../../apps/mobile/src/Factory/useSeparator.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Image/index.native.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type {IImageComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\n\nconst mapImageStylingProps = (props: IImageComponent) => {\n let resizeMode: undefined | 'cover'| 'contain' | 'stretch' | 'repeat' | 'center';\n\n if (props.objectFit) {\n resizeMode = props.objectFit;\n }else{\n resizeMode = undefined\n }\n\n return { resizeMode };\n};\nconst Image = ({style, ref, src, ...props}: IImageComponent) => {\n const source = src ? { uri: src } : props.source;\n const stylingProps = mapImageStylingProps(props);\n const { cssProps, nativeProps } = useSeparator<Record<any, any>>(props);\n\n return (\n <ResponsiveElement\n nativeProps={{...nativeProps, ...stylingProps, source}}\n ref={ref}\n cssProps={cssProps}\n as={\"Image\"}\n />\n );\n}\n\nexport default Image;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Image/index.native.tsx"],"sourcesContent":["import React from \"react\";\n\nimport type {IImageComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\n\nconst mapImageStylingProps = (props: IImageComponent) => {\n let resizeMode: undefined | 'cover'| 'contain' | 'stretch' | 'repeat' | 'center';\n\n if (props.objectFit) {\n resizeMode = props.objectFit;\n }else{\n resizeMode = undefined\n }\n\n return { resizeMode };\n};\nconst Image = ({style, ref, src, ...props}: IImageComponent) => {\n const source = src ? { uri: src } : props.source;\n const stylingProps = mapImageStylingProps(props);\n const { cssProps, nativeProps } = useSeparator<Record<any, any>>(props);\n\n return (\n <ResponsiveElement\n nativeProps={{...nativeProps, ...stylingProps, source}}\n ref={ref}\n cssProps={cssProps}\n as={\"Image\"}\n />\n );\n}\n\nexport default Image;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAA2B;AACrD,EAAA,IAAI,UAAA;AAEJ,EAAA,IAAI,MAAM,SAAA,EAAW;AACjB,IAAA,UAAA,GAAa,KAAA,CAAM,SAAA;AAAA,EACvB,CAAA,MAAK;AACD,IAAA,UAAA,GAAa,MAAA;AAAA,EACjB;AAEA,EAAA,OAAO,EAAE,UAAA,EAAW;AACxB,CAAA;AACA,MAAM,KAAA,GAAQ,CAAC,EAAC,KAAA,EAAO,KAAK,GAAA,EAAK,GAAG,OAAK,KAAuB;AAC5D,EAAA,MAAM,SAAS,GAAA,GAAM,EAAE,GAAA,EAAK,GAAA,KAAQ,KAAA,CAAM,MAAA;AAC1C,EAAA,MAAM,YAAA,GAAe,qBAAqB,KAAK,CAAA;AAC/C,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAY,GAAI,aAA+B,KAAK,CAAA;AAEtE,EAAA,uBACI,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MACG,aAAa,EAAC,GAAG,WAAA,EAAa,GAAG,cAAc,MAAA,EAAM;AAAA,MACrD,GAAA;AAAA,MACA,QAAA;AAAA,MACA,EAAA,EAAI;AAAA;AAAA,GACR;AAER;;;;"}
|
|
@@ -61,6 +61,7 @@ require('yup');
|
|
|
61
61
|
require('../../packages/types/src/Css/map/index.cjs');
|
|
62
62
|
require('../../packages/types/src/Theme/shadows.cjs');
|
|
63
63
|
require('../../packages/types/src/Theme/defaultTheme.cjs');
|
|
64
|
+
require('../../packages/types/src/Theme/resolvers.cjs');
|
|
64
65
|
require('../../packages/types/src/Theme/alphaColors.cjs');
|
|
65
66
|
require('../../apps/mobile/src/Factory/helpers/cssVarMap.cjs');
|
|
66
67
|
require('../../apps/mobile/src/Factory/DimensionsContext.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Skeleton/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {Skeleton as GSkeleton} from '@lmb-it/kitsconcertomobile';\nimport type {ISkeleton} from \"@lmb-it/kitsconcerto-types\";\nimport {Flex} from \"../../_compat\";\n\nconst Skeleton: React.FC<ISkeleton> = ({\n className = 'h-12',\n container,\n ...props\n }) => {\n\n return (\n <Flex {...container}>\n <GSkeleton className={className} {...props} />\n </Flex>\n );\n};\n\nexport default Skeleton;\n"],"names":["jsx","Flex","GSkeleton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Skeleton/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {Skeleton as GSkeleton} from '@lmb-it/kitsconcertomobile';\nimport type {ISkeleton} from \"@lmb-it/kitsconcerto-types\";\nimport {Flex} from \"../../_compat\";\n\nconst Skeleton: React.FC<ISkeleton> = ({\n className = 'h-12',\n container,\n ...props\n }) => {\n\n return (\n <Flex {...container}>\n <GSkeleton className={className} {...props} />\n </Flex>\n );\n};\n\nexport default Skeleton;\n"],"names":["jsx","Flex","GSkeleton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,WAAgC,CAAC;AAAA,EACI,SAAA,GAAY,MAAA;AAAA,EACZ,SAAA;AAAA,EACA,GAAG;AACP,CAAA,KAAM;AAEzC,EAAA,uBACIA,cAAA,CAACC,iBAAM,GAAG,SAAA,EACN,yCAACC,gBAAA,EAAA,EAAU,SAAA,EAAuB,GAAG,KAAA,EAAO,CAAA,EAChD,CAAA;AAER;;;;"}
|
|
@@ -57,6 +57,7 @@ import 'yup';
|
|
|
57
57
|
import '../../packages/types/src/Css/map/index.js';
|
|
58
58
|
import '../../packages/types/src/Theme/shadows.js';
|
|
59
59
|
import '../../packages/types/src/Theme/defaultTheme.js';
|
|
60
|
+
import '../../packages/types/src/Theme/resolvers.js';
|
|
60
61
|
import '../../packages/types/src/Theme/alphaColors.js';
|
|
61
62
|
import '../../apps/mobile/src/Factory/helpers/cssVarMap.js';
|
|
62
63
|
import '../../apps/mobile/src/Factory/DimensionsContext.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Skeleton/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {Skeleton as GSkeleton} from '@lmb-it/kitsconcertomobile';\nimport type {ISkeleton} from \"@lmb-it/kitsconcerto-types\";\nimport {Flex} from \"../../_compat\";\n\nconst Skeleton: React.FC<ISkeleton> = ({\n className = 'h-12',\n container,\n ...props\n }) => {\n\n return (\n <Flex {...container}>\n <GSkeleton className={className} {...props} />\n </Flex>\n );\n};\n\nexport default Skeleton;\n"],"names":["GSkeleton"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Skeleton/index.native.tsx"],"sourcesContent":["import React from 'react';\nimport {Skeleton as GSkeleton} from '@lmb-it/kitsconcertomobile';\nimport type {ISkeleton} from \"@lmb-it/kitsconcerto-types\";\nimport {Flex} from \"../../_compat\";\n\nconst Skeleton: React.FC<ISkeleton> = ({\n className = 'h-12',\n container,\n ...props\n }) => {\n\n return (\n <Flex {...container}>\n <GSkeleton className={className} {...props} />\n </Flex>\n );\n};\n\nexport default Skeleton;\n"],"names":["GSkeleton"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKA,MAAM,WAAgC,CAAC;AAAA,EACI,SAAA,GAAY,MAAA;AAAA,EACZ,SAAA;AAAA,EACA,GAAG;AACP,CAAA,KAAM;AAEzC,EAAA,uBACI,GAAA,CAAC,QAAM,GAAG,SAAA,EACN,8BAACA,UAAA,EAAA,EAAU,SAAA,EAAuB,GAAG,KAAA,EAAO,CAAA,EAChD,CAAA;AAER;;;;"}
|
package/primitives/Svg/index.cjs
CHANGED
|
@@ -61,6 +61,7 @@ require('yup');
|
|
|
61
61
|
require('../../packages/types/src/Css/map/index.cjs');
|
|
62
62
|
require('../../packages/types/src/Theme/shadows.cjs');
|
|
63
63
|
require('../../packages/types/src/Theme/defaultTheme.cjs');
|
|
64
|
+
require('../../packages/types/src/Theme/resolvers.cjs');
|
|
64
65
|
require('../../packages/types/src/Theme/alphaColors.cjs');
|
|
65
66
|
require('../../apps/mobile/src/Factory/helpers/cssVarMap.cjs');
|
|
66
67
|
var useSeparator = require('../../apps/mobile/src/Factory/useSeparator.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Svg/index.tsx"],"sourcesContent":["import React, {type PropsWithChildren} from 'react'\n\n\nimport type {ISVGComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\nconst Svg = ({className, children, ref, ...props}: PropsWithChildren<ISVGComponent>) => {\n\n const {cssProps, nativeProps} = useSeparator<any>(props)\n\n\n return (\n <ResponsiveElement ref={ref}\n additionalClasses={className}\n cssProps={cssProps}\n additionalStyles={{\n // @ts-ignore\n display: 'inline-block',\n lineHeight: '1rem',\n flexShrink: 0,\n verticalAlign: 'middle',\n marginInline: '2px',\n width: '1.5rem',\n height: '1.5rem'\n }}\n nativeProps={nativeProps}\n as={\"Svg\"}\n children={children}/>\n )\n}\n\nexport default Svg;\n// export default React.memo(Flex, (prevProps, nextProps) => {\n // return shallowEqual(nextProps, prevProps);\n// })\n"],"names":["useSeparator","jsx","ResponsiveElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Svg/index.tsx"],"sourcesContent":["import React, {type PropsWithChildren} from 'react'\n\n\nimport type {ISVGComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\nconst Svg = ({className, children, ref, ...props}: PropsWithChildren<ISVGComponent>) => {\n\n const {cssProps, nativeProps} = useSeparator<any>(props)\n\n\n return (\n <ResponsiveElement ref={ref}\n additionalClasses={className}\n cssProps={cssProps}\n additionalStyles={{\n // @ts-ignore\n display: 'inline-block',\n lineHeight: '1rem',\n flexShrink: 0,\n verticalAlign: 'middle',\n marginInline: '2px',\n width: '1.5rem',\n height: '1.5rem'\n }}\n nativeProps={nativeProps}\n as={\"Svg\"}\n children={children}/>\n )\n}\n\nexport default Svg;\n// export default React.memo(Flex, (prevProps, nextProps) => {\n // return shallowEqual(nextProps, prevProps);\n// })\n"],"names":["useSeparator","jsx","ResponsiveElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,GAAA,GAAM,CAAC,EAAC,SAAA,EAAW,UAAU,GAAA,EAAK,GAAG,OAAK,KAAwC;AAEpF,EAAA,MAAM,EAAC,QAAA,EAAU,WAAA,EAAW,GAAIA,qBAAkB,KAAK,CAAA;AAGvD,EAAA,uBACIC,cAAA;AAAA,IAACC,yBAAA;AAAA,IAAA;AAAA,MAAkB,GAAA;AAAA,MACA,iBAAA,EAAmB,SAAA;AAAA,MACnB,QAAA;AAAA,MACA,gBAAA,EAAkB;AAAA;AAAA,QAEd,OAAA,EAAS,cAAA;AAAA,QACT,UAAA,EAAY,MAAA;AAAA,QACZ,UAAA,EAAY,CAAA;AAAA,QACZ,aAAA,EAAe,QAAA;AAAA,QACf,YAAA,EAAc,KAAA;AAAA,QACd,KAAA,EAAO,QAAA;AAAA,QACP,MAAA,EAAQ;AAAA,OACZ;AAAA,MACA,WAAA;AAAA,MACA,EAAA,EAAI,KAAA;AAAA,MACJ;AAAA;AAAA,GAAmB;AAE9C;;;;"}
|
package/primitives/Svg/index.js
CHANGED
|
@@ -57,6 +57,7 @@ import 'yup';
|
|
|
57
57
|
import '../../packages/types/src/Css/map/index.js';
|
|
58
58
|
import '../../packages/types/src/Theme/shadows.js';
|
|
59
59
|
import '../../packages/types/src/Theme/defaultTheme.js';
|
|
60
|
+
import '../../packages/types/src/Theme/resolvers.js';
|
|
60
61
|
import '../../packages/types/src/Theme/alphaColors.js';
|
|
61
62
|
import '../../apps/mobile/src/Factory/helpers/cssVarMap.js';
|
|
62
63
|
import useSeparator from '../../apps/mobile/src/Factory/useSeparator.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Svg/index.tsx"],"sourcesContent":["import React, {type PropsWithChildren} from 'react'\n\n\nimport type {ISVGComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\nconst Svg = ({className, children, ref, ...props}: PropsWithChildren<ISVGComponent>) => {\n\n const {cssProps, nativeProps} = useSeparator<any>(props)\n\n\n return (\n <ResponsiveElement ref={ref}\n additionalClasses={className}\n cssProps={cssProps}\n additionalStyles={{\n // @ts-ignore\n display: 'inline-block',\n lineHeight: '1rem',\n flexShrink: 0,\n verticalAlign: 'middle',\n marginInline: '2px',\n width: '1.5rem',\n height: '1.5rem'\n }}\n nativeProps={nativeProps}\n as={\"Svg\"}\n children={children}/>\n )\n}\n\nexport default Svg;\n// export default React.memo(Flex, (prevProps, nextProps) => {\n // return shallowEqual(nextProps, prevProps);\n// })\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Svg/index.tsx"],"sourcesContent":["import React, {type PropsWithChildren} from 'react'\n\n\nimport type {ISVGComponent} from \"@lmb-it/kitsconcerto-types\";\nimport {ResponsiveElement, useSeparator} from \"../../factory\";\n\nconst Svg = ({className, children, ref, ...props}: PropsWithChildren<ISVGComponent>) => {\n\n const {cssProps, nativeProps} = useSeparator<any>(props)\n\n\n return (\n <ResponsiveElement ref={ref}\n additionalClasses={className}\n cssProps={cssProps}\n additionalStyles={{\n // @ts-ignore\n display: 'inline-block',\n lineHeight: '1rem',\n flexShrink: 0,\n verticalAlign: 'middle',\n marginInline: '2px',\n width: '1.5rem',\n height: '1.5rem'\n }}\n nativeProps={nativeProps}\n as={\"Svg\"}\n children={children}/>\n )\n}\n\nexport default Svg;\n// export default React.memo(Flex, (prevProps, nextProps) => {\n // return shallowEqual(nextProps, prevProps);\n// })\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,GAAA,GAAM,CAAC,EAAC,SAAA,EAAW,UAAU,GAAA,EAAK,GAAG,OAAK,KAAwC;AAEpF,EAAA,MAAM,EAAC,QAAA,EAAU,WAAA,EAAW,GAAI,aAAkB,KAAK,CAAA;AAGvD,EAAA,uBACI,GAAA;AAAA,IAAC,iBAAA;AAAA,IAAA;AAAA,MAAkB,GAAA;AAAA,MACA,iBAAA,EAAmB,SAAA;AAAA,MACnB,QAAA;AAAA,MACA,gBAAA,EAAkB;AAAA;AAAA,QAEd,OAAA,EAAS,cAAA;AAAA,QACT,UAAA,EAAY,MAAA;AAAA,QACZ,UAAA,EAAY,CAAA;AAAA,QACZ,aAAA,EAAe,QAAA;AAAA,QACf,YAAA,EAAc,KAAA;AAAA,QACd,KAAA,EAAO,QAAA;AAAA,QACP,MAAA,EAAQ;AAAA,OACZ;AAAA,MACA,WAAA;AAAA,MACA,EAAA,EAAI,KAAA;AAAA,MACJ;AAAA;AAAA,GAAmB;AAE9C;;;;"}
|
|
@@ -61,6 +61,7 @@ require('yup');
|
|
|
61
61
|
require('../../packages/types/src/Css/map/index.cjs');
|
|
62
62
|
require('../../packages/types/src/Theme/shadows.cjs');
|
|
63
63
|
require('../../packages/types/src/Theme/defaultTheme.cjs');
|
|
64
|
+
require('../../packages/types/src/Theme/resolvers.cjs');
|
|
64
65
|
require('../../packages/types/src/Theme/alphaColors.cjs');
|
|
65
66
|
require('../../apps/mobile/src/Factory/helpers/cssVarMap.cjs');
|
|
66
67
|
var useSeparator = require('../../apps/mobile/src/Factory/useSeparator.cjs');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Text/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleSheet } from \"react-native\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {ITextComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, ITextComponent[\"size\"]> = {\n small: \"sm\",\n label: \"sm\",\n span: \"md\",\n p: \"md\",\n};\n\n/**\n * ⛔ IT RETURNS ONLY THE KEYS IT ACTUALLY SETS, AND THAT IS THE WHOLE FIX.\n *\n * This built an object literal holding BOTH keys every time — `undefined` when\n * the prop that drives them was absent — and it is spread LAST into\n * `nativeProps`, after `...rest`. So a consumer writing\n * `<Text numberOfLines={1}>` had its value silently OVERWRITTEN WITH\n * `undefined` on every render. The prop was accepted by the types, passed\n * through `useSeparator`, and destroyed one line before it reached React\n * Native.\n *\n * ⛔ IT IS A SILENT FAILURE, WHICH IS WHY IT SURVIVED. Nothing warns, nothing\n * throws, and the call site reads correctly — so a header that says\n * `numberOfLines={1}` wraps to two lines and the only way to find out is to\n * look at a device. AlphaMatch's client job-detail header did exactly that: a\n * two-line title overlapping its own subtitle and the bar beneath it, on a\n * screen whose source caps the title at one line. Two sessions read that source\n * and concluded a wrap was impossible.\n *\n * ⚠️ `whiteSpace: \"nowrap\"` AND `textOverflow` STILL WIN, deliberately. They are\n * this library's own way of asking for the same thing, and a consumer using both\n * is asking twice; the library prop is the more specific statement and stays\n * last. What changes is that ABSENT no longer means `undefined` — it means the\n * key is not there at all, so the consumer's value survives.\n *\n * ⚠️ NATIVE ONLY. The web twin writes CSS `textOverflow`/`whiteSpace` straight\n * into `style` and has no `numberOfLines` to clobber, so it never had this.\n */\nconst mapTextOverflowProps = (props: ITextComponent) => {\n const overflow: {\n numberOfLines?: number;\n ellipsizeMode?: \"head\" | \"middle\" | \"tail\" | \"clip\";\n } = {};\n\n if (props.whiteSpace === \"nowrap\") {\n overflow.numberOfLines = 1;\n }\n\n if (props.textOverflow === \"ellipsis\") {\n overflow.ellipsizeMode = \"tail\";\n }\n\n if (props.textOverflow === \"clip\") {\n overflow.ellipsizeMode = \"clip\";\n }\n\n return overflow;\n};\n\nconst Text: React.FC<ITextComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"p\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n const overflowProps = mapTextOverflowProps(props);\n\n // App-wide font: read from theme.fonts.body so consumers overriding\n // via `extendTheme({ fonts: { body: 'SpaceMono' } })` see the font on\n // every Text without per-call wiring. RN does not propagate fontFamily\n // through View parents, so this default is applied at the Text element\n // itself. Per-instance `style.fontFamily` (passed through cssProps via\n // useSeparator) takes precedence because ResponsiveElement merges in\n // user style after additionalStyles.\n // TODO: apply the same default to Heading (theme.fonts.heading), and\n // to any RN <Text> rendered outside this primitive (e.g. inside\n // Button labels, FormControlHelperText, custom widgets).\n const fontFamily = typeof theme.fonts.body === 'string' ? theme.fonts.body : undefined;\n\n /*\n * ⛔ THE FONT SIZE IS READ FROM THE `style` PROP TOO, AND THAT IS THE FIX.\n * Device-reported in Arabic, 19 September 2026: the confirm dialog's bold\n * heading was CLIPPED ALONG ITS TOP EDGE while the body and button beneath\n * it read perfectly.\n *\n * ⛔ THE OLD LINE ASKED ONLY `cssProps.fontSize` — the font size passed as a\n * PROP. A consumer that sizes its text through `style={{fontSize: 22}}`,\n * which is how every StyleSheet in this library does it, was invisible to\n * it. The hook then fell back to the SIZE TOKEN, which with no `size` prop\n * is `md` (~16px), and returned a line height of about 24.\n *\n * ⛔ SO IT DID NOT FAIL TO HELP — IT MADE THINGS WORSE, CONFIDENTLY. 24px of\n * line box was written into `additionalStyles` for text actually rendering\n * at 22px and 24px. `ConfirmDialog.sheetHeader` is fontSize 24, so its\n * ratio came out at exactly 1.0 — TIGHTER than the natural line box the\n * code was there to loosen.\n *\n * ⚠️ AND THAT IS PRECISELY WHY ONE DIALOG SHOWED BOTH BEHAVIOURS AT ONCE.\n * `ResponsiveElement` appends the consumer's `style` AFTER these\n * `additionalStyles`, so a style that names its own `lineHeight` wins and a\n * style that does not inherits the wrong number. In that file both MESSAGE\n * styles set a lineHeight and neither HEADER style does — messages legible,\n * headings clipped, one component, one render.\n *\n * ⚠️ IT IS STILL `undefined` IN LTR, so no English layout moves. A flatten\n * is needed because `style` may be an array, a StyleSheet id, or a plain\n * object, and only `StyleSheet.flatten` reads all three.\n */\n const styleFontSize = (() => {\n const flat = StyleSheet.flatten((nativeProps as any)?.style) as\n | {fontSize?: unknown}\n | undefined;\n return typeof flat?.fontSize === 'number' ? flat.fontSize : undefined;\n })();\n\n // RTL: give Arabic glyphs vertical headroom so they aren't clipped at the\n // top. undefined in LTR — the font's natural line-height (English unchanged).\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number'\n ? (cssProps as any).fontSize\n : styleFontSize,\n );\n\n return (\n <ResponsiveElement\n as=\"Text\"\n cssProps={{...cssProps}}\n additionalStyles={{\n padding: 0,\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n as,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...overflowProps\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Text;\n"],"names":["useKitsTheme","useSeparator","StyleSheet","useRtlLineHeight","jsx","ResponsiveElement"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Text/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleSheet } from \"react-native\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {ITextComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, ITextComponent[\"size\"]> = {\n small: \"sm\",\n label: \"sm\",\n span: \"md\",\n p: \"md\",\n};\n\n/**\n * ⛔ IT RETURNS ONLY THE KEYS IT ACTUALLY SETS, AND THAT IS THE WHOLE FIX.\n *\n * This built an object literal holding BOTH keys every time — `undefined` when\n * the prop that drives them was absent — and it is spread LAST into\n * `nativeProps`, after `...rest`. So a consumer writing\n * `<Text numberOfLines={1}>` had its value silently OVERWRITTEN WITH\n * `undefined` on every render. The prop was accepted by the types, passed\n * through `useSeparator`, and destroyed one line before it reached React\n * Native.\n *\n * ⛔ IT IS A SILENT FAILURE, WHICH IS WHY IT SURVIVED. Nothing warns, nothing\n * throws, and the call site reads correctly — so a header that says\n * `numberOfLines={1}` wraps to two lines and the only way to find out is to\n * look at a device. AlphaMatch's client job-detail header did exactly that: a\n * two-line title overlapping its own subtitle and the bar beneath it, on a\n * screen whose source caps the title at one line. Two sessions read that source\n * and concluded a wrap was impossible.\n *\n * ⚠️ `whiteSpace: \"nowrap\"` AND `textOverflow` STILL WIN, deliberately. They are\n * this library's own way of asking for the same thing, and a consumer using both\n * is asking twice; the library prop is the more specific statement and stays\n * last. What changes is that ABSENT no longer means `undefined` — it means the\n * key is not there at all, so the consumer's value survives.\n *\n * ⚠️ NATIVE ONLY. The web twin writes CSS `textOverflow`/`whiteSpace` straight\n * into `style` and has no `numberOfLines` to clobber, so it never had this.\n */\nconst mapTextOverflowProps = (props: ITextComponent) => {\n const overflow: {\n numberOfLines?: number;\n ellipsizeMode?: \"head\" | \"middle\" | \"tail\" | \"clip\";\n } = {};\n\n if (props.whiteSpace === \"nowrap\") {\n overflow.numberOfLines = 1;\n }\n\n if (props.textOverflow === \"ellipsis\") {\n overflow.ellipsizeMode = \"tail\";\n }\n\n if (props.textOverflow === \"clip\") {\n overflow.ellipsizeMode = \"clip\";\n }\n\n return overflow;\n};\n\nconst Text: React.FC<ITextComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"p\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n const overflowProps = mapTextOverflowProps(props);\n\n // App-wide font: read from theme.fonts.body so consumers overriding\n // via `extendTheme({ fonts: { body: 'SpaceMono' } })` see the font on\n // every Text without per-call wiring. RN does not propagate fontFamily\n // through View parents, so this default is applied at the Text element\n // itself. Per-instance `style.fontFamily` (passed through cssProps via\n // useSeparator) takes precedence because ResponsiveElement merges in\n // user style after additionalStyles.\n // TODO: apply the same default to Heading (theme.fonts.heading), and\n // to any RN <Text> rendered outside this primitive (e.g. inside\n // Button labels, FormControlHelperText, custom widgets).\n const fontFamily = typeof theme.fonts.body === 'string' ? theme.fonts.body : undefined;\n\n /*\n * ⛔ THE FONT SIZE IS READ FROM THE `style` PROP TOO, AND THAT IS THE FIX.\n * Device-reported in Arabic, 19 September 2026: the confirm dialog's bold\n * heading was CLIPPED ALONG ITS TOP EDGE while the body and button beneath\n * it read perfectly.\n *\n * ⛔ THE OLD LINE ASKED ONLY `cssProps.fontSize` — the font size passed as a\n * PROP. A consumer that sizes its text through `style={{fontSize: 22}}`,\n * which is how every StyleSheet in this library does it, was invisible to\n * it. The hook then fell back to the SIZE TOKEN, which with no `size` prop\n * is `md` (~16px), and returned a line height of about 24.\n *\n * ⛔ SO IT DID NOT FAIL TO HELP — IT MADE THINGS WORSE, CONFIDENTLY. 24px of\n * line box was written into `additionalStyles` for text actually rendering\n * at 22px and 24px. `ConfirmDialog.sheetHeader` is fontSize 24, so its\n * ratio came out at exactly 1.0 — TIGHTER than the natural line box the\n * code was there to loosen.\n *\n * ⚠️ AND THAT IS PRECISELY WHY ONE DIALOG SHOWED BOTH BEHAVIOURS AT ONCE.\n * `ResponsiveElement` appends the consumer's `style` AFTER these\n * `additionalStyles`, so a style that names its own `lineHeight` wins and a\n * style that does not inherits the wrong number. In that file both MESSAGE\n * styles set a lineHeight and neither HEADER style does — messages legible,\n * headings clipped, one component, one render.\n *\n * ⚠️ IT IS STILL `undefined` IN LTR, so no English layout moves. A flatten\n * is needed because `style` may be an array, a StyleSheet id, or a plain\n * object, and only `StyleSheet.flatten` reads all three.\n */\n const styleFontSize = (() => {\n const flat = StyleSheet.flatten((nativeProps as any)?.style) as\n | {fontSize?: unknown}\n | undefined;\n return typeof flat?.fontSize === 'number' ? flat.fontSize : undefined;\n })();\n\n // RTL: give Arabic glyphs vertical headroom so they aren't clipped at the\n // top. undefined in LTR — the font's natural line-height (English unchanged).\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number'\n ? (cssProps as any).fontSize\n : styleFontSize,\n );\n\n return (\n <ResponsiveElement\n as=\"Text\"\n cssProps={{...cssProps}}\n additionalStyles={{\n padding: 0,\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n as,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...overflowProps\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Text;\n"],"names":["useKitsTheme","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/Css/map/index.js';
|
|
58
58
|
import '../../packages/types/src/Theme/shadows.js';
|
|
59
59
|
import '../../packages/types/src/Theme/defaultTheme.js';
|
|
60
|
+
import '../../packages/types/src/Theme/resolvers.js';
|
|
60
61
|
import '../../packages/types/src/Theme/alphaColors.js';
|
|
61
62
|
import '../../apps/mobile/src/Factory/helpers/cssVarMap.js';
|
|
62
63
|
import useSeparator from '../../apps/mobile/src/Factory/useSeparator.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Text/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleSheet } from \"react-native\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {ITextComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, ITextComponent[\"size\"]> = {\n small: \"sm\",\n label: \"sm\",\n span: \"md\",\n p: \"md\",\n};\n\n/**\n * ⛔ IT RETURNS ONLY THE KEYS IT ACTUALLY SETS, AND THAT IS THE WHOLE FIX.\n *\n * This built an object literal holding BOTH keys every time — `undefined` when\n * the prop that drives them was absent — and it is spread LAST into\n * `nativeProps`, after `...rest`. So a consumer writing\n * `<Text numberOfLines={1}>` had its value silently OVERWRITTEN WITH\n * `undefined` on every render. The prop was accepted by the types, passed\n * through `useSeparator`, and destroyed one line before it reached React\n * Native.\n *\n * ⛔ IT IS A SILENT FAILURE, WHICH IS WHY IT SURVIVED. Nothing warns, nothing\n * throws, and the call site reads correctly — so a header that says\n * `numberOfLines={1}` wraps to two lines and the only way to find out is to\n * look at a device. AlphaMatch's client job-detail header did exactly that: a\n * two-line title overlapping its own subtitle and the bar beneath it, on a\n * screen whose source caps the title at one line. Two sessions read that source\n * and concluded a wrap was impossible.\n *\n * ⚠️ `whiteSpace: \"nowrap\"` AND `textOverflow` STILL WIN, deliberately. They are\n * this library's own way of asking for the same thing, and a consumer using both\n * is asking twice; the library prop is the more specific statement and stays\n * last. What changes is that ABSENT no longer means `undefined` — it means the\n * key is not there at all, so the consumer's value survives.\n *\n * ⚠️ NATIVE ONLY. The web twin writes CSS `textOverflow`/`whiteSpace` straight\n * into `style` and has no `numberOfLines` to clobber, so it never had this.\n */\nconst mapTextOverflowProps = (props: ITextComponent) => {\n const overflow: {\n numberOfLines?: number;\n ellipsizeMode?: \"head\" | \"middle\" | \"tail\" | \"clip\";\n } = {};\n\n if (props.whiteSpace === \"nowrap\") {\n overflow.numberOfLines = 1;\n }\n\n if (props.textOverflow === \"ellipsis\") {\n overflow.ellipsizeMode = \"tail\";\n }\n\n if (props.textOverflow === \"clip\") {\n overflow.ellipsizeMode = \"clip\";\n }\n\n return overflow;\n};\n\nconst Text: React.FC<ITextComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"p\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n const overflowProps = mapTextOverflowProps(props);\n\n // App-wide font: read from theme.fonts.body so consumers overriding\n // via `extendTheme({ fonts: { body: 'SpaceMono' } })` see the font on\n // every Text without per-call wiring. RN does not propagate fontFamily\n // through View parents, so this default is applied at the Text element\n // itself. Per-instance `style.fontFamily` (passed through cssProps via\n // useSeparator) takes precedence because ResponsiveElement merges in\n // user style after additionalStyles.\n // TODO: apply the same default to Heading (theme.fonts.heading), and\n // to any RN <Text> rendered outside this primitive (e.g. inside\n // Button labels, FormControlHelperText, custom widgets).\n const fontFamily = typeof theme.fonts.body === 'string' ? theme.fonts.body : undefined;\n\n /*\n * ⛔ THE FONT SIZE IS READ FROM THE `style` PROP TOO, AND THAT IS THE FIX.\n * Device-reported in Arabic, 19 September 2026: the confirm dialog's bold\n * heading was CLIPPED ALONG ITS TOP EDGE while the body and button beneath\n * it read perfectly.\n *\n * ⛔ THE OLD LINE ASKED ONLY `cssProps.fontSize` — the font size passed as a\n * PROP. A consumer that sizes its text through `style={{fontSize: 22}}`,\n * which is how every StyleSheet in this library does it, was invisible to\n * it. The hook then fell back to the SIZE TOKEN, which with no `size` prop\n * is `md` (~16px), and returned a line height of about 24.\n *\n * ⛔ SO IT DID NOT FAIL TO HELP — IT MADE THINGS WORSE, CONFIDENTLY. 24px of\n * line box was written into `additionalStyles` for text actually rendering\n * at 22px and 24px. `ConfirmDialog.sheetHeader` is fontSize 24, so its\n * ratio came out at exactly 1.0 — TIGHTER than the natural line box the\n * code was there to loosen.\n *\n * ⚠️ AND THAT IS PRECISELY WHY ONE DIALOG SHOWED BOTH BEHAVIOURS AT ONCE.\n * `ResponsiveElement` appends the consumer's `style` AFTER these\n * `additionalStyles`, so a style that names its own `lineHeight` wins and a\n * style that does not inherits the wrong number. In that file both MESSAGE\n * styles set a lineHeight and neither HEADER style does — messages legible,\n * headings clipped, one component, one render.\n *\n * ⚠️ IT IS STILL `undefined` IN LTR, so no English layout moves. A flatten\n * is needed because `style` may be an array, a StyleSheet id, or a plain\n * object, and only `StyleSheet.flatten` reads all three.\n */\n const styleFontSize = (() => {\n const flat = StyleSheet.flatten((nativeProps as any)?.style) as\n | {fontSize?: unknown}\n | undefined;\n return typeof flat?.fontSize === 'number' ? flat.fontSize : undefined;\n })();\n\n // RTL: give Arabic glyphs vertical headroom so they aren't clipped at the\n // top. undefined in LTR — the font's natural line-height (English unchanged).\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number'\n ? (cssProps as any).fontSize\n : styleFontSize,\n );\n\n return (\n <ResponsiveElement\n as=\"Text\"\n cssProps={{...cssProps}}\n additionalStyles={{\n padding: 0,\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n as,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...overflowProps\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Text;\n"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../../src/primitives/Text/index.native.tsx"],"sourcesContent":["import React from \"react\";\nimport { StyleSheet } from \"react-native\";\nimport { ResponsiveElement, useSeparator } from \"../../factory\";\nimport type {ITextComponent} from \"@lmb-it/kitsconcerto-types\";\nimport { useKitsTheme } from \"../../contexts/Theme\";\nimport useRtlLineHeight from \"../../hooks/useRtlLineHeight\";\n\nconst mapAsToSize: Record<string, ITextComponent[\"size\"]> = {\n small: \"sm\",\n label: \"sm\",\n span: \"md\",\n p: \"md\",\n};\n\n/**\n * ⛔ IT RETURNS ONLY THE KEYS IT ACTUALLY SETS, AND THAT IS THE WHOLE FIX.\n *\n * This built an object literal holding BOTH keys every time — `undefined` when\n * the prop that drives them was absent — and it is spread LAST into\n * `nativeProps`, after `...rest`. So a consumer writing\n * `<Text numberOfLines={1}>` had its value silently OVERWRITTEN WITH\n * `undefined` on every render. The prop was accepted by the types, passed\n * through `useSeparator`, and destroyed one line before it reached React\n * Native.\n *\n * ⛔ IT IS A SILENT FAILURE, WHICH IS WHY IT SURVIVED. Nothing warns, nothing\n * throws, and the call site reads correctly — so a header that says\n * `numberOfLines={1}` wraps to two lines and the only way to find out is to\n * look at a device. AlphaMatch's client job-detail header did exactly that: a\n * two-line title overlapping its own subtitle and the bar beneath it, on a\n * screen whose source caps the title at one line. Two sessions read that source\n * and concluded a wrap was impossible.\n *\n * ⚠️ `whiteSpace: \"nowrap\"` AND `textOverflow` STILL WIN, deliberately. They are\n * this library's own way of asking for the same thing, and a consumer using both\n * is asking twice; the library prop is the more specific statement and stays\n * last. What changes is that ABSENT no longer means `undefined` — it means the\n * key is not there at all, so the consumer's value survives.\n *\n * ⚠️ NATIVE ONLY. The web twin writes CSS `textOverflow`/`whiteSpace` straight\n * into `style` and has no `numberOfLines` to clobber, so it never had this.\n */\nconst mapTextOverflowProps = (props: ITextComponent) => {\n const overflow: {\n numberOfLines?: number;\n ellipsizeMode?: \"head\" | \"middle\" | \"tail\" | \"clip\";\n } = {};\n\n if (props.whiteSpace === \"nowrap\") {\n overflow.numberOfLines = 1;\n }\n\n if (props.textOverflow === \"ellipsis\") {\n overflow.ellipsizeMode = \"tail\";\n }\n\n if (props.textOverflow === \"clip\") {\n overflow.ellipsizeMode = \"clip\";\n }\n\n return overflow;\n};\n\nconst Text: React.FC<ITextComponent> = (props) => {\n const { theme } = useKitsTheme();\n const { cssProps, nativeProps } = useSeparator<any>(props);\n const {\n as = \"p\",\n size,\n children,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...rest\n } = nativeProps;\n\n const resolvedSize = size || mapAsToSize[as] || \"md\";\n\n const overflowProps = mapTextOverflowProps(props);\n\n // App-wide font: read from theme.fonts.body so consumers overriding\n // via `extendTheme({ fonts: { body: 'SpaceMono' } })` see the font on\n // every Text without per-call wiring. RN does not propagate fontFamily\n // through View parents, so this default is applied at the Text element\n // itself. Per-instance `style.fontFamily` (passed through cssProps via\n // useSeparator) takes precedence because ResponsiveElement merges in\n // user style after additionalStyles.\n // TODO: apply the same default to Heading (theme.fonts.heading), and\n // to any RN <Text> rendered outside this primitive (e.g. inside\n // Button labels, FormControlHelperText, custom widgets).\n const fontFamily = typeof theme.fonts.body === 'string' ? theme.fonts.body : undefined;\n\n /*\n * ⛔ THE FONT SIZE IS READ FROM THE `style` PROP TOO, AND THAT IS THE FIX.\n * Device-reported in Arabic, 19 September 2026: the confirm dialog's bold\n * heading was CLIPPED ALONG ITS TOP EDGE while the body and button beneath\n * it read perfectly.\n *\n * ⛔ THE OLD LINE ASKED ONLY `cssProps.fontSize` — the font size passed as a\n * PROP. A consumer that sizes its text through `style={{fontSize: 22}}`,\n * which is how every StyleSheet in this library does it, was invisible to\n * it. The hook then fell back to the SIZE TOKEN, which with no `size` prop\n * is `md` (~16px), and returned a line height of about 24.\n *\n * ⛔ SO IT DID NOT FAIL TO HELP — IT MADE THINGS WORSE, CONFIDENTLY. 24px of\n * line box was written into `additionalStyles` for text actually rendering\n * at 22px and 24px. `ConfirmDialog.sheetHeader` is fontSize 24, so its\n * ratio came out at exactly 1.0 — TIGHTER than the natural line box the\n * code was there to loosen.\n *\n * ⚠️ AND THAT IS PRECISELY WHY ONE DIALOG SHOWED BOTH BEHAVIOURS AT ONCE.\n * `ResponsiveElement` appends the consumer's `style` AFTER these\n * `additionalStyles`, so a style that names its own `lineHeight` wins and a\n * style that does not inherits the wrong number. In that file both MESSAGE\n * styles set a lineHeight and neither HEADER style does — messages legible,\n * headings clipped, one component, one render.\n *\n * ⚠️ IT IS STILL `undefined` IN LTR, so no English layout moves. A flatten\n * is needed because `style` may be an array, a StyleSheet id, or a plain\n * object, and only `StyleSheet.flatten` reads all three.\n */\n const styleFontSize = (() => {\n const flat = StyleSheet.flatten((nativeProps as any)?.style) as\n | {fontSize?: unknown}\n | undefined;\n return typeof flat?.fontSize === 'number' ? flat.fontSize : undefined;\n })();\n\n // RTL: give Arabic glyphs vertical headroom so they aren't clipped at the\n // top. undefined in LTR — the font's natural line-height (English unchanged).\n const rtlLineHeight = useRtlLineHeight(\n resolvedSize as string,\n typeof (cssProps as any)?.fontSize === 'number'\n ? (cssProps as any).fontSize\n : styleFontSize,\n );\n\n return (\n <ResponsiveElement\n as=\"Text\"\n cssProps={{...cssProps}}\n additionalStyles={{\n padding: 0,\n ...(fontFamily ? { fontFamily } : {}),\n ...(rtlLineHeight != null ? { lineHeight: rtlLineHeight } : {}),\n }}\n nativeProps={{\n ...rest,\n as,\n size: resolvedSize,\n isTruncated,\n bold,\n underline,\n strikeThrough,\n sub,\n italic,\n highlight,\n ...overflowProps\n }}\n >\n {children}\n </ResponsiveElement>\n );\n};\n\nexport default Text;\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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