@lmb-it/kitsconcerto-native 0.1.284 → 0.1.285

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 (30) hide show
  1. package/apps/mobile/src/Core/AutoComplete/index.cjs +12 -4
  2. package/apps/mobile/src/Core/AutoComplete/index.cjs.map +1 -1
  3. package/apps/mobile/src/Core/AutoComplete/index.js +12 -4
  4. package/apps/mobile/src/Core/AutoComplete/index.js.map +1 -1
  5. package/apps/mobile/src/Core/MultiSelect/index.cjs +7 -4
  6. package/apps/mobile/src/Core/MultiSelect/index.cjs.map +1 -1
  7. package/apps/mobile/src/Core/MultiSelect/index.js +7 -4
  8. package/apps/mobile/src/Core/MultiSelect/index.js.map +1 -1
  9. package/form/helpers/FormContainer/index.cjs +12 -2
  10. package/form/helpers/FormContainer/index.cjs.map +1 -1
  11. package/form/helpers/FormContainer/index.js +12 -2
  12. package/form/helpers/FormContainer/index.js.map +1 -1
  13. package/form/selects/AutoComplete/index.cjs +10 -1
  14. package/form/selects/AutoComplete/index.cjs.map +1 -1
  15. package/form/selects/AutoComplete/index.js +11 -2
  16. package/form/selects/AutoComplete/index.js.map +1 -1
  17. package/form/selects/MultiSelect/index.cjs +8 -1
  18. package/form/selects/MultiSelect/index.cjs.map +1 -1
  19. package/form/selects/MultiSelect/index.js +9 -2
  20. package/form/selects/MultiSelect/index.js.map +1 -1
  21. package/hooks/useComponentDefaults.cjs +50 -8
  22. package/hooks/useComponentDefaults.cjs.map +1 -1
  23. package/hooks/useComponentDefaults.js +50 -8
  24. package/hooks/useComponentDefaults.js.map +1 -1
  25. package/index.d.ts +102 -15
  26. package/package.json +1 -1
  27. package/packages/types/src/Theme/defaultTheme.cjs +24 -4
  28. package/packages/types/src/Theme/defaultTheme.cjs.map +1 -1
  29. package/packages/types/src/Theme/defaultTheme.js +24 -4
  30. package/packages/types/src/Theme/defaultTheme.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"useComponentDefaults.js","sources":["../../../src/hooks/useComponentDefaults.ts"],"sourcesContent":["import {useMemo} from 'react';\nimport {useKitsTheme} from '../contexts/Theme';\n\n/**\n * Known element slot keys. When a config key matches one of these\n * AND the value has `props` or `style`, it is treated as an element slot.\n *\n * To add a new slot: add the key here AND to the relevant slot interface\n * in packages/types/src/Theme/types.ts (and to the `AllSlotKeys` union).\n *\n * The order below mirrors the typed slot hierarchy in\n * `packages/types/src/Theme/types.ts`.\n */\nconst ELEMENT_SLOT_KEYS = new Set([\n // ── Form-element slots ──────────────────────────────────\n // Base (all form elements — IFormElementBaseSlots)\n 'label', 'helperText', 'error',\n // Text input specific (ITextInputSlots — also shared by ISelectSlots)\n 'root', 'container', 'inputGroup', 'leftAddon', 'rightAddon',\n // Select specific (ISelectSlots — option-list popover)\n // Radio / Checkbox also use `item` / `itemSelected` / `itemDisabled` /\n // `itemHover` for the per-list-item wrapper, plus `itemInvalid`.\n 'panel', 'item', 'itemSelected', 'itemFocused', 'itemHover', 'itemDisabled', 'itemInvalid',\n // MultiSelect specific (IMultiSelectSlots — chips + per-item checkbox)\n 'token', 'tokenIcon',\n 'checkboxBox', 'checkboxBoxChecked', 'checkboxIcon',\n // Datepicker specific (IDatepickerSlots — calendar popup; `panel` shared with Select)\n 'calendarHeader', 'calendarNavButton', 'weekDay',\n 'dayCell', 'daySelected', 'dayToday', 'dayDisabled',\n // Switch specific (ISwitchSlots) — RENAMED from slider/sliderChecked/thumbChecked\n 'track', 'trackOn', 'thumb', 'thumbOn',\n // Checkbox specific (ICheckboxSlots)\n 'box', 'boxChecked', 'checkIcon',\n // Radio specific (IRadioSlots)\n 'circle', 'circleInner',\n // Radio + Checkbox: wrapper Flex around all list items\n 'itemsContainer',\n\n // ── Non-form component slots (untouched by the form-element refactor) ──\n // Card / Button / generic\n 'icon', 'header', 'title', 'subTitle', 'content', 'footer',\n // Button variants — `text` applies only to buttons with a label,\n // `iconOnly` applies only to icon-only buttons (so styling one never\n // affects the other).\n 'text', 'iconOnly',\n // Table\n 'th', 'headerRow', 'headerCell', 'body', 'bodyRow', 'bodyCell',\n 'wrapper', 'table', 'tbody',\n 'filterRow', 'filterCell', 'filterClearButton',\n 'columnFilter', 'columnFilterInput',\n 'tfoot', 'footerRow', 'footerCell', 'footer', 'paginator', 'emptyMessage',\n 'loadingOverlay', 'loadingIcon',\n 'rowGroupHeader', 'rowGroupHeaderName', 'rowExpansion', 'rowGroupFooter',\n 'rowGroupToggler', 'rowGroupTogglerIcon',\n 'resizeHelper',\n 'reorderIndicatorUp', 'reorderIndicatorUpIcon',\n 'reorderIndicatorDown', 'reorderIndicatorDownIcon',\n 'tableHeader', 'searchInput',\n 'paginatorPageButton', 'paginatorPageLink', 'paginatorActivePageButton',\n 'paginatorPageReport', 'paginatorRowsPerPage', 'paginatorRowsPerPageDropdown',\n 'paginatorPages',\n 'sortedColumn', 'stripedRow', 'selectedRow', 'selectedRowAccent',\n 'filterBar', 'filterInput', 'filterLabel',\n 'toolbarRight', 'toolbarButton', 'clearFilterButton', 'columnPicker',\n // Toolbar sizing + placeholder, and the chrome the table renders itself.\n // NOTE: a slot missing from this allowlist is silently dropped — theming\n // it has no effect at all — so every new slot must be listed here as\n // well as in its component's ITableElementSlots.\n 'toolbarControl', 'filterPlaceholder',\n 'topBar', 'bulkBar', 'bulkBarText',\n // Accordion\n 'headerActive', 'headerHover',\n // Sidebar/Drawer\n 'headerTitle', 'closeButton', 'mask',\n // Group (repeatable field array)\n 'row', 'addButton', 'removeButton',\n // Header (app-shell top bar)\n 'toggleModeButton', 'avatarButton', 'breadcrumb',\n]);\n\nexport interface IElementConfig {\n style: Record<string, any>;\n important?: boolean | string[];\n pseudo?: Record<string, Record<string, any>>;\n}\n\nexport interface UseComponentDefaultsResult<T> {\n /** Props with theme defaults merged in (user props always win) */\n mergedProps: T;\n /**\n * CSS style from root slot — backwards compat for components\n * that read themeStyle instead of elementStyles.root\n */\n themeStyle: Record<string, any>;\n /**\n * Per-element style maps. Each key is a slot name, value is the\n * merged IStyleClasses (not yet resolved to CSSProperties).\n * Use `useResolvedElementStyles(elementStyles)` to resolve.\n */\n elementStyles: Record<string, Record<string, any>>;\n /**\n * Full slot configs including `important` and `pseudo` fields.\n * Use this instead of `elementStyles` when you need those fields.\n */\n elementConfigs: Record<string, IElementConfig>;\n}\n\n/**\n * Merges theme-level component defaults with user-supplied props.\n *\n * Resolution chain (lowest → highest priority):\n * FormElement[slot] < baseGroup[slot] < component[slot] < instanceSlots[slot] < user props\n *\n * `FormElement` is the global base group for every form element\n * (label / helperText / error live there by default). It is applied\n * to every component regardless of whether a `baseGroup` is provided\n * — for non-form components like Button or Card, FormElement slots\n * are no-ops in practice because those components don't read\n * `elementStyles.label` / `helperText` / `error`.\n *\n * Element slots (`root`, `label`, `container`, etc.) are direct keys\n * on the component config. Each slot accepts `{ props?, style? }`.\n *\n * The `root` slot's `props` are merged into `mergedProps` alongside\n * user props (user always wins). The `root` slot's `style` is returned\n * as both `themeStyle` (backwards compat) and `elementStyles.root`.\n *\n * Supports base-group inheritance: e.g. `useComponentDefaults('InputText', rawProps, 'Input')`\n * merges FormElement first, then Input base, then InputText overrides,\n * then per-instance slots, then user props.\n *\n * @example\n * const { mergedProps, themeStyle, elementStyles } = useComponentDefaults('InputText', rawProps, 'Input');\n * // mergedProps → FormElement.root.props < Input.root.props < InputText.root.props < instanceSlots < user props\n * // elementStyles.label → FormElement.label.style < Input.label.style < InputText.label.style < instance label\n * // elementStyles.root → root element style (FormElement → Input → InputText → instance)\n * // elementStyles.container → container element style\n */\nexport default function useComponentDefaults<T extends Record<string, any>>(\n componentName: string,\n props: T,\n baseGroup?: string,\n): UseComponentDefaultsResult<T> {\n const {theme} = useKitsTheme();\n // Global base for every form element. Always looked up — if not\n // configured it is `undefined` and the merge contributes nothing.\n const formElementConfig = theme.components.FormElement;\n const baseConfig = baseGroup ? theme.components[baseGroup] : undefined;\n const config = theme.components[componentName];\n\n return useMemo(() => {\n // Extract per-instance slot overrides from props (IFormElement.slots passed through)\n const instanceSlots = (props as any).slots as Record<string, { props?: any; style?: any; important?: boolean | string[]; pseudo?: Record<string, Record<string, any>> }> | undefined;\n\n if (!config && !baseConfig && !instanceSlots && !formElementConfig) {\n return {mergedProps: props, themeStyle: {}, elementStyles: {}, elementConfigs: {}};\n }\n\n const formBase = (formElementConfig || {}) as Record<string, any>;\n const base = (baseConfig || {}) as Record<string, any>;\n const comp = (config || {}) as Record<string, any>;\n\n // --- Props merge: FormElement.root.props < base.root.props < config.root.props < instanceSlots.root.props < user props ---\n const merged = {\n ...(formBase.root?.props || {}),\n ...(base.root?.props || {}),\n ...(comp.root?.props || {}),\n ...(instanceSlots?.root?.props || {}),\n } as Record<string, any>;\n\n for (const key of Object.keys(props)) {\n // Skip 'slots' — it is consumed here, not forwarded\n if (key === 'slots') continue;\n if (props[key] !== undefined) {\n merged[key] = props[key];\n }\n }\n\n // --- Element styles merge: FormElement[slot] < base[slot] < config[slot] < instanceSlots[slot] ---\n const allSlotKeys = new Set<string>();\n for (const key of Object.keys(formBase)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n for (const key of Object.keys(base)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n for (const key of Object.keys(comp)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n if (instanceSlots) {\n for (const key of Object.keys(instanceSlots)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n }\n\n const elementStyles: Record<string, Record<string, any>> = {};\n const elementConfigs: Record<string, IElementConfig> = {};\n for (const slotKey of allSlotKeys) {\n const style = {\n ...(formBase[slotKey]?.style || {}),\n ...(base[slotKey]?.style || {}),\n ...(comp[slotKey]?.style || {}),\n ...(instanceSlots?.[slotKey]?.style || {}),\n };\n elementStyles[slotKey] = style;\n\n const pseudoMerged = {\n ...(formBase[slotKey]?.pseudo || {}),\n ...(base[slotKey]?.pseudo || {}),\n ...(comp[slotKey]?.pseudo || {}),\n ...(instanceSlots?.[slotKey]?.pseudo || {}),\n };\n elementConfigs[slotKey] = {\n style,\n important:\n instanceSlots?.[slotKey]?.important ??\n comp[slotKey]?.important ??\n base[slotKey]?.important ??\n formBase[slotKey]?.important,\n pseudo: Object.keys(pseudoMerged).length > 0 ? pseudoMerged : undefined,\n };\n }\n\n // themeStyle = root element style (backwards compat)\n const themeStyle = elementStyles.root || {};\n\n return {\n mergedProps: merged as T,\n themeStyle,\n elementStyles,\n elementConfigs,\n };\n }, [formElementConfig, baseConfig, config, props]);\n}\n"],"names":[],"mappings":";;;AAaA,MAAM,iBAAA,uBAAwB,GAAA,CAAI;AAAA;AAAA;AAAA,EAG9B,OAAA;AAAA,EAAS,YAAA;AAAA,EAAc,OAAA;AAAA;AAAA,EAEvB,MAAA;AAAA,EAAQ,WAAA;AAAA,EAAa,YAAA;AAAA,EAAc,WAAA;AAAA,EAAa,YAAA;AAAA;AAAA;AAAA;AAAA,EAIhD,OAAA;AAAA,EAAS,MAAA;AAAA,EAAQ,cAAA;AAAA,EAAgB,aAAA;AAAA,EAAe,WAAA;AAAA,EAAa,cAAA;AAAA,EAAgB,aAAA;AAAA;AAAA,EAE7E,OAAA;AAAA,EAAS,WAAA;AAAA,EACT,aAAA;AAAA,EAAe,oBAAA;AAAA,EAAsB,cAAA;AAAA;AAAA,EAErC,gBAAA;AAAA,EAAkB,mBAAA;AAAA,EAAqB,SAAA;AAAA,EACvC,SAAA;AAAA,EAAW,aAAA;AAAA,EAAe,UAAA;AAAA,EAAY,aAAA;AAAA;AAAA,EAEtC,OAAA;AAAA,EAAS,SAAA;AAAA,EAAW,OAAA;AAAA,EAAS,SAAA;AAAA;AAAA,EAE7B,KAAA;AAAA,EAAO,YAAA;AAAA,EAAc,WAAA;AAAA;AAAA,EAErB,QAAA;AAAA,EAAU,aAAA;AAAA;AAAA,EAEV,gBAAA;AAAA;AAAA;AAAA,EAIA,MAAA;AAAA,EAAQ,QAAA;AAAA,EAAU,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"version":3,"file":"useComponentDefaults.js","sources":["../../../src/hooks/useComponentDefaults.ts"],"sourcesContent":["import {useMemo} from 'react';\nimport {useKitsTheme} from '../contexts/Theme';\n\n/**\n * Known element slot keys. When a config key matches one of these\n * AND the value has `props` or `style`, it is treated as an element slot.\n *\n * To add a new slot: add the key here AND to the relevant slot interface\n * in packages/types/src/Theme/types.ts (and to the `AllSlotKeys` union).\n *\n * The order below mirrors the typed slot hierarchy in\n * `packages/types/src/Theme/types.ts`.\n */\nconst ELEMENT_SLOT_KEYS = new Set([\n // ── Form-element slots ──────────────────────────────────\n // Base (all form elements — IFormElementBaseSlots)\n 'label', 'helperText', 'error',\n // Text input specific (ITextInputSlots — also shared by ISelectSlots)\n 'root', 'container', 'inputGroup', 'leftAddon', 'rightAddon',\n // Select specific (ISelectSlots — option-list popover)\n // Radio / Checkbox also use `item` / `itemSelected` / `itemDisabled` /\n // `itemHover` for the per-list-item wrapper, plus `itemInvalid`.\n 'panel', 'item', 'itemSelected', 'itemFocused', 'itemHover', 'itemDisabled', 'itemInvalid',\n // Chip-bearing selects (IChipInputSlots — MultiSelect display=\"chip\"\n // AND AutoComplete/Tags with isMultiple). `tokenContainer` is the\n // bordered box that holds the chips and the caret — see the docblock\n // on IChipInputSlots for why it is neither `root` nor `container`.\n 'tokenContainer', 'token', 'tokenIcon',\n // MultiSelect specific (IMultiSelectSlots — per-item checkbox)\n 'checkboxBox', 'checkboxBoxChecked', 'checkboxIcon',\n // Datepicker specific (IDatepickerSlots — calendar popup; `panel` shared with Select)\n 'calendarHeader', 'calendarNavButton', 'weekDay',\n 'dayCell', 'daySelected', 'dayToday', 'dayDisabled',\n // Switch specific (ISwitchSlots) — RENAMED from slider/sliderChecked/thumbChecked\n 'track', 'trackOn', 'thumb', 'thumbOn',\n // Checkbox specific (ICheckboxSlots)\n 'box', 'boxChecked', 'checkIcon',\n // Radio specific (IRadioSlots)\n 'circle', 'circleInner',\n // Radio + Checkbox: wrapper Flex around all list items\n 'itemsContainer',\n\n // ── Non-form component slots (untouched by the form-element refactor) ──\n // Card / Button / generic\n 'icon', 'header', 'title', 'subTitle', 'content', 'footer',\n // Button variants — `text` applies only to buttons with a label,\n // `iconOnly` applies only to icon-only buttons (so styling one never\n // affects the other).\n 'text', 'iconOnly',\n // Table\n 'th', 'headerRow', 'headerCell', 'body', 'bodyRow', 'bodyCell',\n 'wrapper', 'table', 'tbody',\n 'filterRow', 'filterCell', 'filterClearButton',\n 'columnFilter', 'columnFilterInput',\n 'tfoot', 'footerRow', 'footerCell', 'footer', 'paginator', 'emptyMessage',\n 'loadingOverlay', 'loadingIcon',\n 'rowGroupHeader', 'rowGroupHeaderName', 'rowExpansion', 'rowGroupFooter',\n 'rowGroupToggler', 'rowGroupTogglerIcon',\n 'resizeHelper',\n 'reorderIndicatorUp', 'reorderIndicatorUpIcon',\n 'reorderIndicatorDown', 'reorderIndicatorDownIcon',\n 'tableHeader', 'searchInput',\n 'paginatorPageButton', 'paginatorPageLink', 'paginatorActivePageButton',\n 'paginatorPageReport', 'paginatorRowsPerPage', 'paginatorRowsPerPageDropdown',\n 'paginatorPages',\n 'sortedColumn', 'stripedRow', 'selectedRow', 'selectedRowAccent',\n 'filterBar', 'filterInput', 'filterLabel',\n 'toolbarRight', 'toolbarButton', 'clearFilterButton', 'columnPicker',\n // Toolbar sizing + placeholder, and the chrome the table renders itself.\n // NOTE: a slot missing from this allowlist is silently dropped — theming\n // it has no effect at all — so every new slot must be listed here as\n // well as in its component's ITableElementSlots.\n 'toolbarControl', 'filterPlaceholder',\n 'topBar', 'bulkBar', 'bulkBarText',\n // Accordion\n 'headerActive', 'headerHover',\n // Sidebar/Drawer\n 'headerTitle', 'closeButton', 'mask',\n // Group (repeatable field array)\n 'row', 'addButton', 'removeButton',\n // Header (app-shell top bar)\n 'toggleModeButton', 'avatarButton', 'breadcrumb',\n]);\n\nexport interface IElementConfig {\n style: Record<string, any>;\n /**\n * Extra attributes for this slot's element — `className`, `data-*`,\n * `aria-*`, anything the platform element accepts. Merged across the\n * whole chain (FormElement < baseGroup < component < instance slots),\n * with `className` CONCATENATED rather than replaced.\n */\n props: Record<string, any>;\n important?: boolean | string[];\n pseudo?: Record<string, Record<string, any>>;\n}\n\nexport interface UseComponentDefaultsResult<T> {\n /** Props with theme defaults merged in (user props always win) */\n mergedProps: T;\n /**\n * CSS style from root slot — backwards compat for components\n * that read themeStyle instead of elementStyles.root\n */\n themeStyle: Record<string, any>;\n /**\n * Per-element style maps. Each key is a slot name, value is the\n * merged IStyleClasses (not yet resolved to CSSProperties).\n * Use `useResolvedElementStyles(elementStyles)` to resolve.\n */\n elementStyles: Record<string, Record<string, any>>;\n /**\n * Per-element extra attributes. Each key is a slot name, value is the\n * merged `props` for that slot (`className`, `data-*`, `aria-*`, …).\n *\n * ⛔ EVERY SLOT, NOT JUST `root` — THAT WAS THE BUG. `IElementSlotConfig`\n * has advertised `props` on every slot since the slot system landed, but\n * only `root.props` was ever read (it is folded into `mergedProps`).\n * Anything a consumer put on another slot — the class a portal needs on a\n * tags field's outer box to make it match a text input — was parsed,\n * merged, and then thrown away with no warning and no type error.\n * Components apply `elementProps[slot]` to the matching element.\n */\n elementProps: Record<string, Record<string, any>>;\n /**\n * Full slot configs including `props`, `important` and `pseudo` fields.\n * Use this instead of `elementStyles` when you need those fields.\n */\n elementConfigs: Record<string, IElementConfig>;\n}\n\n/**\n * Merges slot `props` layers. Everything is last-wins EXCEPT `className`,\n * which is concatenated — a theme-level class and a consumer's class are\n * additive by nature, and dropping one of them is exactly the fault this\n * whole plumbing exists to fix.\n */\nfunction mergeSlotProps(layers: Array<Record<string, any> | undefined>): Record<string, any> {\n const out: Record<string, any> = {};\n const classes: string[] = [];\n for (const layer of layers) {\n if (!layer) continue;\n for (const [key, value] of Object.entries(layer)) {\n if (value === undefined) continue;\n if (key === 'className') {\n if (value) classes.push(String(value));\n } else {\n out[key] = value;\n }\n }\n }\n if (classes.length) {\n // De-duplicated, so a class repeated down the chain lands once.\n out.className = Array.from(new Set(classes.join(' ').split(/\\s+/).filter(Boolean))).join(' ');\n }\n return out;\n}\n\n/**\n * Merges theme-level component defaults with user-supplied props.\n *\n * Resolution chain (lowest → highest priority):\n * FormElement[slot] < baseGroup[slot] < component[slot] < instanceSlots[slot] < user props\n *\n * `FormElement` is the global base group for every form element\n * (label / helperText / error live there by default). It is applied\n * to every component regardless of whether a `baseGroup` is provided\n * — for non-form components like Button or Card, FormElement slots\n * are no-ops in practice because those components don't read\n * `elementStyles.label` / `helperText` / `error`.\n *\n * Element slots (`root`, `label`, `container`, etc.) are direct keys\n * on the component config. Each slot accepts `{ props?, style? }`.\n *\n * The `root` slot's `props` are merged into `mergedProps` alongside\n * user props (user always wins, except `className`, which concatenates).\n * The `root` slot's `style` is returned as both `themeStyle` (backwards\n * compat) and `elementStyles.root`.\n *\n * EVERY OTHER slot's `props` come back on `elementProps[slot]` — the\n * component is responsible for spreading them onto the element that slot\n * names. Before that existed, `props` on a non-root slot was silently\n * discarded, which is how a consumer's class on a tags field's outer box\n * disappeared without a single error.\n *\n * Supports base-group inheritance: e.g. `useComponentDefaults('InputText', rawProps, 'Input')`\n * merges FormElement first, then Input base, then InputText overrides,\n * then per-instance slots, then user props.\n *\n * @example\n * const { mergedProps, themeStyle, elementStyles } = useComponentDefaults('InputText', rawProps, 'Input');\n * // mergedProps → FormElement.root.props < Input.root.props < InputText.root.props < instanceSlots < user props\n * // elementStyles.label → FormElement.label.style < Input.label.style < InputText.label.style < instance label\n * // elementStyles.root → root element style (FormElement → Input → InputText → instance)\n * // elementStyles.container → container element style\n */\nexport default function useComponentDefaults<T extends Record<string, any>>(\n componentName: string,\n props: T,\n baseGroup?: string,\n): UseComponentDefaultsResult<T> {\n const {theme} = useKitsTheme();\n // Global base for every form element. Always looked up — if not\n // configured it is `undefined` and the merge contributes nothing.\n const formElementConfig = theme.components.FormElement;\n const baseConfig = baseGroup ? theme.components[baseGroup] : undefined;\n const config = theme.components[componentName];\n\n return useMemo(() => {\n // Extract per-instance slot overrides from props (IFormElement.slots passed through)\n const instanceSlots = (props as any).slots as Record<string, { props?: any; style?: any; important?: boolean | string[]; pseudo?: Record<string, Record<string, any>> }> | undefined;\n\n if (!config && !baseConfig && !instanceSlots && !formElementConfig) {\n return {mergedProps: props, themeStyle: {}, elementStyles: {}, elementProps: {}, elementConfigs: {}};\n }\n\n const formBase = (formElementConfig || {}) as Record<string, any>;\n const base = (baseConfig || {}) as Record<string, any>;\n const comp = (config || {}) as Record<string, any>;\n\n // --- Props merge: FormElement.root.props < base.root.props < config.root.props < instanceSlots.root.props < user props ---\n const merged = mergeSlotProps([\n formBase.root?.props,\n base.root?.props,\n comp.root?.props,\n instanceSlots?.root?.props,\n ]);\n\n const userClassName = typeof (props as any).className === 'string' ? (props as any).className : undefined;\n for (const key of Object.keys(props)) {\n // Skip 'slots' — it is consumed here, not forwarded\n if (key === 'slots') continue;\n // className is additive, not a replacement: a theme-level class on\n // `root.props` and the consumer's own class both have to survive.\n if (key === 'className') continue;\n if (props[key] !== undefined) {\n merged[key] = props[key];\n }\n }\n if (userClassName || merged.className) {\n merged.className = mergeSlotProps([\n {className: merged.className},\n {className: userClassName},\n ]).className;\n }\n\n // --- Element styles merge: FormElement[slot] < base[slot] < config[slot] < instanceSlots[slot] ---\n const allSlotKeys = new Set<string>();\n for (const key of Object.keys(formBase)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n for (const key of Object.keys(base)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n for (const key of Object.keys(comp)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n if (instanceSlots) {\n for (const key of Object.keys(instanceSlots)) {\n if (ELEMENT_SLOT_KEYS.has(key)) allSlotKeys.add(key);\n }\n }\n\n const elementStyles: Record<string, Record<string, any>> = {};\n const elementProps: Record<string, Record<string, any>> = {};\n const elementConfigs: Record<string, IElementConfig> = {};\n for (const slotKey of allSlotKeys) {\n const style = {\n ...(formBase[slotKey]?.style || {}),\n ...(base[slotKey]?.style || {}),\n ...(comp[slotKey]?.style || {}),\n ...(instanceSlots?.[slotKey]?.style || {}),\n };\n elementStyles[slotKey] = style;\n\n const slotProps = mergeSlotProps([\n formBase[slotKey]?.props,\n base[slotKey]?.props,\n comp[slotKey]?.props,\n instanceSlots?.[slotKey]?.props,\n ]);\n elementProps[slotKey] = slotProps;\n\n const pseudoMerged = {\n ...(formBase[slotKey]?.pseudo || {}),\n ...(base[slotKey]?.pseudo || {}),\n ...(comp[slotKey]?.pseudo || {}),\n ...(instanceSlots?.[slotKey]?.pseudo || {}),\n };\n elementConfigs[slotKey] = {\n style,\n props: slotProps,\n important:\n instanceSlots?.[slotKey]?.important ??\n comp[slotKey]?.important ??\n base[slotKey]?.important ??\n formBase[slotKey]?.important,\n pseudo: Object.keys(pseudoMerged).length > 0 ? pseudoMerged : undefined,\n };\n }\n\n // themeStyle = root element style (backwards compat)\n const themeStyle = elementStyles.root || {};\n\n return {\n mergedProps: merged as T,\n themeStyle,\n elementStyles,\n elementProps,\n elementConfigs,\n };\n }, [formElementConfig, baseConfig, config, props]);\n}\n"],"names":[],"mappings":";;;AAaA,MAAM,iBAAA,uBAAwB,GAAA,CAAI;AAAA;AAAA;AAAA,EAG9B,OAAA;AAAA,EAAS,YAAA;AAAA,EAAc,OAAA;AAAA;AAAA,EAEvB,MAAA;AAAA,EAAQ,WAAA;AAAA,EAAa,YAAA;AAAA,EAAc,WAAA;AAAA,EAAa,YAAA;AAAA;AAAA;AAAA;AAAA,EAIhD,OAAA;AAAA,EAAS,MAAA;AAAA,EAAQ,cAAA;AAAA,EAAgB,aAAA;AAAA,EAAe,WAAA;AAAA,EAAa,cAAA;AAAA,EAAgB,aAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAK7E,gBAAA;AAAA,EAAkB,OAAA;AAAA,EAAS,WAAA;AAAA;AAAA,EAE3B,aAAA;AAAA,EAAe,oBAAA;AAAA,EAAsB,cAAA;AAA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OAAO,CAAA,GAAI;AAAA,QACtB,KAAA;AAAA,QACA,KAAA,EAAO,SAAA;AAAA,QACP,SAAA,EACI,aAAA,GAAgB,OAAO,CAAA,EAAG,aAC1B,IAAA,CAAK,OAAO,CAAA,EAAG,SAAA,IACf,KAAK,OAAO,CAAA,EAAG,SAAA,IACf,QAAA,CAAS,OAAO,CAAA,EAAG,SAAA;AAAA,QACvB,QAAQ,MAAA,CAAO,IAAA,CAAK,YAAY,CAAA,CAAE,MAAA,GAAS,IAAI,YAAA,GAAe;AAAA,OAClE;AAAA,IACJ;AAGA,IAAA,MAAM,UAAA,GAAa,aAAA,CAAc,IAAA,IAAQ,EAAC;AAE1C,IAAA,OAAO;AAAA,MACH,WAAA,EAAa,MAAA;AAAA,MACb,UAAA;AAAA,MACA,aAAA;AAAA,MACA,YAAA;AAAA,MACA;AAAA,KACJ;AAAA,EACJ,GAAG,CAAC,iBAAA,EAAmB,UAAA,EAAY,MAAA,EAAQ,KAAK,CAAC,CAAA;AACrD;;;;"}
package/index.d.ts CHANGED
@@ -750,22 +750,60 @@ export interface ISelectSlots extends IFormElementBaseSlots {
750
750
  itemDisabled?: IElementSlotConfig;
751
751
  }
752
752
  /**
753
- * MultiSelect = Select + chip + per-item checkbox visuals.
754
- * Inherits ISelectSlots and adds chip/checkbox slots that only apply
755
- * to the multi-value variant.
756
- */
757
- export interface IMultiSelectSlots extends ISelectSlots {
753
+ * Chip-bearing selects — the slots shared by EVERY control that renders
754
+ * the current value as removable chips: MultiSelect (`display="chip"`)
755
+ * and AutoComplete with `isMultiple` (the Tags field).
756
+ *
757
+ * ⛔ IT IS ONE INTERFACE BECAUSE THE TWO CONTROLS DRIFTED. MultiSelect read
758
+ * `token` from the theme and drew a pill; AutoComplete hardcoded its own
759
+ * `pt.token` (background + colour, nothing else) and ignored the slot, so the
760
+ * same form showed pill chips in one field and PrimeReact's square chips in the
761
+ * next. The defaults now live ONCE, on the `Select` base group, and both
762
+ * controls read them from here.
763
+ */
764
+ export interface IChipInputSlots extends ISelectSlots {
765
+ /**
766
+ * ⛔ THE OUTER BOX OF A CHIPS FIELD — the element a consumer means by
767
+ * "the tags input". It holds the chips AND the text caret, and it is the
768
+ * one PrimeReact gives `.p-inputtext` to, so it is what has to carry the
769
+ * border / radius / background / padding that makes a tags field look like
770
+ * a text input.
771
+ *
772
+ * Web → `ul.p-autocomplete-multiple-container` (AutoComplete `pt.container`).
773
+ * Native → the field wrapper `View` that holds the chips and the `TextInput`.
774
+ *
775
+ * ⚠️ NOT `root` and NOT `container`. `root` is the inner input element and
776
+ * `container` is `KitsContainer`'s outermost Flex (label + field + error).
777
+ * Neither is the bordered box, which is why styling the chips field used to
778
+ * have nowhere to land: the only reachable slots were either inside the box
779
+ * or around the whole block.
780
+ *
781
+ * Defaults to transparent / border-less so the `inputGroup` chrome
782
+ * `KitsContainer` paints stays the single visible border. Give it a border
783
+ * here (or on an `attached` field, which has no `KitsContainer`) and it
784
+ * paints its own.
785
+ */
786
+ tokenContainer?: IElementSlotConfig;
758
787
  /**
759
788
  * Selected-value chip (small pill rendered for each selected item
760
- * when `display="chip"`). Drives bg / color / radius / padding via
761
- * inline style on `.p-multiselect-token`.
789
+ * when `display="chip"` / `isMultiple`). Drives bg / color / radius /
790
+ * padding via inline style on `.p-multiselect-token` and
791
+ * `.p-autocomplete-token`.
762
792
  */
763
793
  token?: IElementSlotConfig;
764
794
  /**
765
795
  * The "remove" icon inside a token chip. Drives color / size of
766
- * the close (×) icon via inline style on `.p-multiselect-token-icon`.
796
+ * the close (×) icon via inline style on `.p-multiselect-token-icon`
797
+ * and `.p-autocomplete-token-icon`.
767
798
  */
768
799
  tokenIcon?: IElementSlotConfig;
800
+ }
801
+ /**
802
+ * MultiSelect = chip-bearing select + per-item checkbox visuals.
803
+ * Inherits IChipInputSlots and adds the checkbox slots that only apply
804
+ * to the multi-value variant with an option list.
805
+ */
806
+ export interface IMultiSelectSlots extends IChipInputSlots {
769
807
  /**
770
808
  * Per-item checkbox box (also the header "select all"). Drives
771
809
  * border / bg / radius for the rounded square inside each row.
@@ -887,7 +925,7 @@ export interface IRadioSlots extends IFormElementBaseSlots {
887
925
  * `useComponentDefaults`) — derive from this to keep the runtime set
888
926
  * in sync with the type contract automatically.
889
927
  */
890
- export type AllSlotKeys = keyof IFormElementBaseSlots | keyof ITextInputSlots | keyof IDatepickerSlots | keyof ISelectSlots | keyof IMultiSelectSlots | keyof ISwitchSlots | keyof ICheckboxSlots | keyof IRadioSlots;
928
+ export type AllSlotKeys = keyof IFormElementBaseSlots | keyof ITextInputSlots | keyof IDatepickerSlots | keyof ISelectSlots | keyof IChipInputSlots | keyof IMultiSelectSlots | keyof ISwitchSlots | keyof ICheckboxSlots | keyof IRadioSlots;
891
929
  /**
892
930
  * Wide superset of every form-element slot — the union of all
893
931
  * form-element slot interfaces.
@@ -1311,10 +1349,21 @@ export interface IKitsComponentDefaults {
1311
1349
  ColorPicker?: IComponentThemeConfig<ITextInputSlots>;
1312
1350
  PhoneInput?: IComponentThemeConfig<ITextInputSlots>;
1313
1351
  Datepicker?: IComponentThemeConfig<IDatepickerSlots>;
1314
- Select?: IComponentThemeConfig<ISelectSlots>;
1352
+ /**
1353
+ * Select base group.
1354
+ *
1355
+ * ⛔ TYPED AS `IChipInputSlots`, NOT `ISelectSlots`, ON PURPOSE. The chip
1356
+ * defaults (`token` / `tokenIcon` / `tokenContainer`) live HERE so the two
1357
+ * chip-bearing members — MultiSelect and AutoComplete-with-`isMultiple`
1358
+ * (Tags) — read one set of values instead of each carrying its own. A chip
1359
+ * slot on a shape that draws no chips (Dropdown, ListBox) is inert, the same
1360
+ * way the option-list slots are inert on a select with no popover.
1361
+ */
1362
+ Select?: IComponentThemeConfig<IChipInputSlots>;
1315
1363
  DropdownSelect?: IComponentThemeConfig<ISelectSlots>;
1316
1364
  TreeSelect?: IComponentThemeConfig<ISelectSlots>;
1317
- AutoComplete?: IComponentThemeConfig<ISelectSlots>;
1365
+ /** AutoComplete — chips when `isMultiple` (this is the Tags field). */
1366
+ AutoComplete?: IComponentThemeConfig<IChipInputSlots>;
1318
1367
  ListBox?: IComponentThemeConfig<ISelectSlots>;
1319
1368
  CascadeSelect?: IComponentThemeConfig<ISelectSlots>;
1320
1369
  MultiSelect?: IComponentThemeConfig<IMultiSelectSlots>;
@@ -5105,6 +5154,17 @@ export interface IKitsContainer extends IFormSingleElement, Omit<ElementProps, "
5105
5154
  additionalClassName?: string;
5106
5155
  /** Per-element styles (IStyleClasses) passed from the parent form input component */
5107
5156
  elementStyles?: Record<string, Record<string, any>>;
5157
+ /**
5158
+ * Per-element extra attributes (`className`, `data-*`, …) passed from the
5159
+ * parent form input component — `useComponentDefaults().elementProps`.
5160
+ *
5161
+ * ⛔ WITHOUT THIS, `slots.container.props` AND `slots.inputGroup.props`
5162
+ * WENT NOWHERE. KitsContainer owns both of those elements, so a class a
5163
+ * consumer put on either slot had no route to the DOM: the container only
5164
+ * ever received `elementStyles`. Optional, so a form input that does not
5165
+ * pass it behaves exactly as before.
5166
+ */
5167
+ elementProps?: Record<string, Record<string, any>>;
5108
5168
  /**
5109
5169
  * When true, strips the input-group chrome (border, border-radius, overflow, focus ring).
5110
5170
  * Used by Switch, Checkbox, and Radio which render their own visual controls
@@ -9281,6 +9341,13 @@ declare const useKitsConcerto: () => IMainContextValues<any, React$1.JSX.Element
9281
9341
 
9282
9342
  export interface IElementConfig {
9283
9343
  style: Record<string, any>;
9344
+ /**
9345
+ * Extra attributes for this slot's element — `className`, `data-*`,
9346
+ * `aria-*`, anything the platform element accepts. Merged across the
9347
+ * whole chain (FormElement < baseGroup < component < instance slots),
9348
+ * with `className` CONCATENATED rather than replaced.
9349
+ */
9350
+ props: Record<string, any>;
9284
9351
  important?: boolean | string[];
9285
9352
  pseudo?: Record<string, Record<string, any>>;
9286
9353
  }
@@ -9299,7 +9366,20 @@ export interface UseComponentDefaultsResult<T> {
9299
9366
  */
9300
9367
  elementStyles: Record<string, Record<string, any>>;
9301
9368
  /**
9302
- * Full slot configs including `important` and `pseudo` fields.
9369
+ * Per-element extra attributes. Each key is a slot name, value is the
9370
+ * merged `props` for that slot (`className`, `data-*`, `aria-*`, …).
9371
+ *
9372
+ * ⛔ EVERY SLOT, NOT JUST `root` — THAT WAS THE BUG. `IElementSlotConfig`
9373
+ * has advertised `props` on every slot since the slot system landed, but
9374
+ * only `root.props` was ever read (it is folded into `mergedProps`).
9375
+ * Anything a consumer put on another slot — the class a portal needs on a
9376
+ * tags field's outer box to make it match a text input — was parsed,
9377
+ * merged, and then thrown away with no warning and no type error.
9378
+ * Components apply `elementProps[slot]` to the matching element.
9379
+ */
9380
+ elementProps: Record<string, Record<string, any>>;
9381
+ /**
9382
+ * Full slot configs including `props`, `important` and `pseudo` fields.
9303
9383
  * Use this instead of `elementStyles` when you need those fields.
9304
9384
  */
9305
9385
  elementConfigs: Record<string, IElementConfig>;
@@ -9321,8 +9401,15 @@ export interface UseComponentDefaultsResult<T> {
9321
9401
  * on the component config. Each slot accepts `{ props?, style? }`.
9322
9402
  *
9323
9403
  * The `root` slot's `props` are merged into `mergedProps` alongside
9324
- * user props (user always wins). The `root` slot's `style` is returned
9325
- * as both `themeStyle` (backwards compat) and `elementStyles.root`.
9404
+ * user props (user always wins, except `className`, which concatenates).
9405
+ * The `root` slot's `style` is returned as both `themeStyle` (backwards
9406
+ * compat) and `elementStyles.root`.
9407
+ *
9408
+ * EVERY OTHER slot's `props` come back on `elementProps[slot]` — the
9409
+ * component is responsible for spreading them onto the element that slot
9410
+ * names. Before that existed, `props` on a non-root slot was silently
9411
+ * discarded, which is how a consumer's class on a tags field's outer box
9412
+ * disappeared without a single error.
9326
9413
  *
9327
9414
  * Supports base-group inheritance: e.g. `useComponentDefaults('InputText', rawProps, 'Input')`
9328
9415
  * merges FormElement first, then Input base, then InputText overrides,
@@ -15183,4 +15270,4 @@ declare const localeFiles: {
15183
15270
  };
15184
15271
 
15185
15272
  export { ALPHA_COLOR_VARS, ALPHA_STEPS, ALPHA_TOKEN_NAMES, AccentEdge, CustomAccordion as Accordion, ActionCard, Alert, AlertDescription, AlertIcon, AlertTitle, KitsAnimatePresence as AnimatePresence, AnyFile, Avatar, AvatarStack, Badge, Banner, BottomTabBar, Box, BreadCrumb, BreadcrumbProvider, Button, Card, Carousel, Center, ChatBubble, Chip, CircularProgress, Collapse, CommandPalette, Container, CustomPopover, DEFAULT_NATIVE_SHADOWS, DataView, DataViewContext, DateSeparator, Delta, DetailList as DetailsList, Divider, Donut, DotGrid, EDateFormat, EKeyFilter, Editable, EmptyState, FIELD_LABEL_MARGIN, FIELD_MARGIN, Flex, Form, FormSelect, GUTTER, Gallery, Gauge, Form as GoForm, Datatable as GoTable, KitsGrid as Grid, KitsGridItem as GridItem, GroupedBars, HELPER_TEXT_MARGIN, HStack, Heading, Icon, IconMap, Image, KitsInputSwitch as InputSwitch, KeyboardNavContext, KitsAutoComplete, KitsBarChart, KitsCascadeSelect, KitsCheckbox as KitsCheckboxes, KitsConfirm, KitsConfirmPopup, KitsContainer, KitsInputCalendar as KitsDatepicker, KitsDialogControlled as KitsDialog, KitsDropdown, FilePicker as KitsFilePicker, KitsInputColorPicker, KitsInputLocation, KitsInputMask, KitsInputNumber, KitsInputPassword, KitsInputText, KitsInputTextarea, KitsLineChart, KitsListBox, KitsMultiSelect, KitsPhoneComponent, KitsRadar, KitsRadio as KitsRadios, RadiusPicker as KitsRadiusPicker, KitsSliders, KitsThemeProvider, KitsToast, KitsTreeSelect, Label, Legend, Link, List, ListItem, Loader, LocaleContext, LocaleContextProvider, MainContext, MainContextProvider, MapTile, MessageComposer, MessageReceipt, MetricCard, KitsMultiSelect as MultiSelect, PermissionsProvider, PersonCard, ProgressBar, RadiusPicker, RankedList, ReducedMotionProvider, Rise, SHADOW_PRESET_KEYS, SPACER, KitsScrollView as ScrollView, SegmentedControl, FormSelect as Select, SelectButton, Skeleton$1 as Skeleton, SkeletonRows, Skeleton as SkeletonText, Sparkline, StackedBars, StatCard, StatGroup, StatePill, StatusCard, Stepper, Striped, Svg, TableContext, Tabs, Text, ThemeContextProvider, Timeline, Tip, Tooltip, Translate, KitsTreeSelect as TreeSelect, TreeView, TriStateCheckbox, TypingIndicator, VStack, Wash, WidgetPanel, borderProperties, breakpoints, capitalizeFirstLetter, checkExtAgainstAccepted, checkNameDuplication, colorWithAlpha, dateTimeFormat, deepMerge, defaultSeverityTheme, defaultTheme, downloadCanvas, dynamicList, expandShadowNative, extendTheme, fileTypeIcon, fileValidation, filesExt, filesMemes, filesTypes, flattenSlotStyles, fontSizeMapping, formFileValidation, formatNumber, getActiveNativeShadows, getCombinedChildIds, getCustomDateTime, getDateElements, getDefaultValues, getMeme, getParams, getPropertyByPath, getType, getTypes, getURLParams, imagesExt, imagesMemes, imagesTypes, isAlphaToken, isNumber, isSemanticToken, isShadowPreset, isThemeToken, isToday, isValidURL, kitsMotion, listingProperties, localeFiles, allProperties as mapCssProperties, mergeRefs, nonPxProperties, propertiesWithoutCssEquivalent, pxProperties, resolveStyleRecord, resolveTokenValue, schemaBuilder, setActiveNativeShadows, shadowNative, shadowWeb, sizeMapping, sizingProperties, timeAgo, timeSince, toMemes, useAllSeverityColors, useBreadcrumb, useBreadcrumbTrail, useComponentDefaults, useCountUp, useDataView, useDialog, useDisclosure, useEnter, useFieldLogic, useFocusStyles, useFormFieldKeyboardNav, useFormManager, useKeyboardNav, useKeyboardNavProvider, useKitsColorScheme, useKitsConcerto, useKitsTheme, useLanguage, useMeasuredWidth, useNativeColorMap, usePermissions, usePopup, useReducedMotion, useResolvedElementStyles, useResolvedStyle, useRtlLineHeight, useScrollState, useSelectionController, useSeverityColors, useTable, useTheme, useThemedFont, useToast };
15186
- export type { AlignmentsValues, AllSlotKeys, AnimationsValues, AvatarShape, AvatarSize, AvatarStatus, BannerAction, BannerStatus, BaseFieldProps, Booleanish, Breakpoint, CallbackProps, ChatBubbleTone, ChatBubbleVariant, ChipSeverity, ChipSize, ColorMode, ColorScale, ColorValue, Colors, ColorsType, ComponentSize, CustomSubmitButtonProps, DataTableFilterMeta, DataTableFilterMetaData, DataTableOperatorFilterMetaData, DataTableSelectionSingleChangeEvent, DataTableSortMeta, DeepPartial, DetailItemInputType, DynamicValue, ElementProps, EnteringAnimation, ExitingAnimation, ExpandedKeys, FetchError, FetchSuccess, FetchTableDataRes, FetchTablePaginationData, FieldWrapperProps, File$1 as File, FileUploaderTemplate, FileUploaderTemplateParams, FlexAlignmentsValues, FlexValues, FormBooleanEvent, FormBooleanTarget, FormEvent, FormTarget, GroupFieldConfigs, HighSizingValue, IAccentEdgeProps, IAccordionElementSlots, IAccordionProps, IActionCardProps, IAddressComponentValue, IAddressExperianFormat, IAddressFormat, IAddressFormatResults, IAddressSearchResults, IAlertComponent, IAlertProps, IAlignment, IAnimation, IAutoCompleteCore, IAutoCompleteElement, IAvatarElementSlots, IAvatarProps, IAvatarStackElementSlots, IAvatarStackProps, IBadgeProps, IBannerProps, IBarChartProps, IBaseValidation, IBasicSectionProps, IBg, IBodyTemplate, IBodyTemplateIcon, IBorder, IBottomTabBarElementSlots, IBottomTabBarProps, IBoxComponent, IBreadcrumbCrumb, IBreadcrumbProps, IBuilderAddressField, IBuilderCheckboxField, IBuilderContainerField, IBuilderDateField, IBuilderField, IBuilderFieldBase, IBuilderFieldExport, IBuilderFileField, IBuilderGroupField, IBuilderMultiselectField, IBuilderNumberField, IBuilderPhoneField, IBuilderRadiosField, IBuilderRadiusPickerField, IBuilderSectionField, IBuilderSelectField, IBuilderSwitchField, IBuilderTagsField, IBuilderTextField, IBuilderTextareaField, IButton, IButtonElementSlots, IButtonParams, IButtonProps, IButtonState, IButtonsFilter, ICanvasProps, ICardComponent, ICardElementSlots, ICarouselElementSlots, ICarouselProps, ICascadeSelect, ICascadeSelectCore, IChatBubbleElementSlots, IChatBubbleProps, ICheckbox, ICheckboxFilter, ICheckboxSlots, IChildren, IChildrenParams, IChipProps, ICircularProgressProps, ICollapseProps, IColorPicker, IColumn, IColumnBase, ICombined, ICommandPaletteGroup, ICommandPaletteItem, ICommandPaletteProps, IComponentThemeConfig, IConditionGroupProps, IConditionRowProps, IConditionRule, IConditionsSectionProps, IConfirmDialogProps, IConfirmPopupProps, IContainer, IContainerCardProps, IContainerProps, IContextValues, ICountrySearchResults, ICssStyling, IDVButtonsFilter, IDVCheckboxFilter, IDVDateFilter, IDVDropdownFilter, IDVFilters, IDVMessages, IDVMultiselectFilter, IDVNumberFilter, IDVPaginationRequest, IDVPaginationResponse, IDVPaginationState, IDVPhoneFilter, IDVRangeFilter, IDVTextFilter, IDVTriStateFilter, IDataTableContextValues, IDataTableProps, IDataViewContextValues, IDataViewProps, IDataViewRefValues, IDatatableRefValues, IDate, IDateFilter, IDateProps, IDateSeparatorElementSlots, IDateSeparatorProps, IDateValidation, IDatepickerSlots, IDeltaProps, IDetailItem, IDetailListProps, IDialogButton, IDialogProps, IDialogRef, IDialogState, IDisplay, IDividerComponent, IDonutProps, IDonutSegment, IDotGridProps, IDoughnutChartProps, IDropdownCore, IDropdownFilter, IDropdownSelect, IEditableProps, IEditors, IEffects, IElementBase, IElementSlotConfig, IElementStyle, IEmail, IEmailSearchResults, IEmptyStateElementSlots, IEmptyStateProps, IFieldCardProps, IFieldCondition, IFieldPreviewProps, IFile, IFileUploader, IFileUploaderElement, IFileUploaderTypes, IFileValidation, IFilesExtTypeKeys, IFilters, IFlexAlignment, IFlexComponent, IFormAddon, IFormBuilderInternalState, IFormBuilderMeta, IFormBuilderPayload, IFormBuilderProps, IFormComponent, IFormElement, IFormElementBaseSlots, IFormElementSlots, IFormGrid, IFormListsElements, IFormSelect, IFormSelectElements, IFormSingleElement, IGalleryElementSlots, IGalleryItem, IGalleryProps, IGaugeProps, IGrid, IGridCellStyle, IGridComponent, IGridItem, IGridItemComponent, IGroup, IGroupCardProps, IGroupElementSlots, IGroupSettings, IGroupedBarsDatum, IGroupedBarsProps, IHeaderElementSlots, IHeadingComponent, IIconProps, IImageComponent, IImagesExtTypeKeys, IInteractivity, IKeyedColumn, IKitsAnimation, IKitsBarChartDatum, IKitsBarChartProps, IKitsCheckboxProps, IKitsComponentDefaults, IKitsContainer, IKitsDialogControlled, IKitsInputCalendar, IKitsInputColorPicker, IKitsInputLocation, IKitsInputMask, IKitsInputNumber, IKitsInputPassword, IKitsInputRating, IKitsInputSwitch, IKitsInputText, IKitsInputTextarea, IKitsLineChartProps, IKitsLineChartSeries, IKitsPhoneInput, IKitsRadioProps, IKitsTheme, IKitsThemeColors, IKitsThemeConfig, IKitsThemeContextValues, IKitsThemeFontSizes, IKitsThemeFontWeights, IKitsThemeFonts, IKitsThemeLineHeights, IKitsThemeRadii, IKitsThemeShadows, IKitsThemeSpacing, IKitsToastRef, ILabelElement, ILabelProps, ILanguage, ILayout, ILegendItem, ILegendProps, ILineChartProps, ILinkComponent, ILinkOverrides, IList, IListBoxCore, IListBoxElement, IListBoxSelect, IListItem, IListing, ILoaderProps, ILoadingIndicatorContext, ILocaleContextProps, ILocaleContextValues, ILocation, ILocationDetailsResponse, ILocationResponse, IMainContextProps, IMainContextValues, IMapTilePoint, IMapTileProps, IMemes, IMenuItem, IMessageComposerElementSlots, IMessageComposerProps, IMessageReceiptElementSlots, IMessageReceiptProps, IMessages, IMetricCardProps, IMinusButton, IModalComponent, IModalFormProps, IMultiSelect, IMultiSelectCore, IMultiSelectSlots, IMultiselect, IMultiselectFilter, INativeShadow, INonCrossPlatformTypes, INumberFilter, INumberInput, INumberProps, INumberValidation, IObjectGroup, IOneOfTypes, IOptionItem, IOptionsEditorProps, IOptionsSource, IPageISection, IPaginationRequest, IPaginationResponse, IPaginatorLabels, IPaletteItemProps, IPaletteProps, IPanelCustomSlot, IPassword, IPasswordProps, IPersonCardProps, IPhone, IPhoneFilter, IPhoneObjectValue, IPhoneValidationResults, IPhoneValue, IPieChartProps, IPlusButton, IPolarAreaChartProps, IPopoverProps, IProgressBarElementSlots, IProgressBarProps, IPropertiesPanelProps, IRTLDetection, IRadarChartProps, IRadarProps, IRadarSeries, IRadioCheckboxListItem, IRadioGroup, IRadioSlots, IRadiusPickerEvents, IRadiusPickerField, IRadiusPickerI18n, IRadiusPickerProps, IRangeFilter, IRankedListProps, IRankedListRow, IRef, IRepeatableSettings, IResponsiveElement, IRiseProps, ISVGComponent, IScrollViewComponent, ISegmentedControlOption, ISegmentedControlProps, ISelect, ISelectBase, ISelectCore, ISelectElement, ISelectSlots, ISelectType, ISelectedFile, ISelectedFileType, ISelectionValidation, ISeverityColorSlots, ISeverityThemeMap, IShadowDefinition, IShadowValue, ISidebarElementSlots, ISizing, ISkeleton, ISkeletonRowsProps, ISkeletonText, ISliderProps, ISpacing, ISparklineProps, IStackProps, IStackedBarsDatum, IStackedBarsProps, IStatCardElementSlots, IStatCardProps, IStatGroupElementSlots, IStatGroupProps, IStatePillProps, IStatisticsProps, IStats, IStatusCardProps, IStepperElementSlots, IStepperProps, IStripedProps, IStyleClasses, ISwitch, ISwitchSlots, ITabBarItem, ITabItem, ITableElementSlots, ITableFlatConfig, ITabsElementSlots, ITabsProps, ITags, IText, ITextComponent, ITextFieldProps, ITextFilter, ITextInput, ITextInputProps, ITextInputSlots, ITextValidation, ITextarea, IThemeContextProps, IThemeContextValues, ITimelineElementSlots, ITimelineItem, ITimelineProps, ITipProps, IToastAction, IToastFunction, IToastOptions, IToastParams, IToolbarProps, ITransforms, ITransition, ITranslatableInputProps, ITranslatableText, ITranslateComponent, ITreeItem, ITreeSelect, ITreeSelectCore, ITreeSelectElement, ITreeSelectNode, ITreeViewProps, ITriStateFilter, ITypingIndicatorElementSlots, ITypingIndicatorProps, IUnkeyedColumn, IUseCountUpOptions, IUseFormReturn, IUserAvatar, IValidationSectionProps, IWashProps, IWidgetBarIncomingProp, IWidgetChartContextProps, IWidgetChartProp, IWidgetData, IWidgetDoughnutIncomingProp, IWidgetLineIncomingProp, IWidgetPanelProps, IWidgetPieIncomingProp, IWidgetPolarAreaIncomingProp, IWidgetRadarIncomingProp, IconName, IconType, InputTextFieldProps, KitsBreakpoint, KitsConditionalObject, KitsDevice, KitsMotion, KitsOrientation, KitsPlatform, KitsResponsiveObject, KitsResponsiveValue, KitsThemeOverride, LabelVariant, LatLng, LoadMode, LoadingIndicatorRenderer, LogicFunction, MapInteraction, MeasurementValues, MessageReceiptState, Nullable, Numbering0_12, Numbering0_32, Numberish, OnCenterChange, OnLocationError, OnLocationFound, OnRadiusChange, OnRadiusValueChange, OnSubmitHandler, OnUnitChange, Orientation, PaginationState, PaginatorPageChangeEvent$1 as PaginatorPageChangeEvent, Permissions, PlatformKey, RadiusPickerDisplay, RadiusPickerLayout, RadiusPickerSize, RadiusUnit, RadiusValue, RenderLocationButtonProps, RenderMapProps, RenderSearchBoxProps, SelectFieldProps, SemanticColorTokens, ServerMethod, ServerResponse, ServerSideProps, SetManyOpts, Severity, Shades, ShadowPreset, Shapes, SidesValues, SizingNumbering, SizingValue, StatePillState, StepperVariant, TAcceptedFileType, TBuilderFieldType, TCheckboxRadioMode, TCheckboxRadioSize, TConditionAction, TConditionMatch, TConditionOperator, TDateBoundary, TDynamicFlag, TExternalFilterLabelMode, TFiltersLayout, TIsoFormat, TItemsPerRow, TKeyFilter, TLocationProvider, TPaginatorAlign, TextLabels, TextProps, ThemedFontKind, TimelineItemStatus, Timeout, TimingNumbering, ToastPosition, ToastSeverity, ToastSize, TooltipDataAttributes, TooltipProps, TreeChangeProps, TreeCheckboxSelectionKeyType, TreeCheckboxSelectionKeys, TreeNode, TreeNodeClickEvent, TreeNodeTemplateOptions, TreeProps, TreeRef, TreeSelectionEvent, Types, UseComponentDefaultsResult, UseDisclosureReturnType, UseFieldLogicElementProps, UseFieldLogicProps, UseFieldLogicReturn, UseFormManagerEvents, UseFormManagerReturn, UseToastApi, ValidationProps, children, clearFunction, downloadableFileResponse, settings1, settings2 };
15273
+ export type { AlignmentsValues, AllSlotKeys, AnimationsValues, AvatarShape, AvatarSize, AvatarStatus, BannerAction, BannerStatus, BaseFieldProps, Booleanish, Breakpoint, CallbackProps, ChatBubbleTone, ChatBubbleVariant, ChipSeverity, ChipSize, ColorMode, ColorScale, ColorValue, Colors, ColorsType, ComponentSize, CustomSubmitButtonProps, DataTableFilterMeta, DataTableFilterMetaData, DataTableOperatorFilterMetaData, DataTableSelectionSingleChangeEvent, DataTableSortMeta, DeepPartial, DetailItemInputType, DynamicValue, ElementProps, EnteringAnimation, ExitingAnimation, ExpandedKeys, FetchError, FetchSuccess, FetchTableDataRes, FetchTablePaginationData, FieldWrapperProps, File$1 as File, FileUploaderTemplate, FileUploaderTemplateParams, FlexAlignmentsValues, FlexValues, FormBooleanEvent, FormBooleanTarget, FormEvent, FormTarget, GroupFieldConfigs, HighSizingValue, IAccentEdgeProps, IAccordionElementSlots, IAccordionProps, IActionCardProps, IAddressComponentValue, IAddressExperianFormat, IAddressFormat, IAddressFormatResults, IAddressSearchResults, IAlertComponent, IAlertProps, IAlignment, IAnimation, IAutoCompleteCore, IAutoCompleteElement, IAvatarElementSlots, IAvatarProps, IAvatarStackElementSlots, IAvatarStackProps, IBadgeProps, IBannerProps, IBarChartProps, IBaseValidation, IBasicSectionProps, IBg, IBodyTemplate, IBodyTemplateIcon, IBorder, IBottomTabBarElementSlots, IBottomTabBarProps, IBoxComponent, IBreadcrumbCrumb, IBreadcrumbProps, IBuilderAddressField, IBuilderCheckboxField, IBuilderContainerField, IBuilderDateField, IBuilderField, IBuilderFieldBase, IBuilderFieldExport, IBuilderFileField, IBuilderGroupField, IBuilderMultiselectField, IBuilderNumberField, IBuilderPhoneField, IBuilderRadiosField, IBuilderRadiusPickerField, IBuilderSectionField, IBuilderSelectField, IBuilderSwitchField, IBuilderTagsField, IBuilderTextField, IBuilderTextareaField, IButton, IButtonElementSlots, IButtonParams, IButtonProps, IButtonState, IButtonsFilter, ICanvasProps, ICardComponent, ICardElementSlots, ICarouselElementSlots, ICarouselProps, ICascadeSelect, ICascadeSelectCore, IChatBubbleElementSlots, IChatBubbleProps, ICheckbox, ICheckboxFilter, ICheckboxSlots, IChildren, IChildrenParams, IChipInputSlots, IChipProps, ICircularProgressProps, ICollapseProps, IColorPicker, IColumn, IColumnBase, ICombined, ICommandPaletteGroup, ICommandPaletteItem, ICommandPaletteProps, IComponentThemeConfig, IConditionGroupProps, IConditionRowProps, IConditionRule, IConditionsSectionProps, IConfirmDialogProps, IConfirmPopupProps, IContainer, IContainerCardProps, IContainerProps, IContextValues, ICountrySearchResults, ICssStyling, IDVButtonsFilter, IDVCheckboxFilter, IDVDateFilter, IDVDropdownFilter, IDVFilters, IDVMessages, IDVMultiselectFilter, IDVNumberFilter, IDVPaginationRequest, IDVPaginationResponse, IDVPaginationState, IDVPhoneFilter, IDVRangeFilter, IDVTextFilter, IDVTriStateFilter, IDataTableContextValues, IDataTableProps, IDataViewContextValues, IDataViewProps, IDataViewRefValues, IDatatableRefValues, IDate, IDateFilter, IDateProps, IDateSeparatorElementSlots, IDateSeparatorProps, IDateValidation, IDatepickerSlots, IDeltaProps, IDetailItem, IDetailListProps, IDialogButton, IDialogProps, IDialogRef, IDialogState, IDisplay, IDividerComponent, IDonutProps, IDonutSegment, IDotGridProps, IDoughnutChartProps, IDropdownCore, IDropdownFilter, IDropdownSelect, IEditableProps, IEditors, IEffects, IElementBase, IElementSlotConfig, IElementStyle, IEmail, IEmailSearchResults, IEmptyStateElementSlots, IEmptyStateProps, IFieldCardProps, IFieldCondition, IFieldPreviewProps, IFile, IFileUploader, IFileUploaderElement, IFileUploaderTypes, IFileValidation, IFilesExtTypeKeys, IFilters, IFlexAlignment, IFlexComponent, IFormAddon, IFormBuilderInternalState, IFormBuilderMeta, IFormBuilderPayload, IFormBuilderProps, IFormComponent, IFormElement, IFormElementBaseSlots, IFormElementSlots, IFormGrid, IFormListsElements, IFormSelect, IFormSelectElements, IFormSingleElement, IGalleryElementSlots, IGalleryItem, IGalleryProps, IGaugeProps, IGrid, IGridCellStyle, IGridComponent, IGridItem, IGridItemComponent, IGroup, IGroupCardProps, IGroupElementSlots, IGroupSettings, IGroupedBarsDatum, IGroupedBarsProps, IHeaderElementSlots, IHeadingComponent, IIconProps, IImageComponent, IImagesExtTypeKeys, IInteractivity, IKeyedColumn, IKitsAnimation, IKitsBarChartDatum, IKitsBarChartProps, IKitsCheckboxProps, IKitsComponentDefaults, IKitsContainer, IKitsDialogControlled, IKitsInputCalendar, IKitsInputColorPicker, IKitsInputLocation, IKitsInputMask, IKitsInputNumber, IKitsInputPassword, IKitsInputRating, IKitsInputSwitch, IKitsInputText, IKitsInputTextarea, IKitsLineChartProps, IKitsLineChartSeries, IKitsPhoneInput, IKitsRadioProps, IKitsTheme, IKitsThemeColors, IKitsThemeConfig, IKitsThemeContextValues, IKitsThemeFontSizes, IKitsThemeFontWeights, IKitsThemeFonts, IKitsThemeLineHeights, IKitsThemeRadii, IKitsThemeShadows, IKitsThemeSpacing, IKitsToastRef, ILabelElement, ILabelProps, ILanguage, ILayout, ILegendItem, ILegendProps, ILineChartProps, ILinkComponent, ILinkOverrides, IList, IListBoxCore, IListBoxElement, IListBoxSelect, IListItem, IListing, ILoaderProps, ILoadingIndicatorContext, ILocaleContextProps, ILocaleContextValues, ILocation, ILocationDetailsResponse, ILocationResponse, IMainContextProps, IMainContextValues, IMapTilePoint, IMapTileProps, IMemes, IMenuItem, IMessageComposerElementSlots, IMessageComposerProps, IMessageReceiptElementSlots, IMessageReceiptProps, IMessages, IMetricCardProps, IMinusButton, IModalComponent, IModalFormProps, IMultiSelect, IMultiSelectCore, IMultiSelectSlots, IMultiselect, IMultiselectFilter, INativeShadow, INonCrossPlatformTypes, INumberFilter, INumberInput, INumberProps, INumberValidation, IObjectGroup, IOneOfTypes, IOptionItem, IOptionsEditorProps, IOptionsSource, IPageISection, IPaginationRequest, IPaginationResponse, IPaginatorLabels, IPaletteItemProps, IPaletteProps, IPanelCustomSlot, IPassword, IPasswordProps, IPersonCardProps, IPhone, IPhoneFilter, IPhoneObjectValue, IPhoneValidationResults, IPhoneValue, IPieChartProps, IPlusButton, IPolarAreaChartProps, IPopoverProps, IProgressBarElementSlots, IProgressBarProps, IPropertiesPanelProps, IRTLDetection, IRadarChartProps, IRadarProps, IRadarSeries, IRadioCheckboxListItem, IRadioGroup, IRadioSlots, IRadiusPickerEvents, IRadiusPickerField, IRadiusPickerI18n, IRadiusPickerProps, IRangeFilter, IRankedListProps, IRankedListRow, IRef, IRepeatableSettings, IResponsiveElement, IRiseProps, ISVGComponent, IScrollViewComponent, ISegmentedControlOption, ISegmentedControlProps, ISelect, ISelectBase, ISelectCore, ISelectElement, ISelectSlots, ISelectType, ISelectedFile, ISelectedFileType, ISelectionValidation, ISeverityColorSlots, ISeverityThemeMap, IShadowDefinition, IShadowValue, ISidebarElementSlots, ISizing, ISkeleton, ISkeletonRowsProps, ISkeletonText, ISliderProps, ISpacing, ISparklineProps, IStackProps, IStackedBarsDatum, IStackedBarsProps, IStatCardElementSlots, IStatCardProps, IStatGroupElementSlots, IStatGroupProps, IStatePillProps, IStatisticsProps, IStats, IStatusCardProps, IStepperElementSlots, IStepperProps, IStripedProps, IStyleClasses, ISwitch, ISwitchSlots, ITabBarItem, ITabItem, ITableElementSlots, ITableFlatConfig, ITabsElementSlots, ITabsProps, ITags, IText, ITextComponent, ITextFieldProps, ITextFilter, ITextInput, ITextInputProps, ITextInputSlots, ITextValidation, ITextarea, IThemeContextProps, IThemeContextValues, ITimelineElementSlots, ITimelineItem, ITimelineProps, ITipProps, IToastAction, IToastFunction, IToastOptions, IToastParams, IToolbarProps, ITransforms, ITransition, ITranslatableInputProps, ITranslatableText, ITranslateComponent, ITreeItem, ITreeSelect, ITreeSelectCore, ITreeSelectElement, ITreeSelectNode, ITreeViewProps, ITriStateFilter, ITypingIndicatorElementSlots, ITypingIndicatorProps, IUnkeyedColumn, IUseCountUpOptions, IUseFormReturn, IUserAvatar, IValidationSectionProps, IWashProps, IWidgetBarIncomingProp, IWidgetChartContextProps, IWidgetChartProp, IWidgetData, IWidgetDoughnutIncomingProp, IWidgetLineIncomingProp, IWidgetPanelProps, IWidgetPieIncomingProp, IWidgetPolarAreaIncomingProp, IWidgetRadarIncomingProp, IconName, IconType, InputTextFieldProps, KitsBreakpoint, KitsConditionalObject, KitsDevice, KitsMotion, KitsOrientation, KitsPlatform, KitsResponsiveObject, KitsResponsiveValue, KitsThemeOverride, LabelVariant, LatLng, LoadMode, LoadingIndicatorRenderer, LogicFunction, MapInteraction, MeasurementValues, MessageReceiptState, Nullable, Numbering0_12, Numbering0_32, Numberish, OnCenterChange, OnLocationError, OnLocationFound, OnRadiusChange, OnRadiusValueChange, OnSubmitHandler, OnUnitChange, Orientation, PaginationState, PaginatorPageChangeEvent$1 as PaginatorPageChangeEvent, Permissions, PlatformKey, RadiusPickerDisplay, RadiusPickerLayout, RadiusPickerSize, RadiusUnit, RadiusValue, RenderLocationButtonProps, RenderMapProps, RenderSearchBoxProps, SelectFieldProps, SemanticColorTokens, ServerMethod, ServerResponse, ServerSideProps, SetManyOpts, Severity, Shades, ShadowPreset, Shapes, SidesValues, SizingNumbering, SizingValue, StatePillState, StepperVariant, TAcceptedFileType, TBuilderFieldType, TCheckboxRadioMode, TCheckboxRadioSize, TConditionAction, TConditionMatch, TConditionOperator, TDateBoundary, TDynamicFlag, TExternalFilterLabelMode, TFiltersLayout, TIsoFormat, TItemsPerRow, TKeyFilter, TLocationProvider, TPaginatorAlign, TextLabels, TextProps, ThemedFontKind, TimelineItemStatus, Timeout, TimingNumbering, ToastPosition, ToastSeverity, ToastSize, TooltipDataAttributes, TooltipProps, TreeChangeProps, TreeCheckboxSelectionKeyType, TreeCheckboxSelectionKeys, TreeNode, TreeNodeClickEvent, TreeNodeTemplateOptions, TreeProps, TreeRef, TreeSelectionEvent, Types, UseComponentDefaultsResult, UseDisclosureReturnType, UseFieldLogicElementProps, UseFieldLogicProps, UseFieldLogicReturn, UseFormManagerEvents, UseFormManagerReturn, UseToastApi, ValidationProps, children, clearFunction, downloadableFileResponse, settings1, settings2 };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lmb-it/kitsconcerto-native",
3
- "version": "0.1.284",
3
+ "version": "0.1.285",
4
4
  "description": "KitsConcerto — Native (React Native) UI components",
5
5
  "main": "index.cjs",
6
6
  "module": "index.js",
@@ -797,10 +797,14 @@ const defaultTheme = {
797
797
  },
798
798
  itemDisabled: {
799
799
  style: { color: "text-muted", opacity: 0.55, cursor: "not-allowed" }
800
- }
801
- },
802
- // ─── MultiSelect (chip + per-item checkbox slots) ─────
803
- MultiSelect: {
800
+ },
801
+ /* ─── Chips (MultiSelect display="chip" AND Tags) ───────
802
+ ⛔ THESE LIVE ON THE BASE GROUP BECAUSE TWO CONTROLS DRAW CHIPS
803
+ AND THEY DISAGREED. The values below used to sit under
804
+ `MultiSelect`, so MultiSelect drew a pill and the Tags field —
805
+ AutoComplete with `isMultiple`, which hardcoded its own
806
+ background+colour and read no slot at all — drew PrimeReact's
807
+ square token right next to it. One definition, both readers. */
804
808
  token: {
805
809
  style: {
806
810
  backgroundColor: "brand-tint",
@@ -819,6 +823,22 @@ const defaultTheme = {
819
823
  tokenIcon: {
820
824
  style: { color: "brand-deep", marginLeft: 4, fontSize: 12, cursor: "pointer" }
821
825
  },
826
+ /* ⚠️ THE CHIPS BOX IS FLAT BY DEFAULT, AND THAT IS NOT THE SAME AS
827
+ UNSTYLEABLE. `KitsContainer` already paints the `inputGroup`
828
+ border around the field, so a second border here would double it.
829
+ The slot exists so a consumer CAN paint it — an `attached` tags
830
+ field has no KitsContainer at all and needs to draw its own
831
+ chrome. See `IChipInputSlots.tokenContainer`. */
832
+ tokenContainer: {
833
+ style: {
834
+ backgroundColor: "transparent",
835
+ borderWidth: 0
836
+ }
837
+ }
838
+ },
839
+ // ─── MultiSelect (per-item checkbox slots; chips inherit
840
+ // from the Select base group above) ───────────────────
841
+ MultiSelect: {
822
842
  checkboxBox: {
823
843
  style: {
824
844
  borderColor: "border-strong",