@demlanide/react-lucky-components 0.1.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/README.md +184 -0
- package/dist/Alert/Alert.d.ts +3 -0
- package/dist/Alert/Alert.d.ts.map +1 -0
- package/dist/Alert/Alert.js +7 -0
- package/dist/Alert/constants.d.ts +38 -0
- package/dist/Alert/constants.d.ts.map +1 -0
- package/dist/Alert/constants.js +34 -0
- package/dist/Alert/index.d.ts +3 -0
- package/dist/Alert/index.d.ts.map +1 -0
- package/dist/Alert/index.js +1 -0
- package/dist/Alert/styles.d.ts +11 -0
- package/dist/Alert/styles.d.ts.map +1 -0
- package/dist/Alert/styles.js +49 -0
- package/dist/Alert/types.d.ts +20 -0
- package/dist/Alert/types.d.ts.map +1 -0
- package/dist/Alert/types.js +1 -0
- package/dist/Avatar/Avatar.d.ts +3 -0
- package/dist/Avatar/Avatar.d.ts.map +1 -0
- package/dist/Avatar/Avatar.js +33 -0
- package/dist/Avatar/Shapes/.map.json +42 -0
- package/dist/Avatar/Shapes/romb.png +0 -0
- package/dist/Avatar/consts.d.ts +21 -0
- package/dist/Avatar/consts.d.ts.map +1 -0
- package/dist/Avatar/consts.js +20 -0
- package/dist/Avatar/index.d.ts +3 -0
- package/dist/Avatar/index.d.ts.map +1 -0
- package/dist/Avatar/index.js +1 -0
- package/dist/Avatar/styles.d.ts +27 -0
- package/dist/Avatar/styles.d.ts.map +1 -0
- package/dist/Avatar/styles.js +83 -0
- package/dist/Avatar/types.d.ts +31 -0
- package/dist/Avatar/types.d.ts.map +1 -0
- package/dist/Avatar/types.js +1 -0
- package/dist/Avatar/utilities.d.ts +8 -0
- package/dist/Avatar/utilities.d.ts.map +1 -0
- package/dist/Avatar/utilities.js +66 -0
- package/dist/Badge/Badge.d.ts +3 -0
- package/dist/Badge/Badge.d.ts.map +1 -0
- package/dist/Badge/Badge.js +8 -0
- package/dist/Badge/constants.d.ts +20 -0
- package/dist/Badge/constants.d.ts.map +1 -0
- package/dist/Badge/constants.js +32 -0
- package/dist/Badge/index.d.ts +3 -0
- package/dist/Badge/index.d.ts.map +1 -0
- package/dist/Badge/index.js +1 -0
- package/dist/Badge/styles.d.ts +10 -0
- package/dist/Badge/styles.d.ts.map +1 -0
- package/dist/Badge/styles.js +28 -0
- package/dist/Badge/types.d.ts +18 -0
- package/dist/Badge/types.d.ts.map +1 -0
- package/dist/Badge/types.js +1 -0
- package/dist/BigInput/BigInput.d.ts +3 -0
- package/dist/BigInput/BigInput.d.ts.map +1 -0
- package/dist/BigInput/BigInput.js +46 -0
- package/dist/BigInput/constants.d.ts +32 -0
- package/dist/BigInput/constants.d.ts.map +1 -0
- package/dist/BigInput/constants.js +31 -0
- package/dist/BigInput/index.d.ts +3 -0
- package/dist/BigInput/index.d.ts.map +1 -0
- package/dist/BigInput/index.js +1 -0
- package/dist/BigInput/styles.d.ts +14 -0
- package/dist/BigInput/styles.d.ts.map +1 -0
- package/dist/BigInput/styles.js +80 -0
- package/dist/BigInput/types.d.ts +23 -0
- package/dist/BigInput/types.d.ts.map +1 -0
- package/dist/BigInput/types.js +1 -0
- package/dist/Button/Button.d.ts +3 -0
- package/dist/Button/Button.d.ts.map +1 -0
- package/dist/Button/Button.js +7 -0
- package/dist/Button/constants.d.ts +23 -0
- package/dist/Button/constants.d.ts.map +1 -0
- package/dist/Button/constants.js +28 -0
- package/dist/Button/index.d.ts +3 -0
- package/dist/Button/index.d.ts.map +1 -0
- package/dist/Button/index.js +1 -0
- package/dist/Button/styles.d.ts +13 -0
- package/dist/Button/styles.d.ts.map +1 -0
- package/dist/Button/styles.js +34 -0
- package/dist/Button/types.d.ts +20 -0
- package/dist/Button/types.d.ts.map +1 -0
- package/dist/Button/types.js +1 -0
- package/dist/CardStack/BehindCard.d.ts +12 -0
- package/dist/CardStack/BehindCard.d.ts.map +1 -0
- package/dist/CardStack/BehindCard.js +18 -0
- package/dist/CardStack/CardStack.d.ts +3 -0
- package/dist/CardStack/CardStack.d.ts.map +1 -0
- package/dist/CardStack/CardStack.js +77 -0
- package/dist/CardStack/CardStackDots.d.ts +3 -0
- package/dist/CardStack/CardStackDots.d.ts.map +1 -0
- package/dist/CardStack/CardStackDots.js +121 -0
- package/dist/CardStack/StackCard.d.ts +27 -0
- package/dist/CardStack/StackCard.d.ts.map +1 -0
- package/dist/CardStack/StackCard.js +45 -0
- package/dist/CardStack/constants.d.ts +32 -0
- package/dist/CardStack/constants.d.ts.map +1 -0
- package/dist/CardStack/constants.js +31 -0
- package/dist/CardStack/index.d.ts +4 -0
- package/dist/CardStack/index.d.ts.map +1 -0
- package/dist/CardStack/index.js +2 -0
- package/dist/CardStack/types.d.ts +39 -0
- package/dist/CardStack/types.d.ts.map +1 -0
- package/dist/CardStack/types.js +1 -0
- package/dist/CardStack/useSwipeGesture.d.ts +18 -0
- package/dist/CardStack/useSwipeGesture.d.ts.map +1 -0
- package/dist/CardStack/useSwipeGesture.js +70 -0
- package/dist/DatePicker/CalendarModal.d.ts +15 -0
- package/dist/DatePicker/CalendarModal.d.ts.map +1 -0
- package/dist/DatePicker/CalendarModal.js +129 -0
- package/dist/DatePicker/DatePicker.d.ts +3 -0
- package/dist/DatePicker/DatePicker.d.ts.map +1 -0
- package/dist/DatePicker/DatePicker.js +57 -0
- package/dist/DatePicker/DayCell.d.ts +14 -0
- package/dist/DatePicker/DayCell.d.ts.map +1 -0
- package/dist/DatePicker/DayCell.js +16 -0
- package/dist/DatePicker/constants.d.ts +46 -0
- package/dist/DatePicker/constants.d.ts.map +1 -0
- package/dist/DatePicker/constants.js +51 -0
- package/dist/DatePicker/icons.d.ts +4 -0
- package/dist/DatePicker/icons.d.ts.map +1 -0
- package/dist/DatePicker/icons.js +12 -0
- package/dist/DatePicker/index.d.ts +3 -0
- package/dist/DatePicker/index.d.ts.map +1 -0
- package/dist/DatePicker/index.js +1 -0
- package/dist/DatePicker/styles.d.ts +40 -0
- package/dist/DatePicker/styles.d.ts.map +1 -0
- package/dist/DatePicker/styles.js +134 -0
- package/dist/DatePicker/types.d.ts +39 -0
- package/dist/DatePicker/types.d.ts.map +1 -0
- package/dist/DatePicker/types.js +1 -0
- package/dist/DatePicker/utils.d.ts +15 -0
- package/dist/DatePicker/utils.d.ts.map +1 -0
- package/dist/DatePicker/utils.js +133 -0
- package/dist/DimmedScrollView/DimmedScrollView.d.ts +5 -0
- package/dist/DimmedScrollView/DimmedScrollView.d.ts.map +1 -0
- package/dist/DimmedScrollView/DimmedScrollView.js +18 -0
- package/dist/DimmedScrollView/index.d.ts +3 -0
- package/dist/DimmedScrollView/index.d.ts.map +1 -0
- package/dist/DimmedScrollView/index.js +1 -0
- package/dist/DimmedScrollView/styles.d.ts +15 -0
- package/dist/DimmedScrollView/styles.d.ts.map +1 -0
- package/dist/DimmedScrollView/styles.js +32 -0
- package/dist/DimmedScrollView/types.d.ts +20 -0
- package/dist/DimmedScrollView/types.d.ts.map +1 -0
- package/dist/DimmedScrollView/types.js +1 -0
- package/dist/FadingEdge/FadingEdge.d.ts +3 -0
- package/dist/FadingEdge/FadingEdge.d.ts.map +1 -0
- package/dist/FadingEdge/FadingEdge.js +30 -0
- package/dist/FadingEdge/index.d.ts +3 -0
- package/dist/FadingEdge/index.d.ts.map +1 -0
- package/dist/FadingEdge/index.js +1 -0
- package/dist/FadingEdge/types.d.ts +14 -0
- package/dist/FadingEdge/types.d.ts.map +1 -0
- package/dist/FadingEdge/types.js +1 -0
- package/dist/Icon/Icon.d.ts +6 -0
- package/dist/Icon/Icon.d.ts.map +1 -0
- package/dist/Icon/Icon.js +16 -0
- package/dist/Icon/defaults.d.ts +7 -0
- package/dist/Icon/defaults.d.ts.map +1 -0
- package/dist/Icon/defaults.js +80 -0
- package/dist/Icon/icons/navigation.d.ts +10 -0
- package/dist/Icon/icons/navigation.d.ts.map +1 -0
- package/dist/Icon/icons/navigation.js +10 -0
- package/dist/Icon/icons/system.d.ts +29 -0
- package/dist/Icon/icons/system.d.ts.map +1 -0
- package/dist/Icon/icons/system.js +29 -0
- package/dist/Icon/icons/tabs.d.ts +6 -0
- package/dist/Icon/icons/tabs.d.ts.map +1 -0
- package/dist/Icon/icons/tabs.js +6 -0
- package/dist/Icon/index.d.ts +3 -0
- package/dist/Icon/index.d.ts.map +1 -0
- package/dist/Icon/index.js +1 -0
- package/dist/Icon/registry.d.ts +3 -0
- package/dist/Icon/registry.d.ts.map +1 -0
- package/dist/Icon/registry.js +43 -0
- package/dist/Icon/types.d.ts +20 -0
- package/dist/Icon/types.d.ts.map +1 -0
- package/dist/Icon/types.js +40 -0
- package/dist/Input/Input.d.ts +5 -0
- package/dist/Input/Input.d.ts.map +1 -0
- package/dist/Input/Input.js +64 -0
- package/dist/Input/constants.d.ts +56 -0
- package/dist/Input/constants.d.ts.map +1 -0
- package/dist/Input/constants.js +61 -0
- package/dist/Input/index.d.ts +3 -0
- package/dist/Input/index.d.ts.map +1 -0
- package/dist/Input/index.js +1 -0
- package/dist/Input/styles.d.ts +23 -0
- package/dist/Input/styles.d.ts.map +1 -0
- package/dist/Input/styles.js +99 -0
- package/dist/Input/types.d.ts +21 -0
- package/dist/Input/types.d.ts.map +1 -0
- package/dist/Input/types.js +1 -0
- package/dist/ListCell/CheckMark.d.ts +10 -0
- package/dist/ListCell/CheckMark.d.ts.map +1 -0
- package/dist/ListCell/CheckMark.js +12 -0
- package/dist/ListCell/Chevron.d.ts +14 -0
- package/dist/ListCell/Chevron.d.ts.map +1 -0
- package/dist/ListCell/Chevron.js +22 -0
- package/dist/ListCell/ListCell.d.ts +3 -0
- package/dist/ListCell/ListCell.d.ts.map +1 -0
- package/dist/ListCell/ListCell.js +120 -0
- package/dist/ListCell/PickerModal.d.ts +13 -0
- package/dist/ListCell/PickerModal.d.ts.map +1 -0
- package/dist/ListCell/PickerModal.js +8 -0
- package/dist/ListCell/RadioButton.d.ts +10 -0
- package/dist/ListCell/RadioButton.d.ts.map +1 -0
- package/dist/ListCell/RadioButton.js +12 -0
- package/dist/ListCell/SwitchTrack.d.ts +19 -0
- package/dist/ListCell/SwitchTrack.d.ts.map +1 -0
- package/dist/ListCell/SwitchTrack.js +8 -0
- package/dist/ListCell/constants.d.ts +30 -0
- package/dist/ListCell/constants.d.ts.map +1 -0
- package/dist/ListCell/constants.js +35 -0
- package/dist/ListCell/index.d.ts +3 -0
- package/dist/ListCell/index.d.ts.map +1 -0
- package/dist/ListCell/index.js +1 -0
- package/dist/ListCell/styles.d.ts +28 -0
- package/dist/ListCell/styles.d.ts.map +1 -0
- package/dist/ListCell/styles.js +111 -0
- package/dist/ListCell/types.d.ts +68 -0
- package/dist/ListCell/types.d.ts.map +1 -0
- package/dist/ListCell/types.js +1 -0
- package/dist/ListCell/useSwitchAnimation.d.ts +12 -0
- package/dist/ListCell/useSwitchAnimation.d.ts.map +1 -0
- package/dist/ListCell/useSwitchAnimation.js +31 -0
- package/dist/ListCell/utilities.d.ts +24 -0
- package/dist/ListCell/utilities.d.ts.map +1 -0
- package/dist/ListCell/utilities.js +29 -0
- package/dist/Picker/Picker.d.ts +3 -0
- package/dist/Picker/Picker.d.ts.map +1 -0
- package/dist/Picker/Picker.js +76 -0
- package/dist/Picker/PickerHeader.d.ts +7 -0
- package/dist/Picker/PickerHeader.d.ts.map +1 -0
- package/dist/Picker/PickerHeader.js +6 -0
- package/dist/Picker/PickerRow.d.ts +9 -0
- package/dist/Picker/PickerRow.d.ts.map +1 -0
- package/dist/Picker/PickerRow.js +9 -0
- package/dist/Picker/SearchField.d.ts +8 -0
- package/dist/Picker/SearchField.d.ts.map +1 -0
- package/dist/Picker/SearchField.js +8 -0
- package/dist/Picker/constants.d.ts +24 -0
- package/dist/Picker/constants.d.ts.map +1 -0
- package/dist/Picker/constants.js +29 -0
- package/dist/Picker/icons.d.ts +3 -0
- package/dist/Picker/icons.d.ts.map +1 -0
- package/dist/Picker/icons.js +9 -0
- package/dist/Picker/index.d.ts +3 -0
- package/dist/Picker/index.d.ts.map +1 -0
- package/dist/Picker/index.js +1 -0
- package/dist/Picker/styles.d.ts +34 -0
- package/dist/Picker/styles.d.ts.map +1 -0
- package/dist/Picker/styles.js +192 -0
- package/dist/Picker/types.d.ts +40 -0
- package/dist/Picker/types.d.ts.map +1 -0
- package/dist/Picker/types.js +1 -0
- package/dist/Picker/useFilteredItems.d.ts +3 -0
- package/dist/Picker/useFilteredItems.d.ts.map +1 -0
- package/dist/Picker/useFilteredItems.js +18 -0
- package/dist/SegmentedTabs/SegmentedTabs.d.ts +3 -0
- package/dist/SegmentedTabs/SegmentedTabs.d.ts.map +1 -0
- package/dist/SegmentedTabs/SegmentedTabs.js +70 -0
- package/dist/SegmentedTabs/index.d.ts +3 -0
- package/dist/SegmentedTabs/index.d.ts.map +1 -0
- package/dist/SegmentedTabs/index.js +1 -0
- package/dist/SegmentedTabs/types.d.ts +10 -0
- package/dist/SegmentedTabs/types.d.ts.map +1 -0
- package/dist/SegmentedTabs/types.js +1 -0
- package/dist/Select/Select.d.ts +3 -0
- package/dist/Select/Select.d.ts.map +1 -0
- package/dist/Select/Select.js +60 -0
- package/dist/Select/index.d.ts +3 -0
- package/dist/Select/index.d.ts.map +1 -0
- package/dist/Select/index.js +1 -0
- package/dist/Select/styles.d.ts +8 -0
- package/dist/Select/styles.d.ts.map +1 -0
- package/dist/Select/styles.js +36 -0
- package/dist/Select/types.d.ts +37 -0
- package/dist/Select/types.d.ts.map +1 -0
- package/dist/Select/types.js +1 -0
- package/dist/Tabs/FloatingTabBar.d.ts +9 -0
- package/dist/Tabs/FloatingTabBar.d.ts.map +1 -0
- package/dist/Tabs/FloatingTabBar.js +55 -0
- package/dist/Tabs/Tabs.d.ts +21 -0
- package/dist/Tabs/Tabs.d.ts.map +1 -0
- package/dist/Tabs/Tabs.js +29 -0
- package/dist/Tabs/constants.d.ts +35 -0
- package/dist/Tabs/constants.d.ts.map +1 -0
- package/dist/Tabs/constants.js +36 -0
- package/dist/Tabs/icons.d.ts +16 -0
- package/dist/Tabs/icons.d.ts.map +1 -0
- package/dist/Tabs/icons.js +8 -0
- package/dist/Tabs/index.d.ts +6 -0
- package/dist/Tabs/index.d.ts.map +1 -0
- package/dist/Tabs/index.js +4 -0
- package/dist/Tabs/styles.d.ts +224 -0
- package/dist/Tabs/styles.d.ts.map +1 -0
- package/dist/Tabs/styles.js +121 -0
- package/dist/Tabs/types.d.ts +61 -0
- package/dist/Tabs/types.d.ts.map +1 -0
- package/dist/Tabs/types.js +4 -0
- package/dist/Tabs/useFloatingTabBarScrollPadding.d.ts +7 -0
- package/dist/Tabs/useFloatingTabBarScrollPadding.d.ts.map +1 -0
- package/dist/Tabs/useFloatingTabBarScrollPadding.js +11 -0
- package/dist/Tabs/utilities.d.ts +7 -0
- package/dist/Tabs/utilities.d.ts.map +1 -0
- package/dist/Tabs/utilities.js +18 -0
- package/dist/ToggleSection/ToggleSection.d.ts +3 -0
- package/dist/ToggleSection/ToggleSection.d.ts.map +1 -0
- package/dist/ToggleSection/ToggleSection.js +18 -0
- package/dist/ToggleSection/index.d.ts +3 -0
- package/dist/ToggleSection/index.d.ts.map +1 -0
- package/dist/ToggleSection/index.js +1 -0
- package/dist/ToggleSection/styles.d.ts +15 -0
- package/dist/ToggleSection/styles.d.ts.map +1 -0
- package/dist/ToggleSection/styles.js +49 -0
- package/dist/ToggleSection/types.d.ts +36 -0
- package/dist/ToggleSection/types.d.ts.map +1 -0
- package/dist/ToggleSection/types.js +1 -0
- package/dist/assets/fonts/.map.json +51 -0
- package/dist/assets/fonts/SB Sans Text.ttf +0 -0
- package/dist/assets/fonts/sf-pro-display/.map.json +114 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYBLACKITALIC.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYBOLD.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYHEAVYITALIC.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYLIGHTITALIC.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYMEDIUM.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYREGULAR.otf +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYSEMIBOLDITALIC.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYTHINITALIC.OTF +0 -0
- package/dist/assets/fonts/sf-pro-display/SFPRODISPLAYULTRALIGHTITALIC.OTF +0 -0
- package/dist/fonts.d.ts +6 -0
- package/dist/fonts.d.ts.map +1 -0
- package/dist/fonts.js +8 -0
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +20 -0
- package/dist/theme.d.ts +19 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +18 -0
- package/package.json +76 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { DatePickerValue } from './types';
|
|
2
|
+
export declare function parseLocalDate(iso: string): Date | null;
|
|
3
|
+
export declare function toISOLocal(date: Date): string;
|
|
4
|
+
export declare function isSameDay(a: Date, b: Date): boolean;
|
|
5
|
+
export declare function isBefore(a: Date, b: Date): boolean;
|
|
6
|
+
export declare function isAfter(a: Date, b: Date): boolean;
|
|
7
|
+
export declare function isBetween(d: Date, start: Date, end: Date): boolean;
|
|
8
|
+
export interface CalendarDay {
|
|
9
|
+
day: number;
|
|
10
|
+
date: Date;
|
|
11
|
+
}
|
|
12
|
+
export declare function buildWeeks(year: number, month: number): (CalendarDay | null)[][];
|
|
13
|
+
export declare function formatDisplayValue(value: DatePickerValue | undefined, mode: 'single' | 'range'): string;
|
|
14
|
+
export declare function sanitizeValue(value: DatePickerValue | undefined, mode: 'single' | 'range', minDate?: Date | null, maxDate?: Date | null): DatePickerValue | undefined;
|
|
15
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/DatePicker/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAkB,MAAM,SAAS,CAAC;AAI/D,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAQvD;AAED,wBAAgB,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,CAK7C;AAID,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAMnD;AAED,wBAAgB,QAAQ,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAElD;AAED,wBAAgB,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,GAAG,OAAO,CAEjD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,GAAG,OAAO,CAGlE;AAID,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,IAAI,CAAC;CACZ;AAWD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,CAAC,WAAW,GAAG,IAAI,CAAC,EAAE,EAAE,CA6BhF;AAID,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,IAAI,EAAE,QAAQ,GAAG,OAAO,GACvB,MAAM,CA4BR;AAID,wBAAgB,aAAa,CAC3B,KAAK,EAAE,eAAe,GAAG,SAAS,EAClC,IAAI,EAAE,QAAQ,GAAG,OAAO,EACxB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,EACrB,OAAO,CAAC,EAAE,IAAI,GAAG,IAAI,GACpB,eAAe,GAAG,SAAS,CA2B7B"}
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
/* ── Local-date parsing (no timezone shifts) ─────────────────────── */
|
|
2
|
+
export function parseLocalDate(iso) {
|
|
3
|
+
const parts = iso.split('-');
|
|
4
|
+
if (parts.length !== 3)
|
|
5
|
+
return null;
|
|
6
|
+
const y = Number(parts[0]);
|
|
7
|
+
const m = Number(parts[1]) - 1;
|
|
8
|
+
const d = Number(parts[2]);
|
|
9
|
+
if (Number.isNaN(y) || Number.isNaN(m) || Number.isNaN(d))
|
|
10
|
+
return null;
|
|
11
|
+
return new Date(y, m, d);
|
|
12
|
+
}
|
|
13
|
+
export function toISOLocal(date) {
|
|
14
|
+
const y = date.getFullYear();
|
|
15
|
+
const m = String(date.getMonth() + 1).padStart(2, '0');
|
|
16
|
+
const d = String(date.getDate()).padStart(2, '0');
|
|
17
|
+
return `${y}-${m}-${d}`;
|
|
18
|
+
}
|
|
19
|
+
/* ── Comparison helpers ──────────────────────────────────────────── */
|
|
20
|
+
export function isSameDay(a, b) {
|
|
21
|
+
return (a.getFullYear() === b.getFullYear() &&
|
|
22
|
+
a.getMonth() === b.getMonth() &&
|
|
23
|
+
a.getDate() === b.getDate());
|
|
24
|
+
}
|
|
25
|
+
export function isBefore(a, b) {
|
|
26
|
+
return toISOLocal(a) < toISOLocal(b);
|
|
27
|
+
}
|
|
28
|
+
export function isAfter(a, b) {
|
|
29
|
+
return toISOLocal(a) > toISOLocal(b);
|
|
30
|
+
}
|
|
31
|
+
export function isBetween(d, start, end) {
|
|
32
|
+
const iso = toISOLocal(d);
|
|
33
|
+
return iso >= toISOLocal(start) && iso <= toISOLocal(end);
|
|
34
|
+
}
|
|
35
|
+
function getDaysInMonth(year, month) {
|
|
36
|
+
return new Date(year, month + 1, 0).getDate();
|
|
37
|
+
}
|
|
38
|
+
/** Monday-based: 0 = Mon … 6 = Sun */
|
|
39
|
+
function getMondayBasedDay(date) {
|
|
40
|
+
return (date.getDay() + 6) % 7;
|
|
41
|
+
}
|
|
42
|
+
export function buildWeeks(year, month) {
|
|
43
|
+
const daysInMonth = getDaysInMonth(year, month);
|
|
44
|
+
const firstDay = new Date(year, month, 1);
|
|
45
|
+
const startOffset = getMondayBasedDay(firstDay);
|
|
46
|
+
const weeks = [];
|
|
47
|
+
let currentWeek = [];
|
|
48
|
+
for (let i = 0; i < startOffset; i++) {
|
|
49
|
+
currentWeek.push(null);
|
|
50
|
+
}
|
|
51
|
+
for (let day = 1; day <= daysInMonth; day++) {
|
|
52
|
+
const date = new Date(year, month, day);
|
|
53
|
+
currentWeek.push({ day, date });
|
|
54
|
+
if (currentWeek.length === 7) {
|
|
55
|
+
weeks.push(currentWeek);
|
|
56
|
+
currentWeek = [];
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
if (currentWeek.length > 0) {
|
|
60
|
+
while (currentWeek.length < 7) {
|
|
61
|
+
currentWeek.push(null);
|
|
62
|
+
}
|
|
63
|
+
weeks.push(currentWeek);
|
|
64
|
+
}
|
|
65
|
+
return weeks;
|
|
66
|
+
}
|
|
67
|
+
/* ── Display formatting ──────────────────────────────────────────── */
|
|
68
|
+
export function formatDisplayValue(value, mode) {
|
|
69
|
+
if (value == null)
|
|
70
|
+
return '';
|
|
71
|
+
if (mode === 'single') {
|
|
72
|
+
if (typeof value !== 'string' || !value)
|
|
73
|
+
return '';
|
|
74
|
+
const d = parseLocalDate(value);
|
|
75
|
+
if (!d)
|
|
76
|
+
return '';
|
|
77
|
+
const day = String(d.getDate()).padStart(2, '0');
|
|
78
|
+
const mon = String(d.getMonth() + 1).padStart(2, '0');
|
|
79
|
+
const year = d.getFullYear();
|
|
80
|
+
return `${day}.${mon}.${year}`;
|
|
81
|
+
}
|
|
82
|
+
const range = value;
|
|
83
|
+
const startDate = range.startDate ? parseLocalDate(range.startDate) : null;
|
|
84
|
+
const endDate = range.endDate ? parseLocalDate(range.endDate) : null;
|
|
85
|
+
if (!startDate && !endDate)
|
|
86
|
+
return '';
|
|
87
|
+
const fmt = (d) => {
|
|
88
|
+
const day = String(d.getDate()).padStart(2, '0');
|
|
89
|
+
const mon = String(d.getMonth() + 1).padStart(2, '0');
|
|
90
|
+
return `${day}.${mon}`;
|
|
91
|
+
};
|
|
92
|
+
if (startDate && endDate)
|
|
93
|
+
return `${fmt(startDate)}-${fmt(endDate)}`;
|
|
94
|
+
if (startDate)
|
|
95
|
+
return fmt(startDate);
|
|
96
|
+
return '';
|
|
97
|
+
}
|
|
98
|
+
/* ── Value sanitization against min/max ──────────────────────────── */
|
|
99
|
+
export function sanitizeValue(value, mode, minDate, maxDate) {
|
|
100
|
+
if (value == null)
|
|
101
|
+
return undefined;
|
|
102
|
+
if (mode === 'single') {
|
|
103
|
+
if (typeof value !== 'string' || !value)
|
|
104
|
+
return undefined;
|
|
105
|
+
const d = parseLocalDate(value);
|
|
106
|
+
if (!d)
|
|
107
|
+
return undefined;
|
|
108
|
+
if (minDate && isBefore(d, minDate))
|
|
109
|
+
return undefined;
|
|
110
|
+
if (maxDate && isAfter(d, maxDate))
|
|
111
|
+
return undefined;
|
|
112
|
+
return value;
|
|
113
|
+
}
|
|
114
|
+
const range = value;
|
|
115
|
+
let start = range.startDate ? parseLocalDate(range.startDate) : null;
|
|
116
|
+
let end = range.endDate ? parseLocalDate(range.endDate) : null;
|
|
117
|
+
if (start && minDate && isBefore(start, minDate))
|
|
118
|
+
start = null;
|
|
119
|
+
if (start && maxDate && isAfter(start, maxDate))
|
|
120
|
+
start = null;
|
|
121
|
+
if (end && minDate && isBefore(end, minDate))
|
|
122
|
+
end = null;
|
|
123
|
+
if (end && maxDate && isAfter(end, maxDate))
|
|
124
|
+
end = null;
|
|
125
|
+
if (!start)
|
|
126
|
+
end = null;
|
|
127
|
+
if (!start && !end)
|
|
128
|
+
return undefined;
|
|
129
|
+
return {
|
|
130
|
+
startDate: start ? toISOLocal(start) : undefined,
|
|
131
|
+
endDate: end ? toISOLocal(end) : undefined,
|
|
132
|
+
};
|
|
133
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ScrollView } from 'react-native';
|
|
3
|
+
import type { DimmedScrollViewProps } from './types';
|
|
4
|
+
export declare const DimmedScrollView: import("react").ForwardRefExoticComponent<DimmedScrollViewProps & import("react").RefAttributes<ScrollView>>;
|
|
5
|
+
//# sourceMappingURL=DimmedScrollView.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DimmedScrollView.d.ts","sourceRoot":"","sources":["../../src/DimmedScrollView/DimmedScrollView.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAS1C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMrD,eAAO,MAAM,gBAAgB,8GAyG5B,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef, useMemo } from 'react';
|
|
3
|
+
import { ScrollView } from 'react-native';
|
|
4
|
+
import Svg, { Defs, LinearGradient, Rect, Stop } from 'react-native-svg';
|
|
5
|
+
import { BottomDimOverlay, LeftDimOverlay, RightDimOverlay, Root, TopDimOverlay, } from './styles';
|
|
6
|
+
const DEFAULT_DIM_COLOR = '#000000';
|
|
7
|
+
const DEFAULT_DIM_HEIGHT = 28;
|
|
8
|
+
const DEFAULT_DIM_OPACITY = 0.12;
|
|
9
|
+
export const DimmedScrollView = forwardRef(function DimmedScrollView({ containerStyle, showTopDim = true, showBottomDim = true, topDimHeight = DEFAULT_DIM_HEIGHT, bottomDimHeight = DEFAULT_DIM_HEIGHT, dimColor = DEFAULT_DIM_COLOR, topDimOpacity = DEFAULT_DIM_OPACITY, bottomDimOpacity = DEFAULT_DIM_OPACITY, children, ...scrollViewProps }, ref) {
|
|
10
|
+
const isHorizontal = scrollViewProps.horizontal === true;
|
|
11
|
+
const gradientKey = useMemo(() => Math.random().toString(36).slice(2, 10), []);
|
|
12
|
+
const topGradientId = `dimmed-scroll-top-${gradientKey}`;
|
|
13
|
+
const bottomGradientId = `dimmed-scroll-bottom-${gradientKey}`;
|
|
14
|
+
const gradientDirection = isHorizontal
|
|
15
|
+
? { x1: '0', y1: '0', x2: '1', y2: '0' }
|
|
16
|
+
: { x1: '0', y1: '0', x2: '0', y2: '1' };
|
|
17
|
+
return (_jsxs(Root, { style: containerStyle, children: [_jsx(ScrollView, { ref: ref, ...scrollViewProps, children: children }), showTopDim && topDimHeight > 0 && (isHorizontal ? (_jsx(LeftDimOverlay, { "$width": topDimHeight, children: _jsxs(Svg, { width: "100%", height: "100%", children: [_jsx(Defs, { children: _jsxs(LinearGradient, { id: topGradientId, ...gradientDirection, children: [_jsx(Stop, { offset: "0%", stopColor: dimColor, stopOpacity: topDimOpacity }), _jsx(Stop, { offset: "100%", stopColor: dimColor, stopOpacity: 0 })] }) }), _jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${topGradientId})` })] }) })) : (_jsx(TopDimOverlay, { "$height": topDimHeight, children: _jsxs(Svg, { width: "100%", height: "100%", children: [_jsx(Defs, { children: _jsxs(LinearGradient, { id: topGradientId, ...gradientDirection, children: [_jsx(Stop, { offset: "0%", stopColor: dimColor, stopOpacity: topDimOpacity }), _jsx(Stop, { offset: "100%", stopColor: dimColor, stopOpacity: 0 })] }) }), _jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${topGradientId})` })] }) }))), showBottomDim && bottomDimHeight > 0 && (isHorizontal ? (_jsx(RightDimOverlay, { "$width": bottomDimHeight, children: _jsxs(Svg, { width: "100%", height: "100%", children: [_jsx(Defs, { children: _jsxs(LinearGradient, { id: bottomGradientId, ...gradientDirection, children: [_jsx(Stop, { offset: "0%", stopColor: dimColor, stopOpacity: 0 }), _jsx(Stop, { offset: "100%", stopColor: dimColor, stopOpacity: bottomDimOpacity })] }) }), _jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${bottomGradientId})` })] }) })) : (_jsx(BottomDimOverlay, { "$height": bottomDimHeight, children: _jsxs(Svg, { width: "100%", height: "100%", children: [_jsx(Defs, { children: _jsxs(LinearGradient, { id: bottomGradientId, ...gradientDirection, children: [_jsx(Stop, { offset: "0%", stopColor: dimColor, stopOpacity: 0 }), _jsx(Stop, { offset: "100%", stopColor: dimColor, stopOpacity: bottomDimOpacity })] }) }), _jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${bottomGradientId})` })] }) })))] }));
|
|
18
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DimmedScrollView/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DimmedScrollView } from './DimmedScrollView';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Root: import("styled-components/native/dist/types").IStyledComponentBase<"native", import("styled-components/native/dist/types").FastOmit<import("react-native").ViewProps, never>>;
|
|
3
|
+
export declare const TopDimOverlay: import("styled-components/native/dist/types").IStyledComponentBase<"native", import("styled-components/native/dist/types").Substitute<import("styled-components/native/dist/types").FastOmit<import("styled-components/native/dist/types").Substitute<import("react-native").ViewProps, import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>>, never>, {
|
|
4
|
+
$height: number;
|
|
5
|
+
}>>;
|
|
6
|
+
export declare const BottomDimOverlay: import("styled-components/native/dist/types").IStyledComponentBase<"native", import("styled-components/native/dist/types").Substitute<import("styled-components/native/dist/types").FastOmit<import("styled-components/native/dist/types").Substitute<import("react-native").ViewProps, import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>>, never>, {
|
|
7
|
+
$height: number;
|
|
8
|
+
}>>;
|
|
9
|
+
export declare const LeftDimOverlay: import("styled-components/native/dist/types").IStyledComponentBase<"native", import("styled-components/native/dist/types").Substitute<import("styled-components/native/dist/types").FastOmit<import("styled-components/native/dist/types").Substitute<import("react-native").ViewProps, import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>>, never>, {
|
|
10
|
+
$width: number;
|
|
11
|
+
}>>;
|
|
12
|
+
export declare const RightDimOverlay: import("styled-components/native/dist/types").IStyledComponentBase<"native", import("styled-components/native/dist/types").Substitute<import("styled-components/native/dist/types").FastOmit<import("styled-components/native/dist/types").Substitute<import("react-native").ViewProps, import("react-native").ViewProps & import("react").RefAttributes<import("react-native").View>>, never>, {
|
|
13
|
+
$width: number;
|
|
14
|
+
}>>;
|
|
15
|
+
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/DimmedScrollView/styles.ts"],"names":[],"mappings":";AAEA,eAAO,MAAM,IAAI,+KAEhB,CAAC;AAEF,eAAO,MAAM,aAAa;aACf,MAAM;GAOhB,CAAC;AAEF,eAAO,MAAM,gBAAgB;aAClB,MAAM;GAOhB,CAAC;AAEF,eAAO,MAAM,cAAc;YACjB,MAAM;GAOf,CAAC;AAEF,eAAO,MAAM,eAAe;YAClB,MAAM;GAOf,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import styled from 'styled-components/native';
|
|
2
|
+
export const Root = styled.View `
|
|
3
|
+
position: relative;
|
|
4
|
+
`;
|
|
5
|
+
export const TopDimOverlay = styled.View.attrs({ pointerEvents: 'none' }) `
|
|
6
|
+
position: absolute;
|
|
7
|
+
top: 0;
|
|
8
|
+
left: 0;
|
|
9
|
+
right: 0;
|
|
10
|
+
height: ${({ $height }) => `${$height}px`};
|
|
11
|
+
`;
|
|
12
|
+
export const BottomDimOverlay = styled.View.attrs({ pointerEvents: 'none' }) `
|
|
13
|
+
position: absolute;
|
|
14
|
+
left: 0;
|
|
15
|
+
right: 0;
|
|
16
|
+
bottom: 0;
|
|
17
|
+
height: ${({ $height }) => `${$height}px`};
|
|
18
|
+
`;
|
|
19
|
+
export const LeftDimOverlay = styled.View.attrs({ pointerEvents: 'none' }) `
|
|
20
|
+
position: absolute;
|
|
21
|
+
top: 0;
|
|
22
|
+
left: 0;
|
|
23
|
+
bottom: 0;
|
|
24
|
+
width: ${({ $width }) => `${$width}px`};
|
|
25
|
+
`;
|
|
26
|
+
export const RightDimOverlay = styled.View.attrs({ pointerEvents: 'none' }) `
|
|
27
|
+
position: absolute;
|
|
28
|
+
top: 0;
|
|
29
|
+
right: 0;
|
|
30
|
+
bottom: 0;
|
|
31
|
+
width: ${({ $width }) => `${$width}px`};
|
|
32
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { ScrollViewProps, StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export interface DimmedScrollViewProps extends ScrollViewProps {
|
|
3
|
+
/** Style for the outer wrapper that holds the ScrollView and dim overlays */
|
|
4
|
+
containerStyle?: StyleProp<ViewStyle>;
|
|
5
|
+
/** Show the top dim overlay (or left dim when horizontal) */
|
|
6
|
+
showTopDim?: boolean;
|
|
7
|
+
/** Show the bottom dim overlay (or right dim when horizontal) */
|
|
8
|
+
showBottomDim?: boolean;
|
|
9
|
+
/** Height of the top dim in vertical mode, or width of the left dim in horizontal mode */
|
|
10
|
+
topDimHeight?: number;
|
|
11
|
+
/** Height of the bottom dim in vertical mode, or width of the right dim in horizontal mode */
|
|
12
|
+
bottomDimHeight?: number;
|
|
13
|
+
/** Shared dim color for both overlays */
|
|
14
|
+
dimColor?: string;
|
|
15
|
+
/** Opacity at the top/left edge of the first gradient */
|
|
16
|
+
topDimOpacity?: number;
|
|
17
|
+
/** Opacity at the bottom/right edge of the second gradient */
|
|
18
|
+
bottomDimOpacity?: number;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/DimmedScrollView/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE1E,MAAM,WAAW,qBAAsB,SAAQ,eAAe;IAC5D,6EAA6E;IAC7E,cAAc,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;IACtC,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iEAAiE;IACjE,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,0FAA0F;IAC1F,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,8FAA8F;IAC9F,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,yCAAyC;IACzC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,yDAAyD;IACzD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FadingEdge.d.ts","sourceRoot":"","sources":["../../src/FadingEdge/FadingEdge.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAM/C,wBAAgB,UAAU,CAAC,EACzB,QAAQ,EACR,MAAuB,EACvB,KAAqB,EACrB,OAAyB,EACzB,KAAK,GACN,EAAE,eAAe,2CAqCjB"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { StyleSheet, View } from 'react-native';
|
|
4
|
+
import Svg, { Defs, LinearGradient, Rect, Stop } from 'react-native-svg';
|
|
5
|
+
const DEFAULT_HEIGHT = 28;
|
|
6
|
+
const DEFAULT_COLOR = '#000000';
|
|
7
|
+
const DEFAULT_OPACITY = 0.12;
|
|
8
|
+
export function FadingEdge({ position, height = DEFAULT_HEIGHT, color = DEFAULT_COLOR, opacity = DEFAULT_OPACITY, style, }) {
|
|
9
|
+
const gradientId = useMemo(() => `fading-edge-${position}-${Math.random().toString(36).slice(2, 10)}`, [position]);
|
|
10
|
+
const isTop = position === 'top';
|
|
11
|
+
return (_jsx(View, { pointerEvents: "none", style: [
|
|
12
|
+
styles.base,
|
|
13
|
+
isTop ? styles.top : styles.bottom,
|
|
14
|
+
{ height },
|
|
15
|
+
style,
|
|
16
|
+
], children: _jsxs(Svg, { width: "100%", height: "100%", children: [_jsx(Defs, { children: _jsxs(LinearGradient, { id: gradientId, x1: "0", y1: "0", x2: "0", y2: "1", children: [_jsx(Stop, { offset: "0%", stopColor: color, stopOpacity: isTop ? opacity : 0 }), _jsx(Stop, { offset: "100%", stopColor: color, stopOpacity: isTop ? 0 : opacity })] }) }), _jsx(Rect, { x: "0", y: "0", width: "100%", height: "100%", fill: `url(#${gradientId})` })] }) }));
|
|
17
|
+
}
|
|
18
|
+
const styles = StyleSheet.create({
|
|
19
|
+
base: {
|
|
20
|
+
position: 'absolute',
|
|
21
|
+
left: 0,
|
|
22
|
+
right: 0,
|
|
23
|
+
},
|
|
24
|
+
top: {
|
|
25
|
+
top: 0,
|
|
26
|
+
},
|
|
27
|
+
bottom: {
|
|
28
|
+
bottom: 0,
|
|
29
|
+
},
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/FadingEdge/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FadingEdge } from './FadingEdge';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { StyleProp, ViewStyle } from 'react-native';
|
|
2
|
+
export interface FadingEdgeProps {
|
|
3
|
+
/** Which edge of the container this gradient fades from */
|
|
4
|
+
position: 'top' | 'bottom';
|
|
5
|
+
/** Height of the gradient overlay in px (default: 28) */
|
|
6
|
+
height?: number;
|
|
7
|
+
/** Gradient color (default: '#000000') */
|
|
8
|
+
color?: string;
|
|
9
|
+
/** Max opacity at the opaque end of the gradient (default: 0.12) */
|
|
10
|
+
opacity?: number;
|
|
11
|
+
/** Additional styles — use for positioning (top/bottom offsets, zIndex) */
|
|
12
|
+
style?: StyleProp<ViewStyle>;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/FadingEdge/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzD,MAAM,WAAW,eAAe;IAC9B,2DAA2D;IAC3D,QAAQ,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC3B,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0CAA0C;IAC1C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAC;CAC9B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { IconProps } from './types';
|
|
3
|
+
export { iconNames } from './types';
|
|
4
|
+
export type { IconName, IconProps } from './types';
|
|
5
|
+
export declare function Icon({ name, color, size, width, height, strokeWidth, ...svgProps }: IconProps): JSX.Element;
|
|
6
|
+
//# sourceMappingURL=Icon.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Icon.d.ts","sourceRoot":"","sources":["../../src/Icon/Icon.tsx"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEnD,wBAAgB,IAAI,CAAC,EACnB,IAAI,EACJ,KAAK,EACL,IAAI,EACJ,KAAK,EACL,MAAM,EACN,WAAW,EACX,GAAG,QAAQ,EACZ,EAAE,SAAS,eAaX"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ICON_DEFAULT_COLORS, ICON_DEFAULT_SIZES } from './defaults';
|
|
2
|
+
import { ICON_REGISTRY } from './registry';
|
|
3
|
+
export { iconNames } from './types';
|
|
4
|
+
export function Icon({ name, color, size, width, height, strokeWidth, ...svgProps }) {
|
|
5
|
+
const defaultSize = ICON_DEFAULT_SIZES[name];
|
|
6
|
+
const resolvedWidth = size ?? width ?? defaultSize.width;
|
|
7
|
+
const resolvedHeight = size ?? height ?? defaultSize.height;
|
|
8
|
+
const resolvedColor = color ?? ICON_DEFAULT_COLORS[name];
|
|
9
|
+
return ICON_REGISTRY[name]({
|
|
10
|
+
width: resolvedWidth,
|
|
11
|
+
height: resolvedHeight,
|
|
12
|
+
color: resolvedColor,
|
|
13
|
+
strokeWidth,
|
|
14
|
+
...svgProps,
|
|
15
|
+
});
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../../src/Icon/defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,QAAQ,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAuClF,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,CAuCxD,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export const ICON_DEFAULT_SIZES = {
|
|
2
|
+
'tab-group': { width: 24, height: 24 },
|
|
3
|
+
'tab-activity': { width: 24, height: 24 },
|
|
4
|
+
'tab-account': { width: 24, height: 24 },
|
|
5
|
+
'tab-friends': { width: 24, height: 24 },
|
|
6
|
+
'account-outline': { width: 24, height: 24 },
|
|
7
|
+
'attachment-line': { width: 24, height: 24 },
|
|
8
|
+
bill: { width: 24, height: 24 },
|
|
9
|
+
check: { width: 24, height: 24 },
|
|
10
|
+
close: { width: 24, height: 24 },
|
|
11
|
+
edit: { width: 24, height: 24 },
|
|
12
|
+
'edit-photo': { width: 24, height: 24 },
|
|
13
|
+
expand: { width: 24, height: 24 },
|
|
14
|
+
'green-dot': { width: 12, height: 12 },
|
|
15
|
+
'chevron-left': { width: 24, height: 24 },
|
|
16
|
+
'chevron-up': { width: 24, height: 24 },
|
|
17
|
+
'chevron-right': { width: 24, height: 24 },
|
|
18
|
+
'chevron-down': { width: 24, height: 24 },
|
|
19
|
+
'chevron-solid-down': { width: 24, height: 24 },
|
|
20
|
+
link: { width: 24, height: 24 },
|
|
21
|
+
location: { width: 24, height: 24 },
|
|
22
|
+
'location-pin': { width: 24, height: 24 },
|
|
23
|
+
more: { width: 24, height: 24 },
|
|
24
|
+
open: { width: 24, height: 24 },
|
|
25
|
+
percent: { width: 24, height: 24 },
|
|
26
|
+
photo: { width: 24, height: 24 },
|
|
27
|
+
plus: { width: 24, height: 24 },
|
|
28
|
+
qr: { width: 16, height: 16 },
|
|
29
|
+
'qr-code': { width: 24, height: 24 },
|
|
30
|
+
remove: { width: 24, height: 24 },
|
|
31
|
+
search: { width: 17, height: 17 },
|
|
32
|
+
'send-fill': { width: 24, height: 24 },
|
|
33
|
+
settings: { width: 24, height: 24 },
|
|
34
|
+
'stop-filled': { width: 21, height: 21 },
|
|
35
|
+
calendar: { width: 24, height: 24 },
|
|
36
|
+
gear: { width: 16, height: 16 },
|
|
37
|
+
restore: { width: 16, height: 16 },
|
|
38
|
+
enter: { width: 24, height: 24 },
|
|
39
|
+
lock: { width: 24, height: 24 },
|
|
40
|
+
};
|
|
41
|
+
export const ICON_DEFAULT_COLORS = {
|
|
42
|
+
'tab-group': '#2C2C2C',
|
|
43
|
+
'tab-activity': '#2C2C2C',
|
|
44
|
+
'tab-account': '#2C2C2C',
|
|
45
|
+
'tab-friends': '#2C2C2C',
|
|
46
|
+
'account-outline': '#2C2C2C',
|
|
47
|
+
'attachment-line': '#2C2C2C',
|
|
48
|
+
bill: '#2C2C2C',
|
|
49
|
+
check: '#2C2C2C',
|
|
50
|
+
close: '#2C2C2C',
|
|
51
|
+
edit: '#2C2C2C',
|
|
52
|
+
'edit-photo': '#FFFFFF',
|
|
53
|
+
expand: '#2C2C2C',
|
|
54
|
+
'green-dot': '#B2F549',
|
|
55
|
+
'chevron-left': '#2C2C2C',
|
|
56
|
+
'chevron-up': '#2C2C2C',
|
|
57
|
+
'chevron-right': '#2C2C2C',
|
|
58
|
+
'chevron-down': '#2C2C2C',
|
|
59
|
+
'chevron-solid-down': '#2C2C2C',
|
|
60
|
+
link: '#2C2C2C',
|
|
61
|
+
location: '#2C2C2C',
|
|
62
|
+
'location-pin': '#2C2C2C',
|
|
63
|
+
more: '#2C2C2C',
|
|
64
|
+
open: '#2C2C2C',
|
|
65
|
+
percent: '#2C2C2C',
|
|
66
|
+
photo: '#2C2C2C',
|
|
67
|
+
plus: '#2C2C2C',
|
|
68
|
+
qr: '#2C2C2C',
|
|
69
|
+
'qr-code': '#2C2C2C',
|
|
70
|
+
remove: '#2C2C2C',
|
|
71
|
+
search: '#738295',
|
|
72
|
+
'send-fill': '#2C2C2C',
|
|
73
|
+
settings: '#2C2C2C',
|
|
74
|
+
'stop-filled': '#2C2C2C',
|
|
75
|
+
calendar: '#2C2C2C',
|
|
76
|
+
gear: '#2C2C2C',
|
|
77
|
+
restore: '#738295',
|
|
78
|
+
enter: '#738295',
|
|
79
|
+
lock: '#738295',
|
|
80
|
+
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IconRenderer } from '../types';
|
|
2
|
+
export declare const chevronLeftIcon: IconRenderer;
|
|
3
|
+
export declare const chevronLeftCompactIcon: IconRenderer;
|
|
4
|
+
export declare const chevronRightIcon: IconRenderer;
|
|
5
|
+
export declare const chevronUpIcon: IconRenderer;
|
|
6
|
+
export declare const chevronDownIcon: IconRenderer;
|
|
7
|
+
export declare const chevronSolidDownIcon: IconRenderer;
|
|
8
|
+
export declare const openIcon: IconRenderer;
|
|
9
|
+
export declare const closeIcon: IconRenderer;
|
|
10
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../src/Icon/icons/navigation.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,eAAe,EAAE,YAgB7B,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,YAgBpC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,YAgB9B,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAgB3B,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YAgB7B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,YAgBlC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAgBtB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAgBvB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import Svg, { Path } from 'react-native-svg';
|
|
3
|
+
export const chevronLeftIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M15 6L9 12L15 18", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
4
|
+
export const chevronLeftCompactIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 9 15", fill: "none", ...svgProps, children: _jsx(Path, { d: "M7.5 0.75L0.75 7.5L7.5 14.25", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
5
|
+
export const chevronRightIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M9 6L15 12L9 18", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
6
|
+
export const chevronUpIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M6 15L12 9L18 15", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
7
|
+
export const chevronDownIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M6 9L12 15L18 9", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
8
|
+
export const chevronSolidDownIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M18 9.5L12 15.5L6 9.5H18Z", fill: color, stroke: color, strokeWidth: strokeWidth ?? 2, strokeLinejoin: "round" }) }));
|
|
9
|
+
export const openIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M5 19L18 6M18 6V18.48M18 6H5.52", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
10
|
+
export const closeIcon = ({ width, height, color, strokeWidth, ...svgProps }) => (_jsx(Svg, { width: width, height: height, viewBox: "0 0 24 24", fill: "none", ...svgProps, children: _jsx(Path, { d: "M7 17.486L12.243 12.243L17.486 17.486M17.486 7L12.242 12.243L7 7", stroke: color, strokeWidth: strokeWidth ?? 1.5, strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { IconRenderer } from '../types';
|
|
2
|
+
export declare const searchIcon: IconRenderer;
|
|
3
|
+
export declare const calendarIcon: IconRenderer;
|
|
4
|
+
export declare const plusIcon: IconRenderer;
|
|
5
|
+
export declare const percentIcon: IconRenderer;
|
|
6
|
+
export declare const accountOutlineIcon: IconRenderer;
|
|
7
|
+
export declare const linkIcon: IconRenderer;
|
|
8
|
+
export declare const editIcon: IconRenderer;
|
|
9
|
+
export declare const moreIcon: IconRenderer;
|
|
10
|
+
export declare const billIcon: IconRenderer;
|
|
11
|
+
export declare const locationIcon: IconRenderer;
|
|
12
|
+
export declare const attachmentLineIcon: IconRenderer;
|
|
13
|
+
export declare const sendFillIcon: IconRenderer;
|
|
14
|
+
export declare const stopFilledIcon: IconRenderer;
|
|
15
|
+
export declare const expandIcon: IconRenderer;
|
|
16
|
+
export declare const locationPinIcon: IconRenderer;
|
|
17
|
+
export declare const checkIcon: IconRenderer;
|
|
18
|
+
export declare const greenDotIcon: IconRenderer;
|
|
19
|
+
export declare const settingsIcon: IconRenderer;
|
|
20
|
+
export declare const gearIcon: IconRenderer;
|
|
21
|
+
export declare const qrIcon: IconRenderer;
|
|
22
|
+
export declare const qrCodeIcon: IconRenderer;
|
|
23
|
+
export declare const photoIcon: IconRenderer;
|
|
24
|
+
export declare const removeIcon: IconRenderer;
|
|
25
|
+
export declare const editPhotoIcon: IconRenderer;
|
|
26
|
+
export declare const enterIcon: IconRenderer;
|
|
27
|
+
export declare const restoreIcon: IconRenderer;
|
|
28
|
+
export declare const lockIcon: IconRenderer;
|
|
29
|
+
//# sourceMappingURL=system.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../../../src/Icon/icons/system.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAE7C,eAAO,MAAM,UAAU,EAAE,YAgBxB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAa1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAUtB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YAgBzB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YA6BhC,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAuBtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAgBtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAOtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAoBtB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YA0B1B,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,YAgBhC,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAS1B,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAe5B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAOxB,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,YAW7B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAgBvB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAI1B,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,YAuB1B,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAuBtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,YAUpB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAgBxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAuBvB,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,YAgBxB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,YAwB3B,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,YAsBvB,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,YASzB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,YAOtB,CAAC"}
|