@draftbit/core 49.5.2-0e6340.2 → 49.5.2-5ac7d2.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/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 -2
- 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/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/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 -5
- 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 -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 +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/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
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/deprecated-components/ToggleButton.tsx";import*as React from"react";import{withTheme}from"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","icon","toggled","onPress","defaultValue","disabled","color","colorSecondary","borderColor","iconSize","width","height","theme","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/deprecated-components/ToggleButton.tsx";import*as React from"react";import{withTheme}from"../theming";import{StyleSheet}from"react-native";import IconButton from"../components/IconButton";import{jsx as _jsx}from"react/jsx-runtime";var ToggleButton=function ToggleButton(_ref){var Icon=_ref.Icon,icon=_ref.icon,_ref$toggled=_ref.toggled,toggled=_ref$toggled===void 0?false:_ref$toggled,_ref$onPress=_ref.onPress,onPress=_ref$onPress===void 0?function(){}:_ref$onPress,defaultValue=_ref.defaultValue,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,_ref$color=_ref.color,color=_ref$color===void 0?"primary":_ref$color,_ref$colorSecondary=_ref.colorSecondary,colorSecondary=_ref$colorSecondary===void 0?"surface":_ref$colorSecondary,_ref$borderColor=_ref.borderColor,borderColor=_ref$borderColor===void 0?"divider":_ref$borderColor,_ref$iconSize=_ref.iconSize,iconSize=_ref$iconSize===void 0?25:_ref$iconSize,_ref$width=_ref.width,width=_ref$width===void 0?50:_ref$width,_ref$height=_ref.height,height=_ref$height===void 0?50:_ref$height,colors=_ref.theme.colors,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(toggled||defaultValue||false),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];React.useEffect(function(){if(toggled!=null){setInternalValue(toggled);}},[toggled]);React.useEffect(function(){if(defaultValue!=null){setInternalValue(defaultValue);}},[defaultValue]);var handlePress=function handlePress(){setInternalValue(!internalValue);onPress(!internalValue);};return _jsx(IconButton,Object.assign({Icon:Icon,icon:icon,size:iconSize,color:internalValue?colors[color]:colors[colorSecondary],onPress:handlePress,disabled:disabled,style:[styles.mainContainer,{width:width,height:height,backgroundColor:internalValue?colors[colorSecondary]:colors[color],borderColor:colors[borderColor]},style]},rest));};var styles=StyleSheet.create({mainContainer:{borderWidth:1}});export default withTheme(ToggleButton);
|
package/lib/commonjs/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{flattenReactFragments}from"./utilities";export{injectIcon}from"./interfaces/Icon";export{default as Provider}from"./Provider";export{Link}from"./components/Text";export{Button}from"./components/Button";export{Checkbox,CheckboxRow}from"./components/Checkbox";export{default as Divider}from"./components/Divider";export{default as IconButton}from"./components/IconButton";export{default as Image}from"./components/Image";export{default as SVG}from"./components/SVG";export{default as NumberInput}from"./components/NumberInput";export{default as ScreenContainer}from"./components/ScreenContainer";export{default as StarRating}from"./components/StarRating";export{default as Surface}from"./components/Surface";export{default as Switch,SwitchRow}from"./components/Switch";export{default as TextField}from"./components/TextField";export{default as Touchable}from"./components/Touchable";export{default as Pressable}from"./components/Pressable";export{default as AccordionGroup}from"./components/AccordionGroup";export{ActionSheet,ActionSheetItem,ActionSheetCancel}from"./components/ActionSheet";export{Swiper,SwiperItem}from"./components/Swiper";export{RadioButton,RadioButtonGroup,RadioButtonRow}from"./components/RadioButton/index";export{default as Shadow}from"./components/Shadow";export{DeckSwiper,DeckSwiperCard}from"./components/DeckSwiper";export{TabView,TabViewItem}from"./components/TabView";export{default as Markdown}from"./components/Markdown";export{BottomSheet}from"./components/BottomSheet";export{YoutubePlayer}from"./components/YoutubePlayer";export{Table,TableRow,TableCell}from"./components/Table";export{SwipeableItem,SwipeableItemButton,SwipeableList}from"./components/SwipeableItem";export{default as AudioPlayer}from"./components/MediaPlayer/AudioPlayer";export{default as DatePicker}from"./components/DatePicker/DatePicker";export{Picker,MultiSelectPicker,PickerItem}from"./components/Picker";export{default as Slider}from"./components/Slider";export{default as Stepper}from"./components/Stepper";export{SectionList,SectionHeader}from"./components/SectionList";export{default as LinearProgress}from"./components/Progress/LinearProgress";export{default as CircularProgress}from"./components/Progress/CircularProgress";export{default as TextInput}from"./components/TextInput";export{default as VideoPlayer}from"./components/MediaPlayer/VideoPlayer";export{PinInput,CustomPinInputCell,PinInputText as CustomPinInputText}from"./components/PinInput";export{AspectRatio,Circle,Center,HStack,VStack,ZStack,Spacer,Square}from"./components/Layout";export{default as KeyboardAvoidingView}from"./components/KeyboardAvoidingView";export{default as SimpleStyleFlashList}from"./components/SimpleStyleScrollables/SimpleStyleFlashList";export{default as SimpleStyleFlatList}from"./components/SimpleStyleScrollables/SimpleStyleFlatList";export{default as SimpleStyleKeyboardAwareScrollView}from"./components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView";export{default as SimpleStyleMasonryFlashList}from"./components/SimpleStyleScrollables/SimpleStyleMasonryFlashList";export{default as SimpleStyleScrollView}from"./components/SimpleStyleScrollables/SimpleStyleScrollView";export{default as SimpleStyleSectionList}from"./components/SimpleStyleScrollables/SimpleStyleSectionList";export{default as SimpleStyleSwipeableList}from"./components/SimpleStyleScrollables/SimpleStyleSwipeableList";export{default as AccordionItem}from"./deprecated-components/AccordionItem";export{default as AvatarEdit}from"./deprecated-components/AvatarEdit";export{default as Avatar}from"./deprecated-components/CircleImage";export{default as Banner}from"./deprecated-components/Banner";export{ButtonSolid,ButtonOutline}from"./components/Button";export{default as Card}from"./deprecated-components/Card";export{default as CheckboxGroup}from"./deprecated-components/CheckboxGroup";export{default as CircleImage}from"./deprecated-components/CircleImage";export{default as Container}from"./deprecated-components/Container";export{default as FAB}from"./deprecated-components/FAB";export{default as FieldSearchBarFull}from"./deprecated-components/FieldSearchBarFull";export{Center as DeprecatedCenter,Circle as DeprecatedCircle,Square as DeprecatedSquare,Row,Stack}from"./deprecated-components/Layout";export{default as ToggleButton}from"./deprecated-components/ToggleButton";export{default as ProgressBar}from"./deprecated-components/ProgressBar";export{default as ProgressCircle}from"./deprecated-components/ProgressCircle";export{default as RadioButtonFieldGroup}from"./deprecated-components/RadioButtonFieldGroup";export{default as RowBodyIcon}from"./deprecated-components/RowBodyIcon";export{default as RowHeadlineImageCaption}from"./deprecated-components/RowHeadlineImageCaption";export{default as RowHeadlineImageIcon}from"./deprecated-components/RowHeadlineImageIcon";export{useAuthState}from"./components/useAuthState";export{default as AvoidKeyboardView}from"./deprecated-components/AvoidKeyboardView";
|
|
1
|
+
export{flattenReactFragments}from"./utilities";export{injectIcon}from"./interfaces/Icon";export{withTheme,ThemeProvider}from"./theming";export{default as Provider}from"./Provider";export{default as DefaultTheme}from"./styles/DefaultTheme";export{Link}from"./components/Text";export{Button}from"./components/Button";export{Checkbox,CheckboxRow}from"./components/Checkbox";export{default as Divider}from"./components/Divider";export{default as IconButton}from"./components/IconButton";export{default as Image}from"./components/Image";export{default as SVG}from"./components/SVG";export{default as NumberInput}from"./components/NumberInput";export{default as ScreenContainer}from"./components/ScreenContainer";export{default as StarRating}from"./components/StarRating";export{default as Surface}from"./components/Surface";export{default as Switch,SwitchRow}from"./components/Switch";export{default as TextField}from"./components/TextField";export{default as Touchable}from"./components/Touchable";export{default as Pressable}from"./components/Pressable";export{default as AccordionGroup}from"./components/AccordionGroup";export{ActionSheet,ActionSheetItem,ActionSheetCancel}from"./components/ActionSheet";export{Swiper,SwiperItem}from"./components/Swiper";export{RadioButton,RadioButtonGroup,RadioButtonRow}from"./components/RadioButton/index";export{default as Shadow}from"./components/Shadow";export{DeckSwiper,DeckSwiperCard}from"./components/DeckSwiper";export{TabView,TabViewItem}from"./components/TabView";export{default as Markdown}from"./components/Markdown";export{BottomSheet}from"./components/BottomSheet";export{YoutubePlayer}from"./components/YoutubePlayer";export{Table,TableRow,TableCell}from"./components/Table";export{SwipeableItem,SwipeableItemButton,SwipeableList}from"./components/SwipeableItem";export{default as AudioPlayer}from"./components/MediaPlayer/AudioPlayer";export{default as DatePicker}from"./components/DatePicker/DatePicker";export{Picker,MultiSelectPicker,PickerItem}from"./components/Picker";export{default as Slider}from"./components/Slider";export{default as Stepper}from"./components/Stepper";export{SectionList,SectionHeader}from"./components/SectionList";export{default as LinearProgress}from"./components/Progress/LinearProgress";export{default as CircularProgress}from"./components/Progress/CircularProgress";export{default as TextInput}from"./components/TextInput";export{default as VideoPlayer}from"./components/MediaPlayer/VideoPlayer";export{PinInput,CustomPinInputCell,PinInputText as CustomPinInputText}from"./components/PinInput";export{AspectRatio,Circle,Center,HStack,VStack,ZStack,Spacer,Square}from"./components/Layout";export{default as KeyboardAvoidingView}from"./components/KeyboardAvoidingView";export{default as SimpleStyleFlashList}from"./components/SimpleStyleScrollables/SimpleStyleFlashList";export{default as SimpleStyleFlatList}from"./components/SimpleStyleScrollables/SimpleStyleFlatList";export{default as SimpleStyleKeyboardAwareScrollView}from"./components/SimpleStyleScrollables/SimpleStyleKeyboardAwareScrollView";export{default as SimpleStyleMasonryFlashList}from"./components/SimpleStyleScrollables/SimpleStyleMasonryFlashList";export{default as SimpleStyleScrollView}from"./components/SimpleStyleScrollables/SimpleStyleScrollView";export{default as SimpleStyleSectionList}from"./components/SimpleStyleScrollables/SimpleStyleSectionList";export{default as SimpleStyleSwipeableList}from"./components/SimpleStyleScrollables/SimpleStyleSwipeableList";export{default as AccordionItem}from"./deprecated-components/AccordionItem";export{default as AvatarEdit}from"./deprecated-components/AvatarEdit";export{default as Avatar}from"./deprecated-components/CircleImage";export{default as Banner}from"./deprecated-components/Banner";export{ButtonSolid,ButtonOutline}from"./components/Button";export{default as Card}from"./deprecated-components/Card";export{default as CheckboxGroup}from"./deprecated-components/CheckboxGroup";export{default as CircleImage}from"./deprecated-components/CircleImage";export{default as Container}from"./deprecated-components/Container";export{default as FAB}from"./deprecated-components/FAB";export{default as FieldSearchBarFull}from"./deprecated-components/FieldSearchBarFull";export{Center as DeprecatedCenter,Circle as DeprecatedCircle,Square as DeprecatedSquare,Row,Stack}from"./deprecated-components/Layout";export{default as ToggleButton}from"./deprecated-components/ToggleButton";export{default as ProgressBar}from"./deprecated-components/ProgressBar";export{default as ProgressCircle}from"./deprecated-components/ProgressCircle";export{default as RadioButtonFieldGroup}from"./deprecated-components/RadioButtonFieldGroup";export{default as RowBodyIcon}from"./deprecated-components/RowBodyIcon";export{default as RowHeadlineImageCaption}from"./deprecated-components/RowHeadlineImageCaption";export{default as RowHeadlineImageIcon}from"./deprecated-components/RowHeadlineImageIcon";export{useAuthState}from"./components/useAuthState";export{default as AvoidKeyboardView}from"./deprecated-components/AvoidKeyboardView";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import color from"color";import DefaultTheme from"./DefaultTheme";var white="#FFF";var black="#000";var pinkA100="#ff80ab";var DarkTheme=Object.assign({},DefaultTheme,{dark:true,mode:"adaptive",colors:Object.assign({},DefaultTheme.colors,{primary:"#BB86FC",background:"#121212",surface:"#121212",error:"#CF6679",onBackground:"#FFFFFF",onSurface:"#FFFFFF",text:white,disabled:color(white).alpha(0.38).rgb().string(),placeholder:color(white).alpha(0.54).rgb().string(),backdrop:color(black).alpha(0.5).rgb().string(),notification:pinkA100})});export default DarkTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{systemWeights}from"react-native-typography";import configureFonts from"./fonts";var DefaultTheme={disabledOpacity:0.5,roundness:8,dark:false,mode:"exact",borderRadius:{global:6,button:24},colors:{primary:"rgba(90, 69, 255, 1)",secondary:"rgba(59, 201, 234, 1)",surface:"rgba(255, 255, 255, 1)",background:"rgba(251, 252, 253, 1)",error:"rgba(255, 69, 100, 1)",divider:"rgba(200, 200, 200, 1)",strong:"rgba(18, 20, 44, 1)",medium:"rgba(70, 78, 88, 1)",strongInverse:"rgba(255, 255, 255, 1)",mediumInverse:"rgba(255, 255, 255, 0.87)",lightInverse:"rgba(255, 255, 255, 0.68)",light:"rgba(165, 173, 183, 1)",text:"#000",placeholder:"#333",disabled:"rgba(0, 0, 0, 0.25)"},fonts:configureFonts(),typography:{headline1:Object.assign({},systemWeights.regular,{fontSize:60,letterSpacing:0,lineHeight:71}),headline2:Object.assign({},systemWeights.regular,{fontSize:48,letterSpacing:0,lineHeight:58}),headline3:Object.assign({},systemWeights.regular,{fontSize:34,letterSpacing:0,lineHeight:40}),headline4:Object.assign({},systemWeights.regular,{fontSize:24,letterSpacing:0,lineHeight:34}),headline5:Object.assign({},systemWeights.regular,{fontSize:20,letterSpacing:0,lineHeight:26}),subtitle1:Object.assign({},systemWeights.regular,{fontSize:16,letterSpacing:0,lineHeight:26}),subtitle2:Object.assign({},systemWeights.regular,{fontSize:14,letterSpacing:0,lineHeight:22}),body1:Object.assign({},systemWeights.regular,{fontSize:16,letterSpacing:0,lineHeight:26}),body2:Object.assign({},systemWeights.regular,{fontSize:14,letterSpacing:0,lineHeight:22}),button:Object.assign({},systemWeights.regular,{fontSize:14,letterSpacing:0,lineHeight:16}),caption:Object.assign({},systemWeights.regular,{fontSize:12,letterSpacing:0,lineHeight:16}),overline:Object.assign({},systemWeights.regular,{fontSize:12,letterSpacing:2,lineHeight:16}),headline6:Object.assign({},systemWeights.regular,{fontSize:16,letterSpacing:0,lineHeight:24})}};export default DefaultTheme;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Platform}from"react-native";var fontConfig={web:{regular:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"400"},medium:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"500"},light:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"300"},thin:{fontFamily:'Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif',fontWeight:"100"}},ios:{regular:{fontFamily:"System",fontWeight:"400"},medium:{fontFamily:"System",fontWeight:"500"},light:{fontFamily:"System",fontWeight:"300"},thin:{fontFamily:"System",fontWeight:"100"}},default:{regular:{fontFamily:"sans-serif",fontWeight:"normal"},medium:{fontFamily:"sans-serif-medium",fontWeight:"normal"},light:{fontFamily:"sans-serif-light",fontWeight:"normal"},thin:{fontFamily:"sans-serif-thin",fontWeight:"normal"}}};export default function configureFonts(config){var fonts=Platform.select(Object.assign({},fontConfig,config));return fonts;}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import color from"color";import{Animated}from"react-native";import DarkTheme from"./DarkTheme";var isAnimatedValue=function isAnimatedValue(it){return it instanceof Animated.Value;};export default function overlay(elevation){var surfaceColor=arguments.length>1&&arguments[1]!==undefined?arguments[1]:DarkTheme.colors.surface;if(isAnimatedValue(elevation)){var inputRange=[0,1,2,3,8,24];return elevation.interpolate({inputRange:inputRange,outputRange:inputRange.map(function(e){return calculateColor(surfaceColor,e);})});}return calculateColor(surfaceColor,elevation);}function calculateColor(surfaceColor){var elevation=arguments.length>1&&arguments[1]!==undefined?arguments[1]:1;var overlayTransparency;if(elevation>=1&&elevation<=24){overlayTransparency=elevationOverlayTransparency[elevation];}else if(elevation>24){overlayTransparency=elevationOverlayTransparency[24];}else{overlayTransparency=elevationOverlayTransparency[1];}return color(surfaceColor).mix(color("white"),overlayTransparency*0.01).hex();}var elevationOverlayTransparency={1:5,2:7,3:8,4:9,5:10,6:11,7:11.5,8:12,9:12.5,10:13,11:13.5,12:14,13:14.25,14:14.5,15:14.75,16:15,17:15.12,18:15.24,19:15.36,20:15.48,21:15.6,22:15.72,23:15.84,24:16};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Animated}from"react-native";var SHADOW_COLOR="#000";var SHADOW_OPACITY=0.24;export default function shadow(){var elevation=arguments.length>0&&arguments[0]!==undefined?arguments[0]:0;if(elevation instanceof Animated.Value){var inputRange=[0,1,2,3,8,24];return{shadowColor:SHADOW_COLOR,shadowOffset:{width:new Animated.Value(0),height:elevation.interpolate({inputRange:inputRange,outputRange:[0,0.5,0.75,2,7,23]})},shadowOpacity:new Animated.Value(SHADOW_OPACITY),shadowRadius:elevation.interpolate({inputRange:inputRange,outputRange:[0,0.75,1.5,3,8,24]})};}else{if(elevation===0){return{};}var height,radius;switch(elevation){case 1:height=0.5;radius=0.75;break;case 2:height=0.75;radius=1.5;break;default:height=elevation-1;radius=elevation;}return{shadowColor:SHADOW_COLOR,shadowOffset:{width:0,height:height},shadowOpacity:SHADOW_OPACITY,shadowRadius:radius};}}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createTheming}from"@draftbit/react-theme-provider";import DefaultTheme from"./styles/DefaultTheme";var _createTheming=createTheming(DefaultTheme),ThemeProvider=_createTheming.ThemeProvider,withTheme=_createTheming.withTheme,useTheme=_createTheming.useTheme;export{ThemeProvider,withTheme,useTheme};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import
|
|
3
|
-
declare type
|
|
4
|
-
themes: ValidatedTheme[];
|
|
5
|
-
breakpoints: Breakpoints;
|
|
6
|
-
initialThemeName: string;
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { Theme } from "@draftbit/types";
|
|
3
|
+
declare type Props = {
|
|
7
4
|
children: React.ReactNode;
|
|
5
|
+
theme?: Theme;
|
|
8
6
|
};
|
|
9
|
-
export default class Provider extends React.Component<
|
|
7
|
+
export default class Provider extends React.Component<Props> {
|
|
10
8
|
render(): React.JSX.Element;
|
|
11
9
|
}
|
|
12
10
|
export {};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import React from "react";
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { ThemeProvider } from "./theming";
|
|
2
3
|
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(PortalHost, null,
|
|
7
|
+
React.createElement(ThemeProvider, { theme: this.props.theme }, this.props.children)));
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
//# sourceMappingURL=Provider.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../src/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Provider.js","sourceRoot":"","sources":["../../../src/Provider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,UAAU,MAAM,gCAAgC,CAAC;AAQxD,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,KAAK,CAAC,SAAgB;IAC1D,MAAM;QACJ,OAAO,CACL,oBAAC,UAAU;YAET,oBAAC,aAAa,IAAC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,IACnC,IAAI,CAAC,KAAK,CAAC,QAAQ,CACN,CACL,CACd,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StyleProp, TextStyle } from "react-native";
|
|
3
3
|
import type { IconSlot } from "../interfaces/Icon";
|
|
4
|
-
import type {
|
|
4
|
+
import type { Theme } from "../styles/DefaultTheme";
|
|
5
5
|
declare type AccordionGroupProps = {
|
|
6
6
|
label?: string;
|
|
7
7
|
expanded?: boolean;
|
|
@@ -13,7 +13,9 @@ declare type AccordionGroupProps = {
|
|
|
13
13
|
iconSize?: number;
|
|
14
14
|
style?: StyleProp<TextStyle>;
|
|
15
15
|
children?: React.ReactNode;
|
|
16
|
-
theme:
|
|
16
|
+
theme: Theme;
|
|
17
17
|
} & IconSlot;
|
|
18
|
-
declare const _default: React.ComponentType<
|
|
18
|
+
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<AccordionGroupProps, "theme"> & {
|
|
19
|
+
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
20
|
+
}> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<AccordionGroupProps> & (({ label, expanded: expandedProp, openColor, closedColor, caretColor: caretColorProp, caretSize, icon, iconSize, style, children, theme, Icon, }: AccordionGroupProps) => React.JSX.Element), {}>;
|
|
19
21
|
export default _default;
|
|
@@ -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 "../theming";
|
|
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.
|
|
10
|
-
const collapsedColor = closedColor || theme.colors.
|
|
9
|
+
const expandedColor = openColor || theme.colors.primary;
|
|
10
|
+
const collapsedColor = closedColor || theme.colors.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":["../../../../src/components/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":["../../../../src/components/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,YAAY,CAAC;AAGvC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAgB7C,MAAM,cAAc,GAAG,CAAC,EACtB,KAAK,EACL,QAAQ,EAAE,YAAY,GAAG,KAAK,EAC9B,SAAS,EACT,WAAW,EACX,UAAU,EAAE,cAAc,EAC1B,SAAS,GAAG,EAAE,EACd,IAAI,EACJ,QAAQ,GAAG,EAAE,EACb,KAAK,EACL,QAAQ,EACR,KAAK,EACL,IAAI,GACgB,EAAE,EAAE;IACxB,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,KAAK,CAAC,QAAQ,CAAU,YAAY,CAAC,CAAC;IACtE,MAAM,EAAE,UAAU,EAAE,UAAU,EAAE,GAAG,aAAa,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,aAAa,GAAG,SAAS,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;IACxD,MAAM,cAAc,GAAG,WAAW,IAAI,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC;IAC3D,MAAM,UAAU,GAAG,QAAQ,CAAC,CAAC,CAA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AEH,eAAe,SAAS,CAAC,cAAc,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle, ScrollViewProps } from "react-native";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Theme } from "../../styles/DefaultTheme";
|
|
4
4
|
declare type SnapPosition = "top" | "middle" | "bottom";
|
|
5
5
|
export interface BottomSheetProps extends ScrollViewProps {
|
|
6
6
|
topSnapPosition?: string | number;
|
|
@@ -22,7 +22,9 @@ export interface BottomSheetProps extends ScrollViewProps {
|
|
|
22
22
|
borderColor?: string;
|
|
23
23
|
onSettle?: (index: number) => void;
|
|
24
24
|
style?: StyleProp<ViewStyle>;
|
|
25
|
-
theme:
|
|
25
|
+
theme: Theme;
|
|
26
26
|
}
|
|
27
|
-
declare const _default: React.ComponentType<
|
|
27
|
+
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<BottomSheetProps & React.RefAttributes<import("@gorhom/bottom-sheet/lib/typescript/types").BottomSheetMethods>, "theme"> & {
|
|
28
|
+
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
29
|
+
}> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<BottomSheetProps & React.RefAttributes<import("@gorhom/bottom-sheet/lib/typescript/types").BottomSheetMethods>> & React.ForwardRefExoticComponent<BottomSheetProps & React.RefAttributes<import("@gorhom/bottom-sheet/lib/typescript/types").BottomSheetMethods>>, {}>;
|
|
28
30
|
export default _default;
|
|
@@ -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 "../../theming";
|
|
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.divider, topBorderRadius = 20, borderWidth = 1, borderColor = theme.colors.divider, onSettle, style, children, ...rest }, ref) => {
|
|
11
|
+
const backgroundColor = (style === null || style === void 0 ? void 0 : style.backgroundColor) || theme.colors.background;
|
|
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":["../../../../../src/components/BottomSheet/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":["../../../../../src/components/BottomSheet/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,eAAe,CAAC;AAC1C,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAIrD,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;AAyBrD,iBAAiB;AACjB,6FAA6F;AAC7F,uHAAuH;AACvH,MAAM,WAAW,GAAG,KAAK,CAAC,UAAU,CAClC,CACE,EACE,KAAK,EACL,UAAU,EAAE,cAAc,EAC1B,eAAe,GAAG,KAAK,EACvB,kBAAkB,GAAG,KAAK,EAC1B,kBAAkB,GAAG,KAAK,EAC1B,gBAAgB,EAChB,mBAAmB,GAAG,QAAQ,EAC9B,UAAU,GAAG,IAAI,EACjB,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAClC,eAAe,GAAG,EAAE,EACpB,WAAW,GAAG,CAAC,EACf,WAAW,GAAG,KAAK,CAAC,MAAM,CAAC,OAAO,EAClC,QAAQ,EACR,KAAK,EACL,QAAQ,EACR,GAAG,IAAI,EACR,EACD,GAAG,EACH,EAAE;IACF,MAAM,eAAe,GACnB,CAAC,KAAmB,aAAnB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,WAAW,CAAC,CAAC"}
|
|
@@ -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 "../theming";
|
|
4
4
|
const CONSTANTS = {
|
|
5
5
|
baseHeight: 42,
|
|
6
6
|
borderRadius: 4,
|
|
@@ -45,10 +45,9 @@ 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
|
|
49
48
|
color: "#FFF",
|
|
50
|
-
borderRadius:
|
|
51
|
-
backgroundColor: theme.colors.
|
|
49
|
+
borderRadius: theme.roundness,
|
|
50
|
+
backgroundColor: theme.colors.primary,
|
|
52
51
|
},
|
|
53
52
|
style,
|
|
54
53
|
], ...props }));
|
|
@@ -64,10 +63,9 @@ const Outline = ({ style, theme, ...props }) => {
|
|
|
64
63
|
return (React.createElement(Base, { style: [
|
|
65
64
|
styles.outline,
|
|
66
65
|
{
|
|
67
|
-
borderRadius:
|
|
68
|
-
borderColor: theme.colors.
|
|
69
|
-
|
|
70
|
-
color: theme.colors.branding.primary,
|
|
66
|
+
borderRadius: theme.roundness,
|
|
67
|
+
borderColor: theme.colors.primary,
|
|
68
|
+
color: theme.colors.primary,
|
|
71
69
|
},
|
|
72
70
|
style,
|
|
73
71
|
], ...props }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sourceRoot":"","sources":["../../../../src/components/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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AI,EAAE;QACJ,eAAe,EAAE,aAAa;QAC9B,OAAO,EAAE,CAAC;QACV,SAAS,EAAE,SAAS;KACrB;IACD,OAAO,EAAE;QACP,WAAW,EAAE,CAAC;KACf;IACD,IAAI,EAAE;QACJ,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,CAAC;gBACd,SAAS,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"}
|
|
@@ -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 "../../theming";
|
|
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.
|
|
23
|
-
: uncheckedColor || colors.
|
|
22
|
+
? color || colors.primary
|
|
23
|
+
: uncheckedColor || colors.primary;
|
|
24
24
|
const handlePress = () => {
|
|
25
25
|
const newValue = !internalValue;
|
|
26
26
|
setInternalValue(newValue);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"","sources":["../../../../../src/components/Checkbox/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":["../../../../../src/components/Checkbox/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,eAAe,CAAC;AAGzC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAiB1C,MAAM,QAAQ,GAAwD,CAAC,EACrE,IAAI,EACJ,MAAM,EACN,QAAQ,GAAG,KAAK,EAChB,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,cAAc,EACd,YAAY,EACZ,WAAW,GAAG,wCAAwC,EACtD,aAAa,GAAG,+CAA+C,EAC/D,IAAI,GAAG,EAAE,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,EAAE;IACH,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,KAAK,CAAC,QAAQ,CACtD,MAAM,IAAI,YAAY,IAAI,KAAK,CAChC,CAAC;IAEF,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,MAAM,IAAI,IAAI,EAAE;YAClB,gBAAgB,CAAC,MAAM,CAAC,CAAC;SAC1B;IACH,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC;IAEb,uEAAuE;IACvE,kCAAkC;IAClC,MAAM,oBAAoB,GAAG,WAAW,CAAC,YAAY,CAAwB,CAAC;IAE9E,KAAK,CAAC,SAAS,CAAC,GAAG,EAAE;QACnB,IAAI,YAAY,KAAK,oBAAoB,EAAE;YACzC,gBAA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C,aAAa,CAAC;YAC1D,oBAAC,IAAI,IACH,KAAK,EAAE;oBACL,MAAM,CAAC,IAAI;oBACX,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE;oBAC/B,EAAE,WAAW,EAAE,aAAa,EAAE;iBAC/B,GACD,CACG,CACG,CACb,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC/B,SAAS,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"}
|
|
@@ -2,7 +2,6 @@ import * as React from "react";
|
|
|
2
2
|
import { StyleProp, ViewStyle, TextStyle } from "react-native";
|
|
3
3
|
import type { IconSlot } from "../../interfaces/Icon";
|
|
4
4
|
import { CheckboxProps } from "./Checkbox";
|
|
5
|
-
import { ReadTheme } from "@draftbit/theme";
|
|
6
5
|
export declare enum Direction {
|
|
7
6
|
Row = "row",
|
|
8
7
|
RowReverse = "row-reverse"
|
|
@@ -13,7 +12,6 @@ export interface CheckboxRowProps extends CheckboxProps {
|
|
|
13
12
|
labelContainerStyle: StyleProp<ViewStyle>;
|
|
14
13
|
checkboxStyle?: StyleProp<ViewStyle>;
|
|
15
14
|
direction?: Direction;
|
|
16
|
-
theme: ReadTheme;
|
|
17
15
|
}
|
|
18
|
-
declare const
|
|
19
|
-
export default
|
|
16
|
+
declare const CheckboxRow: React.FC<CheckboxRowProps & IconSlot>;
|
|
17
|
+
export default CheckboxRow;
|
|
@@ -5,7 +5,6 @@ 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";
|
|
9
8
|
export var Direction;
|
|
10
9
|
(function (Direction) {
|
|
11
10
|
Direction["Row"] = "row";
|
|
@@ -19,7 +18,7 @@ const renderLabel = (value, labelStyle, textStyle) => {
|
|
|
19
18
|
return React.createElement(React.Fragment, null, value);
|
|
20
19
|
}
|
|
21
20
|
};
|
|
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,
|
|
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 }) => {
|
|
23
22
|
const [internalValue, setInternalValue] = React.useState(status || defaultValue || false);
|
|
24
23
|
React.useEffect(() => {
|
|
25
24
|
if (status != null) {
|
|
@@ -53,7 +52,7 @@ const CheckboxRow = ({ label = "Label", labelStyle, labelContainerStyle, checkbo
|
|
|
53
52
|
alignItems: direction === Direction.Row ? "flex-start" : "flex-end",
|
|
54
53
|
},
|
|
55
54
|
labelContainerStyle,
|
|
56
|
-
] }, renderLabel(label,
|
|
55
|
+
] }, renderLabel(label, textStyles, labelStyle)),
|
|
57
56
|
React.createElement(Checkbox, { Icon: Icon, status: internalValue, style: checkboxStyle, disabled: disabled, onPress: handlePress, color: color, uncheckedColor: uncheckedColor, checkedIcon: checkedIcon, uncheckedIcon: uncheckedIcon, size: size })));
|
|
58
57
|
};
|
|
59
58
|
const styles = StyleSheet.create({
|
|
@@ -75,5 +74,5 @@ const styles = StyleSheet.create({
|
|
|
75
74
|
flex: 3,
|
|
76
75
|
},
|
|
77
76
|
});
|
|
78
|
-
export default
|
|
77
|
+
export default CheckboxRow;
|
|
79
78
|
//# sourceMappingURL=CheckboxRow.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CheckboxRow.js","sourceRoot":"","sources":["../../../../../src/components/Checkbox/CheckboxRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,UAAU,EAEV,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,QAA2B,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"CheckboxRow.js","sourceRoot":"","sources":["../../../../../src/components/Checkbox/CheckboxRow.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAGL,UAAU,EAEV,IAAI,EACJ,QAAQ,EACR,SAAS,GACV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAGlC,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,IAAI,MAAM,SAAS,CAAC;AAC3B,OAAO,QAA2B,MAAM,YAAY,CAAC;AAErD,MAAM,CAAN,IAAY,SAGX;AAHD,WAAY,SAAS;IACnB,wBAAW,CAAA;IACX,uCAA0B,CAAA;AAC5B,CAAC,EAHW,SAAS,KAAT,SAAS,QAGpB;AAUD,MAAM,WAAW,GAAG,CAClB,KAA+B,EAC/B,UAAgC,EAChC,SAA+B,EAC/B,EA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E;QACb,UAAU,EAAE,EAAE;QACd,OAAO,EAAE,MAAM;QACf,GAAG,QAAQ,CAAC,MAAM,CAAC;YACjB,GAAG,EAAE;gBACH,MAAM,EAAE,SAAS;gBACjB,UAAU,EAAE,MAAM;aACnB;SACF,CAAC;KACH;IACD,KAAK,EAAE;QACL,IAAI,EAAE,CAAC;KACR;CACF,CAAC,CAAC;AAEH,eAAe,WAAW,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import { StyleProp, ViewStyle, TextStyle, TextInputProps } from "react-native";
|
|
3
|
-
import type {
|
|
3
|
+
import type { Theme } from "../../styles/DefaultTheme";
|
|
4
4
|
import type { IconSlot } from "../../interfaces/Icon";
|
|
5
5
|
declare type Props = {
|
|
6
6
|
style?: StyleProp<ViewStyle | TextStyle> & {
|
|
7
7
|
height?: number;
|
|
8
8
|
};
|
|
9
|
-
theme:
|
|
9
|
+
theme: Theme;
|
|
10
10
|
date?: Date | string;
|
|
11
11
|
format?: string;
|
|
12
12
|
onDateChange?: (data?: Date) => void;
|
|
@@ -28,5 +28,7 @@ declare type Props = {
|
|
|
28
28
|
maximumDate?: Date | string;
|
|
29
29
|
hideLabel?: boolean;
|
|
30
30
|
} & IconSlot & TextInputProps;
|
|
31
|
-
declare const _default: React.ComponentType<
|
|
31
|
+
declare const _default: React.ComponentType<import("@draftbit/react-theme-provider").$Without<React.PropsWithChildren<Props>, "theme"> & {
|
|
32
|
+
theme?: import("@draftbit/react-theme-provider").$DeepPartial<any> | undefined;
|
|
33
|
+
}> & import("@draftbit/react-theme-provider/typings/hoist-non-react-statics").NonReactStatics<React.ComponentType<React.PropsWithChildren<Props>> & React.FC<React.PropsWithChildren<Props>>, {}>;
|
|
32
34
|
export default _default;
|
|
@@ -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 "../../theming";
|
|
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 }, 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
|
|
29
|
+
const DatePicker = ({ Icon, style, theme: { colors, typography, roundness, disabledOpacity }, 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;
|
|
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 }, date, onDateCh
|
|
|
139
139
|
? labelSize
|
|
140
140
|
: typography.caption.fontSize;
|
|
141
141
|
const hasActiveOutline = focused;
|
|
142
|
-
|
|
143
|
-
inputTextColor =
|
|
142
|
+
const propOrStyleBorderColor = (_a = viewStyles.borderColor) !== null && _a !== void 0 ? _a : inputBorderColor;
|
|
143
|
+
let inputTextColor, activeColor, underlineColor, borderColor = propOrStyleBorderColor, placeholderColor, containerStyle, backgroundColor, inputStyle;
|
|
144
|
+
inputTextColor = colors.strong;
|
|
144
145
|
if (disabled) {
|
|
145
|
-
activeColor = colors.
|
|
146
|
-
placeholderColor = colors.
|
|
146
|
+
activeColor = colors.light;
|
|
147
|
+
placeholderColor = colors.light;
|
|
147
148
|
borderColor = "transparent";
|
|
148
149
|
underlineColor = "transparent";
|
|
149
|
-
backgroundColor = colors.
|
|
150
|
+
backgroundColor = colors.divider;
|
|
150
151
|
}
|
|
151
152
|
else {
|
|
152
|
-
activeColor = inputBorderColorActive || colors.
|
|
153
|
-
placeholderColor = colors.
|
|
154
|
-
underlineColor =
|
|
155
|
-
|
|
156
|
-
backgroundColor = colors.background.brand;
|
|
153
|
+
activeColor = inputBorderColorActive || colors.primary;
|
|
154
|
+
placeholderColor = colors.light;
|
|
155
|
+
underlineColor = propOrStyleBorderColor || colors.light;
|
|
156
|
+
backgroundColor = colors.background;
|
|
157
157
|
}
|
|
158
158
|
const { lineHeight, ...subtitle1 } = typography.subtitle1;
|
|
159
159
|
inputStyle = {
|
|
@@ -168,23 +168,22 @@ const DatePicker = ({ Icon, style, theme: { colors, typography }, date, onDateCh
|
|
|
168
168
|
};
|
|
169
169
|
if (type === "underline") {
|
|
170
170
|
containerStyle = {
|
|
171
|
-
borderTopLeftRadius:
|
|
172
|
-
borderTopRightRadius:
|
|
171
|
+
borderTopLeftRadius: roundness,
|
|
172
|
+
borderTopRightRadius: roundness,
|
|
173
173
|
paddingBottom: 12,
|
|
174
174
|
marginTop: 16,
|
|
175
175
|
};
|
|
176
176
|
}
|
|
177
177
|
else {
|
|
178
178
|
containerStyle = {
|
|
179
|
-
borderRadius:
|
|
179
|
+
borderRadius: roundness,
|
|
180
180
|
borderColor: hasActiveOutline ? activeColor : borderColor,
|
|
181
|
-
borderWidth: (
|
|
181
|
+
borderWidth: (_b = viewStyles.borderWidth) !== null && _b !== void 0 ? _b : 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 ? disabledOpacity : 1,
|
|
185
185
|
backgroundColor,
|
|
186
186
|
};
|
|
187
|
-
//@ts-ignore
|
|
188
187
|
inputStyle.paddingHorizontal = 12;
|
|
189
188
|
}
|
|
190
189
|
if (leftIconName && leftIconMode === "outset") {
|
|
@@ -192,10 +191,10 @@ const DatePicker = ({ Icon, style, theme: { colors, typography }, date, onDateCh
|
|
|
192
191
|
}
|
|
193
192
|
let leftIconColor;
|
|
194
193
|
if (focused) {
|
|
195
|
-
leftIconColor = colors.
|
|
194
|
+
leftIconColor = colors.primary;
|
|
196
195
|
}
|
|
197
196
|
else {
|
|
198
|
-
leftIconColor = colors.
|
|
197
|
+
leftIconColor = colors.light;
|
|
199
198
|
}
|
|
200
199
|
const leftIconProps = {
|
|
201
200
|
size: 24,
|
|
@@ -312,7 +311,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography }, date, onDateCh
|
|
|
312
311
|
type === "solid" ? { paddingHorizontal: 12 } : {},
|
|
313
312
|
labelStyle,
|
|
314
313
|
{
|
|
315
|
-
color: labelColor || colors.
|
|
314
|
+
color: labelColor || colors.light,
|
|
316
315
|
opacity: labeled.interpolate({
|
|
317
316
|
inputRange: [0, 1],
|
|
318
317
|
outputRange: [hasActiveOutline ? 1 : 0, 0],
|
|
@@ -333,7 +332,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography }, date, onDateCh
|
|
|
333
332
|
marginLeft: type === "solid" ? 16 : 0,
|
|
334
333
|
} })) : null,
|
|
335
334
|
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 })),
|
|
336
|
-
rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.
|
|
335
|
+
rightIconName ? (React.createElement(Icon, { name: rightIconName, size: ICON_SIZE, color: colors.light, style: {
|
|
337
336
|
position: "absolute",
|
|
338
337
|
right: 16,
|
|
339
338
|
marginTop: type === "solid" ? MINIMIZED_LABEL_FONT_SIZE + 4 : 16,
|
|
@@ -342,7 +341,7 @@ const DatePicker = ({ Icon, style, theme: { colors, typography }, date, onDateCh
|
|
|
342
341
|
React.createElement(View, { style: [
|
|
343
342
|
styles.picker,
|
|
344
343
|
{
|
|
345
|
-
backgroundColor: colors.
|
|
344
|
+
backgroundColor: colors.divider,
|
|
346
345
|
},
|
|
347
346
|
] },
|
|
348
347
|
React.createElement(View, { style: [
|