@lmb-it/kitsconcerto-native 0.1.252 → 0.1.254

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/components/Banner/banner.cjs +16 -6
  2. package/components/Banner/banner.cjs.map +1 -1
  3. package/components/Banner/banner.js +17 -7
  4. package/components/Banner/banner.js.map +1 -1
  5. package/components/BottomTabBar/index.cjs +3 -1
  6. package/components/BottomTabBar/index.cjs.map +1 -1
  7. package/components/BottomTabBar/index.js +3 -1
  8. package/components/BottomTabBar/index.js.map +1 -1
  9. package/components/Chip/index.cjs +13 -1
  10. package/components/Chip/index.cjs.map +1 -1
  11. package/components/Chip/index.js +13 -1
  12. package/components/Chip/index.js.map +1 -1
  13. package/components/MessageComposer/index.cjs +5 -2
  14. package/components/MessageComposer/index.cjs.map +1 -1
  15. package/components/MessageComposer/index.js +5 -2
  16. package/components/MessageComposer/index.js.map +1 -1
  17. package/components/TypingIndicator/index.cjs +3 -1
  18. package/components/TypingIndicator/index.cjs.map +1 -1
  19. package/components/TypingIndicator/index.js +3 -1
  20. package/components/TypingIndicator/index.js.map +1 -1
  21. package/hooks/useSeverityColors.cjs +14 -18
  22. package/hooks/useSeverityColors.cjs.map +1 -1
  23. package/hooks/useSeverityColors.js +14 -18
  24. package/hooks/useSeverityColors.js.map +1 -1
  25. package/index.d.ts +34 -0
  26. package/locale/ar.json.cjs +4 -1
  27. package/locale/ar.json.cjs.map +1 -1
  28. package/locale/ar.json.js +4 -2
  29. package/locale/ar.json.js.map +1 -1
  30. package/locale/en.json.cjs +4 -1
  31. package/locale/en.json.cjs.map +1 -1
  32. package/locale/en.json.js +4 -2
  33. package/locale/en.json.js.map +1 -1
  34. package/package.json +1 -1
  35. package/primitives/Divider/index.cjs +3 -1
  36. package/primitives/Divider/index.cjs.map +1 -1
  37. package/primitives/Divider/index.js +3 -1
  38. package/primitives/Divider/index.js.map +1 -1
  39. package/primitives/Text/index.cjs +6 -2
  40. package/primitives/Text/index.cjs.map +1 -1
  41. package/primitives/Text/index.js +6 -2
  42. package/primitives/Text/index.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useSeverityColors.js","sources":["../../../src/hooks/useSeverityColors.ts"],"sourcesContent":["import {useMemo} from 'react';\nimport {useKitsTheme} from '../contexts/Theme';\nimport type {Severity, ISeverityColorSlots} from '@lmb-it/kitsconcerto-types';\n\nexport interface ResolvedSeverityColors {\n solid: string;\n solidText: string;\n bgTint: string;\n iconFg: string;\n iconBg: string;\n text: string;\n border: string;\n}\n\nconst WHITE = '#ffffff';\n\n/**\n * Resolves all severity color slots for a given severity using the current theme.\n * All slot values go through resolveToken() — so they support:\n * - Raw values: '#ff0000', 'black', 'rgb(..)'\n * - Semantic tokens: 'primary', 'danger'\n * - Dot-notation: 'red.700', 'blue.500'\n * - Prefixed tokens: '$spacing.4'\n *\n * solidText defaults to white if not explicitly set by the consumer.\n */\nexport function useSeverityColors(severity: Severity): ResolvedSeverityColors {\n const {theme, resolveToken, colorMode} = useKitsTheme();\n\n return useMemo(() => {\n const slots: ISeverityColorSlots = theme.severity?.[severity] ?? theme.severity?.secondary;\n if (!slots) {\n const fallback = resolveToken('gray.500');\n return {solid: fallback, solidText: WHITE, bgTint: fallback, iconFg: fallback, iconBg: fallback, text: fallback, border: fallback};\n }\n\n // solidText: resolve if consumer provided it, otherwise default to white\n const resolveSolidText = () =>\n slots.solidText ? resolveToken(slots.solidText) : WHITE;\n\n // Brand severity: solid/border/iconFg dynamically follow the primary token\n if (severity === 'brand') {\n const primary = resolveToken('primary');\n if (colorMode === 'dark') {\n const swapShade = (token: string, target: string) =>\n resolveToken(token.replace(/\\.\\d+$/, `.${target}`));\n return {\n solid: primary,\n solidText: resolveSolidText(),\n bgTint: swapShade(slots.solid, '900'),\n iconFg: primary,\n iconBg: swapShade(slots.solid, '800'),\n text: swapShade(slots.solid, '200'),\n border: primary,\n };\n }\n return {\n solid: primary,\n solidText: resolveSolidText(),\n bgTint: resolveToken(slots.bgTint),\n iconFg: primary,\n iconBg: resolveToken(slots.iconBg),\n text: resolveToken(slots.text),\n border: primary,\n };\n }\n\n if (colorMode === 'dark') {\n const swapShade = (token: string, target: string) => {\n return resolveToken(token.replace(/\\.\\d+$/, `.${target}`));\n };\n return {\n solid: resolveToken(slots.solid),\n solidText: resolveSolidText(),\n bgTint: swapShade(slots.solid, '900'),\n iconFg: swapShade(slots.solid, '300'),\n iconBg: swapShade(slots.solid, '800'),\n text: swapShade(slots.solid, '200'),\n border: resolveToken(slots.border),\n };\n }\n\n return {\n solid: resolveToken(slots.solid),\n solidText: resolveSolidText(),\n bgTint: resolveToken(slots.bgTint),\n iconFg: resolveToken(slots.iconFg),\n iconBg: resolveToken(slots.iconBg),\n text: resolveToken(slots.text),\n border: resolveToken(slots.border),\n };\n }, [theme.severity, severity, resolveToken, colorMode]);\n}\n\n/**\n * Returns the full resolved map for all severities.\n */\nexport function useAllSeverityColors(): Record<Severity, ResolvedSeverityColors> {\n const {theme, resolveToken, colorMode} = useKitsTheme();\n\n return useMemo(() => {\n const severities: Severity[] = ['success', 'info', 'warning', 'danger', 'help', 'secondary', 'brand'];\n const result = {} as Record<Severity, ResolvedSeverityColors>;\n const primary = resolveToken('primary');\n\n for (const key of severities) {\n const slots = theme.severity?.[key];\n if (!slots) continue;\n\n const isBrand = key === 'brand';\n const solidText = slots.solidText ? resolveToken(slots.solidText) : WHITE;\n\n if (colorMode === 'dark') {\n const swapShade = (token: string, target: string) => {\n return resolveToken(token.replace(/\\.\\d+$/, `.${target}`));\n };\n result[key] = {\n solid: isBrand ? primary : resolveToken(slots.solid),\n solidText,\n bgTint: swapShade(slots.solid, '900'),\n iconFg: isBrand ? primary : swapShade(slots.solid, '300'),\n iconBg: swapShade(slots.solid, '800'),\n text: swapShade(slots.solid, '200'),\n border: isBrand ? primary : resolveToken(slots.border),\n };\n } else {\n result[key] = {\n solid: isBrand ? primary : resolveToken(slots.solid),\n solidText,\n bgTint: resolveToken(slots.bgTint),\n iconFg: isBrand ? primary : resolveToken(slots.iconFg),\n iconBg: resolveToken(slots.iconBg),\n text: resolveToken(slots.text),\n border: isBrand ? primary : resolveToken(slots.border),\n };\n }\n }\n\n return result;\n }, [theme.severity, resolveToken, colorMode]);\n}\n"],"names":[],"mappings":";;;AAcA,MAAM,KAAA,GAAQ,SAAA;AAYP,SAAS,kBAAkB,QAAA,EAA4C;AAC1E,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,SAAA,KAAa,YAAA,EAAa;AAEtD,EAAA,OAAO,QAAQ,MAAM;AACjB,IAAA,MAAM,QAA6B,KAAA,CAAM,QAAA,GAAW,QAAQ,CAAA,IAAK,MAAM,QAAA,EAAU,SAAA;AACjF,IAAA,IAAI,CAAC,KAAA,EAAO;AACR,MAAA,MAAM,QAAA,GAAW,aAAa,UAAU,CAAA;AACxC,MAAA,OAAO,EAAC,KAAA,EAAO,QAAA,EAAU,SAAA,EAAW,OAAO,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAA,EAAU,IAAA,EAAM,QAAA,EAAU,QAAQ,QAAA,EAAQ;AAAA,IACrI;AAGA,IAAA,MAAM,mBAAmB,MACrB,KAAA,CAAM,YAAY,YAAA,CAAa,KAAA,CAAM,SAAS,CAAA,GAAI,KAAA;AAGtD,IAAA,IAAI,aAAa,OAAA,EAAS;AACtB,MAAA,MAAM,OAAA,GAAU,aAAa,SAAS,CAAA;AACtC,MAAA,IAAI,cAAc,MAAA,EAAQ;AACtB,QAAA,MAAM,SAAA,GAAY,CAAC,KAAA,EAAe,MAAA,KAC9B,YAAA,CAAa,KAAA,CAAM,OAAA,CAAQ,QAAA,EAAU,CAAA,CAAA,EAAI,MAAM,CAAA,CAAE,CAAC,CAAA;AACtD,QAAA,OAAO;AAAA,UACH,KAAA,EAAO,OAAA;AAAA,UACP,WAAW,gBAAA,EAAiB;AAAA,UAC5B,MAAA,EAAQ,SAAA,CAAU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IACJ;AAEA,IAAA,OAAO,MAAA;AAAA,EACX,GAAG,CAAC,KAAA,CAAM,QAAA,EAAU,YAAA,EAAc,SAAS,CAAC,CAAA;AAChD;;;;"}
1
+ {"version":3,"file":"useSeverityColors.js","sources":["../../../src/hooks/useSeverityColors.ts"],"sourcesContent":["import {useMemo} from 'react';\nimport {useKitsTheme} from '../contexts/Theme';\nimport type {Severity, ISeverityColorSlots} from '@lmb-it/kitsconcerto-types';\n\nexport interface ResolvedSeverityColors {\n solid: string;\n solidText: string;\n bgTint: string;\n iconFg: string;\n iconBg: string;\n text: string;\n border: string;\n}\n\nconst WHITE = '#ffffff';\n\n/**\n * Resolves all severity color slots for a given severity using the current theme.\n * All slot values go through resolveToken() — so they support:\n * - Raw values: '#ff0000', 'black', 'rgb(..)'\n * - Semantic tokens: 'primary', 'danger'\n * - Dot-notation: 'red.700', 'blue.500'\n * - Prefixed tokens: '$spacing.4'\n *\n * solidText defaults to white if not explicitly set by the consumer.\n */\n/**\n * ⛔ SHADE-SWAPPING ONLY WORKS ON A SHADED TOKEN, AND FOUR OF THIS LIBRARY'S\n * SEVEN SEVERITIES DO NOT HAVE ONE.\n *\n * Dark mode derives its tint and its text from the severity's `solid` value by\n * replacing the shade — `amber.500` → `amber.900` for the background and\n * `amber.200` for the text. That is only meaningful when `solid` LOOKS like\n * `name.NNN`. In `defaultTheme.ts` it often does not:\n *\n * brand brand.500 shaded → swap works\n * success green.500 shaded → swap works\n * secondary gray.500 shaded → swap works\n * danger #E3595B RAW HEX → swap is a no-op\n * warning #F59E0B RAW HEX → swap is a no-op\n * info #4F5BD5 RAW HEX → swap is a no-op\n * help #4F5BD5 RAW HEX → swap is a no-op\n *\n * ⛔ AND A NO-OP HERE IS NOT \"NO CHANGE\" — IT IS A COLLISION. The regex matches\n * nothing, so BOTH the background and the text resolve to the SAME raw hex, and\n * the text becomes invisible on its own background. Measured on the device\n * (AlphaMatch, Me tab, warning banner, dark): the action row was 6,923 sampled\n * pixels of #F59E0B with no text ink in it at all — the label and its reason\n * had vanished while the banner still looked like a banner.\n *\n * ⚠️ IT HITS THE FOUR SEVERITIES PEOPLE SEE MOST — errors, warnings, info and\n * help — and this hook is SHARED, not native-only, so web surfaces have it too.\n *\n * 💡 THE FALLBACK IS THE DESIGNED LIGHT PAIR. When there is no shade to swap,\n * the light slots are used instead: they are a pair someone chose to be legible\n * together, which is the one thing that must be true here. A dark-mode tint\n * would look better and is a palette decision, not a correctness one.\n */\nexport function useSeverityColors(severity: Severity): ResolvedSeverityColors {\n const {theme, resolveToken, colorMode} = useKitsTheme();\n\n return useMemo(() => {\n const slots: ISeverityColorSlots = theme.severity?.[severity] ?? theme.severity?.secondary;\n if (!slots) {\n const fallback = resolveToken('gray.500');\n return {solid: fallback, solidText: WHITE, bgTint: fallback, iconFg: fallback, iconBg: fallback, text: fallback, border: fallback};\n }\n\n // solidText: resolve if consumer provided it, otherwise default to white\n const resolveSolidText = () =>\n slots.solidText ? resolveToken(slots.solidText) : WHITE;\n\n // Brand severity: solid/border/iconFg dynamically follow the primary token\n if (severity === 'brand') {\n const primary = resolveToken('primary');\n if (colorMode === 'dark') {\n // Same shade-guard as below: a `solid` with no shade cannot be\n // swapped, and collapsing it would put the text on its own colour.\n const swapShade = (token: string, target: string, fallbackSlot: string) =>\n /\\.\\d+$/.test(token)\n ? resolveToken(token.replace(/\\.\\d+$/, `.${target}`))\n : resolveToken(fallbackSlot);\n return {\n solid: primary,\n solidText: resolveSolidText(),\n bgTint: swapShade(slots.solid, '900', slots.bgTint),\n iconFg: primary,\n iconBg: swapShade(slots.solid, '800', slots.iconBg),\n text: swapShade(slots.solid, '200', slots.text),\n border: primary,\n };\n }\n return {\n solid: primary,\n solidText: resolveSolidText(),\n bgTint: resolveToken(slots.bgTint),\n iconFg: primary,\n iconBg: resolveToken(slots.iconBg),\n text: resolveToken(slots.text),\n border: primary,\n };\n }\n\n if (colorMode === 'dark') {\n // `fallbackSlot` is used when `token` carries no shade to swap —\n // see the note above this function.\n const swapShade = (token: string, target: string, fallbackSlot: string) =>\n /\\.\\d+$/.test(token)\n ? resolveToken(token.replace(/\\.\\d+$/, `.${target}`))\n : resolveToken(fallbackSlot);\n return {\n solid: resolveToken(slots.solid),\n solidText: resolveSolidText(),\n bgTint: swapShade(slots.solid, '900', slots.bgTint),\n iconFg: swapShade(slots.solid, '300', slots.iconFg),\n iconBg: swapShade(slots.solid, '800', slots.iconBg),\n text: swapShade(slots.solid, '200', slots.text),\n border: resolveToken(slots.border),\n };\n }\n\n return {\n solid: resolveToken(slots.solid),\n solidText: resolveSolidText(),\n bgTint: resolveToken(slots.bgTint),\n iconFg: resolveToken(slots.iconFg),\n iconBg: resolveToken(slots.iconBg),\n text: resolveToken(slots.text),\n border: resolveToken(slots.border),\n };\n }, [theme.severity, severity, resolveToken, colorMode]);\n}\n\n/**\n * Returns the full resolved map for all severities.\n */\nexport function useAllSeverityColors(): Record<Severity, ResolvedSeverityColors> {\n const {theme, resolveToken, colorMode} = useKitsTheme();\n\n return useMemo(() => {\n const severities: Severity[] = ['success', 'info', 'warning', 'danger', 'help', 'secondary', 'brand'];\n const result = {} as Record<Severity, ResolvedSeverityColors>;\n const primary = resolveToken('primary');\n\n for (const key of severities) {\n const slots = theme.severity?.[key];\n if (!slots) continue;\n\n const isBrand = key === 'brand';\n const solidText = slots.solidText ? resolveToken(slots.solidText) : WHITE;\n\n if (colorMode === 'dark') {\n // Same shade-guard as useSeverityColors — four of the seven\n // default severities carry a raw hex, which cannot be swapped.\n const swapShade = (token: string, target: string, fallbackSlot: string) =>\n /\\.\\d+$/.test(token)\n ? resolveToken(token.replace(/\\.\\d+$/, `.${target}`))\n : resolveToken(fallbackSlot);\n result[key] = {\n solid: isBrand ? primary : resolveToken(slots.solid),\n solidText,\n bgTint: swapShade(slots.solid, '900', slots.bgTint),\n iconFg: isBrand ? primary : swapShade(slots.solid, '300', slots.iconFg),\n iconBg: swapShade(slots.solid, '800', slots.iconBg),\n text: swapShade(slots.solid, '200', slots.text),\n border: isBrand ? primary : resolveToken(slots.border),\n };\n } else {\n result[key] = {\n solid: isBrand ? primary : resolveToken(slots.solid),\n solidText,\n bgTint: resolveToken(slots.bgTint),\n iconFg: isBrand ? primary : resolveToken(slots.iconFg),\n iconBg: resolveToken(slots.iconBg),\n text: resolveToken(slots.text),\n border: isBrand ? primary : resolveToken(slots.border),\n };\n }\n }\n\n return result;\n }, [theme.severity, resolveToken, colorMode]);\n}\n"],"names":[],"mappings":";;;AAcA,MAAM,KAAA,GAAQ,SAAA;AA4CP,SAAS,kBAAkB,QAAA,EAA4C;AAC1E,EAAA,MAAM,EAAC,KAAA,EAAO,YAAA,EAAc,SAAA,KAAa,YAAA,EAAa;AAEtD,EAAA,OAAO,QAAQ,MAAM;AACjB,IAAA,MAAM,QAA6B,KAAA,CAAM,QAAA,GAAW,QAAQ,CAAA,IAAK,MAAM,QAAA,EAAU,SAAA;AACjF,IAAA,IAAI,CAAC,KAAA,EAAO;AACR,MAAA,MAAM,QAAA,GAAW,aAAa,UAAU,CAAA;AACxC,MAAA,OAAO,EAAC,KAAA,EAAO,QAAA,EAAU,SAAA,EAAW,OAAO,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAA,EAAU,MAAA,EAAQ,QAAA,EAAU,IAAA,EAAM,QAAA,EAAU,QAAQ,QAAA,EAAQ;AAAA,IACrI;AAGA,IAAA,MAAM,mBAAmB,MACrB,KAAA,CAAM,YAAY,YAAA,CAAa,KAAA,CAAM,SAAS,CAAA,GAAI,KAAA;AAGtD,IAAA,IAAI,aAAa,OAAA,EAAS;AACtB,MAAA,MAAM,OAAA,GAAU,aAAa,SAAS,CAAA;AACtC,MAAA,IAAI,cAAc,MAAA,EAAQ;AAGtB,QAAA,MAAM,YAAY,CAAC,KAAA,EAAe,QAAgB,YAAA,KAC9C,QAAA,CAAS,KAAK,KAAK,CAAA,GACb,aAAa,KAAA,CAAM,OAAA,CAAQ,UAAU,CAAA,CAAA,EAAI,MAAM,EAAE,CAAC,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A,CAAa,KAAA,CAAM,MAAM,CAAA;AAAA,UACjC,MAAA,EAAQ,OAAA,GAAU,OAAA,GAAU,YAAA,CAAa,MAAM,MAAM,CAAA;AAAA,UACrD,MAAA,EAAQ,YAAA,CAAa,KAAA,CAAM,MAAM,CAAA;AAAA,UACjC,IAAA,EAAM,YAAA,CAAa,KAAA,CAAM,IAAI,CAAA;AAAA,UAC7B,MAAA,EAAQ,OAAA,GAAU,OAAA,GAAU,YAAA,CAAa,MAAM,MAAM;AAAA,SACzD;AAAA,MACJ;AAAA,IACJ;AAEA,IAAA,OAAO,MAAA;AAAA,EACX,GAAG,CAAC,KAAA,CAAM,QAAA,EAAU,YAAA,EAAc,SAAS,CAAC,CAAA;AAChD;;;;"}
package/index.d.ts CHANGED
@@ -9138,6 +9138,38 @@ export interface ResolvedSeverityColors {
9138
9138
  *
9139
9139
  * solidText defaults to white if not explicitly set by the consumer.
9140
9140
  */
9141
+ /**
9142
+ * ⛔ SHADE-SWAPPING ONLY WORKS ON A SHADED TOKEN, AND FOUR OF THIS LIBRARY'S
9143
+ * SEVEN SEVERITIES DO NOT HAVE ONE.
9144
+ *
9145
+ * Dark mode derives its tint and its text from the severity's `solid` value by
9146
+ * replacing the shade — `amber.500` → `amber.900` for the background and
9147
+ * `amber.200` for the text. That is only meaningful when `solid` LOOKS like
9148
+ * `name.NNN`. In `defaultTheme.ts` it often does not:
9149
+ *
9150
+ * brand brand.500 shaded → swap works
9151
+ * success green.500 shaded → swap works
9152
+ * secondary gray.500 shaded → swap works
9153
+ * danger #E3595B RAW HEX → swap is a no-op
9154
+ * warning #F59E0B RAW HEX → swap is a no-op
9155
+ * info #4F5BD5 RAW HEX → swap is a no-op
9156
+ * help #4F5BD5 RAW HEX → swap is a no-op
9157
+ *
9158
+ * ⛔ AND A NO-OP HERE IS NOT "NO CHANGE" — IT IS A COLLISION. The regex matches
9159
+ * nothing, so BOTH the background and the text resolve to the SAME raw hex, and
9160
+ * the text becomes invisible on its own background. Measured on the device
9161
+ * (AlphaMatch, Me tab, warning banner, dark): the action row was 6,923 sampled
9162
+ * pixels of #F59E0B with no text ink in it at all — the label and its reason
9163
+ * had vanished while the banner still looked like a banner.
9164
+ *
9165
+ * ⚠️ IT HITS THE FOUR SEVERITIES PEOPLE SEE MOST — errors, warnings, info and
9166
+ * help — and this hook is SHARED, not native-only, so web surfaces have it too.
9167
+ *
9168
+ * 💡 THE FALLBACK IS THE DESIGNED LIGHT PAIR. When there is no shade to swap,
9169
+ * the light slots are used instead: they are a pair someone chose to be legible
9170
+ * together, which is the one thing that must be true here. A dark-mode tint
9171
+ * would look better and is a palette decision, not a correctness one.
9172
+ */
9141
9173
  declare function useSeverityColors(severity: Severity): ResolvedSeverityColors;
9142
9174
  /**
9143
9175
  * Returns the full resolved map for all severities.
@@ -9536,6 +9568,7 @@ declare const localeFiles: {
9536
9568
  rotateRight: string;
9537
9569
  rotateLeft: string;
9538
9570
  };
9571
+ actionRequired: string;
9539
9572
  };
9540
9573
  bg: {
9541
9574
  accept: string;
@@ -10309,6 +10342,7 @@ declare const localeFiles: {
10309
10342
  rotateRight: string;
10310
10343
  rotateLeft: string;
10311
10344
  };
10345
+ actionRequired: string;
10312
10346
  };
10313
10347
  es: {
10314
10348
  startsWith: string;
@@ -217,6 +217,7 @@ var aria = {
217
217
  rotateRight: "تدوير بإتجاه اليمين",
218
218
  rotateLeft: "تدوير بأتجاه اليسار"
219
219
  };
220
+ var actionRequired = "إجراء مطلوب";
220
221
  var ar = {
221
222
  startsWith: startsWith,
222
223
  contains: contains,
@@ -323,10 +324,12 @@ var ar = {
323
324
  after: after,
324
325
  before: before,
325
326
  not: not,
326
- aria: aria
327
+ aria: aria,
328
+ actionRequired: actionRequired
327
329
  };
328
330
 
329
331
  exports.accept = accept;
332
+ exports.actionRequired = actionRequired;
330
333
  exports.addCategory = addCategory;
331
334
  exports.addImages = addImages;
332
335
  exports.addItem = addItem;
@@ -1 +1 @@
1
- {"version":3,"file":"ar.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ar.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/locale/ar.json.js CHANGED
@@ -213,6 +213,7 @@ var aria = {
213
213
  rotateRight: "تدوير بإتجاه اليمين",
214
214
  rotateLeft: "تدوير بأتجاه اليسار"
215
215
  };
216
+ var actionRequired = "إجراء مطلوب";
216
217
  var ar = {
217
218
  startsWith: startsWith,
218
219
  contains: contains,
@@ -319,8 +320,9 @@ var ar = {
319
320
  after: after,
320
321
  before: before,
321
322
  not: not,
322
- aria: aria
323
+ aria: aria,
324
+ actionRequired: actionRequired
323
325
  };
324
326
 
325
- export { accept, addCategory, addImages, addItem, addRule, after, am, any, apply, aria, before, between, cancel, changeImage, choose, chooseDate, chooseFile, chooseImage, chooseMonth, chooseYear, clear, clickOrDragToUpload, completed, contains, custom, dateAfter, dateBefore, dateFormat, dateIs, dateIsNot, dayNames, dayNamesMin, dayNamesShort, ar as default, _arbitrary0 as delete, dragFilesHere, edit, emptyFileUploadMessage, emptyFilterMessage, emptyMessage, emptySearchMessage, emptySelectionMessage, endsWith, equal, equals, fileSizeTypes, filesBeingDropped, filesSelected, filter, firstDayOfWeek, generatePhoto, greaterThan, greaterThanOrEqualTo, gt, gte, include, lessThan, lessThanOrEqualTo, lt, lte, matchAll, matchAny, maximumAllowedFiles, medium, monthNames, monthNamesShort, nextDecade, nextHour, nextMinute, nextMonth, nextSecond, nextYear, noFilter, not, notContains, notEquals, now, openMenu, password, passwordPrompt, pending, pm, prevDecade, prevHour, prevMinute, prevMonth, prevSecond, prevYear, profile, reject, remove, removeRule, save, searchMessage, selectionMessage, settings, showMonthAfterYear, signOut, startsWith, strong, tapToUpload, today, toggleColorMode, typeNotSupported, upload, weak, weekHeader };
327
+ export { accept, actionRequired, addCategory, addImages, addItem, addRule, after, am, any, apply, aria, before, between, cancel, changeImage, choose, chooseDate, chooseFile, chooseImage, chooseMonth, chooseYear, clear, clickOrDragToUpload, completed, contains, custom, dateAfter, dateBefore, dateFormat, dateIs, dateIsNot, dayNames, dayNamesMin, dayNamesShort, ar as default, _arbitrary0 as delete, dragFilesHere, edit, emptyFileUploadMessage, emptyFilterMessage, emptyMessage, emptySearchMessage, emptySelectionMessage, endsWith, equal, equals, fileSizeTypes, filesBeingDropped, filesSelected, filter, firstDayOfWeek, generatePhoto, greaterThan, greaterThanOrEqualTo, gt, gte, include, lessThan, lessThanOrEqualTo, lt, lte, matchAll, matchAny, maximumAllowedFiles, medium, monthNames, monthNamesShort, nextDecade, nextHour, nextMinute, nextMonth, nextSecond, nextYear, noFilter, not, notContains, notEquals, now, openMenu, password, passwordPrompt, pending, pm, prevDecade, prevHour, prevMinute, prevMonth, prevSecond, prevYear, profile, reject, remove, removeRule, save, searchMessage, selectionMessage, settings, showMonthAfterYear, signOut, startsWith, strong, tapToUpload, today, toggleColorMode, typeNotSupported, upload, weak, weekHeader };
326
328
  //# sourceMappingURL=ar.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ar.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"ar.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -217,6 +217,7 @@ var aria = {
217
217
  rotateRight: "Rotate Right",
218
218
  rotateLeft: "Rotate Left"
219
219
  };
220
+ var actionRequired = "Action required";
220
221
  var en = {
221
222
  startsWith: startsWith,
222
223
  contains: contains,
@@ -323,10 +324,12 @@ var en = {
323
324
  after: after,
324
325
  before: before,
325
326
  not: not,
326
- aria: aria
327
+ aria: aria,
328
+ actionRequired: actionRequired
327
329
  };
328
330
 
329
331
  exports.accept = accept;
332
+ exports.actionRequired = actionRequired;
330
333
  exports.addCategory = addCategory;
331
334
  exports.addImages = addImages;
332
335
  exports.addItem = addItem;
@@ -1 +1 @@
1
- {"version":3,"file":"en.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en.json.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/locale/en.json.js CHANGED
@@ -213,6 +213,7 @@ var aria = {
213
213
  rotateRight: "Rotate Right",
214
214
  rotateLeft: "Rotate Left"
215
215
  };
216
+ var actionRequired = "Action required";
216
217
  var en = {
217
218
  startsWith: startsWith,
218
219
  contains: contains,
@@ -319,8 +320,9 @@ var en = {
319
320
  after: after,
320
321
  before: before,
321
322
  not: not,
322
- aria: aria
323
+ aria: aria,
324
+ actionRequired: actionRequired
323
325
  };
324
326
 
325
- export { accept, addCategory, addImages, addItem, addRule, after, am, any, apply, aria, before, between, cancel, changeImage, choose, chooseDate, chooseFile, chooseImage, chooseMonth, chooseYear, clear, clickOrDragToUpload, completed, contains, custom, dateAfter, dateBefore, dateFormat, dateIs, dateIsNot, dayNames, dayNamesMin, dayNamesShort, en as default, _arbitrary0 as delete, dragFilesHere, edit, emptyFileUploadMessage, emptyFilterMessage, emptyMessage, emptySearchMessage, emptySelectionMessage, endsWith, equal, equals, fileSizeTypes, filesBeingDropped, filesSelected, filter, firstDayOfWeek, generatePhoto, greaterThan, greaterThanOrEqualTo, gt, gte, include, lessThan, lessThanOrEqualTo, lt, lte, matchAll, matchAny, maximumAllowedFiles, medium, monthNames, monthNamesShort, nextDecade, nextHour, nextMinute, nextMonth, nextSecond, nextYear, noFilter, not, notContains, notEquals, now, openMenu, password, passwordPrompt, pending, pm, prevDecade, prevHour, prevMinute, prevMonth, prevSecond, prevYear, profile, reject, remove, removeRule, save, searchMessage, selectionMessage, settings, showMonthAfterYear, signOut, startsWith, strong, tapToUpload, today, toggleColorMode, typeNotSupported, upload, weak, weekHeader };
327
+ export { accept, actionRequired, addCategory, addImages, addItem, addRule, after, am, any, apply, aria, before, between, cancel, changeImage, choose, chooseDate, chooseFile, chooseImage, chooseMonth, chooseYear, clear, clickOrDragToUpload, completed, contains, custom, dateAfter, dateBefore, dateFormat, dateIs, dateIsNot, dayNames, dayNamesMin, dayNamesShort, en as default, _arbitrary0 as delete, dragFilesHere, edit, emptyFileUploadMessage, emptyFilterMessage, emptyMessage, emptySearchMessage, emptySelectionMessage, endsWith, equal, equals, fileSizeTypes, filesBeingDropped, filesSelected, filter, firstDayOfWeek, generatePhoto, greaterThan, greaterThanOrEqualTo, gt, gte, include, lessThan, lessThanOrEqualTo, lt, lte, matchAll, matchAny, maximumAllowedFiles, medium, monthNames, monthNamesShort, nextDecade, nextHour, nextMinute, nextMonth, nextSecond, nextYear, noFilter, not, notContains, notEquals, now, openMenu, password, passwordPrompt, pending, pm, prevDecade, prevHour, prevMinute, prevMonth, prevSecond, prevYear, profile, reject, remove, removeRule, save, searchMessage, selectionMessage, settings, showMonthAfterYear, signOut, startsWith, strong, tapToUpload, today, toggleColorMode, typeNotSupported, upload, weak, weekHeader };
326
328
  //# sourceMappingURL=en.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"en.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmb-it/kitsconcerto-native",
3
- "version": "0.1.252",
3
+ "version": "0.1.254",
4
4
  "description": "KitsConcerto — Native (React Native) UI components",
5
5
  "main": "index.cjs",
6
6
  "module": "index.js",
@@ -85,11 +85,13 @@ require('../../apps/mobile/src/Core/RadioButton/index.cjs');
85
85
  require('../../apps/mobile/src/Core/Input/index.cjs');
86
86
  require('../../apps/mobile/src/Core/Input/Field.cjs');
87
87
  require('../../apps/mobile/src/Core/Input/Slot.cjs');
88
+ var useRtlLineHeight = require('../../hooks/useRtlLineHeight.cjs');
88
89
  var useThemedFont = require('../../hooks/useThemedFont.cjs');
89
90
  var KitsThemeProvider_native = require('../../contexts/Theme/KitsThemeProvider.cjs');
90
91
 
91
92
  const Divider = (props) => {
92
93
  const { nativeProps } = useSeparator.default(props);
94
+ const rtlLineHeight = useRtlLineHeight.default(void 0, 14);
93
95
  const {
94
96
  align = "center",
95
97
  children,
@@ -151,7 +153,7 @@ const Divider = (props) => {
151
153
  { backgroundColor: dividerColor },
152
154
  align === "left" || align === "top" ? { flex: 0, width: isHorizontal ? 24 : void 0, height: !isHorizontal ? 24 : void 0 } : { flex: 1 }
153
155
  ] }),
154
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.contentText, { color: resolveToken("text-secondary") }, contentFont ? { fontFamily: contentFont } : null], children }),
156
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles.contentText, { color: resolveToken("text-secondary") }, rtlLineHeight != null ? { lineHeight: rtlLineHeight } : null, contentFont ? { fontFamily: contentFont } : null], children }),
155
157
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
156
158
  isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,
157
159
  { backgroundColor: dividerColor },
@@ -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 {useKitsTheme} from '../../contexts/Theme';\nimport useThemedFont from '../../hooks/useThemedFont';\n\nconst Divider: React.FC<IDividerComponent> = (props) => {\n const {nativeProps} = useSeparator<any>(props);\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')}, 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","useKitsTheme","useThemedFont","jsx","View","StyleSheet","jsxs","Text"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,OAAA,GAAuC,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAC,WAAA,EAAW,GAAIA,oBAAA,CAAkB,KAAK,CAAA;AAC7C,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,GAAIC,qCAAA,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,GAAcC,sBAAc,MAAM,CAAA;AAExC,EAAA,MAAM,eAAe,MAAA,KAAW,YAAA;AAEhC,EAAA,IAAI,QAAA,EAAU;AACV,IAAA,uBACIC,cAAA;AAAA,MAACC,gBAAA;AAAA,MAAA;AAAA,QACI,GAAG,IAAA;AAAA,QACJ,KAAA,EAAO;AAAA,UACH,YAAA,GAAe,MAAA,CAAO,UAAA,GAAa,MAAA,CAAO,QAAA;AAAA,UAC1C,IAAA,CAAK;AAAA;AACT;AAAA,KACJ;AAAA,EAER;AAEA,EAAkB,eACZ,CAAC,MAAA,CAAO,gBAAgB,EAAC,iBAAA,EAAmB,YAAY,iBAAA,EAAmB,YAAA,EA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,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,QAAQA,sBAAA,CAAW,aAAA;AAAA,IACnB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,mBAAA,EAAqB;AAAA,IACjB,OAAOA,sBAAA,CAAW,aAAA;AAAA,IAClB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,WAAA,EAAa;AAAA,IACT,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
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,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,GAAIC,qCAAA,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,GAAcC,sBAAc,MAAM,CAAA;AAExC,EAAA,MAAM,eAAe,MAA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;AAER;AAEA,MAAM,MAAA,GAASC,uBAAW,MAAA,CAAO;AAAA,EAC7B,UAAA,EAAY;AAAA,IACR,KAAA,EAAO,MAAA;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,QAAQA,sBAAA,CAAW,aAAA;AAAA,IACnB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,mBAAA,EAAqB;AAAA,IACjB,OAAOA,sBAAA,CAAW,aAAA;AAAA,IAClB,IAAA,EAAM;AAAA,GACV;AAAA,EACA,WAAA,EAAa;AAAA,IACT,QAAA,EAAU;AAAA;AAElB,CAAC,CAAA;;;;"}
@@ -81,11 +81,13 @@ import '../../apps/mobile/src/Core/RadioButton/index.js';
81
81
  import '../../apps/mobile/src/Core/Input/index.js';
82
82
  import '../../apps/mobile/src/Core/Input/Field.js';
83
83
  import '../../apps/mobile/src/Core/Input/Slot.js';
84
+ import useRtlLineHeight from '../../hooks/useRtlLineHeight.js';
84
85
  import useThemedFont from '../../hooks/useThemedFont.js';
85
86
  import { useKitsTheme } from '../../contexts/Theme/KitsThemeProvider.js';
86
87
 
87
88
  const Divider = (props) => {
88
89
  const { nativeProps } = useSeparator(props);
90
+ const rtlLineHeight = useRtlLineHeight(void 0, 14);
89
91
  const {
90
92
  align = "center",
91
93
  children,
@@ -147,7 +149,7 @@ const Divider = (props) => {
147
149
  { backgroundColor: dividerColor },
148
150
  align === "left" || align === "top" ? { flex: 0, width: isHorizontal ? 24 : void 0, height: !isHorizontal ? 24 : void 0 } : { flex: 1 }
149
151
  ] }),
150
- /* @__PURE__ */ jsx(Text, { style: [styles.contentText, { color: resolveToken("text-secondary") }, contentFont ? { fontFamily: contentFont } : null], children }),
152
+ /* @__PURE__ */ jsx(Text, { style: [styles.contentText, { color: resolveToken("text-secondary") }, rtlLineHeight != null ? { lineHeight: rtlLineHeight } : null, contentFont ? { fontFamily: contentFont } : null], children }),
151
153
  /* @__PURE__ */ jsx(View, { style: [
152
154
  isHorizontal ? styles.lineSegment : styles.lineSegmentVertical,
153
155
  { backgroundColor: dividerColor },
@@ -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 {useKitsTheme} from '../../contexts/Theme';\nimport useThemedFont from '../../hooks/useThemedFont';\n\nconst Divider: React.FC<IDividerComponent> = (props) => {\n const {nativeProps} = useSeparator<any>(props);\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')}, 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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,OAAA,GAAuC,CAAC,KAAA,KAAU;AACpD,EAAA,MAAM,EAAC,WAAA,EAAW,GAAI,YAAA,CAAkB,KAAK,CAAA;AAC7C,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,IAAA;AAAA,MAAA;AAAA,QACI,GAAG,IAAA;AAAA,QACJ,KAAA,EAAO;AAAA,UACH,YAAA,GAAe,MAAA,CAAO,UAAA,GAAa,MAAA,CAAO,QAAA;AAAA,UAC1C,IAAA,CAAK;AAAA;AACT;AAAA,KACJ;AAAA,EAER;AAEA,EAAkB,eACZ,CAAC,MAAA,CAAO,gBAAgB,EAAC,iBAAA,EAAmB,YAAY,iBAAA,EAAmB,YAAA,EAAa,C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;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;;;;"}
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,IAAA;AAAA,MAAA;AAAA,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;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;;;;"}
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var reactNative = require('react-native');
6
7
  require('../../apps/mobile/src/ui/accordion/index.cjs');
7
8
  require('../../apps/mobile/src/ui/actionsheet/index.cjs');
8
9
  require('../../apps/mobile/src/ui/alert/index.cjs');
@@ -18,7 +19,6 @@ require('../../apps/mobile/src/ui/checkbox/index.cjs');
18
19
  require('../../apps/mobile/src/ui/divider/index.cjs');
19
20
  require('../../apps/mobile/src/ui/drawer/index.cjs');
20
21
  require('../../apps/mobile/src/ui/fab/index.cjs');
21
- require('react-native');
22
22
  require('../../apps/mobile/src/ui/form-control/index.cjs');
23
23
  require('react');
24
24
  require('../../apps/mobile/src/ui/gluestack-ui-provider/config.cjs');
@@ -126,9 +126,13 @@ const Text = (props) => {
126
126
  const resolvedSize = size || mapAsToSize[as] || "md";
127
127
  const overflowProps = mapTextOverflowProps(props);
128
128
  const fontFamily = typeof theme.fonts.body === "string" ? theme.fonts.body : void 0;
129
+ const styleFontSize = (() => {
130
+ const flat = reactNative.StyleSheet.flatten(nativeProps?.style);
131
+ return typeof flat?.fontSize === "number" ? flat.fontSize : void 0;
132
+ })();
129
133
  const rtlLineHeight = useRtlLineHeight.default(
130
134
  resolvedSize,
131
- typeof cssProps?.fontSize === "number" ? cssProps.fontSize : void 0
135
+ typeof cssProps?.fontSize === "number" ? cssProps.fontSize : styleFontSize
132
136
  );
133
137
  return /* @__PURE__ */ jsxRuntime.jsx(
134
138
  ResponsiveElement.default,
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/primitives/Text/index.native.tsx"],"sourcesContent":["import React from \"react\";\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 // 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' ? (cssProps as any).fontSize : undefined,\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","useRtlLineHeight","jsx","ResponsiveElement"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,WAAA,GAAsD;AAAA,EACxD,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,CAAA,EAAG;AACP,CAAA;AA8BA,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAA0B;AACpD,EAAA,MAAM,WAGF,EAAC;AAEL,EAAA,IAAI,KAAA,CAAM,eAAe,QAAA,EAAU;AAC/B,IAAA,QAAA,CAAS,aAAA,GAAgB,CAAA;AAAA,EAC7B;AAEA,EAAA,IAAI,KAAA,CAAM,iBAAiB,UAAA,EAAY;AACnC,IAAA,QAAA,CAAS,aAAA,GAAgB,MAAA;AAAA,EAC7B;AAEA,EAAA,IAAI,KAAA,CAAM,iBAAiB,MAAA,EAAQ;AAC/B,IAAA,QAAA,CAAS,aAAA,GAAgB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G,IAAA;AAAA,QACH,EAAA;AAAA,QACA,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,GAAG;AAAA,OACP;AAAA,MAEC;AAAA;AAAA,GACL;AAER;;;;"}
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,WAAA,GAAsD;AAAA,EACxD,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,CAAA,EAAG;AACP,CAAA;AA8BA,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAA0B;AACpD,EAAA,MAAM,WAGF,EAAC;AAEL,EAAA,IAAI,KAAA,CAAM,eAAe,QAAA,EAAU;AAC/B,IAAA,QAAA,CAAS,aAAA,GAAgB,CAAA;AAAA,EAC7B;AAEA,EAAA,IAAI,KAAA,CAAM,iBAAiB,UAAA,EAAY;AACnC,IAAA,QAAA,CAAS,aAAA,GAAgB,MAAA;AAAA,EAC7B;AAEA,EAAA,IAAI,KAAA,CAAM,iBAAiB,MAAA,EAAQ;AAC/B,IAAA,QAAA,CAAS,aAAA,GAAgB,MAAA;AAAA,EAC7B;AAEA,EAAA,OAAO,QAAA;AACX,CAAA;AAEA,MAAM,IAAA,GAAiC,CAAC,KAAA,KAAU;AAC9C,EAAA,MAAM,EAAE,KAAA,EAAM,GAAIA,qCAAA,EAAa;AAC/B,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAY,GAAIC,qBAAkB,KAAK,CAAA;AACzD,EAAA,MAAM;AAAA,IACF,EAAA,GAAK,GAAA;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,GAAG;AAAA,GACP,GAAI,WAAA;AAEJ,EAA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
1
1
  import { jsx } from 'react/jsx-runtime';
2
+ import { StyleSheet } from 'react-native';
2
3
  import '../../apps/mobile/src/ui/accordion/index.js';
3
4
  import '../../apps/mobile/src/ui/actionsheet/index.js';
4
5
  import '../../apps/mobile/src/ui/alert/index.js';
@@ -14,7 +15,6 @@ import '../../apps/mobile/src/ui/checkbox/index.js';
14
15
  import '../../apps/mobile/src/ui/divider/index.js';
15
16
  import '../../apps/mobile/src/ui/drawer/index.js';
16
17
  import '../../apps/mobile/src/ui/fab/index.js';
17
- import 'react-native';
18
18
  import '../../apps/mobile/src/ui/form-control/index.js';
19
19
  import 'react';
20
20
  import '../../apps/mobile/src/ui/gluestack-ui-provider/config.js';
@@ -122,9 +122,13 @@ const Text = (props) => {
122
122
  const resolvedSize = size || mapAsToSize[as] || "md";
123
123
  const overflowProps = mapTextOverflowProps(props);
124
124
  const fontFamily = typeof theme.fonts.body === "string" ? theme.fonts.body : void 0;
125
+ const styleFontSize = (() => {
126
+ const flat = StyleSheet.flatten(nativeProps?.style);
127
+ return typeof flat?.fontSize === "number" ? flat.fontSize : void 0;
128
+ })();
125
129
  const rtlLineHeight = useRtlLineHeight(
126
130
  resolvedSize,
127
- typeof cssProps?.fontSize === "number" ? cssProps.fontSize : void 0
131
+ typeof cssProps?.fontSize === "number" ? cssProps.fontSize : styleFontSize
128
132
  );
129
133
  return /* @__PURE__ */ jsx(
130
134
  ResponsiveElement,
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/primitives/Text/index.native.tsx"],"sourcesContent":["import React from \"react\";\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 // 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' ? (cssProps as any).fontSize : undefined,\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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,MAAM,WAAA,GAAsD;AAAA,EACxD,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,CAAA,EAAG;AACP,CAAA;AA8BA,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAA0B;AACpD,EAAA,MAAM,WAGF,EAAC;AA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EAAG,MAAA;AAAA,MACH,QAAA,EAAU,EAAC,GAAG,QAAA,EAAQ;AAAA,MACtB,gBAAA,EAAkB;AAAA,QACd,OAAA,EAAS,CAAA;AAAA,QACT,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,EAAA;AAAA,QACA,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,GAAG;AAAA,OACP;AAAA,MAEC;AAAA;AAAA,GACL;AAER;;;;"}
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":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,WAAA,GAAsD;AAAA,EACxD,KAAA,EAAO,IAAA;AAAA,EACP,KAAA,EAAO,IAAA;AAAA,EACP,IAAA,EAAM,IAAA;AAAA,EACN,CAAA,EAAG;AACP,CAAA;AA8BA,MAAM,oBAAA,GAAuB,CAAC,KAAA,KAA0B;AACpD,EAAA,MAAM,WAGF,EAAC;AAEL,EAAA,IAAI,KAAA,CAAM,eAAe,QAAA,EAAU;AAC/B,IAAA,QAAA,CAAS,aAAA,GAAgB,CAAA;AAAA,EAC7B;AAEA,EAAA,IAAI,KAAA,CAAM,iBAAiB,UAAA,EAAY;AACnC,IAAA,QAAA,CAAS,aAAA,GAAgB,MAAA;AAAA,EAC7B;AAEA,EAAA,IAAI,KAAA,CAAM,iBAAiB,MAAA,EAAQ;AAC/B,IAAA,QAAA,CAAS,aAAA,GAAgB,MAAA;AAAA,EAC7B;AAEA,EAAA,OAAO,QAAA;AACX,CAAA;AAEA,MAAM,IAAA,GAAiC,CAAC,KAAA,KAAU;AAC9C,EAAA,MAAM,EAAE,KAAA,EAAM,GAAI,YAAA,EAAa;AAC/B,EAAA,MAAM,EAAE,QAAA,EAAU,WAAA,EAAY,GAAI,aAAkB,KAAK,CAAA;AACzD,EAAA,MAAM;AAA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