@nulogy/components 8.13.0 → 8.14.0

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.
Files changed (54) hide show
  1. package/dist/main.js +917 -593
  2. package/dist/main.module.js +917 -593
  3. package/dist/src/Breadcrumbs/Breadcrumbs.d.ts +5 -1
  4. package/dist/src/Breadcrumbs/Breadcrumbs.story.d.ts +1 -0
  5. package/dist/src/Breadcrumbs/BreadcrumbsListItem.d.ts +5 -3
  6. package/dist/src/Button/Button.d.ts +2 -2
  7. package/dist/src/Button/Button.story.d.ts +1 -6
  8. package/dist/src/Button/IconicButton.d.ts +2 -0
  9. package/dist/src/Button/IconicButton.story.d.ts +1 -0
  10. package/dist/src/Checkbox/Checkbox.d.ts +15 -1
  11. package/dist/src/Checkbox/Checkbox.story.d.ts +1 -0
  12. package/dist/src/DatePicker/DatePicker.d.ts +3 -1
  13. package/dist/src/DatePicker/DatePicker.story.d.ts +1 -0
  14. package/dist/src/DatePicker/DatePickerInput.d.ts +2 -0
  15. package/dist/src/DateRange/DateRange.d.ts +2 -0
  16. package/dist/src/DateRange/DateRange.story.d.ts +13 -72
  17. package/dist/src/DateRange/EndTime.d.ts +1 -0
  18. package/dist/src/DateRange/StartTime.d.ts +1 -0
  19. package/dist/src/DropdownMenu/DropdownButton.d.ts +7 -6
  20. package/dist/src/DropdownMenu/DropdownLink.d.ts +13 -2
  21. package/dist/src/DropdownMenu/DropdownMenu.d.ts +2 -0
  22. package/dist/src/DropdownMenu/DropdownMenu.story.d.ts +1 -0
  23. package/dist/src/Input/Input.story.d.ts +1 -0
  24. package/dist/src/Input/InputField.d.ts +6 -3
  25. package/dist/src/Link/Link.d.ts +7 -4
  26. package/dist/src/Link/Link.story.d.ts +2 -6
  27. package/dist/src/NDSProvider/ComponentSizeContext.d.ts +9 -0
  28. package/dist/src/NDSProvider/NDSProvider.d.ts +13 -2
  29. package/dist/src/Radio/Radio.d.ts +5 -11
  30. package/dist/src/Radio/Radio.story.d.ts +1 -0
  31. package/dist/src/RangeContainer/RangeContainer.d.ts +2 -0
  32. package/dist/src/Select/Select.d.ts +2 -0
  33. package/dist/src/Select/Select.story.d.ts +1 -0
  34. package/dist/src/Select/customReactSelectStyles.d.ts +924 -19
  35. package/dist/src/Switcher/Switch.d.ts +6 -3
  36. package/dist/src/Switcher/Switcher.d.ts +7 -5
  37. package/dist/src/Switcher/Switcher.story.d.ts +1 -0
  38. package/dist/src/Tabs/Tab.d.ts +2 -3
  39. package/dist/src/Tabs/Tabs.d.ts +5 -0
  40. package/dist/src/Tabs/Tabs.story.d.ts +2 -6
  41. package/dist/src/Textarea/StyledTextarea.d.ts +13 -1
  42. package/dist/src/Textarea/Textarea.story.d.ts +9 -48
  43. package/dist/src/TimePicker/TimePicker.d.ts +2 -0
  44. package/dist/src/TimePicker/TimePicker.story.d.ts +1 -0
  45. package/dist/src/TimePicker/TimePickerInput.d.ts +310 -1
  46. package/dist/src/TimePicker/TimePickerOption.d.ts +8 -1
  47. package/dist/src/TimeRange/TimeRange.d.ts +8 -7
  48. package/dist/src/Toggle/Toggle.d.ts +2 -0
  49. package/dist/src/Toggle/Toggle.story.d.ts +1 -0
  50. package/dist/src/theme.type.d.ts +1 -1
  51. package/dist/src/utils/ClickInputLabel.d.ts +5 -2
  52. package/dist/src/utils/dashed.d.ts +6 -0
  53. package/package.json +2 -2
  54. package/dist/src/Switcher/Switch.story.d.ts +0 -22
@@ -8685,6 +8685,317 @@ var InlineIcon = function InlineIcon(props) {
8685
8685
  }, props)));
8686
8686
  };
8687
8687
 
