@spectrum-web-components/coachmark 0.0.0-20241209155954

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 (63) hide show
  1. package/README.md +238 -0
  2. package/package.json +94 -0
  3. package/sp-coach-indicator.d.ts +6 -0
  4. package/sp-coach-indicator.dev.js +5 -0
  5. package/sp-coach-indicator.dev.js.map +7 -0
  6. package/sp-coach-indicator.js +2 -0
  7. package/sp-coach-indicator.js.map +7 -0
  8. package/sp-coachmark.d.ts +6 -0
  9. package/sp-coachmark.dev.js +5 -0
  10. package/sp-coachmark.dev.js.map +7 -0
  11. package/sp-coachmark.js +2 -0
  12. package/sp-coachmark.js.map +7 -0
  13. package/src/CoachIndicator.d.ts +10 -0
  14. package/src/CoachIndicator.dev.js +40 -0
  15. package/src/CoachIndicator.dev.js.map +7 -0
  16. package/src/CoachIndicator.js +6 -0
  17. package/src/CoachIndicator.js.map +7 -0
  18. package/src/Coachmark.d.ts +49 -0
  19. package/src/Coachmark.dev.js +290 -0
  20. package/src/Coachmark.dev.js.map +7 -0
  21. package/src/Coachmark.js +115 -0
  22. package/src/Coachmark.js.map +7 -0
  23. package/src/CoachmarkItem.d.ts +18 -0
  24. package/src/CoachmarkItem.dev.js +7 -0
  25. package/src/CoachmarkItem.dev.js.map +7 -0
  26. package/src/CoachmarkItem.js +2 -0
  27. package/src/CoachmarkItem.js.map +7 -0
  28. package/src/coach-indicator-overrides.css.d.ts +2 -0
  29. package/src/coach-indicator-overrides.css.dev.js +7 -0
  30. package/src/coach-indicator-overrides.css.dev.js.map +7 -0
  31. package/src/coach-indicator-overrides.css.js +4 -0
  32. package/src/coach-indicator-overrides.css.js.map +7 -0
  33. package/src/coach-indicator.css.d.ts +2 -0
  34. package/src/coach-indicator.css.dev.js +7 -0
  35. package/src/coach-indicator.css.dev.js.map +7 -0
  36. package/src/coach-indicator.css.js +4 -0
  37. package/src/coach-indicator.css.js.map +7 -0
  38. package/src/coachmark-overrides.css.d.ts +2 -0
  39. package/src/coachmark-overrides.css.dev.js +7 -0
  40. package/src/coachmark-overrides.css.dev.js.map +7 -0
  41. package/src/coachmark-overrides.css.js +4 -0
  42. package/src/coachmark-overrides.css.js.map +7 -0
  43. package/src/coachmark.css.d.ts +2 -0
  44. package/src/coachmark.css.dev.js +7 -0
  45. package/src/coachmark.css.dev.js.map +7 -0
  46. package/src/coachmark.css.js +4 -0
  47. package/src/coachmark.css.js.map +7 -0
  48. package/src/index.d.ts +3 -0
  49. package/src/index.dev.js +5 -0
  50. package/src/index.dev.js.map +7 -0
  51. package/src/index.js +2 -0
  52. package/src/index.js.map +7 -0
  53. package/src/spectrum-coach-indicator.css.d.ts +2 -0
  54. package/src/spectrum-coach-indicator.css.dev.js +7 -0
  55. package/src/spectrum-coach-indicator.css.dev.js.map +7 -0
  56. package/src/spectrum-coach-indicator.css.js +4 -0
  57. package/src/spectrum-coach-indicator.css.js.map +7 -0
  58. package/src/spectrum-coachmark.css.d.ts +2 -0
  59. package/src/spectrum-coachmark.css.dev.js +7 -0
  60. package/src/spectrum-coachmark.css.dev.js.map +7 -0
  61. package/src/spectrum-coachmark.css.js +4 -0
  62. package/src/spectrum-coachmark.css.js.map +7 -0
  63. package/src/spectrum-config.js +69 -0
