Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@instructure/ui-utils

Package Overview
Dependencies
Maintainers
34
Versions
2029
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@instructure/ui-utils - npm Package Compare versions

Comparing version 10.4.1 to 10.4.2-pr-snapshot-1730913754131

11

CHANGELOG.md

@@ -6,2 +6,13 @@ # Change Log

## [10.4.2-pr-snapshot-1730913754131](https://github.com/instructure/instructure-ui/compare/v10.4.1...v10.4.2-pr-snapshot-1730913754131) (2024-11-06)
### Bug Fixes
* **ui-options,ui-utils:** subgroup titles in Options are not announced by TalkBack and iOS VoiceOver ([ebdf8f0](https://github.com/instructure/instructure-ui/commit/ebdf8f047cf8541723d494b16432c8248ef5fe1e))
## [10.4.1](https://github.com/instructure/instructure-ui/compare/v10.4.0...v10.4.1) (2024-10-28)

@@ -8,0 +19,0 @@

8

es/getBrowser.js

@@ -62,2 +62,8 @@ /*

};
export { getBrowser, isSafari, isEdge, isIE, isFirefox, isChromium };
const isAndroidOrIOS = () => {
const parser = new UAParser();
const result = parser.getResult();
const device = parser.getDevice();
return result.os.name === 'Android' || device.model === 'iPhone' || device.model === 'iPad' ? true : false;
};
export { getBrowser, isSafari, isEdge, isIE, isFirefox, isChromium, isAndroidOrIOS };

@@ -26,2 +26,9 @@ /*

const baseThemeProps = ['borders', 'breakpoints', 'colors', 'forms', 'media', 'shadows', 'spacing', 'stacking', 'transitions', 'typography'];
/**
* Checks if the given param is an object with all the keys needed for an
* Instructure theme.
* @param theme Anything. This function will throw an error if it's not a theme
* object.
*/
const isBaseTheme = theme => {

@@ -28,0 +35,0 @@ if (Array.isArray(theme) || typeof theme === 'function') {

@@ -7,3 +7,3 @@ "use strict";

});
exports.isSafari = exports.isIE = exports.isFirefox = exports.isEdge = exports.isChromium = exports.getBrowser = void 0;
exports.isSafari = exports.isIE = exports.isFirefox = exports.isEdge = exports.isChromium = exports.isAndroidOrIOS = exports.getBrowser = void 0;
var _uaParserJs = _interopRequireDefault(require("ua-parser-js"));

@@ -74,2 +74,9 @@ /*

};
exports.isFirefox = isFirefox;
exports.isFirefox = isFirefox;
const isAndroidOrIOS = () => {
const parser = new _uaParserJs.default();
const result = parser.getResult();
const device = parser.getDevice();
return result.os.name === 'Android' || device.model === 'iPhone' || device.model === 'iPad' ? true : false;
};
exports.isAndroidOrIOS = isAndroidOrIOS;

@@ -32,2 +32,9 @@ "use strict";

const baseThemeProps = ['borders', 'breakpoints', 'colors', 'forms', 'media', 'shadows', 'spacing', 'stacking', 'transitions', 'typography'];
/**
* Checks if the given param is an object with all the keys needed for an
* Instructure theme.
* @param theme Anything. This function will throw an error if it's not a theme
* object.
*/
const isBaseTheme = theme => {

@@ -34,0 +41,0 @@ if (Array.isArray(theme) || typeof theme === 'function') {

10

package.json
{
"name": "@instructure/ui-utils",
"version": "10.4.1",
"version": "10.4.2-pr-snapshot-1730913754131",
"description": "A collection of utilities for UI components",

@@ -25,3 +25,3 @@ "author": "Instructure, Inc. Engineering and Product Design",

"devDependencies": {
"@instructure/ui-babel-preset": "10.4.1",
"@instructure/ui-babel-preset": "10.4.2-pr-snapshot-1730913754131",
"@testing-library/jest-dom": "^6.4.6",

@@ -34,5 +34,5 @@ "@testing-library/react": "^16.0.1",

"@babel/runtime": "^7.25.6",
"@instructure/console": "10.4.1",
"@instructure/shared-types": "10.4.1",
"@instructure/ui-dom-utils": "10.4.1",
"@instructure/console": "10.4.2-pr-snapshot-1730913754131",
"@instructure/shared-types": "10.4.2-pr-snapshot-1730913754131",
"@instructure/ui-dom-utils": "10.4.2-pr-snapshot-1730913754131",
"@types/ua-parser-js": "^0.7.39",

@@ -39,0 +39,0 @@ "fast-deep-equal": "^3.1.3",

@@ -66,2 +66,21 @@ /*

export { getBrowser, isSafari, isEdge, isIE, isFirefox, isChromium }
const isAndroidOrIOS = (): boolean => {
const parser = new UAParser()
const result = parser.getResult()
const device = parser.getDevice()
return result.os.name === 'Android' ||
device.model === 'iPhone' ||
device.model === 'iPad'
? true
: false
}
export {
getBrowser,
isSafari,
isEdge,
isIE,
isFirefox,
isChromium,
isAndroidOrIOS
}

@@ -42,2 +42,8 @@ /*

/**
* Checks if the given param is an object with all the keys needed for an
* Instructure theme.
* @param theme Anything. This function will throw an error if it's not a theme
* object.
*/
const isBaseTheme = (theme: any): theme is BaseTheme => {

@@ -44,0 +50,0 @@ if (Array.isArray(theme) || typeof theme === 'function') {

@@ -17,3 +17,4 @@ import UAParser from 'ua-parser-js';

declare const isFirefox: () => boolean;
export { getBrowser, isSafari, isEdge, isIE, isFirefox, isChromium };
declare const isAndroidOrIOS: () => boolean;
export { getBrowser, isSafari, isEdge, isIE, isFirefox, isChromium, isAndroidOrIOS };
//# sourceMappingURL=getBrowser.d.ts.map
import type { BaseTheme } from '@instructure/shared-types';
/**
* Checks if the given param is an object with all the keys needed for an
* Instructure theme.
* @param theme Anything. This function will throw an error if it's not a theme
* object.
*/
declare const isBaseTheme: (theme: any) => theme is BaseTheme;

@@ -3,0 +9,0 @@ export default isBaseTheme;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc