@atlaskit/primitives 6.1.1 → 6.1.2

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,14 @@
1
1
  # @atlaskit/primitives
2
2
 
3
+ ## 6.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#98149](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98149)
8
+ [`45101e24202a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/45101e24202a) -
9
+ Internal change only; update generated styles.
10
+ - Updated dependencies
11
+
3
12
  ## 6.1.1
4
13
 
5
14
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Pressable
3
- description: A pressable is a primitive used for building custom buttons.
3
+ description: A pressable is a primitive for building custom buttons.
4
4
  order: 1
5
5
  ---
6
6
 
@@ -1,13 +1,18 @@
1
1
  ---
2
2
  title: Pressable
3
- description: A pressable is a primitive used for building custom buttons.
3
+ description: A pressable is a primitive for building custom buttons.
4
4
  order: 0
5
5
  ---
6
6
 
7
7
  import PressableDefault from '../../examples/constellation/pressable/default';
8
8
  import PressableBasic from '../../examples/constellation/pressable/basic';
9
9
  import PressableStyled from '../../examples/constellation/pressable/styled';
10
+ import PressableWithoutVisibleLabels from '../../examples/constellation/pressable/without-visible-labels';
10
11
  import PressableDisabled from '../../examples/constellation/pressable/disabled';
12
+ import PressableHtmlAttributes from '../../examples/constellation/pressable/html-attributes';
13
+ import PressablePressTracing from '../../examples/constellation/pressable/press-tracing';
14
+ import PressableAnalytics from '../../examples/constellation/pressable/analytics';
15
+ import PressableAnalyticsGASv3 from '../../examples/constellation/pressable/analytics-gasv3';
11
16
 
12
17
  import { CodeDocsHeader } from '@af/design-system-docs-ui';
13
18
  import SectionMessage from '@atlaskit/section-message';
@@ -18,7 +23,7 @@ import SectionMessage from '@atlaskit/section-message';
18
23
  directoryName="primitives"
19
24
  />
20
25
 
21
- Pressable is a primitive used for building custom buttons with Atlassian Design System styling and built-in event tracking.
26
+ Pressable is a primitive used for building custom buttons with Atlassian Design System styling and built-in event tracking. It renders a `<button>` element.
22
27
 
23
28
  Only use Pressable when existing components such as [Button](/components/button/examples) are unsuitable and unable to be customized to fit your needs.
24
29
 
@@ -33,9 +38,7 @@ Pressable is unstyled by default.
33
38
 
34
39
  ## Basic styling with XCSS
35
40
 
36
- Pressable can be styled using XCSS. Ensure styling indicates the interaction state using `:hover` and `:active` pseudo-classes.
37
-
38
- By default, pressable includes consistent Atlassian Design System `:focus` styles so it's unnecessary to add your own.
41
+ Pressable can be styled using XCSS. Ensure styling indicates the interaction state using `:hover` and `:active` pseudo-classes. Pressable includes consistent Atlassian Design System `:focus` styles, so it's unnecessary to add your own.
39
42
 
40
43
  For more information on XCSS, see the dedicated [XCSS documentation](/components/primitives/xcss).
41
44
 
@@ -44,6 +47,16 @@ For more information on XCSS, see the dedicated [XCSS documentation](/components
44
47
  packageName="@atlaskit/primitives/pressable"
45
48
  />
46
49
 
50
+ ## Advanced styling
51
+
52
+ Use a combination of XCSS and other primitives for more complex designs.
53
+
54
+ <Example
55
+ Component={PressableStyled}
56
+ packageName="@atlaskit/primitives/pressable"
57
+ backgroundColor="white"
58
+ />
59
+
47
60
  ## Disabled
48
61
 
49
62
  Pressable can be disabled using the `isDisabled` prop. Disabled styles should be conditionally applied and defined using XCSS.
@@ -53,12 +66,60 @@ Pressable can be disabled using the `isDisabled` prop. Disabled styles should be
53
66
  packageName="@atlaskit/primitives/pressable"
54
67
  />
55
68
 
56
- ## Advanced styling
69
+ ## Buttons without visible labels
57
70
 
58
- Advanced styling can be achieved using a combination of XCSS and other primitives.
71
+ For buttons without visible labels such as icon buttons, ensure an accessible label is still available by using [the visually hidden component](/components/visually-hidden/examples). This will render hidden text inside the button, which is preferable over the `aria-label` attribute because not all screen readers translate this between languages.
72
+
73
+ Provide a tooltip to help sighted users understand the button's purpose rather than relying on iconography alone.
59
74
 
60
75
  <Example
61
- Component={PressableStyled}
76
+ Component={PressableWithoutVisibleLabels}
62
77
  packageName="@atlaskit/primitives/pressable"
63
78
  backgroundColor="white"
64
79
  />
80
+
81
+ ## HTML attributes
82
+
83
+ Pressable passes through all valid HTML attributes to the underlying `<button>` element. It will default the `type` attribute to `button` to prevent buttons unintentionally submitting forms.
84
+
85
+ <Example
86
+ Component={PressableHtmlAttributes}
87
+ packageName="@atlaskit/primitives/pressable"
88
+ />
89
+
90
+ ## Event tracking
91
+
92
+ Pressable has utilities to make tracking events easier. Events will not be captured unless listeners are setup to handle them.
93
+
94
+ ### React UFO press interactions
95
+
96
+ By default, pressable fires [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions) for available listeners. This helps Atlassian measure performance and reliability. Additional detail can be provided using the `interactionName` prop.
97
+
98
+ <Example
99
+ Component={PressablePressTracing}
100
+ packageName="@atlaskit/primitives/pressable"
101
+ />
102
+
103
+ ### Atlaskit analytics
104
+
105
+ Pressable comes with built-in Atlaskit analytics support using the [Analytics next package](https://atlaskit.atlassian.com/packages/analytics/analytics-next), and fires events for available listeners. Currently this is only available for `onClick`.
106
+
107
+ It always fires events on the `atlaskit` channel. To also fire events on other channels, use the provided `analyticsEvent` in `onClick`. To configure event data, use `componentName` (defaults to 'Pressable') and `analyticsContext` for passing other metadata.
108
+
109
+ See the event data in the console.
110
+
111
+ <Example
112
+ Component={PressableAnalytics}
113
+ packageName="@atlaskit/primitives/pressable"
114
+ />
115
+
116
+ ### GASv3 analytics
117
+
118
+ The Atlassian analytics bridge makes Atlaskit analytics events compatible with GASv3 (Global Analytics Service). This can also inject an `actionSubjectId` to the event if required.
119
+
120
+ See the event data in the console.
121
+
122
+ <Example
123
+ Component={PressableAnalyticsGASv3}
124
+ packageName="@atlaskit/primitives/pressable"
125
+ />
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  title: Pressable
3
- description: A pressable is a primitive used for building custom buttons.
3
+ description: A pressable is a primitive for building custom buttons.
4
4
  order: 2
5
5
  ---
6
6
 
@@ -76,7 +76,7 @@ var Anchor = function Anchor(_ref, ref) {
76
76
  action: 'clicked',
77
77
  componentName: componentName || 'Anchor',
78
78
  packageName: "@atlaskit/primitives",
79
- packageVersion: "6.1.1",
79
+ packageVersion: "6.1.2",
80
80
  analyticsData: analyticsContext,
81
81
  actionSubject: 'link'
82
82
  });
@@ -41,9 +41,7 @@ var focusRingStyles = (0, _xcss.xcss)({
41
41
  /**
42
42
  * __Pressable__
43
43
  *
44
- * @internal Still under development. Do not use.
45
- *
46
- * A Pressable is a primitive component that renders a `<button>`.
44
+ * A primitive for building custom buttons.
47
45
  *
48
46
  * - [Examples](https://atlassian.design/components/primitives/pressable/examples)
49
47
  * - [Code](https://atlassian.design/components/primitives/pressable/code)
@@ -80,7 +78,7 @@ var Pressable = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
80
78
  action: 'clicked',
81
79
  componentName: componentName || 'Pressable',
82
80
  packageName: "@atlaskit/primitives",
83
- packageVersion: "6.1.1",
81
+ packageVersion: "6.1.2",
84
82
  analyticsData: analyticsContext,
85
83
  actionSubject: 'button'
86
84
  });
@@ -497,7 +497,7 @@ var borderRadiusMap = exports.borderRadiusMap = {
497
497
 
498
498
  /**
499
499
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
500
- * @codegen <<SignedSource::2513c025b6da9274090c77a176d31cc1>>
500
+ * @codegen <<SignedSource::01b50b6fc795db50002edbeb24634575>>
501
501
  * @codegenId typography
502
502
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
503
503
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -517,8 +517,11 @@ var fontWeightMap = exports.fontWeightMap = {
517
517
  semibold: "var(--ds-font-weight-semibold, 600)"
518
518
  };
519
519
  var fontFamilyMap = exports.fontFamilyMap = {
520
+ 'font.family.body': "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
520
521
  'font.family.brand.body': "var(--ds-font-family-brand-body, \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
521
- 'font.family.brand.heading': "var(--ds-font-family-brand-heading, \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
522
+ 'font.family.brand.heading': "var(--ds-font-family-brand-heading, \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
523
+ 'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
524
+ 'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
522
525
  };
523
526
 
524
527
  /**
@@ -62,7 +62,7 @@ const Anchor = ({
62
62
  action: 'clicked',
63
63
  componentName: componentName || 'Anchor',
64
64
  packageName: "@atlaskit/primitives",
65
- packageVersion: "6.1.1",
65
+ packageVersion: "6.1.2",
66
66
  analyticsData: analyticsContext,
67
67
  actionSubject: 'link'
68
68
  });
@@ -28,9 +28,7 @@ const focusRingStyles = xcss({
28
28
  /**
29
29
  * __Pressable__
30
30
  *
31
- * @internal Still under development. Do not use.
32
- *
33
- * A Pressable is a primitive component that renders a `<button>`.
31
+ * A primitive for building custom buttons.
34
32
  *
35
33
  * - [Examples](https://atlassian.design/components/primitives/pressable/examples)
36
34
  * - [Code](https://atlassian.design/components/primitives/pressable/code)
@@ -66,7 +64,7 @@ const Pressable = /*#__PURE__*/forwardRef(({
66
64
  action: 'clicked',
67
65
  componentName: componentName || 'Pressable',
68
66
  packageName: "@atlaskit/primitives",
69
- packageVersion: "6.1.1",
67
+ packageVersion: "6.1.2",
70
68
  analyticsData: analyticsContext,
71
69
  actionSubject: 'button'
72
70
  });
@@ -491,7 +491,7 @@ export const borderRadiusMap = {
491
491
 
492
492
  /**
493
493
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
494
- * @codegen <<SignedSource::2513c025b6da9274090c77a176d31cc1>>
494
+ * @codegen <<SignedSource::01b50b6fc795db50002edbeb24634575>>
495
495
  * @codegenId typography
496
496
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
497
497
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -511,8 +511,11 @@ export const fontWeightMap = {
511
511
  semibold: "var(--ds-font-weight-semibold, 600)"
512
512
  };
513
513
  export const fontFamilyMap = {
514
+ 'font.family.body': "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
514
515
  'font.family.brand.body': "var(--ds-font-family-brand-body, \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
515
- 'font.family.brand.heading': "var(--ds-font-family-brand-heading, \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
516
+ 'font.family.brand.heading': "var(--ds-font-family-brand-heading, \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
517
+ 'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
518
+ 'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
516
519
  };
517
520
 
518
521
  /**
@@ -66,7 +66,7 @@ var Anchor = function Anchor(_ref, ref) {
66
66
  action: 'clicked',
67
67
  componentName: componentName || 'Anchor',
68
68
  packageName: "@atlaskit/primitives",
69
- packageVersion: "6.1.1",
69
+ packageVersion: "6.1.2",
70
70
  analyticsData: analyticsContext,
71
71
  actionSubject: 'link'
72
72
  });
@@ -31,9 +31,7 @@ var focusRingStyles = xcss({
31
31
  /**
32
32
  * __Pressable__
33
33
  *
34
- * @internal Still under development. Do not use.
35
- *
36
- * A Pressable is a primitive component that renders a `<button>`.
34
+ * A primitive for building custom buttons.
37
35
  *
38
36
  * - [Examples](https://atlassian.design/components/primitives/pressable/examples)
39
37
  * - [Code](https://atlassian.design/components/primitives/pressable/code)
@@ -70,7 +68,7 @@ var Pressable = /*#__PURE__*/forwardRef(function (_ref, ref) {
70
68
  action: 'clicked',
71
69
  componentName: componentName || 'Pressable',
72
70
  packageName: "@atlaskit/primitives",
73
- packageVersion: "6.1.1",
71
+ packageVersion: "6.1.2",
74
72
  analyticsData: analyticsContext,
75
73
  actionSubject: 'button'
76
74
  });
@@ -491,7 +491,7 @@ export var borderRadiusMap = {
491
491
 
492
492
  /**
493
493
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
494
- * @codegen <<SignedSource::2513c025b6da9274090c77a176d31cc1>>
494
+ * @codegen <<SignedSource::01b50b6fc795db50002edbeb24634575>>
495
495
  * @codegenId typography
496
496
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
497
497
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -511,8 +511,11 @@ export var fontWeightMap = {
511
511
  semibold: "var(--ds-font-weight-semibold, 600)"
512
512
  };
513
513
  export var fontFamilyMap = {
514
+ 'font.family.body': "var(--ds-font-family-body, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
514
515
  'font.family.brand.body': "var(--ds-font-family-brand-body, \"Charlie Text\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
515
- 'font.family.brand.heading': "var(--ds-font-family-brand-heading, \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
516
+ 'font.family.brand.heading': "var(--ds-font-family-brand-heading, \"Charlie Display\", ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
517
+ 'font.family.code': "var(--ds-font-family-code, ui-monospace, Menlo, \"Segoe UI Mono\", \"Ubuntu Mono\", monospace)",
518
+ 'font.family.heading': "var(--ds-font-family-heading, ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
516
519
  };
517
520
 
518
521
  /**
@@ -9,30 +9,26 @@ export type PressableProps = Omit<BoxProps<'button'>, 'disabled' | 'as' | 'child
9
9
  children: ReactNode;
10
10
  isDisabled?: boolean;
11
11
  /**
12
- * Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details.
12
+ * Handler to be called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
13
13
  */
14
14
  onClick?: (e: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void;
15
15
  /**
16
- * An optional name used to identify the interaction type to press listeners. For example, interaction tracing. For more information,
17
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
16
+ * An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
18
17
  */
19
18
  interactionName?: string;
20
19
  /**
21
- * An optional component name used to identify this component to press listeners. This can be used if a parent component's name is preferred. For example, interaction tracing. For more information,
22
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
20
+ * An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Pressable'.
23
21
  */
24
22
  componentName?: string;
25
23
  /**
26
- * Additional information to be included in the `context` of analytics events that come from pressable.
24
+ * Additional information to be included in the `context` of Atlaskit analytics events that come from pressable.
27
25
  */
28
26
  analyticsContext?: Record<string, any>;
29
27
  };
30
28
  /**
31
29
  * __Pressable__
32
30
  *
33
- * @internal Still under development. Do not use.
34
- *
35
- * A Pressable is a primitive component that renders a `<button>`.
31
+ * A primitive for building custom buttons.
36
32
  *
37
33
  * - [Examples](https://atlassian.design/components/primitives/pressable/examples)
38
34
  * - [Code](https://atlassian.design/components/primitives/pressable/code)
@@ -46,21 +42,19 @@ declare const Pressable: React.ForwardRefExoticComponent<Pick<Omit<BoxProps<"but
46
42
  children: ReactNode;
47
43
  isDisabled?: boolean | undefined;
48
44
  /**
49
- * Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details.
45
+ * Handler to be called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
50
46
  */
51
47
  onClick?: ((e: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void) | undefined;
52
48
  /**
53
- * An optional name used to identify the interaction type to press listeners. For example, interaction tracing. For more information,
54
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
49
+ * An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
55
50
  */
56
51
  interactionName?: string | undefined;
57
52
  /**
58
- * An optional component name used to identify this component to press listeners. This can be used if a parent component's name is preferred. For example, interaction tracing. For more information,
59
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
53
+ * An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Pressable'.
60
54
  */
61
55
  componentName?: string | undefined;
62
56
  /**
63
- * Additional information to be included in the `context` of analytics events that come from pressable.
57
+ * Additional information to be included in the `context` of Atlaskit analytics events that come from pressable.
64
58
  */
65
59
  analyticsContext?: Record<string, any> | undefined;
66
60
  }, "padding" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "backgroundColor" | "color" | "translate" | "hidden" | "key" | "value" | "children" | "form" | "slot" | "title" | "name" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof import("./types").BasePrimitiveProps | "isDisabled" | "interactionName" | "componentName" | "analyticsContext"> & React.RefAttributes<HTMLButtonElement>>;
@@ -516,7 +516,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
516
516
  */
517
517
  /**
518
518
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
519
- * @codegen <<SignedSource::2513c025b6da9274090c77a176d31cc1>>
519
+ * @codegen <<SignedSource::01b50b6fc795db50002edbeb24634575>>
520
520
  * @codegenId typography
521
521
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
522
522
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -538,8 +538,11 @@ export declare const fontWeightMap: {
538
538
  };
539
539
  export type FontWeight = keyof typeof fontWeightMap;
540
540
  export declare const fontFamilyMap: {
541
+ 'font.family.body': "var(--ds-font-family-body)";
541
542
  'font.family.brand.body': "var(--ds-font-family-brand-body)";
542
543
  'font.family.brand.heading': "var(--ds-font-family-brand-heading)";
544
+ 'font.family.code': "var(--ds-font-family-code)";
545
+ 'font.family.heading': "var(--ds-font-family-heading)";
543
546
  };
544
547
  export type FontFamily = keyof typeof fontFamilyMap;
545
548
  /**
@@ -9,30 +9,26 @@ export type PressableProps = Omit<BoxProps<'button'>, 'disabled' | 'as' | 'child
9
9
  children: ReactNode;
10
10
  isDisabled?: boolean;
11
11
  /**
12
- * Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details.
12
+ * Handler to be called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
13
13
  */
14
14
  onClick?: (e: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void;
15
15
  /**
16
- * An optional name used to identify the interaction type to press listeners. For example, interaction tracing. For more information,
17
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
16
+ * An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
18
17
  */
19
18
  interactionName?: string;
20
19
  /**
21
- * An optional component name used to identify this component to press listeners. This can be used if a parent component's name is preferred. For example, interaction tracing. For more information,
22
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
20
+ * An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Pressable'.
23
21
  */
24
22
  componentName?: string;
25
23
  /**
26
- * Additional information to be included in the `context` of analytics events that come from pressable.
24
+ * Additional information to be included in the `context` of Atlaskit analytics events that come from pressable.
27
25
  */
28
26
  analyticsContext?: Record<string, any>;
29
27
  };
30
28
  /**
31
29
  * __Pressable__
32
30
  *
33
- * @internal Still under development. Do not use.
34
- *
35
- * A Pressable is a primitive component that renders a `<button>`.
31
+ * A primitive for building custom buttons.
36
32
  *
37
33
  * - [Examples](https://atlassian.design/components/primitives/pressable/examples)
38
34
  * - [Code](https://atlassian.design/components/primitives/pressable/code)
@@ -46,21 +42,19 @@ declare const Pressable: React.ForwardRefExoticComponent<Pick<Omit<BoxProps<"but
46
42
  children: ReactNode;
47
43
  isDisabled?: boolean | undefined;
48
44
  /**
49
- * Handler to be called on click. The second argument can be used to track analytics data. See the tutorial in the analytics-next package for details.
45
+ * Handler to be called on click. The second argument provides an Atlaskit UI analytics event that can be fired to a listening channel. See the ['analytics-next' package](https://atlaskit.atlassian.com/packages/analytics/analytics-next) documentation for more information.
50
46
  */
51
47
  onClick?: ((e: React.MouseEvent<HTMLButtonElement>, analyticsEvent: UIAnalyticsEvent) => void) | undefined;
52
48
  /**
53
- * An optional name used to identify the interaction type to press listeners. For example, interaction tracing. For more information,
54
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
49
+ * An optional name used to identify events for [React UFO (Unified Frontend Observability) press interactions](https://developer.atlassian.com/platform/ufo/react-ufo/react-ufo/getting-started/#quick-start--press-interactions). For more information, see [React UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
55
50
  */
56
51
  interactionName?: string | undefined;
57
52
  /**
58
- * An optional component name used to identify this component to press listeners. This can be used if a parent component's name is preferred. For example, interaction tracing. For more information,
59
- * see [UFO integration into Design System components](https://go.atlassian.com/react-ufo-dst-integration).
53
+ * An optional component name used to identify this component in Atlaskit analytics events. This can be used if a parent component's name is preferred over the default 'Pressable'.
60
54
  */
61
55
  componentName?: string | undefined;
62
56
  /**
63
- * Additional information to be included in the `context` of analytics events that come from pressable.
57
+ * Additional information to be included in the `context` of Atlaskit analytics events that come from pressable.
64
58
  */
65
59
  analyticsContext?: Record<string, any> | undefined;
66
60
  }, "padding" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "backgroundColor" | "color" | "translate" | "hidden" | "key" | "value" | "children" | "form" | "slot" | "title" | "name" | "type" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "contextMenu" | "dir" | "draggable" | "id" | "lang" | "placeholder" | "spellCheck" | "tabIndex" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | keyof import("./types").BasePrimitiveProps | "isDisabled" | "interactionName" | "componentName" | "analyticsContext"> & React.RefAttributes<HTMLButtonElement>>;
@@ -516,7 +516,7 @@ export type BorderRadius = keyof typeof borderRadiusMap;
516
516
  */
517
517
  /**
518
518
  * THIS SECTION WAS CREATED VIA CODEGEN DO NOT MODIFY {@see http://go/af-codegen}
519
- * @codegen <<SignedSource::2513c025b6da9274090c77a176d31cc1>>
519
+ * @codegen <<SignedSource::01b50b6fc795db50002edbeb24634575>>
520
520
  * @codegenId typography
521
521
  * @codegenCommand yarn workspace @atlaskit/primitives codegen-styles
522
522
  * @codegenParams ["fontSize", "fontWeight", "fontFamily", "lineHeight", "body", "ui"]
@@ -538,8 +538,11 @@ export declare const fontWeightMap: {
538
538
  };
539
539
  export type FontWeight = keyof typeof fontWeightMap;
540
540
  export declare const fontFamilyMap: {
541
+ 'font.family.body': "var(--ds-font-family-body)";
541
542
  'font.family.brand.body': "var(--ds-font-family-brand-body)";
542
543
  'font.family.brand.heading': "var(--ds-font-family-brand-heading)";
544
+ 'font.family.code': "var(--ds-font-family-code)";
545
+ 'font.family.heading': "var(--ds-font-family-heading)";
543
546
  };
544
547
  export type FontFamily = keyof typeof fontFamilyMap;
545
548
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/primitives",
3
- "version": "6.1.1",
3
+ "version": "6.1.2",
4
4
  "description": "Primitives are token-backed low-level building blocks.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -128,7 +128,7 @@
128
128
  "@atlaskit/css": "^0.1.0",
129
129
  "@atlaskit/ds-lib": "^2.3.0",
130
130
  "@atlaskit/interaction-context": "^2.1.0",
131
- "@atlaskit/tokens": "^1.45.0",
131
+ "@atlaskit/tokens": "^1.47.0",
132
132
  "@atlaskit/visually-hidden": "^1.3.0",
133
133
  "@babel/runtime": "^7.0.0",
134
134
  "@emotion/react": "^11.7.1",