8688
+ var Flex = styled(Box).withConfig({
8689
+ displayName: "Flex",
8690
+ componentId: "sc-1whlq91-0"
8691
+ })({
8692
+ display: "flex"
8693
+ }, system({
8694
+ gap: {
8695
+ property: "gap",
8696
+ scale: "space"
8697
+ },
8698
+ rowGap: {
8699
+ property: "rowGap",
8700
+ scale: "space"
8701
+ },
8702
+ columnGap: {
8703
+ property: "columnGap",
8704
+ scale: "space"
8705
+ }
8706
+ }), flexbox);
8707
+
8708
+ var textOverflow = system({
8709
+ whiteSpace: true,
8710
+ textOverflow: true
8711
+ });
8712
+
8713
+ var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility, flexbox);
8714
+
8715
+ var getAttrs = function getAttrs(inline) {
8716
+ return inline ? {
8717
+ as: "span"
8718
+ } : null;
8719
+ };
8720
+
8721
+ var Text = styled.p.attrs(function (props) {
8722
+ return getAttrs(props.inline);
8723
+ }).withConfig({
8724
+ displayName: "Text",
8725
+ componentId: "sc-15glbbx-0"
8726
+ })(function (_ref) {
8727
+ var disabled = _ref.disabled,
8728
+ textTransform = _ref.textTransform,
8729
+ theme = _ref.theme;
8730
+ return {
8731
+ textTransform: textTransform,
8732
+ color: "currentColor",
8733
+ marginTop: 0,
8734
+ marginBottom: 0,
8735
+ fontSize: theme.fontSizes.medium,
8736
+ lineHeight: theme.lineHeights.base,
8737
+ opacity: disabled ? "0.7" : undefined
8738
+ };
8739
+ }, addStyledProps);
8740
+ Text.defaultProps = {
8741
+ inline: false,
8742
+ disabled: false
8743
+ };
8744
+
8745
+ var Heading1 = Text.withComponent("h1");
8746
+ Heading1.defaultProps = {
8747
+ fontSize: "heading1",
8748
+ lineHeight: "heading1",
8749
+ fontWeight: "light",
8750
+ mt: 0,
8751
+ mb: "x6"
8752
+ };
8753
+ var Heading2 = Text.withComponent("h2");
8754
+ Heading2.defaultProps = {
8755
+ fontSize: "heading2",
8756
+ lineHeight: "heading2",
8757
+ fontWeight: "normal",
8758
+ mt: 0,
8759
+ mb: "x2"
8760
+ };
8761
+ var Heading3 = Text.withComponent("h3");
8762
+ Heading3.defaultProps = {
8763
+ fontSize: "heading3",
8764
+ lineHeight: "heading3",
8765
+ fontWeight: "medium",
8766
+ mt: 0,
8767
+ mb: "x1"
8768
+ };
8769
+ var Heading4 = Text.withComponent("h4");
8770
+ Heading4.defaultProps = {
8771
+ fontSize: "heading4",
8772
+ lineHeight: "heading4",
8773
+ fontWeight: "bold",
8774
+ mt: 0,
8775
+ mb: "x1"
8776
+ };
8777
+
8778
+ var defaultOptions = {
8779
+ bindI18n: 'languageChanged',
8780
+ bindI18nStore: '',
8781
+ transEmptyNodeValue: '',
8782
+ transSupportBasicHtmlNodes: true,
8783
+ transWrapTextNodes: '',
8784
+ transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
8785
+ useSuspense: true
8786
+ };
8787
+ var i18nInstance;
8788
+ var I18nContext = React__default.createContext();
8789
+ function getDefaults() {
8790
+ return defaultOptions;
8791
+ }
8792
+ var ReportNamespaces = function () {
8793
+ function ReportNamespaces() {
8794
+ _classCallCheck$1(this, ReportNamespaces);
8795
+
8796
+ this.usedNamespaces = {};
8797
+ }
8798
+
8799
+ _createClass$1(ReportNamespaces, [{
8800
+ key: "addUsedNamespaces",
8801
+ value: function addUsedNamespaces(namespaces) {
8802
+ var _this = this;
8803
+
8804
+ namespaces.forEach(function (ns) {
8805
+ if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
8806
+ });
8807
+ }
8808
+ }, {
8809
+ key: "getUsedNamespaces",
8810
+ value: function getUsedNamespaces() {
8811
+ return Object.keys(this.usedNamespaces);
8812
+ }
8813
+ }]);
8814
+
8815
+ return ReportNamespaces;
8816
+ }();
8817
+ function getI18n() {
8818
+ return i18nInstance;
8819
+ }
8820
+
8821
+ function warn() {
8822
+ if (console && console.warn) {
8823
+ var _console;
8824
+
8825
+ for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
8826
+ args[_key] = arguments[_key];
8827
+ }
8828
+
8829
+ if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]);
8830
+
8831
+ (_console = console).warn.apply(_console, args);
8832
+ }
8833
+ }
8834
+ var alreadyWarned = {};
8835
+ function warnOnce() {
8836
+ for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
8837
+ args[_key2] = arguments[_key2];
8838
+ }
8839
+
8840
+ if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
8841
+ if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
8842
+ warn.apply(void 0, args);
8843
+ }
8844
+ function loadNamespaces(i18n, ns, cb) {
8845
+ i18n.loadNamespaces(ns, function () {
8846
+ if (i18n.isInitialized) {
8847
+ cb();
8848
+ } else {
8849
+ var initialized = function initialized() {
8850
+ setTimeout(function () {
8851
+ i18n.off('initialized', initialized);
8852
+ }, 0);
8853
+ cb();
8854
+ };
8855
+
8856
+ i18n.on('initialized', initialized);
8857
+ }
8858
+ });
8859
+ }
8860
+ function hasLoadedNamespace(ns, i18n) {
8861
+ var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8862
+
8863
+ if (!i18n.languages || !i18n.languages.length) {
8864
+ warnOnce('i18n.languages were undefined or empty', i18n.languages);
8865
+ return true;
8866
+ }
8867
+
8868
+ var lng = i18n.languages[0];
8869
+ var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
8870
+ var lastLng = i18n.languages[i18n.languages.length - 1];
8871
+ if (lng.toLowerCase() === 'cimode') return true;
8872
+
8873
+ var loadNotPending = function loadNotPending(l, n) {
8874
+ var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
8875
+ return loadState === -1 || loadState === 2;
8876
+ };
8877
+
8878
+ if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
8879
+ if (i18n.hasResourceBundle(lng, ns)) return true;
8880
+ if (!i18n.services.backendConnector.backend) return true;
8881
+ if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
8882
+ return false;
8883
+ }
8884
+
8885
+ function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
8886
+
8887
+ function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
8888
+ function useTranslation(ns) {
8889
+ var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
8890
+ var i18nFromProps = props.i18n;
8891
+
8892
+ var _ref = useContext(I18nContext) || {},
8893
+ i18nFromContext = _ref.i18n,
8894
+ defaultNSFromContext = _ref.defaultNS;
8895
+
8896
+ var i18n = i18nFromProps || i18nFromContext || getI18n();
8897
+ if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
8898
+
8899
+ if (!i18n) {
8900
+ warnOnce('You will need to pass in an i18next instance by using initReactI18next');
8901
+
8902
+ var notReadyT = function notReadyT(k) {
8903
+ return Array.isArray(k) ? k[k.length - 1] : k;
8904
+ };
8905
+
8906
+ var retNotReady = [notReadyT, {}, false];
8907
+ retNotReady.t = notReadyT;
8908
+ retNotReady.i18n = {};
8909
+ retNotReady.ready = false;
8910
+ return retNotReady;
8911
+ }
8912
+
8913
+ if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
8914
+
8915
+ var i18nOptions = _objectSpread$5(_objectSpread$5(_objectSpread$5({}, getDefaults()), i18n.options.react), props);
8916
+
8917
+ var useSuspense = i18nOptions.useSuspense,
8918
+ keyPrefix = i18nOptions.keyPrefix;
8919
+ var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
8920
+ namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
8921
+ if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
8922
+ var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
8923
+ return hasLoadedNamespace(n, i18n, i18nOptions);
8924
+ });
8925
+
8926
+ function getT() {
8927
+ return i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
8928
+ }
8929
+
8930
+ var _useState = useState(getT),
8931
+ _useState2 = _slicedToArray$1(_useState, 2),
8932
+ t = _useState2[0],
8933
+ setT = _useState2[1];
8934
+
8935
+ var isMounted = useRef(true);
8936
+ useEffect(function () {
8937
+ var bindI18n = i18nOptions.bindI18n,
8938
+ bindI18nStore = i18nOptions.bindI18nStore;
8939
+ isMounted.current = true;
8940
+
8941
+ if (!ready && !useSuspense) {
8942
+ loadNamespaces(i18n, namespaces, function () {
8943
+ if (isMounted.current) setT(getT);
8944
+ });
8945
+ }
8946
+
8947
+ function boundReset() {
8948
+ if (isMounted.current) setT(getT);
8949
+ }
8950
+
8951
+ if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
8952
+ if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
8953
+ return function () {
8954
+ isMounted.current = false;
8955
+ if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
8956
+ return i18n.off(e, boundReset);
8957
+ });
8958
+ if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
8959
+ return i18n.store.off(e, boundReset);
8960
+ });
8961
+ };
8962
+ }, [i18n, namespaces.join()]);
8963
+ var isInitial = useRef(true);
8964
+ useEffect(function () {
8965
+ if (isMounted.current && !isInitial.current) {
8966
+ setT(getT);
8967
+ }
8968
+
8969
+ isInitial.current = false;
8970
+ }, [i18n]);
8971
+ var ret = [t, i18n, ready];
8972
+ ret.t = t;
8973
+ ret.i18n = i18n;
8974
+ ret.ready = ready;
8975
+ if (ready) return ret;
8976
+ if (!ready && !useSuspense) return ret;
8977
+ throw new Promise(function (resolve) {
8978
+ loadNamespaces(i18n, namespaces, function () {
8979
+ resolve();
8980
+ });
8981
+ });
8982
+ }
8983
+
8984
+ function I18nextProvider(_ref) {
8985
+ var i18n = _ref.i18n,
8986
+ defaultNS = _ref.defaultNS,
8987
+ children = _ref.children;
8988
+ var value = useMemo(function () {
8989
+ return {
8990
+ i18n: i18n,
8991
+ defaultNS: defaultNS
8992
+ };
8993
+ }, [i18n, defaultNS]);
8994
+ return createElement(I18nContext.Provider, {
8995
+ value: value
8996
+ }, children);
8997
+ }
8998
+
8688
8999
  function _extends$2() {
8689
9000
  _extends$2 = Object.assign || function (target) {
8690
9001
  for (var i = 1; i < arguments.length; i++) {
@@ -9717,12 +10028,26 @@ var themeGet = function themeGet(path, fallback) {
9717
10028
  };
9718
10029
  };
9719
10030
 
9720
- var textOverflow = system({
9721
- whiteSpace: true,
9722
- textOverflow: true
9723
- });
10031
+ var ComponentSizeContext = /*#__PURE__*/createContext(undefined);
10032
+ function useComponentSize(selectedSize) {
10033
+ var context = useContext(ComponentSizeContext);
9724
10034
 
9725
- var addStyledProps = compose(border, shadow, color, cursor$1, layout, overflow, space, textOverflow, transform, transition, typography, visibility, flexbox);
10035
+ if (!context) {
10036
+ throw new Error("useComponentSize must be used within the NDSProvider");
10037
+ }
10038
+
10039
+ return selectedSize !== null && selectedSize !== void 0 ? selectedSize : context.size;
10040
+ }
10041
+
10042
+ var ComponentSizeContextProvider = function ComponentSizeContextProvider(_ref) {
10043
+ var size = _ref.size,
10044
+ children = _ref.children;
10045
+ return /*#__PURE__*/React__default.createElement(ComponentSizeContext.Provider, {
10046
+ value: {
10047
+ size: size
10048
+ }
10049
+ }, children);
10050
+ };
9726
10051
 
9727
10052
  var resetButtonStyles = {
9728
10053
  background: "none",
@@ -9741,11 +10066,11 @@ var getHoverColor = function getHoverColor(props) {
9741
10066
  return props.hover ? getColor(props) : curriedDarken("0.1", getColor(props));
9742
10067
  };
9743
10068
 
9744
- var Link = styled.a.withConfig({
10069
+ var StyledLink = styled.a.withConfig({
9745
10070
  shouldForwardProp: function shouldForwardProp(prop, defaultValidatorFn) {
9746
10071
  return !["underline", "hover"].includes(prop) && defaultValidatorFn(prop);
9747
10072
  },
9748
- displayName: "Link",
10073
+ displayName: "Link__StyledLink",
9749
10074
  componentId: "sc-1fcpbo4-0"
9750
10075
  })(function (_a) {
9751
10076
  var underline = _a.underline,
@@ -9762,314 +10087,29 @@ var Link = styled.a.withConfig({
9762
10087
  color: getHoverColor(props)
9763
10088
  }
9764
10089
  });
9765
- }, addStyledProps);
9766
- Link.defaultProps = {
9767
- underline: true
9768
- };
9769
-
9770
- var Flex = styled(Box).withConfig({
9771
- displayName: "Flex",
9772
- componentId: "sc-1whlq91-0"
9773
- })({
9774
- display: "flex"
9775
- }, system({
9776
- gap: {
9777
- property: "gap",
9778
- scale: "space"
9779
- },
9780
- rowGap: {
9781
- property: "rowGap",
9782
- scale: "space"
9783
- },
9784
- columnGap: {
9785
- property: "columnGap",
9786
- scale: "space"
10090
+ }, variant({
10091
+ prop: "size",
10092
+ variants: {
10093
+ large: {
10094
+ py: "x2",
10095
+ px: "0"
10096
+ },
10097
+ medium: {}
9787
10098
  }
9788
- }), flexbox);
9789
-
9790
- var getAttrs = function getAttrs(inline) {
9791
- return inline ? {
9792
- as: "span"
9793
- } : null;
9794
- };
9795
-
9796
- var Text = styled.p.attrs(function (props) {
9797
- return getAttrs(props.inline);
9798
- }).withConfig({
9799
- displayName: "Text",
9800
- componentId: "sc-15glbbx-0"
9801
- })(function (_ref) {
9802
- var disabled = _ref.disabled,
9803
- textTransform = _ref.textTransform,
9804
- theme = _ref.theme;
9805
- return {
9806
- textTransform: textTransform,
9807
- color: "currentColor",
9808
- marginTop: 0,
9809
- marginBottom: 0,
9810
- fontSize: theme.fontSizes.medium,
9811
- lineHeight: theme.lineHeights.base,
9812
- opacity: disabled ? "0.7" : undefined
9813
- };
9814
- }, addStyledProps);
9815
- Text.defaultProps = {
9816
- inline: false,
9817
- disabled: false
9818
- };
9819
-
9820
- var Heading1 = Text.withComponent("h1");
9821
- Heading1.defaultProps = {
9822
- fontSize: "heading1",
9823
- lineHeight: "heading1",
9824
- fontWeight: "light",
9825
- mt: 0,
9826
- mb: "x6"
9827
- };
9828
- var Heading2 = Text.withComponent("h2");
9829
- Heading2.defaultProps = {
9830
- fontSize: "heading2",
9831
- lineHeight: "heading2",
9832
- fontWeight: "normal",
9833
- mt: 0,
9834
- mb: "x2"
9835
- };
9836
- var Heading3 = Text.withComponent("h3");
9837
- Heading3.defaultProps = {
9838
- fontSize: "heading3",
9839
- lineHeight: "heading3",
9840
- fontWeight: "medium",
9841
- mt: 0,
9842
- mb: "x1"
9843
- };
9844
- var Heading4 = Text.withComponent("h4");
9845
- Heading4.defaultProps = {
9846
- fontSize: "heading4",
9847
- lineHeight: "heading4",
9848
- fontWeight: "bold",
9849
- mt: 0,
9850
- mb: "x1"
9851
- };
10099
+ }), addStyledProps);
10100
+ var Link = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
10101
+ var size = _a.size,
10102
+ props = __rest(_a, ["size"]);
9852
10103
 
9853
- var defaultOptions = {
9854
- bindI18n: 'languageChanged',
9855
- bindI18nStore: '',
9856
- transEmptyNodeValue: '',
9857
- transSupportBasicHtmlNodes: true,
9858
- transWrapTextNodes: '',
9859
- transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
9860
- useSuspense: true
10104
+ var componentSize = useComponentSize(size);
10105
+ return /*#__PURE__*/React__default.createElement(StyledLink, Object.assign({
10106
+ size: componentSize,
10107
+ ref: ref
10108
+ }, props));
10109
+ });
10110
+ Link.defaultProps = {
10111
+ underline: true
9861
10112
  };
9862
- var i18nInstance;
9863
- var I18nContext = React__default.createContext();
9864
- function getDefaults() {
9865
- return defaultOptions;
9866
- }
9867
- var ReportNamespaces = function () {
9868
- function ReportNamespaces() {
9869
- _classCallCheck$1(this, ReportNamespaces);
9870
-
9871
- this.usedNamespaces = {};
9872
- }
9873
-
9874
- _createClass$1(ReportNamespaces, [{
9875
- key: "addUsedNamespaces",
9876
- value: function addUsedNamespaces(namespaces) {
9877
- var _this = this;
9878
-
9879
- namespaces.forEach(function (ns) {
9880
- if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
9881
- });
9882
- }
9883
- }, {
9884
- key: "getUsedNamespaces",
9885
- value: function getUsedNamespaces() {
9886
- return Object.keys(this.usedNamespaces);
9887
- }
9888
- }]);
9889
-
9890
- return ReportNamespaces;
9891
- }();
9892
- function getI18n() {
9893
- return i18nInstance;
9894
- }
9895
-
9896
- function warn() {
9897
- if (console && console.warn) {
9898
- var _console;
9899
-
9900
- for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
9901
- args[_key] = arguments[_key];
9902
- }
9903
-
9904
- if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]);
9905
-
9906
- (_console = console).warn.apply(_console, args);
9907
- }
9908
- }
9909
- var alreadyWarned = {};
9910
- function warnOnce() {
9911
- for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
9912
- args[_key2] = arguments[_key2];
9913
- }
9914
-
9915
- if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
9916
- if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
9917
- warn.apply(void 0, args);
9918
- }
9919
- function loadNamespaces(i18n, ns, cb) {
9920
- i18n.loadNamespaces(ns, function () {
9921
- if (i18n.isInitialized) {
9922
- cb();
9923
- } else {
9924
- var initialized = function initialized() {
9925
- setTimeout(function () {
9926
- i18n.off('initialized', initialized);
9927
- }, 0);
9928
- cb();
9929
- };
9930
-
9931
- i18n.on('initialized', initialized);
9932
- }
9933
- });
9934
- }
9935
- function hasLoadedNamespace(ns, i18n) {
9936
- var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
9937
-
9938
- if (!i18n.languages || !i18n.languages.length) {
9939
- warnOnce('i18n.languages were undefined or empty', i18n.languages);
9940
- return true;
9941
- }
9942
-
9943
- var lng = i18n.languages[0];
9944
- var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
9945
- var lastLng = i18n.languages[i18n.languages.length - 1];
9946
- if (lng.toLowerCase() === 'cimode') return true;
9947
-
9948
- var loadNotPending = function loadNotPending(l, n) {
9949
- var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
9950
- return loadState === -1 || loadState === 2;
9951
- };
9952
-
9953
- if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
9954
- if (i18n.hasResourceBundle(lng, ns)) return true;
9955
- if (!i18n.services.backendConnector.backend) return true;
9956
- if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
9957
- return false;
9958
- }
9959
-
9960
- function ownKeys$5(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
9961
-
9962
- function _objectSpread$5(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$5(Object(source), true).forEach(function (key) { _defineProperty$1(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$5(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9963
- function useTranslation(ns) {
9964
- var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
9965
- var i18nFromProps = props.i18n;
9966
-
9967
- var _ref = useContext(I18nContext) || {},
9968
- i18nFromContext = _ref.i18n,
9969
- defaultNSFromContext = _ref.defaultNS;
9970
-
9971
- var i18n = i18nFromProps || i18nFromContext || getI18n();
9972
- if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
9973
-
9974
- if (!i18n) {
9975
- warnOnce('You will need to pass in an i18next instance by using initReactI18next');
9976
-
9977
- var notReadyT = function notReadyT(k) {
9978
- return Array.isArray(k) ? k[k.length - 1] : k;
9979
- };
9980
-
9981
- var retNotReady = [notReadyT, {}, false];
9982
- retNotReady.t = notReadyT;
9983
- retNotReady.i18n = {};
9984
- retNotReady.ready = false;
9985
- return retNotReady;
9986
- }
9987
-
9988
- if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
9989
-
9990
- var i18nOptions = _objectSpread$5(_objectSpread$5(_objectSpread$5({}, getDefaults()), i18n.options.react), props);
9991
-
9992
- var useSuspense = i18nOptions.useSuspense,
9993
- keyPrefix = i18nOptions.keyPrefix;
9994
- var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
9995
- namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
9996
- if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
9997
- var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
9998
- return hasLoadedNamespace(n, i18n, i18nOptions);
9999
- });
10000
-
10001
- function getT() {
10002
- return i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
10003
- }
10004
-
10005
- var _useState = useState(getT),
10006
- _useState2 = _slicedToArray$1(_useState, 2),
10007
- t = _useState2[0],
10008
- setT = _useState2[1];
10009
-
10010
- var isMounted = useRef(true);
10011
- useEffect(function () {
10012
- var bindI18n = i18nOptions.bindI18n,
10013
- bindI18nStore = i18nOptions.bindI18nStore;
10014
- isMounted.current = true;
10015
-
10016
- if (!ready && !useSuspense) {
10017
- loadNamespaces(i18n, namespaces, function () {
10018
- if (isMounted.current) setT(getT);
10019
- });
10020
- }
10021
-
10022
- function boundReset() {
10023
- if (isMounted.current) setT(getT);
10024
- }
10025
-
10026
- if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
10027
- if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
10028
- return function () {
10029
- isMounted.current = false;
10030
- if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
10031
- return i18n.off(e, boundReset);
10032
- });
10033
- if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
10034
- return i18n.store.off(e, boundReset);
10035
- });
10036
- };
10037
- }, [i18n, namespaces.join()]);
10038
- var isInitial = useRef(true);
10039
- useEffect(function () {
10040
- if (isMounted.current && !isInitial.current) {
10041
- setT(getT);
10042
- }
10043
-
10044
- isInitial.current = false;
10045
- }, [i18n]);
10046
- var ret = [t, i18n, ready];
10047
- ret.t = t;
10048
- ret.i18n = i18n;
10049
- ret.ready = ready;
10050
- if (ready) return ret;
10051
- if (!ready && !useSuspense) return ret;
10052
- throw new Promise(function (resolve) {
10053
- loadNamespaces(i18n, namespaces, function () {
10054
- resolve();
10055
- });
10056
- });
10057
- }
10058
-
10059
- function I18nextProvider(_ref) {
10060
- var i18n = _ref.i18n,
10061
- defaultNS = _ref.defaultNS,
10062
- children = _ref.children;
10063
- var value = useMemo(function () {
10064
- return {
10065
- i18n: i18n,
10066
- defaultNS: defaultNS
10067
- };
10068
- }, [i18n, defaultNS]);
10069
- return createElement(I18nContext.Provider, {
10070
- value: value
10071
- }, children);
10072
- }
10073
10113
 
