How to use the @instructure/console.warn function in @instructure/console

To help you get started, we’ve selected a few @instructure/console examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github instructure / instructure-ui / packages / ui-a11y / src / findTabbable.js View on Github external
function findTabbable (el, shouldSearchRootNode) {
  warn(false, '[findTabbable] is deprecated. It has been moved from `@instructure/ui-a11y` to `@instructure/ui-dom-utils`')

  return findFocusable(el, (element) => {
    return !isInvalidTabIndex(element.getAttribute('tabindex'))
  }, shouldSearchRootNode)
}
github instructure / instructure-ui / packages / ui-a11y / src / findFocusable.js View on Github external
function findFocusable (el, filter, shouldSearchRootNode) {
  warn(false, '[findFocusable] is deprecated. It has been moved from `@instructure/ui-a11y` to `@instructure/ui-dom-utils`')

  const element = findDOMNode(el)

  if (!element || typeof element.querySelectorAll !== 'function') {
    return []
  }

  const focusableSelector = 'a[href],frame,iframe,object,input:not([type=hidden]),select,textarea,button,*[tabindex]'

  let matches = Array.from(element.querySelectorAll(focusableSelector))

  if (shouldSearchRootNode && elementMatches(element, focusableSelector)) {
    matches = [...matches, element]
  }

  return matches.filter((el) => {
github instructure / instructure-ui / packages / ui-a11y / src / hasVisibleChildren.js View on Github external
function hasVisibleChildren (children) {
  warn(false, '[hasVisibleChildren] is deprecated. It has been moved from `@instructure/ui-a11y` to `@instructure/ui-a11y-utils`')

  let visible = false

  React.Children.forEach(children, (child) => {
    if (child && !matchComponentTypes(child, [ScreenReaderContent])) {
      visible = true
    }
  })

  return visible
}

@instructure/console

A babel macro made by Instructure Inc.

MIT
Latest version published 5 days ago

Package Health Score

87 / 100
Full package analysis

Similar packages