{"_id":"react-with-direction","_rev":"3902449","name":"react-with-direction","description":"Components to provide and consume RTL or LTR direction in React","dist-tags":{"latest":"1.4.0"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"time":{"modified":"2025-09-01T01:09:58.000Z","created":"2017-08-08T23:42:28.730Z","1.4.0":"2021-10-11T19:48:12.654Z","1.3.1":"2019-08-30T19:45:23.775Z","1.3.0":"2018-01-30T01:00:06.429Z","1.2.0":"2018-01-18T00:30:02.294Z","1.1.0":"2017-10-16T23:36:42.218Z","1.0.1":"2017-08-23T00:34:43.796Z","1.0.0":"2017-08-08T23:42:28.730Z"},"users":{},"author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"versions":{"1.4.0":{"name":"react-with-direction","version":"1.4.0","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","pretest:only":"npm run react","test:only":"jest","test":"npm run test:only","test:watch":"npm run test:only -- --watchAll","clean":"rimraf dist","react":"enzyme-adapter-react-install 16","prepublish":"safe-publish-latest && npm run build"},"dependencies":{"airbnb-prop-types":"^2.16.0","brcast":"^2.0.2","deepmerge":"^1.5.2","direction":"^1.0.4","hoist-non-react-statics":"^3.3.2","object.assign":"^4.1.2","object.values":"^1.1.5","prop-types":"^15.7.2"},"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^21.2.0","babel-plugin-transform-replace-object-assign":"^1.0.0","babel-preset-airbnb":"^2.6.0","casual":"^1.6.2","chai":"^4.3.4","chai-enzyme":"^1.0.0-beta.1","cheerio":"=1.0.0-rc.3","enzyme":"^3.11.0","enzyme-adapter-react-helper":"^1.3.9","eslint":"^7.32.0","eslint-config-airbnb":"^18.2.1","eslint-plugin-import":"^2.24.2","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.26.1","jest":"^21.2.1","react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16","rimraf":"^2.7.1","safe-publish-latest":"^1.1.4","sinon":"^4.5.0","sinon-chai":"^3.7.0","sinon-sandbox":"^2.0.6","webpack":"^3.12.0"},"peerDependencies":{"react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16"},"gitHead":"d6a8523379df6b27a6271b96cf0224741c1e5620","_id":"react-with-direction@1.4.0","_nodeVersion":"12.16.2","_npmVersion":"6.14.4","dist":{"shasum":"ebdf64d685d0650ce966e872e6431ad5a2485444","size":9981,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.4.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.4.0.tgz"},"_npmUser":{"name":"lencioni","email":"joe.lencioni@gmail.com"},"directories":{},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction_1.4.0_1633981692403_0.3895608872545766"},"_hasShrinkwrap":false,"publish_time":1633981692654,"_cnpm_publish_time":1633981692654,"_cnpmcore_publish_time":"2021-12-16T16:12:29.913Z"},"1.3.1":{"name":"react-with-direction","version":"1.3.1","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","pretest:only":"npm run react","test:only":"jest","test":"npm run test:only","test:watch":"npm run test:only -- --watchAll","clean":"rimraf dist","react":"enzyme-adapter-react-install 16","prepublish":"safe-publish-latest && npm run build"},"dependencies":{"airbnb-prop-types":"^2.10.0","brcast":"^2.0.2","deepmerge":"^1.5.2","direction":"^1.0.2","hoist-non-react-statics":"^3.3.0","object.assign":"^4.1.0","object.values":"^1.0.4","prop-types":"^15.6.2"},"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^21.2.0","babel-plugin-transform-replace-object-assign":"^1.0.0","babel-preset-airbnb":"^2.5.3","casual":"^1.5.19","chai":"^4.1.2","chai-enzyme":"^1.0.0-beta.1","enzyme":"^3.3.0","enzyme-adapter-react-helper":"^1.2.3","eslint":"^4.19.1","eslint-config-airbnb":"^17.0.0","eslint-plugin-import":"^2.13.0","eslint-plugin-jsx-a11y":"^6.1.1","eslint-plugin-react":"^7.10.0","jest":"^21.2.1","react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16","rimraf":"^2.6.2","safe-publish-latest":"^1.1.1","sinon":"^4.5.0","sinon-chai":"^3.2.0","sinon-sandbox":"^2.0.0","webpack":"^3.10.0"},"peerDependencies":{"react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16"},"gitHead":"87923a3417bae5300b43108287e9ed573d7a0941","_id":"react-with-direction@1.3.1","_nodeVersion":"8.9.1","_npmVersion":"6.9.0","dist":{"shasum":"9fd414564f0ffe6947e5ff176f6132dd83f8b8df","size":9673,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.3.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.3.1.tgz"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmUser":{"name":"noratarano","email":"noratarano@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction_1.3.1_1567194323641_0.030064393829715597"},"_hasShrinkwrap":false,"publish_time":1567194323775,"_cnpm_publish_time":1567194323775,"_cnpmcore_publish_time":"2021-12-16T16:12:30.168Z"},"1.3.0":{"name":"react-with-direction","version":"1.3.0","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","pretest:only":"npm run react","test:only":"jest","test":"npm run test:only","test:watch":"npm run test:only -- --watchAll","clean":"rimraf dist","react":"enzyme-adapter-react-install 16","prepublish":"safe-publish-latest && npm run build"},"dependencies":{"airbnb-prop-types":"^2.8.1","brcast":"^2.0.2","deepmerge":"^1.5.1","direction":"^1.0.1","hoist-non-react-statics":"^2.3.1","object.assign":"^4.1.0","object.values":"^1.0.4","prop-types":"^15.6.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^21.2.0","babel-plugin-transform-replace-object-assign":"^0.2.1","babel-preset-airbnb":"^2.4.0","casual":"^1.5.19","chai":"^4.1.2","chai-enzyme":"^1.0.0-beta.0","enzyme":"^3.3.0","enzyme-adapter-react-helper":"^1.2.2","eslint":"^4.15.0","eslint-config-airbnb":"^16.1.0","eslint-plugin-import":"^2.8.0","eslint-plugin-jsx-a11y":"^6.0.3","eslint-plugin-react":"^7.5.1","jest":"^21.2.1","react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16","rimraf":"^2.6.2","safe-publish-latest":"^1.1.1","sinon":"^4.1.6","sinon-chai":"^2.14.0","sinon-sandbox":"^1.0.2","webpack":"^3.10.0"},"peerDependencies":{"react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16"},"gitHead":"0b6625cb9979514bb0042ffc6487bc5203e69054","_id":"react-with-direction@1.3.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"yzimet","email":"yzimet@gmail.com"},"dist":{"shasum":"9885f5941aa986be753db95a41e8f3d8f8de97ff","size":9677,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.3.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.3.0.tgz"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction-1.3.0.tgz_1517274006344_0.429226916981861"},"directories":{},"publish_time":1517274006429,"_hasShrinkwrap":false,"_cnpm_publish_time":1517274006429,"_cnpmcore_publish_time":"2021-12-16T16:12:30.361Z"},"1.2.0":{"name":"react-with-direction","version":"1.2.0","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","pretest:only":"npm run react","test:only":"jest","test":"npm run test:only","clean":"rimraf dist","react":"enzyme-adapter-react-install 16","prepublish":"safe-publish-latest"},"dependencies":{"airbnb-prop-types":"^2.8.1","brcast":"^2.0.2","deepmerge":"^1.5.1","hoist-non-react-statics":"^2.3.1","object.assign":"^4.0.4","object.values":"^1.0.4","prop-types":"^15.6.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^21.2.0","babel-plugin-transform-replace-object-assign":"^0.2.1","babel-preset-airbnb":"^2.4.0","casual":"^1.5.17","chai":"^4.1.2","chai-enzyme":"^1.0.0-beta.0","enzyme":"^3.2.0","enzyme-adapter-react-helper":"^1.0.3","eslint":"^4.11.0","eslint-config-airbnb":"^16.1.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.4.0","jest":"^21.2.1","react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16","react-test-renderer":"^0.14 || ^15 || ^16","rimraf":"^2.6.2","safe-publish-latest":"^1.1.1","sinon":"^4.1.2","sinon-chai":"^2.14.0","sinon-sandbox":"^1.0.2","webpack":"^3.7.1"},"peerDependencies":{"react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16"},"gitHead":"721653ec85a5eadb11b7968bbd2e2c10f177a5ed","_id":"react-with-direction@1.2.0","_npmVersion":"5.5.1","_nodeVersion":"8.9.1","_npmUser":{"name":"yzimet","email":"yzimet@gmail.com"},"dist":{"shasum":"b1c1baf1c8e41913ba2d8b1fd22f29873667d12f","size":8651,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.2.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.2.0.tgz"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction-1.2.0.tgz_1516235402107_0.9664642713032663"},"directories":{},"publish_time":1516235402294,"_hasShrinkwrap":false,"_cnpm_publish_time":1516235402294,"_cnpmcore_publish_time":"2021-12-16T16:12:30.594Z"},"1.1.0":{"name":"react-with-direction","version":"1.1.0","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","test:only":"jest","test":"npm run test:only","clean":"rimraf dist","react:clean":"npm uninstall --no-save react react-dom react-test-renderer react-addons-test-utils enzyme-adapter-react-14 enzyme-adapter-react-15.4 enzyme-adapter-react-15 enzyme-adapter-react-16 && rimraf node_modules/react-test-renderer node_modules/react && npm prune","react:14":"npm run react:clean && npm i --no-save react@0.14 react-dom@0.14 react-addons-test-utils@0.14 enzyme-adapter-react-14 && npm prune && npm i --no-save react-addons-test-utils@0.14 enzyme-adapter-react-14","react:15.4":"npm run react:clean && npm i --no-save react@15.4 react-dom@15.4 react-addons-test-utils@15.4 enzyme-adapter-react-15.4 react-test-renderer@15.4 && npm prune && npm i --no-save react-addons-test-utils@15.4 enzyme-adapter-react-15.4","react:15":"npm run react:clean && npm i --no-save react@15 react-dom@15 react-test-renderer@15 react-addons-test-utils@15 enzyme-adapter-react-15 && npm prune && npm i --no-save react-addons-test-utils@15 enzyme-adapter-react-15","react:16":"npm run react:clean && npm i --no-save react@16 react-dom@16 react-test-renderer@16 enzyme-adapter-react-16 && npm prune && npm i --no-save enzyme-adapter-react-16","prepublish":"safe-publish-latest"},"dependencies":{"airbnb-prop-types":"^2.8.1","brcast":"^2.0.2","deepmerge":"^1.5.1","hoist-non-react-statics":"^2.3.1","object.assign":"^4.0.4","object.values":"^1.0.4","prop-types":"^15.6.0"},"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^21.2.0","babel-plugin-transform-replace-object-assign":"^0.2.1","babel-preset-airbnb":"^2.4.0","casual":"^1.5.17","chai":"^4.1.2","chai-enzyme":"^1.0.0-beta.0","enzyme":"^3.1.0","eslint":"^4.9.0","eslint-config-airbnb":"^16.1.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jsx-a11y":"^6.0.2","eslint-plugin-react":"^7.4.0","jest":"^21.2.1","react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16","react-test-renderer":"^0.14 || ^15 || ^16","rimraf":"^2.6.2","safe-publish-latest":"^1.1.1","sinon":"^4.0.1","sinon-chai":"^2.14.0","sinon-sandbox":"^1.0.2","webpack":"^3.7.1"},"peerDependencies":{"react":"^0.14 || ^15 || ^16","react-dom":"^0.14 || ^15 || ^16"},"gitHead":"e8e8962a47e29ebcf96fc61831bd13a231414a58","_id":"react-with-direction@1.1.0","_npmVersion":"5.5.1","_nodeVersion":"8.7.0","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"dist":{"shasum":"1043d850db3d5c9970bca9e8d05dbea8c7e958c4","size":8694,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.1.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.1.0.tgz"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction-1.1.0.tgz_1508197002060_0.1191022782586515"},"directories":{},"publish_time":1508197002218,"_hasShrinkwrap":false,"_cnpm_publish_time":1508197002218,"_cnpmcore_publish_time":"2021-12-16T16:12:30.832Z"},"1.0.1":{"name":"react-with-direction","version":"1.0.1","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","test:only":"jest","test":"npm run test:only","clean":"rimraf dist","react:clean":"npm uninstall --no-save react react-dom react-addons-test-utils react-test-renderer && rimraf node_modules/react-test-renderer node_modules/react && npm prune","react:14":"npm run react:clean && npm i --no-save react@0.14 react-dom@0.14 react-addons-test-utils@0.14 && npm prune","react:15.4":"npm run react:clean && npm i --no-save react@15.4 react-dom@15.4 react-addons-test-utils@15.4 react-test-renderer@15.4 && npm prune","react:15":"npm run react:clean && npm i --no-save react@15 react-dom@15 react-addons-test-utils@15 react-test-renderer@15 && npm prune","prepublish":"safe-publish-latest"},"dependencies":{"airbnb-prop-types":"^2.8.1","brcast":"^2.0.2","deepmerge":"^1.5.1","hoist-non-react-statics":"^2.3.0","object.assign":"^4.0.4","object.values":"^1.0.4","prop-types":"^15.5.10"},"devDependencies":{"babel-cli":"^6.26.0","babel-jest":"^20.0.3","babel-plugin-transform-replace-object-assign":"^0.2.1","babel-preset-airbnb":"^2.4.0","casual":"^1.5.17","chai":"^4.1.1","chai-enzyme":"^0.8.0","enzyme":"^2.9.1","eslint":"^4.5.0","eslint-config-airbnb":"^15.1.0","eslint-plugin-import":"^2.7.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.3.0","jest":"^20.0.4","react":"^0.14 || ^15","react-addons-test-utils":"^0.14 || ^15","react-dom":"^0.14 || ^15","react-test-renderer":"^0.14 || ^15","rimraf":"^2.6.1","safe-publish-latest":"^1.1.1","sinon":"^3.2.1","sinon-chai":"^2.13.0","sinon-sandbox":"^1.0.2","webpack":"^3.5.5"},"peerDependencies":{"react":"^0.14 || ^15","react-dom":"^0.14 || ^15"},"gitHead":"c236088212cc4bdc0012667157691917d429b392","_id":"react-with-direction@1.0.1","_shasum":"eff05a47a5adcc30864279563d43d6da4e007e5c","_from":".","_npmVersion":"2.15.11","_nodeVersion":"4.8.4","_npmUser":{"name":"ljharb","email":"ljharb@gmail.com"},"dist":{"shasum":"eff05a47a5adcc30864279563d43d6da4e007e5c","size":8975,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.0.1.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.0.1.tgz"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction-1.0.1.tgz_1503448482641_0.7558244997635484"},"directories":{},"publish_time":1503448483796,"_hasShrinkwrap":false,"_cnpm_publish_time":1503448483796,"_cnpmcore_publish_time":"2021-12-16T16:12:31.454Z"},"1.0.0":{"name":"react-with-direction","version":"1.0.0","description":"Components to provide and consume RTL or LTR direction in React","author":{"name":"Yaniv Zimet","email":"yaniv.zimet@airbnb.com"},"repository":{"type":"git","url":"git+https://github.com/airbnb/react-with-direction.git"},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"main":"dist/withDirection","license":"MIT","scripts":{"prebuild":"npm run clean","build":"babel src --out-dir dist","lint":"eslint .","pretest":"npm run lint","test:only":"jest","test":"npm run test:only","clean":"rimraf dist","react:clean":"npm uninstall --no-save react react-dom react-addons-test-utils react-test-renderer && rimraf node_modules/react-test-renderer node_modules/react && npm prune","react:14":"npm run react:clean && npm i --no-save react@0.14 react-dom@0.14 react-addons-test-utils@0.14 && npm prune","react:15":"npm run react:clean && npm i --no-save react@15 react-dom@15 react-addons-test-utils@15 react-test-renderer@15 && npm prune","prepublish":"safe-publish-latest"},"dependencies":{"airbnb-prop-types":"^2.8.0","brcast":"^2.0.2","deepmerge":"^1.5.0","hoist-non-react-statics":"^2.2.2","object.assign":"^4.0.4","object.values":"^1.0.4","prop-types":"^15.5.10"},"devDependencies":{"babel-cli":"^6.24.1","babel-plugin-transform-replace-object-assign":"^0.2.1","babel-preset-airbnb":"^2.4.0","casual":"^1.5.14","chai":"^4.1.1","chai-enzyme":"^0.8.0","enzyme":"^2.9.1","eslint":"^4.4.1","eslint-config-airbnb":"^15.1.0","eslint-config-airbnb-base":"^11.3.1","eslint-plugin-import":"^2.7.0","eslint-plugin-jsx-a11y":"^5.1.1","eslint-plugin-react":"^7.1.0","jest":"^20.0.4","react":"^0.14 || ^15.6","react-addons-test-utils":"^0.14 || ^15.6","react-dom":"^0.14 || ^15.6","react-test-renderer":"^0.14 || ^15.6","rimraf":"^2.6.1","safe-publish-latest":"^1.1.1","sinon":"^2.4.1","sinon-chai":"^2.12.0","sinon-sandbox":"^1.0.2","webpack":"^3.5.1"},"peerDependencies":{"react":"^0.14 || ^15.6","react-dom":"^0.14 || ^15.6"},"gitHead":"771459fa4d96fcef7dde74ea223dd136ad89b7e9","_id":"react-with-direction@1.0.0","_shasum":"0fb7463b607d1c9c58ee2a48e1770d5f50bdf177","_from":".","_npmVersion":"3.9.5","_nodeVersion":"6.2.2","_npmUser":{"name":"yzimet","email":"yzimet@gmail.com"},"dist":{"shasum":"0fb7463b607d1c9c58ee2a48e1770d5f50bdf177","size":8803,"noattachment":false,"key":"/react-with-direction/-/react-with-direction-1.0.0.tgz","tarball":"http://registry.cnpm.dingdandao.com/react-with-direction/download/react-with-direction-1.0.0.tgz"},"maintainers":[{"name":"airbnbeng","email":"opensource@airbnb.com"},{"name":"brieb","email":""},{"name":"brucewpaul","email":"brucewpaul@gmail.com"},{"name":"christianv","email":"vueringschristian@gmail.com"},{"name":"danbeam","email":""},{"name":"ljharb","email":""},{"name":"noratarano","email":"noratarano@gmail.com"},{"name":"sharmilajesupaul","email":"tosharmila@gmail.com"},{"name":"yzimet","email":""}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/react-with-direction-1.0.0.tgz_1502235747787_0.8730251337401569"},"directories":{},"publish_time":1502235748730,"_hasShrinkwrap":false,"_cnpm_publish_time":1502235748730,"_cnpmcore_publish_time":"2021-12-16T16:12:31.674Z"}},"readme":"# react-with-direction <sup>[![Version Badge][npm-version-svg]][package-url]</sup>\n\n[![Build Status][travis-svg]][travis-url]\n[![dependency status][deps-svg]][deps-url]\n[![dev dependency status][dev-deps-svg]][dev-deps-url]\n[![License][license-image]][license-url]\n[![Downloads][downloads-image]][downloads-url]\n\n[![npm badge][npm-badge-png]][package-url]\n\nComponents to support both right-to-left (RTL) and left-to-right (LTR) layouts in React.\n\nSupporting RTL or switching between different directions can be tricky. Most browsers have [built-in support](https://www.w3.org/International/questions/qa-html-dir) for displaying markup like paragraphs, lists, and tables. But what about interactive or complex custom UI components? In a right-to-left layout, a photo carousel should advance in the opposite direction, and the primary tab in a navigation control should the rightmost, for example.\n\nThis package provides components to simplify that effort.\n\n## withDirection\n\nUse `withDirection` when your component needs to change based on the layout direction. `withDirection` is an HOC that consumes the direction from React context and passes it as a `direction` prop to the wrapped component. The wrapped component can then pivot its logic to accommodate each direction.\n\nUsage example:\n\n```js\nimport withDirection, { withDirectionPropTypes, DIRECTIONS } from 'react-with-direction';\n\nfunction ForwardsLabel({ direction }) {\n  return (\n    <div>\n      Forwards\n      {direction === DIRECTIONS.LTR && <img src=\"arrow-right.png\" />}\n      {direction === DIRECTIONS.RTL && <img src=\"arrow-left.png\" />}\n    </div>\n  );\n}\nForwardsLabel.propTypes = {\n  ...withDirectionPropTypes,\n};\n\nexport default withDirection(ForwardsLabel);\n```\n\n## DirectionProvider\n\nUse `DirectionProvider` at the top of your app to set the direction context, which can then be consumed by components using `withDirection`.\n\nYou should set the `direction` prop based on the language of the content being rendered; for example, `DIRECTIONS.RTL` (right-to-left) for Arabic or Hebrew, or `DIRECTIONS.LTR` (left-to-right) for English or most other languages.\n\n`DirectionProvider` components can also be nested, so that the direction can be overridden for certain branches of the React tree.\n\n`DirectionProvider` will render its children inside of a `<div>` element with a `dir` attribute set to match the `direction` prop, for example: `<div dir=\"rtl\">`. This maintains consistency when being rendered in a browser. To render inside of a `<span>` instead of a div, set the `inline` prop to `true`.\n\nUsage example:\n\n```js\nimport DirectionProvider, { DIRECTIONS } from 'react-with-direction/dist/DirectionProvider';\n```\n\n```jsx\n<DirectionProvider direction={DIRECTIONS.RTL}>\n  <div>\n    <ForwardsLabel />\n  </div>\n</DirectionProvider>\n```\n\nTo set the `lang` attribute on the wrapping element, provide the `lang` prop to `DirectionProvider`.\n\nUsage example:\n\n```jsx\nimport DirectionProvider, { DIRECTIONS } from 'react-with-direction/dist/DirectionProvider';\n\n<DirectionProvider direction={DIRECTIONS.RTL} lang=\"ar\">\n  <div>\n    <ForwardsLabel />\n  </div>\n</DirectionProvider>\n```\n\nNote that `lang` and `direction` are independent – `lang` only sets the attribute on the wrapping element.\n\n## AutoDirectionProvider\n\nUse `AutoDirectionProvider` around, for example, user-generated content where the text direction is unknown or may change. This renders a `DirectionProvider` with the `direction` prop automatically set based on the `text` prop provided.\n\nDirection will be determined based on the first strong LTR/RTL character in the `text` string. Strings with no strong direction (e.g., numbers) will inherit the direction from its nearest `DirectionProvider` ancestor or default to LTR.\n\nUsage example:\n\n```js\nimport AutoDirectionProvider from 'react-with-direction/dist/AutoDirectionProvider';\n```\n\n```js\n<AutoDirectionProvider text={userGeneratedContent}>\n  <ExampleComponent>\n    {userGeneratedContent}\n  </ExampleComponent>\n</AutoDirectionProvider>\n```\n\n`AutoDirectionProvider` also supports the `lang` prop in the same way as `DirectionProvider` does.\n\n[package-url]: https://npmjs.org/package/react-with-direction\n[npm-version-svg]: http://versionbadg.es/airbnb/react-with-direction.svg\n[travis-svg]: https://travis-ci.org/airbnb/react-with-direction.svg\n[travis-url]: https://travis-ci.org/airbnb/react-with-direction\n[deps-svg]: https://david-dm.org/airbnb/react-with-direction.svg\n[deps-url]: https://david-dm.org/airbnb/react-with-direction\n[dev-deps-svg]: https://david-dm.org/airbnb/react-with-direction/dev-status.svg\n[dev-deps-url]: https://david-dm.org/airbnb/react-with-direction#info=devDependencies\n[npm-badge-png]: https://nodei.co/npm/react-with-direction.png?downloads=true&stars=true\n[license-image]: http://img.shields.io/npm/l/react-with-direction.svg\n[license-url]: LICENSE\n[downloads-image]: http://img.shields.io/npm/dm/react-with-direction.svg\n[downloads-url]: http://npm-stat.com/charts.html?package=react-with-direction\n","_attachments":{},"homepage":"https://github.com/airbnb/react-with-direction#readme","bugs":{"url":"https://github.com/airbnb/react-with-direction/issues"},"license":"MIT"}