10074
10114
  var CloseButton$1 = function CloseButton(_ref) {
10075
10115
  var onClick = _ref.onClick,
@@ -10096,12 +10136,12 @@ var CloseButton$1 = function CloseButton(_ref) {
10096
10136
  };
10097
10137
 
10098
10138
  var styles = function styles(_ref) {
10099
- var _ref2;
10100
-
10101
10139
  var theme = _ref.theme;
10102
- return _ref2 = {}, _ref2["" + Link] = {
10103
- color: theme.colors.black
10104
- }, _ref2;
10140
+ return {
10141
+ a: {
10142
+ color: theme.colors.black
10143
+ }
10144
+ };
10105
10145
  };
10106
10146
 
10107
10147
  var alertColours = {
@@ -17272,6 +17312,9 @@ function getMenuBorderRadius(_ref4) {
17272
17312
  style: "none"
17273
17313
  };
17274
17314
  }
17315
+ function stylesForSize(config, size) {
17316
+ return config[size];
17317
+ }
17275
17318
  var showIndicatorSeparator = function showIndicatorSeparator(_ref5) {
17276
17319
  var isMulti = _ref5.isMulti,
17277
17320
  hasValue = _ref5.hasValue,
@@ -17284,6 +17327,7 @@ var customStyles = function customStyles(_ref6) {
17284
17327
  error = _ref6.error,
17285
17328
  maxHeight = _ref6.maxHeight,
17286
17329
  windowed = _ref6.windowed,
17330
+ size = _ref6.size,
17287
17331
  _ref6$hasDefaultOptio = _ref6.hasDefaultOptions,
17288
17332
  hasDefaultOptions = _ref6$hasDefaultOptio === void 0 ? true : _ref6$hasDefaultOptio;
17289
17333
  return {
@@ -17372,16 +17416,23 @@ var customStyles = function customStyles(_ref6) {
17372
17416
  input: function input() {
17373
17417
  return {};
17374
17418
  },
17375
- valueContainer: function valueContainer(provided) {
17376
- return Object.assign(Object.assign({}, provided), {
17419
+ valueContainer: function valueContainer(provided, state) {
17420
+ return Object.assign(Object.assign(Object.assign({}, provided), {
17377
17421
  padding: 0,
17378
17422
  overflow: "auto",
17379
17423
  maxHeight: "150px",
17380
- rowGap: theme.space.half,
17381
- columnGap: theme.space.half,
17382
- paddingTop: theme.space.half,
17383
- paddingBottom: theme.space.half
17384
- });
17424
+ gap: theme.space.half
17425
+ }), stylesForSize({
17426
+ large: {
17427
+ paddingTop: state.isMulti && state.hasValue ? theme.space.x1 : theme.space.x2,
17428
+ paddingBottom: state.isMulti && state.hasValue ? theme.space.x1 : theme.space.x2,
17429
+ gap: theme.space.x1
17430
+ },
17431
+ medium: {
17432
+ paddingTop: theme.space.half,
17433
+ paddingBottom: theme.space.half
17434
+ }
17435
+ }, size));
17385
17436
  },
17386
17437
  menu: function menu(provided, state) {
17387
17438
  return Object.assign(Object.assign({}, provided), {
@@ -17457,21 +17508,32 @@ var customStyles = function customStyles(_ref6) {
17457
17508
  });
17458
17509
  },
17459
17510
  multiValueLabel: function multiValueLabel() {
17460
- return {
17511
+ return Object.assign({
17461
17512
  textOverflow: "ellipsis",
17462
17513
  whiteSpace: "nowrap",
17463
17514
  overflow: "hidden",
17464
17515
  color: theme.colors.black,
17465
17516
  borderRadius: theme.radii.small,
17466
- fontSize: theme.fontSizes.small,
17467
- padding: theme.space.half,
17468
- paddingLeft: theme.space.x1
17469
- };
17517
+ fontSize: theme.fontSizes.small
17518
+ }, stylesForSize({
17519
+ large: {
17520
+ fontSize: theme.fontSizes.medium,
17521
+ lineHeight: theme.lineHeights.base,
17522
+ padding: theme.space.x1,
17523
+ paddingRight: theme.space.half
17524
+ },
17525
+ medium: {
17526
+ padding: theme.space.half,
17527
+ paddingLeft: theme.space.x1
17528
+ }
17529
+ }, size));
17470
17530
  },
17471
17531
  multiValueRemove: function multiValueRemove(provided) {
17472
- return Object.assign(Object.assign({}, provided), {
17532
+ return Object.assign(Object.assign(Object.assign({}, provided), {
17473
17533
  svg: {
17474
- fill: theme.colors.black
17534
+ fill: theme.colors.black,
17535
+ height: theme.sizes.x2,
17536
+ width: theme.sizes.x2
17475
17537
  },
17476
17538
  borderBottomLeftRadius: 0,
17477
17539
  borderTopLeftRadius: 0,
@@ -17482,7 +17544,13 @@ var customStyles = function customStyles(_ref6) {
17482
17544
  fill: theme.colors.white
17483
17545
  }
17484
17546
  }
17485
- });
17547
+ }), stylesForSize({
17548
+ large: {
17549
+ padding: theme.space.x1
17550
+ },
17551
+ medium: {// Nothing
17552
+ }
17553
+ }, size));
17486
17554
  },
17487
17555
  noOptionsMessage: function noOptionsMessage(provided) {
17488
17556
  return Object.assign(Object.assign({}, provided), {
@@ -17521,9 +17589,24 @@ var ClickInputLabel = styled.label.withConfig({
17521
17589
  verticalAlign: "top",
17522
17590
  alignItems: "flex-start",
17523
17591
  userSelect: "none",
17524
- padding: Theme.space.half + " 0"
17525
- };
17526
- });
17592
+ paddingTop: Theme.space.x1,
17593
+ paddingBottom: Theme.space.x1,
17594
+ paddingLeft: 0,
17595
+ paddingRight: 0
17596
+ };
17597
+ }, variant({
17598
+ prop: "size",
17599
+ variants: {
17600
+ large: {
17601
+ py: "x2",
17602
+ px: "0"
17603
+ },
17604
+ medium: {
17605
+ py: "x1",
17606
+ px: "0"
17607
+ }
17608
+ }
17609
+ }));
17527
17610
 
17528
17611
  var subPx = function subPx(val1, val2) {
17529
17612
  var val2Str = !val2 ? "1px" : "" + val2;
@@ -18360,6 +18443,7 @@ var StyledOption = styled.div.withConfig({
18360
18443
  borderBottomRightRadius: theme.radii.medium
18361
18444
  },
18362
18445
  div: {
18446
+ height: "auto",
18363
18447
  padding: subPx(theme.space.x1),
18364
18448
  fontWeight: isSelected ? theme.fontWeights.medium : theme.fontWeights.normal,
18365
18449
  background: isFocused ? theme.colors.lightBlue : null,
@@ -18372,6 +18456,21 @@ var StyledOption = styled.div.withConfig({
18372
18456
  }
18373
18457
  }
18374
18458
  };
18459
+ }, function (_ref2) {
18460
+ var theme = _ref2.theme,
18461
+ selectProps = _ref2.selectProps;
18462
+ return stylesForSize({
18463
+ large: {
18464
+ div: {
18465
+ padding: subPx(theme.space.x2)
18466
+ }
18467
+ },
18468
+ medium: {
18469
+ div: {
18470
+ padding: subPx(theme.space.x1)
18471
+ }
18472
+ }
18473
+ }, selectProps.size);
18375
18474
  });
18376
18475
  var SelectOption = function SelectOption(props) {
18377
18476
  return /*#__PURE__*/React__default.createElement(StyledOption, Object.assign({}, props, {
@@ -18480,7 +18579,8 @@ var SelectDefaultProps = {
18480
18579
  closeMenuOnSelect: true
18481
18580
  };
18482
18581
  var ReactSelect = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
18483
- var autocomplete = _a.autocomplete,
18582
+ var size = _a.size,
18583
+ autocomplete = _a.autocomplete,
18484
18584
  options = _a.options,
18485
18585
  labelText = _a.labelText,
18486
18586
  required = _a.required,
@@ -18503,7 +18603,7 @@ var ReactSelect = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
18503
18603
  ariaLabel = _a["aria-label"],
18504
18604
  _a$windowThreshold = _a.windowThreshold,
18505
18605
  windowThreshold = _a$windowThreshold === void 0 ? 300 : _a$windowThreshold,
18506
- props = __rest(_a, ["autocomplete", "options", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "multiselect", "onChange", "placeholder", "value", "defaultValue", "components", "aria-label", "windowThreshold"]);
18606
+ props = __rest(_a, ["size", "autocomplete", "options", "labelText", "required", "requirementText", "helpText", "disabled", "errorMessage", "errorList", "error", "id", "initialIsOpen", "maxHeight", "multiselect", "onChange", "placeholder", "value", "defaultValue", "components", "aria-label", "windowThreshold"]);
18507
18607
 
18508
18608
  var _useTranslation = useTranslation(),
18509
18609
  t = _useTranslation.t;
@@ -18512,6 +18612,7 @@ var ReactSelect = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
18512
18612
  var spaceProps = getSubset(props, propTypes.space);
18513
18613
  var reactSelectRef = React__default.useRef(null);
18514
18614
  var optionsRef = React__default.useRef(options);
18615
+ var componentSize = useComponentSize(size);
18515
18616
  React__default.useEffect(function () {
18516
18617
  checkOptionsAreValid(options);
18517
18618
  optionsRef.current = options;
@@ -18531,6 +18632,7 @@ var ReactSelect = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
18531
18632
  requirementText: requirementText,
18532
18633
  helpText: helpText
18533
18634
  }, /*#__PURE__*/React__default.createElement(WindowedSelect, Object.assign({
18635
+ size: componentSize,
18534
18636
  ref: reactSelectRef,
18535
18637
  placeholder: placeholder || t("select ..."),
18536
18638
  windowThreshold: windowThreshold,
@@ -18538,6 +18640,7 @@ var ReactSelect = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
18538
18640
  theme: themeContext,
18539
18641
  error: error,
18540
18642
  maxHeight: maxHeight,
18643
+ size: componentSize,
18541
18644
  windowed: options.length > windowThreshold
18542
18645
  }),
18543
18646
  isDisabled: disabled,
@@ -19098,7 +19201,7 @@ function getBordersSize(styles, axis) {
19098
19201
  return parseFloat(styles['border' + sideA + 'Width']) + parseFloat(styles['border' + sideB + 'Width']);
19099
19202
  }
19100
19203
 
19101
- function getSize$3(axis, body, html, computedStyle) {
19204
+ function getSize$2(axis, body, html, computedStyle) {
19102
19205
  return Math.max(body['offset' + axis], body['scroll' + axis], html['client' + axis], html['offset' + axis], html['scroll' + axis], isIE(10) ? parseInt(html['offset' + axis]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Top' : 'Left')]) + parseInt(computedStyle['margin' + (axis === 'Height' ? 'Bottom' : 'Right')]) : 0);
19103
19206
  }
19104
19207
 
@@ -19108,8 +19211,8 @@ function getWindowSizes(document) {
19108
19211
  var computedStyle = isIE(10) && getComputedStyle(html);
19109
19212
 
19110
19213
  return {
19111
- height: getSize$3('Height', body, html, computedStyle),
19112
- width: getSize$3('Width', body, html, computedStyle)
19214
+ height: getSize$2('Height', body, html, computedStyle),
19215
+ width: getSize$2('Width', body, html, computedStyle)
19113
19216
  };
19114
19217
  }
19115
19218
 
@@ -21940,36 +22043,6 @@ NavBarDropdownMenu$1.defaultProps = {
21940
22043
  hideDelay: "100"
21941
22044
  };
21942
22045
 
21943
- var getSize$2 = function getSize(size, theme) {
21944
- switch (size) {
21945
- case "small":
21946
- return {
21947
- fontSize: "" + theme.fontSizes.small,
21948
- lineHeight: "" + theme.lineHeights.smallTextCompressed,
21949
- padding: subPx(theme.space.half) + " " + theme.space.x1
21950
- };
21951
-
21952
- case "medium":
21953
- return {
21954
- fontSize: "" + theme.fontSizes.medium,
21955
- padding: subPx(theme.space.x1) + " " + theme.space.x2
21956
- };
21957
-
21958
- case "large":
21959
- return {
21960
- fontSize: "" + theme.fontSizes.large,
21961
- lineHeight: "" + theme.lineHeights.subsectionTitle,
21962
- padding: subPx(theme.space.x2) + " " + theme.space.x3
21963
- };
21964
-
21965
- default:
21966
- return {
21967
- fontSize: "" + theme.fontSizes.medium,
21968
- padding: subPx(theme.space.x1) + " " + theme.space.x2
21969
- };
21970
- }
21971
- };
21972
-
21973
22046
  var WrapperButton$2 = styled.button.withConfig({
21974
22047
  displayName: "Button__WrapperButton",
21975
22048
  componentId: "sc-hxfi59-0"
@@ -22013,12 +22086,30 @@ var WrapperButton$2 = styled.button.withConfig({
22013
22086
  },
22014
22087
  "&:disabled": {
22015
22088
  opacity: ".5"
22016
- }
22089
+ },
22090
+ fontSize: "medium",
22091
+ padding: subPx(theme.space.x1) + " " + theme.space.x2
22017
22092
  };
22018
22093
  }, function (_ref3) {
22019
- var size = _ref3.size,
22020
- theme = _ref3.theme;
22021
- return Object.assign({}, getSize$2(size, theme));
22094
+ var theme = _ref3.theme;
22095
+ return variant({
22096
+ prop: "size",
22097
+ variants: {
22098
+ small: {
22099
+ fontSize: "small",
22100
+ lineHeight: "smallTextCompressed",
22101
+ padding: subPx(theme.space.half) + " " + theme.space.x1
22102
+ },
22103
+ large: {
22104
+ fontSize: "medium",
22105
+ padding: subPx(theme.space.x2) + " " + theme.space.x3
22106
+ },
22107
+ medium: {
22108
+ fontSize: "medium",
22109
+ padding: subPx(theme.space.x1) + " " + theme.space.x2
22110
+ }
22111
+ }
22112
+ });
22022
22113
  }, space);
22023
22114
  var Button = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
22024
22115
  var children = _a.children,
@@ -22027,18 +22118,18 @@ var Button = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
22027
22118
  icon = _a.icon,
22028
22119
  className = _a.className,
22029
22120
  asLink = _a.asLink,
22030
- _a$size = _a.size,
22031
- size = _a$size === void 0 ? "medium" : _a$size,
22121
+ size = _a.size,
22032
22122
  props = __rest(_a, ["children", "iconSide", "icon", "className", "asLink", "size"]);
22033
22123
 
22034
22124
  var _useTheme = useTheme(),
22035
22125
  smallTextCompressed = _useTheme.lineHeights.smallTextCompressed;
22036
22126
 
22127
+ var componentSize = useComponentSize(size);
22037
22128
  return /*#__PURE__*/React__default.createElement(WrapperButton$2, Object.assign({
22038
- as: asLink ? "a" : undefined,
22129
+ as: asLink ? "a" : "button",
22039
22130
  ref: ref,
22040
22131
  className: className,
22041
- size: size
22132
+ size: componentSize
22042
22133
  }, props), icon && iconSide === "left" && /*#__PURE__*/React__default.createElement(Icon, {
22043
22134
  size: smallTextCompressed + "em",
22044
22135
  mr: "half",
@@ -24306,7 +24397,6 @@ var WrapperButton$1 = styled.button.withConfig({
24306
24397
  position: "relative",
24307
24398
  display: "inline-flex",
24308
24399
  alignItems: "center",
24309
- padding: theme.space.half + " " + theme.space.none,
24310
24400
  cursor: disabled ? "default" : "pointer"
24311
24401
  }, _ref4["" + Text] = {
24312
24402
  display: "block",
@@ -24333,8 +24423,20 @@ var WrapperButton$1 = styled.button.withConfig({
24333
24423
  boxShadow: theme.shadows.focus
24334
24424
  }, _focus["" + HoverText] = {
24335
24425
  opacity: "1"
24336
- }, _focus), _ref4;
24337
- }, space);
24426
+ }, _focus), _ref4.paddingTop = theme.space.half, _ref4.paddingBottom = theme.space.half, _ref4.paddingLeft = theme.space.none, _ref4.paddingRight = theme.space.none, _ref4;
24427
+ }, variant({
24428
+ prop: "size",
24429
+ variants: {
24430
+ large: {
24431
+ py: "x1",
24432
+ px: "none"
24433
+ },
24434
+ medium: {
24435
+ py: "half",
24436
+ px: "none"
24437
+ }
24438
+ }
24439
+ }), space);
24338
24440
  var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwardedRef) {
24339
24441
  var children = _a.children,
24340
24442
  _a$color = _a.color,
@@ -24344,24 +24446,27 @@ var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwarde
24344
24446
  icon = _a.icon,
24345
24447
  labelHidden = _a.labelHidden,
24346
24448
  className = _a.className,
24347
- iconSize = _a.iconSize,
24449
+ _a$iconSize = _a.iconSize,
24450
+ iconSize = _a$iconSize === void 0 ? "x3" : _a$iconSize,
24348
24451
  fontSize = _a.fontSize,
24349
24452
  tooltip = _a.tooltip,
24350
- props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip"]);
24453
+ size = _a.size,
24454
+ props = __rest(_a, ["children", "color", "hoverBackgroundColor", "icon", "labelHidden", "className", "iconSize", "fontSize", "tooltip", "size"]);
24351
24455
 
24352
- var size = iconSize || "x3";
24456
+ var componentSize = useComponentSize(size);
24353
24457
  return /*#__PURE__*/React__default.createElement(WrapperButton$1, Object.assign({
24354
24458
  ref: forwardedRef,
24355
24459
  "aria-label": props["aria-label"] ? props["aria-label"] : typeof children === "string" ? children : undefined,
24356
24460
  className: className,
24357
- hoverBackgroundColor: hoverBackgroundColor
24461
+ hoverBackgroundColor: hoverBackgroundColor,
24462
+ size: componentSize
24358
24463
  }, props), /*#__PURE__*/React__default.createElement(Manager$1, null, /*#__PURE__*/React__default.createElement(Reference$1, null, function (_ref5) {
24359
24464
  var ref = _ref5.ref;
24360
24465
  return /*#__PURE__*/React__default.createElement(IconWrapper, {
24361
24466
  ref: ref,
24362
- size: iconSize || "x3"
24467
+ size: iconSize
24363
24468
  }, /*#__PURE__*/React__default.createElement(Icon, {
24364
- size: size,
24469
+ size: iconSize,
24365
24470
  icon: icon,
24366
24471
  color: color
24367
24472
  }));
@@ -24384,12 +24489,12 @@ var IconicButton = /*#__PURE__*/React__default.forwardRef(function (_a, forwarde
24384
24489
  style: style,
24385
24490
  placement: placement
24386
24491
  }, tooltip ? tooltip : children) : null;
24387
- })), children && !labelHidden && /*#__PURE__*/React__default.createElement(Text, {
24492
+ })), children && !labelHidden && (typeof children === "string" || typeof children === "number" ? /*#__PURE__*/React__default.createElement(Text, {
24388
24493
  fontSize: fontSize,
24389
24494
  mr: "half",
24390
24495
  ml: "half",
24391
24496
  color: color
24392
- }, children));
24497
+ }, children) : children));
24393
24498
  });
24394
24499
  IconicButton.propTypes = {
24395
24500
  className: PropTypes.string,
@@ -24744,6 +24849,7 @@ var DropdownMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
24744
24849
  children = _a.children,
24745
24850
  _a$showArrow = _a.showArrow,
24746
24851
  showArrow = _a$showArrow === void 0 ? true : _a$showArrow,
24852
+ size = _a.size,
24747
24853
  disabled = _a.disabled,
24748
24854
  defaultOpen = _a.defaultOpen,
24749
24855
  _a$backgroundColor = _a.backgroundColor,
@@ -24762,7 +24868,7 @@ var DropdownMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
24762
24868
  closeAriaLabel = _a.closeAriaLabel,
24763
24869
  _a$openOnHover = _a.openOnHover,
24764
24870
  openOnHover = _a$openOnHover === void 0 ? false : _a$openOnHover,
24765
- props = __rest(_a, ["trigger", "children", "showArrow", "disabled", "defaultOpen", "backgroundColor", "placement", "className", "id", "boundariesElement", "showDelay", "hideDelay", "openAriaLabel", "closeAriaLabel", "openOnHover"]);
24871
+ props = __rest(_a, ["trigger", "children", "showArrow", "size", "disabled", "defaultOpen", "backgroundColor", "placement", "className", "id", "boundariesElement", "showDelay", "hideDelay", "openAriaLabel", "closeAriaLabel", "openOnHover"]);
24766
24872
 
24767
24873
  var spaceProps = getSubset(props, propTypes.space);
24768
24874
  var restProps = omitSubset(props, propTypes.space);
@@ -24771,6 +24877,7 @@ var DropdownMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
24771
24877
  boundariesElement: boundariesElement
24772
24878
  });
24773
24879
  }, [boundariesElement]);
24880
+ var componentSize = useComponentSize(size);
24774
24881
  return /*#__PURE__*/React__default.createElement(Popper$1, {
24775
24882
  trigger: /*#__PURE__*/React__default.cloneElement(trigger(), Object.assign({
24776
24883
  type: "button",
@@ -24795,7 +24902,11 @@ var DropdownMenu = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
24795
24902
  id: id,
24796
24903
  backgroundColor: backgroundColor,
24797
24904
  showArrow: showArrow
24798
- }, restProps), children));
24905
+ }, restProps), React__default.Children.map(children, function (child) {
24906
+ return /*#__PURE__*/React__default.cloneElement(child, Object.assign({
24907
+ size: componentSize
24908
+ }, child.props), child.props.children);
24909
+ })));
24799
24910
  });
