@aglyn/plugins-mui 1.20.2 → 1.21.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aglyn/plugins-mui",
3
- "version": "1.20.2",
3
+ "version": "1.21.0",
4
4
  "license": "Apache-2.0",
5
5
  "homepage": "https://aglyn.com",
6
6
  "repository": {
@@ -25,12 +25,12 @@
25
25
  "./package.json": "./package.json"
26
26
  },
27
27
  "dependencies": {
28
- "@aglyn/aglyn": "1.20.2",
29
- "@aglyn/shared-data-enums": "1.20.2",
30
- "@aglyn/shared-data-mdi": "1.20.2",
31
- "@aglyn/shared-ui-jsx": "1.20.2",
32
- "@aglyn/shared-ui-theme": "1.20.2",
33
- "@aglyn/shared-util-vendor": "1.20.2",
28
+ "@aglyn/aglyn": "1.21.0",
29
+ "@aglyn/shared-data-enums": "1.21.0",
30
+ "@aglyn/shared-data-mdi": "1.21.0",
31
+ "@aglyn/shared-ui-jsx": "1.21.0",
32
+ "@aglyn/shared-ui-theme": "1.21.0",
33
+ "@aglyn/shared-util-vendor": "1.21.0",
34
34
  "@swc/helpers": "0.5.23",
35
35
  "dayjs": "^1.11.23",
36
36
  "mobx": "^7.0.5",
@@ -233,16 +233,19 @@ AglynFormHelperText.displayName = 'AglynFormHelperText';
233
233
  });
234
234
  AglynSelect.displayName = 'AglynSelect';
