@g9tm/lynxcontrols 1.4.11 → 1.5.0

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 (141) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/anchor/context.d.ts +15 -0
  3. package/dist/anchor/context.d.ts.map +1 -0
  4. package/dist/anchor/context.jsx +10 -0
  5. package/dist/anchor/context.jsx.map +1 -0
  6. package/dist/anchor/hooks.d.ts +72 -0
  7. package/dist/anchor/hooks.d.ts.map +1 -0
  8. package/dist/anchor/hooks.jsx +147 -0
  9. package/dist/anchor/hooks.jsx.map +1 -0
  10. package/dist/anchor/index.d.ts +6 -0
  11. package/dist/anchor/index.d.ts.map +1 -0
  12. package/dist/anchor/index.jsx +5 -0
  13. package/dist/anchor/measure.d.ts +22 -0
  14. package/dist/anchor/measure.d.ts.map +1 -0
  15. package/dist/anchor/measure.jsx +110 -0
  16. package/dist/anchor/measure.jsx.map +1 -0
  17. package/dist/anchor/registry.d.ts +108 -0
  18. package/dist/anchor/registry.d.ts.map +1 -0
  19. package/dist/anchor/registry.jsx +142 -0
  20. package/dist/anchor/registry.jsx.map +1 -0
  21. package/dist/anchor/scroll.d.ts +34 -0
  22. package/dist/anchor/scroll.d.ts.map +1 -0
  23. package/dist/anchor/scroll.jsx +255 -0
  24. package/dist/anchor/scroll.jsx.map +1 -0
  25. package/dist/base/control.d.ts +10 -3
  26. package/dist/base/control.d.ts.map +1 -1
  27. package/dist/base/control.jsx +17 -2
  28. package/dist/base/control.jsx.map +1 -1
  29. package/dist/base/pressable.d.ts.map +1 -1
  30. package/dist/base/pressable.jsx +7 -1
  31. package/dist/base/pressable.jsx.map +1 -1
  32. package/dist/button/button.d.ts.map +1 -1
  33. package/dist/button/button.jsx +11 -1
  34. package/dist/button/button.jsx.map +1 -1
  35. package/dist/button/header-action-button.d.ts.map +1 -1
  36. package/dist/button/header-action-button.jsx +10 -1
  37. package/dist/button/header-action-button.jsx.map +1 -1
  38. package/dist/button/icon-button.d.ts.map +1 -1
  39. package/dist/button/icon-button.jsx +11 -1
  40. package/dist/button/icon-button.jsx.map +1 -1
  41. package/dist/button/nav-card.d.ts.map +1 -1
  42. package/dist/button/nav-card.jsx +10 -1
  43. package/dist/button/nav-card.jsx.map +1 -1
  44. package/dist/button/vertical-icon-text-button.d.ts.map +1 -1
  45. package/dist/button/vertical-icon-text-button.jsx +10 -1
  46. package/dist/button/vertical-icon-text-button.jsx.map +1 -1
  47. package/dist/expander/expander.d.ts.map +1 -1
  48. package/dist/expander/expander.jsx +14 -1
  49. package/dist/expander/expander.jsx.map +1 -1
  50. package/dist/fields/editor.d.ts.map +1 -1
  51. package/dist/fields/editor.jsx +17 -1
  52. package/dist/fields/editor.jsx.map +1 -1
  53. package/dist/fields/outlined-field.d.ts +6 -0
  54. package/dist/fields/outlined-field.d.ts.map +1 -1
  55. package/dist/fields/outlined-field.jsx +14 -3
  56. package/dist/fields/outlined-field.jsx.map +1 -1
  57. package/dist/fields/text-entry.d.ts.map +1 -1
  58. package/dist/fields/text-entry.jsx +17 -1
  59. package/dist/fields/text-entry.jsx.map +1 -1
  60. package/dist/guide/guide.css +453 -0
  61. package/dist/guide/guide.css.map +1 -0
  62. package/dist/guide/index.d.ts +5 -0
  63. package/dist/guide/index.d.ts.map +1 -0
  64. package/dist/guide/index.jsx +4 -0
  65. package/dist/guide/journey.d.ts +46 -0
  66. package/dist/guide/journey.d.ts.map +1 -0
  67. package/dist/guide/journey.jsx +464 -0
  68. package/dist/guide/journey.jsx.map +1 -0
  69. package/dist/guide/placement.d.ts +44 -0
  70. package/dist/guide/placement.d.ts.map +1 -0
  71. package/dist/guide/placement.jsx +119 -0
  72. package/dist/guide/placement.jsx.map +1 -0
  73. package/dist/guide/service.d.ts +85 -0
  74. package/dist/guide/service.d.ts.map +1 -0
  75. package/dist/guide/service.jsx +620 -0
  76. package/dist/guide/service.jsx.map +1 -0
  77. package/dist/guide/settings.d.ts +50 -0
  78. package/dist/guide/settings.d.ts.map +1 -0
  79. package/dist/guide/settings.jsx +60 -0
  80. package/dist/guide/settings.jsx.map +1 -0
  81. package/dist/host/host.d.ts +5 -1
  82. package/dist/host/host.d.ts.map +1 -1
  83. package/dist/host/host.jsx +12 -0
  84. package/dist/host/host.jsx.map +1 -1
  85. package/dist/host/layers.d.ts +3 -1
  86. package/dist/host/layers.d.ts.map +1 -1
  87. package/dist/host/layers.jsx +4 -2
  88. package/dist/host/layers.jsx.map +1 -1
  89. package/dist/host/registry.d.ts +3 -0
  90. package/dist/host/registry.d.ts.map +1 -1
  91. package/dist/host/registry.jsx.map +1 -1
  92. package/dist/index.d.ts +3 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/provider/contexts.d.ts +3 -0
  95. package/dist/provider/contexts.d.ts.map +1 -1
  96. package/dist/provider/contexts.jsx.map +1 -1
  97. package/dist/provider/provider.d.ts.map +1 -1
  98. package/dist/provider/provider.jsx +24 -17
  99. package/dist/provider/provider.jsx.map +1 -1
  100. package/dist/provider/settings.d.ts +4 -0
  101. package/dist/provider/settings.d.ts.map +1 -1
  102. package/dist/provider/settings.jsx +3 -2
  103. package/dist/provider/settings.jsx.map +1 -1
  104. package/dist/route/hooks.d.ts +34 -0
  105. package/dist/route/hooks.d.ts.map +1 -0
  106. package/dist/route/hooks.jsx +147 -0
  107. package/dist/route/hooks.jsx.map +1 -0
  108. package/dist/route/index.d.ts +3 -0
  109. package/dist/route/index.d.ts.map +1 -0
  110. package/dist/route/index.jsx +2 -0
  111. package/dist/route/router.d.ts +201 -0
  112. package/dist/route/router.d.ts.map +1 -0
  113. package/dist/route/router.jsx +810 -0
  114. package/dist/route/router.jsx.map +1 -0
  115. package/dist/sheet/frame.d.ts +3 -1
  116. package/dist/sheet/frame.d.ts.map +1 -1
  117. package/dist/sheet/frame.jsx +67 -25
  118. package/dist/sheet/frame.jsx.map +1 -1
  119. package/dist/sheet/options.d.ts +10 -0
  120. package/dist/sheet/options.d.ts.map +1 -1
  121. package/dist/sheet/options.jsx.map +1 -1
  122. package/dist/sheet/service.d.ts +5 -0
  123. package/dist/sheet/service.d.ts.map +1 -1
  124. package/dist/sheet/service.jsx +14 -2
  125. package/dist/sheet/service.jsx.map +1 -1
  126. package/dist/sheet/sheet.css +9 -0
  127. package/dist/sheet/sheet.css.map +1 -1
  128. package/dist/tabs/tab-view.d.ts +14 -0
  129. package/dist/tabs/tab-view.d.ts.map +1 -1
  130. package/dist/tabs/tab-view.jsx +59 -3
  131. package/dist/tabs/tab-view.jsx.map +1 -1
  132. package/dist/toggle/checkbox.d.ts.map +1 -1
  133. package/dist/toggle/checkbox.jsx +15 -1
  134. package/dist/toggle/checkbox.jsx.map +1 -1
  135. package/dist/toggle/chip-group.d.ts.map +1 -1
  136. package/dist/toggle/chip-group.jsx +12 -1
  137. package/dist/toggle/chip-group.jsx.map +1 -1
  138. package/dist/toggle/switch.d.ts.map +1 -1
  139. package/dist/toggle/switch.jsx +15 -1
  140. package/dist/toggle/switch.jsx.map +1 -1
  141. package/package.json +17 -2
@@ -1 +1 @@
1
- {"version":3,"file":"outlined-field.d.ts","sourceRoot":"","sources":["../../src/fields/outlined-field.tsx"],"names":[],"mappings":"AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,sBAAsB,EAAE,KAAK,aAAa,EAAa,MAAM,+BAA+B,CAAC;AACtG,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,gBAAgB,CAAC;AAG1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,EAAE,KAAK,iBAAiB,EAA0B,MAAM,eAAe,CAAC;AAM/E,4FAA4F;AAC5F,MAAM,WAAW,oBAAoB;IACnC;;;OAGG;IACH,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,6FAA6F;IAC7F,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,+DAA+D;IAC/D,QAAQ,CAAC,WAA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,CAAC,EAAE,SAAS,CAAC;IAC9B,0FAA0F;IAC1F,QAAQ,CAAC,kBAAkB,CAAC,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAC1D,oFAAoF;IACpF,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,6FAA6F;IAC7F,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACjD,uGAAuG;IACvG,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,mEAAmE;IACnE,QAAQ,CAAC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IACrC;;;OAGG;IACH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC/B;AAMD;;;;;;;;;;;GAWG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,yBAAyB,GAAG,SAAS,CAkO3E"}
@@ -1,7 +1,8 @@
1
1
  import "./fields.css";
2
2
  import { G9FilledValueHighlight, G9Metrics } from "@g9tm/lynxcontrols-foundation";
3
3
  import { useState } from "@lynx-js/react";
4
- import { g9IdProps, g9RowStyle } from "../base/control.jsx";
4
+ import { useG9Anchor } from "../anchor/hooks.jsx";
5
+ import { g9RowStyle } from "../base/control.jsx";
5
6
  import { g9KeyboardTargetProps } from "../host/keyboard.jsx";
6
7
  import { G9IconSlot, hasIconSlot } from "../icon/slot.jsx";
7
8
  import { useG9Direction, useG9Settings } from "../provider/hooks.jsx";
@@ -66,7 +67,17 @@ function physicalSide(column) {
66
67
  return 0 === column ? 'left' : 'right';
67
68
  }