package/README.md ADDED
@@ -0,0 +1,238 @@
1
+ ## Description
2
+
3
+ `<sp-coachmark>` is a temporary message that educates users through new or unfamiliar product experiences. They can be chained into a sequence to form a tour.
4
+
5
+ ### Usage
6
+
7
+ [![See it on NPM!](https://img.shields.io/npm/v/@spectrum-web-components/coachmark?style=for-the-badge)](https://www.npmjs.com/package/@spectrum-web-components/coachmark)
8
+ [![How big is this package in your project?](https://img.shields.io/bundlephobia/minzip/@spectrum-web-components/coachmark?style=for-the-badge)](https://bundlephobia.com/result?p=@spectrum-web-components/coachmark)
9
+ [![Try it on webcomponents.dev](https://img.shields.io/badge/Try%20it%20on-webcomponents.dev-green?style=for-the-badge)](https://webcomponents.dev/edit/collection/fO75441E1Q5ZlI0e9pgq/Z611FV1zeF0CLBLVHNFY/src/index.ts)
10
+
11
+ ```
12
+ yarn add @spectrum-web-components/coachmark
13
+ ```
14
+
15
+ Import the side effectful registration of `<sp-coachmark>` via:
16
+
17
+ ```
18
+ import '@spectrum-web-components/coachmark/sp-coachmark.js';
19
+
20
+ ```
21
+
22
+ When looking to leverage the `Coachmark` base class as a type and/or for extension purposes, do so via:
23
+
24
+ ```
25
+ import { Coachmark } from '@spectrum-web-components/coachmark';
26
+ ```
27
+
28
+ ## Example
29
+
30
+ ## Default
31
+
32
+ ```html
33
+ <sp-coachmark open>
34
+ <div slot="title">Coachmark with Text Only</div>
35
+ <div slot="content">
36
+ This is a Coachmark with nothing but text in it. Kind of lonely in here.
37
+ </div>
38
+ </sp-coachmark>
39
+ ```
40
+
41
+ ## Using Action Menu
42
+
43
+ Coach marks can include an `<sp-action-menu>`, which appears at the top right of the coach mark. The `<sp-action-menu>` should only include ways to interact with the coach mark tour as a whole, with options like “Skip tour” or “Restart tour.”
44
+
45
+ ```html
46
+ <sp-coachmark
47
+ open
48
+ current-step="2"
49
+ total-steps="8"
50
+ primary-cta="Next"
51
+ secondary-cta="Previous"
52
+ >
53
+ <div slot="title">Coachmark with Text Only</div>
54
+ <div slot="content">
55
+ This is a Coachmark with nothing but text in it. Kind of lonely in here.
56
+ </div>
57
+ <sp-action-menu
58
+ label="More Actions"
59
+ placement="bottom-end"
60
+ quiet
61
+ slot="actions"
62
+ >
63
+ <sp-menu-item>Skip tour</sp-menu-item>
64
+ <sp-menu-item>Restart tour</sp-menu-item>
65
+ </sp-action-menu>
66
+ </sp-coachmark>
67
+ ```
68
+
69
+ ## User Action Dependent
70
+
71
+ User action-dependent coachmarks are designed to guide users based on their interactions within your application. In such cases, there is no "Next Step" button, as the coachmark progresses when the user takes a specific action. This allows users to learn by doing, rather than simply reading instructions. The coachmark remains until the user performs the required action or takes an alternative route in the tour, such as skipping, restarting, or moving back to a previous step.
72
+
73
+ Inside the `<sp-coachmark>`, add the content and instructions for the coachmark in the `<sp-coachmark>`. You can also define primary and secondary CTA buttons for user interaction.
74
+
75
+ **Event Handling:**
76
+
77
+ The primary and secondary CTA buttons within the coachmark popover can be configured to dispatch events when clicked.
78
+
79
+ ```html-live
80
+ <sp-coachmark
81
+ id="coachmark-action"
82
+ open
83
+ current-step="2"
84
+ total-steps="8"
85
+ primary-cta="Asset added"
86
+ secondary-cta="Previous"
87
+ >
88
+ <div slot="title">Coachmark with user action</div>
89
+ <div slot="content">
90
+ This is a Coachmark with nothing but text in it. Kind of lonely in here.
91
+ </div>
92
+ <sp-action-menu label="More Actions" placement="bottom-end" quiet slot="actions">
93
+ <sp-menu-item>Skip tour</sp-menu-item>
94
+ <sp-menu-item>Restart tour</sp-menu-item>
95
+ </sp-action-menu>
96
+ </sp-coachmark>
97
+ <script type="module">
98
+ const initCoachMark = () => {
99
+ const coachmark = document.querySelector('#coachmark-action');
100
+ coachmark.addEventListener('primary', () => console.log('primary call to action'));
101
+ coachmark.addEventListener('secondary', () => console.log('secondary call to action'));
102
+
103
+ };
104
+ customElements.whenDefined('sp-coachmark').then(() => {
105
+ initCoachMark();
106
+ });
107
+ </script>
108
+ ```
109
+
110
+ <script type="module">
111
+ const initCoachMark = () => {
112
+ const coachmark = document.querySelector('#coachmark-action');
113
+ coachmark.addEventListener('primary', () => console.log('primary call to action'));
114
+ coachmark.addEventListener('secondary', () => console.log('secondary call to action'));
115
+ };
116
+ customElements.whenDefined('sp-coachmark').then(() => {
117
+ initCoachMark();
118
+ });
119
+ </script>
120
+
121
+ ## Using Images, GIFs
122
+
123
+ Coach marks can contain images or videos that relate to their content, such as demonstrations of gestures, the feature being used, or illustrations.
124
+ To use these kinds of media in your rich tooltip, specify a `src`, the type of media, either by using the string or `media-type` object, and
125
+ an optional `imageAlt` text describing the content.
126
+
127
+ Media Types allowed: `Images & Gifs`
128
+
129
+ ### Image
130
+
131
+ ```html
132
+ <sp-coachmark
133
+ current-step="2"
134
+ total-steps="8"
135
+ open
136
+ primary-cta="Next"
137
+ secondary-cta="Previous"
138
+ src="https://picsum.photos/id/237/200/300"
139
+ media-type="image"
140
+ >
141
+ <div slot="title">Coachmark with 16:9 image</div>
142
+ <div slot="content">This is a Coachmark with some description</div>
143
+ <sp-action-menu
144
+ label="More Actions"
145
+ placement="bottom-end"
146
+ quiet
147
+ slot="actions"
148
+ >
149
+ <sp-menu-item>Skip tour</sp-menu-item>
150
+ <sp-menu-item>Restart tour</sp-menu-item>
151
+ </sp-action-menu>
152
+ </sp-coachmark>
153
+ ```
154
+
155
+ ### Custom Image/Gif
156
+
157
+ A custom media can also be added via `<slot name="cover-photo"></slot>`
158
+
159
+ ```html
160
+ <sp-coachmark
161
+ current-step="2"
162
+ total-steps="8"
163
+ open
164
+ primary-cta="Next"
165
+ secondary-cta="Previous"
166
+ >
167
+ <div slot="title">Coachmark with 16:9 image</div>
168
+ <div slot="content">This is a Coachmark with some description</div>
169
+ <img slot="asset" src="https://picsum.photos/id/237/200/300" alt="" />
170
+ <sp-action-menu
171
+ label="More Actions"
172
+ placement="bottom-end"
173
+ quiet
174
+ slot="actions"
175
+ >
176
+ <sp-menu-item>Skip tour</sp-menu-item>
177
+ <sp-menu-item>Restart tour</sp-menu-item>
178
+ </sp-action-menu>
179
+ </sp-coachmark>
180
+ ```
181
+
182
+ ## Shortcut keys and modifier keys
183
+
184
+ Shortcut keys and modifier keys are ways to show users how to trigger a particular tool.
185
+
186
+ The `shortcutKey` is the primary key used to trigger an interaction and are typically an alphanumeric value (and thus will be rendered as an uppercase character), while the
187
+ `modifierKeys` are an array of `string`s that represent alternate keys that can be pressed, like `Shift`, `Alt`, `Cmd`, etc.
188
+
189
+ ```html-live
190
+ <sp-coachmark
191
+ open
192
+ current-step="2"
193
+ total-steps="8"
194
+ primary-cta="Next"
195
+ secondary-cta="Previous"
196
+ id="coachmark-keys"
197
+ >
198
+ <sp-action-menu label="More Actions" placement="bottom-end" quiet slot="actions">
199
+ <sp-menu-item>Skip tour</sp-menu-item>
200
+ <sp-menu-item>Restart tour</sp-menu-item>
201
+ </sp-action-menu>
202
+ </sp-coachmark>
203
+ <script type="module">
204
+ const initCoachMark = () => {
205
+ const coachmark = document.querySelector('#coachmark-keys');
206
+ const modifierKeys = ['⇧ Shift', '⌘'];
207
+ const content = {
208
+ title: 'I am a Coachmark with keys',
209
+ description: 'This is a Coachmark with nothing but text in it.'
210
+ };
211
+ coachmark.content= content
212
+ coachmark.modifierKeys = modifierKeys
213
+ };
214
+ customElements.whenDefined('code-example').then(() => {
215
+ customElements.whenDefined('sp-coachmark').then(() => {
216
+ initCoachMark();
217
+ });
218
+ });
219
+ </script>
220
+ ```
221
+
222
+ <script type="module">
223
+ const initCoachMark = () => {
224
+ const coachmark = document.querySelector('#coachmark-keys');
225
+ const modifierKeys = ['⇧ Shift', '⌘'];
226
+ const content = {
227
+ title: 'I am a Coachmark with keys',
228
+ description: 'This is a Coachmark with nothing but text in it.'
229
+ };
230
+ coachmark.content= content
231
+ coachmark.modifierKeys = modifierKeys
232
+ };
233
+ customElements.whenDefined('code-example').then(() => {
234
+ customElements.whenDefined('sp-coachmark').then(() => {
235
+ initCoachMark();
236
+ });
237
+ });
238
+ </script>
package/package.json ADDED
@@ -0,0 +1,94 @@
1
+ {
2
+ "name": "@spectrum-web-components/coachmark",
3
+ "version": "0.0.0-20241209155954",
4
+ "publishConfig": {
5
+ "access": "public"
6
+ },
7
+ "description": "",
8
+ "license": "Apache-2.0",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "https://github.com/adobe/spectrum-web-components.git",
12
+ "directory": "packages/coachmark"
13
+ },
14
+ "author": "",
15
+ "homepage": "https://opensource.adobe.com/spectrum-web-components/components/coachmark",
16
+ "bugs": {
17
+ "url": "https://github.com/adobe/spectrum-web-components/issues"
18
+ },
19
+ "main": "./src/index.js",
20
+ "module": "./src/index.js",
21
+ "type": "module",
22
+ "exports": {
23
+ ".": {
24
+ "development": "./src/index.dev.js",
25
+ "default": "./src/index.js"
26
+ },
27
+ "./package.json": "./package.json",
28
+ "./src/CoachIndicator.js": {
29
+ "development": "./src/CoachIndicator.dev.js",
30
+ "default": "./src/CoachIndicator.js"
31
+ },
32
+ "./src/Coachmark.js": {
33
+ "development": "./src/Coachmark.dev.js",
34
+ "default": "./src/Coachmark.js"
35
+ },
36
+ "./src/CoachmarkItem.js": {
37
+ "development": "./src/CoachmarkItem.dev.js",
38
+ "default": "./src/CoachmarkItem.js"
39
+ },
40
+ "./src/coach-indicator-overrides.css.js": "./src/coach-indicator-overrides.css.js",
41
+ "./src/coach-indicator.css.js": "./src/coach-indicator.css.js",
42
+ "./src/coachmark-overrides.css.js": "./src/coachmark-overrides.css.js",
43
+ "./src/coachmark.css.js": "./src/coachmark.css.js",
44
+ "./src/index.js": {
45
+ "development": "./src/index.dev.js",
46
+ "default": "./src/index.js"
47
+ },
48
+ "./sp-coachmark.js": {
49
+ "development": "./sp-coachmark.dev.js",
50
+ "default": "./sp-coachmark.js"
51
+ },
52
+ "./sp-coach-indicator.js": {
53
+ "development": "./sp-coach-indicator.dev.js",
54
+ "default": "./sp-coach-indicator.js"
55
+ }
56
+ },
57
+ "scripts": {
58
+ "test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
59
+ },
60
+ "files": [
61
+ "**/*.d.ts",
62
+ "**/*.js",
63
+ "**/*.js.map",
64
+ "custom-elements.json",
65
+ "!stories/",
66
+ "!test/"
67
+ ],
68
+ "keywords": [
69
+ "spectrum css",
70
+ "web components",
71
+ "lit-element",
72
+ "lit-html"
73
+ ],
74
+ "dependencies": {
75
+ "@spectrum-web-components/asset": "0.0.0-20241209155954",
76
+ "@spectrum-web-components/base": "0.0.0-20241209155954",
77
+ "@spectrum-web-components/button": "0.0.0-20241209155954",
78
+ "@spectrum-web-components/button-group": "0.0.0-20241209155954",
79
+ "@spectrum-web-components/icon": "0.0.0-20241209155954",
80
+ "@spectrum-web-components/icons-ui": "0.0.0-20241209155954",
81
+ "@spectrum-web-components/reactive-controllers": "0.0.0-20241209155954",
82
+ "@spectrum-web-components/shared": "0.0.0-20241209155954"
83
+ },
84
+ "devDependencies": {
85
+ "@spectrum-css/coachindicator": "^3.0.0-s2-foundations.16",
86
+ "@spectrum-css/coachmark": "^8.0.0-s2-foundations.17"
87
+ },
88
+ "types": "./src/index.d.ts",
89
+ "customElements": "custom-elements.json",
90
+ "sideEffects": [
91
+ "./sp-*.js",
92
+ "./**/*.dev.js"
93
+ ]
94
+ }
@@ -0,0 +1,6 @@
1
+ import { CoachIndicator } from './src/CoachIndicator.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'sp-coach-indicator': CoachIndicator;
5
+ }
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import { CoachIndicator } from "./src/CoachIndicator.dev.js";
3
+ import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
+ defineElement("sp-coach-indicator", CoachIndicator);
5
+ //# sourceMappingURL=sp-coach-indicator.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-coach-indicator.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { CoachIndicator } from './src/CoachIndicator.dev.js'\n\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\ndefineElement('sp-coach-indicator', CoachIndicator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-coach-indicator': CoachIndicator;\n }\n}\n"],
5
+ "mappings": ";AAWA,SAAS,sBAAsB;AAE/B,SAAS,qBAAqB;AAC9B,cAAc,sBAAsB,cAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{CoachIndicator as a}from"./src/CoachIndicator.js";import{defineElement as o}from"@spectrum-web-components/base/src/define-element.js";o("sp-coach-indicator",a);
2
+ //# sourceMappingURL=sp-coach-indicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-coach-indicator.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { CoachIndicator } from './src/CoachIndicator.js';\n\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\ndefineElement('sp-coach-indicator', CoachIndicator);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-coach-indicator': CoachIndicator;\n }\n}\n"],
5
+ "mappings": "aAWA,OAAS,kBAAAA,MAAsB,0BAE/B,OAAS,iBAAAC,MAAqB,sDAC9BA,EAAc,qBAAsBD,CAAc",
6
+ "names": ["CoachIndicator", "defineElement"]
7
+ }
@@ -0,0 +1,6 @@
1
+ import { Coachmark } from './src/Coachmark.js';
2
+ declare global {
3
+ interface HTMLElementTagNameMap {
4
+ 'sp-coachmark': Coachmark;
5
+ }
6
+ }
@@ -0,0 +1,5 @@
1
+ "use strict";
2
+ import { Coachmark } from "./src/Coachmark.dev.js";
3
+ import { defineElement } from "@spectrum-web-components/base/src/define-element.js";
4
+ defineElement("sp-coachmark", Coachmark);
5
+ //# sourceMappingURL=sp-coachmark.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-coachmark.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Coachmark } from './src/Coachmark.dev.js'\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-coachmark', Coachmark);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-coachmark': Coachmark;\n }\n}\n"],
5
+ "mappings": ";AAWA,SAAS,iBAAiB;AAC1B,SAAS,qBAAqB;AAE9B,cAAc,gBAAgB,SAAS;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";import{Coachmark as a}from"./src/Coachmark.js";import{defineElement as e}from"@spectrum-web-components/base/src/define-element.js";e("sp-coachmark",a);
2
+ //# sourceMappingURL=sp-coachmark.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["sp-coachmark.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2020 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport { Coachmark } from './src/Coachmark.js';\nimport { defineElement } from '@spectrum-web-components/base/src/define-element.js';\n\ndefineElement('sp-coachmark', Coachmark);\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'sp-coachmark': Coachmark;\n }\n}\n"],
5
+ "mappings": "aAWA,OAAS,aAAAA,MAAiB,qBAC1B,OAAS,iBAAAC,MAAqB,sDAE9BA,EAAc,eAAgBD,CAAS",
6
+ "names": ["Coachmark", "defineElement"]
7
+ }
@@ -0,0 +1,10 @@
1
+ import { CSSResultArray, SpectrumElement, TemplateResult } from '@spectrum-web-components/base';
2
+ /**
3
+ * @element sp-coach-indicator
4
+ */
5
+ export declare class CoachIndicator extends SpectrumElement {
6
+ static get styles(): CSSResultArray;
7
+ quiet: boolean;
8
+ staticColor?: 'white' | 'black';
9
+ protected render(): TemplateResult;
10
+ }
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __decorateClass = (decorators, target, key, kind) => {
5
+ var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
6
+ for (var i = decorators.length - 1, decorator; i >= 0; i--)
7
+ if (decorator = decorators[i])
8
+ result = (kind ? decorator(target, key, result) : decorator(result)) || result;
9
+ if (kind && result) __defProp(target, key, result);
10
+ return result;
11
+ };
12
+ import {
13
+ html,
14
+ SpectrumElement
15
+ } from "@spectrum-web-components/base";
16
+ import { property } from "@spectrum-web-components/base/src/decorators.js";
17
+ import styles from "./coach-indicator.css.js";
18
+ export class CoachIndicator extends SpectrumElement {
19
+ constructor() {
20
+ super(...arguments);
21
+ this.quiet = false;
22
+ }
23
+ static get styles() {
24
+ return [styles];
25
+ }
26
+ render() {
27
+ return html`
28
+ <div class="ring"></div>
29
+ <div class="ring"></div>
30
+ <div class="ring"></div>
31
+ `;
32
+ }
33
+ }
34
+ __decorateClass([
35
+ property({ type: Boolean, reflect: true })
36
+ ], CoachIndicator.prototype, "quiet", 2);
37
+ __decorateClass([
38
+ property({ reflect: true, attribute: "static-color" })
39
+ ], CoachIndicator.prototype, "staticColor", 2);
40
+ //# sourceMappingURL=CoachIndicator.dev.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["CoachIndicator.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './coach-indicator.css.js';\n\n/**\n * @element sp-coach-indicator\n */\nexport class CoachIndicator extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white' | 'black';\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"ring\"></div>\n <div class=\"ring\"></div>\n <div class=\"ring\"></div>\n `;\n }\n}\n"],
5
+ "mappings": ";;;;;;;;;;;AAWA;AAAA,EAEI;AAAA,EACA;AAAA,OAEG;AACP,SAAS,gBAAgB;AACzB,OAAO,YAAY;AAKZ,aAAM,uBAAuB,gBAAgB;AAAA,EAA7C;AAAA;AAMH,SAAO,QAAQ;AAAA;AAAA,EALf,WAA2B,SAAyB;AAChD,WAAO,CAAC,MAAM;AAAA,EAClB;AAAA,EAQmB,SAAyB;AACxC,WAAO;AAAA;AAAA;AAAA;AAAA;AAAA,EAKX;AACJ;AAZW;AAAA,EADN,SAAS,EAAE,MAAM,SAAS,SAAS,KAAK,CAAC;AAAA,GALjC,eAMF;AAGA;AAAA,EADN,SAAS,EAAE,SAAS,MAAM,WAAW,eAAe,CAAC;AAAA,GAR7C,eASF;",
6
+ "names": []
7
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";var u=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var c=(l,t,i,r)=>{for(var e=r>1?void 0:r?a(t,i):t,s=l.length-1,o;s>=0;s--)(o=l[s])&&(e=(r?o(t,i,e):o(e))||e);return r&&e&&u(t,i,e),e};import{html as m,SpectrumElement as d}from"@spectrum-web-components/base";import{property as p}from"@spectrum-web-components/base/src/decorators.js";import n from"./coach-indicator.css.js";export class CoachIndicator extends d{constructor(){super(...arguments);this.quiet=!1}static get styles(){return[n]}render(){return m`
2
+ <div class="ring"></div>
3
+ <div class="ring"></div>
4
+ <div class="ring"></div>
5
+ `}}c([p({type:Boolean,reflect:!0})],CoachIndicator.prototype,"quiet",2),c([p({reflect:!0,attribute:"static-color"})],CoachIndicator.prototype,"staticColor",2);
6
+ //# sourceMappingURL=CoachIndicator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["CoachIndicator.ts"],
4
+ "sourcesContent": ["/*\nCopyright 2023 Adobe. All rights reserved.\nThis file is licensed to you under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License. You may obtain a copy\nof the License at http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software distributed under\nthe License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\nOF ANY KIND, either express or implied. See the License for the specific language\ngoverning permissions and limitations under the License.\n*/\nimport {\n CSSResultArray,\n html,\n SpectrumElement,\n TemplateResult,\n} from '@spectrum-web-components/base';\nimport { property } from '@spectrum-web-components/base/src/decorators.js';\nimport styles from './coach-indicator.css.js';\n\n/**\n * @element sp-coach-indicator\n */\nexport class CoachIndicator extends SpectrumElement {\n public static override get styles(): CSSResultArray {\n return [styles];\n }\n\n @property({ type: Boolean, reflect: true })\n public quiet = false;\n\n @property({ reflect: true, attribute: 'static-color' })\n public staticColor?: 'white' | 'black';\n\n protected override render(): TemplateResult {\n return html`\n <div class=\"ring\"></div>\n <div class=\"ring\"></div>\n <div class=\"ring\"></div>\n `;\n }\n}\n"],
5
+ "mappings": "qNAWA,OAEI,QAAAA,EACA,mBAAAC,MAEG,gCACP,OAAS,YAAAC,MAAgB,kDACzB,OAAOC,MAAY,2BAKZ,aAAM,uBAAuBF,CAAgB,CAA7C,kCAMH,KAAO,MAAQ,GALf,WAA2B,QAAyB,CAChD,MAAO,CAACE,CAAM,CAClB,CAQmB,QAAyB,CACxC,OAAOH;AAAA;AAAA;AAAA;AAAA,SAKX,CACJ,CAZWI,EAAA,CADNF,EAAS,CAAE,KAAM,QAAS,QAAS,EAAK,CAAC,GALjC,eAMF,qBAGAE,EAAA,CADNF,EAAS,CAAE,QAAS,GAAM,UAAW,cAAe,CAAC,GAR7C,eASF",
6
+ "names": ["html", "SpectrumElement", "property", "styles", "__decorateClass"]
7
+ }
@@ -0,0 +1,49 @@
1
+ import { CSSResultArray, TemplateResult } from '@spectrum-web-components/base';
2
+ import '@spectrum-web-components/icons-ui/icons/sp-icon-chevron200.js';
3
+ import { Popover } from '@spectrum-web-components/popover';
4
+ import type { Placement } from '@spectrum-web-components/overlay';
5
+ import type { CoachmarkItem } from './CoachmarkItem.js';
6
+ import '@spectrum-web-components/asset/sp-asset.js';
7
+ import '@spectrum-web-components/button/sp-button.js';
8
+ import '@spectrum-web-components/button-group/sp-button-group.js';
9
+ /**
10
+ * @element sp-coachmark
11
+ * @fires primary - Announces that the "primary" button has been clicked.
12
+ * @fires secondary - Announces that the "secondary" button has been clicked.
13
+ * @slot cover-photo - This is the cover photo for Default and Quiet Coachmark
14
+ * @slot heading - HTML content to be listed as the heading
15
+ * @slot description - A description of the card
16
+ * @slot actions - an `sp-action-menu` element outlining actions to take on the represened object
17
+ * @slot step-count - Override the default pagination delivery with your own internationalized content
18
+ */
19
+ export declare class Coachmark extends Popover {
20
+ static get styles(): CSSResultArray;
21
+ item?: CoachmarkItem;
22
+ placement: Placement;
23
+ private content?;
24
+ private shortcutKey?;
25
+ modifierKeys?: string[];
26
+ private source?;
27
+ private mediaType?;
28
+ hasAsset: boolean;
29
+ asset?: 'file' | 'folder';
30
+ currentStep?: number;
31
+ totalSteps?: number;
32
+ primaryCTA?: string;
33
+ secondaryCTA?: string;
34
+ private renderMedia;
35
+ private renderModifier;
36
+ private renderJoiner;
37
+ private renderHeader;
38
+ private renderContent;
39
+ private handlePrimaryCTA;
40
+ private handleSecondaryCTA;
41
+ private renderSecondaryButton;
42
+ private renderPrimaryButton;
43
+ private renderSecondaryButtonMobile;
44
+ private renderPrimaryButtonMobile;
45
+ protected renderButtons(): TemplateResult;
46
+ protected renderSteps: () => TemplateResult;
47
+ protected renderActionMenu: () => TemplateResult;
48
+ protected render(): TemplateResult;
49
+ }