import ZenInput from './ZenInput'; import ZenText from './ZenText'; import type { ThemeType } from '../../literals/Type.literal'; import { useState } from 'react'; import { TouchableOpacity, StyleSheet, View, Dimensions, ScrollView } from 'react-native'; import ThemeConfig from '../../config/Theme.config'; import { useTheme } from './../../hooks/useTheme'; import LayersConfig from '../../config/Layers.config'; import LayoutConfig from '../../config/LayoutConfig'; import ColorUtil from '../../util/Color.util'; type ZenSelectProps = { items: string[]; label?: string; placeholder?: string; dir?: 'ltr' | 'rtl'; leftIcon?: string; rightIcon?: string; leftAccessory?: any; rightAccessory?: any; disabled?: boolean; type?: ThemeType; defaultValue?: string; onChange?: (selectedItem: string) => void; maxNumberOfVisibleItems?: number; }; /** * @docunator * @title ZenSelect * @description A select component with a label. The label is optional. Based on ZenInput. * @category Themed Components * @author Danilo RamÃrez Mattey * @version 1.0.0 * @param {string[]} items The list of items to select from. This is required * @param {string} label The label for the select component * @param {string} placeholder The placeholder for the select component * @param {string} dir The direction of the text. Can be 'ltr' or 'rtl'. Default is 'ltr' * @param {string} leftIcon The left icon name * @param {Element} leftAccessory The left accessory element * @param {boolean} disabled Whether the select is disabled * @param {string} type The theme type for the select. Default is 'primary' * @param {string} defaultValue The default selected value * @param {Function} onChange Callback function when the selected item changes * @param {number} maxNumberOfVisibleItems The maximum number of items to show when the select is opened. Default is 3 * @see ZenInput * @example {tsx} import { Table, Row, Column, ZenSelect } from 'react-zen-ui';} export default function App() { return (