235
235
  /** One choice in a Select. */ export const AglynSelectOption = /*#__PURE__*/ forwardRef((props, ref)=>{
236
- const _dropClearedProps = dropClearedProps(props), { value, children } = _dropClearedProps, rest = _object_without_properties_loose(_dropClearedProps, [
236
+ // `sx` is a style for an MUI component; a bare `<option>` would print it
237
+ // as an attribute (`sx=",,[object Object]"`).
238
+ const _dropClearedProps = dropClearedProps(props), { value, children, sx: _sx } = _dropClearedProps, rest = _object_without_properties_loose(_dropClearedProps, [
237
239
  "value",
238
- "children"
240
+ "children",
241
+ "sx"
239
242
  ]);
240
- const text = typeof children === 'string' ? children : '';
243
+ const text = typeof children === 'string' || typeof children === 'number' ? String(children) : '';
241
244
  return /*#__PURE__*/ _jsx("option", _extends({
242
- ref: ref,
243
- value: value != null ? value : text
245
+ ref: ref
244
246
  }, rest, {
245
- children: children
247
+ value: value || text,
248
+ children: text
246
249
  }));
247
250
  });
248
251
  AglynSelectOption.displayName = 'AglynSelectOption';
@@ -519,8 +522,10 @@ export const selectOptionSchema = {
519
522
  color: 'info.main'
520
523
  }
521
524
  },
525
+ // `<option>` holds text and nothing else. Not selfClosing: that strips
526
+ // `children`, and every choice rendered blank.
522
527
  flags: {
523
- selfClosing: Aglyn.FEATURE_FLAG.ENABLED,
528
+ plainTextChildren: Aglyn.FEATURE_FLAG.ENABLED,
524
529
  textEditable: Aglyn.FEATURE_FLAG.ENABLED
525
530
  },
526
531
  attributes: [
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/form-controls.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Aglyn from '@aglyn/aglyn'\nimport {\n mdiCheckboxMarkedOutline,\n mdiFormDropdown,\n mdiFormTextbox,\n mdiFormatText,\n mdiRadioboxMarked,\n mdiStarOutline,\n mdiTextShort,\n mdiTagOutline,\n mdiFormSelect,\n} from '@aglyn/shared-data-mdi'\nimport Checkbox, { type CheckboxProps } from '@mui/material/Checkbox'\nimport FormControl, { type FormControlProps } from '@mui/material/FormControl'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport FormHelperText, {\n type FormHelperTextProps,\n} from '@mui/material/FormHelperText'\nimport FilledInput from '@mui/material/FilledInput'\nimport FormLabel, { type FormLabelProps } from '@mui/material/FormLabel'\nimport NativeSelect from '@mui/material/NativeSelect'\nimport OutlinedInput from '@mui/material/OutlinedInput'\nimport Radio, { type RadioProps } from '@mui/material/Radio'\nimport RadioGroup, { type RadioGroupProps } from '@mui/material/RadioGroup'\nimport Rating, { type RatingProps } from '@mui/material/Rating'\nimport {\n alpha,\n type SxProps,\n type Theme,\n useTheme,\n} from '@mui/material/styles'\nimport {\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n useId,\n} from 'react'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { FIELD_TEXT_CONTENT } from '../constants/field-presets'\nimport { dropClearedProps } from '../utils/drop-cleared-props'\nimport { generatePresetId } from '../utils/generate-preset-id'\n\n/*\n * MUI's FORM ELEMENTS, ONE BESIGNER ELEMENT EACH.\n *\n * A field is not one element: it is a Form Control holding a label, an input\n * and a line of help text, exactly as MUI builds it. Each piece is placed,\n * selected and styled on its own — a label's color, an input's fill and\n * corners, the help text's size — with the ordinary Styles panel, and the\n * presets at the bottom of this file are just ready-made arrangements of\n * them. Nothing here knows about forms submitting: an input carries a NAME,\n * and whatever form it sits in sends what the browser sends.\n *\n * Component ids are persisted in documents; never rename them.\n */\nexport const FORM_CONTROL_ID: Aglyn.ComponentId = 'muiFormControl'\nexport const FORM_LABEL_ID: Aglyn.ComponentId = 'muiFormLabel'\nexport const INPUT_ID: Aglyn.ComponentId = 'muiInput'\nexport const FORM_HELPER_TEXT_ID: Aglyn.ComponentId = 'muiFormHelperText'\nexport const SELECT_ID: Aglyn.ComponentId = 'muiSelect'\nexport const SELECT_OPTION_ID: Aglyn.ComponentId = 'muiSelectOption'\nexport const CHECKBOX_ID: Aglyn.ComponentId = 'muiCheckbox'\nexport const RADIO_GROUP_ID: Aglyn.ComponentId = 'muiRadioGroup'\nexport const RADIO_ID: Aglyn.ComponentId = 'muiRadio'\nexport const CHOICE_LABEL_ID: Aglyn.ComponentId = 'muiFormControlLabel'\nexport const RATING_ID: Aglyn.ComponentId = 'muiRating'\n\n/**\n * The Date and Time Pickers' module (AGL-3825), loaded from here so its chunk\n * is a child of this one: see `formPickers` in element-tier.ts.\n */\nexport const loadFormPickers = () => import('./form-pickers')\n\n/**\n * The id a Form Control gives the input inside it, so the Form Label beside\n * that input names it (`for=`) without the author wiring anything.\n */\nexport const FieldIdContext = createContext<string | undefined>(undefined)\n\nexport interface AglynFormControlProps extends FormControlProps {\n children?: ReactNode\n}\n\n/** A field's frame: label, input and help text together. */\nexport const AglynFormControl = forwardRef<HTMLDivElement, AglynFormControlProps>(\n (props, ref) => {\n const id = `field-${useId().replace(/:/g, '')}`\n return (\n <FieldIdContext.Provider value={id}>\n <FormControl ref={ref} {...dropClearedProps(props)} />\n </FieldIdContext.Provider>\n )\n },\n)\nAglynFormControl.displayName = 'AglynFormControl'\n\n/** The label above an input, linked to it by the Form Control. */\nexport const AglynFormLabel = forwardRef<HTMLLabelElement, FormLabelProps>(\n (props, ref) => {\n const id = useContext(FieldIdContext)\n return (\n <FormLabel\n ref={ref as never}\n component=\"label\"\n {...(id ? { htmlFor: id } : {})}\n {...dropClearedProps(props)}\n />\n )\n },\n)\nAglynFormLabel.displayName = 'AglynFormLabel'\n\nexport interface AglynInputProps {\n /** What the answer is sent as. */\n name?: string\n type?: 'text' | 'email' | 'tel' | 'url' | 'number'\n /** Several lines (a message box) instead of one. */\n multiline?: boolean\n /** Lines a multi-line input starts at. */\n minRows?: number\n placeholder?: string\n required?: boolean\n /**\n * A name for assistive technology when no Form Label sits beside the\n * input — a sign-up row with only a placeholder, for one.\n */\n ariaLabel?: string\n fullWidth?: boolean\n [key: string]: any\n}\n\n/**\n * The outline an Input or Select draws, ON ITS OWN BOX.\n *\n * MUI paints an outlined input's border with an inner `<fieldset>`, so the\n * Styles panel's Border Color, Border and Corner Radius — which reach the\n * element's own box — would change nothing a visitor can see. Hiding that\n * fieldset and drawing the same outline (MUI's resting, hover, focus and\n * error colors) on the box itself puts every border and corner field on the\n * outline you actually see. The node's own styles come after, so whatever an\n * author sets wins; focus and error still show through their own rules.\n *\n * The resting outline sits under `:where()`, which weighs nothing, so the\n * site theme's input border color (the Style components card) outranks it,\n * as MUI's own corner radius and the theme's corners already do.\n */\nconst outlinedBoxSx = (theme: Theme) => ({\n '*:where(&)': {\n border: '1px solid',\n borderColor: alpha(theme.palette.text.primary, 0.23),\n },\n '& .MuiOutlinedInput-notchedOutline': { display: 'none' },\n '&:hover': { borderColor: 'text.primary' },\n '&.Mui-focused': {\n borderColor: 'primary.main',\n boxShadow: `0 0 0 1px ${theme.palette.primary.main}`,\n },\n '&.Mui-error': { borderColor: 'error.main' },\n '&.Mui-disabled': { borderColor: 'action.disabled' },\n})\n\n/**\n * Whether the site theme draws inputs filled: the Input style its Style\n * components card sets, which is MUI's own text field default.\n */\nexport const useFilledInputs = () =>\n useTheme().components?.MuiTextField?.defaultProps?.variant === 'filled'\n\n/** A node's `sx`, as a list the outline can go in front of. */\nexport const nodeSxList = (sx: unknown): SxProps<Theme>[] =>\n sx === undefined || sx === null\n ? []\n : ((Array.isArray(sx) ? sx : [sx]) as SxProps<Theme>[])\n\n/** The box a visitor types in. */\nexport const AglynInput = forwardRef<HTMLDivElement, AglynInputProps>(\n (props, ref) => {\n const {\n name,\n type,\n multiline,\n minRows,\n placeholder,\n required,\n ariaLabel,\n datasetFieldId: _datasetFieldId,\n ...rest\n } = dropClearedProps(props)\n const id = useContext(FieldIdContext)\n const filled = useFilledInputs()\n const inputProps = {\n ...(id ? { id } : {}),\n name: name || undefined,\n type: multiline ? undefined : type || 'text',\n multiline: Boolean(multiline),\n ...(multiline ? { minRows: minRows || 3 } : {}),\n placeholder: placeholder || undefined,\n required: Boolean(required),\n inputProps: ariaLabel ? { 'aria-label': ariaLabel } : undefined,\n }\n if (filled) return <FilledInput ref={ref} {...inputProps} {...rest} />\n return (\n <OutlinedInput\n ref={ref}\n // The label is its own element above the box, so the outline never\n // carries a notch for a floating one.\n notched={false}\n {...inputProps}\n {...rest}\n sx={[outlinedBoxSx, ...nodeSxList(rest['sx'])] as SxProps<Theme>}\n />\n )\n },\n)\nAglynInput.displayName = 'AglynInput'\n\n/** One line of help or guidance under a field. */\nexport const AglynFormHelperText = forwardRef<\n HTMLParagraphElement,\n FormHelperTextProps\n>((props, ref) => <FormHelperText ref={ref} {...dropClearedProps(props)} />)\nAglynFormHelperText.displayName = 'AglynFormHelperText'\n\nexport interface AglynSelectProps {\n name?: string\n required?: boolean\n /** Shown until a choice is made; never sent as an answer. */\n placeholder?: string\n ariaLabel?: string\n fullWidth?: boolean\n size?: 'small' | 'medium'\n children?: ReactNode\n [key: string]: any\n}\n\n/**\n * A dropdown. Its choices are Select Option elements inside it — the\n * browser's own list, so every choice is a real element a page can edit.\n */\nexport const AglynSelect = forwardRef<HTMLDivElement, AglynSelectProps>(\n (props, ref) => {\n const {\n name,\n required,\n placeholder,\n ariaLabel,\n children,\n size,\n datasetFieldId: _datasetFieldId,\n ...rest\n } = dropClearedProps(props)\n const id = useContext(FieldIdContext)\n const filled = useFilledInputs()\n return (\n <NativeSelect\n ref={ref}\n input={\n filled ? (\n <FilledInput size={size} sx={rest['sx']} />\n ) : (\n <OutlinedInput\n notched={false}\n size={size}\n sx={[outlinedBoxSx, ...nodeSxList(rest['sx'])] as SxProps<Theme>}\n />\n )\n }\n defaultValue=\"\"\n inputProps={{\n ...(id ? { id } : {}),\n name: name || undefined,\n required: Boolean(required),\n ...(ariaLabel ? { 'aria-label': ariaLabel } : {}),\n }}\n {...rest}\n // The node's styles ride the outlined box above, where they reach\n // what a visitor sees.\n sx={undefined}\n >\n <option value=\"\" disabled={Boolean(required)}>\n {placeholder || ''}\n </option>\n {children}\n </NativeSelect>\n )\n },\n)\nAglynSelect.displayName = 'AglynSelect'\n\nexport interface AglynSelectOptionProps {\n value?: string\n children?: ReactNode\n}\n\n/** One choice in a Select. */\nexport const AglynSelectOption = forwardRef<\n HTMLOptionElement,\n AglynSelectOptionProps\n>((props, ref) => {\n const { value, children, ...rest } = dropClearedProps(props)\n const text = typeof children === 'string' ? children : ''\n return (\n <option ref={ref} value={value ?? text} {...(rest as object)}>\n {children}\n </option>\n )\n})\nAglynSelectOption.displayName = 'AglynSelectOption'\n\n/**\n * The props an answer element hands MUI: cleared values dropped, and the\n * dataset mapping — authoring data read off the node, never a DOM attribute —\n * taken out.\n */\nfunction withoutMapping<T extends object>(props: T): T {\n const { datasetFieldId: _datasetFieldId, ...rest } = dropClearedProps(\n props as T & { datasetFieldId?: unknown },\n )\n return rest as T\n}\n\n/** A tick box. Put it in a Choice Label to give it words. */\nexport const AglynCheckbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref) => <Checkbox ref={ref} {...withoutMapping(props)} />,\n)\nAglynCheckbox.displayName = 'AglynCheckbox'\n\n/** A set of Radio choices sharing one name; one may be picked. */\nexport const AglynRadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n (props, ref) => <RadioGroup ref={ref} {...withoutMapping(props)} />,\n)\nAglynRadioGroup.displayName = 'AglynRadioGroup'\n\n/** One choice in a Radio Group. Put it in a Choice Label to give it words. */\nexport const AglynRadio = forwardRef<HTMLButtonElement, RadioProps>(\n (props, ref) => <Radio ref={ref} {...dropClearedProps(props)} />,\n)\nAglynRadio.displayName = 'AglynRadio'\n\nexport interface AglynChoiceLabelProps {\n /** The words beside the tick box or radio. */\n label?: string\n children?: ReactNode\n [key: string]: any\n}\n\n/**\n * The words beside a Checkbox or Radio, clickable as one with it — MUI's\n * FormControlLabel, holding the control as its child element.\n */\nexport const AglynChoiceLabel = forwardRef<HTMLLabelElement, AglynChoiceLabelProps>(\n (props, ref) => {\n const { label, children, ...rest } = dropClearedProps(props)\n return (\n <FormControlLabel\n ref={ref}\n label={label ?? ''}\n // The control is whatever element the author placed inside; a\n // `display: contents` holder keeps it the label's direct box.\n control={<span style={{ display: 'contents' }}>{children}</span>}\n {...rest}\n />\n )\n },\n)\nAglynChoiceLabel.displayName = 'AglynChoiceLabel'\n\n/** Stars a visitor picks; sends the number chosen. */\nexport const AglynRating = forwardRef<HTMLSpanElement, RatingProps>(\n (props, ref) => <Rating ref={ref} {...withoutMapping(props)} />,\n)\nAglynRating.displayName = 'AglynRating'\n\n// ── Attributes ──────────────────────────────────────────────────────────────\n\nexport const FIELD_NAME: Aglyn.AglynAttributeSchema = {\n name: 'name',\n label: 'Field name',\n description:\n 'What the answer is sent as — the key it is stored under in submissions. ' +\n 'Two inputs in one form need two names (radios share their group’s).',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\n/**\n * Which field of the form's dataset this answer is stored under — the same\n * picker the all-in-one Form Field had, listing the fields of the dataset\n * chosen on the Form around it. Stored by id, so renaming the dataset field\n * never breaks the mapping; left empty, the answer matches by name.\n */\nexport const FIELD_DATASET_FIELD: Aglyn.AglynAttributeSchema = {\n name: 'datasetFieldId',\n label: 'Maps to schema field',\n description:\n 'The field of the form’s dataset this answer is stored under. Left ' +\n 'empty, it matches a dataset field by its Field name.',\n component: Aglyn.FieldComponentType.DATASET_FIELD_SELECT,\n}\nexport const FIELD_INPUT_SIZE: Aglyn.AglynAttributeSchema = {\n name: 'size',\n label: 'Size',\n description: 'Normal is 56px tall; Small is 40px, to sit beside a button.',\n component: Aglyn.FieldComponentType.SELECT,\n options: [\n { value: 'medium', label: 'Normal' },\n { value: 'small', label: 'Small' },\n ],\n}\nexport const FIELD_REQUIRED: Aglyn.AglynAttributeSchema = {\n name: 'required',\n label: 'Required?',\n description: 'The form will not send until this is answered.',\n component: Aglyn.FieldComponentType.SWITCH,\n}\nexport const FIELD_ARIA_LABEL: Aglyn.AglynAttributeSchema = {\n name: 'ariaLabel',\n label: 'Accessible label',\n description:\n 'Names the input for screen readers when there is no Form Label beside ' +\n 'it. Not shown on the page.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\nexport const FIELD_FULL_WIDTH: Aglyn.AglynAttributeSchema = {\n name: 'fullWidth',\n label: 'Full width?',\n description: 'Fills the width of whatever holds it.',\n component: Aglyn.FieldComponentType.SWITCH,\n}\nconst FIELD_PLACEHOLDER: Aglyn.AglynAttributeSchema = {\n name: 'placeholder',\n label: 'Placeholder',\n description:\n 'A gray hint inside the empty input, such as you@company.com. It is ' +\n 'not a label: it disappears as soon as someone types.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\nconst FIELD_CHOICE_VALUE: Aglyn.AglynAttributeSchema = {\n name: 'value',\n label: 'Value',\n description: 'What is sent when this is chosen.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\n\nexport const category = Aglyn.ComponentCategory.FORMS\n\nexport const formControlSchema: Aglyn.ComponentSchema<AglynFormControlProps> = {\n $id: FORM_CONTROL_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Form Control',\n description:\n 'One field’s frame: holds a Form Label, an input and Helper Text, and ' +\n 'links the label to the input.',\n category,\n icon: { path: mdiFormTextbox.path, sx: { color: 'info.main' } },\n attributes: [\n FIELD_FULL_WIDTH,\n {\n ...FIELD_REQUIRED,\n description: 'Marks the label with an asterisk. Set Required? on the input too.',\n },\n ],\n}\n\nexport const formLabelSchema: Aglyn.ComponentSchema<FormLabelProps> = {\n $id: FORM_LABEL_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Form Label',\n description: 'The words that name a field, above its input.',\n category,\n icon: { path: mdiTagOutline.path, sx: { color: 'info.main' } },\n flags: { textEditable: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [FIELD_TEXT_CONTENT],\n}\n\nexport const inputSchema: Aglyn.ComponentSchema<AglynInputProps> = {\n $id: INPUT_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Input',\n description: 'A box a visitor types in: text, email, phone, link or number.',\n category,\n icon: { path: mdiTextShort.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n {\n name: 'type',\n label: 'Type',\n description: 'What goes in it. Email, phone and link bring the right phone keyboard.',\n component: Aglyn.FieldComponentType.SELECT,\n options: [\n { value: 'text', label: 'Text' },\n { value: 'email', label: 'Email' },\n { value: 'tel', label: 'Phone' },\n { value: 'url', label: 'Link' },\n { value: 'number', label: 'Number' },\n ],\n },\n FIELD_PLACEHOLDER,\n FIELD_REQUIRED,\n {\n name: 'multiline',\n label: 'Several lines?',\n description: 'A message box instead of a single line.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n FIELD_INPUT_SIZE,\n FIELD_FULL_WIDTH,\n FIELD_ARIA_LABEL,\n ],\n}\n\nexport const formHelperTextSchema: Aglyn.ComponentSchema<FormHelperTextProps> = {\n $id: FORM_HELPER_TEXT_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Helper Text',\n description: 'A line of guidance under a field.',\n category,\n icon: { path: mdiFormatText.path, sx: { color: 'info.main' } },\n flags: { textEditable: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [FIELD_TEXT_CONTENT],\n}\n\nexport const selectSchema: Aglyn.ComponentSchema<AglynSelectProps> = {\n $id: SELECT_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Select',\n description: 'A dropdown of Select Options; one may be picked.',\n category,\n icon: { path: mdiFormDropdown.path, sx: { color: 'info.main' } },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n { components: [SELECT_OPTION_ID] },\n ],\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n { ...FIELD_PLACEHOLDER, description: 'Shown until a choice is made; never sent.' },\n FIELD_REQUIRED,\n FIELD_INPUT_SIZE,\n FIELD_FULL_WIDTH,\n FIELD_ARIA_LABEL,\n ],\n}\n\nexport const selectOptionSchema: Aglyn.ComponentSchema<AglynSelectOptionProps> = {\n $id: SELECT_OPTION_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Select Option',\n description: 'One choice in a Select.',\n category,\n icon: { path: mdiFormSelect.path, sx: { color: 'info.main' } },\n flags: {\n selfClosing: Aglyn.FEATURE_FLAG.ENABLED,\n textEditable: Aglyn.FEATURE_FLAG.ENABLED,\n },\n attributes: [\n FIELD_TEXT_CONTENT,\n { ...FIELD_CHOICE_VALUE, description: 'What is sent. Leave empty to send the text.' },\n ],\n}\n\nexport const checkboxSchema: Aglyn.ComponentSchema<CheckboxProps> = {\n $id: CHECKBOX_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Checkbox',\n description: 'A tick box. Put it in a Choice Label to give it words.',\n category,\n icon: { path: mdiCheckboxMarkedOutline.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n { ...FIELD_CHOICE_VALUE, description: 'What is sent when ticked, such as Yes.' },\n FIELD_REQUIRED,\n ],\n}\n\nexport const radioGroupSchema: Aglyn.ComponentSchema<RadioGroupProps> = {\n $id: RADIO_GROUP_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Radio Group',\n description: 'A set of Radio choices; one may be picked.',\n category,\n icon: { path: mdiRadioboxMarked.path, sx: { color: 'info.main' } },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n {\n name: 'row',\n label: 'In a row?',\n description: 'Side by side instead of one under another.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n ],\n}\n\nexport const radioSchema: Aglyn.ComponentSchema<RadioProps> = {\n $id: RADIO_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Radio',\n description: 'One choice in a Radio Group. Put it in a Choice Label to give it words.',\n category,\n icon: { path: mdiRadioboxMarked.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [FIELD_CHOICE_VALUE, FIELD_REQUIRED],\n}\n\nexport const choiceLabelSchema: Aglyn.ComponentSchema<AglynChoiceLabelProps> = {\n $id: CHOICE_LABEL_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Choice Label',\n description: 'The words beside a Checkbox or Radio placed inside it; clicking them ticks it.',\n category,\n icon: { path: mdiTagOutline.path, sx: { color: 'info.main' } },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n { components: [CHECKBOX_ID, RADIO_ID] },\n ],\n attributes: [\n {\n name: 'label',\n label: 'Text',\n description: 'The words beside the box.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n },\n ],\n}\n\nexport const ratingSchema: Aglyn.ComponentSchema<RatingProps> = {\n $id: RATING_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Rating',\n description: 'Stars a visitor picks; sends the number chosen.',\n category,\n icon: { path: mdiStarOutline.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n {\n name: 'max',\n label: 'Stars',\n description: 'How many stars to show.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n ],\n}\n\n// ── Presets: ready-made arrangements of the pieces above ────────────────────\n\nexport const node = (\n componentId: Aglyn.ComponentId,\n props?: Record<string, unknown>,\n nodes?: Aglyn.NodePresetData[],\n sx?: Record<string, unknown>,\n): Aglyn.NodePresetData =>\n ({\n $id: null,\n componentId,\n pluginId: BUNDLE_ID,\n ...(props ? { props } : {}),\n ...(nodes ? { nodes } : {}),\n ...(sx ? { sx } : {}),\n }) as Aglyn.NodePresetData\n\n/** A labelled text field: Form Control › Form Label + Input. */\nexport const textFieldPreset = (\n label: string,\n input: Record<string, unknown>,\n): Aglyn.NodePresetData =>\n node(FORM_CONTROL_ID, { fullWidth: true }, [\n node(FORM_LABEL_ID, { children: label }),\n node(INPUT_ID, { fullWidth: true, ...input }),\n ])\n\nexport const preset = (\n $id: string,\n displayName: string,\n description: string,\n icon: string,\n data: Aglyn.NodePresetData,\n): Aglyn.PresetSchema => ({\n $id,\n type: Aglyn.NodeType.PRESET,\n displayName,\n description,\n pluginId: BUNDLE_ID,\n category,\n icon: { path: icon, sx: { color: 'info.main' } },\n data,\n})\n\n/**\n * Each element on its own, so any piece can be inserted by itself — a bare\n * Input beside a Button in a sign-up row, a Form Label above a field the\n * author is assembling, one more Radio in a group. The field presets below\n * are ready-made arrangements of the same pieces.\n */\nconst singleElementPresets: Aglyn.PresetSchema[] = [\n preset(\n generatePresetId(FORM_CONTROL_ID),\n 'Form Control',\n 'An empty field frame: put a Form Label, an input and Helper Text in it.',\n mdiFormTextbox.path,\n node(FORM_CONTROL_ID, { fullWidth: true }),\n ),\n preset(\n generatePresetId(FORM_LABEL_ID),\n 'Form Label',\n 'The words that name a field, above its input.',\n mdiTagOutline.path,\n node(FORM_LABEL_ID, { children: 'Label' }),\n ),\n preset(\n generatePresetId(INPUT_ID),\n 'Input',\n 'A box a visitor types in, on its own.',\n mdiTextShort.path,\n node(INPUT_ID, { name: 'field', placeholder: 'Type here' }),\n ),\n preset(\n generatePresetId(SELECT_ID),\n 'Select',\n 'A dropdown with two options.',\n mdiFormDropdown.path,\n node(SELECT_ID, { name: 'choice', placeholder: 'Choose…' }, [\n node(SELECT_OPTION_ID, { children: 'Option one' }),\n node(SELECT_OPTION_ID, { children: 'Option two' }),\n ]),\n ),\n preset(\n generatePresetId(SELECT_OPTION_ID),\n 'Select Option',\n 'One more choice for a Select.',\n mdiFormSelect.path,\n node(SELECT_OPTION_ID, { children: 'Option' }),\n ),\n preset(\n generatePresetId(RADIO_GROUP_ID),\n 'Radio Group',\n 'A set of Radio choices sharing one Field name.',\n mdiRadioboxMarked.path,\n node(RADIO_GROUP_ID, { name: 'pick' }, [\n node(CHOICE_LABEL_ID, { label: 'First' }, [node(RADIO_ID, { value: 'First' })]),\n node(CHOICE_LABEL_ID, { label: 'Second' }, [node(RADIO_ID, { value: 'Second' })]),\n ]),\n ),\n preset(\n generatePresetId(RADIO_ID),\n 'Radio',\n 'One more choice for a Radio Group, with its words.',\n mdiRadioboxMarked.path,\n node(CHOICE_LABEL_ID, { label: 'Another choice' }, [\n node(RADIO_ID, { value: 'Another choice' }),\n ]),\n ),\n preset(\n generatePresetId(CHOICE_LABEL_ID),\n 'Choice Label',\n 'Words beside a tick box; holds a Checkbox.',\n mdiTagOutline.path,\n node(CHOICE_LABEL_ID, { label: 'Yes, please' }, [\n node(CHECKBOX_ID, { name: 'agree', value: 'Yes' }),\n ]),\n ),\n preset(\n generatePresetId(RATING_ID),\n 'Rating',\n 'Five stars, on their own.',\n mdiStarOutline.path,\n node(RATING_ID, { name: 'rating' }),\n ),\n]\n\nexport const formControlPresets: Aglyn.PresetSchema[] = [\n ...singleElementPresets,\n preset(\n generatePresetId(FORM_CONTROL_ID, 'text'),\n 'Text field',\n 'A label and a one-line input.',\n mdiFormTextbox.path,\n textFieldPreset('Name', { name: 'name' }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'email'),\n 'Email field',\n 'A label and an email input.',\n mdiFormTextbox.path,\n textFieldPreset('Email', { name: 'email', type: 'email', required: true }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'message'),\n 'Message field',\n 'A label and a several-line input.',\n mdiFormTextbox.path,\n textFieldPreset('Message', { name: 'message', multiline: true, minRows: 4 }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'select'),\n 'Dropdown field',\n 'A label and a Select with three options.',\n mdiFormDropdown.path,\n node(FORM_CONTROL_ID, { fullWidth: true }, [\n node(FORM_LABEL_ID, { children: 'Choose one' }),\n node(SELECT_ID, { name: 'choice', fullWidth: true, placeholder: 'Choose…' }, [\n node(SELECT_OPTION_ID, { children: 'Option one' }),\n node(SELECT_OPTION_ID, { children: 'Option two' }),\n node(SELECT_OPTION_ID, { children: 'Option three' }),\n ]),\n ]),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'radio'),\n 'Radio choice field',\n 'A label and a Radio Group with three choices.',\n mdiRadioboxMarked.path,\n node(FORM_CONTROL_ID, {}, [\n node(FORM_LABEL_ID, { children: 'Pick one' }),\n node(RADIO_GROUP_ID, { name: 'pick' }, [\n node(CHOICE_LABEL_ID, { label: 'First' }, [node(RADIO_ID, { value: 'First' })]),\n node(CHOICE_LABEL_ID, { label: 'Second' }, [node(RADIO_ID, { value: 'Second' })]),\n node(CHOICE_LABEL_ID, { label: 'Third' }, [node(RADIO_ID, { value: 'Third' })]),\n ]),\n ]),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'checkbox'),\n 'Checkbox',\n 'A tick box with words beside it.',\n mdiCheckboxMarkedOutline.path,\n node(CHOICE_LABEL_ID, { label: 'Yes, please' }, [\n node(CHECKBOX_ID, { name: 'agree', value: 'Yes' }),\n ]),\n ),\n preset(\n generatePresetId(FORM_HELPER_TEXT_ID),\n 'Helper Text',\n 'A line of guidance under a field.',\n mdiFormatText.path,\n node(FORM_HELPER_TEXT_ID, { children: 'We never share your address.' }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'rating'),\n 'Rating field',\n 'A label and five stars.',\n mdiStarOutline.path,\n node(FORM_CONTROL_ID, {}, [\n node(FORM_LABEL_ID, { children: 'How did we do?' }),\n node(RATING_ID, { name: 'rating' }),\n ]),\n ),\n]\n"],"names":["Aglyn","mdiCheckboxMarkedOutline","mdiFormDropdown","mdiFormTextbox","mdiFormatText","mdiRadioboxMarked","mdiStarOutline","mdiTextShort","mdiTagOutline","mdiFormSelect","Checkbox","FormControl","FormControlLabel","FormHelperText","FilledInput","FormLabel","NativeSelect","OutlinedInput","Radio","RadioGroup","Rating","alpha","useTheme","createContext","forwardRef","useContext","useId","BUNDLE_ID","FIELD_TEXT_CONTENT","dropClearedProps","generatePresetId","FORM_CONTROL_ID","FORM_LABEL_ID","INPUT_ID","FORM_HELPER_TEXT_ID","SELECT_ID","SELECT_OPTION_ID","CHECKBOX_ID","RADIO_GROUP_ID","RADIO_ID","CHOICE_LABEL_ID","RATING_ID","loadFormPickers","FieldIdContext","undefined","AglynFormControl","props","ref","id","replace","Provider","value","displayName","AglynFormLabel","component","htmlFor","outlinedBoxSx","theme","border","borderColor","palette","text","primary","display","boxShadow","main","useFilledInputs","components","MuiTextField","defaultProps","variant","nodeSxList","sx","Array","isArray","AglynInput","name","type","multiline","minRows","placeholder","required","ariaLabel","datasetFieldId","_datasetFieldId","rest","filled","inputProps","Boolean","notched","AglynFormHelperText","AglynSelect","children","size","input","defaultValue","option","disabled","AglynSelectOption","withoutMapping","AglynCheckbox","AglynRadioGroup","AglynRadio","AglynChoiceLabel","label","control","span","style","AglynRating","FIELD_NAME","description","FieldComponentType","TEXT_FIELD","FIELD_DATASET_FIELD","DATASET_FIELD_SELECT","FIELD_INPUT_SIZE","SELECT","options","FIELD_REQUIRED","SWITCH","FIELD_ARIA_LABEL","FIELD_FULL_WIDTH","FIELD_PLACEHOLDER","FIELD_CHOICE_VALUE","category","ComponentCategory","FORMS","formControlSchema","$id","pluginId","icon","path","color","attributes","formLabelSchema","flags","textEditable","FEATURE_FLAG","ENABLED","inputSchema","selfClosing","formHelperTextSchema","selectSchema","restrictChildren","LinealDirectiveFlag","LIMIT_TO","selectOptionSchema","checkboxSchema","radioGroupSchema","radioSchema","choiceLabelSchema","ratingSchema","node","componentId","nodes","textFieldPreset","fullWidth","preset","data","NodeType","PRESET","singleElementPresets","formControlPresets"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SACEC,wBAAwB,EACxBC,eAAe,EACfC,cAAc,EACdC,aAAa,EACbC,iBAAiB,EACjBC,cAAc,EACdC,YAAY,EACZC,aAAa,EACbC,aAAa,QACR,yBAAwB;AAC/B,OAAOC,cAAsC,yBAAwB;AACrE,OAAOC,iBAA4C,4BAA2B;AAC9E,OAAOC,sBAAsB,iCAAgC;AAC7D,OAAOC,oBAEA,+BAA8B;AACrC,OAAOC,iBAAiB,4BAA2B;AACnD,OAAOC,eAAwC,0BAAyB;AACxE,OAAOC,kBAAkB,6BAA4B;AACrD,OAAOC,mBAAmB,8BAA6B;AACvD,OAAOC,WAAgC,sBAAqB;AAC5D,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a;YAChD4D,KAAKpH,kBAAkB;gBAAEwD,UAAU;YAAa;YAChD4D,KAAKpH,kBAAkB;gBAAEwD,UAAU;YAAe;SACnD;KACF;IAEHiE,OACE/H,iBAAiBC,iBAAiB,UAClC,sBACA,iDACA1B,kBAAkB8H,IAAI,EACtBqB,KAAKzH,iBAAiB,CAAC,GAAG;QACxByH,KAAKxH,eAAe;YAAE4D,UAAU;QAAW;QAC3C4D,KAAKlH,gBAAgB;YAAEsC,MAAM;QAAO,GAAG;YACrC4E,KAAKhH,iBAAiB;gBAAEgE,OAAO;YAAQ,GAAG;gBAACgD,KAAKjH,UAAU;oBAAEY,OAAO;gBAAQ;aAAG;YAC9EqG,KAAKhH,iBAAiB;gBAAEgE,OAAO;YAAS,GAAG;gBAACgD,KAAKjH,UAAU;oBAAEY,OAAO;gBAAS;aAAG;YAChFqG,KAAKhH,iBAAiB;gBAAEgE,OAAO;YAAQ,GAAG;gBAACgD,KAAKjH,UAAU;oBAAEY,OAAO;gBAAQ;aAAG;SAC/E;KACF;IAEH0G,OACE/H,iBAAiBC,iBAAiB,aAClC,YACA,oCACA9B,yBAAyBkI,IAAI,EAC7BqB,KAAKhH,iBAAiB;QAAEgE,OAAO;IAAc,GAAG;QAC9CgD,KAAKnH,aAAa;YAAEuC,MAAM;YAASzB,OAAO;QAAM;KACjD;IAEH0G,OACE/H,iBAAiBI,sBACjB,eACA,qCACA9B,cAAc+H,IAAI,EAClBqB,KAAKtH,qBAAqB;QAAE0D,UAAU;IAA+B;IAEvEiE,OACE/H,iBAAiBC,iBAAiB,WAClC,gBACA,2BACAzB,eAAe6H,IAAI,EACnBqB,KAAKzH,iBAAiB,CAAC,GAAG;QACxByH,KAAKxH,eAAe;YAAE4D,UAAU;QAAiB;QACjD4D,KAAK/G,WAAW;YAAEmC,MAAM;QAAS;KAClC;CAEJ,CAAA"}
1
+ {"version":3,"sources":["../../../../../../../libs/plugins/mui/src/lib/components/form-controls.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2026 Aglyn LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport * as Aglyn from '@aglyn/aglyn'\nimport {\n mdiCheckboxMarkedOutline,\n mdiFormDropdown,\n mdiFormTextbox,\n mdiFormatText,\n mdiRadioboxMarked,\n mdiStarOutline,\n mdiTextShort,\n mdiTagOutline,\n mdiFormSelect,\n} from '@aglyn/shared-data-mdi'\nimport Checkbox, { type CheckboxProps } from '@mui/material/Checkbox'\nimport FormControl, { type FormControlProps } from '@mui/material/FormControl'\nimport FormControlLabel from '@mui/material/FormControlLabel'\nimport FormHelperText, {\n type FormHelperTextProps,\n} from '@mui/material/FormHelperText'\nimport FilledInput from '@mui/material/FilledInput'\nimport FormLabel, { type FormLabelProps } from '@mui/material/FormLabel'\nimport NativeSelect from '@mui/material/NativeSelect'\nimport OutlinedInput from '@mui/material/OutlinedInput'\nimport Radio, { type RadioProps } from '@mui/material/Radio'\nimport RadioGroup, { type RadioGroupProps } from '@mui/material/RadioGroup'\nimport Rating, { type RatingProps } from '@mui/material/Rating'\nimport {\n alpha,\n type SxProps,\n type Theme,\n useTheme,\n} from '@mui/material/styles'\nimport {\n createContext,\n forwardRef,\n type ReactNode,\n useContext,\n useId,\n} from 'react'\nimport { BUNDLE_ID } from '../constants/bundle-common'\nimport { FIELD_TEXT_CONTENT } from '../constants/field-presets'\nimport { dropClearedProps } from '../utils/drop-cleared-props'\nimport { generatePresetId } from '../utils/generate-preset-id'\n\n/*\n * MUI's FORM ELEMENTS, ONE BESIGNER ELEMENT EACH.\n *\n * A field is not one element: it is a Form Control holding a label, an input\n * and a line of help text, exactly as MUI builds it. Each piece is placed,\n * selected and styled on its own — a label's color, an input's fill and\n * corners, the help text's size — with the ordinary Styles panel, and the\n * presets at the bottom of this file are just ready-made arrangements of\n * them. Nothing here knows about forms submitting: an input carries a NAME,\n * and whatever form it sits in sends what the browser sends.\n *\n * Component ids are persisted in documents; never rename them.\n */\nexport const FORM_CONTROL_ID: Aglyn.ComponentId = 'muiFormControl'\nexport const FORM_LABEL_ID: Aglyn.ComponentId = 'muiFormLabel'\nexport const INPUT_ID: Aglyn.ComponentId = 'muiInput'\nexport const FORM_HELPER_TEXT_ID: Aglyn.ComponentId = 'muiFormHelperText'\nexport const SELECT_ID: Aglyn.ComponentId = 'muiSelect'\nexport const SELECT_OPTION_ID: Aglyn.ComponentId = 'muiSelectOption'\nexport const CHECKBOX_ID: Aglyn.ComponentId = 'muiCheckbox'\nexport const RADIO_GROUP_ID: Aglyn.ComponentId = 'muiRadioGroup'\nexport const RADIO_ID: Aglyn.ComponentId = 'muiRadio'\nexport const CHOICE_LABEL_ID: Aglyn.ComponentId = 'muiFormControlLabel'\nexport const RATING_ID: Aglyn.ComponentId = 'muiRating'\n\n/**\n * The Date and Time Pickers' module (AGL-3825), loaded from here so its chunk\n * is a child of this one: see `formPickers` in element-tier.ts.\n */\nexport const loadFormPickers = () => import('./form-pickers')\n\n/**\n * The id a Form Control gives the input inside it, so the Form Label beside\n * that input names it (`for=`) without the author wiring anything.\n */\nexport const FieldIdContext = createContext<string | undefined>(undefined)\n\nexport interface AglynFormControlProps extends FormControlProps {\n children?: ReactNode\n}\n\n/** A field's frame: label, input and help text together. */\nexport const AglynFormControl = forwardRef<HTMLDivElement, AglynFormControlProps>(\n (props, ref) => {\n const id = `field-${useId().replace(/:/g, '')}`\n return (\n <FieldIdContext.Provider value={id}>\n <FormControl ref={ref} {...dropClearedProps(props)} />\n </FieldIdContext.Provider>\n )\n },\n)\nAglynFormControl.displayName = 'AglynFormControl'\n\n/** The label above an input, linked to it by the Form Control. */\nexport const AglynFormLabel = forwardRef<HTMLLabelElement, FormLabelProps>(\n (props, ref) => {\n const id = useContext(FieldIdContext)\n return (\n <FormLabel\n ref={ref as never}\n component=\"label\"\n {...(id ? { htmlFor: id } : {})}\n {...dropClearedProps(props)}\n />\n )\n },\n)\nAglynFormLabel.displayName = 'AglynFormLabel'\n\nexport interface AglynInputProps {\n /** What the answer is sent as. */\n name?: string\n type?: 'text' | 'email' | 'tel' | 'url' | 'number'\n /** Several lines (a message box) instead of one. */\n multiline?: boolean\n /** Lines a multi-line input starts at. */\n minRows?: number\n placeholder?: string\n required?: boolean\n /**\n * A name for assistive technology when no Form Label sits beside the\n * input — a sign-up row with only a placeholder, for one.\n */\n ariaLabel?: string\n fullWidth?: boolean\n [key: string]: any\n}\n\n/**\n * The outline an Input or Select draws, ON ITS OWN BOX.\n *\n * MUI paints an outlined input's border with an inner `<fieldset>`, so the\n * Styles panel's Border Color, Border and Corner Radius — which reach the\n * element's own box — would change nothing a visitor can see. Hiding that\n * fieldset and drawing the same outline (MUI's resting, hover, focus and\n * error colors) on the box itself puts every border and corner field on the\n * outline you actually see. The node's own styles come after, so whatever an\n * author sets wins; focus and error still show through their own rules.\n *\n * The resting outline sits under `:where()`, which weighs nothing, so the\n * site theme's input border color (the Style components card) outranks it,\n * as MUI's own corner radius and the theme's corners already do.\n */\nconst outlinedBoxSx = (theme: Theme) => ({\n '*:where(&)': {\n border: '1px solid',\n borderColor: alpha(theme.palette.text.primary, 0.23),\n },\n '& .MuiOutlinedInput-notchedOutline': { display: 'none' },\n '&:hover': { borderColor: 'text.primary' },\n '&.Mui-focused': {\n borderColor: 'primary.main',\n boxShadow: `0 0 0 1px ${theme.palette.primary.main}`,\n },\n '&.Mui-error': { borderColor: 'error.main' },\n '&.Mui-disabled': { borderColor: 'action.disabled' },\n})\n\n/**\n * Whether the site theme draws inputs filled: the Input style its Style\n * components card sets, which is MUI's own text field default.\n */\nexport const useFilledInputs = () =>\n useTheme().components?.MuiTextField?.defaultProps?.variant === 'filled'\n\n/** A node's `sx`, as a list the outline can go in front of. */\nexport const nodeSxList = (sx: unknown): SxProps<Theme>[] =>\n sx === undefined || sx === null\n ? []\n : ((Array.isArray(sx) ? sx : [sx]) as SxProps<Theme>[])\n\n/** The box a visitor types in. */\nexport const AglynInput = forwardRef<HTMLDivElement, AglynInputProps>(\n (props, ref) => {\n const {\n name,\n type,\n multiline,\n minRows,\n placeholder,\n required,\n ariaLabel,\n datasetFieldId: _datasetFieldId,\n ...rest\n } = dropClearedProps(props)\n const id = useContext(FieldIdContext)\n const filled = useFilledInputs()\n const inputProps = {\n ...(id ? { id } : {}),\n name: name || undefined,\n type: multiline ? undefined : type || 'text',\n multiline: Boolean(multiline),\n ...(multiline ? { minRows: minRows || 3 } : {}),\n placeholder: placeholder || undefined,\n required: Boolean(required),\n inputProps: ariaLabel ? { 'aria-label': ariaLabel } : undefined,\n }\n if (filled) return <FilledInput ref={ref} {...inputProps} {...rest} />\n return (\n <OutlinedInput\n ref={ref}\n // The label is its own element above the box, so the outline never\n // carries a notch for a floating one.\n notched={false}\n {...inputProps}\n {...rest}\n sx={[outlinedBoxSx, ...nodeSxList(rest['sx'])] as SxProps<Theme>}\n />\n )\n },\n)\nAglynInput.displayName = 'AglynInput'\n\n/** One line of help or guidance under a field. */\nexport const AglynFormHelperText = forwardRef<\n HTMLParagraphElement,\n FormHelperTextProps\n>((props, ref) => <FormHelperText ref={ref} {...dropClearedProps(props)} />)\nAglynFormHelperText.displayName = 'AglynFormHelperText'\n\nexport interface AglynSelectProps {\n name?: string\n required?: boolean\n /** Shown until a choice is made; never sent as an answer. */\n placeholder?: string\n ariaLabel?: string\n fullWidth?: boolean\n size?: 'small' | 'medium'\n children?: ReactNode\n [key: string]: any\n}\n\n/**\n * A dropdown. Its choices are Select Option elements inside it — the\n * browser's own list, so every choice is a real element a page can edit.\n */\nexport const AglynSelect = forwardRef<HTMLDivElement, AglynSelectProps>(\n (props, ref) => {\n const {\n name,\n required,\n placeholder,\n ariaLabel,\n children,\n size,\n datasetFieldId: _datasetFieldId,\n ...rest\n } = dropClearedProps(props)\n const id = useContext(FieldIdContext)\n const filled = useFilledInputs()\n return (\n <NativeSelect\n ref={ref}\n input={\n filled ? (\n <FilledInput size={size} sx={rest['sx']} />\n ) : (\n <OutlinedInput\n notched={false}\n size={size}\n sx={[outlinedBoxSx, ...nodeSxList(rest['sx'])] as SxProps<Theme>}\n />\n )\n }\n defaultValue=\"\"\n inputProps={{\n ...(id ? { id } : {}),\n name: name || undefined,\n required: Boolean(required),\n ...(ariaLabel ? { 'aria-label': ariaLabel } : {}),\n }}\n {...rest}\n // The node's styles ride the outlined box above, where they reach\n // what a visitor sees.\n sx={undefined}\n >\n <option value=\"\" disabled={Boolean(required)}>\n {placeholder || ''}\n </option>\n {children}\n </NativeSelect>\n )\n },\n)\nAglynSelect.displayName = 'AglynSelect'\n\nexport interface AglynSelectOptionProps {\n value?: string\n children?: ReactNode\n}\n\n/** One choice in a Select. */\nexport const AglynSelectOption = forwardRef<\n HTMLOptionElement,\n AglynSelectOptionProps\n>((props, ref) => {\n // `sx` is a style for an MUI component; a bare `<option>` would print it\n // as an attribute (`sx=\",,[object Object]\"`).\n const { value, children, sx: _sx, ...rest } = dropClearedProps(\n props as AglynSelectOptionProps & { sx?: unknown },\n )\n const text =\n typeof children === 'string' || typeof children === 'number'\n ? String(children)\n : ''\n return (\n <option ref={ref} {...(rest as object)} value={value || text}>\n {text}\n </option>\n )\n})\nAglynSelectOption.displayName = 'AglynSelectOption'\n\n/**\n * The props an answer element hands MUI: cleared values dropped, and the\n * dataset mapping — authoring data read off the node, never a DOM attribute —\n * taken out.\n */\nfunction withoutMapping<T extends object>(props: T): T {\n const { datasetFieldId: _datasetFieldId, ...rest } = dropClearedProps(\n props as T & { datasetFieldId?: unknown },\n )\n return rest as T\n}\n\n/** A tick box. Put it in a Choice Label to give it words. */\nexport const AglynCheckbox = forwardRef<HTMLButtonElement, CheckboxProps>(\n (props, ref) => <Checkbox ref={ref} {...withoutMapping(props)} />,\n)\nAglynCheckbox.displayName = 'AglynCheckbox'\n\n/** A set of Radio choices sharing one name; one may be picked. */\nexport const AglynRadioGroup = forwardRef<HTMLDivElement, RadioGroupProps>(\n (props, ref) => <RadioGroup ref={ref} {...withoutMapping(props)} />,\n)\nAglynRadioGroup.displayName = 'AglynRadioGroup'\n\n/** One choice in a Radio Group. Put it in a Choice Label to give it words. */\nexport const AglynRadio = forwardRef<HTMLButtonElement, RadioProps>(\n (props, ref) => <Radio ref={ref} {...dropClearedProps(props)} />,\n)\nAglynRadio.displayName = 'AglynRadio'\n\nexport interface AglynChoiceLabelProps {\n /** The words beside the tick box or radio. */\n label?: string\n children?: ReactNode\n [key: string]: any\n}\n\n/**\n * The words beside a Checkbox or Radio, clickable as one with it — MUI's\n * FormControlLabel, holding the control as its child element.\n */\nexport const AglynChoiceLabel = forwardRef<HTMLLabelElement, AglynChoiceLabelProps>(\n (props, ref) => {\n const { label, children, ...rest } = dropClearedProps(props)\n return (\n <FormControlLabel\n ref={ref}\n label={label ?? ''}\n // The control is whatever element the author placed inside; a\n // `display: contents` holder keeps it the label's direct box.\n control={<span style={{ display: 'contents' }}>{children}</span>}\n {...rest}\n />\n )\n },\n)\nAglynChoiceLabel.displayName = 'AglynChoiceLabel'\n\n/** Stars a visitor picks; sends the number chosen. */\nexport const AglynRating = forwardRef<HTMLSpanElement, RatingProps>(\n (props, ref) => <Rating ref={ref} {...withoutMapping(props)} />,\n)\nAglynRating.displayName = 'AglynRating'\n\n// ── Attributes ──────────────────────────────────────────────────────────────\n\nexport const FIELD_NAME: Aglyn.AglynAttributeSchema = {\n name: 'name',\n label: 'Field name',\n description:\n 'What the answer is sent as — the key it is stored under in submissions. ' +\n 'Two inputs in one form need two names (radios share their group’s).',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\n/**\n * Which field of the form's dataset this answer is stored under — the same\n * picker the all-in-one Form Field had, listing the fields of the dataset\n * chosen on the Form around it. Stored by id, so renaming the dataset field\n * never breaks the mapping; left empty, the answer matches by name.\n */\nexport const FIELD_DATASET_FIELD: Aglyn.AglynAttributeSchema = {\n name: 'datasetFieldId',\n label: 'Maps to schema field',\n description:\n 'The field of the form’s dataset this answer is stored under. Left ' +\n 'empty, it matches a dataset field by its Field name.',\n component: Aglyn.FieldComponentType.DATASET_FIELD_SELECT,\n}\nexport const FIELD_INPUT_SIZE: Aglyn.AglynAttributeSchema = {\n name: 'size',\n label: 'Size',\n description: 'Normal is 56px tall; Small is 40px, to sit beside a button.',\n component: Aglyn.FieldComponentType.SELECT,\n options: [\n { value: 'medium', label: 'Normal' },\n { value: 'small', label: 'Small' },\n ],\n}\nexport const FIELD_REQUIRED: Aglyn.AglynAttributeSchema = {\n name: 'required',\n label: 'Required?',\n description: 'The form will not send until this is answered.',\n component: Aglyn.FieldComponentType.SWITCH,\n}\nexport const FIELD_ARIA_LABEL: Aglyn.AglynAttributeSchema = {\n name: 'ariaLabel',\n label: 'Accessible label',\n description:\n 'Names the input for screen readers when there is no Form Label beside ' +\n 'it. Not shown on the page.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\nexport const FIELD_FULL_WIDTH: Aglyn.AglynAttributeSchema = {\n name: 'fullWidth',\n label: 'Full width?',\n description: 'Fills the width of whatever holds it.',\n component: Aglyn.FieldComponentType.SWITCH,\n}\nconst FIELD_PLACEHOLDER: Aglyn.AglynAttributeSchema = {\n name: 'placeholder',\n label: 'Placeholder',\n description:\n 'A gray hint inside the empty input, such as you@company.com. It is ' +\n 'not a label: it disappears as soon as someone types.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\nconst FIELD_CHOICE_VALUE: Aglyn.AglynAttributeSchema = {\n name: 'value',\n label: 'Value',\n description: 'What is sent when this is chosen.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n}\n\nexport const category = Aglyn.ComponentCategory.FORMS\n\nexport const formControlSchema: Aglyn.ComponentSchema<AglynFormControlProps> = {\n $id: FORM_CONTROL_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Form Control',\n description:\n 'One field’s frame: holds a Form Label, an input and Helper Text, and ' +\n 'links the label to the input.',\n category,\n icon: { path: mdiFormTextbox.path, sx: { color: 'info.main' } },\n attributes: [\n FIELD_FULL_WIDTH,\n {\n ...FIELD_REQUIRED,\n description: 'Marks the label with an asterisk. Set Required? on the input too.',\n },\n ],\n}\n\nexport const formLabelSchema: Aglyn.ComponentSchema<FormLabelProps> = {\n $id: FORM_LABEL_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Form Label',\n description: 'The words that name a field, above its input.',\n category,\n icon: { path: mdiTagOutline.path, sx: { color: 'info.main' } },\n flags: { textEditable: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [FIELD_TEXT_CONTENT],\n}\n\nexport const inputSchema: Aglyn.ComponentSchema<AglynInputProps> = {\n $id: INPUT_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Input',\n description: 'A box a visitor types in: text, email, phone, link or number.',\n category,\n icon: { path: mdiTextShort.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n {\n name: 'type',\n label: 'Type',\n description: 'What goes in it. Email, phone and link bring the right phone keyboard.',\n component: Aglyn.FieldComponentType.SELECT,\n options: [\n { value: 'text', label: 'Text' },\n { value: 'email', label: 'Email' },\n { value: 'tel', label: 'Phone' },\n { value: 'url', label: 'Link' },\n { value: 'number', label: 'Number' },\n ],\n },\n FIELD_PLACEHOLDER,\n FIELD_REQUIRED,\n {\n name: 'multiline',\n label: 'Several lines?',\n description: 'A message box instead of a single line.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n FIELD_INPUT_SIZE,\n FIELD_FULL_WIDTH,\n FIELD_ARIA_LABEL,\n ],\n}\n\nexport const formHelperTextSchema: Aglyn.ComponentSchema<FormHelperTextProps> = {\n $id: FORM_HELPER_TEXT_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Helper Text',\n description: 'A line of guidance under a field.',\n category,\n icon: { path: mdiFormatText.path, sx: { color: 'info.main' } },\n flags: { textEditable: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [FIELD_TEXT_CONTENT],\n}\n\nexport const selectSchema: Aglyn.ComponentSchema<AglynSelectProps> = {\n $id: SELECT_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Select',\n description: 'A dropdown of Select Options; one may be picked.',\n category,\n icon: { path: mdiFormDropdown.path, sx: { color: 'info.main' } },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n { components: [SELECT_OPTION_ID] },\n ],\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n { ...FIELD_PLACEHOLDER, description: 'Shown until a choice is made; never sent.' },\n FIELD_REQUIRED,\n FIELD_INPUT_SIZE,\n FIELD_FULL_WIDTH,\n FIELD_ARIA_LABEL,\n ],\n}\n\nexport const selectOptionSchema: Aglyn.ComponentSchema<AglynSelectOptionProps> = {\n $id: SELECT_OPTION_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Select Option',\n description: 'One choice in a Select.',\n category,\n icon: { path: mdiFormSelect.path, sx: { color: 'info.main' } },\n // `<option>` holds text and nothing else. Not selfClosing: that strips\n // `children`, and every choice rendered blank.\n flags: {\n plainTextChildren: Aglyn.FEATURE_FLAG.ENABLED,\n textEditable: Aglyn.FEATURE_FLAG.ENABLED,\n },\n attributes: [\n FIELD_TEXT_CONTENT,\n { ...FIELD_CHOICE_VALUE, description: 'What is sent. Leave empty to send the text.' },\n ],\n}\n\nexport const checkboxSchema: Aglyn.ComponentSchema<CheckboxProps> = {\n $id: CHECKBOX_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Checkbox',\n description: 'A tick box. Put it in a Choice Label to give it words.',\n category,\n icon: { path: mdiCheckboxMarkedOutline.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n { ...FIELD_CHOICE_VALUE, description: 'What is sent when ticked, such as Yes.' },\n FIELD_REQUIRED,\n ],\n}\n\nexport const radioGroupSchema: Aglyn.ComponentSchema<RadioGroupProps> = {\n $id: RADIO_GROUP_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Radio Group',\n description: 'A set of Radio choices; one may be picked.',\n category,\n icon: { path: mdiRadioboxMarked.path, sx: { color: 'info.main' } },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n {\n name: 'row',\n label: 'In a row?',\n description: 'Side by side instead of one under another.',\n component: Aglyn.FieldComponentType.SWITCH,\n },\n ],\n}\n\nexport const radioSchema: Aglyn.ComponentSchema<RadioProps> = {\n $id: RADIO_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Radio',\n description: 'One choice in a Radio Group. Put it in a Choice Label to give it words.',\n category,\n icon: { path: mdiRadioboxMarked.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [FIELD_CHOICE_VALUE, FIELD_REQUIRED],\n}\n\nexport const choiceLabelSchema: Aglyn.ComponentSchema<AglynChoiceLabelProps> = {\n $id: CHOICE_LABEL_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Choice Label',\n description: 'The words beside a Checkbox or Radio placed inside it; clicking them ticks it.',\n category,\n icon: { path: mdiTagOutline.path, sx: { color: 'info.main' } },\n restrictChildren: [\n Aglyn.LinealDirectiveFlag.LIMIT_TO,\n { components: [CHECKBOX_ID, RADIO_ID] },\n ],\n attributes: [\n {\n name: 'label',\n label: 'Text',\n description: 'The words beside the box.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n },\n ],\n}\n\nexport const ratingSchema: Aglyn.ComponentSchema<RatingProps> = {\n $id: RATING_ID,\n pluginId: BUNDLE_ID,\n displayName: 'Rating',\n description: 'Stars a visitor picks; sends the number chosen.',\n category,\n icon: { path: mdiStarOutline.path, sx: { color: 'info.main' } },\n flags: { selfClosing: Aglyn.FEATURE_FLAG.ENABLED },\n attributes: [\n FIELD_NAME,\n FIELD_DATASET_FIELD,\n {\n name: 'max',\n label: 'Stars',\n description: 'How many stars to show.',\n component: Aglyn.FieldComponentType.TEXT_FIELD,\n type: 'number',\n },\n ],\n}\n\n// ── Presets: ready-made arrangements of the pieces above ────────────────────\n\nexport const node = (\n componentId: Aglyn.ComponentId,\n props?: Record<string, unknown>,\n nodes?: Aglyn.NodePresetData[],\n sx?: Record<string, unknown>,\n): Aglyn.NodePresetData =>\n ({\n $id: null,\n componentId,\n pluginId: BUNDLE_ID,\n ...(props ? { props } : {}),\n ...(nodes ? { nodes } : {}),\n ...(sx ? { sx } : {}),\n }) as Aglyn.NodePresetData\n\n/** A labelled text field: Form Control › Form Label + Input. */\nexport const textFieldPreset = (\n label: string,\n input: Record<string, unknown>,\n): Aglyn.NodePresetData =>\n node(FORM_CONTROL_ID, { fullWidth: true }, [\n node(FORM_LABEL_ID, { children: label }),\n node(INPUT_ID, { fullWidth: true, ...input }),\n ])\n\nexport const preset = (\n $id: string,\n displayName: string,\n description: string,\n icon: string,\n data: Aglyn.NodePresetData,\n): Aglyn.PresetSchema => ({\n $id,\n type: Aglyn.NodeType.PRESET,\n displayName,\n description,\n pluginId: BUNDLE_ID,\n category,\n icon: { path: icon, sx: { color: 'info.main' } },\n data,\n})\n\n/**\n * Each element on its own, so any piece can be inserted by itself — a bare\n * Input beside a Button in a sign-up row, a Form Label above a field the\n * author is assembling, one more Radio in a group. The field presets below\n * are ready-made arrangements of the same pieces.\n */\nconst singleElementPresets: Aglyn.PresetSchema[] = [\n preset(\n generatePresetId(FORM_CONTROL_ID),\n 'Form Control',\n 'An empty field frame: put a Form Label, an input and Helper Text in it.',\n mdiFormTextbox.path,\n node(FORM_CONTROL_ID, { fullWidth: true }),\n ),\n preset(\n generatePresetId(FORM_LABEL_ID),\n 'Form Label',\n 'The words that name a field, above its input.',\n mdiTagOutline.path,\n node(FORM_LABEL_ID, { children: 'Label' }),\n ),\n preset(\n generatePresetId(INPUT_ID),\n 'Input',\n 'A box a visitor types in, on its own.',\n mdiTextShort.path,\n node(INPUT_ID, { name: 'field', placeholder: 'Type here' }),\n ),\n preset(\n generatePresetId(SELECT_ID),\n 'Select',\n 'A dropdown with two options.',\n mdiFormDropdown.path,\n node(SELECT_ID, { name: 'choice', placeholder: 'Choose…' }, [\n node(SELECT_OPTION_ID, { children: 'Option one' }),\n node(SELECT_OPTION_ID, { children: 'Option two' }),\n ]),\n ),\n preset(\n generatePresetId(SELECT_OPTION_ID),\n 'Select Option',\n 'One more choice for a Select.',\n mdiFormSelect.path,\n node(SELECT_OPTION_ID, { children: 'Option' }),\n ),\n preset(\n generatePresetId(RADIO_GROUP_ID),\n 'Radio Group',\n 'A set of Radio choices sharing one Field name.',\n mdiRadioboxMarked.path,\n node(RADIO_GROUP_ID, { name: 'pick' }, [\n node(CHOICE_LABEL_ID, { label: 'First' }, [node(RADIO_ID, { value: 'First' })]),\n node(CHOICE_LABEL_ID, { label: 'Second' }, [node(RADIO_ID, { value: 'Second' })]),\n ]),\n ),\n preset(\n generatePresetId(RADIO_ID),\n 'Radio',\n 'One more choice for a Radio Group, with its words.',\n mdiRadioboxMarked.path,\n node(CHOICE_LABEL_ID, { label: 'Another choice' }, [\n node(RADIO_ID, { value: 'Another choice' }),\n ]),\n ),\n preset(\n generatePresetId(CHOICE_LABEL_ID),\n 'Choice Label',\n 'Words beside a tick box; holds a Checkbox.',\n mdiTagOutline.path,\n node(CHOICE_LABEL_ID, { label: 'Yes, please' }, [\n node(CHECKBOX_ID, { name: 'agree', value: 'Yes' }),\n ]),\n ),\n preset(\n generatePresetId(RATING_ID),\n 'Rating',\n 'Five stars, on their own.',\n mdiStarOutline.path,\n node(RATING_ID, { name: 'rating' }),\n ),\n]\n\nexport const formControlPresets: Aglyn.PresetSchema[] = [\n ...singleElementPresets,\n preset(\n generatePresetId(FORM_CONTROL_ID, 'text'),\n 'Text field',\n 'A label and a one-line input.',\n mdiFormTextbox.path,\n textFieldPreset('Name', { name: 'name' }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'email'),\n 'Email field',\n 'A label and an email input.',\n mdiFormTextbox.path,\n textFieldPreset('Email', { name: 'email', type: 'email', required: true }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'message'),\n 'Message field',\n 'A label and a several-line input.',\n mdiFormTextbox.path,\n textFieldPreset('Message', { name: 'message', multiline: true, minRows: 4 }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'select'),\n 'Dropdown field',\n 'A label and a Select with three options.',\n mdiFormDropdown.path,\n node(FORM_CONTROL_ID, { fullWidth: true }, [\n node(FORM_LABEL_ID, { children: 'Choose one' }),\n node(SELECT_ID, { name: 'choice', fullWidth: true, placeholder: 'Choose…' }, [\n node(SELECT_OPTION_ID, { children: 'Option one' }),\n node(SELECT_OPTION_ID, { children: 'Option two' }),\n node(SELECT_OPTION_ID, { children: 'Option three' }),\n ]),\n ]),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'radio'),\n 'Radio choice field',\n 'A label and a Radio Group with three choices.',\n mdiRadioboxMarked.path,\n node(FORM_CONTROL_ID, {}, [\n node(FORM_LABEL_ID, { children: 'Pick one' }),\n node(RADIO_GROUP_ID, { name: 'pick' }, [\n node(CHOICE_LABEL_ID, { label: 'First' }, [node(RADIO_ID, { value: 'First' })]),\n node(CHOICE_LABEL_ID, { label: 'Second' }, [node(RADIO_ID, { value: 'Second' })]),\n node(CHOICE_LABEL_ID, { label: 'Third' }, [node(RADIO_ID, { value: 'Third' })]),\n ]),\n ]),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'checkbox'),\n 'Checkbox',\n 'A tick box with words beside it.',\n mdiCheckboxMarkedOutline.path,\n node(CHOICE_LABEL_ID, { label: 'Yes, please' }, [\n node(CHECKBOX_ID, { name: 'agree', value: 'Yes' }),\n ]),\n ),\n preset(\n generatePresetId(FORM_HELPER_TEXT_ID),\n 'Helper Text',\n 'A line of guidance under a field.',\n mdiFormatText.path,\n node(FORM_HELPER_TEXT_ID, { children: 'We never share your address.' }),\n ),\n preset(\n generatePresetId(FORM_CONTROL_ID, 'rating'),\n 'Rating field',\n 'A label and five stars.',\n mdiStarOutline.path,\n node(FORM_CONTROL_ID, {}, [\n node(FORM_LABEL_ID, { children: 'How did we do?' }),\n node(RATING_ID, { name: 'rating' }),\n ]),\n ),\n]\n"],"names":["Aglyn","mdiCheckboxMarkedOutline","mdiFormDropdown","mdiFormTextbox","mdiFormatText","mdiRadioboxMarked","mdiStarOutline","mdiTextShort","mdiTagOutline","mdiFormSelect","Checkbox","FormControl","FormControlLabel","FormHelperText","FilledInput","FormLabel","NativeSelect","OutlinedInput","Radio","RadioGroup","Rating","alpha","useTheme","createContext","forwardRef","useContext","useId","BUNDLE_ID","FIELD_TEXT_CONTENT","dropClearedProps","generatePresetId","FORM_CONTROL_ID","FORM_LABEL_ID","INPUT_ID","FORM_HELPER_TEXT_ID","SELECT_ID","SELECT_OPTION_ID","CHECKBOX_ID","RADIO_GROUP_ID","RADIO_ID","CHOICE_LABEL_ID","RATING_ID","loadFormPickers","FieldIdContext","undefined","AglynFormControl","props","ref","id","replace","Provider","value","displayName","AglynFormLabel","component","htmlFor","outlinedBoxSx","theme","border","borderColor","palette","text","primary","display","boxShadow","main","useFilledInputs","components","MuiTextField","defaultProps","variant","nodeSxList","sx","Array","isArray","AglynInput","name","type","multiline","minRows","placeholder","required","ariaLabel","datasetFieldId","_datasetFieldId","rest","filled","inputProps","Boolean","notched","AglynFormHelperText","AglynSelect","children","size","input","defaultValue","option","disabled","AglynSelectOption","_sx","String","withoutMapping","AglynCheckbox","AglynRadioGroup","AglynRadio","AglynChoiceLabel","label","control","span","style","AglynRating","FIELD_NAME","description","FieldComponentType","TEXT_FIELD","FIELD_DATASET_FIELD","DATASET_FIELD_SELECT","FIELD_INPUT_SIZE","SELECT","options","FIELD_REQUIRED","SWITCH","FIELD_ARIA_LABEL","FIELD_FULL_WIDTH","FIELD_PLACEHOLDER","FIELD_CHOICE_VALUE","category","ComponentCategory","FORMS","formControlSchema","$id","pluginId","icon","path","color","attributes","formLabelSchema","flags","textEditable","FEATURE_FLAG","ENABLED","inputSchema","selfClosing","formHelperTextSchema","selectSchema","restrictChildren","LinealDirectiveFlag","LIMIT_TO","selectOptionSchema","plainTextChildren","checkboxSchema","radioGroupSchema","radioSchema","choiceLabelSchema","ratingSchema","node","componentId","nodes","textFieldPreset","fullWidth","preset","data","NodeType","PRESET","singleElementPresets","formControlPresets"],"mappings":";;;AAAA;;;;;;;;;;;;;;;CAeC,GAED,YAAYA,WAAW,eAAc;AACrC,SACEC,wBAAwB,EACxBC,eAAe,EACfC,cAAc,EACdC,aAAa,EACbC,iBAAiB,EACjBC,cAAc,EACdC,YAAY,EACZC,aAAa,EACbC,aAAa,QACR,yBAAwB;AAC/B,OAAOC,cAAsC,yBAAwB;AACrE,OAAOC,iBAA4C,4BAA2B;AAC9E,OAAOC,sBAAsB,iCAAgC;AAC7D,OAAOC,oBAEA,+BAA8B;AACrC,OAAOC,iBAAiB,4BAA2B;AACnD,OAAOC,eAAwC,0BAAyB;AACxE,OAAOC,kBAAkB,6BAA4B;AACrD,OAAOC,mBAAmB,8BAA6B;AACvD,OAAOC,WAAgC,sBAAqB;AAC5D,OAAOC,gBAA0C,2BAA0B;AAC3E,OAAOC,YAAkC,uBAAsB;AAC/D,SACEC,KAAK,EAGLC,QAAQ,QACH,uBAAsB;AAC7B,SACEC,aAAa,EACbC,UAAU,EAEVC,UAAU,EACVC,KAAK,QACA,QAAO;AACd,SAASC,SAAS,QAAQ,gCAA4B;AACtD,SAASC,kBAAkB,QAAQ,gCAA4B;AAC/D,SAASC,gBAAgB,QAAQ,iCAA6B;AAC9D,SAASC,gBAAgB,QAAQ,iCAA6B;AAE9D;;;;;;;;;;;;CAYC,GACD,OAAO,MAAMC,kBAAqC,iBAAgB;AAClE,OAAO,MAAMC,gBAAmC,eAAc;AAC9D,OAAO,MAAMC,WAA8B,WAAU;A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