68
69
  function G9OutlinedField(props) {
69
- var _props_valueFloated, _props_textLength, _props_restingTone, _props_leadingEmoji, _props_leadingImagePath, _props_leadingImage, _props_trailingEmoji, _props_trailingImagePath, _props_trailingImage, _props_trailingAffordance, _props_innerContentPadding, _pad_left, _pad_top, _pad_right, _pad_bottom, _affordance_color;
70
+ var _props_anchor, _props_valueFloated, _props_textLength, _props_restingTone, _props_leadingEmoji, _props_leadingImagePath, _props_leadingImage, _props_trailingEmoji, _props_trailingImagePath, _props_trailingImage, _props_trailingAffordance, _props_innerContentPadding, _pad_left, _pad_top, _pad_right, _pad_bottom, _affordance_color;
71
+ const anchorHandle = useG9Anchor(props.id, null != (_props_anchor = props.anchor) ? _props_anchor : {
72
+ kind: 'entry',
73
+ label: ()=>{
74
+ var _props_label;
75
+ return null != (_props_label = props.label) ? _props_label : props.placeholder;
76
+ },
77
+ enabled: ()=>!props.disabled
78
+ }, props.id ? {
79
+ domId: props.id
80
+ } : {});
70
81
  const direction = useG9Direction();
71
82
  const isRtl = 'rtl' === direction;
72
83
  const state = useOutlinedField(props, {
@@ -145,7 +156,7 @@ function G9OutlinedField(props) {
145
156
  borderColor: state.stateColor,
146
157
  borderTopColor: 'transparent'
147
158
  }}/> : affordance ? <G9IconSlot icon={affordance.icon} color={null != (_affordance_color = affordance.color) ? _affordance_color : state.stateColor} size={iconSize}/> : <G9IconSlot {...trailing} color={state.stateColor} size={iconSize}/>;
148
- return <view className={`g9-field g9-dir-${direction}${disabled ? ' g9-field--disabled' : ''}${props.className ? ` ${props.className}` : ''}`} {...g9IdProps(props.id)}>
159
+ return <view className={`g9-field g9-dir-${direction}${disabled ? ' g9-field--disabled' : ''}${props.className ? ` ${props.className}` : ''}`} {...anchorHandle.props}>
149
160
  <view {...g9KeyboardTargetProps} className={`g9-field__box${state.floated ? ' g9-field__box--floated' : ''}${props.focused ? ' g9-field__box--focused' : ''}`} accessibility-element={false} style={{
150
161
  height: multiline ? void 0 : `${state.fieldHeight}px`,
151
162
  minHeight: multiline ? `${state.fieldHeight}px` : void 0,
@@ -1 +1 @@
1
- {"version":3,"file":"fields/outlined-field.jsx","sources":["../../src/fields/outlined-field.tsx"],"sourcesContent":["import './fields.css';\nimport { G9FilledValueHighlight, type G9ImageSource, G9Metrics } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useState } from '@lynx-js/react';\nimport { g9IdProps, g9RowStyle } from '../base/control';\nimport { g9KeyboardTargetProps } from '../host/keyboard';\nimport type { G9IconInput } from '../icon/icon';\nimport { G9IconSlot, hasIconSlot } from '../icon/slot';\nimport { useG9Direction, useG9Settings } from '../provider/hooks';\nimport { type G9PhysicalPadding, resolveFieldSlotLayout } from './slot-layout';\n\n// MAUI `G9OutlinedFieldBase` (Controls/Shared/G9OutlinedFieldBase.cs) as composition (plan/specs/03 §5): the\n// props every outlined input shares, a pure state resolver, `useOutlinedField`, and the `<G9OutlinedField>` frame the\n// inputs put their element into.\n\n/** Props every outlined field shares (the public members of MAUI `G9OutlinedFieldBase`). */\nexport interface G9OutlinedFieldProps {\n /**\n * Element `id` of the field root (MAUI `AutomationId`; automation taps its bounds to focus it). Used verbatim: keep\n * it to `[A-Za-z0-9_-]`.\n */\n readonly id?: string;\n /** Floating label. Without it the placeholder is the label (MAUI `Label ?? Placeholder`). */\n readonly label?: string | null;\n /** Placeholder; shown as the label when `label` is not set. */\n readonly placeholder?: string | null;\n /** Helper line under the field; replaced by `errorText` while the field has an error. */\n readonly helperText?: string | null;\n /** Error message, shown (in the error colour) while `hasError`. */\n readonly errorText?: string | null;\n /** Error state: error outline, label and helper colour. Validation can also set it (`validate()`). Default false. */\n readonly hasError?: boolean;\n /**\n * Keep the label floated even when empty and unfocused. Default false. With a `label` AND a `placeholder` the\n * placeholder is then drawn inside the empty box under the floated label (MAUI 1.4.9: «عنوان» floated with «عنوان کار\n * را وارد کنید» inside).\n */\n readonly alwaysFloat?: boolean;\n /**\n * The `placeholder` is the box's own hint (MAUI 1.4.9 `PlaceholderInside`): inside while the field is empty, gone with\n * a value, never lifted into the notch as a label — a chat composer's «یادداشت خود را بنویسید...». A `label`, if set,\n * still floats as usual. Default false: without a label the placeholder is the floating label's text.\n */\n readonly placeholderInside?: boolean;\n /** Value visible and selectable but not editable (MAUI `IsReadOnly`). Default false. */\n readonly readOnly?: boolean;\n /** Not interactive and dimmed (MAUI `IsEnabled = false`). Default false. */\n readonly disabled?: boolean;\n /** Maximum characters; `-1` (default) or `0` means unlimited. */\n readonly maxLength?: number;\n /** Show the `n / max` counter (only when `maxLength > 0`). Default false. */\n readonly showCharacterCounter?: boolean;\n /** Status colour (any CSS colour or `g9Token(...)`); used while `useStatusColor`. Default the primary colour. */\n readonly statusColor?: string | null;\n /** Draw the outline in `statusColor` (emphasised) whatever the focus. Default false. */\n readonly useStatusColor?: boolean;\n /** Soft inner halo while focused (no error, no status colour). Default false. */\n readonly showFocusHalo?: boolean;\n /** Filled-value accent of this field; `'inherit'` (default) takes `settings.fields.highlightFilledValue`. */\n readonly filledValueHighlight?: G9FilledValueHighlight;\n readonly leadingEmoji?: string | null;\n readonly leadingIcon?: G9IconInput;\n readonly leadingImagePath?: string | null;\n readonly leadingImage?: G9ImageSource | null;\n readonly trailingEmoji?: string | null;\n readonly trailingIcon?: G9IconInput;\n readonly trailingImagePath?: string | null;\n readonly trailingImage?: G9ImageSource | null;\n /** Spinner in the trailing slot (wins over every trailing icon). Default false. */\n readonly isTrailingBusy?: boolean;\n /** Keep the trailing icon on the physical right in RTL too. Default false. */\n readonly forceTrailingIconRight?: boolean;\n /** Keep the leading icon on the physical left in RTL too. Default false. */\n readonly forceLeadingIconLeft?: boolean;\n /** Box height; `0` (default) uses `G9Metrics.ControlHeight` (52). */\n readonly fieldHeight?: number;\n /** Reserve the floated label's overhang above the box (MAUI `FloatingLabelClearance`, 6). Default false. */\n readonly reserveFloatingLabelClearance?: boolean;\n /** Leading icon tap (MAUI `LeadingCommand` + `CommandParameter`). Makes the icon actionable. */\n readonly onLeadingPress?: () => void;\n /** Trailing icon tap when no built-in affordance claims it (MAUI `TrailingCommand`). */\n readonly onTrailingPress?: () => void;\n /** Extra padding of the inner content (MAUI `InnerContentPadding`), physical sides. */\n readonly innerContentPadding?: Partial<G9PhysicalPadding>;\n /** Class of the root element. */\n readonly className?: string;\n}\n\n/** What {@link resolveOutlinedFieldState} needs besides the props. */\nexport interface G9OutlinedFieldStateInput {\n readonly focused: boolean;\n readonly hasValue: boolean;\n /** A value the field shows without text (a picker's selection): floats the label like a value. */\n readonly valueFloated?: boolean;\n /** App-wide filled-value accent (`settings.fields.highlightFilledValue`). */\n readonly highlightFilledValue: boolean;\n /** Characters of the value, for the counter. */\n readonly textLength: number;\n /** Resting chrome tone: `'outline'` (default) or `'placeholder'` (search). */\n readonly restingTone?: 'outline' | 'placeholder';\n}\n\n/** The resolved look of an outlined field (colours are CSS colour values). */\nexport interface G9OutlinedFieldState {\n readonly floated: boolean;\n /** Outline, floated label and trailing icon colour. */\n readonly stateColor: string;\n readonly labelColor: string;\n /** Leading icon and resting label colour. */\n readonly restingContentColor: string;\n readonly labelText: string;\n /** Helper line text (`errorText` while in error), `''` when hidden. */\n readonly helperText: string;\n readonly helperColor: string;\n /** Counter text (`'n / max'`), `''` when hidden. */\n readonly counterText: string;\n readonly footerVisible: boolean;\n readonly strokeWidth: number;\n /** Focus halo thickness, 0 when off. */\n readonly haloWidth: number;\n readonly fieldHeight: number;\n}\n\nconst v = (token: string): string => `var(--g9-${token})`;\nconst blank = (s: string | null | undefined): boolean => s == null || s.trim() === '';\n\n/**\n * The hint a field draws INSIDE its box while it is empty, or `null` (MAUI 1.4.9 `RestingPlaceholder`). Without a `label`\n * (or with `placeholderInside`) it is the `placeholder`. With a label it is drawn only when `alwaysFloat` keeps the label\n * up in the notch — otherwise the resting label sits where the hint would be — and never when it repeats the label.\n */\nexport function resolveRestingPlaceholder(\n props: Pick<G9OutlinedFieldProps, 'label' | 'placeholder' | 'alwaysFloat' | 'placeholderInside'>,\n): string | null {\n if (blank(props.placeholder)) return null;\n const placeholder = props.placeholder as string;\n if (props.placeholderInside === true || blank(props.label)) return placeholder;\n return props.alwaysFloat === true && props.label !== placeholder ? placeholder : null;\n}\n\n/**\n * The hint a TEXT input draws itself (MAUI 1.4.9 `G9TextEntry` / `G9Editor`): only while the field owns it — a label is\n * set, or `placeholderInside` — since without a label the floating label already is the placeholder.\n */\nexport function resolveInnerHint(\n props: Pick<G9OutlinedFieldProps, 'label' | 'placeholder' | 'alwaysFloat' | 'placeholderInside'>,\n): string | null {\n const owns = props.placeholderInside === true || !blank(props.label);\n return owns ? resolveRestingPlaceholder(props) : null;\n}\n\n/**\n * Resolves the field's state colours and footer (MAUI `ResolveStateColor`, `ResolveFloatingLabelColor`, the footer\n * part of `Refresh`). Precedence: error > status colour > focus > accented filled value > resting.\n */\nexport function resolveOutlinedFieldState(\n props: G9OutlinedFieldProps,\n input: G9OutlinedFieldStateInput,\n): G9OutlinedFieldState {\n const hasError = props.hasError === true;\n const useStatus = props.useStatusColor === true;\n const filled = input.hasValue || input.valueFloated === true;\n const highlight = props.filledValueHighlight ?? G9FilledValueHighlight.Inherit;\n const accentFilled =\n highlight === G9FilledValueHighlight.Accent\n ? true\n : highlight === G9FilledValueHighlight.Neutral\n ? false\n : input.highlightFilledValue;\n const placeholderTone = input.restingTone === 'placeholder';\n const restingOutline = placeholderTone ? v('input-placeholder') : v('outline');\n const restingContentColor = placeholderTone ? v('input-placeholder') : v('text-tertiary');\n let stateColor: string;\n if (hasError) stateColor = v('error');\n else if (useStatus) stateColor = props.statusColor ?? v('primary');\n else if (input.focused) stateColor = v('primary');\n else stateColor = filled && accentFilled ? v('primary') : restingOutline;\n\n const floated = props.alwaysFloat === true || input.valueFloated === true || input.focused || input.hasValue;\n const neutralFilledRest = filled && !input.focused && !hasError && !useStatus && !accentFilled;\n const labelColor = floated && !neutralFilledRest ? stateColor : restingContentColor;\n\n const helperRaw = hasError ? (props.errorText ?? '') : (props.helperText ?? '');\n const helperText = helperRaw.trim() === '' ? '' : helperRaw;\n const maxLength = props.maxLength ?? -1;\n const counterText = props.showCharacterCounter === true && maxLength > 0 ? `${input.textLength} / ${maxLength}` : '';\n const emphasis = input.focused || hasError || useStatus;\n const halo = props.showFocusHalo === true && input.focused && !hasError && !useStatus;\n // MAUI 1.4.9: `Label ?? (PlaceholderInside ? null : Placeholder)` — a placeholder inside the box never floats.\n const labelRaw = props.label ?? (props.placeholderInside === true ? null : props.placeholder) ?? '';\n return {\n floated,\n stateColor,\n labelColor,\n restingContentColor,\n labelText: labelRaw.trim() === '' ? '' : labelRaw,\n helperText,\n helperColor: hasError ? v('error') : v('text-tertiary'),\n counterText,\n footerVisible: helperText !== '' || counterText !== '',\n strokeWidth: emphasis ? G9Metrics.OutlinedFieldEmphasisStrokeThickness : G9Metrics.OutlinedFieldStrokeThickness,\n haloWidth: halo ? G9Metrics.OutlinedFieldFocusHaloThickness : 0,\n fieldHeight: props.fieldHeight && props.fieldHeight > 0 ? props.fieldHeight : G9Metrics.ControlHeight,\n };\n}\n\n/** {@link resolveOutlinedFieldState} with the app-wide settings read from the provider. */\nexport function useOutlinedField(\n props: G9OutlinedFieldProps,\n input: Omit<G9OutlinedFieldStateInput, 'highlightFilledValue'>,\n): G9OutlinedFieldState {\n const settings = useG9Settings();\n return resolveOutlinedFieldState(props, { ...input, highlightFilledValue: settings.fields.highlightFilledValue });\n}\n\n/** A built-in trailing affordance an input puts in the trailing slot (password eye, microphone, clear). */\nexport interface G9TrailingAffordance {\n /** What it shows. */\n readonly icon: G9IconInput;\n /** Icon colour; default the state colour. */\n readonly color?: string;\n /** Accessibility label. */\n readonly label?: string;\n /** Stable key (MAUI `ResolveTrailingIconSignature`): the slot is rebuilt only when it changes. */\n readonly signature: string;\n readonly onPress: () => void;\n}\n\n/** Props of {@link G9OutlinedField}: the shared props plus what the composing input supplies. */\nexport interface G9OutlinedFieldFrameProps extends G9OutlinedFieldProps {\n readonly focused: boolean;\n readonly hasValue: boolean;\n readonly valueFloated?: boolean;\n readonly textLength?: number;\n /** The input element (or any content) inside the box. */\n readonly children?: ReactNode;\n /** A built-in trailing affordance; replaces the trailing icon props (busy still wins). */\n readonly trailingAffordance?: G9TrailingAffordance | null;\n /** Tapping the box (outside the icons) focuses the content (MAUI `FocusTarget`). */\n readonly onFocusRequest?: () => void;\n /** Resting tone (`'placeholder'` for search, MAUI `ResolveRestingOutlineColor` override). */\n readonly restingTone?: 'outline' | 'placeholder';\n /** Vertical placement of the icons and the resting label: centred (entries) or top/bottom (editor). */\n readonly multiline?: boolean;\n /** Accessibility label of the box (defaults to the label text). */\n readonly accessibilityLabel?: string;\n /**\n * A hint the frame draws over the content while the field is empty (`resolveInnerHint`, MAUI 1.4.9): text inputs pass\n * it; the pickers draw their own value text. TextTertiary, the input's 15 px, never taking a touch.\n */\n readonly hint?: string | null;\n}\n\nfunction physicalSide(column: 0 | 2): 'left' | 'right' {\n return column === 0 ? 'left' : 'right';\n}\n\n/**\n * The outlined field frame (MAUI `G9OutlinedFieldBase`): outline with a notched floating label, leading and\n * trailing icon slots, helper/error line and counter. Inputs (`G9TextEntry`, `G9Editor`, `G9SearchEntry`, the pickers)\n * put their element in `children`. Direction is set on the root from the culture (labels, icons, helper follow it;\n * the input decides its own text direction). A tap on an icon never focuses the content; a tap elsewhere on the box\n * calls `onFocusRequest`.\n *\n * Look: colours come from the theme variables (`--g9-primary`, `--g9-outline`, `--g9-error`, …). The floated label\n * sits on the outline with the background `--g9-field-notch-background` (default `--g9-background`; set it on a\n * container of another colour with `g9FieldNotchStyle`, G9 sheets and popups do), which hides the\n * outline under it.\n */\nexport function G9OutlinedField(props: G9OutlinedFieldFrameProps): ReactNode {\n const direction = useG9Direction();\n const isRtl = direction === 'rtl';\n const state = useOutlinedField(props, {\n focused: props.focused,\n hasValue: props.hasValue,\n valueFloated: props.valueFloated ?? false,\n textLength: props.textLength ?? 0,\n restingTone: props.restingTone ?? 'outline',\n });\n const leading = {\n emoji: props.leadingEmoji ?? null,\n icon: props.leadingIcon,\n imagePath: props.leadingImagePath ?? null,\n image: props.leadingImage ?? null,\n };\n const trailing = {\n emoji: props.trailingEmoji ?? null,\n icon: props.trailingIcon,\n imagePath: props.trailingImagePath ?? null,\n image: props.trailingImage ?? null,\n };\n const busy = props.isTrailingBusy === true;\n const affordance = props.trailingAffordance ?? null;\n const hasLeading = hasIconSlot(leading);\n const hasTrailing = busy || affordance !== null || hasIconSlot(trailing);\n const pad = props.innerContentPadding ?? {};\n const slot = resolveFieldSlotLayout(\n {\n hasLeadingIcon: hasLeading,\n hasTrailingIcon: hasTrailing,\n isRtl,\n forceTrailingIconRight: props.forceTrailingIconRight === true,\n forceLeadingIconLeft: props.forceLeadingIconLeft === true,\n },\n { left: pad.left ?? 0, top: pad.top ?? 0, right: pad.right ?? 0, bottom: pad.bottom ?? 0 },\n );\n const disabled = props.disabled === true;\n const leadingActionable = props.onLeadingPress !== undefined;\n const trailingActionable = affordance !== null || props.onTrailingPress !== undefined;\n const onLeadingTap = () => {\n if (disabled || !leadingActionable) return;\n props.onLeadingPress?.();\n };\n const onTrailingTap = () => {\n if (disabled || busy || !trailingActionable) return;\n if (affordance) affordance.onPress();\n else props.onTrailingPress?.();\n };\n const onBoxTap = () => {\n if (!disabled) props.onFocusRequest?.();\n };\n\n const multiline = props.multiline === true;\n const labelHeight = G9Metrics.FloatingLabelHeight;\n // MAUI rests the label in the middle of the box's MEASURED height (ResolveFieldHeight → _box.Height): an empty\n // editor of 110 dp shows «شرح» halfway down it, not on its first line. Before the first layout: the control height.\n const [boxHeight, setBoxHeight] = useState(0);\n const restTop =\n ((multiline && boxHeight > 8 ? boxHeight : multiline ? G9Metrics.ControlHeight : state.fieldHeight) - labelHeight) /\n 2;\n const labelX = slot.labelRestX + (state.floated ? slot.labelFloatedX : 0);\n const labelAnchor = isRtl ? 'right' : 'left';\n const iconSize = G9Metrics.InputIconSize;\n const slotStyle = (column: 0 | 2, width: number, bottomAligned: boolean) => ({\n [physicalSide(column)]: '0px',\n width: `${width}px`,\n ...(bottomAligned\n ? { bottom: '0px', height: `${G9Metrics.EditorTrailingSlotHeight}px` }\n : { top: '0px', bottom: '0px' }),\n });\n\n const trailingContent = busy ? (\n <view className=\"g9-field__busy\" style={{ borderColor: state.stateColor, borderTopColor: 'transparent' }} />\n ) : affordance ? (\n <G9IconSlot icon={affordance.icon} color={affordance.color ?? state.stateColor} size={iconSize} />\n ) : (\n <G9IconSlot {...trailing} color={state.stateColor} size={iconSize} />\n );\n\n return (\n <view\n className={`g9-field g9-dir-${direction}${disabled ? ' g9-field--disabled' : ''}${props.className ? ` ${props.className}` : ''}`}\n {...g9IdProps(props.id)}\n >\n <view\n {...g9KeyboardTargetProps}\n className={`g9-field__box${state.floated ? ' g9-field__box--floated' : ''}${props.focused ? ' g9-field__box--focused' : ''}`}\n accessibility-element={false}\n style={{\n height: multiline ? undefined : `${state.fieldHeight}px`,\n minHeight: multiline ? `${state.fieldHeight}px` : undefined,\n marginTop: props.reserveFloatingLabelClearance ? `${G9Metrics.FloatingLabelClearance}px` : '0px',\n }}\n bindtap={onBoxTap}\n {...(multiline\n ? {\n bindlayoutchange: (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n if (Math.abs(h - boxHeight) > 0.5) setBoxHeight(h);\n },\n }\n : {})}\n >\n {/* The outline is its own view (MAUI paints it on a canvas): a stroke change never moves the content, and a\n disabled field dims it without an opacity layer on the box, which clipped the floated label on Android. */}\n <view\n className=\"g9-field__outline\"\n style={{\n borderColor: state.stateColor,\n borderWidth: `${state.strokeWidth}px`,\n borderRadius: `${G9Metrics.RadiusMd}px`,\n }}\n />\n {state.haloWidth > 0 ? (\n <view\n className=\"g9-field__halo\"\n style={{\n borderColor: state.stateColor,\n borderWidth: `${state.haloWidth}px`,\n opacity: G9Metrics.FocusRingOpacity,\n borderRadius: `${G9Metrics.RadiusMd}px`,\n }}\n />\n ) : null}\n <view\n className=\"g9-field__content\"\n style={{\n paddingLeft: `${slot.innerPadding.left + (hasLeading && slot.leadingColumn === 0 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 0 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n paddingRight: `${slot.innerPadding.right + (hasLeading && slot.leadingColumn === 2 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 2 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n paddingTop: `${slot.innerPadding.top}px`,\n paddingBottom: `${slot.innerPadding.bottom}px`,\n }}\n >\n {props.children}\n {props.hint && !props.hasValue && props.valueFloated !== true ? (\n <view\n className={`g9-field__hint${multiline ? ' g9-field__hint--multiline' : ''}`}\n user-interaction-enabled={false}\n style={{\n left: `${slot.innerPadding.left + (hasLeading && slot.leadingColumn === 0 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 0 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n right: `${slot.innerPadding.right + (hasLeading && slot.leadingColumn === 2 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 2 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n ...(multiline ? { top: `${slot.innerPadding.top}px` } : {}),\n }}\n >\n <text\n className=\"g9-field__hint-text\"\n {...(multiline ? {} : { 'text-maxline': '1' })}\n style={{\n textAlign: isRtl ? 'right' : 'left',\n color: disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-tertiary)',\n }}\n >\n {props.hint}\n </text>\n </view>\n ) : null}\n </view>\n {hasLeading ? (\n <view\n className=\"g9-field__slot g9-field__slot--leading\"\n style={slotStyle(slot.leadingColumn, G9Metrics.LeadingIconSlotWidth, false)}\n catchtap={onLeadingTap}\n {...(leadingActionable ? { 'accessibility-element': true, 'accessibility-traits': 'button' } : {})}\n >\n <G9IconSlot {...leading} color={state.restingContentColor} size={iconSize} />\n </view>\n ) : null}\n {hasTrailing ? (\n <view\n key={busy ? 'busy' : affordance ? affordance.signature : 'icon'}\n className=\"g9-field__slot g9-field__slot--trailing\"\n style={slotStyle(slot.trailingColumn, G9Metrics.TrailingIconSlotWidth, multiline && !busy)}\n catchtap={onTrailingTap}\n {...(trailingActionable\n ? {\n 'accessibility-element': true,\n 'accessibility-traits': 'button',\n ...(affordance?.label ? { 'accessibility-label': affordance.label } : {}),\n }\n : {})}\n >\n {trailingContent}\n </view>\n ) : null}\n {state.labelText ? (\n <text\n className={`g9-field__label${state.floated ? ' g9-field__label--floated' : ''}`}\n style={{\n [labelAnchor]: `${G9Metrics.InputHorizontalPadding}px`,\n top: `${state.floated ? G9Metrics.FloatingLabelFloatedY : restTop}px`,\n fontSize: `${state.floated ? G9Metrics.FloatingLabelFontSizeFloat : G9Metrics.FloatingLabelFontSizeRest}px`,\n color: disabled ? 'var(--g9-text-disabled)' : state.labelColor,\n transform: `translateX(${labelX}px)`,\n }}\n >\n {state.labelText}\n </text>\n ) : null}\n </view>\n {state.footerVisible ? (\n <view className=\"g9-field__footer\" style={g9RowStyle(direction)}>\n {state.helperText ? (\n <text\n className=\"g9-field__helper\"\n style={{ color: state.helperColor, textAlign: isRtl ? 'right' : 'left' }}\n >\n {state.helperText}\n </text>\n ) : (\n <view className=\"g9-field__helper\" />\n )}\n {/* RLM first in a right-to-left field: «0 / 4000» has no strong letter, so it would lay out left-to-right; MAUI's\n label inherits the RTL flow and reads «۴۰۰۰ / ۰». */}\n {state.counterText ? (\n <text className=\"g9-field__counter\">{`${isRtl ? '\\u200F' : ''}${state.counterText}`}</text>\n ) : null}\n </view>\n ) : null}\n </view>\n );\n}\n"],"names":["v","token","blank","s","resolveRestingPlaceholder","props","placeholder","resolveInnerHint","owns","resolveOutlinedFieldState","input","_props_filledValueHighlight","_props_statusColor","_props_errorText","_props_helperText","_props_maxLength","_ref","hasError","useStatus","filled","highlight","G9FilledValueHighlight","accentFilled","placeholderTone","restingOutline","restingContentColor","stateColor","floated","neutralFilledRest","labelColor","helperRaw","helperText","maxLength","counterText","emphasis","halo","labelRaw","G9Metrics","useOutlinedField","settings","useG9Settings","physicalSide","column","G9OutlinedField","_props_valueFloated","_props_textLength","_props_restingTone","_props_leadingEmoji","_props_leadingImagePath","_props_leadingImage","_props_trailingEmoji","_props_trailingImagePath","_props_trailingImage","_props_trailingAffordance","_props_innerContentPadding","_pad_left","_pad_top","_pad_right","_pad_bottom","_affordance_color","direction","useG9Direction","isRtl","state","leading","trailing","busy","affordance","hasLeading","hasIconSlot","hasTrailing","pad","slot","resolveFieldSlotLayout","disabled","leadingActionable","undefined","trailingActionable","onLeadingTap","onTrailingTap","onBoxTap","multiline","labelHeight","boxHeight","setBoxHeight","useState","restTop","labelX","labelAnchor","iconSize","slotStyle","width","bottomAligned","trailingContent","view","G9IconSlot","g9IdProps","g9KeyboardTargetProps","e","_e_detail","h","Math","text","g9RowStyle"],"mappings":";;;;;;;;AA0HA,MAAMA,IAAI,CAACC,QAA0B,CAAC,SAAS,EAAEA,MAAM,CAAC,CAAC;AACzD,MAAMC,QAAQ,CAACC,IAA0CA,AAAK,QAALA,KAAaA,AAAa,OAAbA,EAAE,IAAI;AAOrE,SAASC,0BACdC,KAAgG;IAEhG,IAAIH,MAAMG,MAAM,WAAW,GAAG,OAAO;IACrC,MAAMC,cAAcD,MAAM,WAAW;IACrC,IAAIA,AAA4B,SAA5BA,MAAM,iBAAiB,IAAaH,MAAMG,MAAM,KAAK,GAAG,OAAOC;IACnE,OAAOD,AAAsB,SAAtBA,MAAM,WAAW,IAAaA,MAAM,KAAK,KAAKC,cAAcA,cAAc;AACnF;AAMO,SAASC,iBACdF,KAAgG;IAEhG,MAAMG,OAAOH,AAA4B,SAA5BA,MAAM,iBAAiB,IAAa,CAACH,MAAMG,MAAM,KAAK;IACnE,OAAOG,OAAOJ,0BAA0BC,SAAS;AACnD;AAMO,SAASI,0BACdJ,KAA2B,EAC3BK,KAAgC;QAKdC,6BAYeC,oBAQHC,kBAA0BC,mBAEtCC,kBAKDC,MAAAA;IA9BjB,MAAMC,WAAWZ,AAAmB,SAAnBA,MAAM,QAAQ;IAC/B,MAAMa,YAAYb,AAAyB,SAAzBA,MAAM,cAAc;IACtC,MAAMc,SAAST,MAAM,QAAQ,IAAIA,AAAuB,SAAvBA,MAAM,YAAY;IACnD,MAAMU,YAAY,QAAAT,CAAAA,8BAAAA,MAAM,oBAAoB,AAAD,IAAzBA,8BAA8BU,uBAAuB,OAAO;IAC9E,MAAMC,eACJF,cAA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,UAAU,CAAC;YACpB,EAAEuC,SAEDR,KAAK,UAAU,qBAChB;UACF,EACyD;UACzD,CAAC/B,MAAM,WAAW,IACfuC,KAAK,UAAU,qBAAqB,GAAGxC,QAAQ,WAAW,KAAKC,MAAM,WAAW,EAAE,GAAGuC,QACpF,KAAK;QACX,EAAER,QACA,KAAK;IACX,EAAEA;AAEN"}
1
+ {"version":3,"file":"fields/outlined-field.jsx","sources":["../../src/fields/outlined-field.tsx"],"sourcesContent":["import './fields.css';\nimport { G9FilledValueHighlight, type G9ImageSource, G9Metrics } from '@g9tm/lynxcontrols-foundation';\nimport { type ReactNode, useState } from '@lynx-js/react';\nimport { useG9Anchor } from '../anchor/hooks';\nimport type { G9AnchorInfo } from '../anchor/registry';\nimport { g9RowStyle } from '../base/control';\nimport { g9KeyboardTargetProps } from '../host/keyboard';\nimport type { G9IconInput } from '../icon/icon';\nimport { G9IconSlot, hasIconSlot } from '../icon/slot';\nimport { useG9Direction, useG9Settings } from '../provider/hooks';\nimport { type G9PhysicalPadding, resolveFieldSlotLayout } from './slot-layout';\n\n// MAUI `G9OutlinedFieldBase` (Controls/Shared/G9OutlinedFieldBase.cs) as composition (plan/specs/03 §5): the\n// props every outlined input shares, a pure state resolver, `useOutlinedField`, and the `<G9OutlinedField>` frame the\n// inputs put their element into.\n\n/** Props every outlined field shares (the public members of MAUI `G9OutlinedFieldBase`). */\nexport interface G9OutlinedFieldProps {\n /**\n * Element `id` of the field root (MAUI `AutomationId`; automation taps its bounds to focus it). Used verbatim: keep\n * it to `[A-Za-z0-9_-]`.\n */\n readonly id?: string;\n /**\n * What the field is and can do as an anchor (`@g9tm/lynxcontrols/anchor`); the text inputs pass their value paths.\n * Registered only with an `id`.\n */\n readonly anchor?: G9AnchorInfo;\n /** Floating label. Without it the placeholder is the label (MAUI `Label ?? Placeholder`). */\n readonly label?: string | null;\n /** Placeholder; shown as the label when `label` is not set. */\n readonly placeholder?: string | null;\n /** Helper line under the field; replaced by `errorText` while the field has an error. */\n readonly helperText?: string | null;\n /** Error message, shown (in the error colour) while `hasError`. */\n readonly errorText?: string | null;\n /** Error state: error outline, label and helper colour. Validation can also set it (`validate()`). Default false. */\n readonly hasError?: boolean;\n /**\n * Keep the label floated even when empty and unfocused. Default false. With a `label` AND a `placeholder` the\n * placeholder is then drawn inside the empty box under the floated label (MAUI 1.4.9: «عنوان» floated with «عنوان کار\n * را وارد کنید» inside).\n */\n readonly alwaysFloat?: boolean;\n /**\n * The `placeholder` is the box's own hint (MAUI 1.4.9 `PlaceholderInside`): inside while the field is empty, gone with\n * a value, never lifted into the notch as a label — a chat composer's «یادداشت خود را بنویسید...». A `label`, if set,\n * still floats as usual. Default false: without a label the placeholder is the floating label's text.\n */\n readonly placeholderInside?: boolean;\n /** Value visible and selectable but not editable (MAUI `IsReadOnly`). Default false. */\n readonly readOnly?: boolean;\n /** Not interactive and dimmed (MAUI `IsEnabled = false`). Default false. */\n readonly disabled?: boolean;\n /** Maximum characters; `-1` (default) or `0` means unlimited. */\n readonly maxLength?: number;\n /** Show the `n / max` counter (only when `maxLength > 0`). Default false. */\n readonly showCharacterCounter?: boolean;\n /** Status colour (any CSS colour or `g9Token(...)`); used while `useStatusColor`. Default the primary colour. */\n readonly statusColor?: string | null;\n /** Draw the outline in `statusColor` (emphasised) whatever the focus. Default false. */\n readonly useStatusColor?: boolean;\n /** Soft inner halo while focused (no error, no status colour). Default false. */\n readonly showFocusHalo?: boolean;\n /** Filled-value accent of this field; `'inherit'` (default) takes `settings.fields.highlightFilledValue`. */\n readonly filledValueHighlight?: G9FilledValueHighlight;\n readonly leadingEmoji?: string | null;\n readonly leadingIcon?: G9IconInput;\n readonly leadingImagePath?: string | null;\n readonly leadingImage?: G9ImageSource | null;\n readonly trailingEmoji?: string | null;\n readonly trailingIcon?: G9IconInput;\n readonly trailingImagePath?: string | null;\n readonly trailingImage?: G9ImageSource | null;\n /** Spinner in the trailing slot (wins over every trailing icon). Default false. */\n readonly isTrailingBusy?: boolean;\n /** Keep the trailing icon on the physical right in RTL too. Default false. */\n readonly forceTrailingIconRight?: boolean;\n /** Keep the leading icon on the physical left in RTL too. Default false. */\n readonly forceLeadingIconLeft?: boolean;\n /** Box height; `0` (default) uses `G9Metrics.ControlHeight` (52). */\n readonly fieldHeight?: number;\n /** Reserve the floated label's overhang above the box (MAUI `FloatingLabelClearance`, 6). Default false. */\n readonly reserveFloatingLabelClearance?: boolean;\n /** Leading icon tap (MAUI `LeadingCommand` + `CommandParameter`). Makes the icon actionable. */\n readonly onLeadingPress?: () => void;\n /** Trailing icon tap when no built-in affordance claims it (MAUI `TrailingCommand`). */\n readonly onTrailingPress?: () => void;\n /** Extra padding of the inner content (MAUI `InnerContentPadding`), physical sides. */\n readonly innerContentPadding?: Partial<G9PhysicalPadding>;\n /** Class of the root element. */\n readonly className?: string;\n}\n\n/** What {@link resolveOutlinedFieldState} needs besides the props. */\nexport interface G9OutlinedFieldStateInput {\n readonly focused: boolean;\n readonly hasValue: boolean;\n /** A value the field shows without text (a picker's selection): floats the label like a value. */\n readonly valueFloated?: boolean;\n /** App-wide filled-value accent (`settings.fields.highlightFilledValue`). */\n readonly highlightFilledValue: boolean;\n /** Characters of the value, for the counter. */\n readonly textLength: number;\n /** Resting chrome tone: `'outline'` (default) or `'placeholder'` (search). */\n readonly restingTone?: 'outline' | 'placeholder';\n}\n\n/** The resolved look of an outlined field (colours are CSS colour values). */\nexport interface G9OutlinedFieldState {\n readonly floated: boolean;\n /** Outline, floated label and trailing icon colour. */\n readonly stateColor: string;\n readonly labelColor: string;\n /** Leading icon and resting label colour. */\n readonly restingContentColor: string;\n readonly labelText: string;\n /** Helper line text (`errorText` while in error), `''` when hidden. */\n readonly helperText: string;\n readonly helperColor: string;\n /** Counter text (`'n / max'`), `''` when hidden. */\n readonly counterText: string;\n readonly footerVisible: boolean;\n readonly strokeWidth: number;\n /** Focus halo thickness, 0 when off. */\n readonly haloWidth: number;\n readonly fieldHeight: number;\n}\n\nconst v = (token: string): string => `var(--g9-${token})`;\nconst blank = (s: string | null | undefined): boolean => s == null || s.trim() === '';\n\n/**\n * The hint a field draws INSIDE its box while it is empty, or `null` (MAUI 1.4.9 `RestingPlaceholder`). Without a `label`\n * (or with `placeholderInside`) it is the `placeholder`. With a label it is drawn only when `alwaysFloat` keeps the label\n * up in the notch — otherwise the resting label sits where the hint would be — and never when it repeats the label.\n */\nexport function resolveRestingPlaceholder(\n props: Pick<G9OutlinedFieldProps, 'label' | 'placeholder' | 'alwaysFloat' | 'placeholderInside'>,\n): string | null {\n if (blank(props.placeholder)) return null;\n const placeholder = props.placeholder as string;\n if (props.placeholderInside === true || blank(props.label)) return placeholder;\n return props.alwaysFloat === true && props.label !== placeholder ? placeholder : null;\n}\n\n/**\n * The hint a TEXT input draws itself (MAUI 1.4.9 `G9TextEntry` / `G9Editor`): only while the field owns it — a label is\n * set, or `placeholderInside` — since without a label the floating label already is the placeholder.\n */\nexport function resolveInnerHint(\n props: Pick<G9OutlinedFieldProps, 'label' | 'placeholder' | 'alwaysFloat' | 'placeholderInside'>,\n): string | null {\n const owns = props.placeholderInside === true || !blank(props.label);\n return owns ? resolveRestingPlaceholder(props) : null;\n}\n\n/**\n * Resolves the field's state colours and footer (MAUI `ResolveStateColor`, `ResolveFloatingLabelColor`, the footer\n * part of `Refresh`). Precedence: error > status colour > focus > accented filled value > resting.\n */\nexport function resolveOutlinedFieldState(\n props: G9OutlinedFieldProps,\n input: G9OutlinedFieldStateInput,\n): G9OutlinedFieldState {\n const hasError = props.hasError === true;\n const useStatus = props.useStatusColor === true;\n const filled = input.hasValue || input.valueFloated === true;\n const highlight = props.filledValueHighlight ?? G9FilledValueHighlight.Inherit;\n const accentFilled =\n highlight === G9FilledValueHighlight.Accent\n ? true\n : highlight === G9FilledValueHighlight.Neutral\n ? false\n : input.highlightFilledValue;\n const placeholderTone = input.restingTone === 'placeholder';\n const restingOutline = placeholderTone ? v('input-placeholder') : v('outline');\n const restingContentColor = placeholderTone ? v('input-placeholder') : v('text-tertiary');\n let stateColor: string;\n if (hasError) stateColor = v('error');\n else if (useStatus) stateColor = props.statusColor ?? v('primary');\n else if (input.focused) stateColor = v('primary');\n else stateColor = filled && accentFilled ? v('primary') : restingOutline;\n\n const floated = props.alwaysFloat === true || input.valueFloated === true || input.focused || input.hasValue;\n const neutralFilledRest = filled && !input.focused && !hasError && !useStatus && !accentFilled;\n const labelColor = floated && !neutralFilledRest ? stateColor : restingContentColor;\n\n const helperRaw = hasError ? (props.errorText ?? '') : (props.helperText ?? '');\n const helperText = helperRaw.trim() === '' ? '' : helperRaw;\n const maxLength = props.maxLength ?? -1;\n const counterText = props.showCharacterCounter === true && maxLength > 0 ? `${input.textLength} / ${maxLength}` : '';\n const emphasis = input.focused || hasError || useStatus;\n const halo = props.showFocusHalo === true && input.focused && !hasError && !useStatus;\n // MAUI 1.4.9: `Label ?? (PlaceholderInside ? null : Placeholder)` — a placeholder inside the box never floats.\n const labelRaw = props.label ?? (props.placeholderInside === true ? null : props.placeholder) ?? '';\n return {\n floated,\n stateColor,\n labelColor,\n restingContentColor,\n labelText: labelRaw.trim() === '' ? '' : labelRaw,\n helperText,\n helperColor: hasError ? v('error') : v('text-tertiary'),\n counterText,\n footerVisible: helperText !== '' || counterText !== '',\n strokeWidth: emphasis ? G9Metrics.OutlinedFieldEmphasisStrokeThickness : G9Metrics.OutlinedFieldStrokeThickness,\n haloWidth: halo ? G9Metrics.OutlinedFieldFocusHaloThickness : 0,\n fieldHeight: props.fieldHeight && props.fieldHeight > 0 ? props.fieldHeight : G9Metrics.ControlHeight,\n };\n}\n\n/** {@link resolveOutlinedFieldState} with the app-wide settings read from the provider. */\nexport function useOutlinedField(\n props: G9OutlinedFieldProps,\n input: Omit<G9OutlinedFieldStateInput, 'highlightFilledValue'>,\n): G9OutlinedFieldState {\n const settings = useG9Settings();\n return resolveOutlinedFieldState(props, { ...input, highlightFilledValue: settings.fields.highlightFilledValue });\n}\n\n/** A built-in trailing affordance an input puts in the trailing slot (password eye, microphone, clear). */\nexport interface G9TrailingAffordance {\n /** What it shows. */\n readonly icon: G9IconInput;\n /** Icon colour; default the state colour. */\n readonly color?: string;\n /** Accessibility label. */\n readonly label?: string;\n /** Stable key (MAUI `ResolveTrailingIconSignature`): the slot is rebuilt only when it changes. */\n readonly signature: string;\n readonly onPress: () => void;\n}\n\n/** Props of {@link G9OutlinedField}: the shared props plus what the composing input supplies. */\nexport interface G9OutlinedFieldFrameProps extends G9OutlinedFieldProps {\n readonly focused: boolean;\n readonly hasValue: boolean;\n readonly valueFloated?: boolean;\n readonly textLength?: number;\n /** The input element (or any content) inside the box. */\n readonly children?: ReactNode;\n /** A built-in trailing affordance; replaces the trailing icon props (busy still wins). */\n readonly trailingAffordance?: G9TrailingAffordance | null;\n /** Tapping the box (outside the icons) focuses the content (MAUI `FocusTarget`). */\n readonly onFocusRequest?: () => void;\n /** Resting tone (`'placeholder'` for search, MAUI `ResolveRestingOutlineColor` override). */\n readonly restingTone?: 'outline' | 'placeholder';\n /** Vertical placement of the icons and the resting label: centred (entries) or top/bottom (editor). */\n readonly multiline?: boolean;\n /** Accessibility label of the box (defaults to the label text). */\n readonly accessibilityLabel?: string;\n /**\n * A hint the frame draws over the content while the field is empty (`resolveInnerHint`, MAUI 1.4.9): text inputs pass\n * it; the pickers draw their own value text. TextTertiary, the input's 15 px, never taking a touch.\n */\n readonly hint?: string | null;\n}\n\nfunction physicalSide(column: 0 | 2): 'left' | 'right' {\n return column === 0 ? 'left' : 'right';\n}\n\n/**\n * The outlined field frame (MAUI `G9OutlinedFieldBase`): outline with a notched floating label, leading and\n * trailing icon slots, helper/error line and counter. Inputs (`G9TextEntry`, `G9Editor`, `G9SearchEntry`, the pickers)\n * put their element in `children`. Direction is set on the root from the culture (labels, icons, helper follow it;\n * the input decides its own text direction). A tap on an icon never focuses the content; a tap elsewhere on the box\n * calls `onFocusRequest`.\n *\n * Look: colours come from the theme variables (`--g9-primary`, `--g9-outline`, `--g9-error`, …). The floated label\n * sits on the outline with the background `--g9-field-notch-background` (default `--g9-background`; set it on a\n * container of another colour with `g9FieldNotchStyle`, G9 sheets and popups do), which hides the\n * outline under it.\n */\nexport function G9OutlinedField(props: G9OutlinedFieldFrameProps): ReactNode {\n const anchorHandle = useG9Anchor(\n props.id,\n props.anchor ?? { kind: 'entry', label: () => props.label ?? props.placeholder, enabled: () => !props.disabled },\n props.id ? { domId: props.id } : {},\n );\n const direction = useG9Direction();\n const isRtl = direction === 'rtl';\n const state = useOutlinedField(props, {\n focused: props.focused,\n hasValue: props.hasValue,\n valueFloated: props.valueFloated ?? false,\n textLength: props.textLength ?? 0,\n restingTone: props.restingTone ?? 'outline',\n });\n const leading = {\n emoji: props.leadingEmoji ?? null,\n icon: props.leadingIcon,\n imagePath: props.leadingImagePath ?? null,\n image: props.leadingImage ?? null,\n };\n const trailing = {\n emoji: props.trailingEmoji ?? null,\n icon: props.trailingIcon,\n imagePath: props.trailingImagePath ?? null,\n image: props.trailingImage ?? null,\n };\n const busy = props.isTrailingBusy === true;\n const affordance = props.trailingAffordance ?? null;\n const hasLeading = hasIconSlot(leading);\n const hasTrailing = busy || affordance !== null || hasIconSlot(trailing);\n const pad = props.innerContentPadding ?? {};\n const slot = resolveFieldSlotLayout(\n {\n hasLeadingIcon: hasLeading,\n hasTrailingIcon: hasTrailing,\n isRtl,\n forceTrailingIconRight: props.forceTrailingIconRight === true,\n forceLeadingIconLeft: props.forceLeadingIconLeft === true,\n },\n { left: pad.left ?? 0, top: pad.top ?? 0, right: pad.right ?? 0, bottom: pad.bottom ?? 0 },\n );\n const disabled = props.disabled === true;\n const leadingActionable = props.onLeadingPress !== undefined;\n const trailingActionable = affordance !== null || props.onTrailingPress !== undefined;\n const onLeadingTap = () => {\n if (disabled || !leadingActionable) return;\n props.onLeadingPress?.();\n };\n const onTrailingTap = () => {\n if (disabled || busy || !trailingActionable) return;\n if (affordance) affordance.onPress();\n else props.onTrailingPress?.();\n };\n const onBoxTap = () => {\n if (!disabled) props.onFocusRequest?.();\n };\n\n const multiline = props.multiline === true;\n const labelHeight = G9Metrics.FloatingLabelHeight;\n // MAUI rests the label in the middle of the box's MEASURED height (ResolveFieldHeight → _box.Height): an empty\n // editor of 110 dp shows «شرح» halfway down it, not on its first line. Before the first layout: the control height.\n const [boxHeight, setBoxHeight] = useState(0);\n const restTop =\n ((multiline && boxHeight > 8 ? boxHeight : multiline ? G9Metrics.ControlHeight : state.fieldHeight) - labelHeight) /\n 2;\n const labelX = slot.labelRestX + (state.floated ? slot.labelFloatedX : 0);\n const labelAnchor = isRtl ? 'right' : 'left';\n const iconSize = G9Metrics.InputIconSize;\n const slotStyle = (column: 0 | 2, width: number, bottomAligned: boolean) => ({\n [physicalSide(column)]: '0px',\n width: `${width}px`,\n ...(bottomAligned\n ? { bottom: '0px', height: `${G9Metrics.EditorTrailingSlotHeight}px` }\n : { top: '0px', bottom: '0px' }),\n });\n\n const trailingContent = busy ? (\n <view className=\"g9-field__busy\" style={{ borderColor: state.stateColor, borderTopColor: 'transparent' }} />\n ) : affordance ? (\n <G9IconSlot icon={affordance.icon} color={affordance.color ?? state.stateColor} size={iconSize} />\n ) : (\n <G9IconSlot {...trailing} color={state.stateColor} size={iconSize} />\n );\n\n return (\n <view\n className={`g9-field g9-dir-${direction}${disabled ? ' g9-field--disabled' : ''}${props.className ? ` ${props.className}` : ''}`}\n {...anchorHandle.props}\n >\n <view\n {...g9KeyboardTargetProps}\n className={`g9-field__box${state.floated ? ' g9-field__box--floated' : ''}${props.focused ? ' g9-field__box--focused' : ''}`}\n accessibility-element={false}\n style={{\n height: multiline ? undefined : `${state.fieldHeight}px`,\n minHeight: multiline ? `${state.fieldHeight}px` : undefined,\n marginTop: props.reserveFloatingLabelClearance ? `${G9Metrics.FloatingLabelClearance}px` : '0px',\n }}\n bindtap={onBoxTap}\n {...(multiline\n ? {\n bindlayoutchange: (e: { detail?: { height?: number } }) => {\n const h = e.detail?.height ?? 0;\n if (Math.abs(h - boxHeight) > 0.5) setBoxHeight(h);\n },\n }\n : {})}\n >\n {/* The outline is its own view (MAUI paints it on a canvas): a stroke change never moves the content, and a\n disabled field dims it without an opacity layer on the box, which clipped the floated label on Android. */}\n <view\n className=\"g9-field__outline\"\n style={{\n borderColor: state.stateColor,\n borderWidth: `${state.strokeWidth}px`,\n borderRadius: `${G9Metrics.RadiusMd}px`,\n }}\n />\n {state.haloWidth > 0 ? (\n <view\n className=\"g9-field__halo\"\n style={{\n borderColor: state.stateColor,\n borderWidth: `${state.haloWidth}px`,\n opacity: G9Metrics.FocusRingOpacity,\n borderRadius: `${G9Metrics.RadiusMd}px`,\n }}\n />\n ) : null}\n <view\n className=\"g9-field__content\"\n style={{\n paddingLeft: `${slot.innerPadding.left + (hasLeading && slot.leadingColumn === 0 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 0 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n paddingRight: `${slot.innerPadding.right + (hasLeading && slot.leadingColumn === 2 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 2 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n paddingTop: `${slot.innerPadding.top}px`,\n paddingBottom: `${slot.innerPadding.bottom}px`,\n }}\n >\n {props.children}\n {props.hint && !props.hasValue && props.valueFloated !== true ? (\n <view\n className={`g9-field__hint${multiline ? ' g9-field__hint--multiline' : ''}`}\n user-interaction-enabled={false}\n style={{\n left: `${slot.innerPadding.left + (hasLeading && slot.leadingColumn === 0 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 0 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n right: `${slot.innerPadding.right + (hasLeading && slot.leadingColumn === 2 ? G9Metrics.LeadingIconSlotWidth : 0) + (hasTrailing && slot.trailingColumn === 2 ? G9Metrics.TrailingIconSlotWidth : 0)}px`,\n ...(multiline ? { top: `${slot.innerPadding.top}px` } : {}),\n }}\n >\n <text\n className=\"g9-field__hint-text\"\n {...(multiline ? {} : { 'text-maxline': '1' })}\n style={{\n textAlign: isRtl ? 'right' : 'left',\n color: disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-tertiary)',\n }}\n >\n {props.hint}\n </text>\n </view>\n ) : null}\n </view>\n {hasLeading ? (\n <view\n className=\"g9-field__slot g9-field__slot--leading\"\n style={slotStyle(slot.leadingColumn, G9Metrics.LeadingIconSlotWidth, false)}\n catchtap={onLeadingTap}\n {...(leadingActionable ? { 'accessibility-element': true, 'accessibility-traits': 'button' } : {})}\n >\n <G9IconSlot {...leading} color={state.restingContentColor} size={iconSize} />\n </view>\n ) : null}\n {hasTrailing ? (\n <view\n key={busy ? 'busy' : affordance ? affordance.signature : 'icon'}\n className=\"g9-field__slot g9-field__slot--trailing\"\n style={slotStyle(slot.trailingColumn, G9Metrics.TrailingIconSlotWidth, multiline && !busy)}\n catchtap={onTrailingTap}\n {...(trailingActionable\n ? {\n 'accessibility-element': true,\n 'accessibility-traits': 'button',\n ...(affordance?.label ? { 'accessibility-label': affordance.label } : {}),\n }\n : {})}\n >\n {trailingContent}\n </view>\n ) : null}\n {state.labelText ? (\n <text\n className={`g9-field__label${state.floated ? ' g9-field__label--floated' : ''}`}\n style={{\n [labelAnchor]: `${G9Metrics.InputHorizontalPadding}px`,\n top: `${state.floated ? G9Metrics.FloatingLabelFloatedY : restTop}px`,\n fontSize: `${state.floated ? G9Metrics.FloatingLabelFontSizeFloat : G9Metrics.FloatingLabelFontSizeRest}px`,\n color: disabled ? 'var(--g9-text-disabled)' : state.labelColor,\n transform: `translateX(${labelX}px)`,\n }}\n >\n {state.labelText}\n </text>\n ) : null}\n </view>\n {state.footerVisible ? (\n <view className=\"g9-field__footer\" style={g9RowStyle(direction)}>\n {state.helperText ? (\n <text\n className=\"g9-field__helper\"\n style={{ color: state.helperColor, textAlign: isRtl ? 'right' : 'left' }}\n >\n {state.helperText}\n </text>\n ) : (\n <view className=\"g9-field__helper\" />\n )}\n {/* RLM first in a right-to-left field: «0 / 4000» has no strong letter, so it would lay out left-to-right; MAUI's\n label inherits the RTL flow and reads «۴۰۰۰ / ۰». */}\n {state.counterText ? (\n <text className=\"g9-field__counter\">{`${isRtl ? '\\u200F' : ''}${state.counterText}`}</text>\n ) : null}\n </view>\n ) : null}\n </view>\n );\n}\n"],"names":["v","token","blank","s","resolveRestingPlaceholder","props","placeholder","resolveInnerHint","owns","resolveOutlinedFieldState","input","_props_filledValueHighlight","_props_statusColor","_props_errorText","_props_helperText","_props_maxLength","_ref","hasError","useStatus","filled","highlight","G9FilledValueHighlight","accentFilled","placeholderTone","restingOutline","restingContentColor","stateColor","floated","neutralFilledRest","labelColor","helperRaw","helperText","maxLength","counterText","emphasis","halo","labelRaw","G9Metrics","useOutlinedField","settings","useG9Settings","physicalSide","column","G9OutlinedField","_props_anchor","_props_valueFloated","_props_textLength","_props_restingTone","_props_leadingEmoji","_props_leadingImagePath","_props_leadingImage","_props_trailingEmoji","_props_trailingImagePath","_props_trailingImage","_props_trailingAffordance","_props_innerContentPadding","_pad_left","_pad_top","_pad_right","_pad_bottom","_affordance_color","anchorHandle","useG9Anchor","_props_label","direction","useG9Direction","isRtl","state","leading","trailing","busy","affordance","hasLeading","hasIconSlot","hasTrailing","pad","slot","resolveFieldSlotLayout","disabled","leadingActionable","undefined","trailingActionable","onLeadingTap","onTrailingTap","onBoxTap","multiline","labelHeight","boxHeight","setBoxHeight","useState","restTop","labelX","labelAnchor","iconSize","slotStyle","width","bottomAligned","trailingContent","view","G9IconSlot","g9KeyboardTargetProps","e","_e_detail","h","Math","text","g9RowStyle"],"mappings":";;;;;;;;;AAiIA,MAAMA,IAAI,CAACC,QAA0B,CAAC,SAAS,EAAEA,MAAM,CAAC,CAAC;AACzD,MAAMC,QAAQ,CAACC,IAA0CA,AAAK,QAALA,KAAaA,AAAa,OAAbA,EAAE,IAAI;AAOrE,SAASC,0BACdC,KAAgG;IAEhG,IAAIH,MAAMG,MAAM,WAAW,GAAG,OAAO;IACrC,MAAMC,cAAcD,MAAM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F;IACtF,QAAQ,CAAC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IACvC,wEAAwE;IACxE,QAAQ,CAAC,uBAAuB,CAAC,EAAE,OAAO,CAAC;CAC5C;AAED,gDAAgD;AAChD,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC;AAElD;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE;IACxC,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,SAAS,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;CAClC,GAAG,OAAO,CAEV;AAED,4DAA4D;AAC5D,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;IACjD,QAAQ,CAAC,WAAW,CAAC,EAAE,gBAAgB,CAAC,aAAa,CAAC,CAAC;IACvD,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9C;AAED,UAAU,SAAU,SAAQ,gBAAgB;IAC1C,QAAQ,CAAC,OAAO,EAAE,cAAc,CAAC;CAClC;AAED;;;GAGG;AACH,eAAO,MAAM,aAAa,yGAsGzB,CAAC;AAIF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,WAAW,gHAEtB,CAAC"}
@@ -50,7 +50,23 @@ const TextEntryBody = forwardRef(function(props, ref) {
50
50
  };
51
51
  const masked = true === props.isPassword && !core.passwordVisible;
52
52
  const keyboard = resolveEffectiveKeyboard(core.inputType, null != (_props_keyboardType = props.keyboardType) ? _props_keyboardType : G9KeyboardType.Default);
53
- return <G9OutlinedField {...props} hint={resolveInnerHint(props)} hasError={core.hasError} errorText={null != (_core_errorText = core.errorText) ? _core_errorText : null} forceTrailingIconRight={true === props.forceTrailingIconRight || passwordToggle} focused={core.focused} hasValue={core.hasValue} textLength={core.text.length} trailingAffordance={affordance} restingTone={null != (_props_variant_restingTone = props.variant.restingTone) ? _props_variant_restingTone : 'outline'} onFocusRequest={core.focus}>
53
+ return <G9OutlinedField anchor={{
54
+ kind: 'entry',
55
+ label: ()=>{
56
+ var _props_label;
57
+ return null != (_props_label = props.label) ? _props_label : props.placeholder;
58
+ },
59
+ enabled: ()=>!props.disabled,
60
+ capabilities: {
61
+ getValue: ()=>core.text,
62
+ setValue: (v)=>{
63
+ core.setText(v, {
64
+ source: 'programmatic'
65
+ });
66
+ },
67
+ focus: ()=>core.focus()
68
+ }
69
+ }} {...props} hint={resolveInnerHint(props)} hasError={core.hasError} errorText={null != (_core_errorText = core.errorText) ? _core_errorText : null} forceTrailingIconRight={true === props.forceTrailingIconRight || passwordToggle} focused={core.focused} hasValue={core.hasValue} textLength={core.text.length} trailingAffordance={affordance} restingTone={null != (_props_variant_restingTone = props.variant.restingTone) ? _props_variant_restingTone : 'outline'} onFocusRequest={core.focus}>
54
70
  {}
55
71
  {true === props.readOnly && !masked ? <text className="g9-field__input g9-field__input--readonly" text-maxline="1" style={{
56
72
  direction: core.textDirection,
@@ -1 +1 @@
1
- {"version":3,"file":"fields/text-entry.jsx","sources":["../../src/fields/text-entry.tsx"],"sourcesContent":["import { G9KeyboardType, G9StringKey } from '@g9tm/lynxcontrols-foundation';\nimport { forwardRef, type ReactNode, useImperativeHandle } from '@lynx-js/react';\nimport { useG9Settings, useG9Strings } from '../provider/hooks';\nimport { resolveEffectiveKeyboard, resolveInputElementType } from './input-policy';\nimport { G9OutlinedField, type G9TrailingAffordance, resolveInnerHint } from './outlined-field';\nimport { type G9TextInputHandle, type G9TextInputProps, useTextInput } from './use-text-input';\nimport type { G9TextValidator } from './validator';\n\n/** Props of {@link G9TextEntry} (MAUI `G9TextEntry`). */\nexport interface G9TextEntryProps extends G9TextInputProps {\n /** Eye toggle in the trailing slot while there is a value; pins the trailing icon right. Default false. */\n readonly passwordToggle?: boolean;\n /** Mask the value (until the eye reveals it); the text is pinned LTR. Default false. */\n readonly isPassword?: boolean;\n /** Clear (×) button in the trailing slot while there is a value. Default false. */\n readonly clearButton?: boolean;\n /** Extra validation, run before the input-type rule (on blur, `validateOnTextChanged`, `validate()`). */\n readonly validator?: G9TextValidator | null;\n /** Validate on every change, not only on blur. Default false. */\n readonly validateOnTextChanged?: boolean;\n /** Keyboard confirm key. Default `'done'`. */\n readonly confirmType?: 'send' | 'search' | 'go' | 'done' | 'next';\n /** iOS spell checking (`ios-spell-check`; Android has no attribute). Default true. */\n readonly isSpellCheckEnabled?: boolean;\n /** iOS auto-correct / prediction (`ios-auto-correct`). Default true. */\n readonly isTextPredictionEnabled?: boolean;\n}\n\n/** Imperative handle of {@link G9TextEntry}. */\nexport type G9TextEntryHandle = G9TextInputHandle;\n\n/**\n * Whether the trailing slot shows the microphone (MAUI `ShouldShowVoiceMic`): dictation available, not while the\n * password eye owns the slot, and only on an empty field or during a session (the clear button owns a filled field).\n */\nexport function shouldShowEntryMic(state: {\n readonly available: boolean;\n readonly listening: boolean;\n readonly hasValue: boolean;\n readonly passwordToggle: boolean;\n}): boolean {\n return state.available && !(state.passwordToggle && state.hasValue) && (state.listening || !state.hasValue);\n}\n\n/** What `G9SearchEntry` changes in the entry (internal). */\nexport interface G9EntryVariant {\n readonly name: string;\n readonly restingTone?: 'outline' | 'placeholder';\n readonly confirmType?: G9TextEntryProps['confirmType'];\n readonly onConfirm?: (value: string) => void;\n}\n\ninterface BodyProps extends G9TextEntryProps {\n readonly variant: G9EntryVariant;\n}\n\n/**\n * The entry body shared by `G9TextEntry` and `G9SearchEntry` (internal). The inner name must differ from the binding\n * (E20, scripts/check-dist-jsx.mjs): `G9TextEntry` renders it in this module.\n */\nexport const TextEntryBody = forwardRef<G9TextEntryHandle, BodyProps>(\n function TextEntryBodyRender(props, ref): ReactNode {\n const glyphs = useG9Settings().glyphs;\n const strings = useG9Strings();\n const passwordToggle = props.passwordToggle === true;\n const core = useTextInput(\n { ...props, ...(props.variant.onConfirm ? { onConfirm: props.variant.onConfirm } : {}) },\n {\n name: props.variant.name,\n validator: props.validator ?? null,\n validateOnTextChanged: props.validateOnTextChanged === true,\n isPassword: props.isPassword === true,\n showMic: (s) => shouldShowEntryMic({ ...s, passwordToggle }),\n },\n );\n useImperativeHandle(ref, () => core.handle);\n\n let affordance: G9TrailingAffordance | null = null;\n if (passwordToggle && core.hasValue) {\n affordance = {\n icon: core.passwordVisible ? glyphs.eyeClosed : glyphs.eyeOpen,\n signature: core.passwordVisible ? 'eye-closed' : 'eye-open',\n onPress: () => core.setPasswordVisible(!core.passwordVisible),\n };\n } else if (core.showMic) {\n affordance = {\n icon: core.dictation.listening ? glyphs.micOff : glyphs.mic,\n color: core.dictation.listening ? 'var(--g9-error)' : 'var(--g9-primary)',\n signature: 'voice',\n onPress: core.pressMic,\n };\n } else if (props.clearButton === true && core.hasValue) {\n affordance = {\n icon: glyphs.clear,\n label: strings.get(G9StringKey.Clear),\n signature: 'clear',\n onPress: () => core.setText('', { source: 'clear' }),\n };\n }\n\n const masked = props.isPassword === true && !core.passwordVisible;\n const keyboard = resolveEffectiveKeyboard(core.inputType, props.keyboardType ?? G9KeyboardType.Default);\n return (\n <G9OutlinedField\n {...props}\n hint={resolveInnerHint(props)}\n hasError={core.hasError}\n errorText={core.errorText ?? null}\n forceTrailingIconRight={props.forceTrailingIconRight === true || passwordToggle}\n focused={core.focused}\n hasValue={core.hasValue}\n textLength={core.text.length}\n trailingAffordance={affordance}\n restingTone={props.variant.restingTone ?? 'outline'}\n onFocusRequest={core.focus}\n >\n {/* A read-only (unmasked) field shows its value as text: nobody types into it, and a native read-only\n EditText ignored the value pushed into it (a scan-only barcode field stayed blank). */}\n {props.readOnly === true && !masked ? (\n <text\n className=\"g9-field__input g9-field__input--readonly\"\n text-maxline=\"1\"\n style={{\n direction: core.textDirection,\n textAlign: core.textDirection === 'rtl' ? 'right' : 'left',\n ...(core.font ? { fontFamily: core.font } : {}),\n color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)',\n }}\n >\n {core.text}\n </text>\n ) : (\n <input\n {...core.elementProps}\n className=\"g9-field__input\"\n type={resolveInputElementType(core.inputType, keyboard, masked)}\n confirm-type={props.variant.confirmType ?? props.confirmType ?? 'done'}\n ios-spell-check={props.isSpellCheckEnabled !== false}\n ios-auto-correct={props.isTextPredictionEnabled !== false}\n style={{\n direction: core.textDirection,\n textAlign: core.textDirection === 'rtl' ? 'right' : 'left',\n ...(core.font ? { fontFamily: core.font } : {}),\n color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)',\n }}\n />\n )}\n </G9OutlinedField>\n );\n },\n);\n\nconst entryVariant: G9EntryVariant = { name: 'G9TextEntry.value' };\n\n/**\n * Single-line outlined text field (MAUI `G9TextEntry`): floating label, input-type keyboard/filter/validation,\n * password eye, clear button, optional dictation (`voiceEnabled` + `services.speech`).\n *\n * - Value: `value`/`defaultValue`/`onValueChange(value, { source })`; one call per change.\n * - Validation: on blur when there is a rule (`validator`, email/url, custom pattern), on every change with\n * `validateOnTextChanged`, or through the handle's `validate()`. An error set through `hasError`/`errorText`\n * survives blur on a field without a rule.\n * - Requires the host's `xelement-input` registration (plan/specs/02 §2). Keyboard avoidance: put the form inside\n * lynx-ui `KeyboardAwareRoot`/`KeyboardAwareResponder`; the field reports focus to it.\n */\nexport const G9TextEntry = forwardRef<G9TextEntryHandle, G9TextEntryProps>(function G9TextEntry(props, ref) {\n return <TextEntryBody {...props} variant={entryVariant} ref={ref} />;\n});\n"],"names":["shouldShowEntryMic","state","TextEntryBody","forwardRef","props","ref","_props_validator","_props_keyboardType","_core_errorText","_props_variant_restingTone","_ref","glyphs","useG9Settings","strings","useG9Strings","passwordToggle","core","useTextInput","s","useImperativeHandle","affordance","G9StringKey","masked","keyboard","resolveEffectiveKeyboard","G9KeyboardType","G9OutlinedField","resolveInnerHint","text","input","resolveInputElementType","entryVariant","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AAM,QAAQ,GAAG,4BAA4B;IACtD,GACD;YACC,CAACY,KAAK,IAAI,CAAC;UACb,EAAEY,SAEDC,OACE,GAAGb,KAAK,YAAY,EACrB,UAAU,kBACV,MAAMc,wBAAwBd,KAAK,SAAS,EAAEO,UAAUD,SACxD,cAAc,QAAAZ,CAAAA,OAAAA,QAAAA,CAAAA,6BAAAA,MAAM,OAAO,CAAC,WAAW,AAAD,IAAxBA,6BAA6BN,MAAM,WAAW,AAAD,IAA7CM,OAAkD,QAChE,iBAAiBN,AAA8B,UAA9BA,MAAM,mBAAmB,EAC1C,kBAAkBA,AAAkC,UAAlCA,MAAM,uBAAuB,EAC/C,OAAO;QACL,WAAWY,KAAK,aAAa;QAC7B,WAAWA,AAAuB,UAAvBA,KAAK,aAAa,GAAa,UAAU;QACpD,GAAIA,KAAK,IAAI,GAAG;YAAE,YAAYA,KAAK,IAAI;QAAC,IAAI,CAAC,CAAC;QAC9C,OAAOZ,MAAM,QAAQ,GAAG,4BAA4B;IACtD,KAEF;MACJ,EAAEsB;AAEN;AAGF,MAAMK,eAA+B;IAAE,MAAM;AAAoB;AAa1D,MAAMC,yBAAc7B,WAAgD,SAAqBC,KAAK,EAAEC,GAAG;IACxG,QAAQH,eAAe,GAAGE,KAAK,EAAE,SAAS2B,cAAc,KAAK1B;AAC/D"}
1
+ {"version":3,"file":"fields/text-entry.jsx","sources":["../../src/fields/text-entry.tsx"],"sourcesContent":["import { G9KeyboardType, G9StringKey } from '@g9tm/lynxcontrols-foundation';\nimport { forwardRef, type ReactNode, useImperativeHandle } from '@lynx-js/react';\nimport { useG9Settings, useG9Strings } from '../provider/hooks';\nimport { resolveEffectiveKeyboard, resolveInputElementType } from './input-policy';\nimport { G9OutlinedField, type G9TrailingAffordance, resolveInnerHint } from './outlined-field';\nimport { type G9TextInputHandle, type G9TextInputProps, useTextInput } from './use-text-input';\nimport type { G9TextValidator } from './validator';\n\n/** Props of {@link G9TextEntry} (MAUI `G9TextEntry`). */\nexport interface G9TextEntryProps extends G9TextInputProps {\n /** Eye toggle in the trailing slot while there is a value; pins the trailing icon right. Default false. */\n readonly passwordToggle?: boolean;\n /** Mask the value (until the eye reveals it); the text is pinned LTR. Default false. */\n readonly isPassword?: boolean;\n /** Clear (×) button in the trailing slot while there is a value. Default false. */\n readonly clearButton?: boolean;\n /** Extra validation, run before the input-type rule (on blur, `validateOnTextChanged`, `validate()`). */\n readonly validator?: G9TextValidator | null;\n /** Validate on every change, not only on blur. Default false. */\n readonly validateOnTextChanged?: boolean;\n /** Keyboard confirm key. Default `'done'`. */\n readonly confirmType?: 'send' | 'search' | 'go' | 'done' | 'next';\n /** iOS spell checking (`ios-spell-check`; Android has no attribute). Default true. */\n readonly isSpellCheckEnabled?: boolean;\n /** iOS auto-correct / prediction (`ios-auto-correct`). Default true. */\n readonly isTextPredictionEnabled?: boolean;\n}\n\n/** Imperative handle of {@link G9TextEntry}. */\nexport type G9TextEntryHandle = G9TextInputHandle;\n\n/**\n * Whether the trailing slot shows the microphone (MAUI `ShouldShowVoiceMic`): dictation available, not while the\n * password eye owns the slot, and only on an empty field or during a session (the clear button owns a filled field).\n */\nexport function shouldShowEntryMic(state: {\n readonly available: boolean;\n readonly listening: boolean;\n readonly hasValue: boolean;\n readonly passwordToggle: boolean;\n}): boolean {\n return state.available && !(state.passwordToggle && state.hasValue) && (state.listening || !state.hasValue);\n}\n\n/** What `G9SearchEntry` changes in the entry (internal). */\nexport interface G9EntryVariant {\n readonly name: string;\n readonly restingTone?: 'outline' | 'placeholder';\n readonly confirmType?: G9TextEntryProps['confirmType'];\n readonly onConfirm?: (value: string) => void;\n}\n\ninterface BodyProps extends G9TextEntryProps {\n readonly variant: G9EntryVariant;\n}\n\n/**\n * The entry body shared by `G9TextEntry` and `G9SearchEntry` (internal). The inner name must differ from the binding\n * (E20, scripts/check-dist-jsx.mjs): `G9TextEntry` renders it in this module.\n */\nexport const TextEntryBody = forwardRef<G9TextEntryHandle, BodyProps>(\n function TextEntryBodyRender(props, ref): ReactNode {\n const glyphs = useG9Settings().glyphs;\n const strings = useG9Strings();\n const passwordToggle = props.passwordToggle === true;\n const core = useTextInput(\n { ...props, ...(props.variant.onConfirm ? { onConfirm: props.variant.onConfirm } : {}) },\n {\n name: props.variant.name,\n validator: props.validator ?? null,\n validateOnTextChanged: props.validateOnTextChanged === true,\n isPassword: props.isPassword === true,\n showMic: (s) => shouldShowEntryMic({ ...s, passwordToggle }),\n },\n );\n useImperativeHandle(ref, () => core.handle);\n\n let affordance: G9TrailingAffordance | null = null;\n if (passwordToggle && core.hasValue) {\n affordance = {\n icon: core.passwordVisible ? glyphs.eyeClosed : glyphs.eyeOpen,\n signature: core.passwordVisible ? 'eye-closed' : 'eye-open',\n onPress: () => core.setPasswordVisible(!core.passwordVisible),\n };\n } else if (core.showMic) {\n affordance = {\n icon: core.dictation.listening ? glyphs.micOff : glyphs.mic,\n color: core.dictation.listening ? 'var(--g9-error)' : 'var(--g9-primary)',\n signature: 'voice',\n onPress: core.pressMic,\n };\n } else if (props.clearButton === true && core.hasValue) {\n affordance = {\n icon: glyphs.clear,\n label: strings.get(G9StringKey.Clear),\n signature: 'clear',\n onPress: () => core.setText('', { source: 'clear' }),\n };\n }\n\n const masked = props.isPassword === true && !core.passwordVisible;\n const keyboard = resolveEffectiveKeyboard(core.inputType, props.keyboardType ?? G9KeyboardType.Default);\n return (\n <G9OutlinedField\n anchor={{\n kind: 'entry',\n label: () => props.label ?? props.placeholder,\n enabled: () => !props.disabled,\n capabilities: {\n getValue: () => core.text,\n setValue: (v: string) => {\n core.setText(v, { source: 'programmatic' });\n },\n focus: () => core.focus(),\n },\n }}\n {...props}\n hint={resolveInnerHint(props)}\n hasError={core.hasError}\n errorText={core.errorText ?? null}\n forceTrailingIconRight={props.forceTrailingIconRight === true || passwordToggle}\n focused={core.focused}\n hasValue={core.hasValue}\n textLength={core.text.length}\n trailingAffordance={affordance}\n restingTone={props.variant.restingTone ?? 'outline'}\n onFocusRequest={core.focus}\n >\n {/* A read-only (unmasked) field shows its value as text: nobody types into it, and a native read-only\n EditText ignored the value pushed into it (a scan-only barcode field stayed blank). */}\n {props.readOnly === true && !masked ? (\n <text\n className=\"g9-field__input g9-field__input--readonly\"\n text-maxline=\"1\"\n style={{\n direction: core.textDirection,\n textAlign: core.textDirection === 'rtl' ? 'right' : 'left',\n ...(core.font ? { fontFamily: core.font } : {}),\n color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)',\n }}\n >\n {core.text}\n </text>\n ) : (\n <input\n {...core.elementProps}\n className=\"g9-field__input\"\n type={resolveInputElementType(core.inputType, keyboard, masked)}\n confirm-type={props.variant.confirmType ?? props.confirmType ?? 'done'}\n ios-spell-check={props.isSpellCheckEnabled !== false}\n ios-auto-correct={props.isTextPredictionEnabled !== false}\n style={{\n direction: core.textDirection,\n textAlign: core.textDirection === 'rtl' ? 'right' : 'left',\n ...(core.font ? { fontFamily: core.font } : {}),\n color: props.disabled ? 'var(--g9-text-disabled)' : 'var(--g9-text-primary)',\n }}\n />\n )}\n </G9OutlinedField>\n );\n },\n);\n\nconst entryVariant: G9EntryVariant = { name: 'G9TextEntry.value' };\n\n/**\n * Single-line outlined text field (MAUI `G9TextEntry`): floating label, input-type keyboard/filter/validation,\n * password eye, clear button, optional dictation (`voiceEnabled` + `services.speech`).\n *\n * - Value: `value`/`defaultValue`/`onValueChange(value, { source })`; one call per change.\n * - Validation: on blur when there is a rule (`validator`, email/url, custom pattern), on every change with\n * `validateOnTextChanged`, or through the handle's `validate()`. An error set through `hasError`/`errorText`\n * survives blur on a field without a rule.\n * - Requires the host's `xelement-input` registration (plan/specs/02 §2). Keyboard avoidance: put the form inside\n * lynx-ui `KeyboardAwareRoot`/`KeyboardAwareResponder`; the field reports focus to it.\n */\nexport const G9TextEntry = forwardRef<G9TextEntryHandle, G9TextEntryProps>(function G9TextEntry(props, ref) {\n return <TextEntryBody {...props} variant={entryVariant} ref={ref} />;\n});\n"],"names":["shouldShowEntryMic","state","TextEntryBody","forwardRef","props","ref","_props_validator","_props_keyboardType","_core_errorText","_props_variant_restingTone","_ref","glyphs","useG9Settings","strings","useG9Strings","passwordToggle","core","useTextInput","s","useImperativeHandle","affordance","G9StringKey","masked","keyboard","resolveEffectiveKeyboard","G9KeyboardType","G9OutlinedField","_props_label","v","resolveInnerHint","text","input","resolveInputElementType","entryVariant","G9TextEntry"],"mappings":";;;;;;AAmCO,SAASA,mBAAmBC,KAKlC;IACC,OAAOA,MAAM,SAAS,IAAI,CAAEA,CAAAA,MAAM,cAAc,IAAIA,MAAM,QAAO,KAAOA,CAAAA,MAAM,SAAS,IAAI,CAACA,MAAM,QAAO;AAC3G;AAkBO,MAAMC,gBAAgBC,WAC3B,SAA6BC,KAAK,EAAEC,GAAG;QAQtBC,kBAgC2CC,qBAkB3CC,iBAMEC,4BAuBKC,MAAAA;IAtFtB,MAAMC,SAASC,gBAAgB,MAAM;IACrC,MAAMC,UAAUC;IAChB,MAAMC,iBAAiBX,AAAyB,SAAzBA,MAAM,cAAc;IAC3C,MAAMY,OAAOC,aACX;QAAE,GAAGb,KAAK;QAAE,GAAIA,MAAM,OAAO,CAAC,SAAS,GAAG;YAAE,WAAWA,MAAM,OAAO,CAAC,SAAS;QAAC,IAAI,CAAC,CAAC;IAAE,GACvF;QACE,MAAMA,MAAM,OAAO,CAAC,IAAI;QACxB,WAAW,QAAAE,CAAAA,mBAAAA,MAAM,SAAS,AAAD,IAAdA,mBAAmB;QAC9B,uBAAuBF,AAAgC,SAAhCA,MAAM,qBAAqB;QAClD,YAAYA,AAAqB,SAArBA,MAAM,UAAU;QAC5B,SAAS,CAACc,IAAMlB,mBAAmB;gBAAE,GAAGkB,CAAC;gBAAEH;YAAe;IAC5D;IAEFI,oBAAoBd,KAAK,IAAMW,KAAK,MAAM;IAE1C,IAAII,aAA0C;IAC9C,IAAIL,kBAAkBC,KAAK,QAAQ,EACjCI,aAAa;QACX,MAAMJ,KAAK,eAAe,GAAGL,OAAO,SAAS,GAAGA,OAA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