New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

makeup-roving-tabindex

Package Overview
Dependencies
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

makeup-roving-tabindex - npm Package Compare versions

Comparing version

to
0.0.3

27

docs/static/bundle.js

@@ -594,3 +594,3 @@ /*

$_mod.installed("makeup-roving-tabindex$0.0.2", "makeup-navigation-emitter", "0.0.3");
$_mod.installed("makeup-roving-tabindex$0.0.3", "makeup-navigation-emitter", "0.0.3");
$_mod.main("/makeup-navigation-emitter$0.0.3", "");

@@ -1034,3 +1034,3 @@ $_mod.installed("makeup-navigation-emitter$0.0.3", "custom-event-polyfill", "0.3.0");

});
$_mod.def("/makeup-roving-tabindex$0.0.2/util", function(require, exports, module, __filename, __dirname) { "use strict";
$_mod.def("/makeup-roving-tabindex$0.0.3/util", function(require, exports, module, __filename, __dirname) { "use strict";

@@ -1046,3 +1046,3 @@ function nodeListToArray(nodeList) {

});
$_mod.def("/makeup-roving-tabindex$0.0.2/index", function(require, exports, module, __filename, __dirname) { 'use strict';
$_mod.def("/makeup-roving-tabindex$0.0.3/index", function(require, exports, module, __filename, __dirname) { 'use strict';

@@ -1060,5 +1060,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var NavigationEmitter = require('/makeup-navigation-emitter$0.0.3/index'/*'makeup-navigation-emitter'*/);
var Util = require('/makeup-roving-tabindex$0.0.2/util'/*'./util.js'*/);
var Util = require('/makeup-roving-tabindex$0.0.3/util'/*'./util.js'*/);
var defaultOptions = {
autoReset: null,
index: 0

@@ -1091,2 +1092,12 @@ };

function onModelReset(e) {
this._index = e.detail.toIndex;
this._items.forEach(function (el) {
el.setAttribute('tabindex', '-1');
});
this._items[e.detail.toIndex].setAttribute('tabindex', '0');
}
function onModelChange(e) {

@@ -1120,2 +1131,3 @@ var fromItem = this._items[e.detail.fromIndex];

this._onInitListener = onModelInit.bind(this);
this._onResetListener = onModelReset.bind(this);

@@ -1125,2 +1137,3 @@ el.addEventListener('navigationModelMutation', this._onMutationListener);

el.addEventListener('navigationModelInit', this._onInitListener);
el.addEventListener('navigationModelReset', this._onResetListener);
};

@@ -1143,3 +1156,3 @@

autoInit: _this._options.index,
autoReset: null
autoReset: _this._options.autoReset
});

