@carbonplan/components 11.0.6 → 11.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dst/index.esm.js CHANGED
@@ -2897,7 +2897,7 @@ var formatDateElement = function formatDateElement(date, element, option) {
2897
2897
  var format = typeof option === 'string' ? option : defaultOptions[element];
2898
2898
  var result = date.toLocaleString('default', (_date$toLocaleString = {}, _date$toLocaleString[element] = format, _date$toLocaleString));
2899
2899
 
2900
- if (format === 'numeric' && element === 'day') {
2900
+ if (format === 'numeric' && ['day', 'month'].includes(element)) {
2901
2901
  return result.padStart(2, '0');
2902
2902
  } else {
2903
2903
  return result;
@@ -2905,6 +2905,8 @@ var formatDateElement = function formatDateElement(date, element, option) {
2905
2905
  };
2906
2906
 
2907
2907
  var formatDate = function formatDate(date, options) {
2908
+ var _options$separator;
2909
+
2908
2910
  if (options === void 0) {
2909
2911
  options = defaultOptions;
2910
2912
  }
@@ -2913,7 +2915,7 @@ var formatDate = function formatDate(date, options) {
2913
2915
  var month = formatDateElement(d, 'month', options.month);
2914
2916
  var day = formatDateElement(d, 'day', options.day);
2915
2917
  var year = formatDateElement(d, 'year', options.year);
2916
- return [month, day, year].filter(Boolean).join(' ');
2918
+ return [month, day, year].filter(Boolean).join((_options$separator = options.separator) != null ? _options$separator : ' ');
2917
2919
  };
2918
2920
 
2919
2921
  export { Badge, button as Button, callout as Callout, Colorbar, Column, Custom404, Dimmer, Expander, FadeIn, Filter, Footer, Group, Guide, Header, input as Input, Layout, Link$1 as Link, Logo, Menu, Meta, Monogram, Row, Scrollbar, Select, Settings, slider as Slider, Table, Tag, toggle as Toggle, Tracking, Tray, formatDate, getScrollbarWidth };