@space-uy/pulsar-ui 0.2.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/LICENSE +20 -0
- package/README.md +148 -0
- package/lib/module/components/Accordion.js +242 -0
- package/lib/module/components/Accordion.js.map +1 -0
- package/lib/module/components/BottomSheet.js +183 -0
- package/lib/module/components/BottomSheet.js.map +1 -0
- package/lib/module/components/Button.js +64 -0
- package/lib/module/components/Button.js.map +1 -0
- package/lib/module/components/ButtonContainer.js +118 -0
- package/lib/module/components/ButtonContainer.js.map +1 -0
- package/lib/module/components/CalendarPicker.js +374 -0
- package/lib/module/components/CalendarPicker.js.map +1 -0
- package/lib/module/components/Card.js +43 -0
- package/lib/module/components/Card.js.map +1 -0
- package/lib/module/components/Checkbox.js +122 -0
- package/lib/module/components/Checkbox.js.map +1 -0
- package/lib/module/components/Chip.js +50 -0
- package/lib/module/components/Chip.js.map +1 -0
- package/lib/module/components/CopyToClipboard.js +98 -0
- package/lib/module/components/CopyToClipboard.js.map +1 -0
- package/lib/module/components/Dialog.js +232 -0
- package/lib/module/components/Dialog.js.map +1 -0
- package/lib/module/components/Header.js +94 -0
- package/lib/module/components/Header.js.map +1 -0
- package/lib/module/components/Icon.js +22 -0
- package/lib/module/components/Icon.js.map +1 -0
- package/lib/module/components/IconButton.js +57 -0
- package/lib/module/components/IconButton.js.map +1 -0
- package/lib/module/components/Input.js +111 -0
- package/lib/module/components/Input.js.map +1 -0
- package/lib/module/components/InputContainer.js +104 -0
- package/lib/module/components/InputContainer.js.map +1 -0
- package/lib/module/components/LoadingIndicator.js +62 -0
- package/lib/module/components/LoadingIndicator.js.map +1 -0
- package/lib/module/components/OtpInput.js +85 -0
- package/lib/module/components/OtpInput.js.map +1 -0
- package/lib/module/components/OtpInputContainer.js +148 -0
- package/lib/module/components/OtpInputContainer.js.map +1 -0
- package/lib/module/components/Select.js +189 -0
- package/lib/module/components/Select.js.map +1 -0
- package/lib/module/components/Switch.js +74 -0
- package/lib/module/components/Switch.js.map +1 -0
- package/lib/module/components/Tabs.js +99 -0
- package/lib/module/components/Tabs.js.map +1 -0
- package/lib/module/components/Text.js +66 -0
- package/lib/module/components/Text.js.map +1 -0
- package/lib/module/components/TextArea.js +106 -0
- package/lib/module/components/TextArea.js.map +1 -0
- package/lib/module/hooks/useTheme.js +20 -0
- package/lib/module/hooks/useTheme.js.map +1 -0
- package/lib/module/index.js +27 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/store/themeStore.js +50 -0
- package/lib/module/store/themeStore.js.map +1 -0
- package/lib/module/theme/colors.js +25 -0
- package/lib/module/theme/colors.js.map +1 -0
- package/lib/module/theme/meassures.js +10 -0
- package/lib/module/theme/meassures.js.map +1 -0
- package/lib/module/utils/stringUtils.js +12 -0
- package/lib/module/utils/stringUtils.js.map +1 -0
- package/lib/module/utils/uiUtils.js +63 -0
- package/lib/module/utils/uiUtils.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/components/Accordion.d.ts +22 -0
- package/lib/typescript/src/components/Accordion.d.ts.map +1 -0
- package/lib/typescript/src/components/BottomSheet.d.ts +13 -0
- package/lib/typescript/src/components/BottomSheet.d.ts.map +1 -0
- package/lib/typescript/src/components/Button.d.ts +16 -0
- package/lib/typescript/src/components/Button.d.ts.map +1 -0
- package/lib/typescript/src/components/ButtonContainer.d.ts +30 -0
- package/lib/typescript/src/components/ButtonContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/CalendarPicker.d.ts +19 -0
- package/lib/typescript/src/components/CalendarPicker.d.ts.map +1 -0
- package/lib/typescript/src/components/Card.d.ts +7 -0
- package/lib/typescript/src/components/Card.d.ts.map +1 -0
- package/lib/typescript/src/components/Checkbox.d.ts +11 -0
- package/lib/typescript/src/components/Checkbox.d.ts.map +1 -0
- package/lib/typescript/src/components/Chip.d.ts +9 -0
- package/lib/typescript/src/components/Chip.d.ts.map +1 -0
- package/lib/typescript/src/components/CopyToClipboard.d.ts +12 -0
- package/lib/typescript/src/components/CopyToClipboard.d.ts.map +1 -0
- package/lib/typescript/src/components/Dialog.d.ts +40 -0
- package/lib/typescript/src/components/Dialog.d.ts.map +1 -0
- package/lib/typescript/src/components/Header.d.ts +18 -0
- package/lib/typescript/src/components/Header.d.ts.map +1 -0
- package/lib/typescript/src/components/Icon.d.ts +12 -0
- package/lib/typescript/src/components/Icon.d.ts.map +1 -0
- package/lib/typescript/src/components/IconButton.d.ts +13 -0
- package/lib/typescript/src/components/IconButton.d.ts.map +1 -0
- package/lib/typescript/src/components/Input.d.ts +17 -0
- package/lib/typescript/src/components/Input.d.ts.map +1 -0
- package/lib/typescript/src/components/InputContainer.d.ts +22 -0
- package/lib/typescript/src/components/InputContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/LoadingIndicator.d.ts +9 -0
- package/lib/typescript/src/components/LoadingIndicator.d.ts.map +1 -0
- package/lib/typescript/src/components/OtpInput.d.ts +3 -0
- package/lib/typescript/src/components/OtpInput.d.ts.map +1 -0
- package/lib/typescript/src/components/OtpInputContainer.d.ts +17 -0
- package/lib/typescript/src/components/OtpInputContainer.d.ts.map +1 -0
- package/lib/typescript/src/components/Select.d.ts +20 -0
- package/lib/typescript/src/components/Select.d.ts.map +1 -0
- package/lib/typescript/src/components/Switch.d.ts +10 -0
- package/lib/typescript/src/components/Switch.d.ts.map +1 -0
- package/lib/typescript/src/components/Tabs.d.ts +14 -0
- package/lib/typescript/src/components/Tabs.d.ts.map +1 -0
- package/lib/typescript/src/components/Text.d.ts +7 -0
- package/lib/typescript/src/components/Text.d.ts.map +1 -0
- package/lib/typescript/src/components/TextArea.d.ts +16 -0
- package/lib/typescript/src/components/TextArea.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useTheme.d.ts +9 -0
- package/lib/typescript/src/hooks/useTheme.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +27 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/store/themeStore.d.ts +32 -0
- package/lib/typescript/src/store/themeStore.d.ts.map +1 -0
- package/lib/typescript/src/theme/colors.d.ts +14 -0
- package/lib/typescript/src/theme/colors.d.ts.map +1 -0
- package/lib/typescript/src/theme/meassures.d.ts +9 -0
- package/lib/typescript/src/theme/meassures.d.ts.map +1 -0
- package/lib/typescript/src/utils/stringUtils.d.ts +7 -0
- package/lib/typescript/src/utils/stringUtils.d.ts.map +1 -0
- package/lib/typescript/src/utils/uiUtils.d.ts +21 -0
- package/lib/typescript/src/utils/uiUtils.d.ts.map +1 -0
- package/package.json +173 -0
- package/src/components/Accordion.tsx +284 -0
- package/src/components/BottomSheet.tsx +259 -0
- package/src/components/Button.tsx +85 -0
- package/src/components/ButtonContainer.tsx +161 -0
- package/src/components/CalendarPicker.tsx +428 -0
- package/src/components/Card.tsx +55 -0
- package/src/components/Checkbox.tsx +160 -0
- package/src/components/Chip.tsx +58 -0
- package/src/components/CopyToClipboard.tsx +108 -0
- package/src/components/Dialog.tsx +263 -0
- package/src/components/Header.tsx +100 -0
- package/src/components/Icon.tsx +27 -0
- package/src/components/IconButton.tsx +71 -0
- package/src/components/Input.tsx +144 -0
- package/src/components/InputContainer.tsx +134 -0
- package/src/components/LoadingIndicator.tsx +78 -0
- package/src/components/OtpInput.tsx +109 -0
- package/src/components/OtpInputContainer.tsx +196 -0
- package/src/components/Select.tsx +219 -0
- package/src/components/Switch.tsx +104 -0
- package/src/components/Tabs.tsx +117 -0
- package/src/components/Text.tsx +64 -0
- package/src/components/TextArea.tsx +141 -0
- package/src/hooks/useTheme.tsx +23 -0
- package/src/index.tsx +38 -0
- package/src/store/themeStore.ts +57 -0
- package/src/theme/colors.ts +35 -0
- package/src/theme/meassures.ts +7 -0
- package/src/utils/stringUtils.ts +16 -0
- package/src/utils/uiUtils.ts +70 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type StyleProp, type ViewStyle } from 'react-native';
|
|
2
|
+
type Props = {
|
|
3
|
+
style?: StyleProp<ViewStyle>;
|
|
4
|
+
value: boolean;
|
|
5
|
+
onValueChange: (value: boolean) => void;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
};
|
|
8
|
+
export default function Switch({ value, onValueChange, disabled, style, }: Props): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=Switch.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Switch.d.ts","sourceRoot":"","sources":["../../../../src/components/Switch.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAYtB,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,KAAK,EAAE,OAAO,CAAC;IACf,aAAa,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAOF,MAAM,CAAC,OAAO,UAAU,MAAM,CAAC,EAC7B,KAAK,EACL,aAAa,EACb,QAAQ,EACR,KAAK,GACN,EAAE,KAAK,2CA0DP"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type ViewStyle, type StyleProp } from 'react-native';
|
|
2
|
+
export type Tab = {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
};
|
|
6
|
+
type Props = {
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
options: Tab[];
|
|
9
|
+
selected: Tab;
|
|
10
|
+
onChange: (value: Tab) => void;
|
|
11
|
+
};
|
|
12
|
+
export default function Tabs({ options, selected, onChange, style }: Props): import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=Tabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/Tabs.tsx"],"names":[],"mappings":"AACA,OAAO,EAIL,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,cAAc,CAAC;AAWtB,MAAM,MAAM,GAAG,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAEnD,KAAK,KAAK,GAAG;IACX,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7B,OAAO,EAAE,GAAG,EAAE,CAAC;IACf,QAAQ,EAAE,GAAG,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,IAAI,CAAC;CAChC,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,KAAK,2CAwEzE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type TextProps } from 'react-native';
|
|
2
|
+
type Props = TextProps & {
|
|
3
|
+
variant: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'pl' | 'pm' | 'ps' | 'caption';
|
|
4
|
+
};
|
|
5
|
+
export default function Text({ variant, style, children, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
7
|
+
//# sourceMappingURL=Text.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Text.d.ts","sourceRoot":"","sources":["../../../../src/components/Text.tsx"],"names":[],"mappings":"AACA,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAI1E,KAAK,KAAK,GAAG,SAAS,GAAG;IACvB,OAAO,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,SAAS,CAAC;CAC5E,CAAC;AAEF,MAAM,CAAC,OAAO,UAAU,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,2CAsDzE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type StyleProp, type ViewStyle, type TextInputProps } from 'react-native';
|
|
2
|
+
export type InputRef = {
|
|
3
|
+
focus: () => void;
|
|
4
|
+
blur: () => void;
|
|
5
|
+
};
|
|
6
|
+
export declare const TextArea: import("react").ForwardRefExoticComponent<TextInputProps & {
|
|
7
|
+
style?: StyleProp<ViewStyle>;
|
|
8
|
+
error?: boolean;
|
|
9
|
+
label?: string;
|
|
10
|
+
hint?: string;
|
|
11
|
+
numberOfLines?: number;
|
|
12
|
+
maxLength?: number;
|
|
13
|
+
onChangeText?: (text: string) => void;
|
|
14
|
+
} & import("react").RefAttributes<InputRef>>;
|
|
15
|
+
export default TextArea;
|
|
16
|
+
//# sourceMappingURL=TextArea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextArea.d.ts","sourceRoot":"","sources":["../../../../src/components/TextArea.tsx"],"names":[],"mappings":"AAOA,OAAO,EAGL,KAAK,SAAS,EACd,KAAK,SAAS,EACd,KAAK,cAAc,EAIpB,MAAM,cAAc,CAAC;AAmBtB,MAAM,MAAM,QAAQ,GAAG;IAAE,KAAK,EAAE,MAAM,IAAI,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAA;CAAE,CAAC;AAE/D,eAAO,MAAM,QAAQ;YAXX,SAAS,CAAC,SAAS,CAAC;YACpB,OAAO;YACP,MAAM;WACP,MAAM;oBACG,MAAM;gBACV,MAAM;mBACH,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI;4CAmGtC,CAAC;AASF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
declare const useUIKitTheme: () => {
|
|
2
|
+
theme: import("..").Theme;
|
|
3
|
+
setTheme: (theme: import("..").Theme) => void;
|
|
4
|
+
colorScheme: import("react-native").ColorSchemeName;
|
|
5
|
+
setColorScheme: (colorScheme: import("react-native").ColorSchemeName) => void;
|
|
6
|
+
colors: import("../theme/colors").ColorPalette;
|
|
7
|
+
};
|
|
8
|
+
export default useUIKitTheme;
|
|
9
|
+
//# sourceMappingURL=useTheme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTheme.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useTheme.tsx"],"names":[],"mappings":"AAGA,QAAA,MAAM,aAAa;;;;;;CAiBlB,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export { default as Button } from './components/Button';
|
|
2
|
+
export { default as Tabs, type Tab } from './components/Tabs';
|
|
3
|
+
export { default as Input } from './components/Input';
|
|
4
|
+
export { default as Text } from './components/Text';
|
|
5
|
+
export { default as Card } from './components/Card';
|
|
6
|
+
export { default as Select, type SelectOption } from './components/Select';
|
|
7
|
+
export { default as useUIKitTheme } from './hooks/useTheme';
|
|
8
|
+
export type { Theme } from './store/themeStore';
|
|
9
|
+
export { default as LoadingIndicator } from './components/LoadingIndicator';
|
|
10
|
+
export { default as Checkbox } from './components/Checkbox';
|
|
11
|
+
export { default as Chip } from './components/Chip';
|
|
12
|
+
export { default as Icon, type IconName } from './components/Icon';
|
|
13
|
+
export { default as IconButton } from './components/IconButton';
|
|
14
|
+
export { default as Header } from './components/Header';
|
|
15
|
+
export { default as Switch } from './components/Switch';
|
|
16
|
+
export { default as ButtonContainer, ButtonVariant, ButtonSize, } from './components/ButtonContainer';
|
|
17
|
+
export { convertHexToRgba } from './utils/uiUtils';
|
|
18
|
+
export { default as BottomSheet } from './components/BottomSheet';
|
|
19
|
+
export { default as TextArea } from './components/TextArea';
|
|
20
|
+
export { OtpInputContainer } from './components/OtpInputContainer';
|
|
21
|
+
export { OtpInput } from './components/OtpInput';
|
|
22
|
+
export { type OtpInputContainerRef } from './components/OtpInputContainer';
|
|
23
|
+
export { default as CalendarPicker } from './components/CalendarPicker';
|
|
24
|
+
export { default as Accordion, AccordionItem } from './components/Accordion';
|
|
25
|
+
export { CopyToClipboard } from './components/CopyToClipboard';
|
|
26
|
+
export { default as Dialog, DialogHeader, DialogTitle, DialogDescription, DialogFooter, DialogAction, DialogCancel, } from './components/Dialog';
|
|
27
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,KAAK,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAC5E,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,KAAK,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EACL,OAAO,IAAI,eAAe,EAC1B,aAAa,EACb,UAAU,GACX,MAAM,8BAA8B,CAAC;AACtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,gCAAgC,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAC7E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EACL,OAAO,IAAI,MAAM,EACjB,YAAY,EACZ,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,YAAY,EACZ,YAAY,GACb,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { ColorSchemeName } from 'react-native';
|
|
2
|
+
import { type ColorPalette } from '../theme/colors';
|
|
3
|
+
type Theme = {
|
|
4
|
+
colors: {
|
|
5
|
+
dark: ColorPalette;
|
|
6
|
+
light: ColorPalette;
|
|
7
|
+
};
|
|
8
|
+
fonts: {
|
|
9
|
+
light: string;
|
|
10
|
+
regular: string;
|
|
11
|
+
medium: string;
|
|
12
|
+
bold: string;
|
|
13
|
+
};
|
|
14
|
+
roundness: number;
|
|
15
|
+
insets: {
|
|
16
|
+
top: number;
|
|
17
|
+
left: number;
|
|
18
|
+
right: number;
|
|
19
|
+
bottom: number;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
type ThemeStore = {
|
|
23
|
+
theme: Theme;
|
|
24
|
+
colorScheme: ColorSchemeName;
|
|
25
|
+
colors: ColorPalette;
|
|
26
|
+
setTheme: (theme: Theme) => void;
|
|
27
|
+
setColorScheme: (colorScheme: ColorSchemeName) => void;
|
|
28
|
+
};
|
|
29
|
+
declare const themeStore: import("zustand").UseBoundStore<import("zustand").StoreApi<ThemeStore>>;
|
|
30
|
+
export type { Theme, ThemeStore };
|
|
31
|
+
export default themeStore;
|
|
32
|
+
//# sourceMappingURL=themeStore.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"themeStore.d.ts","sourceRoot":"","sources":["../../../../src/store/themeStore.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,OAAO,EAA2B,KAAK,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE7E,KAAK,KAAK,GAAG;IACX,MAAM,EAAE;QAAE,IAAI,EAAE,YAAY,CAAC;QAAC,KAAK,EAAE,YAAY,CAAA;KAAE,CAAC;IACpD,KAAK,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACxE,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;CACtE,CAAC;AAmBF,KAAK,UAAU,GAAG;IAChB,KAAK,EAAE,KAAK,CAAC;IACb,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,EAAE,YAAY,CAAC;IACrB,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,cAAc,EAAE,CAAC,WAAW,EAAE,eAAe,KAAK,IAAI,CAAC;CACxD,CAAC;AAEF,QAAA,MAAM,UAAU,yEAgBb,CAAC;AAEJ,YAAY,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAClC,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type ColorPalette = {
|
|
2
|
+
primary: string;
|
|
3
|
+
foregroundOnPrimary: string;
|
|
4
|
+
background: string;
|
|
5
|
+
altBackground: string;
|
|
6
|
+
foreground: string;
|
|
7
|
+
altForeground: string;
|
|
8
|
+
destructive: string;
|
|
9
|
+
border: string;
|
|
10
|
+
foregroundOnDestructive: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const darkColors: ColorPalette;
|
|
13
|
+
export declare const lightColors: ColorPalette;
|
|
14
|
+
//# sourceMappingURL=colors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"colors.d.ts","sourceRoot":"","sources":["../../../../src/theme/colors.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,YAAY,GAAG;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAUxB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAUzB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meassures.d.ts","sourceRoot":"","sources":["../../../../src/theme/meassures.ts"],"names":[],"mappings":";;;;;;;AAAA,wBAME"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a date string in "yyyy-MM-dd" format to an ISO string
|
|
3
|
+
* @param dateString - Date string in "yyyy-MM-dd" format
|
|
4
|
+
* @returns ISO string representation of the date with time set to midnight
|
|
5
|
+
*/
|
|
6
|
+
export declare const convertDateToISOString: (dateString: string) => string;
|
|
7
|
+
//# sourceMappingURL=stringUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stringUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/stringUtils.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GAAI,YAAY,MAAM,WAUxD,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Converts a hex color code to an rgba color string with the specified opacity
|
|
3
|
+
* @param hex - The hex color code (e.g. '#FF0000')
|
|
4
|
+
* @param opacity - The opacity value between 0 and 1
|
|
5
|
+
* @returns An rgba color string (e.g. 'rgba(255,0,0,0.5)')
|
|
6
|
+
*/
|
|
7
|
+
export declare const convertHexToRgba: (hex: string, opacity: number) => string;
|
|
8
|
+
/**
|
|
9
|
+
* Calculates the contrast ratio between two colors according to WCAG guidelines
|
|
10
|
+
* @param color1 - The first color in hex format (e.g. '#FF0000')
|
|
11
|
+
* @param color2 - The second color in hex format (e.g. '#FFFFFF')
|
|
12
|
+
* @returns The contrast ratio as a number (higher values indicate better contrast)
|
|
13
|
+
*/
|
|
14
|
+
export declare const getColorContrastRatio: (color1: string, color2: string) => number;
|
|
15
|
+
/**
|
|
16
|
+
* Determines whether black or white text would be more readable on a given background color
|
|
17
|
+
* @param backgroundColor - The background color in hex format (e.g. '#FF0000')
|
|
18
|
+
* @returns Either 'black' or 'white' depending on which provides better contrast
|
|
19
|
+
*/
|
|
20
|
+
export declare const getAccessibleTextColor: (backgroundColor: string) => "black" | "white";
|
|
21
|
+
//# sourceMappingURL=uiUtils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"uiUtils.d.ts","sourceRoot":"","sources":["../../../../src/utils/uiUtils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,gBAAgB,GAAI,KAAK,MAAM,EAAE,SAAS,MAAM,KAAG,MAO/D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,MAAM,EACd,QAAQ,MAAM,KACb,MA8BF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,GACjC,iBAAiB,MAAM,KACtB,OAAO,GAAG,OAMZ,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@space-uy/pulsar-ui",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "react native ui kit for spacedev",
|
|
5
|
+
"source": "./src/index.tsx",
|
|
6
|
+
"main": "./lib/module/index.js",
|
|
7
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./lib/typescript/src/index.d.ts",
|
|
11
|
+
"default": "./lib/module/index.js"
|
|
12
|
+
},
|
|
13
|
+
"./package.json": "./package.json"
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"src",
|
|
17
|
+
"lib",
|
|
18
|
+
"android",
|
|
19
|
+
"ios",
|
|
20
|
+
"cpp",
|
|
21
|
+
"*.podspec",
|
|
22
|
+
"react-native.config.js",
|
|
23
|
+
"!ios/build",
|
|
24
|
+
"!android/build",
|
|
25
|
+
"!android/gradle",
|
|
26
|
+
"!android/gradlew",
|
|
27
|
+
"!android/gradlew.bat",
|
|
28
|
+
"!android/local.properties",
|
|
29
|
+
"!**/__tests__",
|
|
30
|
+
"!**/__fixtures__",
|
|
31
|
+
"!**/__mocks__",
|
|
32
|
+
"!**/.*"
|
|
33
|
+
],
|
|
34
|
+
"scripts": {
|
|
35
|
+
"example": "yarn workspace pulsar-ui-playground",
|
|
36
|
+
"test": "jest",
|
|
37
|
+
"typecheck": "tsc",
|
|
38
|
+
"lint": "eslint \"**/*.{js,ts,tsx}\"",
|
|
39
|
+
"clean": "del-cli lib",
|
|
40
|
+
"prepare": "bob build",
|
|
41
|
+
"release": "release-it"
|
|
42
|
+
},
|
|
43
|
+
"keywords": [
|
|
44
|
+
"react-native",
|
|
45
|
+
"ios",
|
|
46
|
+
"android"
|
|
47
|
+
],
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "git+https://github.com/SpaceUY/pulsar-ui.git"
|
|
51
|
+
},
|
|
52
|
+
"author": "chacaa <santiagocasaslopez@gmail.com> (https://github.com/chacaa)",
|
|
53
|
+
"license": "MIT",
|
|
54
|
+
"bugs": {
|
|
55
|
+
"url": "https://github.com/SpaceUY/pulsar-ui/issues"
|
|
56
|
+
},
|
|
57
|
+
"homepage": "https://github.com/SpaceUY/pulsar-ui#readme",
|
|
58
|
+
"publishConfig": {
|
|
59
|
+
"registry": "https://registry.npmjs.org/",
|
|
60
|
+
"access": "public"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@commitlint/config-conventional": "^19.6.0",
|
|
64
|
+
"@eslint/compat": "^1.2.7",
|
|
65
|
+
"@eslint/eslintrc": "^3.3.0",
|
|
66
|
+
"@eslint/js": "^9.22.0",
|
|
67
|
+
"@evilmartians/lefthook": "^1.5.0",
|
|
68
|
+
"@react-native/eslint-config": "^0.78.0",
|
|
69
|
+
"@react-navigation/elements": "^2.3.8",
|
|
70
|
+
"@release-it/conventional-changelog": "^9.0.2",
|
|
71
|
+
"@types/jest": "^29.5.5",
|
|
72
|
+
"@types/react": "^18.2.0",
|
|
73
|
+
"commitlint": "^19.6.1",
|
|
74
|
+
"date-fns": "^4.1.0",
|
|
75
|
+
"del-cli": "^5.1.0",
|
|
76
|
+
"eslint": "^9.22.0",
|
|
77
|
+
"eslint-config-prettier": "^10.1.1",
|
|
78
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
79
|
+
"jest": "^29.7.0",
|
|
80
|
+
"lucide-react-native": "^0.503.0",
|
|
81
|
+
"prettier": "^3.0.3",
|
|
82
|
+
"react": "18.3.1",
|
|
83
|
+
"react-native": "0.76.9",
|
|
84
|
+
"react-native-builder-bob": "^0.40.6",
|
|
85
|
+
"react-native-calendars": "^1.1312.1",
|
|
86
|
+
"react-native-gesture-handler": "^2.25.0",
|
|
87
|
+
"react-native-reanimated": "~3.16.1",
|
|
88
|
+
"react-native-safe-area-context": "^5.4.0",
|
|
89
|
+
"react-native-svg": "^15.11.2",
|
|
90
|
+
"release-it": "^17.10.0",
|
|
91
|
+
"typescript": "^5.2.2",
|
|
92
|
+
"zustand": "^5.0.4"
|
|
93
|
+
},
|
|
94
|
+
"peerDependencies": {
|
|
95
|
+
"@react-navigation/elements": "^2.3.8",
|
|
96
|
+
"lucide-react-native": "^0.503.0",
|
|
97
|
+
"react": "*",
|
|
98
|
+
"react-native": "*",
|
|
99
|
+
"react-native-gesture-handler": "^2.25.0",
|
|
100
|
+
"react-native-reanimated": "~3.16.1",
|
|
101
|
+
"react-native-svg": "^15.11.2",
|
|
102
|
+
"zustand": "^5.0.0"
|
|
103
|
+
},
|
|
104
|
+
"workspaces": [
|
|
105
|
+
"example"
|
|
106
|
+
],
|
|
107
|
+
"packageManager": "yarn@3.6.1",
|
|
108
|
+
"jest": {
|
|
109
|
+
"preset": "react-native",
|
|
110
|
+
"modulePathIgnorePatterns": [
|
|
111
|
+
"<rootDir>/example/node_modules",
|
|
112
|
+
"<rootDir>/lib/"
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
"commitlint": {
|
|
116
|
+
"extends": [
|
|
117
|
+
"@commitlint/config-conventional"
|
|
118
|
+
]
|
|
119
|
+
},
|
|
120
|
+
"release-it": {
|
|
121
|
+
"git": {
|
|
122
|
+
"commitMessage": "chore: release ${version}",
|
|
123
|
+
"tagName": "v${version}"
|
|
124
|
+
},
|
|
125
|
+
"npm": {
|
|
126
|
+
"publish": true
|
|
127
|
+
},
|
|
128
|
+
"github": {
|
|
129
|
+
"release": true
|
|
130
|
+
},
|
|
131
|
+
"plugins": {
|
|
132
|
+
"@release-it/conventional-changelog": {
|
|
133
|
+
"preset": {
|
|
134
|
+
"name": "angular"
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
"prettier": {
|
|
140
|
+
"quoteProps": "consistent",
|
|
141
|
+
"singleQuote": true,
|
|
142
|
+
"tabWidth": 2,
|
|
143
|
+
"trailingComma": "es5",
|
|
144
|
+
"useTabs": false
|
|
145
|
+
},
|
|
146
|
+
"react-native-builder-bob": {
|
|
147
|
+
"source": "src",
|
|
148
|
+
"output": "lib",
|
|
149
|
+
"targets": [
|
|
150
|
+
[
|
|
151
|
+
"module",
|
|
152
|
+
{
|
|
153
|
+
"esm": true
|
|
154
|
+
}
|
|
155
|
+
],
|
|
156
|
+
[
|
|
157
|
+
"typescript",
|
|
158
|
+
{
|
|
159
|
+
"project": "tsconfig.build.json"
|
|
160
|
+
}
|
|
161
|
+
]
|
|
162
|
+
]
|
|
163
|
+
},
|
|
164
|
+
"create-react-native-library": {
|
|
165
|
+
"languages": "js",
|
|
166
|
+
"type": "library",
|
|
167
|
+
"version": "0.49.8"
|
|
168
|
+
},
|
|
169
|
+
"dependencies": {
|
|
170
|
+
"expo-linear-gradient": "^14.1.5",
|
|
171
|
+
"react-native-linear-gradient": "^2.8.3"
|
|
172
|
+
}
|
|
173
|
+
}
|