@@ -1176,3 +1189,3 @@ return _this;

});
$_mod.def("/makeup-roving-tabindex$0.0.2/docs/index", function(require, exports, module, __filename, __dirname) { var RovingTabindex = require('/makeup-roving-tabindex$0.0.2/index'/*'../index.js'*/);
$_mod.def("/makeup-roving-tabindex$0.0.3/docs/index", function(require, exports, module, __filename, __dirname) { var RovingTabindex = require('/makeup-roving-tabindex$0.0.3/index'/*'../index.js'*/);

@@ -1211,2 +1224,2 @@ function nodeListToArray(nodeList) {

});
$_mod.run("/makeup-roving-tabindex$0.0.2/docs/index");
$_mod.run("/makeup-roving-tabindex$0.0.3/docs/index");

@@ -17,2 +17,3 @@ 'use strict';

var defaultOptions = {
autoReset: null,
index: 0

@@ -45,2 +46,12 @@ };

function onModelReset(e) {
this._index = e.detail.toIndex;
this._items.forEach(function (el) {
el.setAttribute('tabindex', '-1');
});
this._items[e.detail.toIndex].setAttribute('tabindex', '0');
}
function onModelChange(e) {

@@ -74,2 +85,3 @@ var fromItem = this._items[e.detail.fromIndex];

this._onInitListener = onModelInit.bind(this);
this._onResetListener = onModelReset.bind(this);

@@ -79,2 +91,3 @@ el.addEventListener('navigationModelMutation', this._onMutationListener);

el.addEventListener('navigationModelInit', this._onInitListener);
el.addEventListener('navigationModelReset', this._onResetListener);
};

@@ -97,3 +110,3 @@

autoInit: _this._options.index,
autoReset: null
autoReset: _this._options.autoReset
});

@@ -100,0 +113,0 @@ return _this;

{
"name": "makeup-roving-tabindex",
"description": "Implements a roving tab index on given collection of elements",
"version": "0.0.2",
"version": "0.0.3",
"main": "index.js",

@@ -6,0 +6,0 @@ "repository": "https://github.com/makeup-js/makeup-roving-tabindex.git",

@@ -38,3 +38,3 @@ # makeup-roving-tabindex

// create a roving tabindex instance on the element
const rovingTabindex = RovingTabindex.createLinear(widgetEl, 'li', { index: 0 });
const rovingTabindex = RovingTabindex.createLinear(widgetEl, 'li', { autoReset: null, index: 0 });

@@ -73,2 +73,3 @@ // listen for events (optional)

* `autoReset`: specify an index value that should receive tabindex="0" on navigationModelReset event (default: null)
* `index`: the index position of the active item (default: 0)

@@ -75,0 +76,0 @@

@@ -7,2 +7,3 @@ 'use strict';

const defaultOptions = {
autoReset: null,
index: 0

@@ -35,2 +36,12 @@ };

function onModelReset(e) {
this._index = e.detail.toIndex;
this._items.forEach(function(el) {
el.setAttribute('tabindex', '-1');
});
this._items[e.detail.toIndex].setAttribute('tabindex', '0');
}
function onModelChange(e) {

@@ -63,2 +74,3 @@ const fromItem = this._items[e.detail.fromIndex];

this._onInitListener = onModelInit.bind(this);
this._onResetListener = onModelReset.bind(this);

@@ -68,2 +80,3 @@ el.addEventListener('navigationModelMutation', this._onMutationListener);

el.addEventListener('navigationModelInit', this._onInitListener);
el.addEventListener('navigationModelReset', this._onResetListener);
}

@@ -83,3 +96,3 @@ }

autoInit: this._options.index,
autoReset: null
autoReset: this._options.autoReset
});

@@ -86,0 +99,0 @@ }

@@ -1,2 +0,2 @@

$_mod.installed("makeup-roving-tabindex$0.0.2", "makeup-navigation-emitter", "0.0.3");
$_mod.installed("makeup-roving-tabindex$0.0.3", "makeup-navigation-emitter", "0.0.3");
$_mod.main("/makeup-navigation-emitter$0.0.3", "");

@@ -439,3 +439,3 @@ $_mod.installed("makeup-navigation-emitter$0.0.3", "custom-event-polyfill", "0.3.0");

});
$_mod.def("/makeup-roving-tabindex$0.0.2/util", function(require, exports, module, __filename, __dirname) { "use strict";
$_mod.def("/makeup-roving-tabindex$0.0.3/util", function(require, exports, module, __filename, __dirname) { "use strict";

@@ -451,3 +451,3 @@ function nodeListToArray(nodeList) {

});
$_mod.def("/makeup-roving-tabindex$0.0.2/index", function(require, exports, module, __filename, __dirname) { 'use strict';
$_mod.def("/makeup-roving-tabindex$0.0.3/index", function(require, exports, module, __filename, __dirname) { 'use strict';

@@ -465,5 +465,6 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };

var NavigationEmitter = require('/makeup-navigation-emitter$0.0.3/index'/*'makeup-navigation-emitter'*/);
var Util = require('/makeup-roving-tabindex$0.0.2/util'/*'./util.js'*/);
var Util = require('/makeup-roving-tabindex$0.0.3/util'/*'./util.js'*/);
var defaultOptions = {
autoReset: null,
index: 0

@@ -496,2 +497,12 @@ };

function onModelReset(e) {
this._index = e.detail.toIndex;
this._items.forEach(function (el) {
el.setAttribute('tabindex', '-1');
});
this._items[e.detail.toIndex].setAttribute('tabindex', '0');
}
function onModelChange(e) {

@@ -525,2 +536,3 @@ var fromItem = this._items[e.detail.fromIndex];

this._onInitListener = onModelInit.bind(this);
this._onResetListener = onModelReset.bind(this);

@@ -530,2 +542,3 @@ el.addEventListener('navigationModelMutation', this._onMutationListener);

el.addEventListener('navigationModelInit', this._onInitListener);
el.addEventListener('navigationModelReset', this._onResetListener);
};

@@ -548,3 +561,3 @@

autoInit: _this._options.index,
autoReset: null
autoReset: _this._options.autoReset
});

@@ -551,0 +564,0 @@ return _this;