@draftbit/core 49.5.2-ace73d.2 → 49.5.2-e8f32c.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/SectionList/SectionList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlashList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleFlatList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleScrollView.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSectionList.js +1 -1
- package/lib/commonjs/components/SimpleStyleScrollables/SimpleStyleSwipeableList.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/SwipeableItem/SwipeableList.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/commonjs/styles/DarkTheme.js +1 -0
- package/lib/commonjs/styles/DefaultTheme.js +1 -0
- package/lib/commonjs/styles/fonts.js +1 -0
- package/lib/commonjs/styles/overlay.js +1 -0
- package/lib/commonjs/styles/shadow.js +1 -0
- package/lib/commonjs/theming.js +1 -0
- package/lib/typescript/src/Provider.d.ts +5 -7
- 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 +5 -3
- 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 +5 -3
- 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 +6 -8
- 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 +2 -4
- package/lib/typescript/src/components/Checkbox/CheckboxRow.js +3 -4
- package/lib/typescript/src/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +5 -3
- package/lib/typescript/src/components/DatePicker/DatePicker.js +23 -24
- package/lib/typescript/src/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts +5010 -4
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js +6 -8
- 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 +5 -3
- 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 +5 -3
- 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 +5 -3
- package/lib/typescript/src/components/Elevation.js +4 -3
- package/lib/typescript/src/components/Elevation.js.map +1 -1
- package/lib/typescript/src/components/FormRow.d.ts +2 -1
- package/lib/typescript/src/components/FormRow.js.map +1 -1
- package/lib/typescript/src/components/IconButton.d.ts +5 -3
- 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 +2 -0
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.d.ts +4 -5
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +13 -10
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.d.ts +4 -2
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js +3 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
- package/lib/typescript/src/components/Picker/NativePicker.d.ts +3 -1
- package/lib/typescript/src/components/Picker/NativePicker.js +2 -5
- 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 +3 -1
- 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 +3 -1
- 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 +3 -1
- 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 +3 -1
- 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 +5 -3
- 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 +5 -3
- 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 +9 -1
- package/lib/typescript/src/components/Portal/Portal.js +5 -3
- 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 +3 -1
- 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 +3 -1
- 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 +13 -10
- 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 +2 -4
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.js +3 -4
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/typescript/src/components/Row.d.ts +5 -3
- 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 +6 -3
- package/lib/typescript/src/components/ScreenContainer.js +2 -3
- package/lib/typescript/src/components/ScreenContainer.js.map +1 -1
- package/lib/typescript/src/components/SectionList/SectionHeader.d.ts +5 -3
- 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/SectionList/SectionList.d.ts +6 -4
- package/lib/typescript/src/components/SectionList/SectionList.js +4 -4
- package/lib/typescript/src/components/SectionList/SectionList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.d.ts +2 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.d.ts +2 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.d.ts +2 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.d.ts +2 -2
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.d.ts +2 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.d.ts +6 -2
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.d.ts +6 -2
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
- package/lib/typescript/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
- package/lib/typescript/src/components/Slider.d.ts +6 -3
- 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 +5 -3
- 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 +5 -3
- package/lib/typescript/src/components/Stepper.js +2 -3
- package/lib/typescript/src/components/Stepper.js.map +1 -1
- package/lib/typescript/src/components/Surface.d.ts +5 -3
- package/lib/typescript/src/components/Surface.js +10 -3
- package/lib/typescript/src/components/Surface.js.map +1 -1
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.d.ts +5 -3
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js +5 -10
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/lib/typescript/src/components/SwipeableItem/SwipeableList.d.ts +3 -3
- package/lib/typescript/src/components/SwipeableItem/SwipeableList.js +4 -4
- package/lib/typescript/src/components/SwipeableItem/SwipeableList.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +2 -4
- package/lib/typescript/src/components/Swiper/Swiper.js +2 -3
- package/lib/typescript/src/components/Swiper/Swiper.js.map +1 -1
- package/lib/typescript/src/components/Switch.d.ts +24 -7
- package/lib/typescript/src/components/Switch.js +4 -3
- package/lib/typescript/src/components/Switch.js.map +1 -1
- package/lib/typescript/src/components/TabView/TabView.d.ts +5 -3
- 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 +5 -3
- 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 +5 -3
- package/lib/typescript/src/components/Table/TableRow.js +2 -4
- package/lib/typescript/src/components/Table/TableRow.js.map +1 -1
- package/lib/typescript/src/components/Text.d.ts +9 -3
- 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 +41 -4
- package/lib/typescript/src/components/TextField.js +20 -22
- package/lib/typescript/src/components/TextField.js.map +1 -1
- package/lib/typescript/src/components/TextInput.js +0 -3
- package/lib/typescript/src/components/TextInput.js.map +1 -1
- package/lib/typescript/src/components/Typography.d.ts +11 -5
- 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 +5 -3
- 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 +5 -3
- 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 +5 -3
- package/lib/typescript/src/deprecated-components/Banner.js +5 -4
- package/lib/typescript/src/deprecated-components/Banner.js.map +1 -1
- package/lib/typescript/src/deprecated-components/Card.d.ts +18 -6
- 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 +5 -3
- 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 +5 -3
- 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 +5 -3
- 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 +5 -3
- 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 +8 -3
- 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 +5 -3
- 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 +8 -5
- 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 +3 -1
- 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 +5 -3
- 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 +5 -3
- 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 +5 -3
- 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 +9 -6
- 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 +2 -0
- package/lib/typescript/src/index.js +2 -0
- package/lib/typescript/src/index.js.map +1 -1
- package/lib/typescript/src/styles/DarkTheme.d.ts +3 -0
- package/lib/typescript/src/styles/DarkTheme.js +27 -0
- package/lib/typescript/src/styles/DarkTheme.js.map +1 -0
- package/lib/typescript/src/styles/DefaultTheme.d.ts +1670 -0
- package/lib/typescript/src/styles/DefaultTheme.js +112 -0
- package/lib/typescript/src/styles/DefaultTheme.js.map +1 -0
- package/lib/typescript/src/styles/fonts.d.ts +5 -0
- package/lib/typescript/src/styles/fonts.js +63 -0
- package/lib/typescript/src/styles/fonts.js.map +1 -0
- package/lib/typescript/src/styles/overlay.d.ts +2 -0
- package/lib/typescript/src/styles/overlay.js +61 -0
- package/lib/typescript/src/styles/overlay.js.map +1 -0
- package/lib/typescript/src/styles/shadow.d.ts +23 -0
- package/lib/typescript/src/styles/shadow.js +52 -0
- package/lib/typescript/src/styles/shadow.js.map +1 -0
- package/lib/typescript/src/theming.d.ts +8 -0
- package/lib/typescript/src/theming.js +4 -0
- package/lib/typescript/src/theming.js.map +1 -0
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -4
- package/src/Provider.js +4 -4
- package/src/Provider.js.map +1 -1
- package/src/Provider.tsx +12 -15
- 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 +6 -8
- 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 +3 -4
- package/src/components/Checkbox/CheckboxRow.js.map +1 -1
- package/src/components/Checkbox/CheckboxRow.tsx +2 -9
- package/src/components/DatePicker/DatePicker.js +23 -24
- package/src/components/DatePicker/DatePicker.js.map +1 -1
- package/src/components/DatePicker/DatePicker.tsx +24 -25
- package/src/components/DatePicker/DatePickerComponent.web.js +6 -8
- package/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/src/components/DatePicker/DatePickerComponent.web.tsx +8 -15
- package/src/components/DatePicker/DatePickerComponentType.ts +3 -2
- 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 +4 -3
- package/src/components/Elevation.js.map +1 -1
- package/src/components/Elevation.tsx +6 -5
- package/src/components/FormRow.js.map +1 -1
- package/src/components/FormRow.tsx +2 -1
- 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 +2 -0
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +13 -10
- 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 +3 -1
- package/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
- package/src/components/MediaPlayer/AudioPlayer/index.tsx +3 -1
- package/src/components/Picker/NativePicker.js +2 -5
- package/src/components/Picker/NativePicker.js.map +1 -1
- package/src/components/Picker/NativePicker.tsx +2 -5
- 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 +5 -3
- package/src/components/Portal/Portal.js.map +1 -1
- package/src/components/Portal/Portal.tsx +10 -3
- 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 +11 -10
- package/src/components/RadioButton/RadioButtonGroup.tsx +2 -2
- package/src/components/RadioButton/RadioButtonRow.js +3 -4
- package/src/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/src/components/RadioButton/RadioButtonRow.tsx +2 -9
- 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 -3
- package/src/components/ScreenContainer.js.map +1 -1
- package/src/components/ScreenContainer.tsx +4 -5
- 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/SectionList/SectionList.js +4 -4
- package/src/components/SectionList/SectionList.js.map +1 -1
- package/src/components/SectionList/SectionList.tsx +152 -145
- package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleFlashList.tsx +22 -16
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleFlatList.tsx +22 -16
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView.tsx +20 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleMasonryFlashList.tsx +27 -17
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleScrollView.tsx +20 -13
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleSectionList.tsx +28 -20
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js +3 -3
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.js.map +1 -1
- package/src/components/SimpleStyleScrollables/SimpleStyleSwipeableList.tsx +28 -20
- 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 +2 -3
- package/src/components/Stepper.js.map +1 -1
- package/src/components/Stepper.tsx +4 -5
- package/src/components/Surface.js +10 -3
- package/src/components/Surface.js.map +1 -1
- package/src/components/Surface.tsx +12 -5
- package/src/components/SwipeableItem/SwipeableItem.js +5 -10
- package/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/src/components/SwipeableItem/SwipeableItem.tsx +7 -13
- package/src/components/SwipeableItem/SwipeableList.js +4 -4
- package/src/components/SwipeableItem/SwipeableList.js.map +1 -1
- package/src/components/SwipeableItem/SwipeableList.tsx +47 -32
- package/src/components/Swiper/Swiper.js +2 -3
- package/src/components/Swiper/Swiper.js.map +1 -1
- package/src/components/Swiper/Swiper.tsx +3 -6
- package/src/components/Switch.js +4 -3
- 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 +2 -4
- package/src/components/Table/TableRow.js.map +1 -1
- package/src/components/Table/TableRow.tsx +4 -6
- 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 +20 -22
- package/src/components/TextField.js.map +1 -1
- package/src/components/TextField.tsx +23 -26
- package/src/components/TextInput.js +0 -3
- package/src/components/TextInput.js.map +1 -1
- package/src/components/TextInput.tsx +0 -3
- 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 +5 -4
- package/src/deprecated-components/Banner.js.map +1 -1
- package/src/deprecated-components/Banner.tsx +10 -6
- package/src/deprecated-components/Card.js +3 -3
- package/src/deprecated-components/Card.js.map +1 -1
- package/src/deprecated-components/Card.tsx +6 -10
- 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 +8 -7
- 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 +11 -12
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/index.tsx +2 -0
- package/src/styles/DarkTheme.js +27 -0
- package/src/styles/DarkTheme.js.map +1 -0
- package/src/styles/DarkTheme.tsx +30 -0
- package/src/styles/DefaultTheme.js +112 -0
- package/src/styles/DefaultTheme.js.map +1 -0
- package/src/styles/DefaultTheme.tsx +114 -0
- package/src/styles/fonts.js +63 -0
- package/src/styles/fonts.js.map +1 -0
- package/src/styles/fonts.tsx +67 -0
- package/src/styles/overlay.js +61 -0
- package/src/styles/overlay.js.map +1 -0
- package/src/styles/overlay.tsx +69 -0
- package/src/styles/shadow.js +52 -0
- package/src/styles/shadow.js.map +1 -0
- package/src/styles/shadow.tsx +55 -0
- package/src/theming.js +4 -0
- package/src/theming.js.map +1 -0
- package/src/theming.tsx +6 -0
|
@@ -26,37 +26,52 @@ export const SwipeableListContext =
|
|
|
26
26
|
onStopSwiping: () => {},
|
|
27
27
|
});
|
|
28
28
|
|
|
29
|
-
const SwipeableList =
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
29
|
+
const SwipeableList = React.forwardRef(
|
|
30
|
+
<T extends object>(
|
|
31
|
+
{
|
|
32
|
+
disableScrollWhenSwiping = true,
|
|
33
|
+
listComponent = "FlatList",
|
|
34
|
+
...rest
|
|
35
|
+
}: FlashListSwipeableListProps<T> | FlatListSwipeableListProps<T>,
|
|
36
|
+
ref: React.Ref<FlatList | FlashList<any>>
|
|
37
|
+
) => {
|
|
38
|
+
const [isSwiping, setIsSwiping] = React.useState(false);
|
|
39
|
+
|
|
40
|
+
const onStartSwiping = () => {
|
|
41
|
+
setIsSwiping(true);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const onStopSwiping = () => {
|
|
45
|
+
setIsSwiping(false);
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
rest.scrollEnabled = disableScrollWhenSwiping ? !isSwiping : true;
|
|
49
|
+
|
|
50
|
+
const renderListComponent = () => {
|
|
51
|
+
switch (listComponent) {
|
|
52
|
+
case "FlatList":
|
|
53
|
+
return (
|
|
54
|
+
<FlatList
|
|
55
|
+
ref={ref as React.Ref<FlatList>}
|
|
56
|
+
{...(rest as FlatListProps<T>)}
|
|
57
|
+
/>
|
|
58
|
+
);
|
|
59
|
+
case "FlashList":
|
|
60
|
+
return (
|
|
61
|
+
<FlashList
|
|
62
|
+
ref={ref as React.Ref<FlashList<T>>}
|
|
63
|
+
{...(rest as FlashListProps<T>)}
|
|
64
|
+
/>
|
|
65
|
+
);
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
return (
|
|
70
|
+
<SwipeableListContext.Provider value={{ onStartSwiping, onStopSwiping }}>
|
|
71
|
+
<>{renderListComponent()}</>
|
|
72
|
+
</SwipeableListContext.Provider>
|
|
73
|
+
);
|
|
74
|
+
}
|
|
75
|
+
);
|
|
61
76
|
|
|
62
77
|
export default SwipeableList;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import { withTheme } from "@draftbit/theme";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { View } from "react-native";
|
|
4
3
|
import SwiperComponent from "react-native-web-swiper";
|
|
5
|
-
const Swiper = ({
|
|
4
|
+
const Swiper = ({ vertical = false, loop = false, timeout = 0, from = 0, prevTitle = "", nextTitle = "", prevTitleColor, nextTitleColor, dotsTouchable = true, dotColor, dotActiveColor, data, keyExtractor, renderItem, children: childrenProp, onIndexChanged: onIndexChangedProp, onSwipe, onSwipedNext, onSwipedPrevious, minDistanceForAction, minDistanceToCapture, style, }) => {
|
|
6
5
|
var _a;
|
|
7
6
|
const [currentIndex, setCurrentIndex] = React.useState(0);
|
|
8
7
|
const numberOfItems = (_a = data === null || data === void 0 ? void 0 : data.length) !== null && _a !== void 0 ? _a : React.Children.count(childrenProp);
|
|
@@ -71,5 +70,5 @@ const Swiper = ({ theme, vertical = false, loop = false, timeout = 0, from = 0,
|
|
|
71
70
|
: {}),
|
|
72
71
|
} }, children)));
|
|
73
72
|
};
|
|
74
|
-
export default
|
|
73
|
+
export default Swiper;
|
|
75
74
|
//# sourceMappingURL=Swiper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Swiper.js","sourceRoot":"","sources":["Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"Swiper.js","sourceRoot":"","sources":["Swiper.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,MAAM,cAAc,CAAC;AAC1D,OAAO,eAAe,MAAM,yBAAyB,CAAC;AA2BtD,MAAM,MAAM,GAAG,CAAC,EACd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AG,aAAa,CAAC;YAC3C,SAAS,CAAC,OAAO,CAAC,KAAK,GAAG,aAAa,CAAC,MAAM,CAAC;YAC/C,SAAS,CAAC,OAAO,CAAC,WAAW,EAAE,CAAC;SACjC;IACH,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAEf,OAAO,CACL,oBAAC,IAAI,IAAC,KAAK,EAAE,KAAK;QAEhB,oBAAC,eAAe,IACd,GAAG,EAAE,SAAS,EACd,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,OAAO,EAChB,QAAQ,EAAE,QAAQ,EAClB,cAAc,EAAE,cAAc,EAC9B,oBAAoB,EAAE,oBAAoB,EAC1C,oBAAoB,EAAE,oBAAoB,EAC1C,aAAa,EAAE;gBACb,SAAS;gBACT,SAAS;gBACT,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBACzC,cAAc,EAAE,EAAE,KAAK,EAAE,cAAc,EAAE;gBACzC,aAAa;gBACb,GAAG,CAAC,QAAQ;oBACV,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,UAAU,EAAE,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,EAAE;oBAC7D,CAAC,CAAC,EAAE,CAAC;gBACP,GAAG,CAAC,cAAc;oBAChB,CAAC,CAAC,EAAE,cAAc,EAAE,EAAE,eAAe,EAAE,cAAc,EAAE,EAAE;oBACzD,CAAC,CAAC,EAAE,CAAC;aACR,IAEA,QAAQ,CACO,CACb,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,MAAM,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ReadTheme, withTheme } from "@draftbit/theme";
|
|
2
1
|
import React from "react";
|
|
3
2
|
import { View, StyleProp, ViewStyle } from "react-native";
|
|
4
3
|
import SwiperComponent from "react-native-web-swiper";
|
|
@@ -26,11 +25,9 @@ export interface SwiperProps<T> {
|
|
|
26
25
|
onIndexChanged?: (index: number) => void;
|
|
27
26
|
minDistanceForAction?: number;
|
|
28
27
|
minDistanceToCapture?: number;
|
|
29
|
-
theme: ReadTheme;
|
|
30
28
|
}
|
|
31
29
|
|
|
32
30
|
const Swiper = ({
|
|
33
|
-
theme,
|
|
34
31
|
vertical = false,
|
|
35
32
|
loop = false,
|
|
36
33
|
timeout = 0,
|
|
@@ -40,8 +37,8 @@ const Swiper = ({
|
|
|
40
37
|
prevTitleColor,
|
|
41
38
|
nextTitleColor,
|
|
42
39
|
dotsTouchable = true,
|
|
43
|
-
dotColor
|
|
44
|
-
dotActiveColor
|
|
40
|
+
dotColor,
|
|
41
|
+
dotActiveColor,
|
|
45
42
|
data,
|
|
46
43
|
keyExtractor,
|
|
47
44
|
renderItem,
|
|
@@ -148,4 +145,4 @@ const Swiper = ({
|
|
|
148
145
|
);
|
|
149
146
|
};
|
|
150
147
|
|
|
151
|
-
export default
|
|
148
|
+
export default Swiper;
|
package/src/components/Switch.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Switch as NativeSwitch, } from "react-native";
|
|
3
|
-
import { withTheme } from "
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
4
|
import FormRow from "./FormRow";
|
|
5
|
+
import { RowDirection } from "@draftbit/types";
|
|
5
6
|
import { usePrevious } from "../hooks";
|
|
6
7
|
function Switch({ value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, style, ...rest }) {
|
|
7
|
-
const activeTrackThemeColor = activeTrackColor || theme.colors.
|
|
8
|
+
const activeTrackThemeColor = activeTrackColor || theme.colors.primary;
|
|
8
9
|
const inactiveTrackThemeColor = inactiveTrackColor || "#EEE";
|
|
9
10
|
const activeThumbThemeColor = activeThumbColor || "#FFF";
|
|
10
11
|
const inactiveThumbThemeColor = inactiveThumbColor || "#FFF";
|
|
@@ -32,7 +33,7 @@ function Switch({ value, defaultValue, disabled, onValueChange, activeTrackColor
|
|
|
32
33
|
onValueChange && onValueChange(bool);
|
|
33
34
|
}, ...rest }));
|
|
34
35
|
}
|
|
35
|
-
function Row({ label = "Label", direction =
|
|
36
|
+
function Row({ label = "Label", direction = RowDirection.Row, style, value, defaultValue, disabled, onValueChange, activeTrackColor, inactiveTrackColor, activeThumbColor, inactiveThumbColor, theme, ...rest }) {
|
|
36
37
|
const [checked, setChecked] = React.useState(value != null ? value : defaultValue);
|
|
37
38
|
React.useEffect(() => {
|
|
38
39
|
if (value != null) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,IAAI,YAAY,GAIvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Switch.js","sourceRoot":"","sources":["Switch.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EACL,MAAM,IAAI,YAAY,GAIvB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACvC,OAAO,OAAO,MAAM,WAAW,CAAC;AAChC,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAcvC,SAAS,MAAM,CAAC,EACd,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,gBAAgB,EAChB,kBAAkB,EAClB,KAAK,EACL,KAAK,EACL,GAAG,IAAI,EACD;IACN,MAAM,qBAAqB,GAAG,gBAAgB,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;IACvE,MAAM,uBAAuB,GAAG,kBAAkB,IAAI,MAAM,CAAC;IAE7D,MAAM,qBAAqB,GAAG,g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,GAAG,SAAS,CAAC,GAAG,CAAC,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,CAAC;AACrB,eAAe,SAAS,CAAC,MAAM,CAAC,CAAC"}
|
|
@@ -5,9 +5,10 @@ import {
|
|
|
5
5
|
StyleProp,
|
|
6
6
|
ViewStyle,
|
|
7
7
|
} from "react-native";
|
|
8
|
-
import { withTheme } from "
|
|
8
|
+
import { withTheme } from "../theming";
|
|
9
9
|
import FormRow from "./FormRow";
|
|
10
|
-
import
|
|
10
|
+
import { RowDirection } from "@draftbit/types";
|
|
11
|
+
import type { Theme } from "../styles/DefaultTheme";
|
|
11
12
|
import { usePrevious } from "../hooks";
|
|
12
13
|
|
|
13
14
|
type Props = {
|
|
@@ -15,7 +16,7 @@ type Props = {
|
|
|
15
16
|
disabled?: boolean;
|
|
16
17
|
onValueChange?: (value: boolean) => void;
|
|
17
18
|
defaultValue?: boolean;
|
|
18
|
-
theme:
|
|
19
|
+
theme: Theme;
|
|
19
20
|
activeTrackColor: string;
|
|
20
21
|
inactiveTrackColor: string;
|
|
21
22
|
activeThumbColor: string;
|
|
@@ -35,8 +36,7 @@ function Switch({
|
|
|
35
36
|
style,
|
|
36
37
|
...rest
|
|
37
38
|
}: Props) {
|
|
38
|
-
const activeTrackThemeColor =
|
|
39
|
-
activeTrackColor || theme.colors.branding.primary;
|
|
39
|
+
const activeTrackThemeColor = activeTrackColor || theme.colors.primary;
|
|
40
40
|
const inactiveTrackThemeColor = inactiveTrackColor || "#EEE";
|
|
41
41
|
|
|
42
42
|
const activeThumbThemeColor = activeThumbColor || "#FFF";
|
|
@@ -83,13 +83,13 @@ function Switch({
|
|
|
83
83
|
|
|
84
84
|
type RowProps = {
|
|
85
85
|
label: string;
|
|
86
|
-
direction:
|
|
86
|
+
direction: RowDirection;
|
|
87
87
|
style?: StyleProp<ViewStyle>;
|
|
88
88
|
};
|
|
89
89
|
|
|
90
90
|
function Row({
|
|
91
91
|
label = "Label",
|
|
92
|
-
direction =
|
|
92
|
+
direction = RowDirection.Row,
|
|
93
93
|
style,
|
|
94
94
|
value,
|
|
95
95
|
defaultValue,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { TabView, TabBar, } from "react-native-tab-view";
|
|
3
3
|
import TabViewItem from "./TabViewItem";
|
|
4
|
-
import { withTheme } from "
|
|
4
|
+
import { withTheme } from "../../theming";
|
|
5
5
|
import { flattenReactFragments, extractStyles } from "../../utilities";
|
|
6
6
|
const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, initialTabIndex = 0, tabBarPosition, keyboardDismissMode, swipeEnabled, scrollEnabled, activeColor, inactiveColor, pressColor, indicatorColor, tabsBackgroundColor, iconSize = 16, style, theme, children: childrenProp, }) => {
|
|
7
7
|
const [index, setIndex] = React.useState(initialTabIndex);
|
|
@@ -30,10 +30,10 @@ const TabViewComponent = ({ Icon, onIndexChanged, onEndReached, initialTabIndex
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
const renderTabBar = (props) => {
|
|
33
|
-
return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.
|
|
34
|
-
backgroundColor: indicatorColor || theme.colors.
|
|
33
|
+
return (React.createElement(TabBar, { ...props, activeColor: activeColor || theme.colors.primary, inactiveColor: inactiveColor || "rgb(200,200,200)", pressColor: pressColor || theme.colors.primary, scrollEnabled: scrollEnabled, indicatorStyle: {
|
|
34
|
+
backgroundColor: indicatorColor || theme.colors.primary,
|
|
35
35
|
}, labelStyle: [{ textTransform: "none" }, textStyles], renderIcon: ({ route, color }) => (route === null || route === void 0 ? void 0 : route.icon) ? (React.createElement(Icon, { name: route.icon, color: color, size: iconSize })) : null, style: {
|
|
36
|
-
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
36
|
+
backgroundColor: tabsBackgroundColor || theme.colors.background,
|
|
37
37
|
} }));
|
|
38
38
|
};
|
|
39
39
|
const renderScene = ({ route }) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TabView.js","sourceRoot":"","sources":["TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,OAAO,EACP,MAAM,GAIP,MAAM,uBAAuB,CAAC;AAE/B,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TabView.js","sourceRoot":"","sources":["TabView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EACL,OAAO,EACP,MAAM,GAIP,MAAM,uBAAuB,CAAC;AAE/B,OAAO,WAAW,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,qBAAqB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AA6BvE,MAAM,gBAAgB,GAAoD,CAAC,EACzE,IAAI,EACJ,cAAc,EACd,YAAY,EACZ,eAAe,GAAG,CAAC,EACnB,cAAc,EACd,mBAAmB,EACnB,YAAY,EACZ,aAAa,EACb,WAAW,EACX,aAAa,EACb,UAAU,EACV,cAAc,EACd,mBAAmB,EACnB,QAAQ,GAAG,EAAE,EACb,KAAK,EACL,KAAK,EACL,QAAQ,EAAE,YAAY,GACvB,EAAE,EAAE;IACH,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC;IAC1D,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,EAAE,CAAC,CAAC;IAExD,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IAExD,MAAM,QAAQ,GAAsB,KAAK,CAAC,OAAO,CAC/C,GAAG,EAAE,CACH,qBAAqB,CACnB,KAAK,CAAC,QAAQ,CAAC,OAAO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10,8 +10,8 @@ import {
|
|
|
10
10
|
|
|
11
11
|
import TabViewItem from "./TabViewItem";
|
|
12
12
|
import type { IconSlot } from "../../interfaces/Icon";
|
|
13
|
-
import { withTheme } from "
|
|
14
|
-
import type {
|
|
13
|
+
import { withTheme } from "../../theming";
|
|
14
|
+
import type { Theme } from "../../styles/DefaultTheme";
|
|
15
15
|
import { flattenReactFragments, extractStyles } from "../../utilities";
|
|
16
16
|
|
|
17
17
|
type SceneProps = SceneRendererProps & {
|
|
@@ -38,7 +38,7 @@ type TabViewProps = {
|
|
|
38
38
|
tabsBackgroundColor?: string;
|
|
39
39
|
iconSize?: number;
|
|
40
40
|
style?: StyleProp<ViewStyle | TextStyle>;
|
|
41
|
-
theme:
|
|
41
|
+
theme: Theme;
|
|
42
42
|
} & IconSlot;
|
|
43
43
|
|
|
44
44
|
const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
|
|
@@ -104,12 +104,12 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
|
|
|
104
104
|
return (
|
|
105
105
|
<TabBar
|
|
106
106
|
{...props}
|
|
107
|
-
activeColor={activeColor || theme.colors.
|
|
107
|
+
activeColor={activeColor || theme.colors.primary}
|
|
108
108
|
inactiveColor={inactiveColor || "rgb(200,200,200)"}
|
|
109
|
-
pressColor={pressColor || theme.colors.
|
|
109
|
+
pressColor={pressColor || theme.colors.primary}
|
|
110
110
|
scrollEnabled={scrollEnabled}
|
|
111
111
|
indicatorStyle={{
|
|
112
|
-
backgroundColor: indicatorColor || theme.colors.
|
|
112
|
+
backgroundColor: indicatorColor || theme.colors.primary,
|
|
113
113
|
}}
|
|
114
114
|
labelStyle={[{ textTransform: "none" }, textStyles]}
|
|
115
115
|
renderIcon={({ route, color }) =>
|
|
@@ -118,7 +118,7 @@ const TabViewComponent: React.FC<React.PropsWithChildren<TabViewProps>> = ({
|
|
|
118
118
|
) : null
|
|
119
119
|
}
|
|
120
120
|
style={{
|
|
121
|
-
backgroundColor: tabsBackgroundColor || theme.colors.background
|
|
121
|
+
backgroundColor: tabsBackgroundColor || theme.colors.background,
|
|
122
122
|
}}
|
|
123
123
|
/>
|
|
124
124
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { ScrollView, View, StyleSheet, } from "react-native";
|
|
3
|
-
import { withTheme } from "
|
|
3
|
+
import { withTheme } from "../../theming";
|
|
4
4
|
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
5
|
-
const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.
|
|
5
|
+
const Table = ({ theme, borderWidth = 1, borderColor = theme.colors.divider, borderStyle = "solid", drawTopBorder = true, drawBottomBorder = false, drawStartBorder = false, drawEndBorder = false, cellVerticalPadding = 10, cellHorizontalPadding = 10, data, keyExtractor, renderItem, children: childrenProp, style, ...rest }) => {
|
|
6
6
|
//Both 'renderItem' and 'data' are optional to allow direct children. But if one is included, both need to be included
|
|
7
7
|
if ((data && !renderItem) || (renderItem && !data)) {
|
|
8
8
|
throw new Error("'renderItem' and 'data' need to both be provided to render from 'data'. Either remove them entirley or include both");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Table.js","sourceRoot":"","sources":["Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAGV,IAAI,EACJ,UAAU,GAEX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Table.js","sourceRoot":"","sources":["Table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,UAAU,EAGV,IAAI,EACJ,UAAU,GAEX,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,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QACrB,mBAAmB;KACpB,CAAC;IAEF,MAAM,eAAe,GAAG,oBAAoB,CAAC;QAC3C,WAAW;QACX,WAAW;QACX,WAAW;QACX,aAAa;QACb,gBAAgB;QAChB,eAAe;QACf,aAAa;KACd,CAAC,CAAC;IAEH,OAAO,CACL,oBAAC,iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QAC7C,oBAAC,IAAI,IAAC,KAAK,EAAE,CAAC,MAAM,CAAC,SAAS,EAAE,eAAe,EAAE,KAAK,CAAC;YACrD,0CAAG,MAAM,CAAI;YACb,oBAAC,UAAU,OAAK,IAAI,IAAG,qBAAqB,CAAc,CACrD,CACoB,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,EAAE;QACT,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,KAAK,CAAC,CAAC"}
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
StyleSheet,
|
|
8
8
|
ScrollViewProps,
|
|
9
9
|
} from "react-native";
|
|
10
|
-
import
|
|
11
|
-
import { withTheme } from "
|
|
10
|
+
import { Theme } from "../../styles/DefaultTheme";
|
|
11
|
+
import { withTheme } from "../../theming";
|
|
12
12
|
import {
|
|
13
13
|
generateBorderStyles,
|
|
14
14
|
TableProps,
|
|
@@ -21,13 +21,13 @@ export interface Props<T> extends TableProps, ScrollViewProps {
|
|
|
21
21
|
keyExtractor?: (item: T, index: number) => string;
|
|
22
22
|
renderItem?: ({ item, index }: { item: T; index: number }) => JSX.Element;
|
|
23
23
|
style?: StyleProp<ViewStyle>;
|
|
24
|
-
theme:
|
|
24
|
+
theme: Theme;
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
const Table = <T extends object>({
|
|
28
28
|
theme,
|
|
29
29
|
borderWidth = 1,
|
|
30
|
-
borderColor = theme.colors.
|
|
30
|
+
borderColor = theme.colors.divider,
|
|
31
31
|
borderStyle = "solid",
|
|
32
32
|
drawTopBorder = true,
|
|
33
33
|
drawBottomBorder = false,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { View, StyleSheet } from "react-native";
|
|
3
3
|
import { generateBorderStyles, TableStyleContext, } from "./TableCommon";
|
|
4
|
-
import { withTheme } from "
|
|
4
|
+
import { withTheme } from "../../theming";
|
|
5
5
|
import Pressable from "../Pressable";
|
|
6
6
|
const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false, drawBottomBorder = true, drawStartBorder = true, drawEndBorder = false, cellVerticalPadding, cellHorizontalPadding, isTableHeader = false, children, onPress, style, theme, }) => {
|
|
7
7
|
const parentContextValue = React.useContext(TableStyleContext);
|
|
@@ -26,9 +26,7 @@ const TableRow = ({ borderWidth, borderColor, borderStyle, drawTopBorder = false
|
|
|
26
26
|
return (React.createElement(TableStyleContext.Provider, { value: contextValue },
|
|
27
27
|
React.createElement(ContainerComponent, { onPress: onPress, style: [
|
|
28
28
|
borderViewStyle,
|
|
29
|
-
isTableHeader
|
|
30
|
-
? { backgroundColor: theme.colors.branding.primary }
|
|
31
|
-
: {},
|
|
29
|
+
isTableHeader ? { backgroundColor: theme.colors.primary } : {},
|
|
32
30
|
style,
|
|
33
31
|
styles.cellsContainer,
|
|
34
32
|
] }, children)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,IAAI,EAAwB,UAAU,EAAE,MAAM,cAAc,CAAC;AACtE,OAAO,EACL,oBAAoB,EAEpB,iBAAiB,GAElB,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"TableRow.js","sourceRoot":"","sources":["TableRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA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iBAAiB,CAAC,QAAQ,IAAC,KAAK,EAAE,YAAY;QAC7C,oBAAC,kBAAkB,IACjB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE;gBACL,eAAe;gBACf,aAAa,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE;gBAC9D,KAAK;gBACL,MAAM,CAAC,cAAc;aACtB,IAEA,QAAQ,CACU,CACM,CAC9B,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,cAAc,EAAE;QACd,aAAa,EAAE,KAAK;KACrB;CACF,CAAC,CAAC;AAEH,eAAe,SAAS,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -6,15 +6,15 @@ import {
|
|
|
6
6
|
TableStyleContext,
|
|
7
7
|
TableStyleProps,
|
|
8
8
|
} from "./TableCommon";
|
|
9
|
-
import
|
|
10
|
-
import { withTheme } from "
|
|
9
|
+
import { Theme } from "../../styles/DefaultTheme";
|
|
10
|
+
import { withTheme } from "../../theming";
|
|
11
11
|
import Pressable from "../Pressable";
|
|
12
12
|
|
|
13
13
|
export interface Props extends TableProps {
|
|
14
14
|
onPress?: () => void;
|
|
15
15
|
isTableHeader?: boolean;
|
|
16
16
|
style?: StyleProp<ViewStyle>;
|
|
17
|
-
theme:
|
|
17
|
+
theme: Theme;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
|
|
@@ -63,9 +63,7 @@ const TableRow: React.FC<React.PropsWithChildren<Props>> = ({
|
|
|
63
63
|
onPress={onPress}
|
|
64
64
|
style={[
|
|
65
65
|
borderViewStyle,
|
|
66
|
-
isTableHeader
|
|
67
|
-
? { backgroundColor: theme.colors.branding.primary }
|
|
68
|
-
: {},
|
|
66
|
+
isTableHeader ? { backgroundColor: theme.colors.primary } : {},
|
|
69
67
|
style,
|
|
70
68
|
styles.cellsContainer,
|
|
71
69
|
]}
|
package/src/components/Text.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Text as NativeText, I18nManager } from "react-native";
|
|
3
|
-
import { withTheme } from "
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
4
|
class Text extends React.Component {
|
|
5
5
|
render() {
|
|
6
6
|
const { style, ...rest } = this.props;
|
|
@@ -17,7 +17,7 @@ class Text extends React.Component {
|
|
|
17
17
|
}
|
|
18
18
|
}
|
|
19
19
|
export const BaseLink = ({ style, theme, title, ...props }) => {
|
|
20
|
-
return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.
|
|
20
|
+
return (React.createElement(Text, { hitSlop: 8, style: [{ color: theme.colors.primary }, style], theme: theme, ...props }, title));
|
|
21
21
|
};
|
|
22
22
|
const Link = withTheme(BaseLink);
|
|
23
23
|
export { Link };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"","sources":["Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,WAAW,EAAa,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"","sources":["Text.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,WAAW,EAAa,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAOvC,MAAM,IAAK,SAAQ,KAAK,CAAC,SAAgB;IAGvC,MAAM;QACJ,MAAM,EAAE,KAAK,EAAE,GAAG,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC;QACtC,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC;QAE3D,OAAO,CACL,oBAAC,UAAU,OACL,IAAI,EACR,GAAG,EAAE,CAAC,CAAC,EAAE,EAAE;gBACT,IAAI,CAAC,KAAK,GAAG,CAAC,CAAC;YACjB,CAAC,EACD,KAAK,EAAE;gBACL;oBACE,SAAS,EAAE,MAAM;oBACjB,gBAAgB;iBACjB;gBACD,KAAK;aACN,GACD,CACH,CAAC;IACJ,CAAC;CACF;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC,EACvB,KAAK,EACL,KAAK,EACL,KAAK,EACL,GAAG,KAAK,EACJ,EAAe,EAAE;IACrB,OAAO,CACL,oBAAC,IAAI,IACH,OAAO,EAAE,CAAC,EACV,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,EAAE,KAAK,CAAC,EAC/C,KAAK,EAAE,KAAK,KACR,KAAK,IAER,KAAK,CACD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,IAAI,GAAQ,SAAS,CAAC,QAAQ,CAAC,CAAC;AACtC,OAAO,EAAE,IAAI,EAAE,CAAC;AAEhB,eAAe,SAAS,CAAC,IAAI,CAAC,CAAC"}
|
package/src/components/Text.tsx
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { Text as NativeText, I18nManager, TextProps } from "react-native";
|
|
3
|
-
import { withTheme } from "
|
|
4
|
-
import type {
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
|
+
import type { Theme } from "../styles/DefaultTheme";
|
|
5
5
|
|
|
6
6
|
type Props = {
|
|
7
|
-
theme:
|
|
7
|
+
theme: Theme;
|
|
8
8
|
} & TextProps;
|
|
9
9
|
|
|
10
10
|
class Text extends React.Component<Props> {
|
|
@@ -41,7 +41,7 @@ export const BaseLink = ({
|
|
|
41
41
|
return (
|
|
42
42
|
<Text
|
|
43
43
|
hitSlop={8}
|
|
44
|
-
style={[{ color: theme.colors.
|
|
44
|
+
style={[{ color: theme.colors.primary }, style]}
|
|
45
45
|
theme={theme}
|
|
46
46
|
{...props}
|
|
47
47
|
>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { View, Animated, StyleSheet, Text, I18nManager, Platform, } from "react-native";
|
|
3
|
-
import { withTheme } from "
|
|
3
|
+
import { withTheme } from "../theming";
|
|
4
4
|
import { applyStyles, extractStyles } from "../utilities";
|
|
5
5
|
import TextInput from "./TextInput";
|
|
6
6
|
const AnimatedText = Animated.createAnimatedComponent(Text);
|
|
@@ -131,26 +131,25 @@ class TextField extends React.Component {
|
|
|
131
131
|
return this._root && this._root.blur();
|
|
132
132
|
}
|
|
133
133
|
render() {
|
|
134
|
-
const { theme, Icon, type = "underline", disabled = false, editable = true, label, error = false, leftIconName, leftIconMode, rightIconName, iconColor, iconSize, assistiveText, underlineColor: underlineColorProp, activeBorderColor: activeBorderColorProp =
|
|
135
|
-
const { colors, typography } = theme;
|
|
134
|
+
const { theme: { colors, typography, roundness, disabledOpacity }, Icon, type = "underline", disabled = false, editable = true, label, error = false, leftIconName, leftIconMode, rightIconName, iconColor, iconSize, assistiveText, underlineColor: underlineColorProp, activeBorderColor: activeBorderColorProp = colors.primary, multiline = false, numberOfLines = 4, style, render = (props) => React.createElement(TextInput, { ...props }), ...rest } = this.props;
|
|
136
135
|
const MINIMIZED_LABEL_Y_OFFSET = -(typography.caption.lineHeight + 4);
|
|
137
136
|
const OUTLINE_MINIMIZED_LABEL_Y_OFFSET = -(16 * 0.5 + 4);
|
|
138
137
|
const MAXIMIZED_LABEL_FONT_SIZE = typography.subtitle1.fontSize;
|
|
139
138
|
const MINIMIZED_LABEL_FONT_SIZE = typography.caption.fontSize;
|
|
140
139
|
const hasActiveOutline = this.state.focused || error;
|
|
141
140
|
let inputTextColor, activeColor, underlineColor, borderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;
|
|
142
|
-
inputTextColor = colors.
|
|
141
|
+
inputTextColor = colors.strong;
|
|
143
142
|
if (disabled) {
|
|
144
|
-
activeColor = colors.
|
|
145
|
-
placeholderColor = colors.
|
|
143
|
+
activeColor = colors.light;
|
|
144
|
+
placeholderColor = colors.light;
|
|
146
145
|
borderColor = "transparent";
|
|
147
146
|
underlineColor = "transparent";
|
|
148
|
-
backgroundColor = colors.
|
|
147
|
+
backgroundColor = colors.divider;
|
|
149
148
|
}
|
|
150
149
|
else {
|
|
151
|
-
activeColor = error ? colors.
|
|
152
|
-
placeholderColor = borderColor = colors.
|
|
153
|
-
underlineColor = underlineColorProp || colors.
|
|
150
|
+
activeColor = error ? colors.error : activeBorderColorProp;
|
|
151
|
+
placeholderColor = borderColor = colors.light;
|
|
152
|
+
underlineColor = underlineColorProp || colors.light;
|
|
154
153
|
backgroundColor = colors.background;
|
|
155
154
|
}
|
|
156
155
|
if (rest.placeholderTextColor) {
|
|
@@ -165,14 +164,13 @@ class TextField extends React.Component {
|
|
|
165
164
|
...subtitle1,
|
|
166
165
|
};
|
|
167
166
|
if (!multiline) {
|
|
168
|
-
//@ts-ignore
|
|
169
167
|
inputStyle.height = lineHeight;
|
|
170
168
|
}
|
|
171
169
|
let assistiveTextLeftMargin;
|
|
172
170
|
if (type === "underline") {
|
|
173
171
|
containerStyle = {
|
|
174
|
-
borderTopLeftRadius:
|
|
175
|
-
borderTopRightRadius:
|
|
172
|
+
borderTopLeftRadius: roundness,
|
|
173
|
+
borderTopRightRadius: roundness,
|
|
176
174
|
paddingBottom: 12,
|
|
177
175
|
marginTop: 16,
|
|
178
176
|
};
|
|
@@ -185,12 +183,12 @@ class TextField extends React.Component {
|
|
|
185
183
|
}
|
|
186
184
|
else {
|
|
187
185
|
containerStyle = {
|
|
188
|
-
borderRadius:
|
|
186
|
+
borderRadius: roundness,
|
|
189
187
|
borderColor: hasActiveOutline ? activeColor : borderColor,
|
|
190
188
|
borderWidth: 1,
|
|
191
189
|
paddingTop: label ? 16 * 1.5 : 16,
|
|
192
190
|
paddingBottom: label ? 16 * 0.5 : 16,
|
|
193
|
-
opacity: disabled ?
|
|
191
|
+
opacity: disabled ? disabledOpacity : 1,
|
|
194
192
|
backgroundColor,
|
|
195
193
|
};
|
|
196
194
|
if (leftIconName && leftIconMode === "inset") {
|
|
@@ -211,13 +209,13 @@ class TextField extends React.Component {
|
|
|
211
209
|
leftIconColor = iconColor;
|
|
212
210
|
}
|
|
213
211
|
else if (error) {
|
|
214
|
-
leftIconColor = colors.
|
|
212
|
+
leftIconColor = colors.error;
|
|
215
213
|
}
|
|
216
214
|
else if (this.state.focused) {
|
|
217
|
-
leftIconColor = colors.
|
|
215
|
+
leftIconColor = colors.primary;
|
|
218
216
|
}
|
|
219
217
|
else {
|
|
220
|
-
leftIconColor = colors.
|
|
218
|
+
leftIconColor = colors.light;
|
|
221
219
|
}
|
|
222
220
|
const labelStyle = {
|
|
223
221
|
...typography.subtitle1,
|
|
@@ -291,7 +289,7 @@ class TextField extends React.Component {
|
|
|
291
289
|
{
|
|
292
290
|
backgroundColor: bgColor ||
|
|
293
291
|
(error
|
|
294
|
-
? colors.
|
|
292
|
+
? colors.error
|
|
295
293
|
: this.state.focused
|
|
296
294
|
? activeColor
|
|
297
295
|
: underlineColor),
|
|
@@ -358,19 +356,19 @@ class TextField extends React.Component {
|
|
|
358
356
|
...rest,
|
|
359
357
|
value: this.state.value,
|
|
360
358
|
})),
|
|
361
|
-
leftIconName ? (React.createElement(Icon, { size: iconSize || ICON_SIZE, color: leftIconColor || colors.
|
|
359
|
+
leftIconName ? (React.createElement(Icon, { size: iconSize || ICON_SIZE, color: leftIconColor || colors.light, name: leftIconName, style: {
|
|
362
360
|
position: "absolute",
|
|
363
361
|
left: leftIconMode === "inset" && type === "solid" ? 16 : 0,
|
|
364
362
|
marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,
|
|
365
363
|
} })) : null,
|
|
366
|
-
rightIconName ? (React.createElement(Icon, { name: rightIconName, size: iconSize || ICON_SIZE, color: iconColor || colors.
|
|
364
|
+
rightIconName ? (React.createElement(Icon, { name: rightIconName, size: iconSize || ICON_SIZE, color: iconColor || colors.light, style: {
|
|
367
365
|
position: "absolute",
|
|
368
366
|
right: 16,
|
|
369
367
|
marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,
|
|
370
368
|
} })) : null,
|
|
371
369
|
assistiveText ? (React.createElement(Text, { style: [
|
|
372
370
|
{
|
|
373
|
-
color: error ? colors.
|
|
371
|
+
color: error ? colors.error : colors.light,
|
|
374
372
|
marginTop: 8,
|
|
375
373
|
marginLeft: assistiveTextLeftMargin,
|
|
376
374
|
},
|