@a-little-world/little-world-design-system-native 0.10.0 → 0.11.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.
@@ -0,0 +1,25 @@
1
+ import React from 'react';
2
+ import { CheckboxGroupOrientation } from './styles';
3
+ type CheckboxGroupProps = {
4
+ heading?: string;
5
+ options: {
6
+ label: string;
7
+ value: string;
8
+ }[];
9
+ onSelection: (selected: string[]) => void;
10
+ preSelected?: string[];
11
+ error?: string;
12
+ name: string;
13
+ readOnly?: boolean;
14
+ orientation?: CheckboxGroupOrientation;
15
+ };
16
+ declare const CheckboxGroup: React.FC<CheckboxGroupProps>;
17
+ /**
18
+ * @deprecated Use CheckboxGroup instead. MultiCheckbox is kept for backward
19
+ * compatibility only; will be removed in a future major version.
20
+ */
21
+ declare const MultiCheckbox: React.FC<CheckboxGroupProps>;
22
+ export default CheckboxGroup;
23
+ export { MultiCheckbox };
24
+ export type { CheckboxGroupProps };
25
+ export type { CheckboxGroupProps as MultiCheckboxProps };
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export type CheckboxGroupOrientation = 'vertical' | 'horizontal';
3
+ export declare const CheckboxGroupWrapper: ({ children, orientation, }: {
4
+ children: React.ReactNode;
5
+ orientation?: CheckboxGroupOrientation | undefined;
6
+ }) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { RadioGroupOrientation } from './styles';
1
2
  import * as RadioGroupPrimitive from '@rn-primitives/radio-group';
2
3
  import React from 'react';
3
4
  type Props = {
@@ -10,6 +11,13 @@ type Props = {
10
11
  value: string;
11
12
  }>;
12
13
  inputRef: React.RefObject<HTMLInputElement>;
14
+ /**
15
+ * Layout orientation for the radio group.
16
+ * @default 'horizontal'
17
+ * - 'horizontal': Radio buttons arranged in rows
18
+ * - 'vertical': Radio buttons stacked vertically
19
+ */
20
+ orientation?: RadioGroupOrientation;
13
21
  } & RadioGroupPrimitive.RootProps;
14
22
  declare const RadioGroup: React.FC<Props>;
15
23
  export default RadioGroup;
@@ -1,10 +1,12 @@
1
1
  import { DefaultTheme } from 'styled-components/native';
