How to use the @commercetools-uikit/utils.filterDataAttributes function in @commercetools-uikit/utils

To help you get started, we’ve selected a few @commercetools-uikit/utils 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 commercetools / ui-kit / src / components / inputs / date-input / date-input.js View on Github external
: intl.formatMessage(messages.placeholder),
                  onMouseEnter: () => {
                    // we remove the highlight so that the user can use the
                    // arrow keys to move the cursor when hovering
                    if (isOpen) setDownshiftHighlightedIndex(null);
                  },
                  onKeyDown: event => {
                    if (event.key === 'Enter' && inputValue.trim() === '') {
                      clearSelection();
                    }
                  },
                  // we only do this for readOnly because the input
                  // doesn't ignore these events, unlike when its disabled
                  onFocus: props.isReadOnly ? undefined : openMenu,
                  onClick: props.isReadOnly ? undefined : openMenu,
                  ...filterDataAttributes(props),
                })}
                hasSelection={Boolean(selectedItem)}
                onClear={clearSelection}
                isOpen={isOpen}
                isDisabled={props.isDisabled}
                isReadOnly={props.isReadOnly}
                toggleButtonProps={getToggleButtonProps()}
                hasError={props.hasError}
                hasWarning={props.hasWarning}
              />
              {isOpen && !props.isDisabled && !props.isReadOnly && (
github commercetools / ui-kit / packages / components / table / src / base-table.js View on Github external
{({ css: makeClassName, cx }) => (
            <div style="{{">
              </div>
github commercetools / ui-kit / src / components / inputs / multiline-text-input / multiline-text-input.js View on Github external
name={props.name}
          autoComplete={props.autoComplete}
          value={props.value}
          onChange={props.onChange}
          onHeightChange={handleHeightChange}
          id={props.id}
          onBlur={props.onBlur}
          onFocus={handleFocus}
          isDisabled={props.isDisabled}
          hasError={props.hasError}
          hasWarning={props.hasWarning}
          placeholder={props.placeholder}
          isReadOnly={props.isReadOnly}
          isAutofocussed={props.isAutofocussed}
          isOpen={isOpen}
          {...filterDataAttributes(props)}
        /&gt;
        {shouldRenderToggleButton &amp;&amp; (
          <div>
            </div>
github commercetools / ui-kit / src / components / inputs / async-creatable-select-input / async-creatable-select-input.js View on Github external
const AsyncCreatableSelectInput = props =&gt; {
  const intl = useIntl();
  const theme = useTheme();

  const placeholder =
    props.placeholder || intl.formatMessage(messages.placeholder);

  return (
    
      <div>
        </div>
github commercetools / ui-kit / src / components / inputs / async-select-input / async-select-input.js View on Github external
const AsyncSelectInput = props =&gt; {
  const theme = useTheme();
  const intl = useIntl();

  const placeholder =
    props.placeholder || intl.formatMessage(messages.placeholder);

  return (
    
      <div>
        </div>
github commercetools / ui-kit / src / components / spacings / inline / inline.js View on Github external
const Inline = props =&gt; (
  <span>
    {props.children}
  </span>
);
github commercetools / ui-kit / src / components / inputs / time-input / time-input.js View on Github external
autoComplete={props.autoComplete}
        value={props.value}
        onChange={props.onChange}
        onFocus={props.onFocus}
        onBlur={handleBlur}
        isAutofocussed={props.isAutofocussed}
        isDisabled={props.isDisabled}
        hasError={props.hasError}
        isReadOnly={props.isReadOnly}
        onClear={onClear}
        placeholder={
          typeof props.placeholder === 'string'
            ? props.placeholder
            : intl.formatMessage(messages.placeholder)
        }
        {...filterDataAttributes(props)}
      /&gt;
    
  );
};