Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019 react-native-community
Copyright (c) 2019 callstack

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<p align="center">
<h1 align="center"> <code>@react-native-community/slider</code> </h1>
<h1 align="center"> <code>@callstack/slider</code> </h1>
</p>
<p align="center">
<a href="https://www.npmjs.com/package/@react-native-community/slider">
<img src="https://img.shields.io/npm/v/@react-native-community/slider.svg" alt="Latest version released on npmjs" />
<a href="https://www.npmjs.com/package/@callstack/slider">
<img src="https://img.shields.io/npm/v/@callstack/slider.svg" alt="Latest version released on npmjs" />
</a>
<a href="https://github.com/callstack/react-native-slider/actions/workflows/ReactNativeSlider-CI.yml">
<img src="https://github.com/callstack/react-native-slider/actions/workflows/ReactNativeSlider-CI.yml/badge.svg?branch=main" alt="Build on GitHub Actions" />
Expand All @@ -12,7 +12,7 @@
<img src="https://img.shields.io/badge/platforms-android%20|%20ios%20|%20windows%20|%20web-lightgrey.svg" alt="Supported platforms" />
</a>
<a href="https://github.com/callstack/react-native-slider/blob/main/LICENSE.md">
<img src="https://img.shields.io/npm/l/@react-native-community/slider.svg" alt="License" />
<img src="https://img.shields.io/npm/l/@callstack/slider.svg" alt="License" />
</a>
</p>
<p align="center">
Expand All @@ -28,17 +28,17 @@

To install this module `cd` to your project directory and enter the following command:
```
yarn add @react-native-community/slider
yarn add @callstack/slider
```
or
```
npm install @react-native-community/slider --save
npm install @callstack/slider --save
```
If using iOS please remember to install cocoapods by running: `npx pod-install`