2
- export declare const getRadioGroupStyles: ({ theme }: {
2
+ export type RadioGroupOrientation = 'vertical' | 'horizontal';
3
+ export declare const getRadioGroupStyles: ({ theme, orientation, }: {
3
4
  theme: DefaultTheme;
5
+ orientation?: RadioGroupOrientation | undefined;
4
6
  }) => {
5
7
  root: {
6
8
  display: "flex";
7
- flexDirection: "column";
9
+ flexDirection: "row" | "column";
8
10
  gap: number;
9
11
  alignItems: "flex-start";
10
12
  };
@@ -0,0 +1,9 @@
1
+ import { SelectBaseProps } from '@a-little-world/little-world-design-system-core';
2
+ import React from 'react';
3
+ import { StyleProp, ViewStyle } from 'react-native';
4
+ export type SelectProps = SelectBaseProps & {
5
+ style?: StyleProp<ViewStyle>;
6
+ inputRef?: React.RefObject<HTMLButtonElement>;
7
+ };
8
+ declare const Select: React.FC<SelectProps>;
9
+ export default Select;
@@ -1,7 +1,7 @@
1
1
  import { InputHeight } from '@a-little-world/little-world-design-system-core';
2
2
  import { DefaultTheme } from 'styled-components/native';
3
- export declare const DROPDOWN_MAX_WIDTH = 300;
4
- export declare const getDropdownStyles: ({ theme, maxWidth, height, hasError, }: {
3
+ export declare const SELECT_MAX_WIDTH = 300;
4
+ export declare const getSelectStyles: ({ theme, maxWidth, height, hasError, }: {
5
5
  theme: DefaultTheme;
6
6
  maxWidth: number;
7
7
  height: InputHeight;
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ import { StatusBaseProps } from '@a-little-world/little-world-design-system-core';
3
+ declare const StatusMessage: React.FC<StatusBaseProps>;
4
+ export default StatusMessage;
5
+ /**
6
+ * Semantic aliases for `StatusMessage`. Same component, clearer intent at the
7
+ * call site:
8
+ * - `Alert` — standalone / banner-style status notifications.
9
+ * - `FormMessage` — inline form validation feedback.
10
+ */
11
+ export { StatusMessage as Alert, StatusMessage as FormMessage };
12
+ export type { StatusBaseProps as AlertProps, StatusBaseProps as FormMessageProps, };
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ import { StatusTypes } from '@a-little-world/little-world-design-system-core';
3
+ export declare const StatusMessageWrapper: ({ children, type, visible, withBorder, }: {
4
+ children: React.ReactNode;
5
+ type: StatusTypes;
6
+ visible?: boolean | undefined;
7
+ withBorder?: boolean | undefined;
8
+ }) => React.JSX.Element;
9
+ export declare const StatusMessageText: ({ children, type, withBorder, }: {
10
+ children: React.ReactNode;
11
+ type: StatusTypes;
12
+ withBorder?: boolean | undefined;
13
+ }) => React.JSX.Element;
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ import { TimePickerBaseProps } from '@a-little-world/little-world-design-system-core';
3
+ interface TimePickerProps extends TimePickerBaseProps {
4
+ label?: string;
5
+ id?: string;
6
+ }
7
+ declare const TimePicker: React.FC<TimePickerProps>;
8
+ export default TimePicker;
@@ -0,0 +1,49 @@
1
+ import React from 'react';
2
+ import { ScrollView } from 'react-native';
3
+ export declare const COLUMN_HEIGHT = 200;
4
+ export declare const TimePickerTrigger: ({ children, disabled, hasError, onPress, }: {
5
+ children: React.ReactNode;
6
+ disabled?: boolean | undefined;
7
+ hasError?: boolean | undefined;
8
+ onPress: () => void;
9
+ }) => React.JSX.Element;
10
+ export declare const TriggerText: ({ children, hasValue, }: {
11
+ children: React.ReactNode;
12
+ hasValue: boolean;
13
+ }) => React.JSX.Element;
14
+ export declare const OverlayView: ({ children }: {
15
+ children: React.ReactNode;
16
+ }) => React.JSX.Element;
17
+ export declare const SheetView: ({ children }: {
18
+ children: React.ReactNode;
19
+ }) => React.JSX.Element;
20
+ export declare const SheetHeader: ({ children }: {
21
+ children: React.ReactNode;
22
+ }) => React.JSX.Element;
23
+ export declare const SheetTitle: ({ children }: {
24
+ children: React.ReactNode;
25
+ }) => React.JSX.Element;
26
+ export declare const DoneButtonText: ({ children, onPress, }: {
27
+ children: React.ReactNode;
28
+ onPress: () => void;
29
+ }) => React.JSX.Element;
30
+ export declare const ColumnsContainer: ({ children, }: {
31
+ children: React.ReactNode;
32
+ }) => React.JSX.Element;
33
+ export declare const TimeColumn: React.ForwardRefExoticComponent<{
34
+ children: React.ReactNode;
35
+ } & React.RefAttributes<ScrollView>>;
36
+ export declare const ColumnDivider: () => React.JSX.Element;
37
+ export declare const TimeOption: ({ children, isSelected, onPress, }: {
38
+ children: React.ReactNode;
39
+ isSelected: boolean;
40
+ onPress: () => void;
41
+ }) => React.JSX.Element;
42
+ export declare const AMPMContainer: ({ children }: {
43
+ children: React.ReactNode;
44
+ }) => React.JSX.Element;
45
+ export declare const AMPMButton: ({ children, isSelected, onPress, }: {
46
+ children: React.ReactNode;
47
+ isSelected: boolean;
48
+ onPress: () => void;
49
+ }) => React.JSX.Element;
package/dist/index.d.ts CHANGED
@@ -2,7 +2,10 @@ export { default as Accordion } from './components/Accordion/Accordion';
2
2
  export { default as Button } from './components/Button/Button';
3
3
  export { default as Card, CardHeader, CardContent, CardFooter, } from './components/Card/Card';
4
4
  export { default as Checkbox } from './components/Checkbox/Checkbox';
5
- export { default as Dropdown } from './components/Dropdown/Dropdown';
5
+ export { default as CheckboxGroup, MultiCheckbox, } from './components/CheckboxGroup/CheckboxGroup';
6
+ export type { CheckboxGroupProps, MultiCheckboxProps, } from './components/CheckboxGroup/CheckboxGroup';
7
+ export { default as Select } from './components/Select/Select';
8
+ export type { SelectProps } from './components/Select/Select';
6
9
  export { default as Gradient } from './components/Gradient/Gradient';
7
10
  export * from './components/Icon';
8
11
  export * from './components/Illustrations';
@@ -16,10 +19,13 @@ export { default as Popover } from './components/Popover/Popover';
16
19
  export { default as ProgressBar } from './components/ProgressBar/ProgressBar';
17
20
  export { default as RadioGroup } from './components/RadioGroup/RadioGroup';
18
21
  export { default as Separator } from './components/Separator/Separator';
22
+ export { default as StatusMessage, Alert, FormMessage, } from './components/StatusMessage/StatusMessage';
23
+ export type { AlertProps, FormMessageProps, } from './components/StatusMessage/StatusMessage';
19
24
  export { default as Tags, Tag } from './components/Tags/Tags';
20
25
  export type { TagProps, TagsProps } from './components/Tags/Tags';
21
26
  export { default as Text } from './components/Text/Text';
22
27
  export { default as TextInput } from './components/TextInput/TextInput';
28
+ export { default as TimePicker } from './components/TimePicker/TimePicker';
23
29
  export { default as ToolTip } from './components/ToolTip/ToolTip';
24
30
  export * from './theme';
25
31
  export * from './types';