@draftbit/core 50.1.2 → 50.1.3-13d35c.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/Provider.js +1 -1
- package/lib/commonjs/components/AccordionGroup.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Button.js +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +1 -1
- package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +1 -1
- package/lib/commonjs/components/Divider.js +1 -1
- package/lib/commonjs/components/Elevation.js +1 -1
- package/lib/commonjs/components/IconButton.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/index.js +1 -1
- package/lib/commonjs/components/Picker/NativePicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/DropDownModalPicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/DropDownPicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/lib/commonjs/components/Picker/index.js +1 -1
- package/lib/commonjs/components/PinInput/PinInput.js +1 -1
- package/lib/commonjs/components/PinInput/PinInputText.js +1 -1
- package/lib/commonjs/components/Portal/Portal.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/index.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/index.js +1 -1
- package/lib/commonjs/components/ProgressIndicator.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/Row.js +1 -1
- package/lib/commonjs/components/ScreenContainer.js +1 -1
- package/lib/commonjs/components/SectionList/SectionHeader.js +1 -1
- package/lib/commonjs/components/Slider.js +1 -1
- package/lib/commonjs/components/StarRating.js +1 -1
- package/lib/commonjs/components/Stepper.js +1 -1
- package/lib/commonjs/components/Surface.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableItem.js +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +1 -1
- package/lib/commonjs/components/Switch.js +1 -1
- package/lib/commonjs/components/TabView/TabView.js +1 -1
- package/lib/commonjs/components/Table/Table.js +1 -1
- package/lib/commonjs/components/Table/TableRow.js +1 -1
- package/lib/commonjs/components/Text.js +1 -1
- package/lib/commonjs/components/TextField.js +1 -1
- package/lib/commonjs/components/TextInput.js +1 -1
- package/lib/commonjs/components/Typography.js +1 -1
- package/lib/commonjs/deprecated-components/AccordionItem.js +1 -1
- package/lib/commonjs/deprecated-components/AvatarEdit.js +1 -1
- package/lib/commonjs/deprecated-components/Banner.js +1 -1
- package/lib/commonjs/deprecated-components/Card.js +1 -1
- package/lib/commonjs/deprecated-components/Container.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedButton.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedFAB.js +1 -1
- package/lib/commonjs/deprecated-components/FAB.js +1 -1
- package/lib/commonjs/deprecated-components/FieldSearchBarFull.js +1 -1
- package/lib/commonjs/deprecated-components/ProgressCircle.js +1 -1
- package/lib/commonjs/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/lib/commonjs/deprecated-components/RowBodyIcon.js +1 -1
- package/lib/commonjs/deprecated-components/RowHeadlineImageCaption.js +1 -1
- package/lib/commonjs/deprecated-components/RowHeadlineImageIcon.js +1 -1
- package/lib/commonjs/deprecated-components/ToggleButton.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/typescript/src/Provider.d.ts +7 -5
- package/lib/typescript/src/Provider.js +4 -4
- package/lib/typescript/src/Provider.js.map +1 -1
- package/lib/typescript/src/components/AccordionGroup.d.ts +3 -5
- package/lib/typescript/src/components/AccordionGroup.js +3 -3
- package/lib/typescript/src/components/AccordionGroup.js.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +3 -5
- package/lib/typescript/src/components/BottomSheet/BottomSheet.js +4 -4
- package/lib/typescript/src/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/typescript/src/components/Button.js +8 -6
- package/lib/typescript/src/components/Button.js.map +1 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.js +3 -3
- package/lib/typescript/src/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts +4 -2
- package/lib/typescript/src/components/Checkbox/CheckboxRow.js +4 -3
- package/lib/typescript/src/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +3 -5
- package/lib/typescript/src/components/DatePicker/DatePicker.js +24 -23
- package/lib/typescript/src/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts +4 -12654
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js +8 -6
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts +2 -2
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +3 -5
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
- package/lib/typescript/src/components/Divider.d.ts +3 -5
- package/lib/typescript/src/components/Divider.js +2 -2
- package/lib/typescript/src/components/Divider.js.map +1 -1
- package/lib/typescript/src/components/Elevation.d.ts +3 -5
- package/lib/typescript/src/components/Elevation.js +3 -4
- package/lib/typescript/src/components/Elevation.js.map +1 -1
- package/lib/typescript/src/components/FormRow.d.ts +1 -2
- package/lib/typescript/src/components/FormRow.js.map +1 -1
- package/lib/typescript/src/components/IconButton.d.ts +3 -5
- package/lib/typescript/src/components/IconButton.js +2 -2
- package/lib/typescript/src/components/IconButton.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.d.ts +0 -2
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.d.ts +5 -4
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +10 -13
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.d.ts +2 -4
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js +1 -3
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
- package/lib/typescript/src/components/Picker/NativePicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/NativePicker.js +5 -2
- package/lib/typescript/src/components/Picker/NativePicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerCommon.d.ts +2 -2
- package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.js +2 -2
- package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.js +2 -2
- package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/index.d.ts +1 -3
- package/lib/typescript/src/components/Picker/index.js +1 -1
- package/lib/typescript/src/components/Picker/index.js.map +1 -1
- package/lib/typescript/src/components/PinInput/PinInput.d.ts +3 -5
- package/lib/typescript/src/components/PinInput/PinInput.js +4 -4
- package/lib/typescript/src/components/PinInput/PinInput.js.map +1 -1
- package/lib/typescript/src/components/PinInput/PinInputText.d.ts +3 -5
- package/lib/typescript/src/components/PinInput/PinInputText.js +2 -2
- package/lib/typescript/src/components/PinInput/PinInputText.js.map +1 -1
- package/lib/typescript/src/components/Portal/Portal.d.ts +1 -9
- package/lib/typescript/src/components/Portal/Portal.js +3 -5
- package/lib/typescript/src/components/Portal/Portal.js.map +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/index.d.ts +1 -3
- package/lib/typescript/src/components/Progress/CircularProgress/index.js +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/index.js.map +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/index.d.ts +1 -3
- package/lib/typescript/src/components/Progress/LinearProgress/index.js +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/index.js.map +1 -1
- package/lib/typescript/src/components/Progress/ProgressCommon.d.ts +2 -2
- package/lib/typescript/src/components/ProgressIndicator.d.ts +10 -13
- package/lib/typescript/src/components/ProgressIndicator.js +1 -1
- package/lib/typescript/src/components/ProgressIndicator.js.map +1 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +2 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.d.ts +4 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.js +4 -3
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/typescript/src/components/Row.d.ts +3 -5
- package/lib/typescript/src/components/Row.js +1 -1
- package/lib/typescript/src/components/Row.js.map +1 -1
- package/lib/typescript/src/components/ScreenContainer.d.ts +3 -6
- package/lib/typescript/src/components/ScreenContainer.js +2 -2
- package/lib/typescript/src/components/ScreenContainer.js.map +1 -1
- package/lib/typescript/src/components/SectionList/SectionHeader.d.ts +3 -5
- package/lib/typescript/src/components/SectionList/SectionHeader.js +3 -3
- package/lib/typescript/src/components/SectionList/SectionHeader.js.map +1 -1
- package/lib/typescript/src/components/Slider.d.ts +3 -6
- package/lib/typescript/src/components/Slider.js +6 -6
- package/lib/typescript/src/components/Slider.js.map +1 -1
- package/lib/typescript/src/components/StarRating.d.ts +3 -5
- package/lib/typescript/src/components/StarRating.js +1 -1
- package/lib/typescript/src/components/StarRating.js.map +1 -1
- package/lib/typescript/src/components/Stepper.d.ts +3 -5
- package/lib/typescript/src/components/Stepper.js +3 -2
- package/lib/typescript/src/components/Stepper.js.map +1 -1
- package/lib/typescript/src/components/Surface.d.ts +3 -5
- package/lib/typescript/src/components/Surface.js +3 -10
- package/lib/typescript/src/components/Surface.js.map +1 -1
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.d.ts +3 -5
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js +10 -5
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +4 -2
- package/lib/typescript/src/components/Swiper/Swiper.js +3 -2
- package/lib/typescript/src/components/Swiper/Swiper.js.map +1 -1
- package/lib/typescript/src/components/Switch.d.ts +7 -24
- package/lib/typescript/src/components/Switch.js +3 -4
- package/lib/typescript/src/components/Switch.js.map +1 -1
- package/lib/typescript/src/components/TabView/TabView.d.ts +3 -5
- package/lib/typescript/src/components/TabView/TabView.js +4 -4
- package/lib/typescript/src/components/TabView/TabView.js.map +1 -1
- package/lib/typescript/src/components/Table/Table.d.ts +3 -5
- package/lib/typescript/src/components/Table/Table.js +2 -2
- package/lib/typescript/src/components/Table/Table.js.map +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts +3 -5
- package/lib/typescript/src/components/Table/TableRow.js +4 -2
- package/lib/typescript/src/components/Table/TableRow.js.map +1 -1
- package/lib/typescript/src/components/Text.d.ts +3 -9
- package/lib/typescript/src/components/Text.js +2 -2
- package/lib/typescript/src/components/Text.js.map +1 -1
- package/lib/typescript/src/components/TextField.d.ts +4 -41
- package/lib/typescript/src/components/TextField.js +22 -20
- package/lib/typescript/src/components/TextField.js.map +1 -1
- package/lib/typescript/src/components/TextInput.js +3 -0
- package/lib/typescript/src/components/TextInput.js.map +1 -1
- package/lib/typescript/src/components/Typography.d.ts +5 -11
- package/lib/typescript/src/components/Typography.js +4 -4
- package/lib/typescript/src/components/Typography.js.map +1 -1
- package/lib/typescript/src/deprecated-components/AccordionItem.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/AccordionItem.js +2 -2
- package/lib/typescript/src/deprecated-components/AccordionItem.js.map +1 -1
- package/lib/typescript/src/deprecated-components/AvatarEdit.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/AvatarEdit.js +4 -4
- package/lib/typescript/src/deprecated-components/AvatarEdit.js.map +1 -1
- package/lib/typescript/src/deprecated-components/Banner.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/Banner.js +4 -5
- package/lib/typescript/src/deprecated-components/Banner.js.map +1 -1
- package/lib/typescript/src/deprecated-components/Card.d.ts +6 -18
- package/lib/typescript/src/deprecated-components/Card.js +3 -3
- package/lib/typescript/src/deprecated-components/Card.js.map +1 -1
- package/lib/typescript/src/deprecated-components/CheckboxGroup.d.ts +2 -2
- package/lib/typescript/src/deprecated-components/Container.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/Container.js +1 -1
- package/lib/typescript/src/deprecated-components/Container.js.map +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedButton.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/DeprecatedButton.js +8 -8
- package/lib/typescript/src/deprecated-components/DeprecatedButton.js.map +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedFAB.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/DeprecatedFAB.js +8 -8
- package/lib/typescript/src/deprecated-components/DeprecatedFAB.js.map +1 -1
- package/lib/typescript/src/deprecated-components/FAB.d.ts +3 -8
- package/lib/typescript/src/deprecated-components/FAB.js +2 -2
- package/lib/typescript/src/deprecated-components/FAB.js.map +1 -1
- package/lib/typescript/src/deprecated-components/FieldSearchBarFull.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/FieldSearchBarFull.js +4 -4
- package/lib/typescript/src/deprecated-components/FieldSearchBarFull.js.map +1 -1
- package/lib/typescript/src/deprecated-components/ProgressCircle.d.ts +5 -8
- package/lib/typescript/src/deprecated-components/ProgressCircle.js +3 -3
- package/lib/typescript/src/deprecated-components/ProgressCircle.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.d.ts +1 -3
- package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RowBodyIcon.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/RowBodyIcon.js +2 -2
- package/lib/typescript/src/deprecated-components/RowBodyIcon.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.js +3 -3
- package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.js +3 -3
- package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/typescript/src/deprecated-components/ToggleButton.d.ts +6 -9
- package/lib/typescript/src/deprecated-components/ToggleButton.js +5 -5
- package/lib/typescript/src/deprecated-components/ToggleButton.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -2
- package/lib/typescript/src/index.js +0 -2
- package/lib/typescript/src/index.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/Provider.js +4 -4
- package/src/Provider.js.map +1 -1
- package/src/Provider.tsx +15 -12
- package/src/components/AccordionGroup.js +3 -3
- package/src/components/AccordionGroup.js.map +1 -1
- package/src/components/AccordionGroup.tsx +5 -5
- package/src/components/BottomSheet/BottomSheet.js +4 -4
- package/src/components/BottomSheet/BottomSheet.js.map +1 -1
- package/src/components/BottomSheet/BottomSheet.tsx +7 -7
- package/src/components/Button.js +8 -6
- package/src/components/Button.js.map +1 -1
- package/src/components/Button.tsx +10 -10
- package/src/components/Checkbox/Checkbox.js +3 -3
- package/src/components/Checkbox/Checkbox.js.map +1 -1
- package/src/components/Checkbox/Checkbox.tsx +3 -3
- package/src/components/Checkbox/CheckboxRow.js +4 -3
- package/src/components/Checkbox/CheckboxRow.js.map +1 -1
- package/src/components/Checkbox/CheckboxRow.tsx +9 -2
- package/src/components/DatePicker/DatePicker.js +24 -23
- package/src/components/DatePicker/DatePicker.js.map +1 -1
- package/src/components/DatePicker/DatePicker.tsx +25 -24
- package/src/components/DatePicker/DatePickerComponent.web.js +8 -6
- package/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/src/components/DatePicker/DatePickerComponent.web.tsx +15 -8
- package/src/components/DatePicker/DatePickerComponentType.ts +2 -3
- package/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
- package/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
- package/src/components/DeckSwiper/DeckSwiperCard.tsx +5 -5
- package/src/components/Divider.js +2 -2
- package/src/components/Divider.js.map +1 -1
- package/src/components/Divider.tsx +4 -4
- package/src/components/Elevation.js +3 -4
- package/src/components/Elevation.js.map +1 -1
- package/src/components/Elevation.tsx +5 -6
- package/src/components/FormRow.js.map +1 -1
- package/src/components/FormRow.tsx +1 -2
- package/src/components/IconButton.js +2 -2
- package/src/components/IconButton.js.map +1 -1
- package/src/components/IconButton.tsx +4 -4
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts +0 -2
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +10 -13
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx +19 -19
- package/src/components/MediaPlayer/AudioPlayer/index.js +1 -3
- package/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
- package/src/components/MediaPlayer/AudioPlayer/index.tsx +1 -3
- package/src/components/Picker/NativePicker.js +5 -2
- package/src/components/Picker/NativePicker.js.map +1 -1
- package/src/components/Picker/NativePicker.tsx +5 -2
- package/src/components/Picker/PickerCommon.ts +2 -2
- package/src/components/Picker/dropdown/DropDownModalPicker.js +2 -2
- package/src/components/Picker/dropdown/DropDownModalPicker.js.map +1 -1
- package/src/components/Picker/dropdown/DropDownModalPicker.tsx +5 -5
- package/src/components/Picker/dropdown/DropDownPicker.js +2 -2
- package/src/components/Picker/dropdown/DropDownPicker.js.map +1 -1
- package/src/components/Picker/dropdown/DropDownPicker.tsx +5 -5
- package/src/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/src/components/Picker/dropdown/MultiSelectPicker.js.map +1 -1
- package/src/components/Picker/dropdown/MultiSelectPicker.tsx +1 -1
- package/src/components/Picker/index.js +1 -1
- package/src/components/Picker/index.js.map +1 -1
- package/src/components/Picker/index.tsx +1 -1
- package/src/components/PinInput/PinInput.js +4 -4
- package/src/components/PinInput/PinInput.js.map +1 -1
- package/src/components/PinInput/PinInput.tsx +6 -6
- package/src/components/PinInput/PinInputText.js +2 -2
- package/src/components/PinInput/PinInputText.js.map +1 -1
- package/src/components/PinInput/PinInputText.tsx +4 -4
- package/src/components/Portal/Portal.js +3 -5
- package/src/components/Portal/Portal.js.map +1 -1
- package/src/components/Portal/Portal.tsx +3 -10
- package/src/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
- package/src/components/Progress/CircularProgress/CircularProgress.tsx +2 -2
- package/src/components/Progress/CircularProgress/index.js +1 -1
- package/src/components/Progress/CircularProgress/index.js.map +1 -1
- package/src/components/Progress/CircularProgress/index.tsx +1 -1
- package/src/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
- package/src/components/Progress/LinearProgress/LinearProgress.tsx +2 -2
- package/src/components/Progress/LinearProgress/index.js +1 -1
- package/src/components/Progress/LinearProgress/index.js.map +1 -1
- package/src/components/Progress/LinearProgress/index.tsx +1 -1
- package/src/components/Progress/ProgressCommon.ts +2 -2
- package/src/components/ProgressIndicator.js +1 -1
- package/src/components/ProgressIndicator.js.map +1 -1
- package/src/components/ProgressIndicator.tsx +10 -11
- package/src/components/RadioButton/RadioButtonGroup.tsx +2 -2
- package/src/components/RadioButton/RadioButtonRow.js +4 -3
- package/src/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/src/components/RadioButton/RadioButtonRow.tsx +9 -2
- package/src/components/Row.js +1 -1
- package/src/components/Row.js.map +1 -1
- package/src/components/Row.tsx +3 -3
- package/src/components/ScreenContainer.js +2 -2
- package/src/components/ScreenContainer.js.map +1 -1
- package/src/components/ScreenContainer.tsx +4 -4
- package/src/components/SectionList/SectionHeader.js +3 -3
- package/src/components/SectionList/SectionHeader.js.map +1 -1
- package/src/components/SectionList/SectionHeader.tsx +5 -5
- package/src/components/Slider.js +6 -6
- package/src/components/Slider.js.map +1 -1
- package/src/components/Slider.tsx +8 -8
- package/src/components/StarRating.js +1 -1
- package/src/components/StarRating.js.map +1 -1
- package/src/components/StarRating.tsx +3 -3
- package/src/components/Stepper.js +3 -2
- package/src/components/Stepper.js.map +1 -1
- package/src/components/Stepper.tsx +5 -4
- package/src/components/Surface.js +3 -10
- package/src/components/Surface.js.map +1 -1
- package/src/components/Surface.tsx +5 -12
- package/src/components/SwipeableItem/SwipeableItem.js +10 -5
- package/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/src/components/SwipeableItem/SwipeableItem.tsx +13 -7
- package/src/components/Swiper/Swiper.js +3 -2
- package/src/components/Swiper/Swiper.js.map +1 -1
- package/src/components/Swiper/Swiper.tsx +6 -3
- package/src/components/Switch.js +3 -4
- package/src/components/Switch.js.map +1 -1
- package/src/components/Switch.tsx +7 -7
- package/src/components/TabView/TabView.js +4 -4
- package/src/components/TabView/TabView.js.map +1 -1
- package/src/components/TabView/TabView.tsx +7 -7
- package/src/components/Table/Table.js +2 -2
- package/src/components/Table/Table.js.map +1 -1
- package/src/components/Table/Table.tsx +4 -4
- package/src/components/Table/TableRow.js +4 -2
- package/src/components/Table/TableRow.js.map +1 -1
- package/src/components/Table/TableRow.tsx +6 -4
- package/src/components/Text.js +2 -2
- package/src/components/Text.js.map +1 -1
- package/src/components/Text.tsx +4 -4
- package/src/components/TextField.js +22 -20
- package/src/components/TextField.js.map +1 -1
- package/src/components/TextField.tsx +26 -23
- package/src/components/TextInput.js +3 -0
- package/src/components/TextInput.js.map +1 -1
- package/src/components/TextInput.tsx +3 -0
- package/src/components/Typography.js +4 -4
- package/src/components/Typography.js.map +1 -1
- package/src/components/Typography.tsx +6 -6
- package/src/deprecated-components/AccordionItem.js +2 -2
- package/src/deprecated-components/AccordionItem.js.map +1 -1
- package/src/deprecated-components/AccordionItem.tsx +4 -4
- package/src/deprecated-components/AvatarEdit.js +4 -4
- package/src/deprecated-components/AvatarEdit.js.map +1 -1
- package/src/deprecated-components/AvatarEdit.tsx +6 -6
- package/src/deprecated-components/Banner.js +4 -5
- package/src/deprecated-components/Banner.js.map +1 -1
- package/src/deprecated-components/Banner.tsx +6 -10
- package/src/deprecated-components/Card.js +3 -3
- package/src/deprecated-components/Card.js.map +1 -1
- package/src/deprecated-components/Card.tsx +10 -6
- package/src/deprecated-components/CheckboxGroup.tsx +2 -2
- package/src/deprecated-components/Container.js +1 -1
- package/src/deprecated-components/Container.js.map +1 -1
- package/src/deprecated-components/Container.tsx +3 -3
- package/src/deprecated-components/DeprecatedButton.js +8 -8
- package/src/deprecated-components/DeprecatedButton.js.map +1 -1
- package/src/deprecated-components/DeprecatedButton.tsx +10 -10
- package/src/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/src/deprecated-components/DeprecatedCardWrapper.js.map +1 -1
- package/src/deprecated-components/DeprecatedCardWrapper.tsx +3 -3
- package/src/deprecated-components/DeprecatedFAB.js +8 -8
- package/src/deprecated-components/DeprecatedFAB.js.map +1 -1
- package/src/deprecated-components/DeprecatedFAB.tsx +10 -10
- package/src/deprecated-components/FAB.js +2 -2
- package/src/deprecated-components/FAB.js.map +1 -1
- package/src/deprecated-components/FAB.tsx +4 -4
- package/src/deprecated-components/FieldSearchBarFull.js +4 -4
- package/src/deprecated-components/FieldSearchBarFull.js.map +1 -1
- package/src/deprecated-components/FieldSearchBarFull.tsx +6 -6
- package/src/deprecated-components/ProgressCircle.js +3 -3
- package/src/deprecated-components/ProgressCircle.js.map +1 -1
- package/src/deprecated-components/ProgressCircle.tsx +7 -8
- package/src/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/src/deprecated-components/RadioButtonFieldGroup.js.map +1 -1
- package/src/deprecated-components/RadioButtonFieldGroup.tsx +1 -1
- package/src/deprecated-components/RowBodyIcon.js +2 -2
- package/src/deprecated-components/RowBodyIcon.js.map +1 -1
- package/src/deprecated-components/RowBodyIcon.tsx +6 -6
- package/src/deprecated-components/RowHeadlineImageCaption.js +3 -3
- package/src/deprecated-components/RowHeadlineImageCaption.js.map +1 -1
- package/src/deprecated-components/RowHeadlineImageCaption.tsx +6 -6
- package/src/deprecated-components/RowHeadlineImageIcon.js +3 -3
- package/src/deprecated-components/RowHeadlineImageIcon.js.map +1 -1
- package/src/deprecated-components/RowHeadlineImageIcon.tsx +6 -6
- package/src/deprecated-components/ToggleButton.js +5 -5
- package/src/deprecated-components/ToggleButton.js.map +1 -1
- package/src/deprecated-components/ToggleButton.tsx +12 -11
- package/src/index.js +0 -2
- package/src/index.js.map +1 -1
- package/src/index.tsx +0 -2
- package/lib/commonjs/styles/DarkTheme.js +0 -1
- package/lib/commonjs/styles/DefaultTheme.js +0 -1
- package/lib/commonjs/styles/fonts.js +0 -1
- package/lib/commonjs/styles/overlay.js +0 -1
- package/lib/commonjs/styles/shadow.js +0 -1
- package/lib/commonjs/theming.js +0 -1
- package/lib/typescript/src/styles/DarkTheme.d.ts +0 -3
- package/lib/typescript/src/styles/DarkTheme.js +0 -27
- package/lib/typescript/src/styles/DarkTheme.js.map +0 -1
- package/lib/typescript/src/styles/DefaultTheme.d.ts +0 -4218
- package/lib/typescript/src/styles/DefaultTheme.js +0 -112
- package/lib/typescript/src/styles/DefaultTheme.js.map +0 -1
- package/lib/typescript/src/styles/fonts.d.ts +0 -5
- package/lib/typescript/src/styles/fonts.js +0 -63
- package/lib/typescript/src/styles/fonts.js.map +0 -1
- package/lib/typescript/src/styles/overlay.d.ts +0 -2
- package/lib/typescript/src/styles/overlay.js +0 -61
- package/lib/typescript/src/styles/overlay.js.map +0 -1
- package/lib/typescript/src/styles/shadow.d.ts +0 -23
- package/lib/typescript/src/styles/shadow.js +0 -52
- package/lib/typescript/src/styles/shadow.js.map +0 -1
- package/lib/typescript/src/theming.d.ts +0 -8
- package/lib/typescript/src/theming.js +0 -4
- package/lib/typescript/src/theming.js.map +0 -1
- package/src/styles/DarkTheme.js +0 -27
- package/src/styles/DarkTheme.js.map +0 -1
- package/src/styles/DarkTheme.tsx +0 -30
- package/src/styles/DefaultTheme.js +0 -112
- package/src/styles/DefaultTheme.js.map +0 -1
- package/src/styles/DefaultTheme.tsx +0 -114
- package/src/styles/fonts.js +0 -63
- package/src/styles/fonts.js.map +0 -1
- package/src/styles/fonts.tsx +0 -67
- package/src/styles/overlay.js +0 -61
- package/src/styles/overlay.js.map +0 -1
- package/src/styles/overlay.tsx +0 -69
- package/src/styles/shadow.js +0 -52
- package/src/styles/shadow.js.map +0 -1
- package/src/styles/shadow.tsx +0 -55
- package/src/theming.js +0 -4
- package/src/theming.js.map +0 -1
- package/src/theming.tsx +0 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@draftbit/core",
|
|
3
|
-
"version": "50.1.2",
|
|
3
|
+
"version": "50.1.3-13d35c.2+13d35cc",
|
|
4
4
|
"description": "Core (non-native) Components",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"types": "lib/typescript/src/index.d.ts",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@date-io/date-fns": "^1.3.13",
|
|
43
43
|
"@draftbit/react-theme-provider": "^2.1.1",
|
|
44
|
-
"@draftbit/
|
|
44
|
+
"@draftbit/theme": "^50.1.3-13d35c.2+13d35cc",
|
|
45
45
|
"@expo/vector-icons": "^14.0.0",
|
|
46
46
|
"@gorhom/bottom-sheet": "5.0.0-alpha.7",
|
|
47
47
|
"@material-ui/core": "^4.11.0",
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@react-native-community/slider": "4.4.2",
|
|
50
50
|
"@react-native-picker/picker": "2.6.1",
|
|
51
51
|
"@shopify/flash-list": "1.6.3",
|
|
52
|
-
"color": "^
|
|
52
|
+
"color": "^4.2.3",
|
|
53
53
|
"date-fns": "^2.16.1",
|
|
54
54
|
"dateformat": "^3.0.3",
|
|
55
55
|
"expo-av": "~13.10.6",
|
|
@@ -71,8 +71,8 @@
|
|
|
71
71
|
"react-native-svg": "14.1.0",
|
|
72
72
|
"react-native-swipe-list-view": "^3.2.9",
|
|
73
73
|
"react-native-tab-view": "^3.4.0",
|
|
74
|
-
"react-native-typography": "^1.4.1",
|
|
75
74
|
"react-native-web-swiper": "^2.2.3",
|
|
75
|
+
"react-native-webview": "13.6.4",
|
|
76
76
|
"react-native-youtube-iframe": "^2.2.2",
|
|
77
77
|
"react-youtube": "^10.1.0",
|
|
78
78
|
"uuid": "^9.0.1"
|
|
@@ -117,5 +117,5 @@
|
|
|
117
117
|
],
|
|
118
118
|
"testEnvironment": "node"
|
|
119
119
|
},
|
|
120
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "13d35cc5e2cbf62cb9b6ab52fc935f43bc34ebc4"
|
|
121
121
|
}
|
package/src/Provider.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ThemeProvider } from "./theming";
|
|
1
|
+
import React from "react";
|
|
3
2
|
import PortalHost from "./components/Portal/PortalHost";
|
|
3
|
+
import { ThemeProvider } from "@draftbit/theme";
|
|
4
4
|
export default class Provider extends React.Component {
|
|
5
5
|
render() {
|
|
6
|
-
return (React.createElement(
|
|
7
|
-
React.createElement(
|
|
6
|
+
return (React.createElement(ThemeProvider, { themes: this.props.themes, breakpoints: this.props.breakpoints, initialThemeName: this.props.initialThemeName },
|
|
7
|
+
React.createElement(PortalHost, null, this.props.children)));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=Provider.js.map
|
package/src/Provider.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAExD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAShD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAwB;IAClE,MAAM;QACJ,OAAO,CACL,oBAAC,aAAa,IACZ,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,MAAM,EACzB,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,WAAW,EACnC,gBAAgB,EAAE,IAAI,CAAC,KAAK,CAAC,gBAAgB;YAE7C,oBAAC,UAAU,QAAE,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAc,CAChC,CACjB,CAAC;IACJ,CAAC;CACF"}
|
package/src/Provider.tsx
CHANGED
|
@@ -1,22 +1,25 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { ThemeProvider } from "./theming";
|
|
1
|
+
import React from "react";
|
|
3
2
|
import PortalHost from "./components/Portal/PortalHost";
|
|
4
|
-
import {
|
|
3
|
+
import type { ValidatedTheme, Breakpoints } from "@draftbit/theme";
|
|
4
|
+
import { ThemeProvider } from "@draftbit/theme";
|
|
5
5
|
|
|
6
|
-
type
|
|
6
|
+
type ProviderProps = {
|
|
7
|
+
themes: ValidatedTheme[];
|
|
8
|
+
breakpoints: Breakpoints;
|
|
9
|
+
initialThemeName: string;
|
|
7
10
|
children: React.ReactNode;
|
|
8
|
-
theme?: Theme;
|
|
9
11
|
};
|
|
10
12
|
|
|
11
|
-
export default class Provider extends React.Component<
|
|
13
|
+
export default class Provider extends React.Component<ProviderProps> {
|
|
12
14
|
render() {
|
|
13
15
|
return (
|
|
14
|
-
<
|
|
15
|
-
{
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
16
|
+
<ThemeProvider
|
|
17
|
+
themes={this.props.themes}
|
|
18
|
+
breakpoints={this.props.breakpoints}
|
|
19
|
+
initialThemeName={this.props.initialThemeName}
|
|
20
|
+
>
|
|
21
|
+
<PortalHost>{this.props.children}</PortalHost>
|
|
22
|
+
</ThemeProvider>
|
|
20
23
|
);
|
|
21
24
|
}
|
|
22
25
|
}
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, Pressable, } from "react-native";
|
|
3
3
|
import Text from "./Text";
|
|
4
|
-
import { withTheme } from "
|
|
4
|
+
import { withTheme } from "@draftbit/theme";
|
|
5
5
|
import { extractStyles } from "../utilities";
|
|
6
6
|
const AccordionGroup = ({ label, expanded: expandedProp = false, openColor, closedColor, caretColor: caretColorProp, caretSize = 24, icon, iconSize = 24, style, children, theme, Icon, }) => {
|
|
7
7
|
const [expanded, setExpanded] = React.useState(expandedProp);
|
|
8
8
|
const { textStyles, viewStyles } = extractStyles(style);
|
|
9
|
-
const expandedColor = openColor || theme.colors.primary;
|
|
10
|
-
const collapsedColor = closedColor || theme.colors.primary;
|
|
9
|
+
const expandedColor = openColor || theme.colors.branding.primary;
|
|
10
|
+
const collapsedColor = closedColor || theme.colors.branding.primary;
|
|
11
11
|
const labelColor = expanded ? expandedColor : collapsedColor;
|
|
12
12
|
const caretColor = caretColorProp || labelColor;
|
|
13
13
|
const handlePressAction = () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccordionGroup.js","sourceRoot":"","sources":["AccordionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,UAAU,EAGV,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"AccordionGroup.js","sourceRoot":"","sources":["AccordionGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,UAAU,EAGV,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAG5C,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAgB7C,MAAM,cAAc,GAAG,CAAC,EACtB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ACjB,KAAK,EAAE;wBACL,UAAU;wBACV;4BACE,KAAK,EAAE,UAAU;yBAClB;qBACF,IAEA,KAAK,CACD,CACF;YACP,oBAAC,IAAI,IACH,IAAI,EACF,QAAQ;oBACN,CAAC,CAAC,iCAAiC;oBACnC,CAAC,CAAC,mCAAmC,EAEzC,KAAK,EAAE,UAAU,EACjB,IAAI,EAAE,SAAS,GACf,CACQ;QACX,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAC1B,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,GAAG,EAAE;QACH,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;KACrB;IACD,OAAO,EAAE;QACP,IAAI,EAAE,CAAC;QACP,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,WAAW,EAAE,CAAC;KACf;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -7,9 +7,9 @@ import {
|
|
|
7
7
|
Pressable,
|
|
8
8
|
} from "react-native";
|
|
9
9
|
import Text from "./Text";
|
|
10
|
-
import { withTheme } from "
|
|
10
|
+
import { withTheme } from "@draftbit/theme";
|
|
11
11
|
import type { IconSlot } from "../interfaces/Icon";
|
|
12
|
-
import type {
|
|
12
|
+
import type { ReadTheme } from "@draftbit/theme";
|
|
13
13
|
import { extractStyles } from "../utilities";
|
|
14
14
|
|
|
15
15
|
type AccordionGroupProps = {
|
|
@@ -23,7 +23,7 @@ type AccordionGroupProps = {
|
|
|
23
23
|
iconSize?: number;
|
|
24
24
|
style?: StyleProp<TextStyle>;
|
|
25
25
|
children?: React.ReactNode;
|
|
26
|
-
theme:
|
|
26
|
+
theme: ReadTheme;
|
|
27
27
|
} & IconSlot;
|
|
28
28
|
|
|
29
29
|
const AccordionGroup = ({
|
|
@@ -42,8 +42,8 @@ const AccordionGroup = ({
|
|
|
42
42
|
}: AccordionGroupProps) => {
|
|
43
43
|
const [expanded, setExpanded] = React.useState<boolean>(expandedProp);
|
|
44
44
|
const { textStyles, viewStyles } = extractStyles(style);
|
|
45
|
-
const expandedColor = openColor || theme.colors.primary;
|
|
46
|
-
const collapsedColor = closedColor || theme.colors.primary;
|
|
45
|
+
const expandedColor = openColor || theme.colors.branding.primary;
|
|
46
|
+
const collapsedColor = closedColor || theme.colors.branding.primary;
|
|
47
47
|
const labelColor = expanded ? expandedColor : collapsedColor;
|
|
48
48
|
const caretColor = caretColorProp || labelColor;
|
|
49
49
|
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyleSheet, Dimensions, } from "react-native";
|
|
3
3
|
import BottomSheetComponent, { BottomSheetScrollView, } from "@gorhom/bottom-sheet";
|
|
4
|
-
import { withTheme } from "
|
|
4
|
+
import { withTheme } from "@draftbit/theme";
|
|
5
5
|
import { useDeepCompareMemo } from "../../utilities";
|
|
6
6
|
const windowHeight = Dimensions.get("window").height;
|
|
7
7
|
// Clarification:
|
|
8
8
|
// Input of snap points is sorted top -> bottom where each value represents distance from top
|
|
9
9
|
// Implementation using `@gorhom/bottom-sheet` is sorted bottom -> top where each value represents distance from bottom
|
|
10
|
-
const BottomSheet = React.forwardRef(({ theme, snapPoints: snapPointsProp, topSnapPosition = "10%", middleSnapPosition = "50%", bottomSnapPosition = "80%", initialSnapIndex, initialSnapPosition = "bottom", showHandle = true, handleColor = theme.colors.
|
|
11
|
-
const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
|
|
10
|
+
const BottomSheet = React.forwardRef(({ theme, snapPoints: snapPointsProp, topSnapPosition = "10%", middleSnapPosition = "50%", bottomSnapPosition = "80%", initialSnapIndex, initialSnapPosition = "bottom", showHandle = true, handleColor = theme.colors.border.brand, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.border.brand, onSettle, style, children, ...rest }, ref) => {
|
|
11
|
+
const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background.brand;
|
|
12
12
|
const snapPoints = snapPointsProp !== null && snapPointsProp !== void 0 ? snapPointsProp : [
|
|
13
13
|
topSnapPosition,
|
|
14
14
|
middleSnapPosition,
|
|
@@ -25,7 +25,7 @@ const BottomSheet = React.forwardRef(({ theme, snapPoints: snapPointsProp, topSn
|
|
|
25
25
|
return 2;
|
|
26
26
|
}
|
|
27
27
|
};
|
|
28
|
-
return (React.createElement(BottomSheetComponent, { ref: ref, snapPoints: mappedSnapPoints, index: initialSnapIndex
|
|
28
|
+
return (React.createElement(BottomSheetComponent, { ref: ref, snapPoints: mappedSnapPoints, index: initialSnapIndex !== undefined
|
|
29
29
|
? mappedSnapPoints.length - initialSnapIndex - 1
|
|
30
30
|
: getSnapIndexFromPosition(initialSnapPosition), handleIndicatorStyle: [
|
|
31
31
|
{ backgroundColor: handleColor },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAIV,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,oBAAoB,EAAE,EAC3B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"BottomSheet.js","sourceRoot":"","sources":["BottomSheet.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAIV,UAAU,GACX,MAAM,cAAc,CAAC;AAEtB,OAAO,oBAAoB,EAAE,EAC3B,qBAAqB,GACtB,MAAM,sBAAsB,CAAC;AAE9B,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD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OAAO,YAAY,GAAG,KAAK,CAAC;SAC7B;aAAM;YACL,OAAO,KAAK,CAAC;SACd;IACH,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oBAAoB,CAAC,aAAqB;IACjD,MAAM,YAAY,GAAG,SAAS,CAAC;IAC/B,MAAM,OAAO,GAAG,aAAa,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC;IAClD,IAAI,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,MAAM,EAAE;QACnB,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;QACzC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,EAAE;YACzB,OAAO,aAAa,CAAC;SACtB;KACF;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,qBAAqB,EAAE;QACrB,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -10,8 +10,8 @@ import {
|
|
|
10
10
|
import BottomSheetComponent, {
|
|
11
11
|
BottomSheetScrollView,
|
|
12
12
|
} from "@gorhom/bottom-sheet";
|
|
13
|
-
import type {
|
|
14
|
-
import { withTheme } from "
|
|
13
|
+
import type { ReadTheme } from "@draftbit/theme";
|
|
14
|
+
import { withTheme } from "@draftbit/theme";
|
|
15
15
|
import { useDeepCompareMemo } from "../../utilities";
|
|
16
16
|
|
|
17
17
|
type SnapPosition = "top" | "middle" | "bottom";
|
|
@@ -38,7 +38,7 @@ export interface BottomSheetProps extends ScrollViewProps {
|
|
|
38
38
|
borderColor?: string;
|
|
39
39
|
onSettle?: (index: number) => void;
|
|
40
40
|
style?: StyleProp<ViewStyle>;
|
|
41
|
-
theme:
|
|
41
|
+
theme: ReadTheme;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
// Clarification:
|
|
@@ -55,10 +55,10 @@ const BottomSheet = React.forwardRef<BottomSheetComponent, BottomSheetProps>(
|
|
|
55
55
|
initialSnapIndex,
|
|
56
56
|
initialSnapPosition = "bottom",
|
|
57
57
|
showHandle = true,
|
|
58
|
-
handleColor = theme.colors.
|
|
58
|
+
handleColor = theme.colors.border.brand,
|
|
59
59
|
topBorderRadius = 20,
|
|
60
60
|
borderWidth = 1,
|
|
61
|
-
borderColor = theme.colors.
|
|
61
|
+
borderColor = theme.colors.border.brand,
|
|
62
62
|
onSettle,
|
|
63
63
|
style,
|
|
64
64
|
children,
|
|
@@ -67,7 +67,7 @@ const BottomSheet = React.forwardRef<BottomSheetComponent, BottomSheetProps>(
|
|
|
67
67
|
ref
|
|
68
68
|
) => {
|
|
69
69
|
const backgroundColor =
|
|
70
|
-
(style as ViewStyle)?.backgroundColor || theme.colors.background;
|
|
70
|
+
(style as ViewStyle)?.backgroundColor || theme.colors.background.brand;
|
|
71
71
|
|
|
72
72
|
const snapPoints = snapPointsProp ?? [
|
|
73
73
|
topSnapPosition,
|
|
@@ -96,7 +96,7 @@ const BottomSheet = React.forwardRef<BottomSheetComponent, BottomSheetProps>(
|
|
|
96
96
|
ref={ref}
|
|
97
97
|
snapPoints={mappedSnapPoints}
|
|
98
98
|
index={
|
|
99
|
-
initialSnapIndex
|
|
99
|
+
initialSnapIndex !== undefined
|
|
100
100
|
? mappedSnapPoints.length - initialSnapIndex - 1
|
|
101
101
|
: getSnapIndexFromPosition(initialSnapPosition)
|
|
102
102
|
}
|
package/src/components/Button.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Text, Pressable, Platform, StyleSheet, ActivityIndicator, } from "react-native";
|
|
3
|
-
import { withTheme } from "
|
|
3
|
+
import { withTheme } from "@draftbit/theme";
|
|
4
4
|
const CONSTANTS = {
|
|
5
5
|
baseHeight: 42,
|
|
6
6
|
borderRadius: 4,
|
|
@@ -45,9 +45,10 @@ function Base({ Icon, icon, iconPosition = "left", iconSize = CONSTANTS.icon, ti
|
|
|
45
45
|
const Solid = ({ style, theme, ...props }) => {
|
|
46
46
|
return (React.createElement(Base, { style: [
|
|
47
47
|
{
|
|
48
|
+
//@ts-ignore
|
|
48
49
|
color: "#FFF",
|
|
49
|
-
borderRadius:
|
|
50
|
-
backgroundColor: theme.colors.primary,
|
|
50
|
+
borderRadius: 8,
|
|
51
|
+
backgroundColor: theme.colors.branding.primary,
|
|
51
52
|
},
|
|
52
53
|
style,
|
|
53
54
|
], ...props }));
|
|
@@ -63,9 +64,10 @@ const Outline = ({ style, theme, ...props }) => {
|
|
|
63
64
|
return (React.createElement(Base, { style: [
|
|
64
65
|
styles.outline,
|
|
65
66
|
{
|
|
66
|
-
borderRadius:
|
|
67
|
-
borderColor: theme.colors.primary,
|
|
68
|
-
|
|
67
|
+
borderRadius: 8,
|
|
68
|
+
borderColor: theme.colors.branding.primary,
|
|
69
|
+
//@ts-ignore
|
|
70
|
+
color: theme.colors.branding.primary,
|
|
69
71
|
},
|
|
70
72
|
style,
|
|
71
73
|
], ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,SAAS,EAET,QAAQ,EACR,UAAU,EAEV,iBAAiB,GAClB,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Button.js","sourceRoot":"","sources":["Button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,SAAS,EAET,QAAQ,EACR,UAAU,EAEV,iBAAiB,GAClB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAI5C,MAAM,SAAS,GAAG;IAChB,UAAU,EAAE,EAAE;IACd,YAAY,E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AAS,EAAE,QAAQ;aACpB;YACD,OAAO,EAAE;gBACP,YAAY,EAAE,CAAC;gBACf,WAAW,EAAE,CAAC;gBACd,SAAS,EAAE,QAAQ;aACpB;SACF,CAAC;KACH;CACF,CAAC,CAAC"}
|
|
@@ -8,10 +8,8 @@ import {
|
|
|
8
8
|
TextStyle,
|
|
9
9
|
ActivityIndicator,
|
|
10
10
|
} from "react-native";
|
|
11
|
-
|
|
12
|
-
import {
|
|
13
|
-
|
|
14
|
-
import type { Theme } from "../styles/DefaultTheme";
|
|
11
|
+
import { withTheme } from "@draftbit/theme";
|
|
12
|
+
import type { ReadTheme } from "@draftbit/theme";
|
|
15
13
|
import type { IconSlot } from "../interfaces/Icon";
|
|
16
14
|
|
|
17
15
|
const CONSTANTS = {
|
|
@@ -50,7 +48,7 @@ type Props = {
|
|
|
50
48
|
delayLongPress?: number;
|
|
51
49
|
hitSlop?: number;
|
|
52
50
|
icon?: string;
|
|
53
|
-
theme:
|
|
51
|
+
theme: ReadTheme;
|
|
54
52
|
} & PressableProps &
|
|
55
53
|
IconSlot;
|
|
56
54
|
|
|
@@ -147,9 +145,10 @@ const Solid = ({ style, theme, ...props }: Props): JSX.Element => {
|
|
|
147
145
|
<Base
|
|
148
146
|
style={[
|
|
149
147
|
{
|
|
148
|
+
//@ts-ignore
|
|
150
149
|
color: "#FFF",
|
|
151
|
-
borderRadius:
|
|
152
|
-
backgroundColor: theme.colors.primary,
|
|
150
|
+
borderRadius: 8,
|
|
151
|
+
backgroundColor: theme.colors.branding.primary,
|
|
153
152
|
},
|
|
154
153
|
style,
|
|
155
154
|
]}
|
|
@@ -173,9 +172,10 @@ const Outline = ({ style, theme, ...props }: Props): JSX.Element => {
|
|
|
173
172
|
style={[
|
|
174
173
|
styles.outline,
|
|
175
174
|
{
|
|
176
|
-
borderRadius:
|
|
177
|
-
borderColor: theme.colors.primary,
|
|
178
|
-
|
|
175
|
+
borderRadius: 8,
|
|
176
|
+
borderColor: theme.colors.branding.primary,
|
|
177
|
+
//@ts-ignore
|
|
178
|
+
color: theme.colors.branding.primary,
|
|
179
179
|
},
|
|
180
180
|
style,
|
|
181
181
|
]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, StyleSheet, Pressable, } from "react-native";
|
|
3
|
-
import { useTheme } from "
|
|
3
|
+
import { useTheme } from "@draftbit/theme";
|
|
4
4
|
import { usePrevious } from "../../hooks";
|
|
5
5
|
const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon = "MaterialCommunityIcons/checkbox-marked", uncheckedIcon = "MaterialCommunityIcons/checkbox-blank-outline", size = 24, style, ...rest }) => {
|
|
6
6
|
const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);
|
|
@@ -19,8 +19,8 @@ const Checkbox = ({ Icon, status, disabled = false, onPress, onCheck, onUncheck,
|
|
|
19
19
|
}, [defaultValue, previousDefaultValue]);
|
|
20
20
|
const { colors } = useTheme();
|
|
21
21
|
const checkboxColor = internalValue
|
|
22
|
-
? color || colors.primary
|
|
23
|
-
: uncheckedColor || colors.primary;
|
|
22
|
+
? color || colors.branding.primary
|
|
23
|
+
: uncheckedColor || colors.branding.primary;
|
|
24
24
|
const handlePress = () => {
|
|
25
25
|
const newValue = !internalValue;
|
|
26
26
|
setInternalValue(newValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,IAAI,EACJ,UAAU,EACV,SAAS,GAIV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["Checkbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,E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AAS,EAAE;QACT,YAAY,EAAE,EAAE;KACjB;IACD,aAAa,EAAE;QACb,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KACzB;IACD,IAAI,EAAE;QACJ,SAAS,EAAE,QAAQ;KACpB;IACD,IAAI,EAAE;QACJ,YAAY,EAAE,CAAC;QACf,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;QACV,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC;AAEH,eAAe,QAAQ,CAAC"}
|
|
@@ -7,7 +7,7 @@ import {
|
|
|
7
7
|
StyleProp,
|
|
8
8
|
ViewStyle,
|
|
9
9
|
} from "react-native";
|
|
10
|
-
import { useTheme } from "
|
|
10
|
+
import { useTheme } from "@draftbit/theme";
|
|
11
11
|
import type { IconSlot } from "../../interfaces/Icon";
|
|
12
12
|
|
|
13
13
|
import { usePrevious } from "../../hooks";
|
|
@@ -66,8 +66,8 @@ const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot> = ({
|
|
|
66
66
|
const { colors } = useTheme();
|
|
67
67
|
|
|
68
68
|
const checkboxColor = internalValue
|
|
69
|
-
? color || colors.primary
|
|
70
|
-
: uncheckedColor || colors.primary;
|
|
69
|
+
? color || colors.branding.primary
|
|
70
|
+
: uncheckedColor || colors.branding.primary;
|
|
71
71
|
|
|
72
72
|
const handlePress = () => {
|
|
73
73
|
const newValue = !internalValue;
|
|
@@ -5,6 +5,7 @@ import { extractStyles } from "../../utilities";
|
|
|
5
5
|
import { usePrevious } from "../../hooks";
|
|
6
6
|
import Text from "../Text";
|
|
7
7
|
import Checkbox from "./Checkbox";
|
|
8
|
+
import { withTheme } from "@draftbit/theme";
|
|
8
9
|
export var Direction;
|
|
9
10
|
(function (Direction) {
|
|
10
11
|
Direction["Row"] = "row";
|
|
@@ -18,7 +19,7 @@ const renderLabel = (value, labelStyle, textStyle) => {
|
|
|
18
19
|
return React.createElement(React.Fragment, null, value);
|
|
19
20
|
}
|
|
20
21
|
};
|
|
21
|
-
const CheckboxRow = ({ label = "Label", labelStyle, labelContainerStyle, checkboxStyle, direction = Direction.Row, Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon, uncheckedIcon, size, style, ...rest }) => {
|
|
22
|
+
const CheckboxRow = ({ label = "Label", labelStyle, labelContainerStyle, checkboxStyle, direction = Direction.Row, Icon, status, disabled = false, onPress, onCheck, onUncheck, color, uncheckedColor, defaultValue, checkedIcon, uncheckedIcon, size, style, theme, ...rest }) => {
|
|
22
23
|
const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);
|
|
23
24
|
React.useEffect(() => {
|
|
24
25
|
if (status != null) {
|
|
@@ -52,7 +53,7 @@ const CheckboxRow = ({ label = "Label", labelStyle, labelContainerStyle, checkbo
|
|
|
52
53
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end",
|
|
53
54
|
},
|
|
54
55
|
labelContainerStyle,
|
|
55
|
-
] }, renderLabel(label,
|
|
56
|
+
] }, renderLabel(label, labelStyle, StyleSheet.flatten([{ color: theme.colors.text.strong }, textStyles]))),
|
|
56
57
|
React.createElement(Checkbox, { Icon: Icon, status: internalValue, style: checkboxStyle, disabled: disabled, onPress: handlePress, color: color, uncheckedColor: uncheckedColor, checkedIcon: checkedIcon, uncheckedIcon: uncheckedIcon, size: size })));
|
|
57
58
|
};
|
|
58
59
|
const styles = StyleSheet.create({
|
|
@@ -74,5 +75,5 @@ const styles = StyleSheet.create({
|
|
|
74
75
|
flex: 3,
|
|
75
76
|
},
|
|
76
77
|
});
|
|
77
|
-
export default CheckboxRow;
|
|
78
|
+
export default withTheme(CheckboxRow);
|
|
78
79
|
//# sourceMappingURL=CheckboxRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxRow.js","sourceRoot":"","sources":["CheckboxRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,UAAU,EA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;gBACjB,UAAU,EAAE,MAAM;aACnB;SACF,CAAC;KACH;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,WAAW,CAAC,CAAC"}
|
|
@@ -15,6 +15,7 @@ import { extractStyles } from "../../utilities";
|
|
|
15
15
|
import { usePrevious } from "../../hooks";
|
|
16
16
|
import Text from "../Text";
|
|
17
17
|
import Checkbox, { CheckboxProps } from "./Checkbox";
|
|
18
|
+
import { ReadTheme, withTheme } from "@draftbit/theme";
|
|
18
19
|
|
|
19
20
|
export enum Direction {
|
|
20
21
|
Row = "row",
|
|
@@ -27,6 +28,7 @@ export interface CheckboxRowProps extends CheckboxProps {
|
|
|
27
28
|
labelContainerStyle: StyleProp<ViewStyle>;
|
|
28
29
|
checkboxStyle?: StyleProp<ViewStyle>;
|
|
29
30
|
direction?: Direction;
|
|
31
|
+
theme: ReadTheme;
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
const renderLabel = (
|
|
@@ -60,6 +62,7 @@ const CheckboxRow: React.FC<CheckboxRowProps & IconSlot> = ({
|
|
|
60
62
|
uncheckedIcon,
|
|
61
63
|
size,
|
|
62
64
|
style,
|
|
65
|
+
theme,
|
|
63
66
|
...rest
|
|
64
67
|
}) => {
|
|
65
68
|
const [internalValue, setInternalValue] = React.useState<boolean>(
|
|
@@ -115,7 +118,11 @@ const CheckboxRow: React.FC<CheckboxRowProps & IconSlot> = ({
|
|
|
115
118
|
labelContainerStyle,
|
|
116
119
|
]}
|
|
117
120
|
>
|
|
118
|
-
{renderLabel(
|
|
121
|
+
{renderLabel(
|
|
122
|
+
label,
|
|
123
|
+
labelStyle,
|
|
124
|
+
StyleSheet.flatten([{ color: theme.colors.text.strong }, textStyles])
|
|
125
|
+
)}
|
|
119
126
|
</View>
|
|
120
127
|
|
|
121
128
|
<Checkbox
|
|
@@ -154,4 +161,4 @@ const styles = StyleSheet.create({
|
|
|
154
161
|
},
|
|
155
162
|
});
|
|
156
163
|
|
|
157
|
-
export default CheckboxRow;
|
|
164
|
+
export default withTheme(CheckboxRow);
|
|
@@ -3,7 +3,7 @@ import { View, Animated, Text, StyleSheet, I18nManager, TextInput as NativeTextI
|
|
|
3
3
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
|
4
4
|
import omit from "lodash.omit";
|
|
5
5
|
import dateFormat from "dateformat";
|
|
6
|
-
import { withTheme } from "
|
|
6
|
+
import { withTheme } from "@draftbit/theme";
|
|
7
7
|
import Portal from "../Portal/Portal";
|
|
8
8
|
import Touchable from "../Touchable";
|
|
9
9
|
import DateTimePicker from "./DatePickerComponent";
|
|
@@ -26,8 +26,8 @@ const MONTHS = [
|
|
|
26
26
|
"November",
|
|
27
27
|
"December",
|
|
28
28
|
];
|
|
29
|
-
const DatePicker = ({ Icon, style, theme: { colors, typography
|
|
30
|
-
var _a, _b;
|
|
29
|
+
const DatePicker = ({ Icon, style, theme: { colors, typography }, date, onDateChange = () => { }, defaultValue, disabled = false, mode = "date", format, type = "underline", leftIconName, rightIconName, leftIconMode = "inset", label, labelSize, labelColor, placeholder, borderColor: inputBorderColor, borderColorActive: inputBorderColorActive, autoDismissKeyboard = true, minimumDate, maximumDate, hideLabel = false, ...props }) => {
|
|
30
|
+
var _a, _b, _c, _d, _e;
|
|
31
31
|
const [value, setValue] = React.useState(parseDate(date) || parseDate(defaultValue));
|
|
32
32
|
React.useEffect(() => {
|
|
33
33
|
if (defaultValue != null) {
|
|
@@ -139,21 +139,21 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
139
139
|
? labelSize
|
|
140
140
|
: typography.caption.fontSize;
|
|
141
141
|
const hasActiveOutline = focused;
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
inputTextColor = colors.strong;
|
|
142
|
+
let inputTextColor, activeColor, underlineColor, borderColor = (_b = (_a = viewStyles.borderColor) !== null && _a !== void 0 ? _a : inputBorderColor) !== null && _b !== void 0 ? _b : colors.text.strong, placeholderColor, containerStyle, backgroundColor, inputStyle;
|
|
143
|
+
inputTextColor = colors.text.strong;
|
|
145
144
|
if (disabled) {
|
|
146
|
-
activeColor = colors.
|
|
147
|
-
placeholderColor = colors.light;
|
|
145
|
+
activeColor = colors.border.brand;
|
|
146
|
+
placeholderColor = colors.text.light;
|
|
148
147
|
borderColor = "transparent";
|
|
149
148
|
underlineColor = "transparent";
|
|
150
|
-
backgroundColor = colors.
|
|
149
|
+
backgroundColor = colors.border.brand;
|
|
151
150
|
}
|
|
152
151
|
else {
|
|
153
|
-
activeColor = inputBorderColorActive || colors.primary;
|
|
154
|
-
placeholderColor = colors.light;
|
|
155
|
-
underlineColor =
|
|
156
|
-
|
|
152
|
+
activeColor = inputBorderColorActive || colors.branding.primary;
|
|
153
|
+
placeholderColor = colors.text.light;
|
|
154
|
+
underlineColor =
|
|
155
|
+
(_d = (_c = viewStyles.borderColor) !== null && _c !== void 0 ? _c : inputBorderColor) !== null && _d !== void 0 ? _d : colors.border.brand;
|
|
156
|
+
backgroundColor = colors.background.brand;
|
|
157
157
|
}
|
|
158
158
|
const { lineHeight, ...subtitle1 } = typography.subtitle1;
|
|
159
159
|
inputStyle = {
|
|
@@ -168,22 +168,23 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
168
168
|
};
|
|
169
169
|
if (type === "underline") {
|
|
170
170
|
containerStyle = {
|
|
171
|
-
borderTopLeftRadius:
|
|
172
|
-
borderTopRightRadius:
|
|
171
|
+
borderTopLeftRadius: 8,
|
|
172
|
+
borderTopRightRadius: 8,
|
|
173
173
|
paddingBottom: 12,
|
|
174
174
|
marginTop: 16,
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
else {
|
|
178
178
|
containerStyle = {
|
|
179
|
-
borderRadius:
|
|
179
|
+
borderRadius: 8,
|
|
180
180
|
borderColor: hasActiveOutline ? activeColor : borderColor,
|
|
181
|
-
borderWidth: (
|
|
181
|
+
borderWidth: (_e = viewStyles.borderWidth) !== null && _e !== void 0 ? _e : 1,
|
|
182
182
|
paddingTop: labeled && !hideLabel ? 16 * 1.5 : 16,
|
|
183
183
|
paddingBottom: labeled && !hideLabel ? 16 * 0.5 : 16,
|
|
184
|
-
opacity: disabled ?
|
|
184
|
+
opacity: disabled ? 0.5 : 1,
|
|
185
185
|
backgroundColor,
|
|
186
186
|
};
|
|
187
|
+
//@ts-ignore
|
|
187
188
|
inputStyle.paddingHorizontal = 12;
|
|
188
189
|
}
|
|
189
190
|
if (leftIconName && leftIconMode === "outset") {
|
|
@@ -191,10 +192,10 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
191
192
|
}
|
|
192
193
|
let leftIconColor;
|
|
193
194
|
if (focused) {
|
|
194
|
-
leftIconColor = colors.primary;
|
|
195
|
+
leftIconColor = colors.branding.primary;
|
|
195
196
|
}
|
|
196
197
|
else {
|
|
197
|
-
leftIconColor = colors.light;
|
|
198
|
+
leftIconColor = colors.text.light;
|
|
198
199
|
}
|
|
199
200
|
const leftIconProps = {
|
|
200
201
|
size: 24,
|
|
@@ -311,7 +312,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
311
312
|
type === "solid" ? { paddingHorizontal: 12 } : {},
|
|
312
313
|
labelStyle,
|
|
313
314
|
{
|
|
314
|
-
color: labelColor || colors.light,
|
|
315
|
+
color: labelColor || colors.text.light,
|
|
315
316
|
opacity: labeled.interpolate({
|
|
316
317
|
inputRange: [0, 1],
|
|
317
318
|
outputRange: [hasActiveOutline ? 1 : 0, 0],
|
|
@@ -332,7 +333,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
332
333
|
marginLeft: type === "solid" ? 16 : 0,
|
|
333
334
|
} })) : null,
|
|
334
335
|
React.createElement(NativeTextInput, { value: formatDate(), placeholder: label && !hideLabel ? placeholder1 : placeholder, editable: !disabled, placeholderTextColor: placeholderColor, selectionColor: activeColor, onFocus: _handleFocus, onBlur: _handleBlur, underlineColorAndroid: "transparent", style: [inputStyles, textStyles], ...props })),
|
|
335
|
-
rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {
|
|
336
|
+
rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.text.light, style: {
|
|
336
337
|
position: "absolute",
|
|
337
338
|
right: 16,
|
|
338
339
|
marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,
|
|
@@ -341,7 +342,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disab
|
|
|
341
342
|
React.createElement(View, { style: [
|
|
342
343
|
styles.picker,
|
|
343
344
|
{
|
|
344
|
-
backgroundColor: colors.
|
|
345
|
+
backgroundColor: colors.border.brand,
|
|
345
346
|
},
|
|
346
347
|
] },
|
|
347
348
|
React.createElement(View, { style: [
|