24800
24911
 
24801
24912
  var DropdownButton = styled.button.withConfig({
@@ -24818,8 +24929,11 @@ var DropdownButton = styled.button.withConfig({
24818
24929
  lineHeight: theme.lineHeights.base,
24819
24930
  fontSize: theme.fontSizes.medium,
24820
24931
  transition: ".2s",
24821
- padding: theme.space.x1 + " " + theme.space.x2 + " " + theme.space.x1 + " 12px",
24822
24932
  borderLeft: theme.space.half + " solid transparent",
24933
+ paddingTop: theme.space.x1,
24934
+ paddingRight: theme.space.x2,
24935
+ paddingBottom: theme.space.x1,
24936
+ paddingLeft: "12px",
24823
24937
  "&:hover": {
24824
24938
  color: theme.colors[hoverColor],
24825
24939
  backgroundColor: disabled ? "transparent" : theme.colors[bgHoverColor]
@@ -24834,7 +24948,23 @@ var DropdownButton = styled.button.withConfig({
24834
24948
  opacity: ".5"
24835
24949
  }
24836
24950
  };
24837
- }, addStyledProps);
24951
+ }, variant({
24952
+ prop: "size",
24953
+ variants: {
24954
+ large: {
24955
+ pt: "x2",
24956
+ pr: "x2",
24957
+ pb: "x2",
24958
+ pl: "12px"
24959
+ },
24960
+ medium: {
24961
+ pt: "x1",
24962
+ pr: "x2",
24963
+ pb: "x1",
24964
+ pl: "12px"
24965
+ }
24966
+ }
24967
+ }), addStyledProps);
24838
24968
  DropdownButton.defaultProps = {
24839
24969
  disabled: false,
24840
24970
  hoverColor: "darkBlue",
@@ -24864,7 +24994,6 @@ var DropdownLink = styled.a.withConfig({
24864
24994
  lineHeight: theme.lineHeights.base,
24865
24995
  fontSize: theme.fontSizes.medium,
24866
24996
  transition: ".2s",
24867
- padding: theme.space.x1 + " " + theme.space.x2 + " " + theme.space.x1 + " 12px",
24868
24997
  borderLeft: theme.space.half + " solid transparent",
24869
24998
  "&:visited": {
24870
24999
  color: theme.colors[color]
@@ -24881,9 +25010,29 @@ var DropdownLink = styled.a.withConfig({
24881
25010
  },
24882
25011
  "&:disabled": {
24883
25012
  opacity: ".5"
24884
- }
25013
+ },
25014
+ paddingTop: theme.space.x1,
25015
+ paddingRight: theme.space.x2,
25016
+ paddingBottom: theme.space.x1,
25017
+ paddingLeft: "12px"
24885
25018
  };
24886
- }, addStyledProps);
25019
+ }, variant({
25020
+ prop: "size",
25021
+ variants: {
25022
+ large: {
25023
+ pt: "x2",
25024
+ pr: "x2",
25025
+ pb: "x2",
25026
+ pl: "12px"
25027
+ },
25028
+ medium: {
25029
+ pt: "x1",
25030
+ pr: "x2",
25031
+ pb: "x1",
25032
+ pl: "12px"
25033
+ }
25034
+ }
25035
+ }), addStyledProps);
24887
25036
  DropdownLink.defaultProps = {
24888
25037
  disabled: false,
24889
25038
  color: "darkGrey",
@@ -25041,7 +25190,7 @@ var StyledButton$3 = styled(DropdownButton).withConfig({
25041
25190
  var isOpen = _ref.isOpen,
25042
25191
  theme = _ref.theme;
25043
25192
  return {
25044
- position: "relative",
25193
+ padding: theme.space.x1 + " " + theme.space.x1 + " " + theme.space.x1 + " 12px",
25045
25194
  backgroundColor: isOpen ? theme.colors.lightBlue : "transparent",
25046
25195
  color: isOpen ? theme.colors.darkBlue : theme.colors.darkGrey
25047
25196
  };
@@ -25054,15 +25203,14 @@ var SubMenuTriggerButton$1 = /*#__PURE__*/React__default.forwardRef(function (_a
25054
25203
  return /*#__PURE__*/React__default.createElement(StyledButton$3, Object.assign({
25055
25204
  isOpen: isOpen,
25056
25205
  ref: ref
25057
- }, props), name, /*#__PURE__*/React__default.createElement(Icon, {
25058
- style: {
25059
- position: "absolute",
25060
- top: "10px"
25061
- },
25206
+ }, props), /*#__PURE__*/React__default.createElement(Flex, {
25207
+ gap: "half",
25208
+ justifyContent: "space-between",
25209
+ alignItems: "center"
25210
+ }, name, /*#__PURE__*/React__default.createElement(Icon, {
25062
25211
  icon: "rightArrow",
25063
- size: "20px",
25064
- p: "2px"
25065
- }));
25212
+ size: "20px"
25213
+ })));
25066
25214
  });
25067
25215
  SubMenuTriggerButton$1.displayName = "SubMenuTriggerButton";
25068
25216
 
@@ -25851,89 +25999,6 @@ Suffix.defaultProps = {
25851
25999
  suffixWidth: null
25852
26000
  };
25853
26001
 
