@draftbit/core 46.1.4-e6469c.0 → 46.2.1-327d47.2
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/lib/commonjs/components/ActionSheet/index.js.map +1 -1
- package/lib/commonjs/components/CardBlock.js +15 -5
- package/lib/commonjs/components/CardBlock.js.map +1 -1
- package/lib/commonjs/components/Carousel.js +3 -1
- package/lib/commonjs/components/Carousel.js.map +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +2 -4
- package/lib/commonjs/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +23 -6
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/context.js +1 -1
- package/lib/commonjs/components/Checkbox/context.js.map +1 -1
- package/lib/commonjs/components/CircleImage.js +17 -3
- package/lib/commonjs/components/CircleImage.js.map +1 -1
- package/lib/commonjs/components/Config.js +3 -3
- package/lib/commonjs/components/Config.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +10 -11
- package/lib/commonjs/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponentType.js.map +1 -1
- package/lib/commonjs/components/DeprecatedButton.js +4 -20
- package/lib/commonjs/components/DeprecatedButton.js.map +1 -1
- package/lib/commonjs/components/DeprecatedCardWrapper.js +2 -14
- package/lib/commonjs/components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/commonjs/components/DeprecatedFAB.js +21 -4
- package/lib/commonjs/components/DeprecatedFAB.js.map +1 -1
- package/lib/commonjs/components/HeaderLarge.js.map +1 -1
- package/lib/commonjs/components/Picker/Picker.js +4 -5
- package/lib/commonjs/components/Picker/Picker.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.android.js +135 -0
- package/lib/commonjs/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js +161 -0
- package/lib/commonjs/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js +136 -0
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/commonjs/components/Picker/PickerTypes.js +6 -0
- package/lib/commonjs/components/Picker/PickerTypes.js.map +1 -0
- package/lib/commonjs/components/RadioButton/RadioButton.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js +17 -5
- package/lib/commonjs/components/RadioButton/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/components/StepIndicator.js +1 -1
- package/lib/commonjs/components/StepIndicator.js.map +1 -1
- package/lib/commonjs/components/Stepper.js +1 -1
- package/lib/commonjs/components/Stepper.js.map +1 -1
- package/lib/commonjs/components/Swiper/SwiperItem.js.map +1 -1
- package/lib/commonjs/components/Text.js +38 -11
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/mappings/CardContainerRating.js.map +1 -1
- package/lib/commonjs/mappings/Checkbox.js.map +1 -1
- package/lib/commonjs/mappings/NumberInput.js +241 -0
- package/lib/commonjs/mappings/NumberInput.js.map +1 -0
- package/lib/commonjs/mappings/RadioButtonGroup.js.map +1 -1
- package/lib/commonjs/mappings/RadioButtonRow.js.map +1 -1
- package/lib/commonjs/mappings/Text.js +33 -26
- package/lib/commonjs/mappings/Text.js.map +1 -1
- package/lib/commonjs/mappings/TextArea.js +192 -2
- package/lib/commonjs/mappings/TextArea.js.map +1 -1
- package/lib/commonjs/mappings/TextField.js +191 -2
- package/lib/commonjs/mappings/TextField.js.map +1 -1
- package/lib/commonjs/mappings/TextInput.js +180 -29
- package/lib/commonjs/mappings/TextInput.js.map +1 -1
- package/lib/commonjs/mappings/Video.js.map +1 -1
- package/lib/commonjs/styles/DarkTheme.js.map +1 -1
- package/lib/commonjs/utilities.js +1 -1
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/Carousel.js +3 -1
- package/lib/module/components/Carousel.js.map +1 -1
- package/lib/module/components/Config.js +3 -3
- package/lib/module/components/Config.js.map +1 -1
- package/lib/module/components/DatePicker/DatePicker.js +3 -3
- package/lib/module/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/module/components/DatePicker/DatePickerComponent.js.map +1 -1
- package/lib/module/components/Picker/Picker.js +4 -5
- package/lib/module/components/Picker/Picker.js.map +1 -1
- package/lib/module/components/Picker/PickerComponent.android.js +112 -0
- package/lib/module/components/Picker/PickerComponent.android.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.ios.js +135 -0
- package/lib/module/components/Picker/PickerComponent.ios.js.map +1 -0
- package/lib/module/components/Picker/PickerComponent.web.js +113 -0
- package/lib/module/components/Picker/PickerComponent.web.js.map +1 -0
- package/lib/module/components/Picker/PickerTypes.js +2 -0
- package/lib/module/components/Picker/PickerTypes.js.map +1 -0
- package/lib/module/components/RadioButton/RadioButton.js +1 -1
- package/lib/module/components/RadioButton/RadioButton.js.map +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/module/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/module/components/StepIndicator.js +1 -1
- package/lib/module/components/StepIndicator.js.map +1 -1
- package/lib/module/components/Stepper.js +1 -1
- package/lib/module/components/Stepper.js.map +1 -1
- package/lib/module/components/Touchable.js +2 -16
- package/lib/module/components/Touchable.js.map +1 -1
- package/lib/module/mappings/NumberInput.js +231 -0
- package/lib/module/mappings/NumberInput.js.map +1 -0
- package/lib/module/mappings/Surface.js.map +1 -1
- package/lib/module/mappings/Text.js +33 -26
- package/lib/module/mappings/Text.js.map +1 -1
- package/lib/module/mappings/TextArea.js +193 -3
- package/lib/module/mappings/TextArea.js.map +1 -1
- package/lib/module/mappings/TextField.js +192 -3
- package/lib/module/mappings/TextField.js.map +1 -1
- package/lib/module/mappings/TextInput.js +180 -29
- package/lib/module/mappings/TextInput.js.map +1 -1
- package/lib/module/utilities.js +1 -1
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerComponent.android.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerComponent.ios.d.ts +7 -0
- package/lib/typescript/src/components/Picker/PickerComponent.web.d.ts +6 -0
- package/lib/typescript/src/components/Picker/PickerTypes.d.ts +18 -0
- package/lib/typescript/src/mappings/NumberInput.d.ts +297 -0
- package/lib/typescript/src/mappings/Text.d.ts +24 -10
- package/lib/typescript/src/mappings/TextArea.d.ts +12 -11
- package/lib/typescript/src/mappings/TextField.d.ts +4 -4
- package/lib/typescript/src/mappings/TextInput.d.ts +3 -254
- package/package.json +3 -3
- package/src/components/ActionSheet/ActionSheet.js +1 -1
- package/src/components/Carousel.js +4 -2
- package/src/components/Checkbox/Checkbox.js +3 -3
- package/src/components/Checkbox/CheckboxGroupRow.js +2 -2
- package/src/components/Checkbox/CheckboxRow.js +3 -3
- package/src/components/CircularProgress.js +29 -26
- package/src/components/DatePicker/DatePicker.js +1 -1
- package/src/components/NumberInput.js +1 -1
- package/src/components/Picker/Picker.js +8 -8
- package/src/components/Picker/Picker.tsx +8 -6
- package/src/components/Picker/PickerComponent.android.js +69 -0
- package/src/components/Picker/PickerComponent.android.tsx +116 -0
- package/src/components/Picker/PickerComponent.ios.js +79 -0
- package/src/components/Picker/PickerComponent.ios.tsx +142 -0
- package/src/components/Picker/PickerComponent.web.js +70 -0
- package/src/components/Picker/PickerComponent.web.tsx +117 -0
- package/src/components/Picker/PickerTypes.js +1 -0
- package/src/components/Picker/PickerTypes.ts +18 -0
- package/src/components/Portal/Portal.js +2 -2
- package/src/components/Portal/PortalConsumer.js +0 -1
- package/src/components/Portal/PortalHost.js +43 -41
- package/src/components/Portal/PortalManager.js +21 -18
- package/src/components/ProgressBar.js +9 -9
- package/src/components/RadioButton/RadioButton.js +3 -3
- package/src/components/RadioButton/RadioButtonGroup.js +1 -1
- package/src/components/RadioButton/RadioButtonRow.js +3 -3
- package/src/components/StepIndicator.js +225 -225
- package/src/components/Stepper.js +2 -2
- package/src/components/Text.js +0 -1
- package/src/components/TextField.js +62 -59
- package/src/constants.js +1 -1
- package/src/mappings/NumberInput.js +248 -0
- package/src/mappings/NumberInput.ts +267 -0
- package/src/mappings/Text.js +33 -26
- package/src/mappings/Text.ts +34 -27
- package/src/mappings/TextArea.js +221 -3
- package/src/mappings/TextArea.ts +227 -3
- package/src/mappings/TextField.js +220 -3
- package/src/mappings/TextField.ts +227 -3
- package/src/mappings/TextInput.js +208 -31
- package/src/mappings/TextInput.ts +214 -34
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["AnimatedText","Animated","createAnimatedComponent","Text","FOCUS_ANIMATION_DURATION","BLUR_ANIMATION_DURATION","ICON_SIZE","MONTHS","DatePicker","Icon","style","theme","colors","typography","roundness","disabledOpacity","date","onDateChange","defaultValue","disabled","mode","format","type","leftIconName","rightIconName","leftIconMode","label","placeholder","props","value","setValue","React","useState","useEffect","pickerVisible","setPickerVisible","labeled","Value","placeholder1","setPlaceholder1","focused","setFocused","labelLayout","setLabelLayout","measured","width","getValidDate","Date","getMonth","formatDate","newDate","dateFormat","toLocaleTimeString","toLocaleString","getDate","getFullYear","toggleVisibility","_handleBlur","_handleFocus","insets","useSafeAreaInsets","_hidePlaceholder","timing","toValue","duration","useNativeDriver","start","_showPlaceholder","setTimeout","clearTimeout","MINIMIZED_LABEL_Y_OFFSET","caption","lineHeight","OUTLINE_MINIMIZED_LABEL_Y_OFFSET","MAXIMIZED_LABEL_FONT_SIZE","subtitle1","fontSize","MINIMIZED_LABEL_FONT_SIZE","hasActiveOutline","inputTextColor","activeColor","underlineColor","borderColor","placeholderColor","containerStyle","backgroundColor","inputStyle","strong","light","divider","primary","background","paddingVertical","color","paddingLeft","paddingRight","height","borderTopLeftRadius","borderTopRightRadius","paddingBottom","marginTop","borderRadius","borderWidth","paddingTop","opacity","paddingHorizontal","marginLeft","leftIconColor","leftIconProps","size","name","leftIconStyle","position","labelStyle","top","left","transform","translateY","interpolate","inputRange","outputRange","scale","translateX","inputStyles","styles","input","marginHorizontal","container","underline","scaleY","StyleSheet","absoluteFill","e","nativeEvent","layout","right","picker","pickerContainer","bottom","_event","data","create","alignSelf","flexDirection","justifyContent","flexGrow","textAlignVertical","margin","textAlign","I18nManager","isRTL","zIndex","closeButton","withTheme"],"sources":["DatePicker.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n View,\n Animated,\n Text,\n StyleSheet,\n StyleProp,\n ViewStyle,\n TextStyle,\n TextInputProps,\n ImageStyle,\n I18nManager,\n LayoutChangeEvent,\n TextInput as NativeTextInput,\n} from \"react-native\";\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\";\n\nimport dateFormat from \"dateformat\";\nimport { withTheme } from \"../../theming\";\nimport Portal from \"../Portal/Portal\";\nimport Touchable from \"../Touchable\";\nimport DateTimePicker from \"./DatePickerComponent\";\n\nimport type { Theme } from \"../../styles/DefaultTheme\";\nimport type { IconSlot } from \"../../interfaces/Icon\";\n\nconst AnimatedText = Animated.createAnimatedComponent(Text);\n\nconst FOCUS_ANIMATION_DURATION = 150;\nconst BLUR_ANIMATION_DURATION = 180;\nconst ICON_SIZE = 24;\n\ntype Props = {\n style?: StyleProp<ViewStyle> & { height?: number };\n theme: Theme;\n // initialDate?: string;\n // locale?: string;\n // minuteInterval?: number;\n // timeZoneOffsetInMinutes?: number;\n // error?: boolean;\n // type?: string;\n date?: Date;\n format?: string;\n onDateChange?: (data?: Date) => void;\n defaultValue?: Date;\n disabled?: boolean;\n mode?: \"date\" | \"time\" | \"datetime\";\n type?: \"solid\" | \"underline\";\n label?: string;\n placeholder?: string;\n leftIconName?: string;\n leftIconMode?: \"outset\" | \"inset\";\n rightIconName?: string;\n} & IconSlot &\n TextInputProps;\n\nconst MONTHS = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\n\nconst DatePicker: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n style,\n theme: { colors, typography, roundness, disabledOpacity },\n date,\n onDateChange = () => {},\n defaultValue,\n disabled = false,\n mode = \"date\",\n format,\n type = \"underline\",\n leftIconName,\n rightIconName,\n leftIconMode = \"inset\",\n label,\n placeholder,\n ...props\n}) => {\n const [value, setValue] = React.useState<any>(date || defaultValue);\n\n React.useEffect(() => {\n if (defaultValue != null) {\n setValue(defaultValue);\n }\n }, [defaultValue]);\n\n const [pickerVisible, setPickerVisible] = React.useState(false);\n const [labeled] = React.useState<Animated.Value>(\n new Animated.Value(date ? 0 : 1)\n );\n const [placeholder1, setPlaceholder1] = React.useState(\"\");\n const [focused, setFocused] = React.useState<boolean>(false);\n const [labelLayout, setLabelLayout] = React.useState<{\n measured: Boolean;\n width: number;\n }>({ measured: false, width: 0 });\n\n const getValidDate = (): Date => {\n if (!value) {\n return new Date();\n }\n return typeof value?.getMonth === \"function\" ? value : new Date();\n };\n\n const formatDate = (): string => {\n if (!value) return \"\";\n let newDate = getValidDate();\n\n if (format) return dateFormat(newDate, format);\n\n if (mode === \"time\") {\n return `${newDate.toLocaleTimeString()}`;\n }\n\n if (mode === \"datetime\") {\n return `${newDate.toLocaleString()}`;\n }\n\n return `${\n MONTHS[newDate.getMonth()]\n } ${newDate.getDate()}, ${newDate.getFullYear()}`;\n };\n\n const toggleVisibility = async () => {\n setPickerVisible(!pickerVisible);\n focused ? _handleBlur() : _handleFocus();\n };\n const insets = useSafeAreaInsets();\n\n // const _restoreLabel = () =>\n // Animated.timing(labeled, {\n // toValue: 1,\n // duration: FOCUS_ANIMATION_DURATION,\n // useNativeDriver: true,\n // }).start();\n\n // const _minmizeLabel = () =>\n // Animated.timing(labeled, {\n // toValue: 0,\n // duration: BLUR_ANIMATION_DURATION,\n // useNativeDriver: true,\n // }).start();\n\n // const _showPlaceholder = () =>\n // setTimeout(() => setPlaceholder1(placeholder || \"\"), 50);\n\n const _hidePlaceholder = () => {\n setPlaceholder1(\"\");\n };\n\n React.useEffect(() => {\n setValue(date);\n }, [date]);\n\n React.useEffect(() => {\n if (value || focused || placeholder1) {\n // _minmizeLabel();\n Animated.timing(labeled, {\n toValue: 0,\n duration: BLUR_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n } else {\n // _restoreLabel();\n Animated.timing(labeled, {\n toValue: 1,\n duration: FOCUS_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n }\n }, [value, focused, placeholder1, labeled]);\n\n React.useEffect(() => {\n const _showPlaceholder = () =>\n setTimeout(() => setPlaceholder1(placeholder || \"\"), 50);\n if (focused || !label) {\n _showPlaceholder();\n } else {\n _hidePlaceholder();\n }\n return () => {\n clearTimeout(_showPlaceholder());\n };\n }, [focused, label, placeholder]);\n\n const _handleFocus = () => {\n if (disabled) {\n return;\n }\n\n setFocused(true);\n };\n\n const _handleBlur = () => {\n if (disabled) {\n return;\n }\n setFocused(false);\n };\n\n const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);\n const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);\n const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;\n const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;\n\n const hasActiveOutline = focused;\n\n let inputTextColor,\n activeColor,\n underlineColor,\n borderColor,\n placeholderColor,\n containerStyle: StyleProp<ViewStyle>,\n backgroundColor,\n inputStyle: StyleProp<TextStyle>;\n\n inputTextColor = colors.strong;\n if (disabled) {\n activeColor = colors.light;\n placeholderColor = colors.light;\n borderColor = \"transparent\";\n underlineColor = \"transparent\";\n backgroundColor = colors.divider;\n } else {\n activeColor = colors.primary;\n placeholderColor = borderColor = colors.light;\n underlineColor = colors.light;\n backgroundColor = colors.background;\n }\n\n const { lineHeight, ...subtitle1 } = typography.subtitle1;\n\n inputStyle = {\n paddingVertical: 0,\n color: inputTextColor,\n paddingLeft:\n leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + (type === \"solid\" ? 16 : 12)\n : 0,\n paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,\n ...subtitle1,\n height: lineHeight,\n };\n\n if (type === \"underline\") {\n containerStyle = {\n borderTopLeftRadius: roundness,\n borderTopRightRadius: roundness,\n paddingBottom: 12,\n marginTop: 16,\n };\n } else {\n containerStyle = {\n borderRadius: roundness,\n borderColor: hasActiveOutline ? activeColor : borderColor,\n borderWidth: 1,\n paddingTop: labeled ? 16 * 1.5 : 16,\n paddingBottom: labeled ? 16 * 0.5 : 16,\n opacity: disabled ? disabledOpacity : 1,\n backgroundColor,\n };\n\n inputStyle.paddingHorizontal = 12;\n }\n\n if (leftIconName && leftIconMode === \"outset\") {\n containerStyle.marginLeft = ICON_SIZE + 8;\n }\n\n let leftIconColor;\n if (focused) {\n leftIconColor = colors.primary;\n } else {\n leftIconColor = colors.light;\n }\n\n const leftIconProps = {\n size: 24,\n color: leftIconColor,\n name: leftIconName || \"\",\n };\n\n const leftIconStyle: ImageStyle = {\n position: \"absolute\",\n marginTop:\n type === \"solid\"\n ? leftIconMode === \"inset\"\n ? MINIMIZED_LABEL_FONT_SIZE + 4\n : 16\n : leftIconMode === \"outset\"\n ? 16\n : 0,\n };\n\n const labelStyle = {\n ...typography.subtitle1,\n top: type === \"solid\" ? 16 : 0,\n left:\n leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + (type === \"solid\" ? 16 : 12)\n : 0,\n transform: [\n {\n // Move label to top\n translateY: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n type === \"solid\"\n ? OUTLINE_MINIMIZED_LABEL_Y_OFFSET\n : MINIMIZED_LABEL_Y_OFFSET,\n 0,\n ],\n }),\n },\n {\n // Make label smaller\n scale: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE,\n 1,\n ],\n }),\n },\n {\n // Offset label scale since RN doesn't support transform origin\n translateX: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n -(1 - MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE) *\n (labelLayout.width / 2),\n 0,\n ],\n }),\n },\n ],\n };\n\n const inputStyles = [\n styles.input,\n inputStyle,\n type === \"solid\" ? { marginHorizontal: 12 } : {},\n ];\n\n // const render = (props) => <NativeTextInput {...props} />;\n\n return (\n <View style={[styles.container, style]}>\n <Touchable disabled={disabled} onPress={toggleVisibility}>\n <View pointerEvents=\"none\">\n <View style={[styles.container, style]}>\n {leftIconName && leftIconMode === \"outset\" ? (\n <Icon {...leftIconProps} style={leftIconStyle} />\n ) : null}\n <View\n style={[containerStyle, style ? { height: style.height } : {}]}\n >\n {type === \"underline\" ? (\n // When type === 'flat', render an underline\n <Animated.View\n style={[\n styles.underline,\n {\n backgroundColor: focused ? activeColor : underlineColor,\n // Underlines is thinner when input is not focused\n transform: [{ scaleY: focused ? 1 : 0.5 }],\n },\n ]}\n />\n ) : null}\n\n {label ? (\n // Position colored placeholder and gray placeholder on top of each other and crossfade them\n // This gives the effect of animating the color, but allows us to use native driver\n <View\n pointerEvents=\"none\"\n style={[\n StyleSheet.absoluteFill,\n {\n opacity:\n // Hide the label in minimized state until we measure its width\n date || focused ? (labelLayout.measured ? 1 : 0) : 1,\n },\n ]}\n >\n <AnimatedText\n onLayout={(e: LayoutChangeEvent) =>\n setLabelLayout({\n width: e.nativeEvent.layout.width,\n measured: true,\n })\n }\n style={[\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: colors.light,\n opacity: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [hasActiveOutline ? 1 : 0, 0],\n }),\n },\n ]}\n numberOfLines={1}\n >\n {label}\n </AnimatedText>\n <AnimatedText\n style={[\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: placeholderColor,\n opacity: hasActiveOutline ? labeled : 1,\n },\n ]}\n numberOfLines={1}\n >\n {label}\n </AnimatedText>\n </View>\n ) : null}\n\n {leftIconName && leftIconMode === \"inset\" ? (\n <Icon\n {...leftIconProps}\n style={{\n ...leftIconStyle,\n marginLeft: type === \"solid\" ? 16 : 0,\n }}\n />\n ) : null}\n\n <NativeTextInput\n value={formatDate()}\n placeholder={label ? placeholder1 : placeholder}\n editable={!disabled}\n placeholderTextColor={placeholderColor}\n selectionColor={activeColor}\n onFocus={_handleFocus}\n onBlur={_handleBlur}\n underlineColorAndroid={\"transparent\"}\n style={inputStyles}\n {...props}\n />\n </View>\n {rightIconName ? (\n <Icon\n name={rightIconName}\n size={ICON_SIZE}\n color={colors.light}\n style={{\n position: \"absolute\",\n right: 16,\n marginTop:\n type === \"solid\" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,\n }}\n />\n ) : null}\n </View>\n </View>\n </Touchable>\n {pickerVisible && (\n <Portal>\n <View\n style={[\n styles.picker,\n {\n backgroundColor: colors.divider,\n },\n ]}\n >\n <View\n style={[\n styles.pickerContainer,\n {\n paddingTop: insets.top,\n paddingBottom: insets.bottom,\n paddingLeft: insets.left,\n paddingRight: insets.right,\n },\n ]}\n >\n <DateTimePicker\n value={getValidDate()}\n mode={mode}\n isVisible={pickerVisible}\n toggleVisibility={toggleVisibility}\n onChange={(_event: any, data: any) => {\n toggleVisibility();\n setValue(data);\n onDateChange(data);\n }}\n />\n </View>\n </View>\n </Portal>\n )}\n </View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n picker: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n },\n underline: {\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: 2,\n },\n input: {\n flexGrow: 1,\n justifyContent: \"center\",\n textAlignVertical: \"center\",\n margin: 0,\n textAlign: I18nManager.isRTL ? \"right\" : \"left\",\n },\n placeholder: {\n position: \"absolute\",\n left: 0,\n },\n pickerContainer: { flexDirection: \"column\", width: \"100%\", zIndex: 100 },\n closeButton: {\n alignSelf: \"flex-end\",\n },\n});\n\nexport default withTheme(DatePicker);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAcA;;AAEA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAKA,MAAMA,YAAY,GAAGC,qBAAA,CAASC,uBAAT,CAAiCC,iBAAjC,CAArB;;AAEA,MAAMC,wBAAwB,GAAG,GAAjC;AACA,MAAMC,uBAAuB,GAAG,GAAhC;AACA,MAAMC,SAAS,GAAG,EAAlB;AA0BA,MAAMC,MAAM,GAAG,CACb,SADa,EAEb,UAFa,EAGb,OAHa,EAIb,OAJa,EAKb,KALa,EAMb,MANa,EAOb,MAPa,EAQb,QARa,EASb,WATa,EAUb,SAVa,EAWb,UAXa,EAYb,UAZa,CAAf;;AAeA,MAAMC,UAAoD,GAAG,QAiBvD;EAAA,IAjBwD;IAC5DC,IAD4D;IAE5DC,KAF4D;IAG5DC,KAAK,EAAE;MAAEC,MAAF;MAAUC,UAAV;MAAsBC,SAAtB;MAAiCC;IAAjC,CAHqD;IAI5DC,IAJ4D;IAK5DC,YAAY,GAAG,MAAM,CAAE,CALqC;IAM5DC,YAN4D;IAO5DC,QAAQ,GAAG,KAPiD;IAQ5DC,IAAI,GAAG,MARqD;IAS5DC,MAT4D;IAU5DC,IAAI,GAAG,WAVqD;IAW5DC,YAX4D;IAY5DC,aAZ4D;IAa5DC,YAAY,GAAG,OAb6C;IAc5DC,KAd4D;IAe5DC,WAf4D;IAgB5D,GAAGC;EAhByD,CAiBxD;EACJ,MAAM,CAACC,KAAD,EAAQC,QAAR,IAAoBC,KAAK,CAACC,QAAN,CAAoBhB,IAAI,IAAIE,YAA5B,CAA1B;EAEAa,KAAK,CAACE,SAAN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,aAAa,EAAE,QAAjB;IAA2BlG,KAAK,EAAE,MAAlC;IAA0C0G,MAAM,EAAE;EAAlD,CA9Bc;EA+B/BC,WAAW,EAAE;IACXV,SAAS,EAAE;EADA;AA/BkB,CAAlB,CAAf;;eAoCe,IAAAW,kBAAA,EAAUjJ,UAAV,C"}
|
|
1
|
+
{"version":3,"names":["AnimatedText","Animated","createAnimatedComponent","Text","FOCUS_ANIMATION_DURATION","BLUR_ANIMATION_DURATION","ICON_SIZE","MONTHS","DatePicker","Icon","style","theme","colors","typography","roundness","disabledOpacity","date","onDateChange","defaultValue","disabled","mode","format","type","leftIconName","rightIconName","leftIconMode","label","placeholder","props","value","setValue","React","useState","useEffect","pickerVisible","setPickerVisible","labeled","Value","placeholder1","setPlaceholder1","focused","setFocused","labelLayout","setLabelLayout","measured","width","getValidDate","Date","getMonth","formatDate","newDate","dateFormat","toLocaleTimeString","toLocaleString","getDate","getFullYear","toggleVisibility","_handleBlur","_handleFocus","insets","useSafeAreaInsets","_hidePlaceholder","timing","toValue","duration","useNativeDriver","start","_showPlaceholder","setTimeout","clearTimeout","MINIMIZED_LABEL_Y_OFFSET","caption","lineHeight","OUTLINE_MINIMIZED_LABEL_Y_OFFSET","MAXIMIZED_LABEL_FONT_SIZE","subtitle1","fontSize","MINIMIZED_LABEL_FONT_SIZE","hasActiveOutline","inputTextColor","activeColor","underlineColor","borderColor","placeholderColor","containerStyle","backgroundColor","inputStyle","strong","light","divider","primary","background","paddingVertical","color","paddingLeft","paddingRight","height","borderTopLeftRadius","borderTopRightRadius","paddingBottom","marginTop","borderRadius","borderWidth","paddingTop","opacity","paddingHorizontal","marginLeft","leftIconColor","leftIconProps","size","name","leftIconStyle","position","labelStyle","top","left","transform","translateY","interpolate","inputRange","outputRange","scale","translateX","inputStyles","styles","input","marginHorizontal","createElement","View","container","Touchable","onPress","pointerEvents","underline","scaleY","StyleSheet","absoluteFill","onLayout","e","nativeEvent","layout","numberOfLines","NativeTextInput","editable","placeholderTextColor","selectionColor","onFocus","onBlur","underlineColorAndroid","right","Portal","picker","pickerContainer","bottom","DateTimePicker","isVisible","onChange","_event","data","create","alignSelf","flexDirection","justifyContent","flexGrow","textAlignVertical","margin","textAlign","I18nManager","isRTL","zIndex","closeButton","withTheme"],"sources":["DatePicker.js"],"sourcesContent":["import * as React from \"react\";\nimport { View, Animated, Text, StyleSheet, I18nManager, TextInput as NativeTextInput, } from \"react-native\";\nimport { useSafeAreaInsets } from \"react-native-safe-area-context\";\nimport dateFormat from \"dateformat\";\nimport { withTheme } from \"../../theming\";\nimport Portal from \"../Portal/Portal\";\nimport Touchable from \"../Touchable\";\nimport DateTimePicker from \"./DatePickerComponent\";\nconst AnimatedText = Animated.createAnimatedComponent(Text);\nconst FOCUS_ANIMATION_DURATION = 150;\nconst BLUR_ANIMATION_DURATION = 180;\nconst ICON_SIZE = 24;\nconst MONTHS = [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n];\nconst DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disabledOpacity }, date, onDateChange = () => { }, defaultValue, disabled = false, mode = \"date\", format, type = \"underline\", leftIconName, rightIconName, leftIconMode = \"inset\", label, placeholder, ...props }) => {\n const [value, setValue] = React.useState(date || defaultValue);\n React.useEffect(() => {\n if (defaultValue != null) {\n setValue(defaultValue);\n }\n }, [defaultValue]);\n const [pickerVisible, setPickerVisible] = React.useState(false);\n const [labeled] = React.useState(new Animated.Value(date ? 0 : 1));\n const [placeholder1, setPlaceholder1] = React.useState(\"\");\n const [focused, setFocused] = React.useState(false);\n const [labelLayout, setLabelLayout] = React.useState({ measured: false, width: 0 });\n const getValidDate = () => {\n if (!value) {\n return new Date();\n }\n return typeof (value === null || value === void 0 ? void 0 : value.getMonth) === \"function\" ? value : new Date();\n };\n const formatDate = () => {\n if (!value)\n return \"\";\n let newDate = getValidDate();\n if (format)\n return dateFormat(newDate, format);\n if (mode === \"time\") {\n return `${newDate.toLocaleTimeString()}`;\n }\n if (mode === \"datetime\") {\n return `${newDate.toLocaleString()}`;\n }\n return `${MONTHS[newDate.getMonth()]} ${newDate.getDate()}, ${newDate.getFullYear()}`;\n };\n const toggleVisibility = async () => {\n setPickerVisible(!pickerVisible);\n focused ? _handleBlur() : _handleFocus();\n };\n const insets = useSafeAreaInsets();\n // const _restoreLabel = () =>\n // Animated.timing(labeled, {\n // toValue: 1,\n // duration: FOCUS_ANIMATION_DURATION,\n // useNativeDriver: true,\n // }).start();\n // const _minmizeLabel = () =>\n // Animated.timing(labeled, {\n // toValue: 0,\n // duration: BLUR_ANIMATION_DURATION,\n // useNativeDriver: true,\n // }).start();\n // const _showPlaceholder = () =>\n // setTimeout(() => setPlaceholder1(placeholder || \"\"), 50);\n const _hidePlaceholder = () => {\n setPlaceholder1(\"\");\n };\n React.useEffect(() => {\n setValue(date);\n }, [date]);\n React.useEffect(() => {\n if (value || focused || placeholder1) {\n // _minmizeLabel();\n Animated.timing(labeled, {\n toValue: 0,\n duration: BLUR_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n }\n else {\n // _restoreLabel();\n Animated.timing(labeled, {\n toValue: 1,\n duration: FOCUS_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start();\n }\n }, [value, focused, placeholder1, labeled]);\n React.useEffect(() => {\n const _showPlaceholder = () => setTimeout(() => setPlaceholder1(placeholder || \"\"), 50);\n if (focused || !label) {\n _showPlaceholder();\n }\n else {\n _hidePlaceholder();\n }\n return () => {\n clearTimeout(_showPlaceholder());\n };\n }, [focused, label, placeholder]);\n const _handleFocus = () => {\n if (disabled) {\n return;\n }\n setFocused(true);\n };\n const _handleBlur = () => {\n if (disabled) {\n return;\n }\n setFocused(false);\n };\n const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);\n const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);\n const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;\n const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;\n const hasActiveOutline = focused;\n let inputTextColor, activeColor, underlineColor, borderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;\n inputTextColor = colors.strong;\n if (disabled) {\n activeColor = colors.light;\n placeholderColor = colors.light;\n borderColor = \"transparent\";\n underlineColor = \"transparent\";\n backgroundColor = colors.divider;\n }\n else {\n activeColor = colors.primary;\n placeholderColor = borderColor = colors.light;\n underlineColor = colors.light;\n backgroundColor = colors.background;\n }\n const { lineHeight, ...subtitle1 } = typography.subtitle1;\n inputStyle = {\n paddingVertical: 0,\n color: inputTextColor,\n paddingLeft: leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + (type === \"solid\" ? 16 : 12)\n : 0,\n paddingRight: rightIconName ? ICON_SIZE + 16 + 4 : 12,\n ...subtitle1,\n height: lineHeight,\n };\n if (type === \"underline\") {\n containerStyle = {\n borderTopLeftRadius: roundness,\n borderTopRightRadius: roundness,\n paddingBottom: 12,\n marginTop: 16,\n };\n }\n else {\n containerStyle = {\n borderRadius: roundness,\n borderColor: hasActiveOutline ? activeColor : borderColor,\n borderWidth: 1,\n paddingTop: labeled ? 16 * 1.5 : 16,\n paddingBottom: labeled ? 16 * 0.5 : 16,\n opacity: disabled ? disabledOpacity : 1,\n backgroundColor,\n };\n inputStyle.paddingHorizontal = 12;\n }\n if (leftIconName && leftIconMode === \"outset\") {\n containerStyle.marginLeft = ICON_SIZE + 8;\n }\n let leftIconColor;\n if (focused) {\n leftIconColor = colors.primary;\n }\n else {\n leftIconColor = colors.light;\n }\n const leftIconProps = {\n size: 24,\n color: leftIconColor,\n name: leftIconName || \"\",\n };\n const leftIconStyle = {\n position: \"absolute\",\n marginTop: type === \"solid\"\n ? leftIconMode === \"inset\"\n ? MINIMIZED_LABEL_FONT_SIZE + 4\n : 16\n : leftIconMode === \"outset\"\n ? 16\n : 0,\n };\n const labelStyle = {\n ...typography.subtitle1,\n top: type === \"solid\" ? 16 : 0,\n left: leftIconName && leftIconMode === \"inset\"\n ? ICON_SIZE + (type === \"solid\" ? 16 : 12)\n : 0,\n transform: [\n {\n // Move label to top\n translateY: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n type === \"solid\"\n ? OUTLINE_MINIMIZED_LABEL_Y_OFFSET\n : MINIMIZED_LABEL_Y_OFFSET,\n 0,\n ],\n }),\n },\n {\n // Make label smaller\n scale: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE,\n 1,\n ],\n }),\n },\n {\n // Offset label scale since RN doesn't support transform origin\n translateX: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [\n -(1 - MINIMIZED_LABEL_FONT_SIZE / MAXIMIZED_LABEL_FONT_SIZE) *\n (labelLayout.width / 2),\n 0,\n ],\n }),\n },\n ],\n };\n const inputStyles = [\n styles.input,\n inputStyle,\n type === \"solid\" ? { marginHorizontal: 12 } : {},\n ];\n // const render = (props) => <NativeTextInput {...props} />;\n return (React.createElement(View, { style: [styles.container, style] },\n React.createElement(Touchable, { disabled: disabled, onPress: toggleVisibility },\n React.createElement(View, { pointerEvents: \"none\" },\n React.createElement(View, { style: [styles.container, style] },\n leftIconName && leftIconMode === \"outset\" ? (React.createElement(Icon, { ...leftIconProps, style: leftIconStyle })) : null,\n React.createElement(View, { style: [containerStyle, style ? { height: style.height } : {}] },\n type === \"underline\" ? (\n // When type === 'flat', render an underline\n React.createElement(Animated.View, { style: [\n styles.underline,\n {\n backgroundColor: focused ? activeColor : underlineColor,\n // Underlines is thinner when input is not focused\n transform: [{ scaleY: focused ? 1 : 0.5 }],\n },\n ] })) : null,\n label ? (\n // Position colored placeholder and gray placeholder on top of each other and crossfade them\n // This gives the effect of animating the color, but allows us to use native driver\n React.createElement(View, { pointerEvents: \"none\", style: [\n StyleSheet.absoluteFill,\n {\n opacity: \n // Hide the label in minimized state until we measure its width\n date || focused ? (labelLayout.measured ? 1 : 0) : 1,\n },\n ] },\n React.createElement(AnimatedText, { onLayout: (e) => setLabelLayout({\n width: e.nativeEvent.layout.width,\n measured: true,\n }), style: [\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: colors.light,\n opacity: labeled.interpolate({\n inputRange: [0, 1],\n outputRange: [hasActiveOutline ? 1 : 0, 0],\n }),\n },\n ], numberOfLines: 1 }, label),\n React.createElement(AnimatedText, { style: [\n styles.placeholder,\n type === \"solid\" ? { paddingHorizontal: 12 } : {},\n labelStyle,\n {\n color: placeholderColor,\n opacity: hasActiveOutline ? labeled : 1,\n },\n ], numberOfLines: 1 }, label))) : null,\n leftIconName && leftIconMode === \"inset\" ? (React.createElement(Icon, { ...leftIconProps, style: {\n ...leftIconStyle,\n marginLeft: type === \"solid\" ? 16 : 0,\n } })) : null,\n React.createElement(NativeTextInput, { value: formatDate(), placeholder: label ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: \"transparent\", style: inputStyles, ...props })),\n rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {\n position: \"absolute\",\n right: 16,\n marginTop: type === \"solid\" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,\n } })) : null))),\n pickerVisible && (React.createElement(Portal, null,\n React.createElement(View, { style: [\n styles.picker,\n {\n backgroundColor: colors.divider,\n },\n ] },\n React.createElement(View, { style: [\n styles.pickerContainer,\n {\n paddingTop: insets.top,\n paddingBottom: insets.bottom,\n paddingLeft: insets.left,\n paddingRight: insets.right,\n },\n ] },\n React.createElement(DateTimePicker, { value: getValidDate(), mode: mode, isVisible: pickerVisible, toggleVisibility: toggleVisibility, onChange: (_event, data) => {\n toggleVisibility();\n setValue(data);\n onDateChange(data);\n } })))))));\n};\nconst styles = StyleSheet.create({\n container: {\n alignSelf: \"stretch\",\n },\n picker: {\n position: \"absolute\",\n bottom: 0,\n left: 0,\n right: 0,\n flexDirection: \"row\",\n justifyContent: \"center\",\n },\n underline: {\n position: \"absolute\",\n left: 0,\n right: 0,\n bottom: 0,\n height: 2,\n },\n input: {\n flexGrow: 1,\n justifyContent: \"center\",\n textAlignVertical: \"center\",\n margin: 0,\n textAlign: I18nManager.isRTL ? \"right\" : \"left\",\n },\n placeholder: {\n position: \"absolute\",\n left: 0,\n },\n pickerContainer: { flexDirection: \"column\", width: \"100%\", zIndex: 100 },\n closeButton: {\n alignSelf: \"flex-end\",\n },\n});\nexport default withTheme(DatePicker);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,YAAY,GAAGC,qBAAA,CAASC,uBAAT,CAAiCC,iBAAjC,CAArB;;AACA,MAAMC,wBAAwB,GAAG,GAAjC;AACA,MAAMC,uBAAuB,GAAG,GAAhC;AACA,MAAMC,SAAS,GAAG,EAAlB;AACA,MAAMC,MAAM,GAAG,CACX,SADW,EAEX,UAFW,EAGX,OAHW,EAIX,OAJW,EAKX,KALW,EAMX,MANW,EAOX,MAPW,EAQX,QARW,EASX,WATW,EAUX,SAVW,EAWX,UAXW,EAYX,UAZW,CAAf;;AAcA,MAAMC,UAAU,GAAG,QAA8Q;EAAA,IAA7Q;IAAEC,IAAF;IAAQC,KAAR;IAAeC,KAAK,EAAE;MAAEC,MAAF;MAAUC,UAAV;MAAsBC,SAAtB;MAAiCC;IAAjC,CAAtB;IAA0EC,IAA1E;IAAgFC,YAAY,GAAG,MAAM,CAAG,CAAxG;IAA0GC,YAA1G;IAAwHC,QAAQ,GAAG,KAAnI;IAA0IC,IAAI,GAAG,MAAjJ;IAAyJC,MAAzJ;IAAiKC,IAAI,GAAG,WAAxK;IAAqLC,YAArL;IAAmMC,aAAnM;IAAkNC,YAAY,GAAG,OAAjO;IAA0OC,KAA1O;IAAiPC,WAAjP;IAA8P,GAAGC;E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|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DatePickerComponent","value","onChange","mode","toggleVisibility","isVisible","theme","internalTheme","createMuiTheme","palette","primary","main","colors","Theme","secondary","Picker","DatePicker","TimePicker","DateTimePicker","DateFnsUtils","d","withTheme"],"sources":["DatePickerComponent.web.
|
|
1
|
+
{"version":3,"names":["DatePickerComponent","value","onChange","mode","toggleVisibility","isVisible","theme","internalTheme","createMuiTheme","palette","primary","main","colors","Theme","secondary","Picker","DatePicker","TimePicker","DateTimePicker","React","createElement","MuiPickersUtilsProvider","utils","DateFnsUtils","ThemeProvider","open","d","onClose","variant","TextFieldComponent","withTheme"],"sources":["DatePickerComponent.web.js"],"sourcesContent":["import React from \"react\";\nimport DateFnsUtils from \"@date-io/date-fns\";\nimport { MuiPickersUtilsProvider, DatePicker, TimePicker, DateTimePicker, } from \"@material-ui/pickers\";\nimport { createMuiTheme, ThemeProvider } from \"@material-ui/core/styles\";\nimport { withTheme } from \"../../theming\";\nimport Theme from \"../../styles/DefaultTheme\";\nconst DatePickerComponent = ({ value, onChange, mode, toggleVisibility, isVisible, theme, }) => {\n const internalTheme = createMuiTheme({\n palette: {\n primary: {\n main: theme.colors.primary || Theme.colors.primary,\n },\n secondary: {\n main: theme.colors.secondary || Theme.colors.secondary,\n },\n },\n });\n const Picker = mode === \"date\"\n ? DatePicker\n : mode === \"time\"\n ? TimePicker\n : DateTimePicker;\n return (React.createElement(MuiPickersUtilsProvider, { utils: DateFnsUtils },\n React.createElement(ThemeProvider, { theme: internalTheme },\n React.createElement(Picker, { value: value, open: isVisible, onChange: (d) => {\n toggleVisibility();\n onChange(null, d);\n }, onClose: () => toggleVisibility(), variant: \"dialog\", TextFieldComponent: () => null }))));\n};\nexport default withTheme(DatePickerComponent);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AACA,MAAMA,mBAAmB,GAAG,QAAoE;EAAA,IAAnE;IAAEC,KAAF;IAASC,QAAT;IAAmBC,IAAnB;IAAyBC,gBAAzB;IAA2CC,SAA3C;IAAsDC;EAAtD,CAAmE;EAC5F,MAAMC,aAAa,GAAG,IAAAC,sBAAA,EAAe;IACjCC,OAAO,EAAE;MACLC,OAAO,EAAE;QACLC,IAAI,EAAEL,KAAK,CAACM,MAAN,CAAaF,OAAb,IAAwBG,qBAAA,CAAMD,MAAN,CAAaF;MADtC,CADJ;MAILI,SAAS,EAAE;QACPH,IAAI,EAAEL,KAAK,CAACM,MAAN,CAAaE,SAAb,IAA0BD,qBAAA,CAAMD,MAAN,CAAaE;MADtC;IAJN;EADwB,CAAf,CAAtB;EAUA,MAAMC,MAAM,GAAGZ,IAAI,KAAK,MAAT,GACTa,mBADS,GAETb,IAAI,KAAK,MAAT,GACIc,mBADJ,GAEIC,uBAJV;EAKA,oBAAQC,cAAA,CAAMC,aAAN,CAAoBC,gCAApB,EAA6C;IAAEC,KAAK,EAAEC;EAAT,CAA7C,eACJJ,cAAA,CAAMC,aAAN,CAAoBI,qBAApB,EAAmC;IAAElB,KAAK,EAAEC;EAAT,CAAnC,eACIY,cAAA,CAAMC,aAAN,CAAoBL,MAApB,EAA4B;IAAEd,KAAK,EAAEA,KAAT;IAAgBwB,IAAI,EAAEpB,SAAtB;IAAiCH,QAAQ,EAAGwB,CAAD,IAAO;MACtEtB,gBAAgB;MAChBF,QAAQ,CAAC,IAAD,EAAOwB,CAAP,CAAR;IACH,CAHuB;IAGrBC,OAAO,EAAE,MAAMvB,gBAAgB,EAHV;IAGcwB,OAAO,EAAE,QAHvB;IAGiCC,kBAAkB,EAAE,MAAM;EAH3D,CAA5B,CADJ,CADI,CAAR;AAMH,CAtBD;;eAuBe,IAAAC,kBAAA,EAAU9B,mBAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["DatePickerComponentType.
|
|
1
|
+
{"version":3,"names":[],"sources":["DatePickerComponentType.js"],"sourcesContent":["export {};\n"],"mappings":""}
|
|
@@ -25,6 +25,8 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
27
27
|
|
|
28
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
29
|
+
|
|
28
30
|
const Button = _ref => {
|
|
29
31
|
let {
|
|
30
32
|
Icon,
|
|
@@ -126,7 +128,7 @@ const Button = _ref => {
|
|
|
126
128
|
alignSelf: "stretch",
|
|
127
129
|
...margins
|
|
128
130
|
}
|
|
129
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, _extends({}, rest, {
|
|
130
132
|
onPress: onPress,
|
|
131
133
|
accessibilityState: {
|
|
132
134
|
disabled
|
|
@@ -134,7 +136,7 @@ const Button = _ref => {
|
|
|
134
136
|
accessibilityRole: "button",
|
|
135
137
|
disabled: disabled || loading,
|
|
136
138
|
style: [styles.button, buttonStyle, innerStyles]
|
|
137
|
-
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
139
|
+
}), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
138
140
|
style: styles.content
|
|
139
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
140
142
|
style: iconStyle
|
|
@@ -169,23 +171,5 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
169
171
|
|
|
170
172
|
var _default = (0, _theming.withTheme)(Button);
|
|
171
173
|
|
|
172
|
-
exports.default = _default;
|
|
173
|
-
//# sourceMappingURL=DeprecatedButton.js.mapt.create({
|
|
174
|
-
button: {
|
|
175
|
-
minWidth: 64,
|
|
176
|
-
borderStyle: "solid"
|
|
177
|
-
},
|
|
178
|
-
content: {
|
|
179
|
-
flexDirection: "row",
|
|
180
|
-
alignItems: "center",
|
|
181
|
-
justifyContent: "center"
|
|
182
|
-
},
|
|
183
|
-
icon: {
|
|
184
|
-
width: _Config.default.buttonIconSize
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
|
|
188
|
-
var _default = (0, _theming.withTheme)(Button);
|
|
189
|
-
|
|
190
174
|
exports.default = _default;
|
|
191
175
|
//# sourceMappingURL=DeprecatedButton.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","
|
|
1
|
+
{"version":3,"names":["Button","Icon","icon","disabled","type","loading","labelColor","color","colorOverride","children","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","textStyle","textAlign","marginVertical","marginHorizontal","iconStyle","styles","marginLeft","marginRight","width","Config","buttonIconSize","margin","marginEnd","marginTop","marginBottom","innerStyles","flatten","margins","alignSelf","button","content","create","minWidth","borderStyle","flexDirection","alignItems","justifyContent","withTheme"],"sources":["DeprecatedButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport {\n ActivityIndicator,\n View,\n Text,\n StyleSheet,\n TouchableHighlightProps,\n StyleProp,\n ViewStyle,\n TextStyle,\n} from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\n\nimport type { Theme } from \"../styles/DefaultTheme\";\nimport type { IconSlot } from \"../interfaces/Icon\";\n\n/**\n * A button is component that the user can press to trigger an action.\n *\n * <div class=\"screenshots\">\n * <figure>\n * <img src=\"screenshots/button-1.png\" />\n * <figcaption>Text button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-2.png\" />\n * <figcaption>Outlined button</figcaption>\n * </figure>\n * <figure>\n * <img src=\"screenshots/button-3.png\" />\n * <figcaption>Contained button</figcaption>\n * </figure>\n * </div>\n *\n * ## Usage\n * ```js\n * import * as React from 'react';\n * import { Button } from '@draftbit/ui';\n *\n * const MyComponent = () => (\n * <Button icon=\"add-a-photo\" type=\"solid\" onPress={() => console.log('Pressed')}>\n * Press me\n * </Button>\n * );\n *\n * export default MyComponent;\n * ```\n */\n\ntype Props = {\n disabled?: boolean;\n type?: \"solid\" | \"outline\" | \"text\";\n loading?: boolean;\n icon?: string;\n labelColor?: string;\n color?: string;\n children?: React.ReactNode;\n onPress: () => void;\n elevation?: number;\n style?: StyleProp<ViewStyle>;\n theme: Theme;\n} & TouchableHighlightProps &\n IconSlot;\n\nconst Button: React.FC<React.PropsWithChildren<Props>> = ({\n Icon,\n icon,\n disabled = false,\n type = \"solid\",\n loading = false,\n labelColor,\n color: colorOverride,\n children,\n onPress,\n elevation = 0,\n style,\n theme: { colors, disabledOpacity, roundness, typography },\n ...rest\n}) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n\n if (type === \"solid\") {\n backgroundColor = buttonColor;\n\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || colors.surface;\n }\n } else {\n backgroundColor = \"transparent\";\n\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n textColor = labelColor || buttonColor;\n }\n }\n\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n } else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n } else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n };\n\n const textStyle: StyleProp<TextStyle> = {\n textAlign: \"center\",\n color: textColor,\n marginVertical: 16,\n marginHorizontal: 16,\n };\n\n const iconStyle = [\n styles.icon,\n {\n marginLeft: 16,\n marginRight: -8,\n width: Config.buttonIconSize,\n },\n ];\n\n const {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n ...innerStyles\n } = StyleSheet.flatten(style || {});\n\n const margins = {\n margin,\n marginEnd,\n marginTop,\n marginLeft,\n marginRight,\n marginBottom,\n marginHorizontal,\n marginVertical,\n };\n\n return (\n <Elevation style={{ elevation, alignSelf: \"stretch\", ...margins }}>\n <Touchable\n {...rest}\n onPress={onPress}\n accessibilityState={{ disabled }}\n accessibilityRole=\"button\"\n disabled={disabled || loading}\n style={[styles.button, buttonStyle, innerStyles]}\n >\n <View style={styles.content}>\n {icon && loading !== true ? (\n <View style={iconStyle}>\n <Icon\n name={icon}\n size={Config.buttonIconSize}\n color={textColor}\n />\n </View>\n ) : null}\n {loading ? (\n <ActivityIndicator\n size=\"small\"\n color={textColor}\n style={iconStyle}\n />\n ) : null}\n <Text numberOfLines={1} style={[textStyle, typography.button]}>\n {children}\n </Text>\n </View>\n </Touchable>\n </Elevation>\n );\n};\n\nconst styles = StyleSheet.create({\n button: {\n minWidth: 64,\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n width: Config.buttonIconSize,\n },\n});\n\nexport default withTheme(Button);\n"],"mappings":";;;;;;;AAAA;;AACA;;AAUA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;;AAqDA,MAAMA,MAAgD,GAAG,QAcnD;EAAA,IAdoD;IACxDC,IADwD;IAExDC,IAFwD;IAGxDC,QAAQ,GAAG,KAH6C;IAIxDC,IAAI,GAAG,OAJiD;IAKxDC,OAAO,GAAG,KAL8C;IAMxDC,UANwD;IAOxDC,KAAK,EAAEC,aAPiD;IAQxDC,QARwD;IASxDC,OATwD;IAUxDC,SAAS,GAAG,CAV4C;IAWxDC,KAXwD;IAYxDC,KAAK,EAAE;MAAEC,MAAF;MAAUC,eAAV;MAA2BC,SAA3B;MAAsCC;IAAtC,CAZiD;IAaxD,GAAGC;EAbqD,CAcpD;EACJ,IAAIC,eAAJ,EAAqBC,WAArB,EAAkCC,SAAlC,EAA6CC,WAA7C;EACA,MAAMC,WAAW,GAAGf,aAAa,IAAIM,MAAM,CAACU,OAA5C;;EAEA,IAAIpB,IAAI,KAAK,OAAb,EAAsB;IACpBe,eAAe,GAAGI,WAAlB;;IAEA,IAAIpB,QAAJ,EAAc;MACZkB,SAAS,GAAG,IAAAd,cAAA,EAAMO,MAAM,CAACW,OAAb,EAAsBC,KAAtB,CAA4BX,eAA5B,EAA6CY,GAA7C,GAAmDC,MAAnD,EAAZ;IACD,CAFD,MAEO;MACLP,SAAS,GAAGf,UAAU,IAAIQ,MAAM,CAACW,OAAjC;IACD;EACF,CARD,MAQO;IACLN,eAAe,GAAG,aAAlB;;IAEA,IAAIhB,QAAJ,EAAc;MACZkB,SAAS,GAAG,IAAAd,cAAA,EAAMgB,WAAN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,CAAf;;eAee,IAAAiB,kBAAA,EAAU5D,MAAV,C"}
|
|
@@ -13,6 +13,8 @@ var _Touchable = _interopRequireDefault(require("./Touchable"));
|
|
|
13
13
|
|
|
14
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
15
15
|
|
|
16
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
17
|
+
|
|
16
18
|
const getWidth = numColumns => {
|
|
17
19
|
switch (numColumns) {
|
|
18
20
|
case 1:
|
|
@@ -35,20 +37,6 @@ const Card = _ref => {
|
|
|
35
37
|
...rest
|
|
36
38
|
} = _ref;
|
|
37
39
|
const width = getWidth(numColumns);
|
|
38
|
-
return /*#__PURE__*/_react.default.createElement(_Touchable.default, {
|
|
39
|
-
disabled: !onPress,
|
|
40
|
-
onPress: onPress,
|
|
41
|
-
style: [style, {
|
|
42
|
-
width
|
|
43
|
-
}],
|
|
44
|
-
...rest
|
|
45
|
-
}, children);
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
var _default = (0, _theming.withTheme)(Card);
|
|
49
|
-
|
|
50
|
-
exports.default = _default;
|
|
51
|
-
//# sourceMappingURL=DeprecatedCardWrapper.js.map = getWidth(numColumns);
|
|
52
40
|
return /*#__PURE__*/_react.default.createElement(_Touchable.default, _extends({
|
|
53
41
|
disabled: !onPress,
|
|
54
42
|
onPress: onPress,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","
|
|
1
|
+
{"version":3,"names":["getWidth","numColumns","Card","children","onPress","style","rest","width","withTheme"],"sources":["DeprecatedCardWrapper.tsx"],"sourcesContent":["import React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Touchable from \"./Touchable\";\nimport { StyleProp, ViewStyle } from \"react-native\";\nimport theme from \"../styles/DefaultTheme\";\n\ntype Props = {\n numColumns?: number;\n children?: React.ReactNode;\n onPress?: () => void;\n style?: StyleProp<ViewStyle>;\n theme: typeof theme;\n};\n\nconst getWidth = (numColumns: number) => {\n switch (numColumns) {\n case 1:\n return \"33%\";\n case 2:\n return \"50%\";\n default:\n return \"100%\";\n }\n};\n\nconst Card: React.FC<React.PropsWithChildren<Props>> = ({\n numColumns = 3,\n children,\n onPress,\n style,\n ...rest\n}) => {\n const width = getWidth(numColumns);\n return (\n <Touchable\n disabled={!onPress}\n onPress={onPress}\n style={[style, { width }]}\n {...rest}\n >\n {children}\n </Touchable>\n );\n};\n\nexport default withTheme(Card);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;AAYA,MAAMA,QAAQ,GAAIC,UAAD,IAAwB;EACvC,QAAQA,UAAR;IACE,KAAK,CAAL;MACE,OAAO,KAAP;;IACF,KAAK,CAAL;MACE,OAAO,KAAP;;IACF;MACE,OAAO,MAAP;EANJ;AAQD,CATD;;AAWA,MAAMC,IAA8C,GAAG,QAMjD;EAAA,IANkD;IACtDD,UAAU,GAAG,CADyC;IAEtDE,QAFsD;IAGtDC,OAHsD;IAItDC,KAJsD;IAKtD,GAAGC;EALmD,CAMlD;EACJ,MAAMC,KAAK,GAAGP,QAAQ,CAACC,UAAD,CAAtB;EACA,oBACE,6BAAC,kBAAD;IACE,QAAQ,EAAE,CAACG,OADb;IAEE,OAAO,EAAEA,OAFX;IAGE,KAAK,EAAE,CAACC,KAAD,EAAQ;MAAEE;IAAF,CAAR;EAHT,GAIMD,IAJN,GAMGH,QANH,CADF;AAUD,CAlBD;;eAoBe,IAAAK,kBAAA,EAAUN,IAAV,C"}
|
|
@@ -27,8 +27,6 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
27
27
|
|
|
28
28
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
29
29
|
|
|
30
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
31
|
-
|
|
32
30
|
const FAB = _ref => {
|
|
33
31
|
let {
|
|
34
32
|
Icon,
|
|
@@ -130,7 +128,7 @@ const FAB = _ref => {
|
|
|
130
128
|
style: [{
|
|
131
129
|
elevation
|
|
132
130
|
}, style]
|
|
133
|
-
}, /*#__PURE__*/React.createElement(_Touchable.default,
|
|
131
|
+
}, /*#__PURE__*/React.createElement(_Touchable.default, { ...rest,
|
|
134
132
|
onPress: onPress,
|
|
135
133
|
accessibilityState: {
|
|
136
134
|
disabled
|
|
@@ -138,7 +136,7 @@ const FAB = _ref => {
|
|
|
138
136
|
accessibilityRole: "button",
|
|
139
137
|
disabled: disabled || loading,
|
|
140
138
|
style: buttonStyles
|
|
141
|
-
}
|
|
139
|
+
}, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
142
140
|
style: styles.content
|
|
143
141
|
}, icon && loading !== true ? /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
144
142
|
style: iconStyle
|
|
@@ -181,5 +179,24 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
181
179
|
|
|
182
180
|
var _default = (0, _theming.withTheme)(FAB);
|
|
183
181
|
|
|
182
|
+
exports.default = _default;
|
|
183
|
+
//# sourceMappingURL=DeprecatedFAB.js.mapifyContent: "center"
|
|
184
|
+
},
|
|
185
|
+
icon: {
|
|
186
|
+
alignItems: "center",
|
|
187
|
+
justifyContent: "center",
|
|
188
|
+
width: _Config.default.buttonIconSize
|
|
189
|
+
},
|
|
190
|
+
fixed: {
|
|
191
|
+
left: 0,
|
|
192
|
+
right: 0,
|
|
193
|
+
bottom: 0,
|
|
194
|
+
height: 64,
|
|
195
|
+
borderRadius: 0
|
|
196
|
+
}
|
|
197
|
+
});
|
|
198
|
+
|
|
199
|
+
var _default = (0, _theming.withTheme)(FAB);
|
|
200
|
+
|
|
184
201
|
exports.default = _default;
|
|
185
202
|
//# sourceMappingURL=DeprecatedFAB.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","create","borderStyle","flexDirection","fixed","left","right","bottom","withTheme"],"sources":["DeprecatedFAB.
|
|
1
|
+
{"version":3,"names":["FAB","Icon","icon","disabled","type","loading","color","colorOverride","label","onPress","elevation","style","theme","colors","disabledOpacity","roundness","typography","rest","backgroundColor","borderColor","textColor","borderWidth","buttonColor","primary","surface","alpha","rgb","string","StyleSheet","hairlineWidth","buttonStyle","borderRadius","alignItems","justifyContent","buttonStyles","styles","button","contentStyle","content","textStyle","textAlign","iconStyle","width","Config","buttonIconSize","FABSize","height","FABBorderRadius","push","marginLeft","marginRight","margin","FABFixedHeight","alignSelf","React","createElement","Elevation","Touchable","accessibilityState","accessibilityRole","View","name","size","ActivityIndicator","Text","numberOfLines","create","borderStyle","flexDirection","fixed","left","right","bottom","withTheme"],"sources":["DeprecatedFAB.js"],"sourcesContent":["import * as React from \"react\";\nimport { ActivityIndicator, View, StyleSheet, } from \"react-native\";\nimport color from \"color\";\nimport Config from \"./Config\";\nimport Text from \"./Text\";\nimport Touchable from \"./Touchable\";\nimport Elevation from \"./Elevation\";\nimport { withTheme } from \"../theming\";\nconst FAB = ({ Icon, icon, disabled = false, type = \"solid\", loading = false, color: colorOverride, label, onPress, elevation = 0, style, theme: { colors, disabledOpacity, roundness, typography }, ...rest }) => {\n let backgroundColor, borderColor, textColor, borderWidth;\n const buttonColor = colorOverride || colors.primary;\n if (type === \"standard\" || type === \"extended\" || type === \"fixed\") {\n backgroundColor = buttonColor;\n if (disabled) {\n textColor = color(colors.surface).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = colors.surface;\n }\n }\n else {\n backgroundColor = \"transparent\";\n if (disabled) {\n textColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n textColor = buttonColor;\n }\n }\n if (type === \"outline\") {\n if (disabled) {\n borderColor = color(buttonColor).alpha(disabledOpacity).rgb().string();\n }\n else {\n borderColor = buttonColor;\n }\n borderWidth = StyleSheet.hairlineWidth;\n }\n else {\n borderColor = \"transparent\";\n borderWidth = 0;\n }\n const buttonStyle = {\n backgroundColor,\n borderColor,\n borderWidth,\n borderRadius: roundness,\n alignItems: \"center\",\n justifyContent: \"center\",\n };\n const buttonStyles = [styles.button, buttonStyle];\n const contentStyle = [styles.content];\n const textStyle = {\n textAlign: \"center\",\n color: textColor,\n };\n const iconStyle = [\n styles.icon,\n {\n width: Config.buttonIconSize,\n },\n ];\n if (type === \"standard\" || type === \"outline\") {\n buttonStyle.width = Config.FABSize;\n buttonStyle.height = Config.FABSize;\n buttonStyle.borderRadius = Config.FABBorderRadius;\n contentStyle.push({\n width: Config.FABSize,\n height: Config.FABSize,\n });\n }\n if (type === \"extended\" || type === \"fixed\") {\n iconStyle.push({\n marginLeft: 16,\n marginRight: -8,\n });\n textStyle.margin = 16;\n }\n if (type === \"fixed\") {\n buttonStyles.push({\n height: Config.FABFixedHeight,\n alignSelf: \"stretch\",\n });\n }\n return (React.createElement(Elevation, { style: [{ elevation }, style] },\n React.createElement(Touchable, { ...rest, onPress: onPress, accessibilityState: { disabled }, accessibilityRole: \"button\", disabled: disabled || loading, style: buttonStyles },\n React.createElement(View, { style: styles.content },\n icon && loading !== true ? (React.createElement(View, { style: iconStyle },\n React.createElement(Icon, { name: icon, size: Config.buttonIconSize, color: textColor }))) : null,\n loading ? (React.createElement(ActivityIndicator, { size: \"small\", color: textColor, style: iconStyle })) : null,\n label ? (React.createElement(Text, { numberOfLines: 1, style: [textStyle, typography.button] }, label)) : null))));\n};\nconst styles = StyleSheet.create({\n button: {\n borderStyle: \"solid\",\n },\n content: {\n flexDirection: \"row\",\n alignItems: \"center\",\n justifyContent: \"center\",\n },\n icon: {\n alignItems: \"center\",\n justifyContent: \"center\",\n width: Config.buttonIconSize,\n },\n fixed: {\n left: 0,\n right: 0,\n bottom: 0,\n height: 64,\n borderRadius: 0,\n },\n});\nexport default withTheme(FAB);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;;;;;AACA,MAAMA,GAAG,GAAG,QAAuM;EAAA,IAAtM;IAAEC,IAAF;IAAQC,IAAR;IAAcC,QAAQ,GAAG,KAAzB;IAAgCC,IAAI,GAAG,OAAvC;IAAgDC,OAAO,GAAG,KAA1D;IAAiEC,KAAK,EAAEC,aAAxE;IAAuFC,KAAvF;IAA8FC,OAA9F;IAAuGC,SAAS,GAAG,CAAnH;IAAsHC,KAAtH;IAA6HC,KAAK,EAAE;MAAEC,MAAF;MAAUC,eAAV;MAA2BC,SAA3B;MAAsCC;IAAtC,CAApI;IAAwL,GAAGC;EAA3L,CAAsM;EAC/M,IAAIC,eAAJ,EAAqBC,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EAAEC,eAAA,CAAOC;EAHZ,CATuB;EAc7ByB,KAAK,EAAE;IACHC,IAAI,EAAE,CADH;IAEHC,KAAK,EAAE,CAFJ;IAGHC,MAAM,EAAE,CAHL;IAIH1B,MAAM,EAAE,EAJL;IAKHf,YAAY,EAAE;EALX;AAdsB,CAAlB,CAAf;;eAsBe,IAAA0C,kBAAA,EAAUzE,GAAV,C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["HeaderLarge","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","headline4","strong","withTheme"],"sources":["HeaderLarge.
|
|
1
|
+
{"version":3,"names":["HeaderLarge","Icon","title","buttonText","icon","onPress","style","theme","colors","typography","React","createElement","Header","titleTypeStyle","headline4","titleColor","strong","withTheme"],"sources":["HeaderLarge.js"],"sourcesContent":["import * as React from \"react\";\nimport { withTheme } from \"../theming\";\nimport Header from \"./Header\";\nconst HeaderLarge = ({ Icon, title, buttonText, icon, onPress = () => { }, style, theme: { colors, typography }, }) => {\n return (React.createElement(Header, { Icon: Icon, titleTypeStyle: typography.headline4, titleColor: colors.strong, title: title, buttonText: buttonText, icon: icon, onPress: onPress, style: style }));\n};\nexport default withTheme(HeaderLarge);\n"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;;;;;;;AACA,MAAMA,WAAW,GAAG,QAAmG;EAAA,IAAlG;IAAEC,IAAF;IAAQC,KAAR;IAAeC,UAAf;IAA2BC,IAA3B;IAAiCC,OAAO,GAAG,MAAM,CAAG,CAApD;IAAsDC,KAAtD;IAA6DC,KAAK,EAAE;MAAEC,MAAF;MAAUC;IAAV;EAApE,CAAkG;EACnH,oBAAQC,KAAK,CAACC,aAAN,CAAoBC,eAApB,EAA4B;IAAEX,IAAI,EAAEA,IAAR;IAAcY,cAAc,EAAEJ,UAAU,CAACK,SAAzC;IAAoDC,UAAU,EAAEP,MAAM,CAACQ,MAAvE;IAA+Ed,KAAK,EAAEA,KAAtF;IAA6FC,UAAU,EAAEA,UAAzG;IAAqHC,IAAI,EAAEA,IAA3H;IAAiIC,OAAO,EAAEA,OAA1I;IAAmJC,KAAK,EAAEA;EAA1J,CAA5B,CAAR;AACH,CAFD;;eAGe,IAAAW,kBAAA,EAAUjB,WAAV,C"}
|
|
@@ -66,6 +66,8 @@ const disabledColor = "rgb(240, 240, 240)";
|
|
|
66
66
|
const errorColor = "rgba(255, 69, 100, 1)";
|
|
67
67
|
|
|
68
68
|
const Picker = _ref => {
|
|
69
|
+
var _find$label, _find;
|
|
70
|
+
|
|
69
71
|
let {
|
|
70
72
|
error,
|
|
71
73
|
options = [],
|
|
@@ -157,10 +159,7 @@ const Picker = _ref => {
|
|
|
157
159
|
...extractedMarginStyles
|
|
158
160
|
};
|
|
159
161
|
const stylesWithoutBordersAndMargins = (0, _lodash.omit)(viewStyles, [..._utilities.borderStyleNames, ..._utilities.marginStyleNames, ...additionalBorderStyles, ...additionalMarginStyles]);
|
|
160
|
-
const
|
|
161
|
-
label: null
|
|
162
|
-
};
|
|
163
|
-
const selectedLabel = optionExists && optionExists.label ? optionExists.label : placeholder;
|
|
162
|
+
const selectedLabel = internalValue && ((_find$label = (_find = pickerOptions.find(option => option.value === internalValue)) === null || _find === void 0 ? void 0 : _find.label) !== null && _find$label !== void 0 ? _find$label : internalValue);
|
|
164
163
|
const labelText = label ? /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
165
164
|
style: {
|
|
166
165
|
textAlign: textStyles.textAlign,
|
|
@@ -251,7 +250,7 @@ const Picker = _ref => {
|
|
|
251
250
|
style: styles.primaryTextContainer
|
|
252
251
|
}, labelText, /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
253
252
|
style: primaryTextStyle
|
|
254
|
-
}, String(selectedLabel))), rightIcon)), assistiveTextLabel), isIos && pickerVisible ? /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
253
|
+
}, String(selectedLabel !== null && selectedLabel !== void 0 ? selectedLabel : placeholder))), rightIcon)), assistiveTextLabel), isIos && pickerVisible ? /*#__PURE__*/React.createElement(_Portal.default, null, /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
255
254
|
style: [styles.iosPicker, {
|
|
256
255
|
backgroundColor: colors.divider
|
|
257
256
|
}]
|