@draftbit/core 50.1.2 → 50.1.3-46a10c.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/Provider.js +1 -1
- package/lib/commonjs/components/AccordionGroup.js +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +1 -1
- package/lib/commonjs/components/Button.js +1 -1
- package/lib/commonjs/components/Checkbox/Checkbox.js +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePicker.js +1 -1
- package/lib/commonjs/components/DatePicker/DatePickerComponent.web.js +1 -1
- package/lib/commonjs/components/DeckSwiper/DeckSwiperCard.js +1 -1
- package/lib/commonjs/components/Divider.js +1 -1
- package/lib/commonjs/components/Elevation.js +1 -1
- package/lib/commonjs/components/IconButton.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +1 -1
- package/lib/commonjs/components/MediaPlayer/AudioPlayer/index.js +1 -1
- package/lib/commonjs/components/Picker/NativePicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/DropDownModalPicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/DropDownPicker.js +1 -1
- package/lib/commonjs/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/lib/commonjs/components/Picker/index.js +1 -1
- package/lib/commonjs/components/PinInput/PinInput.js +1 -1
- package/lib/commonjs/components/PinInput/PinInputText.js +1 -1
- package/lib/commonjs/components/Portal/Portal.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/lib/commonjs/components/Progress/CircularProgress/index.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/lib/commonjs/components/Progress/LinearProgress/index.js +1 -1
- package/lib/commonjs/components/ProgressIndicator.js +1 -1
- package/lib/commonjs/components/RadioButton/RadioButtonRow.js +1 -1
- package/lib/commonjs/components/Row.js +1 -1
- package/lib/commonjs/components/ScreenContainer.js +1 -1
- package/lib/commonjs/components/SectionList/SectionHeader.js +1 -1
- package/lib/commonjs/components/Slider.js +1 -1
- package/lib/commonjs/components/StarRating.js +1 -1
- package/lib/commonjs/components/Stepper.js +1 -1
- package/lib/commonjs/components/Surface.js +1 -1
- package/lib/commonjs/components/SwipeableItem/SwipeableItem.js +1 -1
- package/lib/commonjs/components/Swiper/Swiper.js +1 -1
- package/lib/commonjs/components/Switch.js +1 -1
- package/lib/commonjs/components/TabView/TabView.js +1 -1
- package/lib/commonjs/components/Table/Table.js +1 -1
- package/lib/commonjs/components/Table/TableRow.js +1 -1
- package/lib/commonjs/components/Text.js +1 -1
- package/lib/commonjs/components/TextField.js +1 -1
- package/lib/commonjs/components/TextInput.js +1 -1
- package/lib/commonjs/components/Typography.js +1 -1
- package/lib/commonjs/deprecated-components/AccordionItem.js +1 -1
- package/lib/commonjs/deprecated-components/AvatarEdit.js +1 -1
- package/lib/commonjs/deprecated-components/Banner.js +1 -1
- package/lib/commonjs/deprecated-components/Card.js +1 -1
- package/lib/commonjs/deprecated-components/Container.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedButton.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/lib/commonjs/deprecated-components/DeprecatedFAB.js +1 -1
- package/lib/commonjs/deprecated-components/FAB.js +1 -1
- package/lib/commonjs/deprecated-components/FieldSearchBarFull.js +1 -1
- package/lib/commonjs/deprecated-components/ProgressCircle.js +1 -1
- package/lib/commonjs/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/lib/commonjs/deprecated-components/RowBodyIcon.js +1 -1
- package/lib/commonjs/deprecated-components/RowHeadlineImageCaption.js +1 -1
- package/lib/commonjs/deprecated-components/RowHeadlineImageIcon.js +1 -1
- package/lib/commonjs/deprecated-components/ToggleButton.js +1 -1
- package/lib/commonjs/index.js +1 -1
- package/lib/typescript/src/Provider.d.ts +7 -5
- package/lib/typescript/src/Provider.js +4 -4
- package/lib/typescript/src/Provider.js.map +1 -1
- package/lib/typescript/src/components/AccordionGroup.d.ts +3 -5
- package/lib/typescript/src/components/AccordionGroup.js +3 -3
- package/lib/typescript/src/components/AccordionGroup.js.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +3 -5
- package/lib/typescript/src/components/BottomSheet/BottomSheet.js +4 -4
- package/lib/typescript/src/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/typescript/src/components/Button.js +8 -6
- package/lib/typescript/src/components/Button.js.map +1 -1
- package/lib/typescript/src/components/Checkbox/Checkbox.js +3 -3
- package/lib/typescript/src/components/Checkbox/Checkbox.js.map +1 -1
- package/lib/typescript/src/components/Checkbox/CheckboxRow.d.ts +4 -2
- package/lib/typescript/src/components/Checkbox/CheckboxRow.js +4 -3
- package/lib/typescript/src/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePicker.d.ts +3 -5
- package/lib/typescript/src/components/DatePicker/DatePicker.js +24 -23
- package/lib/typescript/src/components/DatePicker/DatePicker.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.d.ts +4 -12654
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js +8 -6
- package/lib/typescript/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/lib/typescript/src/components/DatePicker/DatePickerComponentType.d.ts +2 -2
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.d.ts +3 -5
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
- package/lib/typescript/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
- package/lib/typescript/src/components/Divider.d.ts +3 -5
- package/lib/typescript/src/components/Divider.js +2 -2
- package/lib/typescript/src/components/Divider.js.map +1 -1
- package/lib/typescript/src/components/Elevation.d.ts +3 -5
- package/lib/typescript/src/components/Elevation.js +3 -4
- package/lib/typescript/src/components/Elevation.js.map +1 -1
- package/lib/typescript/src/components/FormRow.d.ts +1 -2
- package/lib/typescript/src/components/FormRow.js.map +1 -1
- package/lib/typescript/src/components/IconButton.d.ts +3 -5
- package/lib/typescript/src/components/IconButton.js +2 -2
- package/lib/typescript/src/components/IconButton.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.d.ts +0 -2
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.d.ts +5 -4
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +10 -13
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.d.ts +2 -4
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js +1 -3
- package/lib/typescript/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
- package/lib/typescript/src/components/Picker/NativePicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/NativePicker.js +5 -2
- package/lib/typescript/src/components/Picker/NativePicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/PickerCommon.d.ts +2 -2
- package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.js +2 -2
- package/lib/typescript/src/components/Picker/dropdown/DropDownModalPicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.js +2 -2
- package/lib/typescript/src/components/Picker/dropdown/DropDownPicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.d.ts +1 -3
- package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/lib/typescript/src/components/Picker/dropdown/MultiSelectPicker.js.map +1 -1
- package/lib/typescript/src/components/Picker/index.d.ts +1 -3
- package/lib/typescript/src/components/Picker/index.js +1 -1
- package/lib/typescript/src/components/Picker/index.js.map +1 -1
- package/lib/typescript/src/components/PinInput/PinInput.d.ts +3 -5
- package/lib/typescript/src/components/PinInput/PinInput.js +4 -4
- package/lib/typescript/src/components/PinInput/PinInput.js.map +1 -1
- package/lib/typescript/src/components/PinInput/PinInputText.d.ts +3 -5
- package/lib/typescript/src/components/PinInput/PinInputText.js +2 -2
- package/lib/typescript/src/components/PinInput/PinInputText.js.map +1 -1
- package/lib/typescript/src/components/Portal/Portal.d.ts +1 -9
- package/lib/typescript/src/components/Portal/Portal.js +3 -5
- package/lib/typescript/src/components/Portal/Portal.js.map +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/index.d.ts +1 -3
- package/lib/typescript/src/components/Progress/CircularProgress/index.js +1 -1
- package/lib/typescript/src/components/Progress/CircularProgress/index.js.map +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/index.d.ts +1 -3
- package/lib/typescript/src/components/Progress/LinearProgress/index.js +1 -1
- package/lib/typescript/src/components/Progress/LinearProgress/index.js.map +1 -1
- package/lib/typescript/src/components/Progress/ProgressCommon.d.ts +2 -2
- package/lib/typescript/src/components/ProgressIndicator.d.ts +10 -13
- package/lib/typescript/src/components/ProgressIndicator.js +1 -1
- package/lib/typescript/src/components/ProgressIndicator.js.map +1 -1
- package/lib/typescript/src/components/RadioButton/RadioButtonGroup.d.ts +2 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.d.ts +4 -2
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.js +4 -3
- package/lib/typescript/src/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/lib/typescript/src/components/Row.d.ts +3 -5
- package/lib/typescript/src/components/Row.js +1 -1
- package/lib/typescript/src/components/Row.js.map +1 -1
- package/lib/typescript/src/components/ScreenContainer.d.ts +3 -6
- package/lib/typescript/src/components/ScreenContainer.js +2 -2
- package/lib/typescript/src/components/ScreenContainer.js.map +1 -1
- package/lib/typescript/src/components/SectionList/SectionHeader.d.ts +3 -5
- package/lib/typescript/src/components/SectionList/SectionHeader.js +3 -3
- package/lib/typescript/src/components/SectionList/SectionHeader.js.map +1 -1
- package/lib/typescript/src/components/Slider.d.ts +3 -6
- package/lib/typescript/src/components/Slider.js +6 -6
- package/lib/typescript/src/components/Slider.js.map +1 -1
- package/lib/typescript/src/components/StarRating.d.ts +3 -5
- package/lib/typescript/src/components/StarRating.js +1 -1
- package/lib/typescript/src/components/StarRating.js.map +1 -1
- package/lib/typescript/src/components/Stepper.d.ts +3 -5
- package/lib/typescript/src/components/Stepper.js +3 -2
- package/lib/typescript/src/components/Stepper.js.map +1 -1
- package/lib/typescript/src/components/Surface.d.ts +3 -5
- package/lib/typescript/src/components/Surface.js +3 -10
- package/lib/typescript/src/components/Surface.js.map +1 -1
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.d.ts +3 -5
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js +10 -5
- package/lib/typescript/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/lib/typescript/src/components/Swiper/Swiper.d.ts +4 -2
- package/lib/typescript/src/components/Swiper/Swiper.js +3 -2
- package/lib/typescript/src/components/Swiper/Swiper.js.map +1 -1
- package/lib/typescript/src/components/Switch.d.ts +7 -24
- package/lib/typescript/src/components/Switch.js +3 -4
- package/lib/typescript/src/components/Switch.js.map +1 -1
- package/lib/typescript/src/components/TabView/TabView.d.ts +3 -5
- package/lib/typescript/src/components/TabView/TabView.js +4 -4
- package/lib/typescript/src/components/TabView/TabView.js.map +1 -1
- package/lib/typescript/src/components/Table/Table.d.ts +3 -5
- package/lib/typescript/src/components/Table/Table.js +2 -2
- package/lib/typescript/src/components/Table/Table.js.map +1 -1
- package/lib/typescript/src/components/Table/TableRow.d.ts +3 -5
- package/lib/typescript/src/components/Table/TableRow.js +4 -2
- package/lib/typescript/src/components/Table/TableRow.js.map +1 -1
- package/lib/typescript/src/components/Text.d.ts +3 -9
- package/lib/typescript/src/components/Text.js +2 -2
- package/lib/typescript/src/components/Text.js.map +1 -1
- package/lib/typescript/src/components/TextField.d.ts +4 -41
- package/lib/typescript/src/components/TextField.js +22 -20
- package/lib/typescript/src/components/TextField.js.map +1 -1
- package/lib/typescript/src/components/TextInput.js +3 -0
- package/lib/typescript/src/components/TextInput.js.map +1 -1
- package/lib/typescript/src/components/Typography.d.ts +5 -11
- package/lib/typescript/src/components/Typography.js +4 -4
- package/lib/typescript/src/components/Typography.js.map +1 -1
- package/lib/typescript/src/deprecated-components/AccordionItem.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/AccordionItem.js +2 -2
- package/lib/typescript/src/deprecated-components/AccordionItem.js.map +1 -1
- package/lib/typescript/src/deprecated-components/AvatarEdit.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/AvatarEdit.js +4 -4
- package/lib/typescript/src/deprecated-components/AvatarEdit.js.map +1 -1
- package/lib/typescript/src/deprecated-components/Banner.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/Banner.js +4 -5
- package/lib/typescript/src/deprecated-components/Banner.js.map +1 -1
- package/lib/typescript/src/deprecated-components/Card.d.ts +6 -18
- package/lib/typescript/src/deprecated-components/Card.js +3 -3
- package/lib/typescript/src/deprecated-components/Card.js.map +1 -1
- package/lib/typescript/src/deprecated-components/CheckboxGroup.d.ts +2 -2
- package/lib/typescript/src/deprecated-components/Container.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/Container.js +1 -1
- package/lib/typescript/src/deprecated-components/Container.js.map +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedButton.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/DeprecatedButton.js +8 -8
- package/lib/typescript/src/deprecated-components/DeprecatedButton.js.map +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedCardWrapper.js.map +1 -1
- package/lib/typescript/src/deprecated-components/DeprecatedFAB.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/DeprecatedFAB.js +8 -8
- package/lib/typescript/src/deprecated-components/DeprecatedFAB.js.map +1 -1
- package/lib/typescript/src/deprecated-components/FAB.d.ts +3 -8
- package/lib/typescript/src/deprecated-components/FAB.js +2 -2
- package/lib/typescript/src/deprecated-components/FAB.js.map +1 -1
- package/lib/typescript/src/deprecated-components/FieldSearchBarFull.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/FieldSearchBarFull.js +4 -4
- package/lib/typescript/src/deprecated-components/FieldSearchBarFull.js.map +1 -1
- package/lib/typescript/src/deprecated-components/ProgressCircle.d.ts +5 -8
- package/lib/typescript/src/deprecated-components/ProgressCircle.js +3 -3
- package/lib/typescript/src/deprecated-components/ProgressCircle.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.d.ts +1 -3
- package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/lib/typescript/src/deprecated-components/RadioButtonFieldGroup.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RowBodyIcon.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/RowBodyIcon.js +2 -2
- package/lib/typescript/src/deprecated-components/RowBodyIcon.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.js +3 -3
- package/lib/typescript/src/deprecated-components/RowHeadlineImageCaption.js.map +1 -1
- package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.d.ts +3 -5
- package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.js +3 -3
- package/lib/typescript/src/deprecated-components/RowHeadlineImageIcon.js.map +1 -1
- package/lib/typescript/src/deprecated-components/ToggleButton.d.ts +6 -9
- package/lib/typescript/src/deprecated-components/ToggleButton.js +5 -5
- package/lib/typescript/src/deprecated-components/ToggleButton.js.map +1 -1
- package/lib/typescript/src/index.d.ts +0 -2
- package/lib/typescript/src/index.js +0 -2
- package/lib/typescript/src/index.js.map +1 -1
- package/lib/typescript/tsconfig.tsbuildinfo +1 -1
- package/package.json +5 -5
- package/src/Provider.js +4 -4
- package/src/Provider.js.map +1 -1
- package/src/Provider.tsx +15 -12
- package/src/components/AccordionGroup.js +3 -3
- package/src/components/AccordionGroup.js.map +1 -1
- package/src/components/AccordionGroup.tsx +5 -5
- package/src/components/BottomSheet/BottomSheet.js +4 -4
- package/src/components/BottomSheet/BottomSheet.js.map +1 -1
- package/src/components/BottomSheet/BottomSheet.tsx +7 -7
- package/src/components/Button.js +8 -6
- package/src/components/Button.js.map +1 -1
- package/src/components/Button.tsx +10 -10
- package/src/components/Checkbox/Checkbox.js +3 -3
- package/src/components/Checkbox/Checkbox.js.map +1 -1
- package/src/components/Checkbox/Checkbox.tsx +3 -3
- package/src/components/Checkbox/CheckboxRow.js +4 -3
- package/src/components/Checkbox/CheckboxRow.js.map +1 -1
- package/src/components/Checkbox/CheckboxRow.tsx +9 -2
- package/src/components/DatePicker/DatePicker.js +24 -23
- package/src/components/DatePicker/DatePicker.js.map +1 -1
- package/src/components/DatePicker/DatePicker.tsx +25 -24
- package/src/components/DatePicker/DatePickerComponent.web.js +8 -6
- package/src/components/DatePicker/DatePickerComponent.web.js.map +1 -1
- package/src/components/DatePicker/DatePickerComponent.web.tsx +15 -8
- package/src/components/DatePicker/DatePickerComponentType.ts +2 -3
- package/src/components/DeckSwiper/DeckSwiperCard.js +3 -3
- package/src/components/DeckSwiper/DeckSwiperCard.js.map +1 -1
- package/src/components/DeckSwiper/DeckSwiperCard.tsx +5 -5
- package/src/components/Divider.js +2 -2
- package/src/components/Divider.js.map +1 -1
- package/src/components/Divider.tsx +4 -4
- package/src/components/Elevation.js +3 -4
- package/src/components/Elevation.js.map +1 -1
- package/src/components/Elevation.tsx +5 -6
- package/src/components/FormRow.js.map +1 -1
- package/src/components/FormRow.tsx +1 -2
- package/src/components/IconButton.js +2 -2
- package/src/components/IconButton.js.map +1 -1
- package/src/components/IconButton.tsx +4 -4
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerCommon.ts +0 -2
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js +10 -13
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.js.map +1 -1
- package/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx +19 -19
- package/src/components/MediaPlayer/AudioPlayer/index.js +1 -3
- package/src/components/MediaPlayer/AudioPlayer/index.js.map +1 -1
- package/src/components/MediaPlayer/AudioPlayer/index.tsx +1 -3
- package/src/components/Picker/NativePicker.js +5 -2
- package/src/components/Picker/NativePicker.js.map +1 -1
- package/src/components/Picker/NativePicker.tsx +5 -2
- package/src/components/Picker/PickerCommon.ts +2 -2
- package/src/components/Picker/dropdown/DropDownModalPicker.js +2 -2
- package/src/components/Picker/dropdown/DropDownModalPicker.js.map +1 -1
- package/src/components/Picker/dropdown/DropDownModalPicker.tsx +5 -5
- package/src/components/Picker/dropdown/DropDownPicker.js +2 -2
- package/src/components/Picker/dropdown/DropDownPicker.js.map +1 -1
- package/src/components/Picker/dropdown/DropDownPicker.tsx +5 -5
- package/src/components/Picker/dropdown/MultiSelectPicker.js +1 -1
- package/src/components/Picker/dropdown/MultiSelectPicker.js.map +1 -1
- package/src/components/Picker/dropdown/MultiSelectPicker.tsx +1 -1
- package/src/components/Picker/index.js +1 -1
- package/src/components/Picker/index.js.map +1 -1
- package/src/components/Picker/index.tsx +1 -1
- package/src/components/PinInput/PinInput.js +4 -4
- package/src/components/PinInput/PinInput.js.map +1 -1
- package/src/components/PinInput/PinInput.tsx +6 -6
- package/src/components/PinInput/PinInputText.js +2 -2
- package/src/components/PinInput/PinInputText.js.map +1 -1
- package/src/components/PinInput/PinInputText.tsx +4 -4
- package/src/components/Portal/Portal.js +3 -5
- package/src/components/Portal/Portal.js.map +1 -1
- package/src/components/Portal/Portal.tsx +3 -10
- package/src/components/Progress/CircularProgress/CircularProgress.js +1 -1
- package/src/components/Progress/CircularProgress/CircularProgress.js.map +1 -1
- package/src/components/Progress/CircularProgress/CircularProgress.tsx +2 -2
- package/src/components/Progress/CircularProgress/index.js +1 -1
- package/src/components/Progress/CircularProgress/index.js.map +1 -1
- package/src/components/Progress/CircularProgress/index.tsx +1 -1
- package/src/components/Progress/LinearProgress/LinearProgress.js +1 -1
- package/src/components/Progress/LinearProgress/LinearProgress.js.map +1 -1
- package/src/components/Progress/LinearProgress/LinearProgress.tsx +2 -2
- package/src/components/Progress/LinearProgress/index.js +1 -1
- package/src/components/Progress/LinearProgress/index.js.map +1 -1
- package/src/components/Progress/LinearProgress/index.tsx +1 -1
- package/src/components/Progress/ProgressCommon.ts +2 -2
- package/src/components/ProgressIndicator.js +1 -1
- package/src/components/ProgressIndicator.js.map +1 -1
- package/src/components/ProgressIndicator.tsx +10 -11
- package/src/components/RadioButton/RadioButtonGroup.tsx +2 -2
- package/src/components/RadioButton/RadioButtonRow.js +4 -3
- package/src/components/RadioButton/RadioButtonRow.js.map +1 -1
- package/src/components/RadioButton/RadioButtonRow.tsx +9 -2
- package/src/components/Row.js +1 -1
- package/src/components/Row.js.map +1 -1
- package/src/components/Row.tsx +3 -3
- package/src/components/ScreenContainer.js +2 -2
- package/src/components/ScreenContainer.js.map +1 -1
- package/src/components/ScreenContainer.tsx +4 -4
- package/src/components/SectionList/SectionHeader.js +3 -3
- package/src/components/SectionList/SectionHeader.js.map +1 -1
- package/src/components/SectionList/SectionHeader.tsx +5 -5
- package/src/components/Slider.js +6 -6
- package/src/components/Slider.js.map +1 -1
- package/src/components/Slider.tsx +8 -8
- package/src/components/StarRating.js +1 -1
- package/src/components/StarRating.js.map +1 -1
- package/src/components/StarRating.tsx +3 -3
- package/src/components/Stepper.js +3 -2
- package/src/components/Stepper.js.map +1 -1
- package/src/components/Stepper.tsx +5 -4
- package/src/components/Surface.js +3 -10
- package/src/components/Surface.js.map +1 -1
- package/src/components/Surface.tsx +5 -12
- package/src/components/SwipeableItem/SwipeableItem.js +10 -5
- package/src/components/SwipeableItem/SwipeableItem.js.map +1 -1
- package/src/components/SwipeableItem/SwipeableItem.tsx +13 -7
- package/src/components/Swiper/Swiper.js +3 -2
- package/src/components/Swiper/Swiper.js.map +1 -1
- package/src/components/Swiper/Swiper.tsx +6 -3
- package/src/components/Switch.js +3 -4
- package/src/components/Switch.js.map +1 -1
- package/src/components/Switch.tsx +7 -7
- package/src/components/TabView/TabView.js +4 -4
- package/src/components/TabView/TabView.js.map +1 -1
- package/src/components/TabView/TabView.tsx +7 -7
- package/src/components/Table/Table.js +2 -2
- package/src/components/Table/Table.js.map +1 -1
- package/src/components/Table/Table.tsx +4 -4
- package/src/components/Table/TableRow.js +4 -2
- package/src/components/Table/TableRow.js.map +1 -1
- package/src/components/Table/TableRow.tsx +6 -4
- package/src/components/Text.js +2 -2
- package/src/components/Text.js.map +1 -1
- package/src/components/Text.tsx +4 -4
- package/src/components/TextField.js +22 -20
- package/src/components/TextField.js.map +1 -1
- package/src/components/TextField.tsx +26 -23
- package/src/components/TextInput.js +3 -0
- package/src/components/TextInput.js.map +1 -1
- package/src/components/TextInput.tsx +3 -0
- package/src/components/Typography.js +4 -4
- package/src/components/Typography.js.map +1 -1
- package/src/components/Typography.tsx +6 -6
- package/src/deprecated-components/AccordionItem.js +2 -2
- package/src/deprecated-components/AccordionItem.js.map +1 -1
- package/src/deprecated-components/AccordionItem.tsx +4 -4
- package/src/deprecated-components/AvatarEdit.js +4 -4
- package/src/deprecated-components/AvatarEdit.js.map +1 -1
- package/src/deprecated-components/AvatarEdit.tsx +6 -6
- package/src/deprecated-components/Banner.js +4 -5
- package/src/deprecated-components/Banner.js.map +1 -1
- package/src/deprecated-components/Banner.tsx +6 -10
- package/src/deprecated-components/Card.js +3 -3
- package/src/deprecated-components/Card.js.map +1 -1
- package/src/deprecated-components/Card.tsx +10 -6
- package/src/deprecated-components/CheckboxGroup.tsx +2 -2
- package/src/deprecated-components/Container.js +1 -1
- package/src/deprecated-components/Container.js.map +1 -1
- package/src/deprecated-components/Container.tsx +3 -3
- package/src/deprecated-components/DeprecatedButton.js +8 -8
- package/src/deprecated-components/DeprecatedButton.js.map +1 -1
- package/src/deprecated-components/DeprecatedButton.tsx +10 -10
- package/src/deprecated-components/DeprecatedCardWrapper.js +1 -1
- package/src/deprecated-components/DeprecatedCardWrapper.js.map +1 -1
- package/src/deprecated-components/DeprecatedCardWrapper.tsx +3 -3
- package/src/deprecated-components/DeprecatedFAB.js +8 -8
- package/src/deprecated-components/DeprecatedFAB.js.map +1 -1
- package/src/deprecated-components/DeprecatedFAB.tsx +10 -10
- package/src/deprecated-components/FAB.js +2 -2
- package/src/deprecated-components/FAB.js.map +1 -1
- package/src/deprecated-components/FAB.tsx +4 -4
- package/src/deprecated-components/FieldSearchBarFull.js +4 -4
- package/src/deprecated-components/FieldSearchBarFull.js.map +1 -1
- package/src/deprecated-components/FieldSearchBarFull.tsx +6 -6
- package/src/deprecated-components/ProgressCircle.js +3 -3
- package/src/deprecated-components/ProgressCircle.js.map +1 -1
- package/src/deprecated-components/ProgressCircle.tsx +7 -8
- package/src/deprecated-components/RadioButtonFieldGroup.js +1 -1
- package/src/deprecated-components/RadioButtonFieldGroup.js.map +1 -1
- package/src/deprecated-components/RadioButtonFieldGroup.tsx +1 -1
- package/src/deprecated-components/RowBodyIcon.js +2 -2
- package/src/deprecated-components/RowBodyIcon.js.map +1 -1
- package/src/deprecated-components/RowBodyIcon.tsx +6 -6
- package/src/deprecated-components/RowHeadlineImageCaption.js +3 -3
- package/src/deprecated-components/RowHeadlineImageCaption.js.map +1 -1
- package/src/deprecated-components/RowHeadlineImageCaption.tsx +6 -6
- package/src/deprecated-components/RowHeadlineImageIcon.js +3 -3
- package/src/deprecated-components/RowHeadlineImageIcon.js.map +1 -1
- package/src/deprecated-components/RowHeadlineImageIcon.tsx +6 -6
- package/src/deprecated-components/ToggleButton.js +5 -5
- package/src/deprecated-components/ToggleButton.js.map +1 -1
- package/src/deprecated-components/ToggleButton.tsx +12 -11
- package/src/index.js +0 -2
- package/src/index.js.map +1 -1
- package/src/index.tsx +0 -2
- package/lib/commonjs/styles/DarkTheme.js +0 -1
- package/lib/commonjs/styles/DefaultTheme.js +0 -1
- package/lib/commonjs/styles/fonts.js +0 -1
- package/lib/commonjs/styles/overlay.js +0 -1
- package/lib/commonjs/styles/shadow.js +0 -1
- package/lib/commonjs/theming.js +0 -1
- package/lib/typescript/src/styles/DarkTheme.d.ts +0 -3
- package/lib/typescript/src/styles/DarkTheme.js +0 -27
- package/lib/typescript/src/styles/DarkTheme.js.map +0 -1
- package/lib/typescript/src/styles/DefaultTheme.d.ts +0 -4218
- package/lib/typescript/src/styles/DefaultTheme.js +0 -112
- package/lib/typescript/src/styles/DefaultTheme.js.map +0 -1
- package/lib/typescript/src/styles/fonts.d.ts +0 -5
- package/lib/typescript/src/styles/fonts.js +0 -63
- package/lib/typescript/src/styles/fonts.js.map +0 -1
- package/lib/typescript/src/styles/overlay.d.ts +0 -2
- package/lib/typescript/src/styles/overlay.js +0 -61
- package/lib/typescript/src/styles/overlay.js.map +0 -1
- package/lib/typescript/src/styles/shadow.d.ts +0 -23
- package/lib/typescript/src/styles/shadow.js +0 -52
- package/lib/typescript/src/styles/shadow.js.map +0 -1
- package/lib/typescript/src/theming.d.ts +0 -8
- package/lib/typescript/src/theming.js +0 -4
- package/lib/typescript/src/theming.js.map +0 -1
- package/src/styles/DarkTheme.js +0 -27
- package/src/styles/DarkTheme.js.map +0 -1
- package/src/styles/DarkTheme.tsx +0 -30
- package/src/styles/DefaultTheme.js +0 -112
- package/src/styles/DefaultTheme.js.map +0 -1
- package/src/styles/DefaultTheme.tsx +0 -114
- package/src/styles/fonts.js +0 -63
- package/src/styles/fonts.js.map +0 -1
- package/src/styles/fonts.tsx +0 -67
- package/src/styles/overlay.js +0 -61
- package/src/styles/overlay.js.map +0 -1
- package/src/styles/overlay.tsx +0 -69
- package/src/styles/shadow.js +0 -52
- package/src/styles/shadow.js.map +0 -1
- package/src/styles/shadow.tsx +0 -55
- package/src/theming.js +0 -4
- package/src/theming.js.map +0 -1
- package/src/theming.tsx +0 -6
package/lib/commonjs/Provider.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/Provider.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/Provider.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import React from"react";import PortalHost from"./components/Portal/PortalHost";import{ThemeProvider}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var Provider=function(_React$Component){_inherits(Provider,_React$Component);var _super=_createSuper(Provider);function Provider(){_classCallCheck(this,Provider);return _super.apply(this,arguments);}_createClass(Provider,[{key:"render",value:function render(){return _jsx(ThemeProvider,{themes:this.props.themes,breakpoints:this.props.breakpoints,initialThemeName:this.props.initialThemeName,children:_jsx(PortalHost,{children:this.props.children})});}}]);return Provider;}(React.Component);export{Provider as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/AccordionGroup.tsx";import*as React from"react";import{View,StyleSheet,Pressable}from"react-native";import Text from"./Text";import{withTheme}from"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/AccordionGroup.tsx";import*as React from"react";import{View,StyleSheet,Pressable}from"react-native";import Text from"./Text";import{withTheme}from"@draftbit/theme";import{extractStyles}from"../utilities";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";var AccordionGroup=function AccordionGroup(_ref){var label=_ref.label,_ref$expanded=_ref.expanded,expandedProp=_ref$expanded===void 0?false:_ref$expanded,openColor=_ref.openColor,closedColor=_ref.closedColor,caretColorProp=_ref.caretColor,_ref$caretSize=_ref.caretSize,caretSize=_ref$caretSize===void 0?24:_ref$caretSize,icon=_ref.icon,_ref$iconSize=_ref.iconSize,iconSize=_ref$iconSize===void 0?24:_ref$iconSize,style=_ref.style,children=_ref.children,theme=_ref.theme,Icon=_ref.Icon;var _React$useState=React.useState(expandedProp),_React$useState2=_slicedToArray(_React$useState,2),expanded=_React$useState2[0],setExpanded=_React$useState2[1];var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;var expandedColor=openColor||theme.colors.branding.primary;var collapsedColor=closedColor||theme.colors.branding.primary;var labelColor=expanded?expandedColor:collapsedColor;var caretColor=caretColorProp||labelColor;var handlePressAction=function handlePressAction(){setExpanded(!expanded);};return _jsxs(_Fragment,{children:[_jsxs(Pressable,{style:[styles.row,viewStyles],onPress:handlePressAction,accessibilityRole:"button",children:[icon?_jsx(Icon,{name:icon,size:iconSize,color:labelColor,style:styles.icon}):null,_jsx(View,{style:styles.content,children:_jsx(Text,{selectable:false,style:[textStyles,{color:labelColor}],children:label})}),_jsx(Icon,{name:expanded?"MaterialIcons/keyboard-arrow-up":"MaterialIcons/keyboard-arrow-down",color:caretColor,size:caretSize})]}),expanded?children:null]});};var styles=StyleSheet.create({row:{flexDirection:"row",alignItems:"center"},content:{flex:1,justifyContent:"center"},icon:{marginRight:8}});export default withTheme(AccordionGroup);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","snapPoints","topSnapPosition","middleSnapPosition","bottomSnapPosition","initialSnapIndex","initialSnapPosition","showHandle","handleColor","topBorderRadius","borderWidth","borderColor","onSettle","style","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/BottomSheet/BottomSheet.tsx";import React from"react";import{StyleSheet,Dimensions}from"react-native";import BottomSheetComponent,{BottomSheetScrollView}from"@gorhom/bottom-sheet";import{withTheme}from"
|
|
1
|
+
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","snapPoints","topSnapPosition","middleSnapPosition","bottomSnapPosition","initialSnapIndex","initialSnapPosition","showHandle","handleColor","topBorderRadius","borderWidth","borderColor","onSettle","style","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/BottomSheet/BottomSheet.tsx";import React from"react";import{StyleSheet,Dimensions}from"react-native";import BottomSheetComponent,{BottomSheetScrollView}from"@gorhom/bottom-sheet";import{withTheme}from"@draftbit/theme";import{useDeepCompareMemo}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";var windowHeight=Dimensions.get("window").height;var BottomSheet=React.forwardRef(function(_ref,ref){var theme=_ref.theme,snapPointsProp=_ref.snapPoints,_ref$topSnapPosition=_ref.topSnapPosition,topSnapPosition=_ref$topSnapPosition===void 0?"10%":_ref$topSnapPosition,_ref$middleSnapPositi=_ref.middleSnapPosition,middleSnapPosition=_ref$middleSnapPositi===void 0?"50%":_ref$middleSnapPositi,_ref$bottomSnapPositi=_ref.bottomSnapPosition,bottomSnapPosition=_ref$bottomSnapPositi===void 0?"80%":_ref$bottomSnapPositi,initialSnapIndex=_ref.initialSnapIndex,_ref$initialSnapPosit=_ref.initialSnapPosition,initialSnapPosition=_ref$initialSnapPosit===void 0?"bottom":_ref$initialSnapPosit,_ref$showHandle=_ref.showHandle,showHandle=_ref$showHandle===void 0?true:_ref$showHandle,_ref$handleColor=_ref.handleColor,handleColor=_ref$handleColor===void 0?theme.colors.border.brand:_ref$handleColor,_ref$topBorderRadius=_ref.topBorderRadius,topBorderRadius=_ref$topBorderRadius===void 0?20:_ref$topBorderRadius,_ref$borderWidth=_ref.borderWidth,borderWidth=_ref$borderWidth===void 0?1:_ref$borderWidth,_ref$borderColor=_ref.borderColor,borderColor=_ref$borderColor===void 0?theme.colors.border.brand:_ref$borderColor,onSettle=_ref.onSettle,style=_ref.style,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);var backgroundColor=(style==null?void 0:style.backgroundColor)||theme.colors.background.brand;var snapPoints=snapPointsProp!=null?snapPointsProp:[topSnapPosition,middleSnapPosition,bottomSnapPosition];var mappedSnapPoints=useDeepCompareMemo(function(){return convertSnapPointsForNewImplementation(snapPoints);},snapPoints);var getSnapIndexFromPosition=function getSnapIndexFromPosition(position){switch(position){case"bottom":return 0;case"middle":return 1;case"top":return 2;}};return _jsx(BottomSheetComponent,{ref:ref,snapPoints:mappedSnapPoints,index:initialSnapIndex!==undefined?mappedSnapPoints.length-initialSnapIndex-1:getSnapIndexFromPosition(initialSnapPosition),handleIndicatorStyle:[{backgroundColor:handleColor},!showHandle?{display:"none"}:{}],backgroundStyle:{backgroundColor:backgroundColor,borderTopLeftRadius:topBorderRadius,borderTopRightRadius:topBorderRadius,borderWidth:borderWidth,borderColor:borderColor},onChange:function onChange(index){return onSettle==null?void 0:onSettle(mappedSnapPoints.length-index-1);},children:_jsx(BottomSheetScrollView,Object.assign({contentContainerStyle:[styles.contentContainerStyle,style]},rest,{children:children}))});});function convertSnapPointsForNewImplementation(snapPoints){var reversedSnapPoints=_toConsumableArray(snapPoints).reverse();return reversedSnapPoints.map(function(point){if(typeof point==="string"){var percentNumber=extractPercentNumber(point);if(percentNumber!==undefined){return`${100-percentNumber}%`;}return point;}else if(typeof point==="number"){return windowHeight-point;}else{return point;}});}function extractPercentNumber(percentString){var percentRegex=/(\d+)?%/;var matches=percentString.match(percentRegex);if(matches!=null&&matches.length){var percentNumber=Number(matches[1]);if(!isNaN(percentNumber)){return percentNumber;}}return undefined;}var styles=StyleSheet.create({contentContainerStyle:{paddingHorizontal:16,paddingVertical:10}});export default withTheme(BottomSheet);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Button.tsx",_this=this;var _excluded=["Icon","icon","iconPosition","iconSize","title","loading","disabled","style","activeOpacity","disabledOpacity"],_excluded2=["color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle"],_excluded3=["style","theme"],_excluded4=["style","theme"];import*as React from"react";import{Text,Pressable,Platform,StyleSheet,ActivityIndicator}from"react-native";import{withTheme}from"
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Button.tsx",_this=this;var _excluded=["Icon","icon","iconPosition","iconSize","title","loading","disabled","style","activeOpacity","disabledOpacity"],_excluded2=["color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle"],_excluded3=["style","theme"],_excluded4=["style","theme"];import*as React from"react";import{Text,Pressable,Platform,StyleSheet,ActivityIndicator}from"react-native";import{withTheme}from"@draftbit/theme";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var CONSTANTS={baseHeight:42,borderRadius:4,padding:8,icon:24};function Base(_ref){var Icon=_ref.Icon,icon=_ref.icon,_ref$iconPosition=_ref.iconPosition,iconPosition=_ref$iconPosition===void 0?"left":_ref$iconPosition,_ref$iconSize=_ref.iconSize,iconSize=_ref$iconSize===void 0?CONSTANTS.icon:_ref$iconSize,title=_ref.title,loading=_ref.loading,disabled=_ref.disabled,style=_ref.style,_ref$activeOpacity=_ref.activeOpacity,activeOpacity=_ref$activeOpacity===void 0?0.8:_ref$activeOpacity,_ref$disabledOpacity=_ref.disabledOpacity,disabledOpacity=_ref$disabledOpacity===void 0?0.8:_ref$disabledOpacity,props=_objectWithoutProperties(_ref,_excluded);var _StyleSheet$flatten=StyleSheet.flatten(style||{}),color=_StyleSheet$flatten.color,fontFamily=_StyleSheet$flatten.fontFamily,fontWeight=_StyleSheet$flatten.fontWeight,fontSize=_StyleSheet$flatten.fontSize,lineHeight=_StyleSheet$flatten.lineHeight,letterSpacing=_StyleSheet$flatten.letterSpacing,textTransform=_StyleSheet$flatten.textTransform,textAlign=_StyleSheet$flatten.textAlign,textDecorationLine=_StyleSheet$flatten.textDecorationLine,textDecorationColor=_StyleSheet$flatten.textDecorationColor,textDecorationStyle=_StyleSheet$flatten.textDecorationStyle,buttonStyles=_objectWithoutProperties(_StyleSheet$flatten,_excluded2);var titleStyles={color:color,fontFamily:fontFamily,fontWeight:fontWeight,fontSize:fontSize,lineHeight:lineHeight,letterSpacing:letterSpacing,textTransform:textTransform,textAlign:textAlign,textDecorationLine:textDecorationLine,textDecorationColor:textDecorationColor,textDecorationStyle:textDecorationStyle};if(textAlign==="left"){buttonStyles.justifyContent="flex-start";}if(textAlign==="right"){buttonStyles.justifyContent="flex-end";}return _jsxs(Pressable,Object.assign({disabled:disabled||loading,style:function style(_ref2){var pressed=_ref2.pressed;return[styles.base,{opacity:pressed?activeOpacity:disabled?disabledOpacity:1},buttonStyles];}},props,{children:[loading?_jsx(ActivityIndicator,{size:"small",color:color,style:styles.loading}):null,iconPosition==="left"&&icon&&!loading?_jsx(Icon,{name:icon,color:color,style:styles.icon,size:iconSize}):null,_jsx(Text,{style:titleStyles,children:title}),iconPosition==="right"&&icon&&!loading?_jsx(Icon,{name:icon,color:color,style:styles.icon,size:iconSize}):null]}));}var Solid=function Solid(_ref3){var style=_ref3.style,theme=_ref3.theme,props=_objectWithoutProperties(_ref3,_excluded3);return _jsx(Base,Object.assign({style:[{color:"#FFF",borderRadius:8,backgroundColor:theme.colors.branding.primary},style]},props));};var ButtonSolid=withTheme(Solid);export{ButtonSolid};var Button=withTheme(Solid);export{Button};var Outline=function Outline(_ref4){var style=_ref4.style,theme=_ref4.theme,props=_objectWithoutProperties(_ref4,_excluded4);return _jsx(Base,Object.assign({style:[styles.outline,{borderRadius:8,borderColor:theme.colors.branding.primary,color:theme.colors.branding.primary},style]},props));};var ButtonOutline=withTheme(Outline);export{ButtonOutline};var styles=StyleSheet.create({base:Object.assign({position:"relative",flexDirection:"row",alignItems:"center",justifyContent:"center",minHeight:CONSTANTS.baseHeight,paddingHorizontal:12,fontFamily:"System",fontWeight:"700"},Platform.select({web:{cursor:"pointer",userSelect:"none"}})),outline:{backgroundColor:"transparent",borderWidth:1},bare:{backgroundColor:"transparent",padding:0,minHeight:undefined},loading:{marginRight:6},icon:Object.assign({},Platform.select({web:{marginTop:1,marginRight:4,alignSelf:"center"},default:{marginBottom:2,marginRight:4,alignSelf:"center"}}))});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Checkbox/Checkbox.tsx";import*as React from"react";import{View,StyleSheet,Pressable}from"react-native";import{useTheme}from"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Checkbox/Checkbox.tsx";import*as React from"react";import{View,StyleSheet,Pressable}from"react-native";import{useTheme}from"@draftbit/theme";import{usePrevious}from"../../hooks";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var Checkbox=function Checkbox(_ref){var Icon=_ref.Icon,status=_ref.status,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,onPress=_ref.onPress,onCheck=_ref.onCheck,onUncheck=_ref.onUncheck,color=_ref.color,uncheckedColor=_ref.uncheckedColor,defaultValue=_ref.defaultValue,_ref$checkedIcon=_ref.checkedIcon,checkedIcon=_ref$checkedIcon===void 0?"MaterialCommunityIcons/checkbox-marked":_ref$checkedIcon,_ref$uncheckedIcon=_ref.uncheckedIcon,uncheckedIcon=_ref$uncheckedIcon===void 0?"MaterialCommunityIcons/checkbox-blank-outline":_ref$uncheckedIcon,_ref$size=_ref.size,size=_ref$size===void 0?24:_ref$size,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(status||defaultValue||false),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];React.useEffect(function(){if(status!=null){setInternalValue(status);}},[status]);var previousDefaultValue=usePrevious(defaultValue);React.useEffect(function(){if(defaultValue!==previousDefaultValue){setInternalValue(Boolean(defaultValue));}},[defaultValue,previousDefaultValue]);var _useTheme=useTheme(),colors=_useTheme.colors;var checkboxColor=internalValue?color||colors.branding.primary:uncheckedColor||colors.branding.primary;var handlePress=function handlePress(){var newValue=!internalValue;setInternalValue(newValue);onPress==null?void 0:onPress(newValue);if(newValue){onCheck==null?void 0:onCheck();}if(!newValue){onUncheck==null?void 0:onUncheck();}};return _jsxs(Pressable,Object.assign({},rest,{onPress:handlePress,disabled:disabled,accessibilityState:{disabled:disabled},accessibilityRole:"button",accessibilityLiveRegion:"polite",style:[styles.container,style,{width:size,height:size}],children:[_jsx(Icon,{style:styles.icon,name:internalValue?checkedIcon:uncheckedIcon,size:size,color:checkboxColor}),_jsx(View,{style:[StyleSheet.absoluteFill,styles.fillContainer],children:_jsx(View,{style:[styles.fill,{opacity:disabled?0.5:1},{borderColor:checkboxColor}]})})]}));};var styles=StyleSheet.create({container:{borderRadius:18},fillContainer:{alignItems:"center",justifyContent:"center"},icon:{alignSelf:"center"},fill:{borderRadius:5,width:30,height:30,alignSelf:"center"}});export default Checkbox;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","labelStyle","labelContainerStyle","checkboxStyle","direction","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Checkbox/CheckboxRow.tsx";import*as React from"react";import{StyleSheet,View,Platform,Pressable}from"react-native";import{isString}from"lodash";import{extractStyles}from"../../utilities";import{usePrevious}from"../../hooks";import Text from"../Text";import Checkbox from"./Checkbox";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Direction=function(Direction){Direction["Row"]="row";Direction["RowReverse"]="row-reverse";return Direction;}({});var renderLabel=function renderLabel(value,labelStyle,textStyle){if(isString(value)){return _jsx(Text,{style:[textStyle,labelStyle],children:value});}else{return _jsx(_Fragment,{children:value});}};var CheckboxRow=function CheckboxRow(_ref){var _ref$label=_ref.label,label=_ref$label===void 0?"Label":_ref$label,labelStyle=_ref.labelStyle,labelContainerStyle=_ref.labelContainerStyle,checkboxStyle=_ref.checkboxStyle,_ref$direction=_ref.direction,direction=_ref$direction===void 0?Direction.Row:_ref$direction,Icon=_ref.Icon,status=_ref.status,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,onPress=_ref.onPress,onCheck=_ref.onCheck,onUncheck=_ref.onUncheck,color=_ref.color,uncheckedColor=_ref.uncheckedColor,defaultValue=_ref.defaultValue,checkedIcon=_ref.checkedIcon,uncheckedIcon=_ref.uncheckedIcon,size=_ref.size,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(status||defaultValue||false),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];React.useEffect(function(){if(status!=null){setInternalValue(status);}},[status]);var previousDefaultValue=usePrevious(defaultValue);React.useEffect(function(){if(defaultValue!==previousDefaultValue){setInternalValue(Boolean(defaultValue));}},[defaultValue,previousDefaultValue]);var handlePress=function handlePress(){var newValue=!internalValue;setInternalValue(newValue);onPress==null?void 0:onPress(newValue);if(newValue){onCheck==null?void 0:onCheck();}if(!newValue){onUncheck==null?void 0:onUncheck();}};var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;return _jsxs(Pressable,Object.assign({onPress:handlePress,style:[styles.mainParent,viewStyles,,{flexDirection:direction}],disabled:disabled},rest,{children:[_jsx(View,{style:[styles.label,{alignItems:direction===Direction.Row?"flex-start":"flex-end"},labelContainerStyle],children:renderLabel(label,textStyles
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["label","labelStyle","labelContainerStyle","checkboxStyle","direction","Icon","status","disabled","onPress","onCheck","onUncheck","color","uncheckedColor","defaultValue","checkedIcon","uncheckedIcon","size","style","theme"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Checkbox/CheckboxRow.tsx";import*as React from"react";import{StyleSheet,View,Platform,Pressable}from"react-native";import{isString}from"lodash";import{extractStyles}from"../../utilities";import{usePrevious}from"../../hooks";import Text from"../Text";import Checkbox from"./Checkbox";import{withTheme}from"@draftbit/theme";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Direction=function(Direction){Direction["Row"]="row";Direction["RowReverse"]="row-reverse";return Direction;}({});var renderLabel=function renderLabel(value,labelStyle,textStyle){if(isString(value)){return _jsx(Text,{style:[textStyle,labelStyle],children:value});}else{return _jsx(_Fragment,{children:value});}};var CheckboxRow=function CheckboxRow(_ref){var _ref$label=_ref.label,label=_ref$label===void 0?"Label":_ref$label,labelStyle=_ref.labelStyle,labelContainerStyle=_ref.labelContainerStyle,checkboxStyle=_ref.checkboxStyle,_ref$direction=_ref.direction,direction=_ref$direction===void 0?Direction.Row:_ref$direction,Icon=_ref.Icon,status=_ref.status,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,onPress=_ref.onPress,onCheck=_ref.onCheck,onUncheck=_ref.onUncheck,color=_ref.color,uncheckedColor=_ref.uncheckedColor,defaultValue=_ref.defaultValue,checkedIcon=_ref.checkedIcon,uncheckedIcon=_ref.uncheckedIcon,size=_ref.size,style=_ref.style,theme=_ref.theme,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(status||defaultValue||false),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];React.useEffect(function(){if(status!=null){setInternalValue(status);}},[status]);var previousDefaultValue=usePrevious(defaultValue);React.useEffect(function(){if(defaultValue!==previousDefaultValue){setInternalValue(Boolean(defaultValue));}},[defaultValue,previousDefaultValue]);var handlePress=function handlePress(){var newValue=!internalValue;setInternalValue(newValue);onPress==null?void 0:onPress(newValue);if(newValue){onCheck==null?void 0:onCheck();}if(!newValue){onUncheck==null?void 0:onUncheck();}};var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;return _jsxs(Pressable,Object.assign({onPress:handlePress,style:[styles.mainParent,viewStyles,,{flexDirection:direction}],disabled:disabled},rest,{children:[_jsx(View,{style:[styles.label,{alignItems:direction===Direction.Row?"flex-start":"flex-end"},labelContainerStyle],children:renderLabel(label,labelStyle,StyleSheet.flatten([{color:theme.colors.text.strong},textStyles]))}),_jsx(Checkbox,{Icon:Icon,status:internalValue,style:checkboxStyle,disabled:disabled,onPress:handlePress,color:color,uncheckedColor:uncheckedColor,checkedIcon:checkedIcon,uncheckedIcon:uncheckedIcon,size:size})]}));};var styles=StyleSheet.create({mainParent:Object.assign({alignItems:"center",justifyContent:"space-around",paddingLeft:20,paddingRight:20,minHeight:50,display:"flex"},Platform.select({web:{cursor:"pointer",userSelect:"none"}})),label:{flex:3}});export default withTheme(CheckboxRow);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","style","theme","date","onDateChange","defaultValue","disabled","mode","format","type","leftIconName","rightIconName","leftIconMode","label","labelSize","labelColor","placeholder","borderColor","borderColorActive","autoDismissKeyboard","minimumDate","maximumDate","hideLabel"],_excluded2=["lineHeight"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/DatePicker/DatePicker.tsx";import*as React from"react";import{View,Animated,Text,StyleSheet,I18nManager,TextInput as NativeTextInput,Keyboard,Platform}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import omit from"lodash.omit";import dateFormat from"dateformat";import{withTheme}from"../../theming";import Portal from"../Portal/Portal";import Touchable from"../Touchable";import DateTimePicker from"./DatePickerComponent";import{extractStyles,marginStyleNames,paddingStyleNames,positionStyleNames}from"../../utilities";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";var AnimatedText=Animated.createAnimatedComponent(Text);var FOCUS_ANIMATION_DURATION=150;var BLUR_ANIMATION_DURATION=180;var ICON_SIZE=24;var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];var DatePicker=function DatePicker(_ref){var _viewStyles$borderCol;var Icon=_ref.Icon,style=_ref.style,_ref$theme=_ref.theme,colors=_ref$theme.colors,typography=_ref$theme.typography,roundness=_ref$theme.roundness,disabledOpacity=_ref$theme.disabledOpacity,date=_ref.date,_ref$onDateChange=_ref.onDateChange,onDateChange=_ref$onDateChange===void 0?function(){}:_ref$onDateChange,defaultValue=_ref.defaultValue,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,_ref$mode=_ref.mode,mode=_ref$mode===void 0?"date":_ref$mode,format=_ref.format,_ref$type=_ref.type,type=_ref$type===void 0?"underline":_ref$type,leftIconName=_ref.leftIconName,rightIconName=_ref.rightIconName,_ref$leftIconMode=_ref.leftIconMode,leftIconMode=_ref$leftIconMode===void 0?"inset":_ref$leftIconMode,label=_ref.label,labelSize=_ref.labelSize,labelColor=_ref.labelColor,placeholder=_ref.placeholder,inputBorderColor=_ref.borderColor,inputBorderColorActive=_ref.borderColorActive,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,minimumDate=_ref.minimumDate,maximumDate=_ref.maximumDate,_ref$hideLabel=_ref.hideLabel,hideLabel=_ref$hideLabel===void 0?false:_ref$hideLabel,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(parseDate(date)||parseDate(defaultValue)),_React$useState2=_slicedToArray(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];React.useEffect(function(){if(defaultValue!=null){setValue(parseDate(defaultValue));}},[defaultValue]);var _React$useState3=React.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),pickerVisible=_React$useState4[0],setPickerVisible=_React$useState4[1];var _React$useState5=React.useState(new Animated.Value(date?0:1)),_React$useState6=_slicedToArray(_React$useState5,1),labeled=_React$useState6[0];var _React$useState7=React.useState(""),_React$useState8=_slicedToArray(_React$useState7,2),placeholder1=_React$useState8[0],setPlaceholder1=_React$useState8[1];var _React$useState9=React.useState(false),_React$useState10=_slicedToArray(_React$useState9,2),focused=_React$useState10[0],setFocused=_React$useState10[1];var _React$useState11=React.useState({measured:false,width:0}),_React$useState12=_slicedToArray(_React$useState11,2),labelLayout=_React$useState12[0],setLabelLayout=_React$useState12[1];var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;var getValidDate=function getValidDate(){if(!value){return new Date();}return typeof(value==null?void 0:value.getMonth)==="function"?value:new Date();};var formatDate=function formatDate(){if(!value)return"";var newDate=getValidDate();if(format)return dateFormat(newDate,format);if(mode==="time"){return`${newDate.toLocaleTimeString()}`;}if(mode==="datetime"){return`${newDate.toLocaleString()}`;}return`${MONTHS[newDate.getMonth()]} ${newDate.getDate()}, ${newDate.getFullYear()}`;};var toggleVisibility=function(){var _ref2=_asyncToGenerator(function*(){setPickerVisible(!pickerVisible);focused?_handleBlur():_handleFocus();});return function toggleVisibility(){return _ref2.apply(this,arguments);};}();var insets=useSafeAreaInsets();var _hidePlaceholder=function _hidePlaceholder(){setPlaceholder1("");};React.useEffect(function(){setValue(parseDate(date));},[date]);React.useEffect(function(){if(value||focused||placeholder1){Animated.timing(labeled,{toValue:0,duration:BLUR_ANIMATION_DURATION,useNativeDriver:Platform.OS!=="web"}).start();}else{Animated.timing(labeled,{toValue:1,duration:FOCUS_ANIMATION_DURATION,useNativeDriver:Platform.OS!=="web"}).start();}},[value,focused,placeholder1,labeled]);React.useEffect(function(){var _showPlaceholder=function _showPlaceholder(){return setTimeout(function(){return setPlaceholder1(placeholder||"");},50);};if(focused||!label){_showPlaceholder();}else{_hidePlaceholder();}return function(){clearTimeout(_showPlaceholder());};},[focused,label,placeholder]);React.useEffect(function(){if(pickerVisible&&autoDismissKeyboard){Keyboard.dismiss();}},[pickerVisible,autoDismissKeyboard]);var _handleFocus=function _handleFocus(){if(disabled){return;}setFocused(true);};var _handleBlur=function _handleBlur(){if(disabled){return;}setFocused(false);};var MINIMIZED_LABEL_Y_OFFSET=-(typography.caption.lineHeight+4);var OUTLINE_MINIMIZED_LABEL_Y_OFFSET=-(16*0.5+4);var MAXIMIZED_LABEL_FONT_SIZE=textStyles.fontSize||typography.subtitle1.fontSize;var MINIMIZED_LABEL_FONT_SIZE=labelSize?labelSize:typography.caption.fontSize;var hasActiveOutline=focused;var propOrStyleBorderColor=(_viewStyles$borderCol=viewStyles.borderColor)!=null?_viewStyles$borderCol:inputBorderColor;var inputTextColor,activeColor,underlineColor,borderColor=propOrStyleBorderColor,placeholderColor,containerStyle,backgroundColor,inputStyle;inputTextColor=colors.strong;if(disabled){activeColor=colors.light;placeholderColor=colors.light;borderColor="transparent";underlineColor="transparent";backgroundColor=colors.divider;}else{activeColor=inputBorderColorActive||colors.primary;placeholderColor=colors.light;underlineColor=propOrStyleBorderColor||colors.light;backgroundColor=colors.background;}var _typography$subtitle=typography.subtitle1,lineHeight=_typography$subtitle.lineHeight,subtitle1=_objectWithoutProperties(_typography$subtitle,_excluded2);inputStyle=Object.assign({paddingVertical:0,color:inputTextColor,paddingLeft:leftIconName&&leftIconMode==="inset"?ICON_SIZE+(type==="solid"?16:12):0,paddingRight:rightIconName?ICON_SIZE+16+4:12},subtitle1,{height:lineHeight});if(type==="underline"){containerStyle={borderTopLeftRadius:roundness,borderTopRightRadius:roundness,paddingBottom:12,marginTop:16};}else{var _viewStyles$borderWid;containerStyle={borderRadius:roundness,borderColor:hasActiveOutline?activeColor:borderColor,borderWidth:(_viewStyles$borderWid=viewStyles.borderWidth)!=null?_viewStyles$borderWid:1,paddingTop:labeled&&!hideLabel?16*1.5:16,paddingBottom:labeled&&!hideLabel?16*0.5:16,opacity:disabled?disabledOpacity:1,backgroundColor:backgroundColor};inputStyle.paddingHorizontal=12;}if(leftIconName&&leftIconMode==="outset"){containerStyle.marginLeft=ICON_SIZE+8;}var leftIconColor;if(focused){leftIconColor=colors.primary;}else{leftIconColor=colors.light;}var leftIconProps={size:24,color:leftIconColor,name:leftIconName||""};var leftIconStyle={position:"absolute",top:0,marginTop:type==="solid"?leftIconMode==="inset"?MINIMIZED_LABEL_FONT_SIZE+4:16:leftIconMode==="outset"?16:0};var labelStyle=Object.assign({},typography.subtitle1,{top:type==="solid"?16:0,fontFamily:textStyles==null?void 0:textStyles.fontFamily,left:leftIconName&&leftIconMode==="inset"?ICON_SIZE+(type==="solid"?16:12):0,transform:[{translateY:labeled.interpolate({inputRange:[0,1],outputRange:[type==="solid"?OUTLINE_MINIMIZED_LABEL_Y_OFFSET:MINIMIZED_LABEL_Y_OFFSET,0]})},{scale:labeled.interpolate({inputRange:[0,1],outputRange:[MINIMIZED_LABEL_FONT_SIZE/MAXIMIZED_LABEL_FONT_SIZE,1]})},{translateX:labeled.interpolate({inputRange:[0,1],outputRange:[-(1-MINIMIZED_LABEL_FONT_SIZE/MAXIMIZED_LABEL_FONT_SIZE)*(labelLayout.width/2),0]})}]});var inputStyles=[styles.input,inputStyle,type==="solid"?{marginHorizontal:12}:{}];return _jsxs(_Fragment,{children:[_jsx(Touchable,{disabled:disabled,onPress:toggleVisibility,children:_jsx(View,{pointerEvents:"none",children:_jsxs(View,{style:StyleSheet.flatten([styles.container,omit(style,[].concat(_toConsumableArray(paddingStyleNames),["backgroundColor","borderWidth"]))]),children:[leftIconName&&leftIconMode==="outset"?_jsx(Icon,Object.assign({},leftIconProps,{style:leftIconStyle})):null,_jsxs(View,{style:StyleSheet.flatten([containerStyle,style?{height:style.height}:{},omit(style,[].concat(_toConsumableArray(marginStyleNames),_toConsumableArray(positionStyleNames),["borderColor","borderWidth"]))]),children:[type==="underline"?_jsx(Animated.View,{style:[styles.underline,{backgroundColor:focused?activeColor:underlineColor,transform:[{scaleY:focused?1:0.5}]}]}):null,label&&!hideLabel?_jsxs(View,{pointerEvents:"none",style:[StyleSheet.absoluteFill,{opacity:date||focused?labelLayout.measured?1:0:1}],children:[_jsx(AnimatedText,{onLayout:function onLayout(e){return setLabelLayout({width:e.nativeEvent.layout.width,measured:true});},style:[styles.placeholder,type==="solid"?{paddingHorizontal:12}:{},labelStyle,{color:labelColor||colors.light,opacity:labeled.interpolate({inputRange:[0,1],outputRange:[hasActiveOutline?1:0,0]})}],numberOfLines:1,children:label}),_jsx(AnimatedText,{style:[styles.placeholder,type==="solid"?{paddingHorizontal:12}:{},labelStyle,{color:labelColor||placeholderColor,opacity:hasActiveOutline?labeled:1}],numberOfLines:1,children:label})]}):null,leftIconName&&leftIconMode==="inset"?_jsx(Icon,Object.assign({},leftIconProps,{style:Object.assign({},leftIconStyle,{marginLeft:type==="solid"?16:0})})):null,_jsx(NativeTextInput,Object.assign({value:formatDate(),placeholder:label&&!hideLabel?placeholder1:placeholder,editable:!disabled,placeholderTextColor:placeholderColor,selectionColor:activeColor,onFocus:_handleFocus,onBlur:_handleBlur,underlineColorAndroid:"transparent",style:[inputStyles,textStyles]},props))]}),rightIconName?_jsx(Icon,{name:rightIconName,size:ICON_SIZE,color:colors.light,style:{position:"absolute",right:16,marginTop:type==="solid"?MINIMIZED_LABEL_FONT_SIZE+4:16}}):null]})})}),pickerVisible&&_jsx(Portal,{children:_jsx(View,{style:[styles.picker,{backgroundColor:colors.divider}],children:_jsx(View,{style:[styles.pickerContainer,{paddingTop:insets.top,paddingBottom:insets.bottom,paddingLeft:insets.left,paddingRight:insets.right}],children:_jsx(DateTimePicker,{value:getValidDate(),mode:mode,isVisible:pickerVisible,toggleVisibility:toggleVisibility,minimumDate:parseDate(minimumDate),maximumDate:parseDate(maximumDate),onChange:function onChange(_event,data){toggleVisibility();setValue(data);onDateChange(data);}})})})})]});};var styles=StyleSheet.create({container:{alignSelf:"stretch"},picker:{position:"absolute",bottom:0,left:0,right:0,flexDirection:"row",justifyContent:"center"},underline:{position:"absolute",left:0,right:0,bottom:0,height:2},input:{flexGrow:1,justifyContent:"center",textAlignVertical:"center",margin:0,textAlign:I18nManager.isRTL?"right":"left"},placeholder:{position:"absolute",left:0},pickerContainer:{flexDirection:"column",width:"100%",zIndex:100},closeButton:{alignSelf:"flex-end"}});function parseDate(date){if(typeof date==="string"){var parsed=Date.parse(date);if(!isNaN(parsed)){return new Date(parsed);}console.warn("Invalid date string:",`'${date}'.`,"See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format");return undefined;}return date;}export default withTheme(DatePicker);
|
|
1
|
+
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _asyncToGenerator from"@babel/runtime/helpers/asyncToGenerator";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","style","theme","date","onDateChange","defaultValue","disabled","mode","format","type","leftIconName","rightIconName","leftIconMode","label","labelSize","labelColor","placeholder","borderColor","borderColorActive","autoDismissKeyboard","minimumDate","maximumDate","hideLabel"],_excluded2=["lineHeight"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/DatePicker/DatePicker.tsx";import*as React from"react";import{View,Animated,Text,StyleSheet,I18nManager,TextInput as NativeTextInput,Keyboard,Platform}from"react-native";import{useSafeAreaInsets}from"react-native-safe-area-context";import omit from"lodash.omit";import dateFormat from"dateformat";import{withTheme}from"@draftbit/theme";import Portal from"../Portal/Portal";import Touchable from"../Touchable";import DateTimePicker from"./DatePickerComponent";import{extractStyles,marginStyleNames,paddingStyleNames,positionStyleNames}from"../../utilities";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";var AnimatedText=Animated.createAnimatedComponent(Text);var FOCUS_ANIMATION_DURATION=150;var BLUR_ANIMATION_DURATION=180;var ICON_SIZE=24;var MONTHS=["January","February","March","April","May","June","July","August","September","October","November","December"];var DatePicker=function DatePicker(_ref){var _ref3,_viewStyles$borderCol;var Icon=_ref.Icon,style=_ref.style,_ref$theme=_ref.theme,colors=_ref$theme.colors,typography=_ref$theme.typography,date=_ref.date,_ref$onDateChange=_ref.onDateChange,onDateChange=_ref$onDateChange===void 0?function(){}:_ref$onDateChange,defaultValue=_ref.defaultValue,_ref$disabled=_ref.disabled,disabled=_ref$disabled===void 0?false:_ref$disabled,_ref$mode=_ref.mode,mode=_ref$mode===void 0?"date":_ref$mode,format=_ref.format,_ref$type=_ref.type,type=_ref$type===void 0?"underline":_ref$type,leftIconName=_ref.leftIconName,rightIconName=_ref.rightIconName,_ref$leftIconMode=_ref.leftIconMode,leftIconMode=_ref$leftIconMode===void 0?"inset":_ref$leftIconMode,label=_ref.label,labelSize=_ref.labelSize,labelColor=_ref.labelColor,placeholder=_ref.placeholder,inputBorderColor=_ref.borderColor,inputBorderColorActive=_ref.borderColorActive,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,minimumDate=_ref.minimumDate,maximumDate=_ref.maximumDate,_ref$hideLabel=_ref.hideLabel,hideLabel=_ref$hideLabel===void 0?false:_ref$hideLabel,props=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(parseDate(date)||parseDate(defaultValue)),_React$useState2=_slicedToArray(_React$useState,2),value=_React$useState2[0],setValue=_React$useState2[1];React.useEffect(function(){if(defaultValue!=null){setValue(parseDate(defaultValue));}},[defaultValue]);var _React$useState3=React.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),pickerVisible=_React$useState4[0],setPickerVisible=_React$useState4[1];var _React$useState5=React.useState(new Animated.Value(date?0:1)),_React$useState6=_slicedToArray(_React$useState5,1),labeled=_React$useState6[0];var _React$useState7=React.useState(""),_React$useState8=_slicedToArray(_React$useState7,2),placeholder1=_React$useState8[0],setPlaceholder1=_React$useState8[1];var _React$useState9=React.useState(false),_React$useState10=_slicedToArray(_React$useState9,2),focused=_React$useState10[0],setFocused=_React$useState10[1];var _React$useState11=React.useState({measured:false,width:0}),_React$useState12=_slicedToArray(_React$useState11,2),labelLayout=_React$useState12[0],setLabelLayout=_React$useState12[1];var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;var getValidDate=function getValidDate(){if(!value){return new Date();}return typeof(value==null?void 0:value.getMonth)==="function"?value:new Date();};var formatDate=function formatDate(){if(!value)return"";var newDate=getValidDate();if(format)return dateFormat(newDate,format);if(mode==="time"){return`${newDate.toLocaleTimeString()}`;}if(mode==="datetime"){return`${newDate.toLocaleString()}`;}return`${MONTHS[newDate.getMonth()]} ${newDate.getDate()}, ${newDate.getFullYear()}`;};var toggleVisibility=function(){var _ref2=_asyncToGenerator(function*(){setPickerVisible(!pickerVisible);focused?_handleBlur():_handleFocus();});return function toggleVisibility(){return _ref2.apply(this,arguments);};}();var insets=useSafeAreaInsets();var _hidePlaceholder=function _hidePlaceholder(){setPlaceholder1("");};React.useEffect(function(){setValue(parseDate(date));},[date]);React.useEffect(function(){if(value||focused||placeholder1){Animated.timing(labeled,{toValue:0,duration:BLUR_ANIMATION_DURATION,useNativeDriver:Platform.OS!=="web"}).start();}else{Animated.timing(labeled,{toValue:1,duration:FOCUS_ANIMATION_DURATION,useNativeDriver:Platform.OS!=="web"}).start();}},[value,focused,placeholder1,labeled]);React.useEffect(function(){var _showPlaceholder=function _showPlaceholder(){return setTimeout(function(){return setPlaceholder1(placeholder||"");},50);};if(focused||!label){_showPlaceholder();}else{_hidePlaceholder();}return function(){clearTimeout(_showPlaceholder());};},[focused,label,placeholder]);React.useEffect(function(){if(pickerVisible&&autoDismissKeyboard){Keyboard.dismiss();}},[pickerVisible,autoDismissKeyboard]);var _handleFocus=function _handleFocus(){if(disabled){return;}setFocused(true);};var _handleBlur=function _handleBlur(){if(disabled){return;}setFocused(false);};var MINIMIZED_LABEL_Y_OFFSET=-(typography.caption.lineHeight+4);var OUTLINE_MINIMIZED_LABEL_Y_OFFSET=-(16*0.5+4);var MAXIMIZED_LABEL_FONT_SIZE=textStyles.fontSize||typography.subtitle1.fontSize;var MINIMIZED_LABEL_FONT_SIZE=labelSize?labelSize:typography.caption.fontSize;var hasActiveOutline=focused;var inputTextColor,activeColor,underlineColor,borderColor=(_ref3=(_viewStyles$borderCol=viewStyles.borderColor)!=null?_viewStyles$borderCol:inputBorderColor)!=null?_ref3:colors.text.strong,placeholderColor,containerStyle,backgroundColor,inputStyle;inputTextColor=colors.text.strong;if(disabled){activeColor=colors.border.brand;placeholderColor=colors.text.light;borderColor="transparent";underlineColor="transparent";backgroundColor=colors.border.brand;}else{var _ref4,_viewStyles$borderCol2;activeColor=inputBorderColorActive||colors.branding.primary;placeholderColor=colors.text.light;underlineColor=(_ref4=(_viewStyles$borderCol2=viewStyles.borderColor)!=null?_viewStyles$borderCol2:inputBorderColor)!=null?_ref4:colors.border.brand;backgroundColor=colors.background.brand;}var _typography$subtitle=typography.subtitle1,lineHeight=_typography$subtitle.lineHeight,subtitle1=_objectWithoutProperties(_typography$subtitle,_excluded2);inputStyle=Object.assign({paddingVertical:0,color:inputTextColor,paddingLeft:leftIconName&&leftIconMode==="inset"?ICON_SIZE+(type==="solid"?16:12):0,paddingRight:rightIconName?ICON_SIZE+16+4:12},subtitle1,{height:lineHeight});if(type==="underline"){containerStyle={borderTopLeftRadius:8,borderTopRightRadius:8,paddingBottom:12,marginTop:16};}else{var _viewStyles$borderWid;containerStyle={borderRadius:8,borderColor:hasActiveOutline?activeColor:borderColor,borderWidth:(_viewStyles$borderWid=viewStyles.borderWidth)!=null?_viewStyles$borderWid:1,paddingTop:labeled&&!hideLabel?16*1.5:16,paddingBottom:labeled&&!hideLabel?16*0.5:16,opacity:disabled?0.5:1,backgroundColor:backgroundColor};inputStyle.paddingHorizontal=12;}if(leftIconName&&leftIconMode==="outset"){containerStyle.marginLeft=ICON_SIZE+8;}var leftIconColor;if(focused){leftIconColor=colors.branding.primary;}else{leftIconColor=colors.text.light;}var leftIconProps={size:24,color:leftIconColor,name:leftIconName||""};var leftIconStyle={position:"absolute",top:0,marginTop:type==="solid"?leftIconMode==="inset"?MINIMIZED_LABEL_FONT_SIZE+4:16:leftIconMode==="outset"?16:0};var labelStyle=Object.assign({},typography.subtitle1,{top:type==="solid"?16:0,fontFamily:textStyles==null?void 0:textStyles.fontFamily,left:leftIconName&&leftIconMode==="inset"?ICON_SIZE+(type==="solid"?16:12):0,transform:[{translateY:labeled.interpolate({inputRange:[0,1],outputRange:[type==="solid"?OUTLINE_MINIMIZED_LABEL_Y_OFFSET:MINIMIZED_LABEL_Y_OFFSET,0]})},{scale:labeled.interpolate({inputRange:[0,1],outputRange:[MINIMIZED_LABEL_FONT_SIZE/MAXIMIZED_LABEL_FONT_SIZE,1]})},{translateX:labeled.interpolate({inputRange:[0,1],outputRange:[-(1-MINIMIZED_LABEL_FONT_SIZE/MAXIMIZED_LABEL_FONT_SIZE)*(labelLayout.width/2),0]})}]});var inputStyles=[styles.input,inputStyle,type==="solid"?{marginHorizontal:12}:{}];return _jsxs(_Fragment,{children:[_jsx(Touchable,{disabled:disabled,onPress:toggleVisibility,children:_jsx(View,{pointerEvents:"none",children:_jsxs(View,{style:StyleSheet.flatten([styles.container,omit(style,[].concat(_toConsumableArray(paddingStyleNames),["backgroundColor","borderWidth"]))]),children:[leftIconName&&leftIconMode==="outset"?_jsx(Icon,Object.assign({},leftIconProps,{style:leftIconStyle})):null,_jsxs(View,{style:StyleSheet.flatten([containerStyle,style?{height:style.height}:{},omit(style,[].concat(_toConsumableArray(marginStyleNames),_toConsumableArray(positionStyleNames),["borderColor","borderWidth"]))]),children:[type==="underline"?_jsx(Animated.View,{style:[styles.underline,{backgroundColor:focused?activeColor:underlineColor,transform:[{scaleY:focused?1:0.5}]}]}):null,label&&!hideLabel?_jsxs(View,{pointerEvents:"none",style:[StyleSheet.absoluteFill,{opacity:date||focused?labelLayout.measured?1:0:1}],children:[_jsx(AnimatedText,{onLayout:function onLayout(e){return setLabelLayout({width:e.nativeEvent.layout.width,measured:true});},style:[styles.placeholder,type==="solid"?{paddingHorizontal:12}:{},labelStyle,{color:labelColor||colors.text.light,opacity:labeled.interpolate({inputRange:[0,1],outputRange:[hasActiveOutline?1:0,0]})}],numberOfLines:1,children:label}),_jsx(AnimatedText,{style:[styles.placeholder,type==="solid"?{paddingHorizontal:12}:{},labelStyle,{color:labelColor||placeholderColor,opacity:hasActiveOutline?labeled:1}],numberOfLines:1,children:label})]}):null,leftIconName&&leftIconMode==="inset"?_jsx(Icon,Object.assign({},leftIconProps,{style:Object.assign({},leftIconStyle,{marginLeft:type==="solid"?16:0})})):null,_jsx(NativeTextInput,Object.assign({value:formatDate(),placeholder:label&&!hideLabel?placeholder1:placeholder,editable:!disabled,placeholderTextColor:placeholderColor,selectionColor:activeColor,onFocus:_handleFocus,onBlur:_handleBlur,underlineColorAndroid:"transparent",style:[inputStyles,textStyles]},props))]}),rightIconName?_jsx(Icon,{name:rightIconName,size:ICON_SIZE,color:colors.text.light,style:{position:"absolute",right:16,marginTop:type==="solid"?MINIMIZED_LABEL_FONT_SIZE+4:16}}):null]})})}),pickerVisible&&_jsx(Portal,{children:_jsx(View,{style:[styles.picker,{backgroundColor:colors.border.brand}],children:_jsx(View,{style:[styles.pickerContainer,{paddingTop:insets.top,paddingBottom:insets.bottom,paddingLeft:insets.left,paddingRight:insets.right}],children:_jsx(DateTimePicker,{value:getValidDate(),mode:mode,isVisible:pickerVisible,toggleVisibility:toggleVisibility,minimumDate:parseDate(minimumDate),maximumDate:parseDate(maximumDate),onChange:function onChange(_event,data){toggleVisibility();setValue(data);onDateChange(data);}})})})})]});};var styles=StyleSheet.create({container:{alignSelf:"stretch"},picker:{position:"absolute",bottom:0,left:0,right:0,flexDirection:"row",justifyContent:"center"},underline:{position:"absolute",left:0,right:0,bottom:0,height:2},input:{flexGrow:1,justifyContent:"center",textAlignVertical:"center",margin:0,textAlign:I18nManager.isRTL?"right":"left"},placeholder:{position:"absolute",left:0},pickerContainer:{flexDirection:"column",width:"100%",zIndex:100},closeButton:{alignSelf:"flex-end"}});function parseDate(date){if(typeof date==="string"){var parsed=Date.parse(date);if(!isNaN(parsed)){return new Date(parsed);}console.warn("Invalid date string:",`'${date}'.`,"See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format");return undefined;}return date;}export default withTheme(DatePicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/DatePicker/DatePickerComponent.web.tsx";import React from"react";import DateFnsUtils from"@date-io/date-fns";import{MuiPickersUtilsProvider,DatePicker,TimePicker,DateTimePicker}from"@material-ui/pickers";import{createMuiTheme,ThemeProvider}from"@material-ui/core/styles";import{withTheme}from"
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/DatePicker/DatePickerComponent.web.tsx";import React from"react";import DateFnsUtils from"@date-io/date-fns";import{MuiPickersUtilsProvider,DatePicker,TimePicker,DateTimePicker}from"@material-ui/pickers";import{createMuiTheme,ThemeProvider as MuiThemeProvider}from"@material-ui/core/styles";import{withTheme,DefaultTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var DatePickerComponent=function DatePickerComponent(_ref){var _DefaultTheme$colors$,_DefaultTheme$colors$2;var value=_ref.value,_onChange=_ref.onChange,mode=_ref.mode,toggleVisibility=_ref.toggleVisibility,isVisible=_ref.isVisible,minimumDate=_ref.minimumDate,maximumDate=_ref.maximumDate,theme=_ref.theme;var internalTheme=createMuiTheme({palette:{primary:{main:theme.colors.branding.primary||((_DefaultTheme$colors$=DefaultTheme.colors.branding)==null?void 0:_DefaultTheme$colors$.primary)},secondary:{main:theme.colors.branding.secondary||((_DefaultTheme$colors$2=DefaultTheme.colors.branding)==null?void 0:_DefaultTheme$colors$2.secondary)}}});var Picker=mode==="date"?DatePicker:mode==="time"?TimePicker:DateTimePicker;return _jsx(MuiPickersUtilsProvider,{utils:DateFnsUtils,children:_jsx(MuiThemeProvider,{theme:internalTheme,children:_jsx(Picker,{value:value,open:isVisible,onChange:function onChange(d){toggleVisibility();_onChange(null,d);},onClose:function onClose(){return toggleVisibility();},variant:"dialog",TextFieldComponent:function TextFieldComponent(){return null;},minDate:minimumDate,maxDate:maximumDate})})});};export default withTheme(DatePickerComponent);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/DeckSwiper/DeckSwiperCard.tsx";import React from"react";import{View,StyleSheet}from"react-native";import{withTheme}from"
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/DeckSwiper/DeckSwiperCard.tsx";import React from"react";import{View,StyleSheet}from"react-native";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var DeckSwiperCard=function DeckSwiperCard(_ref){var style=_ref.style,children=_ref.children,theme=_ref.theme;return _jsx(View,{style:[styles.card,{backgroundColor:theme.colors.background.brand,borderColor:theme.colors.border.brand},style],children:children});};var styles=StyleSheet.create({card:{alignItems:"center",justifyContent:"center",padding:20,borderWidth:2}});export default withTheme(DeckSwiperCard);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","color","theme"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Divider.tsx";import*as React from"react";import{StyleSheet,View}from"react-native";import{withTheme}from"
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","color","theme"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Divider.tsx";import*as React from"react";import{StyleSheet,View}from"react-native";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var Divider=function Divider(_ref){var style=_ref.style,color=_ref.color,colors=_ref.theme.colors,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(View,Object.assign({style:[{backgroundColor:color||colors.border.brand,height:StyleSheet.hairlineWidth},style]},rest));};export default withTheme(Divider);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","theme","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Elevation.tsx";import*as React from"react";import{Animated,StyleSheet,View}from"react-native";import
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","theme","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Elevation.tsx";import*as React from"react";import{Animated,StyleSheet,View}from"react-native";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var Elevation=function Elevation(_ref){var style=_ref.style,theme=_ref.theme,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);var _ref2=StyleSheet.flatten(style)||{},_ref2$elevation=_ref2.elevation,elevation=_ref2$elevation===void 0?4:_ref2$elevation,radius=_ref2.borderRadius;var colors=theme.colors;var borderRadius=radius;return _jsx(Animated.View,Object.assign({},rest,{style:[{borderRadius:borderRadius,backgroundColor:colors.background.brand},elevation?{elevation:elevation}:null,style],children:_jsx(View,{style:{overflow:"hidden",borderRadius:borderRadius},children:children})}));};export default withTheme(Elevation);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","icon","color","size","disabled","loading","onPress","theme","style","activeOpacity","disabledOpacity"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/IconButton.tsx";import*as React from"react";import{View,StyleSheet,ActivityIndicator,Pressable,Platform}from"react-native";import{withTheme}from"
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","icon","color","size","disabled","loading","onPress","theme","style","activeOpacity","disabledOpacity"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/IconButton.tsx";import*as React from"react";import{View,StyleSheet,ActivityIndicator,Pressable,Platform}from"react-native";import{withTheme}from"@draftbit/theme";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var IconButton=function IconButton(_ref){var Icon=_ref.Icon,icon=_ref.icon,customColor=_ref.color,_ref$size=_ref.size,size=_ref$size===void 0?32:_ref$size,disabled=_ref.disabled,_ref$loading=_ref.loading,loading=_ref$loading===void 0?false:_ref$loading,onPress=_ref.onPress,theme=_ref.theme,_style=_ref.style,_ref$activeOpacity=_ref.activeOpacity,activeOpacity=_ref$activeOpacity===void 0?0.8:_ref$activeOpacity,_ref$disabledOpacity=_ref.disabledOpacity,disabledOpacity=_ref$disabledOpacity===void 0?0.8:_ref$disabledOpacity,props=_objectWithoutProperties(_ref,_excluded);var iconColor=customColor||theme.colors.branding.primary;return _jsx(Pressable,Object.assign({onPress:onPress,disabled:disabled||loading,style:function style(_ref2){var pressed=_ref2.pressed;return[styles.container,{opacity:pressed?activeOpacity:disabled?disabledOpacity:1,width:size,height:size,alignItems:"center",justifyContent:"center"},_style];}},props,{children:_jsxs(View,{children:[icon&&!loading?_jsx(Icon,{name:icon,size:size-2,color:iconColor}):null,loading?_jsx(ActivityIndicator,{size:"small",color:iconColor}):null]})}));};var styles=StyleSheet.create({container:Object.assign({alignItems:"center",justifyContent:"center"},Platform.select({web:{cursor:"pointer",userSelect:"none"}}))});export default withTheme(IconButton);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["style","thumbColor","completedTrackColor","remainingTrackColor","togglePlaybackIconSize","togglePlaybackIconColor","onPlaybackStatusUpdate","onPlaybackFinish","hidePlaybackIcon","hideDuration","hideSlider"],_excluded2=["color","fontFamily","fontWeight","fontSize","lineHeight","letterSpacing","textTransform","textAlign","textDecorationLine","textDecorationColor","textDecorationStyle"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/AudioPlayer/AudioPlayerWithInterface.tsx";import*as React from"react";import{Text,View,StyleSheet}from"react-native";import{AntDesign}from"@expo/vector-icons";import{useTheme}from"@draftbit/theme";import Slider from"@react-native-community/slider";import HeadlessAudioPlayer from"./HeadlessAudioPlayer";import Pressable from"../../Pressable";import{jsx as _jsx,jsxs as _jsxs,Fragment as _Fragment}from"react/jsx-runtime";var AudioPlayerWithInterface=React.forwardRef(function(_ref,ref){var style=_ref.style,thumbColor=_ref.thumbColor,completedTrackColor=_ref.completedTrackColor,remainingTrackColor=_ref.remainingTrackColor,_ref$togglePlaybackIc=_ref.togglePlaybackIconSize,togglePlaybackIconSize=_ref$togglePlaybackIc===void 0?24:_ref$togglePlaybackIc,togglePlaybackIconColor=_ref.togglePlaybackIconColor,onPlaybackStatusUpdateProp=_ref.onPlaybackStatusUpdate,onPlaybackFinishProp=_ref.onPlaybackFinish,_ref$hidePlaybackIcon=_ref.hidePlaybackIcon,hidePlaybackIcon=_ref$hidePlaybackIcon===void 0?false:_ref$hidePlaybackIcon,_ref$hideDuration=_ref.hideDuration,hideDuration=_ref$hideDuration===void 0?false:_ref$hideDuration,_ref$hideSlider=_ref.hideSlider,hideSlider=_ref$hideSlider===void 0?false:_ref$hideSlider,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),isPlaying=_React$useState2[0],setIsPlaying=_React$useState2[1];var _React$useState3=React.useState(false),_React$useState4=_slicedToArray(_React$useState3,2),isLoading=_React$useState4[0],setIsLoading=_React$useState4[1];var _React$useState5=React.useState(1),_React$useState6=_slicedToArray(_React$useState5,2),durationMillis=_React$useState6[0],setDurationMillis=_React$useState6[1];var _React$useState7=React.useState(false),_React$useState8=_slicedToArray(_React$useState7,2),isDraggingSlider=_React$useState8[0],setIsDraggingSlider=_React$useState8[1];var _React$useState9=React.useState(0),_React$useState10=_slicedToArray(_React$useState9,2),sliderPositionMillis=_React$useState10[0],setSliderPositionMillis=_React$useState10[1];var newHeadlessAudioPlayerRef=React.useRef(null);var theme=useTheme();var headlessAudioPlayerRef=ref?ref:newHeadlessAudioPlayerRef;var _StyleSheet$flatten=StyleSheet.flatten(style||{}),_StyleSheet$flatten$c=_StyleSheet$flatten.color,color=_StyleSheet$flatten$c===void 0?theme.colors.text.strong:_StyleSheet$flatten$c,fontFamily=_StyleSheet$flatten.fontFamily,fontWeight=_StyleSheet$flatten.fontWeight,fontSize=_StyleSheet$flatten.fontSize,lineHeight=_StyleSheet$flatten.lineHeight,letterSpacing=_StyleSheet$flatten.letterSpacing,textTransform=_StyleSheet$flatten.textTransform,textAlign=_StyleSheet$flatten.textAlign,textDecorationLine=_StyleSheet$flatten.textDecorationLine,textDecorationColor=_StyleSheet$flatten.textDecorationColor,textDecorationStyle=_StyleSheet$flatten.textDecorationStyle,viewStyles=_objectWithoutProperties(_StyleSheet$flatten,_excluded2);var textStyles={color:color,fontFamily:fontFamily,fontWeight:fontWeight,fontSize:fontSize,lineHeight:lineHeight,letterSpacing:letterSpacing,textTransform:textTransform,textAlign:textAlign,textDecorationLine:textDecorationLine,textDecorationColor:textDecorationColor,textDecorationStyle:textDecorationStyle};var onPlaybackStatusUpdate=function onPlaybackStatusUpdate(status){setIsLoading(status.isLoading);setDurationMillis(status.durationMillis);setSliderPositionMillis(status.currentPositionMillis);setIsPlaying(status.isPlaying);onPlaybackStatusUpdateProp==null?void 0:onPlaybackStatusUpdateProp(status);};var onPlaybackFinish=function onPlaybackFinish(){var _headlessAudioPlayerR,_headlessAudioPlayerR2;setIsPlaying(false);setSliderPositionMillis(0);(_headlessAudioPlayerR=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR.togglePlayback();(_headlessAudioPlayerR2=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR2.seekToPosition(0);onPlaybackFinishProp==null?void 0:onPlaybackFinishProp();};var onSlidingComplete=function onSlidingComplete(sliderValue){var _headlessAudioPlayerR3;if(isDraggingSlider){setIsDraggingSlider(false);}(_headlessAudioPlayerR3=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR3.seekToPosition(sliderValue);};var onSliderChange=function onSliderChange(){if(!isDraggingSlider){setIsDraggingSlider(true);}};var iconName;if(isLoading){iconName="loading1";}else if(isPlaying){iconName="pause";}else{iconName="play";}return _jsxs(_Fragment,{children:[_jsx(HeadlessAudioPlayer,Object.assign({},rest,{ref:headlessAudioPlayerRef,onPlaybackStatusUpdate:onPlaybackStatusUpdate,onPlaybackFinish:onPlaybackFinish})),_jsxs(View,{testID:"audio-player-interface",style:[{backgroundColor:theme.colors.background.brand,borderColor:theme.colors.border.brand},styles.container,viewStyles],children:[!hidePlaybackIcon&&_jsx(Pressable,{testID:"audio-player-playback-icon",onPress:function onPress(){var _headlessAudioPlayerR4;return(_headlessAudioPlayerR4=headlessAudioPlayerRef.current)==null?void 0:_headlessAudioPlayerR4.togglePlayback();},style:styles.spacingEnd,children:_jsx(AntDesign,{name:iconName,size:togglePlaybackIconSize,color:togglePlaybackIconColor!=null?togglePlaybackIconColor:theme.colors.branding.primary})}),!hideDuration&&_jsxs(Text,{testID:"audio-player-duration",style:[styles.spacingEnd,textStyles],children:[formatDuration(sliderPositionMillis!=null?sliderPositionMillis:0)," /"," ",formatDuration(durationMillis||0)]}),!hideSlider&&_jsx(Slider,{testID:"audio-player-slider",style:styles.slider,minimumTrackTintColor:completedTrackColor!=null?completedTrackColor:theme.colors.branding.primary,maximumTrackTintColor:remainingTrackColor!=null?remainingTrackColor:theme.colors.border.brand,thumbTintColor:thumbColor!=null?thumbColor:theme.colors.branding.primary,minimumValue:0,value:sliderPositionMillis,maximumValue:durationMillis,onValueChange:onSliderChange,onSlidingComplete:onSlidingComplete})]})]});});var styles=StyleSheet.create({container:{padding:8,flexDirection:"row",alignItems:"center",borderRadius:8,borderWidth:1},spacingEnd:{marginEnd:8},slider:{flex:1}});function formatDuration(duration){if(duration===0)return"00:00";var seconds=Math.floor(duration/1000%60);var minutes=Math.floor(duration/(1000*60)%60);var hours=Math.floor(duration/(1000*60*60)%24);var renderedHours=hours<10?"0"+hours:hours;var renderedMinutes=minutes<10?"0"+minutes:minutes;var renderedSeconds=seconds<10?"0"+seconds:seconds;if(hours>0){return renderedHours+":"+renderedMinutes+":"+renderedSeconds;}return renderedMinutes+":"+renderedSeconds;}export default AudioPlayerWithInterface;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["mode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/AudioPlayer/index.tsx";import*as React from"react";import
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["mode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/MediaPlayer/AudioPlayer/index.tsx";import*as React from"react";import HeadlessAudioPlayer from"./HeadlessAudioPlayer";import AudioPlayerWithInterface from"./AudioPlayerWithInterface";import{jsx as _jsx}from"react/jsx-runtime";var AudioPlayer=React.forwardRef(function(_ref,ref){var _ref$mode=_ref.mode,mode=_ref$mode===void 0?"interface":_ref$mode,rest=_objectWithoutProperties(_ref,_excluded);switch(mode){case"headless":return _jsx(HeadlessAudioPlayer,Object.assign({ref:ref},rest));case"interface":return _jsx(AudioPlayerWithInterface,Object.assign({ref:ref},rest));}});export default AudioPlayer;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","theme","disabled"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/NativePicker.tsx";import*as React from"react";import{StyleSheet,Platform,Keyboard}from"react-native";import{SafeAreaView}from"react-native-safe-area-context";import{Picker as NativePickerComponent}from"@react-native-picker/picker";import Portal from"../Portal/Portal";import{Button}from"../Button";import{useDeepCompareMemo}from"../../utilities";import{normalizeToPickerOptions}from"./PickerCommon";import PickerInputContainer from"./PickerInputContainer";import{withTheme}from"
|
|
1
|
+
import _toConsumableArray from"@babel/runtime/helpers/toConsumableArray";import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","theme","disabled"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/NativePicker.tsx";import*as React from"react";import{StyleSheet,Platform,Keyboard}from"react-native";import{SafeAreaView}from"react-native-safe-area-context";import{Picker as NativePickerComponent}from"@react-native-picker/picker";import Portal from"../Portal/Portal";import{Button}from"../Button";import{useDeepCompareMemo}from"../../utilities";import{normalizeToPickerOptions}from"./PickerCommon";import PickerInputContainer from"./PickerInputContainer";import{withTheme}from"@draftbit/theme";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var isIos=Platform.OS==="ios";var isWeb=Platform.OS==="web";var NativePicker=function NativePicker(_ref){var _ref$options=_ref.options,optionsProp=_ref$options===void 0?[]:_ref$options,_onValueChange=_ref.onValueChange,Icon=_ref.Icon,placeholder=_ref.placeholder,value=_ref.value,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,theme=_ref.theme,disabled=_ref.disabled,rest=_objectWithoutProperties(_ref,_excluded);var pickerRef=React.useRef(null);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),pickerVisible=_React$useState2[0],setPickerVisible=_React$useState2[1];var options=useDeepCompareMemo(function(){var normalizedOptions=normalizeToPickerOptions(optionsProp);if(placeholder){return[{label:placeholder,value:placeholder}].concat(_toConsumableArray(normalizedOptions));}else{return normalizedOptions;}},[placeholder,optionsProp]);if(!placeholder&&options.length&&!value&&value!==options[0].value){_onValueChange==null?void 0:_onValueChange(options[0].value);}var renderNativePicker=function renderNativePicker(){return _jsx(NativePickerComponent,{ref:pickerRef,testID:"native-picker-component",selectedValue:value,onValueChange:function onValueChange(newValue){if(newValue!==placeholder){_onValueChange==null?void 0:_onValueChange(newValue);}else if(newValue===placeholder){_onValueChange==null?void 0:_onValueChange("");}},style:isIos?styles.iosNativePicker:styles.nativePicker,onBlur:function onBlur(){return setPickerVisible(false);},children:options.map(function(option){return _jsx(NativePickerComponent.Item,{testID:"native-picker-item",label:option.label.toString(),value:option.value},option.value);})});};var renderPicker=function renderPicker(){if(isIos){return _jsx(Portal,{children:_jsxs(SafeAreaView,{style:styles.iosPickerContent,children:[_jsx(Button,{Icon:Icon,onPress:function onPress(){return setPickerVisible(!pickerVisible);},style:[styles.iosButton,{color:theme.colors.branding.primary}],title:"Close"}),renderNativePicker()]})});}else{return renderNativePicker();}};React.useEffect(function(){if(pickerVisible&&pickerRef.current){var _pickerRef$current;pickerRef==null?void 0:(_pickerRef$current=pickerRef.current)==null?void 0:_pickerRef$current.focus();}},[pickerVisible,pickerRef]);React.useEffect(function(){if(pickerVisible&&autoDismissKeyboard){Keyboard.dismiss();}},[pickerVisible,autoDismissKeyboard]);return _jsx(PickerInputContainer,Object.assign({testID:"native-picker",Icon:Icon,placeholder:placeholder,selectedValue:value,options:options,onPress:function onPress(){return setPickerVisible(!pickerVisible);},disabled:disabled},rest,{children:(pickerVisible||isWeb)&&!disabled&&renderPicker()}));};var styles=StyleSheet.create({nativePicker:Object.assign({position:"absolute",bottom:0,left:0,right:0,flexDirection:"row",justifyContent:"center",width:"100%",backgroundColor:"white",opacity:0},Platform.select({web:{height:"100%"}})),iosNativePicker:{backgroundColor:"white"},iosPickerContent:{width:"100%",position:"absolute",bottom:0,backgroundColor:"white"},iosButton:{backgroundColor:"transparent",borderWidth:0}});export default withTheme(NativePicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","selectedIconName","selectedIconColor","selectedIconSize","dropDownBackgroundColor","dropDownBorderColor","dropDownTextColor","dropDownBorderWidth","dropDownBorderRadius","children","disabled","dropdownOverlayColor"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/DropDownModalPicker.tsx";import*as React from"react";import{View,Text,Keyboard}from"react-native";import{extractStyles,useDeepCompareMemo}from"../../../utilities";import{normalizeToPickerOptions,usePickerItemProps}from"../PickerCommon";import PickerInputContainer from"../PickerInputContainer";import ModalPickerComponent from"react-native-select-dropdown";import{withTheme}from"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","selectedIconName","selectedIconColor","selectedIconSize","dropDownBackgroundColor","dropDownBorderColor","dropDownTextColor","dropDownBorderWidth","dropDownBorderRadius","children","disabled","dropdownOverlayColor"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/DropDownModalPicker.tsx";import*as React from"react";import{View,Text,Keyboard}from"react-native";import{extractStyles,useDeepCompareMemo}from"../../../utilities";import{normalizeToPickerOptions,usePickerItemProps}from"../PickerCommon";import PickerInputContainer from"../PickerInputContainer";import ModalPickerComponent from"react-native-select-dropdown";import{withTheme}from"@draftbit/theme";import{useOnUpdate}from"../../../hooks";import{Fragment as _Fragment,jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";var ModalPicker=function ModalPicker(_ref){var theme=_ref.theme,_ref$options=_ref.options,optionsProp=_ref$options===void 0?[]:_ref$options,onValueChange=_ref.onValueChange,Icon=_ref.Icon,placeholder=_ref.placeholder,value=_ref.value,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,_ref$selectedIconName=_ref.selectedIconName,selectedIconName=_ref$selectedIconName===void 0?"Feather/check":_ref$selectedIconName,_ref$selectedIconColo=_ref.selectedIconColor,selectedIconColor=_ref$selectedIconColo===void 0?theme.colors.text.strong:_ref$selectedIconColo,_ref$selectedIconSize=_ref.selectedIconSize,selectedIconSize=_ref$selectedIconSize===void 0?20:_ref$selectedIconSize,_ref$dropDownBackgrou=_ref.dropDownBackgroundColor,dropDownBackgroundColor=_ref$dropDownBackgrou===void 0?theme.colors.background.brand:_ref$dropDownBackgrou,_ref$dropDownBorderCo=_ref.dropDownBorderColor,dropDownBorderColor=_ref$dropDownBorderCo===void 0?theme.colors.border.brand:_ref$dropDownBorderCo,_ref$dropDownTextColo=_ref.dropDownTextColor,dropDownTextColor=_ref$dropDownTextColo===void 0?theme.colors.text.strong:_ref$dropDownTextColo,_ref$dropDownBorderWi=_ref.dropDownBorderWidth,dropDownBorderWidth=_ref$dropDownBorderWi===void 0?1:_ref$dropDownBorderWi,_ref$dropDownBorderRa=_ref.dropDownBorderRadius,dropDownBorderRadius=_ref$dropDownBorderRa===void 0?8:_ref$dropDownBorderRa,childrenProp=_ref.children,disabled=_ref.disabled,dropdownOverlayColor=_ref.dropdownOverlayColor,rest=_objectWithoutProperties(_ref,_excluded);var dropdownRef=React.useRef();var _React$useState=React.useState(value),_React$useState2=_slicedToArray(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var pickerItemProps=usePickerItemProps(childrenProp);var _extractStyles=extractStyles(pickerItemProps.style),pickerItemViewStyles=_extractStyles.viewStyles,pickerItemTextStyles=_extractStyles.textStyles;var options=useDeepCompareMemo(function(){return normalizeToPickerOptions(optionsProp).map(function(option){return{label:option.label.toString(),value:option.value};});},[optionsProp]);useOnUpdate(function(){onValueChange==null?void 0:onValueChange(internalValue!=null?internalValue:"");},[internalValue]);return _jsx(PickerInputContainer,Object.assign({testID:"dropdown-modal-picker",Icon:Icon,placeholder:placeholder,selectedValue:value,options:options,onPress:function onPress(){var _dropdownRef$current;(_dropdownRef$current=dropdownRef.current)==null?void 0:_dropdownRef$current.openDropdown();if(autoDismissKeyboard){Keyboard.dismiss();}},disabled:disabled},rest,{children:_jsx(ModalPickerComponent,{ref:dropdownRef,data:options,defaultValue:internalValue,onSelect:function onSelect(selectedItem){setInternalValue(selectedItem.value);},renderButton:function renderButton(){return _jsx(_Fragment,{});},renderItem:function renderItem(item,_,isSelected){var _pickerItemProps$sele,_pickerItemProps$sele2,_pickerItemProps$sele3;var backgroundColor=isSelected?(_pickerItemProps$sele=pickerItemProps.selectedBackgroundColor)!=null?_pickerItemProps$sele:pickerItemViewStyles.backgroundColor:pickerItemViewStyles.backgroundColor;var textColor=isSelected?(_pickerItemProps$sele2=pickerItemProps.selectedTextColor)!=null?_pickerItemProps$sele2:dropDownTextColor:dropDownTextColor;var textSize=isSelected?(_pickerItemProps$sele3=pickerItemProps.selectedTextSize)!=null?_pickerItemProps$sele3:14:14;return _jsxs(View,{style:[{padding:10,flexDirection:"row",alignItems:"center",backgroundColor:backgroundColor},pickerItemViewStyles],children:[_jsx(Text,{style:[{color:textColor,fontSize:textSize,flex:1},pickerItemTextStyles],children:item.label}),isSelected?_jsx(Icon,{name:selectedIconName,size:selectedIconSize,color:selectedIconColor}):null]});},showsVerticalScrollIndicator:false,dropdownOverlayColor:dropdownOverlayColor,dropdownStyle:{borderColor:dropDownBorderColor,borderWidth:dropDownBorderWidth,borderRadius:dropDownBorderRadius,backgroundColor:dropDownBackgroundColor},disableAutoScroll:true,statusBarTranslucent:true})}));};export default withTheme(ModalPicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","selectedIconName","selectedIconColor","selectedIconSize","dropDownBackgroundColor","dropDownBorderColor","dropDownTextColor","dropDownBorderWidth","dropDownBorderRadius","children","disabled"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/DropDownPicker.tsx";import*as React from"react";import{Keyboard}from"react-native";import{extractStyles,useDeepCompareMemo}from"../../../utilities";import{normalizeToPickerOptions,usePickerItemProps}from"../PickerCommon";import PickerInputContainer from"../PickerInputContainer";import DropDownPickerComponent from"react-native-dropdown-picker";import{withTheme}from"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","options","onValueChange","Icon","placeholder","value","autoDismissKeyboard","selectedIconName","selectedIconColor","selectedIconSize","dropDownBackgroundColor","dropDownBorderColor","dropDownTextColor","dropDownBorderWidth","dropDownBorderRadius","children","disabled"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/DropDownPicker.tsx";import*as React from"react";import{Keyboard}from"react-native";import{extractStyles,useDeepCompareMemo}from"../../../utilities";import{normalizeToPickerOptions,usePickerItemProps}from"../PickerCommon";import PickerInputContainer from"../PickerInputContainer";import DropDownPickerComponent from"react-native-dropdown-picker";import{withTheme}from"@draftbit/theme";import{useOnUpdate}from"../../../hooks";import{jsx as _jsx}from"react/jsx-runtime";var DropDownPicker=function DropDownPicker(_ref){var theme=_ref.theme,_ref$options=_ref.options,optionsProp=_ref$options===void 0?[]:_ref$options,onValueChange=_ref.onValueChange,Icon=_ref.Icon,placeholder=_ref.placeholder,value=_ref.value,_ref$autoDismissKeybo=_ref.autoDismissKeyboard,autoDismissKeyboard=_ref$autoDismissKeybo===void 0?true:_ref$autoDismissKeybo,_ref$selectedIconName=_ref.selectedIconName,selectedIconName=_ref$selectedIconName===void 0?"Feather/check":_ref$selectedIconName,_ref$selectedIconColo=_ref.selectedIconColor,selectedIconColor=_ref$selectedIconColo===void 0?theme.colors.text.strong:_ref$selectedIconColo,_ref$selectedIconSize=_ref.selectedIconSize,selectedIconSize=_ref$selectedIconSize===void 0?20:_ref$selectedIconSize,_ref$dropDownBackgrou=_ref.dropDownBackgroundColor,dropDownBackgroundColor=_ref$dropDownBackgrou===void 0?theme.colors.background.brand:_ref$dropDownBackgrou,_ref$dropDownBorderCo=_ref.dropDownBorderColor,dropDownBorderColor=_ref$dropDownBorderCo===void 0?theme.colors.border.brand:_ref$dropDownBorderCo,_ref$dropDownTextColo=_ref.dropDownTextColor,dropDownTextColor=_ref$dropDownTextColo===void 0?theme.colors.text.strong:_ref$dropDownTextColo,_ref$dropDownBorderWi=_ref.dropDownBorderWidth,dropDownBorderWidth=_ref$dropDownBorderWi===void 0?1:_ref$dropDownBorderWi,_ref$dropDownBorderRa=_ref.dropDownBorderRadius,dropDownBorderRadius=_ref$dropDownBorderRa===void 0?8:_ref$dropDownBorderRa,childrenProp=_ref.children,disabled=_ref.disabled,rest=_objectWithoutProperties(_ref,_excluded);var _React$useState=React.useState(false),_React$useState2=_slicedToArray(_React$useState,2),pickerVisible=_React$useState2[0],setPickerVisible=_React$useState2[1];var _React$useState3=React.useState(value),_React$useState4=_slicedToArray(_React$useState3,2),internalValue=_React$useState4[0],setInternalValue=_React$useState4[1];var isMultiSelect=Array.isArray(value);var pickerItemProps=usePickerItemProps(childrenProp);var _extractStyles=extractStyles(pickerItemProps.style),pickerItemViewStyles=_extractStyles.viewStyles,pickerItemTextStyles=_extractStyles.textStyles;var options=useDeepCompareMemo(function(){return normalizeToPickerOptions(optionsProp).map(function(option){return{label:option.label.toString(),value:option.value};});},[optionsProp]);useOnUpdate(function(){onValueChange==null?void 0:onValueChange(isMultiSelect?internalValue!=null?internalValue:[]:internalValue!=null?internalValue:"");},[internalValue]);React.useEffect(function(){if(pickerVisible&&autoDismissKeyboard){Keyboard.dismiss();}},[pickerVisible,autoDismissKeyboard]);React.useEffect(function(){if(disabled){setPickerVisible(false);}},[disabled]);return _jsx(PickerInputContainer,Object.assign({testID:"dropdown-picker",Icon:Icon,placeholder:placeholder,selectedValue:value,options:options,onPress:function onPress(){return setPickerVisible(!pickerVisible);},zIndex:pickerVisible?100:undefined,disabled:disabled},rest,{children:_jsx(DropDownPickerComponent,{open:pickerVisible,setOpen:setPickerVisible,value:value||null,setValue:setInternalValue,items:options,placeholder:placeholder,listMode:"SCROLLVIEW",multiple:isMultiSelect,style:{display:"none"},listItemLabelStyle:[{color:dropDownTextColor,fontSize:14},pickerItemTextStyles],selectedItemLabelStyle:[pickerItemProps.selectedTextColor?{color:pickerItemProps.selectedTextColor}:{},pickerItemProps.selectedTextSize?{fontSize:pickerItemProps.selectedTextSize}:{}],listItemContainerStyle:pickerItemViewStyles,selectedItemContainerStyle:pickerItemProps.selectedBackgroundColor?{backgroundColor:pickerItemProps.selectedBackgroundColor}:{},dropDownContainerStyle:{borderColor:dropDownBorderColor,borderWidth:dropDownBorderWidth,borderRadius:dropDownBorderRadius,backgroundColor:dropDownBackgroundColor},TickIconComponent:function TickIconComponent(){return _jsx(Icon,{name:selectedIconName,size:selectedIconSize,color:selectedIconColor});}})}));};export default withTheme(DropDownPicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/MultiSelectPicker.tsx";import*as React from"react";import DropDownPicker from"./DropDownPicker";import{withTheme}from"
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["value"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/dropdown/MultiSelectPicker.tsx";import*as React from"react";import DropDownPicker from"./DropDownPicker";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var MultiSelectPicker=function MultiSelectPicker(_ref){var value=_ref.value,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(DropDownPicker,Object.assign({value:value||[]},rest));};export default withTheme(MultiSelectPicker);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["mode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/index.tsx";import React from"react";import NativePicker from"./NativePicker";import DropDownPicker from"./dropdown/DropDownPicker";import DropDownModalPicker from"./dropdown/DropDownModalPicker";import{withTheme}from"
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["mode"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Picker/index.tsx";import React from"react";import NativePicker from"./NativePicker";import DropDownPicker from"./dropdown/DropDownPicker";import DropDownModalPicker from"./dropdown/DropDownModalPicker";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var SinglePicker=function SinglePicker(_ref){var _ref$mode=_ref.mode,mode=_ref$mode===void 0?"native":_ref$mode,rest=_objectWithoutProperties(_ref,_excluded);switch(mode){case"native":return _jsx(NativePicker,Object.assign({},rest));case"dropdown":return _jsx(DropDownPicker,Object.assign({},rest));case"dropdown-modal":return _jsx(DropDownModalPicker,Object.assign({},rest));}};export var Picker=withTheme(SinglePicker);export{default as MultiSelectPicker}from"./dropdown/MultiSelectPicker";export{default as PickerItem}from"./dropdown/PickerItem";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","onInputFull","cellCount","clearOnCellFocus","blurOnFull","renderItem","value","onChangeText","focusedBorderColor","focusedBackgroundColor","focusedBorderWidth","focusedTextColor","secureTextEntry","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInput.tsx";import React from"react";import{View,StyleSheet,Platform}from"react-native";import TextInput from"../TextInput";import{CodeField,useClearByFocusCell}from"react-native-confirmation-code-field";import{withTheme}from"
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["theme","onInputFull","cellCount","clearOnCellFocus","blurOnFull","renderItem","value","onChangeText","focusedBorderColor","focusedBackgroundColor","focusedBorderWidth","focusedTextColor","secureTextEntry","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInput.tsx";import React from"react";import{View,StyleSheet,Platform}from"react-native";import TextInput from"../TextInput";import{CodeField,useClearByFocusCell}from"react-native-confirmation-code-field";import{withTheme}from"@draftbit/theme";import PinInputText from"./PinInputText";import{extractStyles}from"../../utilities";import{jsx as _jsx}from"react/jsx-runtime";var PinInput=React.forwardRef(function(_ref,ref){var theme=_ref.theme,onInputFull=_ref.onInputFull,_ref$cellCount=_ref.cellCount,cellCount=_ref$cellCount===void 0?4:_ref$cellCount,_ref$clearOnCellFocus=_ref.clearOnCellFocus,clearOnCellFocus=_ref$clearOnCellFocus===void 0?true:_ref$clearOnCellFocus,_ref$blurOnFull=_ref.blurOnFull,blurOnFull=_ref$blurOnFull===void 0?true:_ref$blurOnFull,renderItem=_ref.renderItem,value=_ref.value,onChangeText=_ref.onChangeText,_ref$focusedBorderCol=_ref.focusedBorderColor,focusedBorderColor=_ref$focusedBorderCol===void 0?theme.colors.branding.primary:_ref$focusedBorderCol,focusedBackgroundColor=_ref.focusedBackgroundColor,focusedBorderWidth=_ref.focusedBorderWidth,focusedTextColor=_ref.focusedTextColor,secureTextEntry=_ref.secureTextEntry,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var newPinInputRef=React.useRef(null);var pinInputRef=ref?ref:newPinInputRef;var _extractStyles=extractStyles(style),viewStyles=_extractStyles.viewStyles,textStyles=_extractStyles.textStyles;var _useClearByFocusCell=useClearByFocusCell({value:value,setValue:function setValue(text){return onChangeText==null?void 0:onChangeText(text);}}),_useClearByFocusCell2=_slicedToArray(_useClearByFocusCell,2),codeFieldProps=_useClearByFocusCell2[0],getCellOnLayout=_useClearByFocusCell2[1];React.useEffect(function(){if((value==null?void 0:value.length)===cellCount){if(blurOnFull){var _pinInputRef$current;(_pinInputRef$current=pinInputRef.current)==null?void 0:_pinInputRef$current.blur();}onInputFull==null?void 0:onInputFull(value);}},[value,cellCount,blurOnFull,pinInputRef]);var _renderCell=function renderCell(cellValue,index,isFocused){if(secureTextEntry&&cellValue){cellValue="•";}var cell=(renderItem==null?void 0:renderItem({cellValue:cellValue,index:index,isFocused:isFocused}))||_jsx(View,{testID:"default-code-input-cell",style:[styles.cell,{borderColor:theme.colors.border.brand},viewStyles,isFocused&&focusedBorderWidth?{borderWidth:focusedBorderWidth}:undefined,isFocused&&focusedBorderColor?{borderColor:focusedBorderColor}:undefined,isFocused&&focusedBackgroundColor?{backgroundColor:focusedBackgroundColor}:undefined],children:_jsx(PinInputText,{style:[styles.cellText,{color:theme.colors.text.strong},textStyles,isFocused&&focusedTextColor?{color:focusedTextColor}:undefined],isFocused:isFocused,children:cellValue})});return React.cloneElement(cell,{onLayout:clearOnCellFocus?getCellOnLayout(index):undefined});};return _jsx(CodeField,Object.assign({ref:pinInputRef},clearOnCellFocus?codeFieldProps:{},{value:value,onChangeText:onChangeText,rootStyle:styles.rootContainer,textInputStyle:[{height:"100%"},Platform.OS==="web"?{outlineWidth:0}:{}],InputComponent:TextInput,cellCount:cellCount,renderCell:function renderCell(_ref2){var cellValue=_ref2.symbol,index=_ref2.index,isFocused=_ref2.isFocused;return _jsx(React.Fragment,{children:_renderCell(cellValue,index,isFocused)},index);},secureTextEntry:secureTextEntry},rest));});var styles=StyleSheet.create({rootContainer:{justifyContent:"center"},cell:{marginLeft:5,marginRight:5,padding:5,borderRadius:5,justifyContent:"center",alignItems:"center",aspectRatio:1,maxWidth:70,maxHeight:70,borderWidth:1,flex:1},cellText:{fontSize:25}});export default withTheme(PinInput);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["isFocused","cursorBlinkDuration","cursorText","style","theme","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInputText.tsx";import React from"react";import{Text}from"react-native";import{withTheme}from"
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["isFocused","cursorBlinkDuration","cursorText","style","theme","children"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/PinInput/PinInputText.tsx";import React from"react";import{Text}from"react-native";import{withTheme}from"@draftbit/theme";import{Cursor}from"react-native-confirmation-code-field";import{jsx as _jsx}from"react/jsx-runtime";var CustomPinInputText=function CustomPinInputText(_ref){var isFocused=_ref.isFocused,cursorBlinkDuration=_ref.cursorBlinkDuration,cursorText=_ref.cursorText,style=_ref.style,theme=_ref.theme,children=_ref.children,rest=_objectWithoutProperties(_ref,_excluded);return _jsx(Text,Object.assign({style:[{color:theme.colors.text.strong},style]},rest,{children:children||(isFocused?_jsx(Cursor,{cursorSymbol:cursorText,delay:cursorBlinkDuration}):null)}));};export default withTheme(CustomPinInputText);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Portal/Portal.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import*as React from"react";import PortalConsumer from"./PortalConsumer";import PortalHost,{PortalContext}from"./PortalHost";import{
|
|
1
|
+
import _classCallCheck from"@babel/runtime/helpers/classCallCheck";import _createClass from"@babel/runtime/helpers/createClass";import _inherits from"@babel/runtime/helpers/inherits";import _possibleConstructorReturn from"@babel/runtime/helpers/possibleConstructorReturn";import _getPrototypeOf from"@babel/runtime/helpers/getPrototypeOf";var _jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Portal/Portal.tsx";function _createSuper(Derived){var hasNativeReflectConstruct=_isNativeReflectConstruct();return function _createSuperInternal(){var Super=_getPrototypeOf(Derived),result;if(hasNativeReflectConstruct){var NewTarget=_getPrototypeOf(this).constructor;result=Reflect.construct(Super,arguments,NewTarget);}else{result=Super.apply(this,arguments);}return _possibleConstructorReturn(this,result);};}function _isNativeReflectConstruct(){if(typeof Reflect==="undefined"||!Reflect.construct)return false;if(Reflect.construct.sham)return false;if(typeof Proxy==="function")return true;try{Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));return true;}catch(e){return false;}}import*as React from"react";import PortalConsumer from"./PortalConsumer";import PortalHost,{PortalContext}from"./PortalHost";import{jsx as _jsx}from"react/jsx-runtime";var Portal=function(_React$Component){_inherits(Portal,_React$Component);var _super=_createSuper(Portal);function Portal(){_classCallCheck(this,Portal);return _super.apply(this,arguments);}_createClass(Portal,[{key:"render",value:function render(){var _this=this;var _children=this.props.children;return _jsx(PortalContext.Consumer,{children:function children(manager){return _jsx(PortalConsumer,{manager:manager,children:_children});}});}}]);return Portal;}(React.Component);Portal.Host=PortalHost;export default Portal;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx";import React from"react";import Svg,{Path}from"react-native-svg";import{View}from"react-native";import Animated,{useAnimatedProps,useSharedValue,withTiming}from"react-native-reanimated";import{DEFAULT_ANIMATION_DURATION}from"../ProgressCommon";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var AnimatedPath=Animated.createAnimatedComponent(Path);var _worklet_16765260741242_init_data={code:"function anonymous(){const{currentAngle,startAngle,circlePath,radius,thicknessOffset}=this.__closure;const isBelowMinAngle=currentAngle.value<=startAngle;return{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,Math.min(currentAngle.value,startAngle+360)),strokeOpacity:isBelowMinAngle?0.0:1.0};}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"currentAngle\",\"startAngle\",\"circlePath\",\"radius\",\"thicknessOffset\",\"__closure\",\"isBelowMinAngle\",\"value\",\"d\",\"Math\",\"min\",\"strokeOpacity\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoFgE,SAAAA,SAAMA,CAAA,QAAAC,YAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,MAAA,CAAAC,eAAA,OAAAC,SAAA,CAClE,KAAM,CAAAC,eAAe,CAAGN,YAAY,CAACO,KAAK,EAAIN,UAAU,CACxD,MAAO,CACLO,CAAC,CAAEN,UAAU,CACXC,MAAM,CACNA,MAAM,CACNA,MAAM,CAAGC,eAAe,CACxBH,UAAU,CACVQ,IAAI,CAACC,GAAG,CAACV,YAAY,CAACO,KAAK,CAAEN,UAAU,CAAG,GAAG,CAC/C,CAAC,CACDU,aAAa,CAAEL,eAAe,CAAG,GAAG,CAAG,GACzC,CAAC,CACH\",\"ignoreList\":[]}",version:"3.6.3"};export var CircularProgress=function CircularProgress(_ref){var theme=_ref.theme,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?100:_ref$maximumValue,_ref$value=_ref.value,value=_ref$value===void 0?minimumValue:_ref$value,_ref$thickness=_ref.thickness,thickness=_ref$thickness===void 0?10:_ref$thickness,_ref$trackThickness=_ref.trackThickness,trackThickness=_ref$trackThickness===void 0?thickness:_ref$trackThickness,_ref$color=_ref.color,color=_ref$color===void 0?theme.colors.primary:_ref$color,_ref$trackColor=_ref.trackColor,trackColor=_ref$trackColor===void 0?theme.colors.
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx";import React from"react";import Svg,{Path}from"react-native-svg";import{View}from"react-native";import Animated,{useAnimatedProps,useSharedValue,withTiming}from"react-native-reanimated";import{DEFAULT_ANIMATION_DURATION}from"../ProgressCommon";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var AnimatedPath=Animated.createAnimatedComponent(Path);var _worklet_16765260741242_init_data={code:"function anonymous(){const{currentAngle,startAngle,circlePath,radius,thicknessOffset}=this.__closure;const isBelowMinAngle=currentAngle.value<=startAngle;return{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,Math.min(currentAngle.value,startAngle+360)),strokeOpacity:isBelowMinAngle?0.0:1.0};}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"currentAngle\",\"startAngle\",\"circlePath\",\"radius\",\"thicknessOffset\",\"__closure\",\"isBelowMinAngle\",\"value\",\"d\",\"Math\",\"min\",\"strokeOpacity\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoFgE,SAAAA,SAAMA,CAAA,QAAAC,YAAA,CAAAC,UAAA,CAAAC,UAAA,CAAAC,MAAA,CAAAC,eAAA,OAAAC,SAAA,CAClE,KAAM,CAAAC,eAAe,CAAGN,YAAY,CAACO,KAAK,EAAIN,UAAU,CACxD,MAAO,CACLO,CAAC,CAAEN,UAAU,CACXC,MAAM,CACNA,MAAM,CACNA,MAAM,CAAGC,eAAe,CACxBH,UAAU,CACVQ,IAAI,CAACC,GAAG,CAACV,YAAY,CAACO,KAAK,CAAEN,UAAU,CAAG,GAAG,CAC/C,CAAC,CACDU,aAAa,CAAEL,eAAe,CAAG,GAAG,CAAG,GACzC,CAAC,CACH\",\"ignoreList\":[]}",version:"3.6.3"};export var CircularProgress=function CircularProgress(_ref){var theme=_ref.theme,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?100:_ref$maximumValue,_ref$value=_ref.value,value=_ref$value===void 0?minimumValue:_ref$value,_ref$thickness=_ref.thickness,thickness=_ref$thickness===void 0?10:_ref$thickness,_ref$trackThickness=_ref.trackThickness,trackThickness=_ref$trackThickness===void 0?thickness:_ref$trackThickness,_ref$color=_ref.color,color=_ref$color===void 0?theme.colors.branding.primary:_ref$color,_ref$trackColor=_ref.trackColor,trackColor=_ref$trackColor===void 0?theme.colors.border.brand:_ref$trackColor,_ref$trackOpacity=_ref.trackOpacity,trackOpacity=_ref$trackOpacity===void 0?1:_ref$trackOpacity,_ref$showTrack=_ref.showTrack,showTrack=_ref$showTrack===void 0?true:_ref$showTrack,_ref$animationDuratio=_ref.animationDuration,animationDuration=_ref$animationDuratio===void 0?DEFAULT_ANIMATION_DURATION:_ref$animationDuratio,_ref$isAnimated=_ref.isAnimated,isAnimated=_ref$isAnimated===void 0?true:_ref$isAnimated,_ref$lineCap=_ref.lineCap,lineCap=_ref$lineCap===void 0?"round":_ref$lineCap,_ref$trackLineCap=_ref.trackLineCap,trackLineCap=_ref$trackLineCap===void 0?lineCap:_ref$trackLineCap,dashWidth=_ref.dashWidth,trackDashWidth=_ref.trackDashWidth,dashGap=_ref.dashGap,trackDashGap=_ref.trackDashGap,dashOffset=_ref.dashOffset,trackDashOffset=_ref.trackDashOffset,customDashArray=_ref.customDashArray,trackCustomDashArray=_ref.trackCustomDashArray,onFullPathWidth=_ref.onFullPathWidth,_ref$startPosition=_ref.startPosition,startPosition=_ref$startPosition===void 0?"top":_ref$startPosition,style=_ref.style,testID=_ref.testID;var _React$useState=React.useState(0),_React$useState2=_slicedToArray(_React$useState,2),svgContainerWidth=_React$useState2[0],setSvgContainerWidth=_React$useState2[1];var _React$useState3=React.useState(0),_React$useState4=_slicedToArray(_React$useState3,2),circumfrence=_React$useState4[0],setCircumefrence=_React$useState4[1];var dashArray=dashWidth!==undefined?`${dashWidth} ${dashGap||dashWidth}`:undefined;var trackDashArray=trackDashWidth!==undefined?`${trackDashWidth} ${trackDashGap||trackDashWidth}`:undefined;var maxThickness=Math.max(thickness,trackThickness);var thicknessOffset=maxThickness/2;var radius=svgContainerWidth/2;var c=2*Math.PI*radius;if(c!==circumfrence){setCircumefrence(c);}var startAngle=React.useMemo(function(){switch(startPosition){case"top":return 0;case"right":return 90;case"bottom":return 180;case"left":return 270;}},[startPosition]);var currentFillPercentage=value/(maximumValue+minimumValue);var currentAngle=useSharedValue(startAngle);var progressPathAnimatedProps=useAnimatedProps(function(){var _e=[new global.Error(),-6,-27];var anonymous=function anonymous(){var isBelowMinAngle=currentAngle.value<=startAngle;return{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,Math.min(currentAngle.value,startAngle+360)),strokeOpacity:isBelowMinAngle?0.0:1.0};};anonymous.__closure={currentAngle:currentAngle,startAngle:startAngle,circlePath:circlePath,radius:radius,thicknessOffset:thicknessOffset};anonymous.__workletHash=16765260741242;anonymous.__initData=_worklet_16765260741242_init_data;anonymous.__stackDetails=_e;return anonymous;}());React.useEffect(function(){currentAngle.value=withTiming(startAngle+currentFillPercentage*360,{duration:isAnimated?animationDuration:0});},[value,currentFillPercentage,animationDuration,currentAngle,maximumValue,minimumValue,isAnimated,startAngle]);React.useEffect(function(){onFullPathWidth==null?void 0:onFullPathWidth(circumfrence);},[circumfrence,onFullPathWidth]);return _jsx(View,{onLayout:function onLayout(event){var width=event.nativeEvent.layout.width;setSvgContainerWidth(width);},style:[{height:svgContainerWidth},style],children:_jsxs(Svg,{testID:testID!=null?testID:"circular-progress-component",style:{flex:1},children:[showTrack&&_jsx(Path,{d:circlePath(radius,radius,radius-thicknessOffset,startAngle,startAngle+360),stroke:trackColor,strokeWidth:trackThickness,strokeOpacity:trackOpacity,strokeLinecap:trackLineCap,strokeDasharray:trackCustomDashArray||trackDashArray,strokeDashoffset:trackDashOffset,fill:"rgba(0,0,0,0)"}),_jsx(AnimatedPath,{animatedProps:progressPathAnimatedProps,stroke:color,strokeWidth:thickness,strokeLinecap:lineCap,strokeDasharray:customDashArray||dashArray,strokeDashoffset:dashOffset,fill:"rgba(0,0,0,0)",onPress:function onPress(){}})]})});};var _worklet_3990955206175_init_data={code:"function circlePath(x,y,radius,startAngle,endAngle){function polarToCartesian(centerX,centerY,radius,angleInDegrees){var angleInRadians=(angleInDegrees-90)*Math.PI/180.0;return{x:centerX+radius*Math.cos(angleInRadians),y:centerY+radius*Math.sin(angleInRadians)};}var start=polarToCartesian(x,y,radius,endAngle*0.9999);var end=polarToCartesian(x,y,radius,startAngle);var largeArcFlag=endAngle-startAngle<=180?\"0\":\"1\";var d=[\"M\",start.x,start.y,\"A\",radius,radius,0,largeArcFlag,0,end.x,end.y];return d.join(\" \");}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"circlePath\",\"x\",\"y\",\"radius\",\"startAngle\",\"endAngle\",\"polarToCartesian\",\"centerX\",\"centerY\",\"angleInDegrees\",\"Math\",\"cos\",\"angleInRadians\",\"sin\",\"start\",\"end\",\"largeArcFlag\",\"d\",\"join\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/CircularProgress.tsx\"],\"mappings\":\"AAoKA,SAAAA,WAAAC,CAAA,CAAAC,CAAA,CAAAC,MAAA,CAAAC,UAAA,CAAAC,QAAA,EAQa,SAAAC,iBAAAC,OAAA,CAAAC,OAAA,CAAAL,MAAA,CAAAM,cAAA,E,qDAEX,MAAS,CAMPR,CAAA,CAAIM,OAAA,CAAAJ,MAAkB,CAACO,IAAA,CAAAC,GAAA,CAAAC,cAAuB,EAC9CV,CAAA,CAAAM,OAAO,CAAAL,MAAA,CAAAO,IAAA,CAAAG,GAAA,CAAAD,cAAA,C,MAGN,CAAAE,KAAA,CAAAR,gBAAA,CAAAL,CAAA,CAAAC,CAAA,CAAAC,MAAA,CAAAE,QAAA,SACH,IAAAU,GAAA,CAAAT,gBAAA,CAAAL,CAAA,CAAAC,CAAA,CAAAC,MAAA,CAAAC,UAAA,EAEA,GAAI,CAAAY,YAAQ,CAAAX,QAAA,CAAkBD,UAAK,EAAQ,OAAQ,CAAG,IACtD,GAAI,CAAAa,CAAA,CAAG,IAAG,CAAAH,KAAA,CAAAb,CAAA,CAAAa,KAAkB,CAAAZ,CAAE,CAAC,GAAE,CAAAC,MAAQ,CAAAA,MAAU,CAAC,EAAAa,YAAA,GAAAD,GAAA,CAAAd,CAAA,CAAAc,GAAA,CAAAb,CAAA,EACpD,MAAI,CAAAe,CAAA,CAAAC,IAAA,IAAY,E\",\"ignoreList\":[]}",version:"3.6.3"};var circlePath=function(){var _e=[new global.Error(),1,-27];var circlePath=function circlePath(x,y,radius,startAngle,endAngle){function polarToCartesian(centerX,centerY,radius,angleInDegrees){var angleInRadians=(angleInDegrees-90)*Math.PI/180.0;return{x:centerX+radius*Math.cos(angleInRadians),y:centerY+radius*Math.sin(angleInRadians)};}var start=polarToCartesian(x,y,radius,endAngle*0.9999);var end=polarToCartesian(x,y,radius,startAngle);var largeArcFlag=endAngle-startAngle<=180?"0":"1";var d=["M",start.x,start.y,"A",radius,radius,0,largeArcFlag,0,end.x,end.y];return d.join(" ");};circlePath.__closure={};circlePath.__workletHash=3990955206175;circlePath.__initData=_worklet_3990955206175_init_data;circlePath.__stackDetails=_e;return circlePath;}();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/index.tsx";import React from"react";import IndeterminateProgress from"../IndeterminateProgress";import{CircularProgress as CircularProgressComponent}from"./CircularProgress";import{withTheme}from"
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/CircularProgress/index.tsx";import React from"react";import IndeterminateProgress from"../IndeterminateProgress";import{CircularProgress as CircularProgressComponent}from"./CircularProgress";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var CircularProgress=function CircularProgress(props){if(props.indeterminate){return _jsx(IndeterminateProgress,Object.assign({ProgressComponent:CircularProgressComponent},props));}else{return _jsx(CircularProgressComponent,Object.assign({},props));}};export default withTheme(CircularProgress);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx";import React from"react";import Svg,{Line}from"react-native-svg";import{View}from"react-native";import Animated,{useAnimatedProps,useSharedValue,withTiming}from"react-native-reanimated";import{DEFAULT_ANIMATION_DURATION}from"../ProgressCommon";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var AnimatedLine=Animated.createAnimatedComponent(Line);var _worklet_12336175905426_init_data={code:"function anonymous(){const{currentProgressLineWidth,thicknessOffset,progressLineWidth}=this.__closure;const isBelowMinWidth=currentProgressLineWidth.value<=thicknessOffset;return{x2:Math.min(progressLineWidth,currentProgressLineWidth.value),strokeOpacity:isBelowMinWidth?0.0:1.0};}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"currentProgressLineWidth\",\"thicknessOffset\",\"progressLineWidth\",\"__closure\",\"isBelowMinWidth\",\"value\",\"x2\",\"Math\",\"min\",\"strokeOpacity\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx\"],\"mappings\":\"AA8DgE,SAAAA,SAAMA,CAAA,QAAAC,wBAAA,CAAAC,eAAA,CAAAC,iBAAA,OAAAC,SAAA,CAClE,KAAM,CAAAC,eAAe,CAAGJ,wBAAwB,CAACK,KAAK,EAAIJ,eAAe,CACzE,MAAO,CACLK,EAAE,CAAEC,IAAI,CAACC,GAAG,CAACN,iBAAiB,CAAEF,wBAAwB,CAACK,KAAK,CAAC,CAC/DI,aAAa,CAAEL,eAAe,CAAG,GAAG,CAAG,GACzC,CAAC,CACH\",\"ignoreList\":[]}",version:"3.6.3"};export var LinearProgress=function LinearProgress(_ref){var theme=_ref.theme,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?100:_ref$maximumValue,_ref$value=_ref.value,value=_ref$value===void 0?minimumValue:_ref$value,_ref$thickness=_ref.thickness,thickness=_ref$thickness===void 0?10:_ref$thickness,_ref$trackThickness=_ref.trackThickness,trackThickness=_ref$trackThickness===void 0?thickness:_ref$trackThickness,_ref$color=_ref.color,color=_ref$color===void 0?theme.colors.primary:_ref$color,_ref$trackColor=_ref.trackColor,trackColor=_ref$trackColor===void 0?theme.colors.
|
|
1
|
+
import _slicedToArray from"@babel/runtime/helpers/slicedToArray";var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx";import React from"react";import Svg,{Line}from"react-native-svg";import{View}from"react-native";import Animated,{useAnimatedProps,useSharedValue,withTiming}from"react-native-reanimated";import{DEFAULT_ANIMATION_DURATION}from"../ProgressCommon";import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";export var AnimatedLine=Animated.createAnimatedComponent(Line);var _worklet_12336175905426_init_data={code:"function anonymous(){const{currentProgressLineWidth,thicknessOffset,progressLineWidth}=this.__closure;const isBelowMinWidth=currentProgressLineWidth.value<=thicknessOffset;return{x2:Math.min(progressLineWidth,currentProgressLineWidth.value),strokeOpacity:isBelowMinWidth?0.0:1.0};}",location:"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx",sourceMap:"{\"version\":3,\"names\":[\"anonymous\",\"currentProgressLineWidth\",\"thicknessOffset\",\"progressLineWidth\",\"__closure\",\"isBelowMinWidth\",\"value\",\"x2\",\"Math\",\"min\",\"strokeOpacity\"],\"sources\":[\"/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/LinearProgress.tsx\"],\"mappings\":\"AA8DgE,SAAAA,SAAMA,CAAA,QAAAC,wBAAA,CAAAC,eAAA,CAAAC,iBAAA,OAAAC,SAAA,CAClE,KAAM,CAAAC,eAAe,CAAGJ,wBAAwB,CAACK,KAAK,EAAIJ,eAAe,CACzE,MAAO,CACLK,EAAE,CAAEC,IAAI,CAACC,GAAG,CAACN,iBAAiB,CAAEF,wBAAwB,CAACK,KAAK,CAAC,CAC/DI,aAAa,CAAEL,eAAe,CAAG,GAAG,CAAG,GACzC,CAAC,CACH\",\"ignoreList\":[]}",version:"3.6.3"};export var LinearProgress=function LinearProgress(_ref){var theme=_ref.theme,_ref$minimumValue=_ref.minimumValue,minimumValue=_ref$minimumValue===void 0?0:_ref$minimumValue,_ref$maximumValue=_ref.maximumValue,maximumValue=_ref$maximumValue===void 0?100:_ref$maximumValue,_ref$value=_ref.value,value=_ref$value===void 0?minimumValue:_ref$value,_ref$thickness=_ref.thickness,thickness=_ref$thickness===void 0?10:_ref$thickness,_ref$trackThickness=_ref.trackThickness,trackThickness=_ref$trackThickness===void 0?thickness:_ref$trackThickness,_ref$color=_ref.color,color=_ref$color===void 0?theme.colors.branding.primary:_ref$color,_ref$trackColor=_ref.trackColor,trackColor=_ref$trackColor===void 0?theme.colors.border.brand:_ref$trackColor,_ref$trackOpacity=_ref.trackOpacity,trackOpacity=_ref$trackOpacity===void 0?1:_ref$trackOpacity,_ref$showTrack=_ref.showTrack,showTrack=_ref$showTrack===void 0?true:_ref$showTrack,_ref$animationDuratio=_ref.animationDuration,animationDuration=_ref$animationDuratio===void 0?DEFAULT_ANIMATION_DURATION:_ref$animationDuratio,_ref$isAnimated=_ref.isAnimated,isAnimated=_ref$isAnimated===void 0?true:_ref$isAnimated,_ref$lineCap=_ref.lineCap,lineCap=_ref$lineCap===void 0?"round":_ref$lineCap,_ref$trackLineCap=_ref.trackLineCap,trackLineCap=_ref$trackLineCap===void 0?lineCap:_ref$trackLineCap,dashWidth=_ref.dashWidth,trackDashWidth=_ref.trackDashWidth,dashGap=_ref.dashGap,trackDashGap=_ref.trackDashGap,dashOffset=_ref.dashOffset,trackDashOffset=_ref.trackDashOffset,customDashArray=_ref.customDashArray,trackCustomDashArray=_ref.trackCustomDashArray,onFullPathWidth=_ref.onFullPathWidth,style=_ref.style,testID=_ref.testID;var _React$useState=React.useState(0),_React$useState2=_slicedToArray(_React$useState,2),svgContainerWidth=_React$useState2[0],setSvgContainerWidth=_React$useState2[1];var dashArray=dashWidth!==undefined?`${dashWidth} ${dashGap||dashWidth}`:undefined;var trackDashArray=trackDashWidth!==undefined?`${trackDashWidth} ${trackDashGap||trackDashWidth}`:undefined;var maxThickness=Math.max(thickness,trackThickness);var thicknessOffset=maxThickness/2;var progressLineWidth=svgContainerWidth-thicknessOffset;var trackProgressLineWidth=svgContainerWidth-thicknessOffset;var currentFillPercentage=value/(maximumValue+minimumValue);var currentProgressLineWidth=useSharedValue(0);var progressLineAnimatedProps=useAnimatedProps(function(){var _e=[new global.Error(),-4,-27];var anonymous=function anonymous(){var isBelowMinWidth=currentProgressLineWidth.value<=thicknessOffset;return{x2:Math.min(progressLineWidth,currentProgressLineWidth.value),strokeOpacity:isBelowMinWidth?0.0:1.0};};anonymous.__closure={currentProgressLineWidth:currentProgressLineWidth,thicknessOffset:thicknessOffset,progressLineWidth:progressLineWidth};anonymous.__workletHash=12336175905426;anonymous.__initData=_worklet_12336175905426_init_data;anonymous.__stackDetails=_e;return anonymous;}());React.useEffect(function(){currentProgressLineWidth.value=withTiming(progressLineWidth*currentFillPercentage,{duration:isAnimated?animationDuration:0});},[value,progressLineWidth,currentFillPercentage,animationDuration,currentProgressLineWidth,maximumValue,minimumValue,isAnimated]);return _jsx(View,{onLayout:function onLayout(event){var width=event.nativeEvent.layout.width;setSvgContainerWidth(width);onFullPathWidth==null?void 0:onFullPathWidth(width);},style:[{height:maxThickness},style],children:_jsxs(Svg,{testID:testID!=null?testID:"linear-progress-component",style:{flex:1},children:[showTrack&&_jsx(Line,{x1:thicknessOffset,y1:thicknessOffset,x2:trackProgressLineWidth,y2:thicknessOffset,stroke:trackColor,strokeWidth:trackThickness,strokeOpacity:trackOpacity,strokeLinecap:trackLineCap,strokeDasharray:trackCustomDashArray||trackDashArray,strokeDashoffset:trackDashOffset}),_jsx(AnimatedLine,{animatedProps:progressLineAnimatedProps,x1:thicknessOffset,y1:thicknessOffset,y2:thicknessOffset,stroke:color,strokeWidth:thickness,strokeLinecap:lineCap,strokeDasharray:customDashArray||dashArray,strokeDashoffset:dashOffset,onPress:function onPress(){}})]})});};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/index.tsx";import React from"react";import IndeterminateProgress from"../IndeterminateProgress";import{LinearProgress as LinearProgressComponent}from"./LinearProgress";import{withTheme}from"
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/Progress/LinearProgress/index.tsx";import React from"react";import IndeterminateProgress from"../IndeterminateProgress";import{LinearProgress as LinearProgressComponent}from"./LinearProgress";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var LinearProgress=function LinearProgress(props){if(props.indeterminate){return _jsx(IndeterminateProgress,Object.assign({ProgressComponent:LinearProgressComponent},props));}else{return _jsx(LinearProgressComponent,Object.assign({},props));}};export default withTheme(LinearProgress);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/ProgressIndicator.tsx";import*as React from"react";import StepIndicator from"./StepIndicator";import{withTheme}from"
|
|
1
|
+
var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/ProgressIndicator.tsx";import*as React from"react";import StepIndicator from"./StepIndicator";import{withTheme}from"@draftbit/theme";import{jsx as _jsx}from"react/jsx-runtime";var ProgressIndicator=function ProgressIndicator(_ref){var numberOfSteps=_ref.numberOfSteps,currentStep=_ref.currentStep,_ref$currentStepStrok=_ref.currentStepStrokeWidth,currentStepStrokeWidth=_ref$currentStepStrok===void 0?3:_ref$currentStepStrok,_ref$stepStrokeCurren=_ref.stepStrokeCurrentColor,stepStrokeCurrentColor=_ref$stepStrokeCurren===void 0?"primary":_ref$stepStrokeCurren,stepIndicatorSize=_ref.stepIndicatorSize,currentStepIndicatorSize=_ref.currentStepIndicatorSize,stepIndicatorCurrentColor=_ref.stepIndicatorCurrentColor,stepIndicatorLabelCurrentColor=_ref.stepIndicatorLabelCurrentColor,_ref$stepIndicatorLab=_ref.stepIndicatorLabelFontSize,stepIndicatorLabelFontSize=_ref$stepIndicatorLab===void 0?12:_ref$stepIndicatorLab,_ref$stepNumberFinish=_ref.stepNumberFinishedColor,stepNumberFinishedColor=_ref$stepNumberFinish===void 0?"strongInverse":_ref$stepNumberFinish,_ref$stepNumberUnfini=_ref.stepNumberUnfinishedColor,stepNumberUnfinishedColor=_ref$stepNumberUnfini===void 0?"primary":_ref$stepNumberUnfini,_ref$unfinishedColor=_ref.unfinishedColor,unfinishedColor=_ref$unfinishedColor===void 0?"light":_ref$unfinishedColor,_ref$finishedColor=_ref.finishedColor,finishedColor=_ref$finishedColor===void 0?"primary":_ref$finishedColor,theme=_ref.theme;var currentPosition=currentStep-1;return _jsx(StepIndicator,{stepCount:numberOfSteps,currentPosition:currentPosition,customStyles:{stepIndicatorSize:stepIndicatorSize,currentStepIndicatorSize:currentStepIndicatorSize?currentStepIndicatorSize:stepIndicatorSize,stepStrokeFinishedColor:finishedColor,stepStrokeUnFinishedColor:unfinishedColor,separatorFinishedColor:finishedColor,separatorUnFinishedColor:unfinishedColor,stepIndicatorFinishedColor:finishedColor,stepIndicatorUnFinishedColor:unfinishedColor,currentStepStrokeWidth:currentStepStrokeWidth,stepStrokeCurrentColor:stepStrokeCurrentColor||stepIndicatorCurrentColor,stepIndicatorLabelUnFinishedColor:stepNumberUnfinishedColor,stepIndicatorLabelFinishedColor:stepNumberFinishedColor,stepIndicatorCurrentColor:stepIndicatorCurrentColor||unfinishedColor,stepIndicatorLabelCurrentColor:stepIndicatorLabelCurrentColor||stepNumberUnfinishedColor,stepIndicatorLabelFontSize:stepIndicatorLabelFontSize,labelFontFamily:theme.typography.body1.fontFamily}});};export default withTheme(ProgressIndicator);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","label","value","color","unselectedColor","onPress","labelContainerStyle","labelStyle","radioButtonStyle","direction","selected","disabled","style"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/RadioButton/RadioButtonRow.tsx";import*as React from"react";import{StyleSheet,View,Platform}from"react-native";import RadioButton from"./RadioButton";import Text from"../Text";import{useRadioButtonGroupContext}from"./context";import{Direction as GroupDirection}from"./context";import Touchable from"../Touchable";import{extractStyles,getValueForRadioButton}from"../../utilities";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Direction=function(Direction){Direction["Row"]="row";Direction["RowReverse"]="row-reverse";return Direction;}({});var getRadioButtonAlignment=function getRadioButtonAlignment(parentDirection,direction){if(parentDirection===GroupDirection.Horizontal){return direction===Direction.Row?"flex-start":"flex-end";}else if(direction===Direction.RowReverse){return"flex-start";}else{return"flex-end";}};var renderLabel=function renderLabel(value,labelStyle,textStyle){if(typeof value==="string"){return _jsx(Text,{style:[labelStyle,textStyle],children:value});}else{return _jsx(_Fragment,{children:value});}};var RadioButtonRow=function RadioButtonRow(_ref){var Icon=_ref.Icon,label=_ref.label,_ref$value=_ref.value,value=_ref$value===void 0?"":_ref$value,color=_ref.color,unselectedColor=_ref.unselectedColor,onPress=_ref.onPress,labelContainerStyle=_ref.labelContainerStyle,labelStyle=_ref.labelStyle,radioButtonStyle=_ref.radioButtonStyle,_ref$direction=_ref.direction,direction=_ref$direction===void 0?Direction.Row:_ref$direction,selected=_ref.selected,disabled=_ref.disabled,style=_ref.style,rest=_objectWithoutProperties(_ref,_excluded);var _useRadioButtonGroupC=useRadioButtonGroupContext(),contextValue=_useRadioButtonGroupC.value,onValueChange=_useRadioButtonGroupC.onValueChange,parentDirection=_useRadioButtonGroupC.direction;var realValue=getValueForRadioButton(value);var realContextValue=getValueForRadioButton(contextValue);var isSelected=selected!=null?selected:realContextValue===realValue;var handlePress=function handlePress(){onPress==null?void 0:onPress(realValue);onValueChange==null?void 0:onValueChange(realValue);};var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;return _jsxs(Touchable,Object.assign({onPress:handlePress,style:[styles.mainParent,{flexDirection:direction},viewStyles],disabled:disabled},rest,{children:[_jsx(View,{style:[styles.label,{alignItems:direction===Direction.Row?"flex-start":"flex-end"},labelContainerStyle],children:renderLabel(label,labelStyle,textStyles)}),_jsx(View,{style:{flex:1,alignItems:getRadioButtonAlignment(parentDirection,direction)},children:_jsx(RadioButton,{Icon:Icon,selected:isSelected,value:realValue,color:color,unselectedColor:unselectedColor,style:radioButtonStyle})})]}));};var styles=StyleSheet.create({mainParent:Object.assign({flex:1,alignItems:"center",justifyContent:"space-around",paddingStart:20,minHeight:50,paddingEnd:20,display:"flex"},Platform.select({web:{cursor:"pointer",userSelect:"none"}})),label:{flex:3}});export default RadioButtonRow;
|
|
1
|
+
import _objectWithoutProperties from"@babel/runtime/helpers/objectWithoutProperties";var _excluded=["Icon","label","value","color","unselectedColor","onPress","labelContainerStyle","labelStyle","radioButtonStyle","direction","selected","disabled","style","theme"];var _this=this,_jsxFileName="/home/runner/work/react-native-jigsaw/react-native-jigsaw/packages/core/src/components/RadioButton/RadioButtonRow.tsx";import*as React from"react";import{StyleSheet,View,Platform}from"react-native";import RadioButton from"./RadioButton";import Text from"../Text";import{useRadioButtonGroupContext}from"./context";import{Direction as GroupDirection}from"./context";import Touchable from"../Touchable";import{extractStyles,getValueForRadioButton}from"../../utilities";import{withTheme}from"@draftbit/theme";import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";export var Direction=function(Direction){Direction["Row"]="row";Direction["RowReverse"]="row-reverse";return Direction;}({});var getRadioButtonAlignment=function getRadioButtonAlignment(parentDirection,direction){if(parentDirection===GroupDirection.Horizontal){return direction===Direction.Row?"flex-start":"flex-end";}else if(direction===Direction.RowReverse){return"flex-start";}else{return"flex-end";}};var renderLabel=function renderLabel(value,labelStyle,textStyle){if(typeof value==="string"){return _jsx(Text,{style:[labelStyle,textStyle],children:value});}else{return _jsx(_Fragment,{children:value});}};var RadioButtonRow=function RadioButtonRow(_ref){var Icon=_ref.Icon,label=_ref.label,_ref$value=_ref.value,value=_ref$value===void 0?"":_ref$value,color=_ref.color,unselectedColor=_ref.unselectedColor,onPress=_ref.onPress,labelContainerStyle=_ref.labelContainerStyle,labelStyle=_ref.labelStyle,radioButtonStyle=_ref.radioButtonStyle,_ref$direction=_ref.direction,direction=_ref$direction===void 0?Direction.Row:_ref$direction,selected=_ref.selected,disabled=_ref.disabled,style=_ref.style,theme=_ref.theme,rest=_objectWithoutProperties(_ref,_excluded);var _useRadioButtonGroupC=useRadioButtonGroupContext(),contextValue=_useRadioButtonGroupC.value,onValueChange=_useRadioButtonGroupC.onValueChange,parentDirection=_useRadioButtonGroupC.direction;var realValue=getValueForRadioButton(value);var realContextValue=getValueForRadioButton(contextValue);var isSelected=selected!=null?selected:realContextValue===realValue;var handlePress=function handlePress(){onPress==null?void 0:onPress(realValue);onValueChange==null?void 0:onValueChange(realValue);};var _extractStyles=extractStyles(style),textStyles=_extractStyles.textStyles,viewStyles=_extractStyles.viewStyles;return _jsxs(Touchable,Object.assign({onPress:handlePress,style:[styles.mainParent,{flexDirection:direction},viewStyles],disabled:disabled},rest,{children:[_jsx(View,{style:[styles.label,{alignItems:direction===Direction.Row?"flex-start":"flex-end"},labelContainerStyle],children:renderLabel(label,labelStyle,StyleSheet.flatten([{color:theme.colors.text.strong},textStyles]))}),_jsx(View,{style:{flex:1,alignItems:getRadioButtonAlignment(parentDirection,direction)},children:_jsx(RadioButton,{Icon:Icon,selected:isSelected,value:realValue,color:color,unselectedColor:unselectedColor,style:radioButtonStyle})})]}));};var styles=StyleSheet.create({mainParent:Object.assign({flex:1,alignItems:"center",justifyContent:"space-around",paddingStart:20,minHeight:50,paddingEnd:20,display:"flex"},Platform.select({web:{cursor:"pointer",userSelect:"none"}})),label:{flex:3}});export default withTheme(RadioButtonRow);
|