@transferwise/components 0.0.0-experimental-3b84ee4 → 0.0.0-experimental-8a06fb3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.mjs CHANGED
@@ -2,7 +2,7 @@ import * as React from 'react';
2
2
  import React__default, { forwardRef, useId, cloneElement, useState, Component, Children, createContext, useContext, useRef, useEffect, useCallback, useSyncExternalStore, useImperativeHandle, createElement, useMemo, PureComponent, createRef, isValidElement, Fragment as Fragment$1 } from 'react';
3
3
  import classNames from 'classnames';
4
4
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
5
- import { ChevronUp, NavigateAway, CrossCircleFill, Cross, Plus, Check, Info as Info$1, Alert as Alert$1, ClockBorderless, Briefcase, Person, ArrowRight, Download, ChevronLeft, ChevronRight, AlertCircleFill, ArrowLeft, QuestionMarkCircle, Search, CrossCircle, ChevronDown, CheckCircleFill, ClockFill, Upload as Upload$2, Document, PlusCircle, Bin } from '@transferwise/icons';
5
+ import { ChevronUp, NavigateAway, CrossCircleFill, Cross, Plus, ChevronDown, Check, Info as Info$1, Alert as Alert$1, ClockBorderless, Briefcase, Person, ArrowRight, Download, ChevronLeft, ChevronRight, AlertCircleFill, ArrowLeft, QuestionMarkCircle, Search, CrossCircle, CheckCircleFill, ClockFill, Upload as Upload$2, Document, PlusCircle, Bin } from '@transferwise/icons';
6
6
  import { useTheme, ThemeProvider } from '@wise/components-theming';
7
7
  import { defineMessages, useIntl, injectIntl, IntlProvider } from 'react-intl';
8
8
  import { CSSTransition } from 'react-transition-group';
@@ -1994,9 +1994,6 @@ function SelectOption({
1994
1994
  return /*#__PURE__*/jsxs(Fragment, {
1995
1995
  children: [/*#__PURE__*/jsx(Option$2, {
1996
1996
  ref: rootRef,
1997
- "aria-haspopup": "dialog",
1998
- "aria-expanded": showOptions,
1999
- "aria-labelledby": ariaLabelledBy,
2000
1997
  showMediaAtAllSizes: true,
2001
1998
  disabled: disabled,
2002
1999
  decision: false,
@@ -2007,14 +2004,18 @@ function SelectOption({
2007
2004
  content: (hasSelected ? selected : placeholder).content,
2008
2005
  className: classNames('np-select-option', 'clickable', hasSelected ? 'np-select-option-selected' : 'np-select-option-placeholder', props.className),
2009
2006
  button: /*#__PURE__*/jsx("button", {
2007
+ ...inputAttributes,
2010
2008
  type: "button",
2011
2009
  disabled: disabled,
2012
- className: "btn-unstyled",
2010
+ "aria-labelledby": ariaLabelledBy,
2011
+ "aria-haspopup": "dialog",
2012
+ "aria-expanded": showOptions,
2013
+ className: hasSelected ? 'btn-unstyled' : 'np-action-btn',
2013
2014
  "aria-label": hasSelected ? undefined : props['aria-label'],
2014
2015
  onClick: handleOnClick(true),
2015
- children: hasSelected ? /*#__PURE__*/jsx(Chevron, {}) : /*#__PURE__*/jsx(ActionButton, {
2016
- children: placeholder.actionLabel || intl.formatMessage(messages$c.actionLabel)
2017
- })
2016
+ children: hasSelected ? /*#__PURE__*/jsx(ChevronDown, {
2017
+ title: intl.formatMessage(messages$c.actionLabel)
2018
+ }) : placeholder.actionLabel || intl.formatMessage(messages$c.actionLabel)
2018
2019
  })
2019
2020
  }), /*#__PURE__*/jsx(ResponsivePanel, {
2020
2021
  anchorWidth: true,