@atlaskit/calendar 13.1.3 → 13.1.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/calendar
2
2
 
3
+ ## 13.1.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 13.1.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`774ed69ecef`](https://bitbucket.org/atlassian/atlassian-frontend/commits/774ed69ecef) - Internal changes to use space tokens for spacing values. There is no visual change.
14
+
3
15
  ## 13.1.3
4
16
 
5
17
  ### Patch Changes
@@ -33,7 +33,7 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
33
33
  var analyticsAttributes = {
34
34
  componentName: 'calendar',
35
35
  packageName: "@atlaskit/calendar",
36
- packageVersion: "13.1.3"
36
+ packageVersion: "13.1.5"
37
37
  };
38
38
  var CalendarWithMode = /*#__PURE__*/(0, _react.forwardRef)(function Calendar(_ref, ref) {
39
39
  var day = _ref.day,
@@ -63,7 +63,7 @@ var Date = /*#__PURE__*/(0, _react.memo)( /*#__PURE__*/(0, _react.forwardRef)(fu
63
63
  return (0, _react2.css)((0, _date.dateCellStyles)(mode));
64
64
  }, [mode]);
65
65
  return (0, _react2.jsx)("button", {
66
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
66
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
67
67
  css: dateCellStyles,
68
68
  "aria-selected": isSelected ? 'true' : 'false',
69
69
  tabIndex: isSelected ? 0 : -1,
@@ -35,7 +35,7 @@ var dateCellStyles = function dateCellStyles() {
35
35
  return {
36
36
  all: 'unset',
37
37
  display: 'block',
38
- padding: '4px 9px',
38
+ padding: "var(--ds-space-050, 4px)".concat(" 9px"),
39
39
  position: 'relative',
40
40
  backgroundColor: 'transparent',
41
41
  border: '2px solid transparent',
@@ -55,9 +55,9 @@ var dateCellStyles = function dateCellStyles() {
55
55
  display: 'block',
56
56
  height: 2,
57
57
  position: 'absolute',
58
- right: 2,
59
- bottom: 2,
60
- left: 2,
58
+ right: "var(--ds-space-025, 2px)",
59
+ bottom: "var(--ds-space-025, 2px)",
60
+ left: "var(--ds-space-025, 2px)",
61
61
  backgroundColor: 'currentColor',
62
62
  content: '""'
63
63
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.3",
3
+ "version": "13.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -23,7 +23,7 @@ import useUniqueId from './internal/hooks/use-unique-id';
23
23
  const analyticsAttributes = {
24
24
  componentName: 'calendar',
25
25
  packageName: "@atlaskit/calendar",
26
- packageVersion: "13.1.3"
26
+ packageVersion: "13.1.5"
27
27
  };
28
28
  const CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar({
29
29
  day,
@@ -48,7 +48,7 @@ const Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date({
48
48
  }, [onClick]);
49
49
  const dateCellStyles = useMemo(() => css(getDateCellStyles(mode)), [mode]);
50
50
  return jsx("button", {
51
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
51
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
52
52
  css: dateCellStyles,
53
53
  "aria-selected": isSelected ? 'true' : 'false',
54
54
  tabIndex: isSelected ? 0 : -1,
@@ -27,7 +27,7 @@ const borderColorFocused = {
27
27
  export const dateCellStyles = (mode = 'light') => ({
28
28
  all: 'unset',
29
29
  display: 'block',
30
- padding: '4px 9px',
30
+ padding: `${"var(--ds-space-050, 4px)"} 9px`,
31
31
  position: 'relative',
32
32
  backgroundColor: 'transparent',
33
33
  border: '2px solid transparent',
@@ -47,9 +47,9 @@ export const dateCellStyles = (mode = 'light') => ({
47
47
  display: 'block',
48
48
  height: 2,
49
49
  position: 'absolute',
50
- right: 2,
51
- bottom: 2,
52
- left: 2,
50
+ right: "var(--ds-space-025, 2px)",
51
+ bottom: "var(--ds-space-025, 2px)",
52
+ left: "var(--ds-space-025, 2px)",
53
53
  backgroundColor: 'currentColor',
54
54
  content: '""'
55
55
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.3",
3
+ "version": "13.1.5",
4
4
  "sideEffects": false
5
5
  }
@@ -27,7 +27,7 @@ import useUniqueId from './internal/hooks/use-unique-id';
27
27
  var analyticsAttributes = {
28
28
  componentName: 'calendar',
29
29
  packageName: "@atlaskit/calendar",
30
- packageVersion: "13.1.3"
30
+ packageVersion: "13.1.5"
31
31
  };
32
32
  var CalendarWithMode = /*#__PURE__*/forwardRef(function Calendar(_ref, ref) {
33
33
  var day = _ref.day,
@@ -55,7 +55,7 @@ var Date = /*#__PURE__*/memo( /*#__PURE__*/forwardRef(function Date(_ref, ref) {
55
55
  return css(getDateCellStyles(mode));
56
56
  }, [mode]);
57
57
  return jsx("button", {
58
- // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
58
+ // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage
59
59
  css: dateCellStyles,
60
60
  "aria-selected": isSelected ? 'true' : 'false',
61
61
  tabIndex: isSelected ? 0 : -1,
@@ -29,7 +29,7 @@ export var dateCellStyles = function dateCellStyles() {
29
29
  return {
30
30
  all: 'unset',
31
31
  display: 'block',
32
- padding: '4px 9px',
32
+ padding: "var(--ds-space-050, 4px)".concat(" 9px"),
33
33
  position: 'relative',
34
34
  backgroundColor: 'transparent',
35
35
  border: '2px solid transparent',
@@ -49,9 +49,9 @@ export var dateCellStyles = function dateCellStyles() {
49
49
  display: 'block',
50
50
  height: 2,
51
51
  position: 'absolute',
52
- right: 2,
53
- bottom: 2,
54
- left: 2,
52
+ right: "var(--ds-space-025, 2px)",
53
+ bottom: "var(--ds-space-025, 2px)",
54
+ left: "var(--ds-space-025, 2px)",
55
55
  backgroundColor: 'currentColor',
56
56
  content: '""'
57
57
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.3",
3
+ "version": "13.1.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/calendar",
3
- "version": "13.1.3",
3
+ "version": "13.1.5",
4
4
  "description": "An interactive calendar for date selection experiences.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -24,7 +24,7 @@
24
24
  "atlaskit:src": "src/index.tsx",
25
25
  "atlassian": {
26
26
  "team": "Design System Team",
27
- "releaseModel": "scheduled",
27
+ "releaseModel": "continuous",
28
28
  "website": {
29
29
  "name": "Calendar",
30
30
  "category": "Components"
@@ -38,7 +38,7 @@
38
38
  "@atlaskit/heading": "^1.3.0",
39
39
  "@atlaskit/icon": "^21.12.0",
40
40
  "@atlaskit/locale": "^2.5.0",
41
- "@atlaskit/primitives": "^0.9.0",
41
+ "@atlaskit/primitives": "^0.10.0",
42
42
  "@atlaskit/theme": "^12.5.0",
43
43
  "@atlaskit/tokens": "^1.5.0",
44
44
  "@atlaskit/visually-hidden": "^1.2.0",
@@ -0,0 +1,92 @@
1
+ ## API Report File for "@atlaskit/calendar"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { CSSProperties } from 'react';
10
+ import { ForwardRefExoticComponent } from 'react';
11
+ import { MemoExoticComponent } from 'react';
12
+ import { RefAttributes } from 'react';
13
+ import { ThemeModes } from '@atlaskit/theme/types';
14
+ import { UIAnalyticsEvent } from '@atlaskit/analytics-next';
15
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
16
+
17
+ // @public (undocumented)
18
+ type ArrowKeys = 'down' | 'left' | 'right' | 'up';
19
+
20
+ // @public
21
+ const Calendar: MemoExoticComponent<ForwardRefExoticComponent<Pick<CalendarProps, "analyticsContext" | "calendarRef" | "className" | "createAnalyticsEvent" | "day" | "defaultDay" | "defaultMonth" | "defaultPreviouslySelected" | "defaultSelected" | "defaultYear" | "disabled" | "disabledDateFilter" | "locale" | "maxDate" | "minDate" | "mode" | "month" | "nextMonthLabel" | "onBlur" | "onChange" | "onFocus" | "onSelect" | "previousMonthLabel" | "previouslySelected" | "selected" | "style" | "tabIndex" | "testId" | "today" | "weekStartDay" | "year"> & RefAttributes<HTMLDivElement>>>;
22
+ export default Calendar;
23
+
24
+ // @public (undocumented)
25
+ export interface CalendarProps extends WithAnalyticsEventsProps {
26
+ analyticsContext?: Record<string, any>;
27
+ // @internal
28
+ calendarRef?: React.Ref<CalendarRef>;
29
+ className?: string;
30
+ day?: number;
31
+ defaultDay?: number;
32
+ defaultMonth?: number;
33
+ defaultPreviouslySelected?: Array<string>;
34
+ defaultSelected?: Array<string>;
35
+ defaultYear?: number;
36
+ disabled?: Array<string>;
37
+ disabledDateFilter?: (date: string) => boolean;
38
+ locale?: string;
39
+ maxDate?: string;
40
+ minDate?: string;
41
+ // @internal
42
+ mode?: ThemeModes;
43
+ month?: number;
44
+ nextMonthLabel?: string;
45
+ onBlur?: React.FocusEventHandler;
46
+ onChange?: (event: ChangeEvent, analyticsEvent: UIAnalyticsEvent) => void;
47
+ onFocus?: React.FocusEventHandler;
48
+ onSelect?: (event: SelectEvent, analyticsEvent: UIAnalyticsEvent) => void;
49
+ previouslySelected?: Array<string>;
50
+ previousMonthLabel?: string;
51
+ selected?: Array<string>;
52
+ style?: CSSProperties;
53
+ tabIndex?: number;
54
+ testId?: string;
55
+ today?: string;
56
+ weekStartDay?: WeekDay;
57
+ year?: number;
58
+ }
59
+
60
+ // @public (undocumented)
61
+ export interface CalendarRef {
62
+ // (undocumented)
63
+ navigate: (type: ArrowKeys) => void;
64
+ }
65
+
66
+ // @public (undocumented)
67
+ export type ChangeEvent = {
68
+ iso: ISODate;
69
+ type: 'down' | 'left' | 'next' | 'prev' | 'right' | 'up';
70
+ } & DateObj;
71
+
72
+ // @public (undocumented)
73
+ type DateObj = {
74
+ day: number;
75
+ month: number;
76
+ year: number;
77
+ };
78
+
79
+ // @public (undocumented)
80
+ type ISODate = string;
81
+
82
+ // @public (undocumented)
83
+ export type SelectEvent = {
84
+ iso: ISODate;
85
+ } & DateObj;
86
+
87
+ // @public (undocumented)
88
+ type WeekDay = 0 | 1 | 2 | 3 | 4 | 5 | 6;
89
+
90
+ // (No @packageDocumentation comment for this package)
91
+
92
+ ```