25854
- var StyledInputIcon = styled(Icon).withConfig({
25855
- displayName: "InputField__StyledInputIcon",
25856
- componentId: "sc-a97ghf-0"
25857
- })(function (_ref) {
25858
- var theme = _ref.theme;
25859
- return {
25860
- position: "absolute",
25861
- right: theme.space.x1,
25862
- color: theme.colors.darkGrey,
25863
- bottom: "50%",
25864
- transform: "translateY(50%)",
25865
- pointerEvents: "none"
25866
- };
25867
- });
25868
-
25869
- var inputStyles = function inputStyles(theme) {
25870
- return {
25871
- disabled: {
25872
- color: curriedTransparentize(0.33, theme.colors.black),
25873
- borderColor: theme.colors.lightGrey,
25874
- backgroundColor: theme.colors.whiteGrey
25875
- },
25876
- error: {
25877
- color: theme.colors.red,
25878
- borderColor: theme.colors.red
25879
- },
25880
- default: {
25881
- color: theme.colors.black,
25882
- borderColor: theme.colors.grey
25883
- }
25884
- };
25885
- };
25886
-
25887
- var getInputStyle = function getInputStyle(_ref2) {
25888
- var disabled = _ref2.disabled,
25889
- error = _ref2.error,
25890
- theme = _ref2.theme;
25891
-
25892
- if (disabled) {
25893
- return inputStyles(theme).disabled;
25894
- }
25895
-
25896
- if (error) {
25897
- return inputStyles(theme).error;
25898
- }
25899
-
25900
- return inputStyles(theme).default;
25901
- };
25902
-
25903
- var StyledInput = styled.input.withConfig({
25904
- displayName: "InputField__StyledInput",
25905
- componentId: "sc-a97ghf-1"
25906
- })(function (_ref3) {
25907
- var theme = _ref3.theme,
25908
- inputWidth = _ref3.inputWidth;
25909
- return {
25910
- display: "block",
25911
- flexGrow: 1,
25912
- border: "1px solid",
25913
- borderRadius: theme.radii.medium,
25914
- padding: subPx(theme.space.x1),
25915
- fontSize: theme.fontSizes.medium,
25916
- lineHeight: theme.lineHeights.base,
25917
- margin: theme.space.none,
25918
- minHeight: theme.space.x5,
25919
- maxWidth: inputWidth,
25920
- width: inputWidth,
25921
- "&:focus": {
25922
- outline: "none",
25923
- color: theme.colors.black,
25924
- borderColor: theme.colors.blue,
25925
- boxShadow: theme.shadows.focus,
25926
- " ~ svg": {
25927
- fill: theme.colors.darkBlue
25928
- }
25929
- },
25930
- "::placeholder": {
25931
- color: curriedTransparentize(0.4, theme.colors.black)
25932
- }
25933
- };
25934
- }, space, function (props) {
25935
- return getInputStyle(props);
25936
- });
25937
26002
  var InputField = /*#__PURE__*/forwardRef(function (_a, ref) {
25938
26003
  var icon = _a.icon,
25939
26004
  error = _a.error,
@@ -25949,8 +26014,11 @@ var InputField = /*#__PURE__*/forwardRef(function (_a, ref) {
25949
26014
  suffixWidth = _a.suffixWidth,
25950
26015
  inputWidth = _a.inputWidth,
25951
26016
  iconSize = _a.iconSize,
25952
- props = __rest(_a, ["icon", "error", "required", "labelText", "requirementText", "helpText", "prefix", "prefixWidth", "prefixAlignment", "suffix", "suffixAlignment", "suffixWidth", "inputWidth", "iconSize"]);
26017
+ size = _a.size,
26018
+ htmlSize = _a.htmlSize,
26019
+ props = __rest(_a, ["icon", "error", "required", "labelText", "requirementText", "helpText", "prefix", "prefixWidth", "prefixAlignment", "suffix", "suffixAlignment", "suffixWidth", "inputWidth", "iconSize", "size", "htmlSize"]);
25953
26020
 
26021
+ var componentSize = useComponentSize(size);
25954
26022
  return /*#__PURE__*/React__default.createElement(MaybeFieldLabel, {
25955
26023
  labelText: labelText,
25956
26024
  requirementText: requirementText,
@@ -25972,16 +26040,116 @@ var InputField = /*#__PURE__*/forwardRef(function (_a, ref) {
25972
26040
  required: required,
25973
26041
  error: error,
25974
26042
  ref: ref,
26043
+ size: htmlSize,
26044
+ scale: componentSize,
25975
26045
  inputWidth: inputWidth
25976
26046
  }, props)), icon && /*#__PURE__*/React__default.createElement(StyledInputIcon, {
25977
26047
  icon: icon,
25978
- size: iconSize || "x2"
26048
+ size: iconSize || "x2",
26049
+ scale: componentSize
25979
26050
  })), /*#__PURE__*/React__default.createElement(Suffix, {
25980
26051
  suffix: suffix,
25981
26052
  suffixWidth: suffixWidth,
25982
26053
  textAlign: suffixAlignment
25983
26054
  })));
25984
26055
  });
26056
+ var StyledInput = styled.input.withConfig({
26057
+ displayName: "InputField__StyledInput",
26058
+ componentId: "sc-a97ghf-0"
26059
+ })(function (_ref) {
26060
+ var theme = _ref.theme,
26061
+ inputWidth = _ref.inputWidth;
26062
+ return {
26063
+ display: "block",
26064
+ flexGrow: 1,
26065
+ border: "1px solid",
26066
+ borderRadius: theme.radii.medium,
26067
+ fontSize: theme.fontSizes.medium,
26068
+ lineHeight: theme.lineHeights.base,
26069
+ margin: theme.space.none,
26070
+ minHeight: theme.space.x5,
26071
+ maxWidth: inputWidth,
26072
+ width: inputWidth,
26073
+ "&:focus": {
26074
+ outline: "none",
26075
+ color: theme.colors.black,
26076
+ borderColor: theme.colors.blue,
26077
+ boxShadow: theme.shadows.focus,
26078
+ " ~ svg": {
26079
+ fill: theme.colors.darkBlue
26080
+ }
26081
+ },
26082
+ "::placeholder": {
26083
+ color: curriedTransparentize(0.4, theme.colors.black)
26084
+ },
26085
+ padding: "" + subPx(theme.space.x1)
26086
+ };
26087
+ }, function (_ref2) {
26088
+ var theme = _ref2.theme;
26089
+ return variant({
26090
+ prop: "scale",
26091
+ variants: {
26092
+ large: {
26093
+ padding: "" + subPx(theme.space.x2)
26094
+ },
26095
+ medium: {
26096
+ padding: "" + subPx(theme.space.x1)
26097
+ }
26098
+ }
26099
+ });
26100
+ }, function (_ref3) {
26101
+ var disabled = _ref3.disabled,
26102
+ error = _ref3.error,
26103
+ theme = _ref3.theme;
26104
+ return cssForState({
26105
+ disabled: disabled,
26106
+ error: error,
26107
+ theme: theme
26108
+ });
26109
+ }, space);
26110
+ var StyledInputIcon = styled(Icon).withConfig({
26111
+ displayName: "InputField__StyledInputIcon",
26112
+ componentId: "sc-a97ghf-1"
26113
+ })(function (_ref4) {
26114
+ var theme = _ref4.theme;
26115
+ return {
26116
+ position: "absolute",
26117
+ right: theme.space.x1,
26118
+ color: theme.colors.darkGrey,
26119
+ bottom: "50%",
26120
+ transform: "translateY(50%)",
26121
+ pointerEvents: "none"
26122
+ };
26123
+ }, variant({
26124
+ prop: "scale",
26125
+ variants: {
26126
+ large: {
26127
+ right: "x2"
26128
+ },
26129
+ medium: {
26130
+ right: "x1"
26131
+ }
26132
+ }
26133
+ }));
26134
+
26135
+ var cssForState = function cssForState(_ref5) {
26136
+ var disabled = _ref5.disabled,
26137
+ error = _ref5.error,
26138
+ theme = _ref5.theme;
26139
+ if (disabled) return {
26140
+ color: curriedTransparentize(0.33, theme.colors.black),
26141
+ borderColor: theme.colors.lightGrey,
26142
+ backgroundColor: theme.colors.whiteGrey
26143
+ };
26144
+ if (error) return {
26145
+ color: theme.colors.red,
26146
+ borderColor: theme.colors.red
26147
+ };
26148
+ return {
26149
+ color: theme.colors.black,
26150
+ borderColor: theme.colors.grey
26151
+ };
26152
+ };
25985
26153
 