The following code presents the basic usage scenario of this library:
```javascript
import Slider from '@react-native-community/slider';
import Slider from '@callstack/slider';

<Slider
style={{width: 200, height: 40}}
Expand All @@ -59,14 +59,14 @@ If you have any questions, issues or any other topic that you need an advise in,
## React Native Compatibility
To use this library you need to ensure you are using the correct version of React Native.

| `@react-native-community/slider` version | Required React Native Version |
| `@callstack/slider` version | Required React Native Version |
| ---------------------------------------- | ---------------------------- |
| `4.5.1` | `>=0.69` |
| `4.3.0` | `>=0.64` |
| `4.x.x` | `>=0.60`; `>=0.62` (on Windows); |
| `3.1.x` | `>=0.60` |
| `2.x.x` | `>= 0.60` |
| [`1.x.x`](https://github.com/react-native-community/react-native-slider/tree/937f0942f1fffc6ed88b5cf7c88d73b7878f00f0) | `<= 0.59` |
| [`1.x.x`](https://github.com/callstack/react-native-slider/tree/937f0942f1fffc6ed88b5cf7c88d73b7878f00f0) | `<= 0.59` |


## Properties
Expand Down Expand Up @@ -244,7 +244,7 @@ If you are using React Native version lower than 0.70, you need to setup manual
Inside `example/android/app/src/main/jni/Android.mk` add these lines:

```diff
+ include $(NODE_MODULES_DIR)/@react-native-community/slider/android/build/generated/source/codegen/jni/Android.mk
+ include $(NODE_MODULES_DIR)/@callstack/slider/android/build/generated/source/codegen/jni/Android.mk
include $(CLEAR_VARS)
```

Expand Down Expand Up @@ -285,7 +285,7 @@ MainComponentsRegistry::sharedProviderRegistry() {

## Contributors

This module was extracted from `react-native` core. Please, refer to [contributors graph](https://github.com/react-native-community/react-native-slider/graphs/contributors) for the complete list of contributors.
This module was extracted from `react-native` core. Please, refer to [contributors graph](https://github.com/callstack/react-native-slider/graphs/contributors) for the complete list of contributors.

---

Expand Down
2 changes: 1 addition & 1 deletion example-web/craco.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
webpack: {
alias: {
'react-native$': 'react-native-web',
'@react-native-community/slider': path.resolve(__dirname, LIB_PATH),
'@callstack/slider': path.resolve(__dirname, LIB_PATH),
// make sure we don't include multiple versions of react
'react': path.resolve(__dirname, './node_modules/react'),
},
Expand Down
2 changes: 1 addition & 1 deletion example-web/src/Examples.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {useState} from 'react';
// @ts-ignore
import {Text, View, StyleSheet, ScrollView} from 'react-native';
// @ts-ignore
import Slider, {SliderProps} from '@react-native-community/slider';
import Slider, {SliderProps} from '@callstack/slider';

export interface Props {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion example-web/src/Props.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {useState} from 'react';
// @ts-ignore
import {Text, View, StyleSheet} from 'react-native';
// @ts-ignore
import Slider, {SliderProps} from '@react-native-community/slider';
import Slider, {SliderProps} from '@callstack/slider';

export interface Props {
title: string;
Expand Down
4 changes: 2 additions & 2 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1637,7 +1637,7 @@ DEPENDENCIES:
- React-Mapbuffer (from `../node_modules/react-native/ReactCommon`)
- React-microtasksnativemodule (from `../node_modules/react-native/ReactCommon/react/nativemodule/microtasks`)
- react-native-pager-view (from `../node_modules/react-native-pager-view`)
- "react-native-slider (from `../node_modules/@react-native-community/slider`)"
- "react-native-slider (from `../node_modules/@callstack/slider`)"
- React-nativeconfig (from `../node_modules/react-native/ReactCommon`)
- React-NativeModulesApple (from `../node_modules/react-native/ReactCommon/react/nativemodule/core/platform/ios`)
- React-perflogger (from `../node_modules/react-native/ReactCommon/reactperflogger`)
Expand Down Expand Up @@ -1746,7 +1746,7 @@ EXTERNAL SOURCES:
react-native-pager-view:
:path: "../node_modules/react-native-pager-view"
react-native-slider:
:path: "../node_modules/@react-native-community/slider"
:path: "../node_modules/@callstack/slider"
React-nativeconfig:
:path: "../node_modules/react-native/ReactCommon"
React-NativeModulesApple:
Expand Down
6 changes: 3 additions & 3 deletions example/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"start": "react-native start",
"test": "jest",
"windows": "npx @react-native-community/cli run-windows",
"postinstall": "rimraf ./node_modules/@react-native-community/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@react-native-community/slider && rimraf ./node_modules/@react-native-community/slider/node_modules",
"refresh-package": "rimraf ./node_modules/@react-native-community/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@react-native-community/slider && rimraf ./node_modules/@react-native-community/slider/node_modules",
"postinstall": "rimraf ./node_modules/@callstack/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@callstack/slider && rimraf ./node_modules/@callstack/slider/node_modules",
"refresh-package": "rimraf ./node_modules/@callstack/slider && npx copyfiles -u 2 \"./../package/**/*\" ./node_modules/@callstack/slider && rimraf ./node_modules/@callstack/slider/node_modules",
"clean-android": "rm -rf android/app/build",
"clean-ios": "rm -rf ios/build/generated/ios && rm -rf ios/Pods && rm ios/Podfile.lock"
},
"dependencies": {
"@react-native-community/slider": "file:../package",
"@callstack/slider": "file:../package",
"babel-preset-expo": "^9.2.0",
"react": "^18.3.1",
"react-native": "^0.76.3",
Expand Down
2 changes: 1 addition & 1 deletion example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
import {examples, Props as ExamplesTabProperties} from './Examples';
import {propsExamples, Props as PropsTabProperties} from './Props';
import PagerView from 'react-native-pager-view';
import Slider from '@react-native-community/slider';
import Slider from '@callstack/slider';

const App = () => {
const [currentPage, setCurrentPage] = useState(0);
Expand Down
2 changes: 1 addition & 1 deletion example/src/Examples.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {FC, useCallback, useState} from 'react';
import {Text, View, StyleSheet, Image} from 'react-native';
import Slider, {MarkerProps, SliderProps} from '@react-native-community/slider';
import Slider, {MarkerProps, SliderProps} from '@callstack/slider';

export interface Props {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion example/src/Props.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, {useState} from 'react';
import {Text, View, StyleSheet} from 'react-native';
import Slider, {SliderProps} from '@react-native-community/slider';
import Slider, {SliderProps} from '@callstack/slider';

export interface Props {
title: string;
Expand Down
2 changes: 1 addition & 1 deletion example/windows/example.sln
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mso", "..\node_modules\reac
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Include", "..\node_modules\react-native-windows\include\Include.vcxitems", "{EF074BA1-2D54-4D49-A28E-5E040B47CD2E}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SliderWindows", "..\node_modules\@react-native-community\slider\windows\SliderWindows\SliderWindows.vcxproj", "{685A83AE-36BC-4E9D-BDC6-417EBF168463}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SliderWindows", "..\node_modules\@callstack\slider\windows\SliderWindows\SliderWindows.vcxproj", "{685A83AE-36BC-4E9D-BDC6-417EBF168463}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
4 changes: 2 additions & 2 deletions example/windows/example/AutolinkedNativeModules.g.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@
#include "pch.h"
#include "AutolinkedNativeModules.g.h"

// Includes from @react-native-community/slider
// Includes from @callstack/slider
#include <winrt/SliderWindows.h>

namespace winrt::Microsoft::ReactNative
{

void RegisterAutolinkedNativeModulePackages(winrt::Windows::Foundation::Collections::IVector<winrt::Microsoft::ReactNative::IReactPackageProvider> const& packageProviders)
{
// IReactPackageProviders from @react-native-community/slider
// IReactPackageProviders from @callstack/slider
packageProviders.Append(winrt::SliderWindows::ReactPackageProvider());
}

Expand Down
10 changes: 6 additions & 4 deletions example/windows/example/AutolinkedNativeModules.g.targets
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- AutolinkedNativeModules.g.targets contents generated by "npx @react-native-community/cli autolink-windows" -->
<!-- AutolinkedNativeModules.g.targets contents generated by "npx @react-native-community/cli
autolink-windows" -->
<ItemGroup>
<!-- Projects from @react-native-community/slider -->
<ProjectReference Include="$(ProjectDir)..\..\node_modules\@react-native-community\slider\windows\SliderWindows\SliderWindows.vcxproj">
<!-- Projects from @callstack/slider -->
<ProjectReference
Include="$(ProjectDir)..\..\node_modules\@callstack\slider\windows\SliderWindows\SliderWindows.vcxproj">
<Project>{685a83ae-36bc-4e9d-bdc6-417ebf168463}</Project>
</ProjectReference>
</ItemGroup>
</Project>
</Project>
2 changes: 1 addition & 1 deletion package/ios/RNCSliderComponentView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ - (void)tapHandler:(UITapGestureRecognizer *)gesture {
std::dynamic_pointer_cast<const RNCSliderEventEmitter>(_eventEmitter)
->onRNCSliderSlidingStart(RNCSliderEventEmitter::OnRNCSliderSlidingStart{.value = static_cast<Float>(slider.lastValue)});

// Trigger onValueChange to address https://github.com/react-native-community/react-native-slider/issues/212
// Trigger onValueChange to address https://github.com/callstack/react-native-slider/issues/212
std::dynamic_pointer_cast<const RNCSliderEventEmitter>(_eventEmitter)
->onRNCSliderValueChange(RNCSliderEventEmitter::OnRNCSliderValueChange{.value = static_cast<Float>(slider.value)});

Expand Down
2 changes: 1 addition & 1 deletion package/ios/RNCSliderManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ - (void)tapHandler:(UITapGestureRecognizer *)gesture {
});
}

// Trigger onValueChange to address https://github.com/react-native-community/react-native-slider/issues/212
// Trigger onValueChange to address https://github.com/callstack/react-native-slider/issues/212
if (slider.onRNCSliderValueChange) {
slider.onRNCSliderValueChange(@{
@"value": @(slider.value),
Expand Down
4 changes: 2 additions & 2 deletions package/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@react-native-community/slider",
"name": "@callstack/slider",
"version": "4.5.6",
"license": "MIT",
"author": "react-native-community",
Expand Down
Loading