25986
26154
  var Input = /*#__PURE__*/forwardRef(function (_a, ref) {
25987
26155
  var errorMessage = _a.errorMessage,
@@ -26184,10 +26352,12 @@ var renderMenuLink$2 = function renderMenuLink(menuItem, linkOnClick, themeColor
26184
26352
  target: menuItem.openInNew ? "_blank" : undefined
26185
26353
  };
26186
26354
  var topLevel = layer === 0;
26187
- var MenuLink = topLevel ? TopLevelLink : DropdownLink;
26188
26355
  return /*#__PURE__*/React__default.createElement("li", {
26189
26356
  key: (_a = menuItem.key) !== null && _a !== void 0 ? _a : menuItem.name
26190
- }, /*#__PURE__*/React__default.createElement(MenuLink, Object.assign({}, sharedLinkProps), menuItem.name, menuItem.openInNew && /*#__PURE__*/React__default.createElement(Icon, {
26357
+ }, topLevel ? /*#__PURE__*/React__default.createElement(TopLevelLink, Object.assign({}, sharedLinkProps), menuItem.name, menuItem.openInNew && /*#__PURE__*/React__default.createElement(Icon, {
26358
+ size: topLevel ? "x3" : "x2",
26359
+ icon: "openInNew"
26360
+ })) : /*#__PURE__*/React__default.createElement(DropdownLink, Object.assign({}, sharedLinkProps), menuItem.name, menuItem.openInNew && /*#__PURE__*/React__default.createElement(Icon, {
26191
26361
  size: topLevel ? "x3" : "x2",
26192
26362
  icon: "openInNew"
26193
26363
  })));
@@ -26615,33 +26785,73 @@ var BreadcrumbsList = styled.ol.withConfig({
26615
26785
  };
26616
26786
  });
26617
26787
 
26618
- var BreadcrumbsListItem = styled.li.withConfig({
26619
- displayName: "BreadcrumbsListItem",
26788
+ var BreadcrumbsListSeparator = styled.li.withConfig({
26789
+ displayName: "BreadcrumbsListItem__BreadcrumbsListSeparator",
26620
26790
  componentId: "sc-1ax5rc4-0"
26621
26791
  })(function (_ref) {
26622
26792
  var theme = _ref.theme;
26623
26793
  return {
26624
26794
  margin: 0,
26625
- padding: 0,
26626
26795
  listStyle: "none",
26627
26796
  display: "inline-flex",
26628
26797
  alignSelf: "center",
26629
26798
  color: theme.colors.midGrey,
26630
26799
  "a, p": {
26631
- fontSize: theme.fontSizes.small
26800
+ fontSize: theme.fontSizes.medium
26632
26801
  },
26633
26802
  "a:visited": {
26634
26803
  color: theme.colors.darkBlue
26635
26804
  }
26636
26805
  };
26637
26806
  }, space, layout, color, flexbox);
26807
+ var BreadcrumbsListItem = styled.li.withConfig({
26808
+ displayName: "BreadcrumbsListItem",
26809
+ componentId: "sc-1ax5rc4-1"
26810
+ })(function (_ref2) {
26811
+ var theme = _ref2.theme;
26812
+ return {
26813
+ margin: 0,
26814
+ listStyle: "none",
26815
+ display: "inline-flex",
26816
+ alignSelf: "center",
26817
+ color: theme.colors.darkBlue,
26818
+ a: {
26819
+ color: theme.colors.darkBlue
26820
+ },
26821
+ "a:visited": {
26822
+ color: theme.colors.darkBlue
26823
+ },
26824
+ "a, p": {
26825
+ padding: theme.space.none,
26826
+ fontSize: theme.fontSizes.small
26827
+ }
26828
+ };
26829
+ }, variant({
26830
+ prop: "size",
26831
+ variants: {
26832
+ large: {
26833
+ "a, p": {
26834
+ py: "x2",
26835
+ px: "x1",
26836
+ fontSize: "medium"
26837
+ }
26838
+ },
26839
+ medium: {
26840
+ "a, p": {
26841
+ py: "0",
26842
+ px: "0",
26843
+ fontSize: "small"
26844
+ }
26845
+ }
26846
+ }
26847
+ }), space, layout, color, flexbox);
26638
26848
 
26639
- var insertSeparators = function insertSeparators(items, className) {
26849
+ var insertSeparators = function insertSeparators(items) {
26640
26850
  return items.reduce(function (acc, current, index) {
26641
- return acc.concat(current, /*#__PURE__*/React__default.createElement(BreadcrumbsListItem, {
26851
+ return acc.concat(current, /*#__PURE__*/React__default.createElement(BreadcrumbsListSeparator, {
26642
26852
  "aria-hidden": true,
26643
26853
  key: "separator-" + index,
26644
- className: className
26854
+ className: "separator"
26645
26855
  }, /*#__PURE__*/React__default.createElement(Icon, {
26646
26856
  icon: "rightArrow"
26647
26857
  })));
@@ -26649,22 +26859,19 @@ var insertSeparators = function insertSeparators(items, className) {
26649
26859
  };
26650
26860
 
26651
26861
  var Breadcrumbs = function Breadcrumbs(_a) {
26652
- var children = _a.children,
26653
- as = _a.as,
26654
- props = __rest(_a, ["children", "as"]);
26862
+ var size = _a.size,
26863
+ children = _a.children,
26864
+ props = __rest(_a, ["size", "children"]);
26655
26865
 
26866
+ var componentSize = useComponentSize(size);
26656
26867
  var allItems = React__default.Children.map(children, function (child, index) {
26657
26868
  if (! /*#__PURE__*/isValidElement(child)) return null;
26658
26869
  return /*#__PURE__*/React__default.createElement(BreadcrumbsListItem, {
26870
+ size: componentSize,
26659
26871
  key: "child-" + index
26660
- }, /*#__PURE__*/React__default.cloneElement(child, {
26661
- // @ts-ignore
26662
- color: "darkBlue"
26663
- }));
26872
+ }, child);
26664
26873
  }).filter(Boolean);
26665
- return /*#__PURE__*/React__default.createElement(Flex, Object.assign({
26666
- as: as
26667
- }, props), /*#__PURE__*/React__default.createElement(BreadcrumbsList, null, insertSeparators(allItems, "seperator")));
26874
+ return /*#__PURE__*/React__default.createElement(Flex, Object.assign({}, props), /*#__PURE__*/React__default.createElement(BreadcrumbsList, null, insertSeparators(allItems)));
26668
26875
  };
26669
26876
 
26670
26877
  Breadcrumbs.defaultProps = {
@@ -26863,20 +27070,22 @@ var CheckboxInput = styled.input.withConfig({
26863
27070
  }), _ref2["&:not(:checked) + " + VisualCheckbox] = Object.assign({}, getCheckboxStyle(props, "unchecked")), _ref2;
26864
27071
  });
26865
27072
  var Checkbox = /*#__PURE__*/forwardRef(function (props, ref) {
26866
- var className = props.className,
27073
+ var size = props.size,
27074
+ className = props.className,
26867
27075
  labelText = props.labelText,
26868
27076
  disabled = props.disabled,
26869
27077
  checked = props.checked,
26870
27078
  required = props.required,
26871
27079
  error = props.error,
26872
27080
  indeterminate = props.indeterminate;
27081
+ var componentSize = useComponentSize(size);
26873
27082
  var spaceProps = getSubset(props, propTypes.space);
26874
27083
  var restProps = omitSubset(props, propTypes.space);
26875
27084
  return /*#__PURE__*/React__default.createElement(Box, Object.assign({
26876
27085
  className: className,
26877
- py: "half",
26878
27086
  px: "0"
26879
27087
  }, spaceProps), /*#__PURE__*/React__default.createElement(ClickInputLabel, {
27088
+ size: componentSize,
26880
27089
  disabled: disabled
26881
27090
  }, /*#__PURE__*/React__default.createElement(CheckboxInput, Object.assign({
26882
27091
  type: "checkbox",
@@ -40390,6 +40599,7 @@ var DatePickerInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
40390
40599
  onUpKeyPress = _ref.onUpKeyPress,
40391
40600
  onDownKeyPress = _ref.onDownKeyPress,
40392
40601
  onEnterKeyPress = _ref.onEnterKeyPress,
40602
+ size = _ref.size,
40393
40603
  ariaLabel = _ref["aria-label"];
40394
40604
 
40395
40605
  var handleChange = function handleChange(e) {
@@ -40417,6 +40627,7 @@ var DatePickerInput = /*#__PURE__*/forwardRef(function (_ref, ref) {
40417
40627
  onBlur: onBlur,
40418
40628
  onFocus: onFocus,
40419
40629
  ref: ref,
40630
+ size: size,
40420
40631
  "aria-label": ariaLabel || t("select a date"),
40421
40632
  autoComplete: "off"
40422
40633
  }, inputProps, {
@@ -40539,6 +40750,7 @@ var DEFAULT_PLACEHOLDER$1 = "YYYY-Mon-DD";
40539
40750
  var DatePicker = /*#__PURE__*/forwardRef(function (_a, datePickerRef) {
40540
40751
  var _a$dateFormat = _a.dateFormat,
40541
40752
  dateFormat = _a$dateFormat === void 0 ? DEFAULT_DATE_FORMAT : _a$dateFormat,
40753
+ size = _a.size,
40542
40754
  errorMessage = _a.errorMessage,
40543
40755
  errorList = _a.errorList,
40544
40756
  inputProps = _a.inputProps,
@@ -40552,7 +40764,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (_a, datePickerRef) {
40552
40764
  onBlur = _a.onBlur,
40553
40765
  onFocus = _a.onFocus,
40554
40766
  selected = _a.selected,
40555
- props = __rest(_a, ["dateFormat", "errorMessage", "errorList", "inputProps", "minDate", "maxDate", "highlightDates", "disableFlipping", "className", "onInputChange", "onChange", "onBlur", "onFocus", "selected"]);
40767
+ props = __rest(_a, ["dateFormat", "size", "errorMessage", "errorList", "inputProps", "minDate", "maxDate", "highlightDates", "disableFlipping", "className", "onInputChange", "onChange", "onBlur", "onFocus", "selected"]);
40556
40768
 
40557
40769
  var _useState = useState(selected),
40558
40770
  selectedDate = _useState[0],
@@ -40562,6 +40774,7 @@ var DatePicker = /*#__PURE__*/forwardRef(function (_a, datePickerRef) {
40562
40774
  ref = _useState2[0],
40563
40775
  setRef = _useState2[1];
40564
40776
 
40777
+ var componentSize = useComponentSize(size);
40565
40778
  useEffect(function () {
40566
40779
  registerDatePickerLocales();
40567
40780
  });
@@ -40625,12 +40838,13 @@ var DatePicker = /*#__PURE__*/forwardRef(function (_a, datePickerRef) {
40625
40838
  };
40626
40839
 
40627
40840
  var customInputProps = Object.assign(Object.assign(Object.assign(Object.assign({}, InputFieldDefaultProps), {
40628
- inputWidth: "184px",
40841
+ inputWidth: componentSize === "large" ? "240px" : "184px",
40629
40842
  error: !!(errorMessage || errorList)
40630
40843
  }), inputProps), {
40631
40844
  placeholder: inputProps && inputProps.placeholder || (dateFormat === DEFAULT_DATE_FORMAT ? DEFAULT_PLACEHOLDER$1 : dateFormat)
40632
40845
  });
40633
40846
  var customInput = /*#__PURE__*/React__default.createElement(DatePickerInput, {
40847
+ size: componentSize,
40634
40848
  inputProps: customInputProps,
40635
40849
  dateFormat: dateFormat,
40636
40850
  onInputChange: handleInputChange,
@@ -40687,7 +40901,8 @@ var RangeContainer = function RangeContainer(_a) {
40687
40901
  endComponent = _a.endComponent,
40688
40902
  _a$errorMessages = _a.errorMessages,
40689
40903
  errorMessages = _a$errorMessages === void 0 ? [] : _a$errorMessages,
40690
- props = __rest(_a, ["labelProps", "startComponent", "endComponent", "errorMessages"]);
40904
+ size = _a.size,
40905
+ props = __rest(_a, ["labelProps", "startComponent", "endComponent", "errorMessages", "size"]);
40691
40906
 
40692
40907
  var spaceProps = getSubset(props, propTypes.space);
40693
40908
  var restProps = omitSubset(props, propTypes.space);
@@ -40700,10 +40915,9 @@ var RangeContainer = function RangeContainer(_a) {
40700
40915
  }, /*#__PURE__*/React__default.createElement(Flex, null, startComponent), /*#__PURE__*/React__default.createElement(Flex, {
40701
40916
  px: "half",
40702
40917
  alignItems: "flex-end",
40703
- alignSelf: "flex-end",
40704
- height: "100%"
40918
+ alignSelf: "flex-end"
40705
40919
  }, /*#__PURE__*/React__default.createElement(Text, {
40706
- lineHeight: "38px"
40920
+ lineHeight: size === "large" ? "56px" : "38px"
40707
40921
  }, "-")), /*#__PURE__*/React__default.createElement(Flex, null, endComponent)), errorMessages.map(function (errorMessage, i) {
40708
40922
  return (
40709
40923
  /*#__PURE__*/
@@ -40860,27 +41074,44 @@ debounce.debounce = debounce;
40860
41074
  var debounce_1 = debounce;
40861
41075
  debounce_1.debounce;
40862
41076
 
40863
- // @ts-nocheck
40864
41077
  var TimePickerOption = styled.li.withConfig({
40865
41078
  displayName: "TimePickerOption",
40866
41079
  componentId: "sc-a59kp-0"
40867
41080
  })(function (_ref) {
40868
41081
  var theme = _ref.theme,
40869
- isSelected = _ref.isSelected,
40870
- isFocused = _ref.isFocused,
40871
- isClosest = _ref.isClosest;
40872
- return Object.assign({
40873
- padding: theme.space.x1,
41082
+ isSelected = _ref.isSelected;
41083
+ return {
40874
41084
  marginBottom: "0px",
40875
41085
  backgroundColor: isSelected ? theme.colors.darkBlue : theme.colors.white,
40876
41086
  color: isSelected ? theme.colors.white : theme.colors.black,
40877
41087
  "&:hover": {
40878
41088
  background: !isSelected && theme.colors.lightBlue
41089
+ },
41090
+ padding: theme.space.x1
41091
+ };
41092
+ }, variant({
41093
+ prop: "size",
41094
+ variants: {
41095
+ large: {
41096
+ px: "x1",
41097
+ py: "x2"
41098
+ },
41099
+ medium: {
41100
+ p: "x1"
40879
41101
  }
40880
- }, isFocused || isClosest && {
40881
- background: !isSelected && theme.colors.lightBlue,
40882
- outline: "none"
40883
- });
41102
+ }
41103
+ }), function (_ref2) {
41104
+ var isSelected = _ref2.isSelected,
41105
+ theme = _ref2.theme,
41106
+ isFocused = _ref2.isFocused,
41107
+ isClosest = _ref2.isClosest;
41108
+
41109
+ if (isFocused || isClosest) {
41110
+ return {
41111
+ background: !isSelected && theme.colors.lightBlue,
41112
+ outline: "none"
41113
+ };
41114
+ }
40884
41115
  });
40885
41116
 
40886
41117
  // @ts-nocheck
@@ -40910,7 +41141,6 @@ var TimePickerDropdown = styled.ul.withConfig({
40910
41141
  };
40911
41142
  });
40912
41143
 
40913
- // @ts-nocheck
40914
41144
  var TimePickerInput = styled(InputField).withConfig({
40915
41145
  displayName: "TimePickerInput",
40916
41146
  componentId: "sc-a6tg1z-0"
@@ -41050,7 +41280,8 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_a, inputRef) {
41050
41280
  value = _a.value,
41051
41281
  error = _a.error,
41052
41282
  disabled = _a.disabled,
41053
- props = __rest(_a, ["timeFormat", "interval", "className", "minTime", "maxTime", "defaultValue", "onInputChange", "onBlur", "onFocus", "errorMessage", "errorList", "labelText", "placeholder", "onClick", "onChange", "aria-label", "value", "error", "disabled"]);
41283
+ size = _a.size,
41284
+ props = __rest(_a, ["timeFormat", "interval", "className", "minTime", "maxTime", "defaultValue", "onInputChange", "onBlur", "onFocus", "errorMessage", "errorList", "labelText", "placeholder", "onClick", "onChange", "aria-label", "value", "error", "disabled", "size"]);
41054
41285
 
41055
41286
  var _useState = useState(defaultValue ? defaultValue : ""),
41056
41287
  input = _useState[0],
@@ -41076,6 +41307,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_a, inputRef) {
41076
41307
  var _useTranslation = useTranslation(),
41077
41308
  t = _useTranslation.t;
41078
41309
 
41310
+ var componentSize = useComponentSize(size);
41079
41311
  var scrollToSelection = useCallback(debounce_1(function (currentOption, dropdown) {
41080
41312
  var currentIndex = Array.from(dropdown.current.children).indexOf(currentOption);
41081
41313
 
@@ -41187,7 +41419,7 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_a, inputRef) {
41187
41419
  className: "nds-time-picker " + (className || ""),
41188
41420
  position: "relative",
41189
41421
  ref: onRefChange,
41190
- width: "130px",
41422
+ width: componentSize === "large" ? "208px" : "130px",
41191
41423
  "data-testid": "select-container"
41192
41424
  }, props), /*#__PURE__*/React__default.createElement(TimePickerInput, {
41193
41425
  labelText: labelText,
@@ -41203,13 +41435,14 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_a, inputRef) {
41203
41435
  return handleKeyDown(e);
41204
41436
  },
41205
41437
  "aria-label": ariaLabel || t("Select a time"),
41206
- inputWidth: "130px",
41438
+ inputWidth: componentSize === "large" ? "208px" : "130px",
41207
41439
  iconSize: "20px",
41208
41440
  "data-testid": "select-input",
41209
41441
  type: "text",
41210
41442
  ref: inputRef,
41211
41443
  disabled: disabled,
41212
- autoComplete: "off"
41444
+ autoComplete: "off",
41445
+ size: componentSize
41213
41446
  }), /*#__PURE__*/React__default.createElement(TimePickerDropdown, {
41214
41447
  isOpen: dropdownIsOpen,
41215
41448
  "aria-expanded": dropdownIsOpen,
@@ -41232,7 +41465,8 @@ var TimePicker = /*#__PURE__*/forwardRef(function (_a, inputRef) {
41232
41465
  handleOptionSelection(option);
41233
41466
  },
41234
41467
  role: "option",
41235
- "data-testid": "select-option " + closestTestId + " " + selectedTestId
41468
+ "data-testid": "select-option " + closestTestId + " " + selectedTestId,
41469
+ size: componentSize
41236
41470
  }, option.label);
41237
41471
  })), /*#__PURE__*/React__default.createElement(InlineValidation, {
41238
41472
  mt: "x1",
@@ -41318,7 +41552,8 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41318
41552
  locale = _a.locale,
41319
41553
  endTimeProps = _a.endTimeProps,
41320
41554
  startTimeProps = _a.startTimeProps,
41321
- props = __rest(_a, ["dateFormat", "onRangeChange", "onStartDateChange", "onEndDateChange", "errorMessage", "startDateErrorMessage", "endDateErrorMessage", "defaultStartDate", "defaultEndDate", "endDateInputProps", "startDateInputProps", "disableRangeValidation", "labelProps", "minDate", "maxDate", "showTimes", "minTime", "maxTime", "defaultStartTime", "defaultEndTime", "onStartTimeChange", "onEndTimeChange", "timeFormat", "interval", "disableFlipping", "locale", "endTimeProps", "startTimeProps"]);
41555
+ size = _a.size,
41556
+ props = __rest(_a, ["dateFormat", "onRangeChange", "onStartDateChange", "onEndDateChange", "errorMessage", "startDateErrorMessage", "endDateErrorMessage", "defaultStartDate", "defaultEndDate", "endDateInputProps", "startDateInputProps", "disableRangeValidation", "labelProps", "minDate", "maxDate", "showTimes", "minTime", "maxTime", "defaultStartTime", "defaultEndTime", "onStartTimeChange", "onEndTimeChange", "timeFormat", "interval", "disableFlipping", "locale", "endTimeProps", "startTimeProps", "size"]);
41322
41557
 
41323
41558
  var dateRef1 = useRef();
41324
41559
  var dateRef2 = useRef();
@@ -41345,6 +41580,10 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41345
41580
  rangeError = _useState5[0],
41346
41581
  setRangeError = _useState5[1];
41347
41582
 
41583
+ var _useTranslation = useTranslation(),
41584
+ t = _useTranslation.t;
41585
+
41586
+ var componentSize = useComponentSize(size);
41348
41587
  useImperativeHandle(ref, function () {
41349
41588
  return {
41350
41589
  dateRef1: Object.assign(Object.assign({}, dateRef1), {
@@ -41369,9 +41608,9 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41369
41608
  })
41370
41609
  };
41371
41610
  });
41372
-
41373
- var _useTranslation = useTranslation(),
41374
- t = _useTranslation.t;
41611
+ useEffect(function () {
41612
+ validateDateRange();
41613
+ }, [startDate, endDate, startTime, endTime]);
41375
41614
 
41376
41615
  var changeStartTimeHandler = function changeStartTimeHandler(label, value) {
41377
41616
  setStartTime(value);
@@ -41440,6 +41679,7 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41440
41679
  error: rangeError
41441
41680
  }, startDateInputProps);
41442
41681
  var startDateInput = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DatePicker, {
41682
+ size: componentSize,
41443
41683
  dateFormat: dateFormat,
41444
41684
  selected: startDate,
41445
41685
  onChange: changeStartDateHandler,
@@ -41452,6 +41692,7 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41452
41692
  disableFlipping: disableFlipping,
41453
41693
  ref: dateRef1
41454
41694
  }), showTimes && /*#__PURE__*/React__default.createElement(StartTime, Object.assign({
41695
+ size: componentSize,
41455
41696
  selected: startTime,
41456
41697
  defaultValue: defaultStartTime,
41457
41698
  "aria-label": t("select a start time"),
@@ -41466,6 +41707,7 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41466
41707
  error: !!rangeError
41467
41708
  }, startTimeProps)));
41468
41709
  var endDateInput = /*#__PURE__*/React__default.createElement(React__default.Fragment, null, showTimes && /*#__PURE__*/React__default.createElement(EndTime, Object.assign({
41710
+ size: componentSize,
41469
41711
  selected: endTime,
41470
41712
  defaultValue: defaultEndTime,
41471
41713
  minTime: minTime,
@@ -41479,6 +41721,7 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41479
41721
  ref: timeRef2,
41480
41722
  error: !!rangeError
41481
41723
  }, endTimeProps)), /*#__PURE__*/React__default.createElement(DatePicker, {
41724
+ size: componentSize,
41482
41725
  dateFormat: dateFormat,
41483
41726
  selected: endDate,
41484
41727
  onChange: changeEndDateHandler,
@@ -41494,10 +41737,8 @@ var DateRange = /*#__PURE__*/forwardRef(function (_a, ref) {
41494
41737
  disableFlipping: disableFlipping,
41495
41738
  ref: dateRef2
41496
41739
  }));
41497
- useEffect(function () {
41498
- validateDateRange();
41499
- }, [startDate, endDate, startTime, endTime]);
41500
41740
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(DateRangeStyles, null), /*#__PURE__*/React__default.createElement(RangeContainer, Object.assign({
41741
+ size: componentSize,
41501
41742
  labelProps: Object.assign(Object.assign({}, labelProps), {
41502
41743
  labelText: labelProps.labelText === DEFAULT_LABEL$1 ? t("date range") : labelProps.labelText
41503
41744
  }),
@@ -48170,6 +48411,17 @@ var Reset = createGlobalStyle(function () {
48170
48411
  };
48171
48412
  });
48172
48413
 
48414
+ var buildBreakPoints = function buildBreakPoints(breakpointsConfig) {
48415
+ return Object.assign(Object.assign({}, breakpointsConfig), {
48416
+ // We need the map function as a polyfill because the `variant` function
48417
+ // from `styled-system` expects the breakpoints
48418
+ // to be an array and not an object
48419
+ map: function map(fn) {
48420
+ return Object.values(breakpointsConfig).map(fn);
48421
+ }
48422
+ });
48423
+ };
48424
+
48173
48425
  var AllNDSGlobalStyles = function AllNDSGlobalStyles(_ref) {
48174
48426
  var theme = _ref.theme,
48175
48427
  locale = _ref.locale,
@@ -48190,24 +48442,31 @@ var NDSProvider = function NDSProvider(_ref2) {
48190
48442
  _ref2$disableGlobalSt = _ref2.disableGlobalStyles,
48191
48443
  disableGlobalStyles = _ref2$disableGlobalSt === void 0 ? false : _ref2$disableGlobalSt,
48192
48444
  _ref2$locale = _ref2.locale,
48193
- locale = _ref2$locale === void 0 ? "en_US" : _ref2$locale;
48445
+ locale = _ref2$locale === void 0 ? "en_US" : _ref2$locale,
48446
+ _ref2$size = _ref2.size,
48447
+ size = _ref2$size === void 0 ? "medium" : _ref2$size;
48194
48448
  useEffect(function () {
48195
48449
  i18next.changeLanguage(locale);
48196
48450
  }, [locale]);
48197
48451
  var mergedTheme = mergeThemes(Theme, theme);
48452
+ var themeWithBreakpoints = Object.assign(Object.assign({}, mergedTheme), {
48453
+ breakpoints: buildBreakPoints(mergedTheme.breakpoints)
48454
+ });
48198
48455
  return /*#__PURE__*/React__default.createElement(LocaleContext.Provider, {
48199
48456
  value: {
48200
48457
  locale: locale
48201
48458
  }
48459
+ }, /*#__PURE__*/React__default.createElement(ComponentSizeContextProvider, {
48460
+ size: size
48202
48461
  }, /*#__PURE__*/React__default.createElement(AllNDSGlobalStyles, {
48203
- theme: mergedTheme,
48462
+ theme: themeWithBreakpoints,
48204
48463
  locale: locale,
48205
48464
  disableGlobalStyles: disableGlobalStyles
48206
48465
  }, /*#__PURE__*/React__default.createElement(I18nextProvider, {
48207
48466
  i18n: i18next
48208
48467
  }, /*#__PURE__*/React__default.createElement(ThemeProvider, {
48209
- theme: mergedTheme
48210
- }, children))));
48468
+ theme: themeWithBreakpoints
48469
+ }, children)))));
48211
48470
  };
48212
48471
 
48213
48472
  var Overlay = styled(Flex).withConfig({
@@ -48551,16 +48810,18 @@ var Radio = /*#__PURE__*/forwardRef(function (_a, ref) {
48551
48810
  checked = _a.checked,
48552
48811
  required = _a.required,
48553
48812
  error = _a.error,
48554
- props = __rest(_a, ["className", "labelText", "disabled", "checked", "required", "error"]);
48813
+ size = _a.size,
48814
+ props = __rest(_a, ["className", "labelText", "disabled", "checked", "required", "error", "size"]);
48555
48815
 
48816
+ var componentSize = useComponentSize(size);
48556
48817
  var spaceProps = getSubset(props, propTypes.space);
48557
48818
  var restProps = omitSubset(props, propTypes.space);
48558
48819
  return /*#__PURE__*/React__default.createElement(Box, Object.assign({
48559
48820
  position: "relative",
48560
48821
  className: className,
48561
- py: "half",
48562
48822
  px: "0"
48563
48823
  }, spaceProps), /*#__PURE__*/React__default.createElement(ClickInputLabel, {
48824
+ size: componentSize,
48564
48825
  disabled: disabled
48565
48826
  }, /*#__PURE__*/React__default.createElement(RadioInput, Object.assign({
48566
48827
  type: "radio",
@@ -49989,10 +50250,12 @@ var FocusManager = function FocusManager(_ref) {
49989
50250
  };
49990
50251
 
49991
50252
  var Switcher = function Switcher(_a) {
49992
- var selected = _a.selected,
50253
+ var size = _a.size,
50254
+ selected = _a.selected,
49993
50255
  onChange = _a.onChange,
49994
- rest = __rest(_a, ["selected", "onChange"]);
50256
+ rest = __rest(_a, ["size", "selected", "onChange"]);
49995
50257
 
50258
+ var componentSize = useComponentSize(size);
49996
50259
  var optionRefs = [];
49997
50260
 
49998
50261
  var isSelected = function isSelected(value, index) {
@@ -50011,7 +50274,7 @@ var Switcher = function Switcher(_a) {
50011
50274
  var options = function options(focusedIndex, setFocusedIndex, handleArrowNavigation) {
50012
50275
  return React__default.Children.map(rest.children, function (child, index) {
50013
50276
  return /*#__PURE__*/React__default.cloneElement(child, {
50014
- index: index,
50277
+ size: componentSize,
50015
50278
  tabIndex: index === focusedIndex ? 0 : -1,
50016
50279
  selected: isSelected(child.props.value, index),
50017
50280
  "aria-selected": isSelected(child.props.value, index),
@@ -50022,9 +50285,9 @@ var Switcher = function Switcher(_a) {
50022
50285
  onFocus: function onFocus(e) {
50023
50286
  e.stopPropagation();
50024
50287
  },
50025
- onClick: function onClick() {
50288
+ onClick: function onClick(e) {
50026
50289
  setFocusedIndex(index);
50027
- if (onChange) onChange(child.props.value);
50290
+ if (onChange) onChange(e.target.value);
50028
50291
  }
50029
50292
  });
50030
50293
  });
@@ -50033,7 +50296,7 @@ var Switcher = function Switcher(_a) {
50033
50296
  return /*#__PURE__*/React__default.createElement(Box, Object.assign({
50034
50297
  display: "inline-flex",
50035
50298
  bg: "whiteGrey",
50036
- borderRadius: "20px"
50299
+ borderRadius: "9999px"
50037
50300
  }, rest), /*#__PURE__*/React__default.createElement(FocusManager, {
50038
50301
  refs: optionRefs,
50039
50302
  defaultFocusedIndex: getSelectedIndex()
@@ -50046,11 +50309,19 @@ var Switcher = function Switcher(_a) {
50046
50309
  };
50047
50310
 
50048
50311
  Switcher.propTypes = {
50049
- children: PropTypes.node,
50312
+ children: PropTypes.arrayOf(PropTypes.element),
50050
50313
  selected: PropTypes.string,
50051
50314
  onChange: PropTypes.func
50052
50315
  };
50053
50316
 
50317
+ var Switch$1 = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
50318
+ var children = _a.children,
50319
+ rest = __rest(_a, ["children"]);
50320
+
50321
+ return /*#__PURE__*/React__default.createElement(SwitchButton, Object.assign({}, rest, {
50322
+ ref: ref
50323
+ }), children);
50324
+ });
50054
50325
  var SwitchButton = styled.button.withConfig({
50055
50326
  displayName: "Switch__SwitchButton",
50056
50327
  componentId: "sc-wsu5uq-0"
@@ -50058,18 +50329,18 @@ var SwitchButton = styled.button.withConfig({
50058
50329
  var selected = _ref.selected,
50059
50330
  theme = _ref.theme;
50060
50331
  return Object.assign(Object.assign(Object.assign({
50061
- height: theme.space.x4,
50062
- padding: theme.space.half + " " + theme.space.x2,
50332
+ margin: 1,
50063
50333
  background: selected ? theme.colors.white : "none",
50064
50334
  color: selected ? theme.colors.darkBlue : theme.colors.darkGrey,
50065
50335
  cursor: "pointer",
50066
50336
  border: "none",
50067
- borderRadius: 20,
50337
+ borderRadius: 9999,
50068
50338
  fontSize: theme.fontSizes.medium,
50069
50339
  fontWeight: theme.fontWeights.medium,
50070
50340
  lineHeight: theme.lineHeights.base,
50071
50341
  textDecoration: "none",
50072
- whiteSpace: "nowrap"
50342
+ whiteSpace: "nowrap",
50343
+ padding: numberFromDimension(theme.space.x1) - 1 + "px " + theme.space.x2
50073
50344
  }, selected && {
50074
50345
  boxShadow: theme.shadows.small
50075
50346
  }), {
@@ -50082,21 +50353,24 @@ var SwitchButton = styled.button.withConfig({
50082
50353
  backgroundColor: theme.colors.lightGrey
50083
50354
  }
50084
50355
  });
50085
- });
50086
- /* eslint-disable-next-line react/display-name */
50087
-
50088
- var Switch$1 = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
50089
- var children = _a.children,
50090
- rest = __rest(_a, ["children"]);
50091
-
50092
- return /*#__PURE__*/React__default.createElement(SwitchButton, Object.assign({}, rest, {
50093
- ref: ref
50094
- }), children);
50356
+ }, function (_ref2) {
50357
+ var theme = _ref2.theme;
50358
+ return variant({
50359
+ prop: "size",
50360
+ variants: {
50361
+ large: {
50362
+ padding: numberFromDimension(theme.space.x2) - 1 + "px " + theme.space.x3
50363
+ },
50364
+ medium: {
50365
+ padding: numberFromDimension(theme.space.x1) - 1 + "px " + theme.space.x2
50366
+ }
50367
+ }
50368
+ });
50095
50369
  });
50096
50370
  Switch$1.propTypes = {
50097
50371
  children: PropTypes.node,
50098
50372
  selected: PropTypes.bool,
50099
- value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array])
50373
+ value: PropTypes.string
50100
50374
  };
50101
50375
 
50102
50376
  var barStyles = function barStyles(theme) {
@@ -50133,11 +50407,11 @@ var getBarStyles = function getBarStyles(selected, theme) {
50133
50407
  var getBarHoverStyles = function getBarHoverStyles(selected, disabled, theme) {
50134
50408
  if (disabled || selected) {
50135
50409
  return null;
50136
- } else {
50137
- return Object.assign(Object.assign({}, barStyles(theme).expanded), {
50138
- backgroundColor: theme.colors.lightBlue
50139
- });
50140
50410
  }
50411
+
50412
+ return Object.assign(Object.assign({}, barStyles(theme).expanded), {
50413
+ backgroundColor: theme.colors.lightBlue
50414
+ });
50141
50415
  };
50142
50416
 
50143
50417
  var TabButton = styled.button.withConfig({
@@ -50159,8 +50433,11 @@ var TabButton = styled.button.withConfig({
50159
50433
  backgroundColor: "transparent",
50160
50434
  border: "none",
50161
50435
  margin: theme.space.none,
50162
- padding: theme.space.x1 + " " + theme.space.x3,
50163
50436
  position: "relative",
50437
+ paddingTop: theme.space.x1,
50438
+ paddingBottom: theme.space.x1,
50439
+ paddingLeft: theme.space.x3,
50440
+ paddingRight: theme.space.x3,
50164
50441
  "&:focus": {
50165
50442
  outline: "none",
50166
50443
  backgroundColor: theme.colors.lightBlue,
@@ -50175,7 +50452,19 @@ var TabButton = styled.button.withConfig({
50175
50452
  "&:before": Object.assign({}, getBarHoverStyles(selected, disabled, theme))
50176
50453
  }
50177
50454
  };
50178
- });
50455
+ }, variant({
50456
+ prop: "size",
50457
+ variants: {
50458
+ large: {
50459
+ py: "x2",
50460
+ px: "x4"
50461
+ },
50462
+ medium: {
50463
+ py: "x1",
50464
+ px: "x3"
50465
+ }
50466
+ }
50467
+ }));
50179
50468
  var Tab = /*#__PURE__*/React__default.forwardRef(function (_a, ref) {
50180
50469
  var label = _a.label,
50181
50470
  props = __rest(_a, ["label"]);
@@ -50543,7 +50832,9 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
50543
50832
  var _this$props = this.props,
50544
50833
  fitted = _this$props.fitted,
50545
50834
  children = _this$props.children,
50546
- onTabClick = _this$props.onTabClick;
50835
+ onTabClick = _this$props.onTabClick,
50836
+ size = _this$props.size;
50837
+ var componentSize = size !== null && size !== void 0 ? size : this.context.size;
50547
50838
  var selectedIndex = this.getSelectedIndex();
50548
50839
  var tabs = React__default.Children.toArray(children);
50549
50840
  return tabs.filter(function (tab) {
@@ -50570,6 +50861,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
50570
50861
  },
50571
50862
  onKeyDown: handleArrowNavigation,
50572
50863
  index: index,
50864
+ size: componentSize,
50573
50865
  tabIndex: index === focusedIndex ? 0 : -1,
50574
50866
  selected: index === selectedIndex,
50575
50867
  "aria-selected": index === selectedIndex,
@@ -50650,6 +50942,7 @@ var Tabs = /*#__PURE__*/function (_React$Component) {
50650
50942
  return Tabs;
50651
50943
  }(React__default.Component);
50652
50944
 
50945
+ Tabs.contextType = ComponentSizeContext;
50653
50946
  Tabs.defaultProps = {
50654
50947
  children: null,
50655
50948
  className: undefined,
@@ -50698,12 +50991,12 @@ var StyledTextarea = styled.textarea.withConfig({
50698
50991
  })(space, function (_ref) {
50699
50992
  var theme = _ref.theme,
50700
50993
  isResizeable = _ref.isResizeable;
50994
+ _ref.size;
50701
50995
  return {
50702
50996
  display: "block",
50703
50997
  width: "100%",
50704
50998
  border: "1px solid",
50705
50999
  borderRadius: theme.radii.medium,
50706
- padding: subPx(theme.space.x1),
50707
51000
  fontSize: theme.fontSizes.medium,
50708
51001
  lineHeight: theme.lineHeights.base,
50709
51002
  minHeight: theme.space.x5,
@@ -50717,8 +51010,22 @@ var StyledTextarea = styled.textarea.withConfig({
50717
51010
  },
50718
51011
  "::placeholder": {
50719
51012
  color: curriedTransparentize(0.4, theme.colors.black)
50720
- }
51013
+ },
51014
+ padding: "" + subPx(theme.space.x1)
50721
51015
  };
51016
+ }, function (_ref2) {
51017
+ var theme = _ref2.theme;
51018
+ return variant({
51019
+ prop: "size",
51020
+ variants: {
51021
+ large: {
51022
+ padding: "" + subPx(theme.space.x2)
51023
+ },
51024
+ medium: {
51025
+ padding: "" + subPx(theme.space.x1)
51026
+ }
51027
+ }
51028
+ });
50722
51029
  }, function (props) {
50723
51030
  return getTextareaStyle(props);
50724
51031
  });
@@ -50737,8 +51044,10 @@ var Textarea = /*#__PURE__*/forwardRef(function (_a, ref) {
50737
51044
  rows = _a.rows,
50738
51045
  _a$isResizeable = _a.isResizeable,
50739
51046
  isResizeable = _a$isResizeable === void 0 ? true : _a$isResizeable,
50740
- props = __rest(_a, ["errorMessage", "errorList", "error", "required", "labelText", "requirementText", "helpText", "id", "className", "rows", "isResizeable"]);
51047
+ size = _a.size,
51048
+ props = __rest(_a, ["errorMessage", "errorList", "error", "required", "labelText", "requirementText", "helpText", "id", "className", "rows", "isResizeable", "size"]);
50741
51049
 
51050
+ var componentSize = useComponentSize(size);
50742
51051
  var spaceProps = getSubset(props, propTypes.space);
50743
51052
  var restProps = omitSubset(props, propTypes.space);
50744
51053
  return /*#__PURE__*/React__default.createElement(Field, Object.assign({
@@ -50757,7 +51066,8 @@ var Textarea = /*#__PURE__*/forwardRef(function (_a, ref) {
50757
51066
  errorList: errorList,
50758
51067
  error: error,
50759
51068
  rows: rows,
50760
- isResizeable: isResizeable
51069
+ isResizeable: isResizeable,
51070
+ size: componentSize
50761
51071
  }, restProps))), /*#__PURE__*/React__default.createElement(InlineValidation, {
50762
51072
  mt: "x1",
50763
51073
  errorMessage: errorMessage,
@@ -50795,7 +51105,8 @@ var TimeRange = /*#__PURE__*/forwardRef(function (_a, ref) {
50795
51105
  endAriaLabel = _a.endAriaLabel,
50796
51106
  endTimeProps = _a.endTimeProps,
50797
51107
  startTimeProps = _a.startTimeProps,
50798
- props = __rest(_a, ["timeFormat", "onRangeChange", "onStartTimeChange", "onEndTimeChange", "errorMessage", "defaultStartTime", "defaultEndTime", "disableRangeValidation", "labelProps", "minTime", "maxTime", "interval", "startAriaLabel", "endAriaLabel", "endTimeProps", "startTimeProps"]);
51108
+ size = _a.size,
51109
+ props = __rest(_a, ["timeFormat", "onRangeChange", "onStartTimeChange", "onEndTimeChange", "errorMessage", "defaultStartTime", "defaultEndTime", "disableRangeValidation", "labelProps", "minTime", "maxTime", "interval", "startAriaLabel", "endAriaLabel", "endTimeProps", "startTimeProps", "size"]);
50799
51110
 
50800
51111
  var _useState = useState(),
50801
51112
  startTime = _useState[0],
@@ -50811,23 +51122,34 @@ var TimeRange = /*#__PURE__*/forwardRef(function (_a, ref) {
50811
51122
 
50812
51123
  var inputRef1 = useRef();
50813
51124
  var inputRef2 = useRef();
51125
+
51126
+ var _useTranslation = useTranslation(),
51127
+ t = _useTranslation.t;
51128
+
51129
+ var componentSize = useComponentSize(size);
50814
51130
  useImperativeHandle(ref, function () {
50815
51131
  return {
50816
51132
  inputRef1: Object.assign(Object.assign({}, inputRef1), {
50817
51133
  focus: function focus() {
50818
- return inputRef1.current.focus();
51134
+ if (inputRef1.current) {
51135
+ // @ts-ignore
51136
+ inputRef1.current.focus();
51137
+ }
50819
51138
  }
50820
51139
  }),
50821
51140
  inputRef2: Object.assign(Object.assign({}, inputRef2), {
50822
51141
  focus: function focus() {
50823
- return inputRef2.current.focus();
51142
+ if (inputRef2.current) {
51143
+ // @ts-ignore
51144
+ inputRef2.current.focus();
51145
+ }
50824
51146
  }
50825
51147
  })
50826
51148
  };
50827
51149
  });
50828
-
50829
- var _useTranslation = useTranslation(),
50830
- t = _useTranslation.t;
51150
+ useEffect(function () {
51151
+ validateTimeRange();
51152
+ }, [startTime, endTime]);
50831
51153
 
50832
51154
  var changeStartTimeHandler = function changeStartTimeHandler(label, value) {
50833
51155
  setStartTime(value);
@@ -50880,7 +51202,8 @@ var TimeRange = /*#__PURE__*/forwardRef(function (_a, ref) {
50880
51202
  "aria-label": startAriaLabel || t("select a start time"),
50881
51203
  "data-testid": "timerange-start-time",
50882
51204
  ref: inputRef1,
50883
- error: rangeError
51205
+ error: rangeError,
51206
+ size: componentSize
50884
51207
  }, startTimeProps));
50885
51208
  var endInput = /*#__PURE__*/React__default.createElement(TimePicker, Object.assign({
50886
51209
  timeFormat: timeFormat,
@@ -50893,19 +51216,17 @@ var TimeRange = /*#__PURE__*/forwardRef(function (_a, ref) {
50893
51216
  "aria-label": endAriaLabel || t("select an end time"),
50894
51217
  "data-testid": "timerange-end-time",
50895
51218
  ref: inputRef2,
50896
- error: rangeError
51219
+ error: rangeError,
51220
+ size: componentSize
50897
51221
  }, endTimeProps));
50898
- useEffect(function () {
50899
- validateTimeRange();
50900
- }, [startTime, endTime]);
50901
51222
  return /*#__PURE__*/React__default.createElement(RangeContainer, Object.assign({
50902
51223
  labelProps: Object.assign(Object.assign({}, labelProps), {
50903
51224
  labelText: labelProps.labelText === DEFAULT_LABEL ? t("time range") : labelProps.labelText
50904
51225
  }),
50905
51226
  startComponent: startInput,
50906
- selected: endTime,
50907
51227
  endComponent: endInput,
50908
- errorMessages: !disableRangeValidation ? [rangeError, errorMessage] : [errorMessage]
51228
+ errorMessages: !disableRangeValidation ? [rangeError, errorMessage] : [errorMessage],
51229
+ size: componentSize
50909
51230
  }, props));
50910
51231
  });
50911
51232
  TimeRange.defaultProps = {
@@ -51352,13 +51673,15 @@ var BaseToggle = function BaseToggle(_a) {
51352
51673
  helpText = _a.helpText,
51353
51674
  toggled = _a.toggled,
51354
51675
  onClick = _a.onClick,
51676
+ size = _a.size,
51355
51677
  dataTestId = _a["data-testid"],
51356
- props = __rest(_a, ["disabled", "onChange", "onText", "offText", "className", "required", "error", "id", "labelText", "requirementText", "helpText", "toggled", "onClick", "data-testid"]);
51678
+ props = __rest(_a, ["disabled", "onChange", "onText", "offText", "className", "required", "error", "id", "labelText", "requirementText", "helpText", "toggled", "onClick", "size", "data-testid"]);
51357
51679
 
51358
51680
  var handleClick = function handleClick(e) {
51359
51681
  if (onClick) onClick(e);
51360
51682
  };
51361
51683
 
51684
+ var componentSize = useComponentSize(size);
51362
51685
  var spaceProps = getSubset(props, propTypes.space);
51363
51686
  var restProps = omitSubset(props, propTypes.space);
51364
51687
  return /*#__PURE__*/React__default.createElement(Field, Object.assign({
@@ -51371,6 +51694,7 @@ var BaseToggle = function BaseToggle(_a) {
51371
51694
  requirementText: requirementText,
51372
51695
  helpText: helpText
51373
51696
  }, /*#__PURE__*/React__default.createElement(ClickInputLabel, {
51697
+ size: componentSize,
51374
51698
  as: "div",
51375
51699
  onClick: onClick,
51376
51700
  disabled: disabled,