@spectrum-web-components/contextual-help 1.9.0 → 1.9.1-nightly.20251028221318
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 +183 -0
- package/package.json +78 -78
- package/src/contextual-help-overrides.css.dev.js.map +2 -2
- package/src/contextual-help-overrides.css.js.map +2 -2
- package/src/contextual-help.css.dev.js.map +2 -2
- package/src/contextual-help.css.js.map +2 -2
- package/src/spectrum-contextual-help.css.dev.js.map +2 -2
- package/src/spectrum-contextual-help.css.js.map +2 -2
- package/stories/args.js +88 -0
- package/stories/args.js.map +7 -0
- package/stories/contextual-help.stories.js +53 -0
- package/stories/contextual-help.stories.js.map +7 -0
- package/stories/index.js +25 -0
- package/stories/index.js.map +7 -0
- package/stories/template.js +4 -0
- package/{sp-contextual-help.dev.js.map → stories/template.js.map} +3 -3
- package/test/benchmark/basic-test.js +8 -0
- package/test/benchmark/basic-test.js.map +7 -0
- package/test/contextual-help-memory.test.js +5 -0
- package/{sp-contextual-help.js.map → test/contextual-help-memory.test.js.map} +4 -4
- package/test/contextual-help.test-vrt.js +5 -0
- package/test/contextual-help.test-vrt.js.map +7 -0
- package/test/contextual-help.test.js +108 -0
- package/test/contextual-help.test.js.map +7 -0
- package/custom-elements.json +0 -252
- package/sp-contextual-help.d.ts +0 -17
- package/sp-contextual-help.dev.js +0 -4
- package/sp-contextual-help.js +0 -2
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## 1.9.1-nightly.20251028221318
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies []:
|
|
8
|
+
- @spectrum-web-components/base@1.9.1-nightly.20251028221318
|
|
9
|
+
- @spectrum-web-components/dialog@1.9.1-nightly.20251028221318
|
|
10
|
+
- @spectrum-web-components/action-button@1.9.1-nightly.20251028221318
|
|
11
|
+
- @spectrum-web-components/icons-workflow@1.9.1-nightly.20251028221318
|
|
12
|
+
- @spectrum-web-components/overlay@1.9.1-nightly.20251028221318
|
|
13
|
+
- @spectrum-web-components/popover@1.9.1-nightly.20251028221318
|
|
14
|
+
- @spectrum-web-components/reactive-controllers@1.9.1-nightly.20251028221318
|
|
15
|
+
|
|
16
|
+
## 1.9.0
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- Updated dependencies [[`bdf54c1`](https://github.com/adobe/spectrum-web-components/commit/bdf54c1bc6d3eb20da1a1bf3b40650e6ab1ba399), [`7d23140`](https://github.com/adobe/spectrum-web-components/commit/7d23140c21f0006ddea8a5cf39478ff36acbfbb8)]:
|
|
21
|
+
- @spectrum-web-components/icons-workflow@1.9.0
|
|
22
|
+
- @spectrum-web-components/reactive-controllers@1.9.0
|
|
23
|
+
- @spectrum-web-components/action-button@1.9.0
|
|
24
|
+
- @spectrum-web-components/dialog@1.9.0
|
|
25
|
+
- @spectrum-web-components/overlay@1.9.0
|
|
26
|
+
- @spectrum-web-components/popover@1.9.0
|
|
27
|
+
- @spectrum-web-components/base@1.9.0
|
|
28
|
+
|
|
29
|
+
## 1.8.0
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- [#5690](https://github.com/adobe/spectrum-web-components/pull/5690) [`99ab45e`](https://github.com/adobe/spectrum-web-components/commit/99ab45ea77ae5870b2170c1860c67a70e9a5d66a) Thanks [@5t3ph](https://github.com/5t3ph)! - Fixed a typo in the default `info` variant label from "Informations" to "Information".
|
|
34
|
+
|
|
35
|
+
Additionally, added package dependency for `@spectrum-web-components/reactive-controllers@1.7.0`.
|
|
36
|
+
|
|
37
|
+
- Updated dependencies [[`14486d6`](https://github.com/adobe/spectrum-web-components/commit/14486d620e88976c794225edb54eaca8392015c7), [`ee1bae6`](https://github.com/adobe/spectrum-web-components/commit/ee1bae6f9a7401dc31ebc84e4e27f9d39be692d1), [`14486d6`](https://github.com/adobe/spectrum-web-components/commit/14486d620e88976c794225edb54eaca8392015c7)]:
|
|
38
|
+
- @spectrum-web-components/overlay@1.8.0
|
|
39
|
+
- @spectrum-web-components/popover@1.8.0
|
|
40
|
+
- @spectrum-web-components/action-button@1.8.0
|
|
41
|
+
- @spectrum-web-components/dialog@1.8.0
|
|
42
|
+
- @spectrum-web-components/icons-workflow@1.8.0
|
|
43
|
+
- @spectrum-web-components/base@1.8.0
|
|
44
|
+
- @spectrum-web-components/reactive-controllers@1.8.0
|
|
45
|
+
|
|
46
|
+
## 1.7.0
|
|
47
|
+
|
|
48
|
+
### Patch Changes
|
|
49
|
+
|
|
50
|
+
- Updated dependencies [[`a646ae8`](https://github.com/adobe/spectrum-web-components/commit/a646ae8b0e652308d359226740d2cb189e492e45), [`c1669d2`](https://github.com/adobe/spectrum-web-components/commit/c1669d2dc5e1ceeb84486ce49a428f86a3173caa)]:
|
|
51
|
+
- @spectrum-web-components/overlay@1.7.0
|
|
52
|
+
- @spectrum-web-components/action-button@1.7.0
|
|
53
|
+
- @spectrum-web-components/popover@1.7.0
|
|
54
|
+
- @spectrum-web-components/dialog@1.7.0
|
|
55
|
+
- @spectrum-web-components/icons-workflow@1.7.0
|
|
56
|
+
- @spectrum-web-components/base@1.7.0
|
|
57
|
+
|
|
58
|
+
## 1.6.0
|
|
59
|
+
|
|
60
|
+
### Patch Changes
|
|
61
|
+
|
|
62
|
+
- Updated dependencies [[`03a4439`](https://github.com/adobe/spectrum-web-components/commit/03a443946b760aedc668630f33ac660443ff915e), [`f6cebbd`](https://github.com/adobe/spectrum-web-components/commit/f6cebbd90008a2abb1232c355ae06e8566086093), [`53f3769`](https://github.com/adobe/spectrum-web-components/commit/53f3769f07b6e7853a8a4c0dc63b21fe14cf3d4b)]:
|
|
63
|
+
- @spectrum-web-components/popover@1.6.0
|
|
64
|
+
- @spectrum-web-components/icons-workflow@1.6.0
|
|
65
|
+
- @spectrum-web-components/overlay@1.6.0
|
|
66
|
+
- @spectrum-web-components/dialog@1.6.0
|
|
67
|
+
- @spectrum-web-components/action-button@1.6.0
|
|
68
|
+
- @spectrum-web-components/base@1.6.0
|
|
69
|
+
|
|
70
|
+
## 1.5.0
|
|
71
|
+
|
|
72
|
+
### Patch Changes
|
|
73
|
+
|
|
74
|
+
- Updated dependencies [[`8f8735c`](https://github.com/adobe/spectrum-web-components/commit/8f8735c9ec3eac3b6473424c78257cb46ee17f70), [`6c58f50`](https://github.com/adobe/spectrum-web-components/commit/6c58f50f7b1f5489c11e0d3484e3f4a9d576f1c8)]:
|
|
75
|
+
- @spectrum-web-components/overlay@1.5.0
|
|
76
|
+
- @spectrum-web-components/action-button@1.5.0
|
|
77
|
+
- @spectrum-web-components/dialog@1.5.0
|
|
78
|
+
- @spectrum-web-components/popover@1.5.0
|
|
79
|
+
- @spectrum-web-components/icons-workflow@1.5.0
|
|
80
|
+
- @spectrum-web-components/base@1.5.0
|
|
81
|
+
|
|
82
|
+
## 1.4.0
|
|
83
|
+
|
|
84
|
+
### Minor Changes
|
|
85
|
+
|
|
86
|
+
- [#5140](https://github.com/adobe/spectrum-web-components/pull/5140) [`3cca7ea`](https://github.com/adobe/spectrum-web-components/commit/3cca7eacf127c3fd759953db38a2b5a561bfb8dc) Thanks [@TarunAdobe](https://github.com/TarunAdobe)! - Contextual help now supports a custom maximum width to be set using the `--mod-spectrum-contextual-help-popover-maximum-width` custom property.
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- Updated dependencies [[`72dbe62`](https://github.com/adobe/spectrum-web-components/commit/72dbe629cddfc57171eaaadf7206df47c19d3c98), [`46cd782`](https://github.com/adobe/spectrum-web-components/commit/46cd7828f65491fc08790e5ba0aec412ee89199d), [`70f5f6f`](https://github.com/adobe/spectrum-web-components/commit/70f5f6f3a97b530fb20f9f5ee049e9a8c124b02d)]:
|
|
91
|
+
- @spectrum-web-components/action-button@1.4.0
|
|
92
|
+
- @spectrum-web-components/overlay@1.4.0
|
|
93
|
+
- @spectrum-web-components/popover@1.4.0
|
|
94
|
+
- @spectrum-web-components/dialog@1.4.0
|
|
95
|
+
- @spectrum-web-components/icons-workflow@1.4.0
|
|
96
|
+
- @spectrum-web-components/base@1.4.0
|
|
97
|
+
|
|
98
|
+
## 1.3.0
|
|
99
|
+
|
|
100
|
+
### Patch Changes
|
|
101
|
+
|
|
102
|
+
- Updated dependencies [[`468314f`](https://github.com/adobe/spectrum-web-components/commit/468314f45cf5fedb2e9029da210a5886260abca9)]:
|
|
103
|
+
- @spectrum-web-components/dialog@1.3.0
|
|
104
|
+
- @spectrum-web-components/overlay@1.3.0
|
|
105
|
+
- @spectrum-web-components/popover@1.3.0
|
|
106
|
+
- @spectrum-web-components/action-button@1.3.0
|
|
107
|
+
- @spectrum-web-components/icons-workflow@1.3.0
|
|
108
|
+
- @spectrum-web-components/base@1.3.0
|
|
109
|
+
|
|
110
|
+
All notable changes to this project will be documented in this file.
|
|
111
|
+
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
112
|
+
|
|
113
|
+
# [1.2.0](https://github.com/adobe/spectrum-web-components/compare/v1.1.2...v1.2.0) (2025-02-27)
|
|
114
|
+
|
|
115
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
116
|
+
|
|
117
|
+
## [1.1.2](https://github.com/adobe/spectrum-web-components/compare/v1.1.1...v1.1.2) (2025-02-12)
|
|
118
|
+
|
|
119
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
120
|
+
|
|
121
|
+
## [1.1.1](https://github.com/adobe/spectrum-web-components/compare/v1.1.0...v1.1.1) (2025-01-29)
|
|
122
|
+
|
|
123
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
124
|
+
|
|
125
|
+
# [1.1.0](https://github.com/adobe/spectrum-web-components/compare/v1.0.3...v1.1.0) (2025-01-29)
|
|
126
|
+
|
|
127
|
+
### Bug Fixes
|
|
128
|
+
|
|
129
|
+
- lock prerelease versions for Spectrum CSS ([#5014](https://github.com/adobe/spectrum-web-components/issues/5014)) ([8aa7734](https://github.com/adobe/spectrum-web-components/commit/8aa77342f169b75ecbd1c07a2a1050860b182822))
|
|
130
|
+
|
|
131
|
+
## [1.0.3](https://github.com/adobe/spectrum-web-components/compare/v1.0.1...v1.0.3) (2024-12-09)
|
|
132
|
+
|
|
133
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
134
|
+
|
|
135
|
+
## [1.0.1](https://github.com/adobe/spectrum-web-components/compare/v1.0.0...v1.0.1) (2024-11-11)
|
|
136
|
+
|
|
137
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
138
|
+
|
|
139
|
+
# [1.0.0](https://github.com/adobe/spectrum-web-components/compare/v0.49.0...v1.0.0) (2024-10-31)
|
|
140
|
+
|
|
141
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
142
|
+
|
|
143
|
+
# [0.49.0](https://github.com/adobe/spectrum-web-components/compare/v0.48.1...v0.49.0) (2024-10-15)
|
|
144
|
+
|
|
145
|
+
### Features
|
|
146
|
+
|
|
147
|
+
- add `static-color` to replace `static` ([#4808](https://github.com/adobe/spectrum-web-components/issues/4808)) ([43cf086](https://github.com/adobe/spectrum-web-components/commit/43cf0865d902346568c755650f53410c7788f2a1))
|
|
148
|
+
|
|
149
|
+
## [0.48.1](https://github.com/adobe/spectrum-web-components/compare/v0.48.0...v0.48.1) (2024-10-01)
|
|
150
|
+
|
|
151
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
152
|
+
|
|
153
|
+
# [0.48.0](https://github.com/adobe/spectrum-web-components/compare/v0.47.2...v0.48.0) (2024-09-17)
|
|
154
|
+
|
|
155
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
156
|
+
|
|
157
|
+
## [0.47.2](https://github.com/adobe/spectrum-web-components/compare/v0.47.1...v0.47.2) (2024-09-03)
|
|
158
|
+
|
|
159
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
160
|
+
|
|
161
|
+
## [0.47.1](https://github.com/adobe/spectrum-web-components/compare/v0.47.0...v0.47.1) (2024-08-27)
|
|
162
|
+
|
|
163
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
164
|
+
|
|
165
|
+
# [0.47.0](https://github.com/adobe/spectrum-web-components/compare/v0.46.0...v0.47.0) (2024-08-20)
|
|
166
|
+
|
|
167
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
168
|
+
|
|
169
|
+
# [0.46.0](https://github.com/adobe/spectrum-web-components/compare/v0.45.0...v0.46.0) (2024-08-08)
|
|
170
|
+
|
|
171
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
172
|
+
|
|
173
|
+
# [0.45.0](https://github.com/adobe/spectrum-web-components/compare/v0.44.0...v0.45.0) (2024-07-30)
|
|
174
|
+
|
|
175
|
+
**Note:** Version bump only for package @spectrum-web-components/contextual-help
|
|
176
|
+
|
|
177
|
+
# [0.44.0](https://github.com/adobe/spectrum-web-components/compare/v0.42.4...v0.44.0) (2024-07-15)
|
|
178
|
+
|
|
179
|
+
# [0.43.0](https://github.com/adobe/spectrum-web-components/compare/v0.42.4...v0.43.0) (2024-06-11)
|
|
180
|
+
|
|
181
|
+
### Features
|
|
182
|
+
|
|
183
|
+
- **contextual-help:** add contextual help pattern ([#4285](https://github.com/adobe/spectrum-web-components/issues/4285)) ([a259aa3](https://github.com/adobe/spectrum-web-components/commit/a259aa35ee4e8a7fba7afb21e806f13bffceeaf3))
|
package/package.json
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
"name": "@spectrum-web-components/contextual-help",
|
|
3
|
+
"version": "1.9.1-nightly.20251028221318",
|
|
4
|
+
"description": "Web component implementation of a Spectrum design ContextualHelp",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"author": "Adobe",
|
|
7
|
+
"homepage": "https://adobe.github.io/spectrum-web-components/components/contextual-help",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "https://github.com/adobe/spectrum-web-components.git",
|
|
11
|
+
"directory": "1st-gen/packages/contextual-help"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/adobe/spectrum-web-components/issues"
|
|
15
|
+
},
|
|
16
|
+
"type": "module",
|
|
17
|
+
"exports": {
|
|
18
|
+
".": {
|
|
19
|
+
"default": "./src/index.js",
|
|
20
|
+
"development": "./src/index.dev.js"
|
|
12
21
|
},
|
|
13
|
-
"
|
|
14
|
-
|
|
22
|
+
"./package.json": "./package.json",
|
|
23
|
+
"./sp-contextual-help.js": {
|
|
24
|
+
"default": "./sp-contextual-help.js",
|
|
25
|
+
"development": "./sp-contextual-help.dev.js"
|
|
15
26
|
},
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
"default": "./src/index.js",
|
|
20
|
-
"development": "./src/index.dev.js"
|
|
21
|
-
},
|
|
22
|
-
"./package.json": "./package.json",
|
|
23
|
-
"./sp-contextual-help.js": {
|
|
24
|
-
"default": "./sp-contextual-help.js",
|
|
25
|
-
"development": "./sp-contextual-help.dev.js"
|
|
26
|
-
},
|
|
27
|
-
"./src/ContextualHelp.js": {
|
|
28
|
-
"default": "./src/ContextualHelp.js",
|
|
29
|
-
"development": "./src/ContextualHelp.dev.js"
|
|
30
|
-
},
|
|
31
|
-
"./src/contextual-help-overrides.css.js": "./src/contextual-help-overrides.css.js",
|
|
32
|
-
"./src/contextual-help.css.js": "./src/contextual-help.css.js",
|
|
33
|
-
"./src/index.js": {
|
|
34
|
-
"default": "./src/index.js",
|
|
35
|
-
"development": "./src/index.dev.js"
|
|
36
|
-
}
|
|
27
|
+
"./src/ContextualHelp.js": {
|
|
28
|
+
"default": "./src/ContextualHelp.js",
|
|
29
|
+
"development": "./src/ContextualHelp.dev.js"
|
|
37
30
|
},
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
"
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
"
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
"
|
|
82
|
-
|
|
31
|
+
"./src/contextual-help-overrides.css.js": "./src/contextual-help-overrides.css.js",
|
|
32
|
+
"./src/contextual-help.css.js": "./src/contextual-help.css.js",
|
|
33
|
+
"./src/index.js": {
|
|
34
|
+
"default": "./src/index.js",
|
|
35
|
+
"development": "./src/index.dev.js"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
"main": "./src/index.js",
|
|
39
|
+
"module": "./src/index.js",
|
|
40
|
+
"files": [
|
|
41
|
+
"**/*.d.ts",
|
|
42
|
+
"**/*.js",
|
|
43
|
+
"**/*.js.map",
|
|
44
|
+
"custom-elements.json",
|
|
45
|
+
"!stories/",
|
|
46
|
+
"!test/"
|
|
47
|
+
],
|
|
48
|
+
"scripts": {
|
|
49
|
+
"test": "echo \"Error: run tests from mono-repo root.\" && exit 1"
|
|
50
|
+
},
|
|
51
|
+
"sideEffects": [
|
|
52
|
+
"./sp-*.js",
|
|
53
|
+
"./**/*.dev.js",
|
|
54
|
+
"./**/*.dev.js"
|
|
55
|
+
],
|
|
56
|
+
"types": "./src/index.d.ts",
|
|
57
|
+
"dependencies": {
|
|
58
|
+
"@spectrum-web-components/action-button": "1.9.1-nightly.20251028221318",
|
|
59
|
+
"@spectrum-web-components/base": "1.9.1-nightly.20251028221318",
|
|
60
|
+
"@spectrum-web-components/dialog": "1.9.1-nightly.20251028221318",
|
|
61
|
+
"@spectrum-web-components/icons-workflow": "1.9.1-nightly.20251028221318",
|
|
62
|
+
"@spectrum-web-components/overlay": "1.9.1-nightly.20251028221318",
|
|
63
|
+
"@spectrum-web-components/popover": "1.9.1-nightly.20251028221318",
|
|
64
|
+
"@spectrum-web-components/reactive-controllers": "1.9.1-nightly.20251028221318"
|
|
65
|
+
},
|
|
66
|
+
"keywords": [
|
|
67
|
+
"design-system",
|
|
68
|
+
"spectrum",
|
|
69
|
+
"adobe",
|
|
70
|
+
"adobe-spectrum",
|
|
71
|
+
"web components",
|
|
72
|
+
"web-components",
|
|
73
|
+
"lit-element",
|
|
74
|
+
"lit-html",
|
|
75
|
+
"component",
|
|
76
|
+
"css"
|
|
77
|
+
],
|
|
78
|
+
"publishConfig": {
|
|
79
|
+
"access": "public"
|
|
80
|
+
},
|
|
81
|
+
"customElements": "custom-elements.json"
|
|
82
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["contextual-help-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { css } from '@spectrum-web-components/base';\nconst styles = css`\n \n`;\nexport default styles;"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["contextual-help-overrides.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { css } from '@spectrum-web-components/base';\nconst styles = css`\n \n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "aAAA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["contextual-help.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { css } from '@spectrum-web-components/base';\nconst styles = css`\n .popover{min-inline-size:var(--mod-spectrum-contextual-help-minimum-width,var(--spectrum-contextual-help-minimum-width));padding-block:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));padding-inline:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));font-size:var(--mod-spectrum-contextual-help-body-size,var(--spectrum-contextual-help-body-size));color:var(--highcontrast-contextual-help-body-color,var(--mod-contextual-help-body-color,var(--spectrum-body-color)));max-inline-size:var(--mod-spectrum-contextual-help-popover-maximum-width);position:relative}.popover .body,.popover ::slotted([slot=heading]){margin:0}.popover ::slotted([slot=heading]){font-size:var(--mod-spectrum-contextual-help-heading-size,var(--spectrum-contextual-help-title-size));color:var(--highcontrast-contextual-help-heading-color,var(--mod-contextual-help-heading-color,var(--spectrum-heading-color)));margin-block-end:var(--mod-spectrum-contextual-help-content-spacing,var(--spectrum-contextual-help-content-spacing))}::slotted([slot=link]){margin-block-start:var(--mod-spectrum-contextual-help-link-spacing,var(--spectrum-spacing-300))}@media (forced-colors:active){:host{--highcontrast-contextual-help-heading-color:CanvasText;--highcontrast-contextual-help-body-color:CanvasText}}:host{display:inline-block}::slotted([slot=link]){display:block}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["contextual-help.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { css } from '@spectrum-web-components/base';\nconst styles = css`\n .popover{min-inline-size:var(--mod-spectrum-contextual-help-minimum-width,var(--spectrum-contextual-help-minimum-width));padding-block:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));padding-inline:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));font-size:var(--mod-spectrum-contextual-help-body-size,var(--spectrum-contextual-help-body-size));color:var(--highcontrast-contextual-help-body-color,var(--mod-contextual-help-body-color,var(--spectrum-body-color)));max-inline-size:var(--mod-spectrum-contextual-help-popover-maximum-width);position:relative}.popover .body,.popover ::slotted([slot=heading]){margin:0}.popover ::slotted([slot=heading]){font-size:var(--mod-spectrum-contextual-help-heading-size,var(--spectrum-contextual-help-title-size));color:var(--highcontrast-contextual-help-heading-color,var(--mod-contextual-help-heading-color,var(--spectrum-heading-color)));margin-block-end:var(--mod-spectrum-contextual-help-content-spacing,var(--spectrum-contextual-help-content-spacing))}::slotted([slot=link]){margin-block-start:var(--mod-spectrum-contextual-help-link-spacing,var(--spectrum-spacing-300))}@media (forced-colors:active){:host{--highcontrast-contextual-help-heading-color:CanvasText;--highcontrast-contextual-help-body-color:CanvasText}}:host{display:inline-block}::slotted([slot=link]){display:block}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "aAAA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-contextual-help.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": ";
|
|
4
|
+
"sourcesContent": ["import { css } from '@spectrum-web-components/base';\nconst styles = css`\n .popover{min-inline-size:var(--mod-spectrum-contextual-help-minimum-width,var(--spectrum-contextual-help-minimum-width));padding-block:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));padding-inline:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));font-size:var(--mod-spectrum-contextual-help-body-size,var(--spectrum-contextual-help-body-size));color:var(--highcontrast-contextual-help-body-color,var(--mod-contextual-help-body-color,var(--spectrum-body-color)));max-inline-size:var(--mod-spectrum-contextual-help-popover-maximum-width);position:relative}.popover .body,.popover ::slotted([slot=heading]){margin:0}.popover ::slotted([slot=heading]){font-size:var(--mod-spectrum-contextual-help-heading-size,var(--spectrum-contextual-help-title-size));color:var(--highcontrast-contextual-help-heading-color,var(--mod-contextual-help-heading-color,var(--spectrum-heading-color)));margin-block-end:var(--mod-spectrum-contextual-help-content-spacing,var(--spectrum-contextual-help-content-spacing))}::slotted([slot=link]){margin-block-start:var(--mod-spectrum-contextual-help-link-spacing,var(--spectrum-spacing-300))}@media (forced-colors:active){:host{--highcontrast-contextual-help-heading-color:CanvasText;--highcontrast-contextual-help-body-color:CanvasText}}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,WAAW;AACpB,MAAM,SAAS;AAAA;AAAA;AAGf,eAAe;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["spectrum-contextual-help.css.ts"],
|
|
4
|
-
"sourcesContent": ["
|
|
5
|
-
"mappings": "
|
|
4
|
+
"sourcesContent": ["import { css } from '@spectrum-web-components/base';\nconst styles = css`\n .popover{min-inline-size:var(--mod-spectrum-contextual-help-minimum-width,var(--spectrum-contextual-help-minimum-width));padding-block:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));padding-inline:var(--mod-spectrum-contextual-help-padding,var(--spectrum-spacing-400));font-size:var(--mod-spectrum-contextual-help-body-size,var(--spectrum-contextual-help-body-size));color:var(--highcontrast-contextual-help-body-color,var(--mod-contextual-help-body-color,var(--spectrum-body-color)));max-inline-size:var(--mod-spectrum-contextual-help-popover-maximum-width);position:relative}.popover .body,.popover ::slotted([slot=heading]){margin:0}.popover ::slotted([slot=heading]){font-size:var(--mod-spectrum-contextual-help-heading-size,var(--spectrum-contextual-help-title-size));color:var(--highcontrast-contextual-help-heading-color,var(--mod-contextual-help-heading-color,var(--spectrum-heading-color)));margin-block-end:var(--mod-spectrum-contextual-help-content-spacing,var(--spectrum-contextual-help-content-spacing))}::slotted([slot=link]){margin-block-start:var(--mod-spectrum-contextual-help-link-spacing,var(--spectrum-spacing-300))}@media (forced-colors:active){:host{--highcontrast-contextual-help-heading-color:CanvasText;--highcontrast-contextual-help-body-color:CanvasText}}\n`;\nexport default styles;"],
|
|
5
|
+
"mappings": "aAAA,OAAS,OAAAA,MAAW,gCACpB,MAAMC,EAASD;AAAA;AAAA,EAGf,eAAeC",
|
|
6
6
|
"names": ["css", "styles"]
|
|
7
7
|
}
|
package/stories/args.js
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
export const argTypes = {
|
|
3
|
+
open: {
|
|
4
|
+
name: "open",
|
|
5
|
+
type: { name: "boolean", required: false },
|
|
6
|
+
table: {
|
|
7
|
+
type: { summary: "boolean" },
|
|
8
|
+
defaultValue: { summary: false }
|
|
9
|
+
},
|
|
10
|
+
control: {
|
|
11
|
+
type: "boolean"
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
variant: {
|
|
15
|
+
name: "variant",
|
|
16
|
+
type: { name: "string", required: false },
|
|
17
|
+
table: {
|
|
18
|
+
defaultValue: { summary: "info" }
|
|
19
|
+
},
|
|
20
|
+
control: {
|
|
21
|
+
labels: {
|
|
22
|
+
info: "Info",
|
|
23
|
+
help: "Help"
|
|
24
|
+
},
|
|
25
|
+
type: "select"
|
|
26
|
+
},
|
|
27
|
+
options: ["info", "help"]
|
|
28
|
+
},
|
|
29
|
+
label: {
|
|
30
|
+
name: "label",
|
|
31
|
+
type: { name: "string", required: false },
|
|
32
|
+
table: {
|
|
33
|
+
type: { summary: "label" },
|
|
34
|
+
defaultValue: { summary: "Information" }
|
|
35
|
+
},
|
|
36
|
+
control: "text"
|
|
37
|
+
},
|
|
38
|
+
offset: {
|
|
39
|
+
name: "offset",
|
|
40
|
+
type: { name: "number", required: false },
|
|
41
|
+
table: {
|
|
42
|
+
type: { summary: "offset" },
|
|
43
|
+
defaultValue: { summary: 0 }
|
|
44
|
+
},
|
|
45
|
+
control: "number"
|
|
46
|
+
},
|
|
47
|
+
placement: {
|
|
48
|
+
name: "placement",
|
|
49
|
+
type: { name: "string", required: false },
|
|
50
|
+
description: "The placement of the popover content in relation to the button",
|
|
51
|
+
table: {
|
|
52
|
+
type: { summary: "string" },
|
|
53
|
+
defaultValue: { summary: "bottom-start" }
|
|
54
|
+
},
|
|
55
|
+
control: {
|
|
56
|
+
type: "select",
|
|
57
|
+
labels: {
|
|
58
|
+
top: "top",
|
|
59
|
+
"top-start": "top-start",
|
|
60
|
+
"top-end": "top-end",
|
|
61
|
+
right: "right",
|
|
62
|
+
"right-start": "right-start",
|
|
63
|
+
"right-end": "right-end",
|
|
64
|
+
bottom: "bottom",
|
|
65
|
+
"bottom-start": "bottom-start",
|
|
66
|
+
"bottom-end": "bottom-end",
|
|
67
|
+
left: "left",
|
|
68
|
+
"left-start": "left-start",
|
|
69
|
+
"left-end": "left-end"
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
options: [
|
|
73
|
+
"top",
|
|
74
|
+
"top-start",
|
|
75
|
+
"top-end",
|
|
76
|
+
"right",
|
|
77
|
+
"right-start",
|
|
78
|
+
"right-end",
|
|
79
|
+
"bottom",
|
|
80
|
+
"bottom-start",
|
|
81
|
+
"bottom-end",
|
|
82
|
+
"left",
|
|
83
|
+
"left-start",
|
|
84
|
+
"left-end"
|
|
85
|
+
]
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=args.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["args.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport type { Placement } from '@spectrum-web-components/overlay/src/overlay-types.js';\n\nexport interface StoryArgs {\n label?: string;\n variant?: 'info' | 'help';\n placement?: Placement;\n open?: boolean;\n [key: string]: unknown;\n}\n\nexport const argTypes = {\n open: {\n name: 'open',\n type: { name: 'boolean', required: false },\n table: {\n type: { summary: 'boolean' },\n defaultValue: { summary: false },\n },\n control: {\n type: 'boolean',\n },\n },\n variant: {\n name: 'variant',\n type: { name: 'string', required: false },\n table: {\n defaultValue: { summary: 'info' },\n },\n control: {\n labels: {\n info: 'Info',\n help: 'Help',\n },\n type: 'select',\n },\n options: ['info', 'help'],\n },\n label: {\n name: 'label',\n type: { name: 'string', required: false },\n table: {\n type: { summary: 'label' },\n defaultValue: { summary: 'Information' },\n },\n control: 'text',\n },\n offset: {\n name: 'offset',\n type: { name: 'number', required: false },\n table: {\n type: { summary: 'offset' },\n defaultValue: { summary: 0 },\n },\n control: 'number',\n },\n placement: {\n name: 'placement',\n type: { name: 'string', required: false },\n description:\n 'The placement of the popover content in relation to the button',\n table: {\n type: { summary: 'string' },\n defaultValue: { summary: 'bottom-start' },\n },\n control: {\n type: 'select',\n labels: {\n top: 'top',\n 'top-start': 'top-start',\n 'top-end': 'top-end',\n right: 'right',\n 'right-start': 'right-start',\n 'right-end': 'right-end',\n bottom: 'bottom',\n 'bottom-start': 'bottom-start',\n 'bottom-end': 'bottom-end',\n left: 'left',\n 'left-start': 'left-start',\n 'left-end': 'left-end',\n },\n },\n options: [\n 'top',\n 'top-start',\n 'top-end',\n 'right',\n 'right-start',\n 'right-end',\n 'bottom',\n 'bottom-start',\n 'bottom-end',\n 'left',\n 'left-start',\n 'left-end',\n ],\n },\n};\n"],
|
|
5
|
+
"mappings": ";AAqBO,aAAM,WAAW;AAAA,EACpB,MAAM;AAAA,IACF,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,WAAW,UAAU,MAAM;AAAA,IACzC,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,UAAU;AAAA,MAC3B,cAAc,EAAE,SAAS,MAAM;AAAA,IACnC;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,IACV;AAAA,EACJ;AAAA,EACA,SAAS;AAAA,IACL,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,OAAO;AAAA,MACH,cAAc,EAAE,SAAS,OAAO;AAAA,IACpC;AAAA,IACA,SAAS;AAAA,MACL,QAAQ;AAAA,QACJ,MAAM;AAAA,QACN,MAAM;AAAA,MACV;AAAA,MACA,MAAM;AAAA,IACV;AAAA,IACA,SAAS,CAAC,QAAQ,MAAM;AAAA,EAC5B;AAAA,EACA,OAAO;AAAA,IACH,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,QAAQ;AAAA,MACzB,cAAc,EAAE,SAAS,cAAc;AAAA,IAC3C;AAAA,IACA,SAAS;AAAA,EACb;AAAA,EACA,QAAQ;AAAA,IACJ,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,SAAS;AAAA,MAC1B,cAAc,EAAE,SAAS,EAAE;AAAA,IAC/B;AAAA,IACA,SAAS;AAAA,EACb;AAAA,EACA,WAAW;AAAA,IACP,MAAM;AAAA,IACN,MAAM,EAAE,MAAM,UAAU,UAAU,MAAM;AAAA,IACxC,aACI;AAAA,IACJ,OAAO;AAAA,MACH,MAAM,EAAE,SAAS,SAAS;AAAA,MAC1B,cAAc,EAAE,SAAS,eAAe;AAAA,IAC5C;AAAA,IACA,SAAS;AAAA,MACL,MAAM;AAAA,MACN,QAAQ;AAAA,QACJ,KAAK;AAAA,QACL,aAAa;AAAA,QACb,WAAW;AAAA,QACX,OAAO;AAAA,QACP,eAAe;AAAA,QACf,aAAa;AAAA,QACb,QAAQ;AAAA,QACR,gBAAgB;AAAA,QAChB,cAAc;AAAA,QACd,MAAM;AAAA,QACN,cAAc;AAAA,QACd,YAAY;AAAA,MAChB;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACJ;AAAA,EACJ;AACJ;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { html } from "@spectrum-web-components/base";
|
|
3
|
+
import { argTypes } from "./args.js";
|
|
4
|
+
import { Template } from "./template.js";
|
|
5
|
+
import { spreadProps } from "../../../test/lit-helpers.js";
|
|
6
|
+
export default {
|
|
7
|
+
title: "Contextual Help",
|
|
8
|
+
component: "sp-contextual-help",
|
|
9
|
+
args: {
|
|
10
|
+
label: "",
|
|
11
|
+
variant: "info",
|
|
12
|
+
placement: void 0
|
|
13
|
+
},
|
|
14
|
+
argTypes
|
|
15
|
+
};
|
|
16
|
+
export const Default = (args) => Template(args);
|
|
17
|
+
Default.args = {
|
|
18
|
+
open: true
|
|
19
|
+
};
|
|
20
|
+
export const Help = (args) => Template(args);
|
|
21
|
+
Help.args = {
|
|
22
|
+
variant: "help",
|
|
23
|
+
open: true
|
|
24
|
+
};
|
|
25
|
+
export const CustomPlacement = (args) => {
|
|
26
|
+
return html`
|
|
27
|
+
<div
|
|
28
|
+
style="width: 100%; height: 500px; display: flex; align-items: center; justify-content: center"
|
|
29
|
+
>
|
|
30
|
+
${Template(args)}
|
|
31
|
+
</div>
|
|
32
|
+
`;
|
|
33
|
+
};
|
|
34
|
+
CustomPlacement.args = {
|
|
35
|
+
placement: "top",
|
|
36
|
+
open: true
|
|
37
|
+
};
|
|
38
|
+
export const customMaxWidth = (args) => {
|
|
39
|
+
return html`
|
|
40
|
+
<sp-contextual-help
|
|
41
|
+
${spreadProps(args || {})}
|
|
42
|
+
style="--mod-spectrum-contextual-help-popover-maximum-width: 200px;"
|
|
43
|
+
>
|
|
44
|
+
<h2 slot="heading">Custom max width</h2>
|
|
45
|
+
This is a test of the contextual help component with a custom max
|
|
46
|
+
width of 200px.
|
|
47
|
+
</sp-contextual-help>
|
|
48
|
+
`;
|
|
49
|
+
};
|
|
50
|
+
customMaxWidth.args = {
|
|
51
|
+
open: true
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=contextual-help.stories.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["contextual-help.stories.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { argTypes, StoryArgs } from './args.js';\nimport { Template } from './template.js';\nimport { spreadProps } from '../../../test/lit-helpers.js';\n\nexport default {\n title: 'Contextual Help',\n component: 'sp-contextual-help',\n args: {\n label: '',\n variant: 'info',\n placement: undefined,\n },\n argTypes,\n};\n\nexport const Default = (args?: StoryArgs): TemplateResult => Template(args);\nDefault.args = {\n open: true,\n};\n\nexport const Help = (args?: StoryArgs): TemplateResult => Template(args);\nHelp.args = {\n variant: 'help',\n open: true,\n};\n\nexport const CustomPlacement = (args?: StoryArgs): TemplateResult => {\n return html`\n <div\n style=\"width: 100%; height: 500px; display: flex; align-items: center; justify-content: center\"\n >\n ${Template(args)}\n </div>\n `;\n};\n\nCustomPlacement.args = {\n placement: 'top',\n open: true,\n};\n\nexport const customMaxWidth = (args?: StoryArgs): TemplateResult => {\n return html`\n <sp-contextual-help\n ${spreadProps(args || {})}\n style=\"--mod-spectrum-contextual-help-popover-maximum-width: 200px;\"\n >\n <h2 slot=\"heading\">Custom max width</h2>\n This is a test of the contextual help component with a custom max\n width of 200px.\n </sp-contextual-help>\n `;\n};\n\ncustomMaxWidth.args = {\n open: true,\n};\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,YAA4B;AACrC,SAAS,gBAA2B;AACpC,SAAS,gBAAgB;AACzB,SAAS,mBAAmB;AAE5B,eAAe;AAAA,EACX,OAAO;AAAA,EACP,WAAW;AAAA,EACX,MAAM;AAAA,IACF,OAAO;AAAA,IACP,SAAS;AAAA,IACT,WAAW;AAAA,EACf;AAAA,EACA;AACJ;AAEO,aAAM,UAAU,CAAC,SAAqC,SAAS,IAAI;AAC1E,QAAQ,OAAO;AAAA,EACX,MAAM;AACV;AAEO,aAAM,OAAO,CAAC,SAAqC,SAAS,IAAI;AACvE,KAAK,OAAO;AAAA,EACR,SAAS;AAAA,EACT,MAAM;AACV;AAEO,aAAM,kBAAkB,CAAC,SAAqC;AACjE,SAAO;AAAA;AAAA;AAAA;AAAA,cAIG,SAAS,IAAI,CAAC;AAAA;AAAA;AAG5B;AAEA,gBAAgB,OAAO;AAAA,EACnB,WAAW;AAAA,EACX,MAAM;AACV;AAEO,aAAM,iBAAiB,CAAC,SAAqC;AAChE,SAAO;AAAA;AAAA,cAEG,YAAY,QAAQ,CAAC,CAAC,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQrC;AAEA,eAAe,OAAO;AAAA,EAClB,MAAM;AACV;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/stories/index.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { html } from "@spectrum-web-components/base";
|
|
3
|
+
import { ifDefined } from "@spectrum-web-components/base/src/directives.js";
|
|
4
|
+
import { spreadProps } from "../../../test/lit-helpers.js";
|
|
5
|
+
import "@spectrum-web-components/link/sp-link.js";
|
|
6
|
+
import "../sp-contextual-help.js";
|
|
7
|
+
export const ContextualHelpMarkup = (args = {}) => {
|
|
8
|
+
return html`
|
|
9
|
+
<sp-contextual-help
|
|
10
|
+
${spreadProps(args)}
|
|
11
|
+
placement=${ifDefined(args.placement)}
|
|
12
|
+
>
|
|
13
|
+
<h2 slot="heading">Permission required</h2>
|
|
14
|
+
Your admin must grant you permission before you can create a
|
|
15
|
+
segment.
|
|
16
|
+
<sp-link
|
|
17
|
+
slot="link"
|
|
18
|
+
href="https://opensource.adobe.com/spectrum-web-components/"
|
|
19
|
+
>
|
|
20
|
+
Request permission
|
|
21
|
+
</sp-link>
|
|
22
|
+
</sp-contextual-help>
|
|
23
|
+
`;
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["index.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { html, TemplateResult } from '@spectrum-web-components/base';\nimport { ifDefined } from '@spectrum-web-components/base/src/directives.js';\nimport { spreadProps } from '../../../test/lit-helpers.js';\nimport { StoryArgs } from './args.js';\nimport '@spectrum-web-components/link/sp-link.js';\nimport '../sp-contextual-help.js';\n\nexport const ContextualHelpMarkup = (args: StoryArgs = {}): TemplateResult => {\n return html`\n <sp-contextual-help\n ${spreadProps(args)}\n placement=${ifDefined(args.placement)}\n >\n <h2 slot=\"heading\">Permission required</h2>\n Your admin must grant you permission before you can create a\n segment.\n <sp-link\n slot=\"link\"\n href=\"https://opensource.adobe.com/spectrum-web-components/\"\n >\n Request permission\n </sp-link>\n </sp-contextual-help>\n `;\n};\n"],
|
|
5
|
+
"mappings": ";AAWA,SAAS,YAA4B;AACrC,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB;AAE5B,OAAO;AACP,OAAO;AAEA,aAAM,uBAAuB,CAAC,OAAkB,CAAC,MAAsB;AAC1E,SAAO;AAAA;AAAA,cAEG,YAAY,IAAI,CAAC;AAAA,wBACP,UAAU,KAAK,SAAS,CAAC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAajD;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {
|
|
5
|
-
"mappings": ";
|
|
3
|
+
"sources": ["template.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { ContextualHelpMarkup } from './';\n\nexport const Template = ContextualHelpMarkup;\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,4BAA4B;AAE9B,aAAM,WAAW;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import "@spectrum-web-components/contextual-help/sp-contextual-help.js";
|
|
3
|
+
import { html } from "@spectrum-web-components/base";
|
|
4
|
+
import { measureFixtureCreation } from "../../../../test/benchmark/helpers.js";
|
|
5
|
+
measureFixtureCreation(html`
|
|
6
|
+
<sp-contextual-help></sp-contextual-help>
|
|
7
|
+
`);
|
|
8
|
+
//# sourceMappingURL=basic-test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["basic-test.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport '@spectrum-web-components/contextual-help/sp-contextual-help.js';\nimport { html } from '@spectrum-web-components/base';\nimport { measureFixtureCreation } from '../../../../test/benchmark/helpers.js';\n\nmeasureFixtureCreation(html`\n <sp-contextual-help></sp-contextual-help>\n`);\n"],
|
|
5
|
+
"mappings": ";AAWA,OAAO;AACP,SAAS,YAAY;AACrB,SAAS,8BAA8B;AAEvC,uBAAuB;AAAA;AAAA,CAEtB;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["
|
|
4
|
-
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport {
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": [
|
|
3
|
+
"sources": ["contextual-help-memory.test.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { Default } from '../stories/contextual-help.stories.js';\nimport { testForMemoryLeaks } from '../../../test/testing-helpers.js';\n\ntestForMemoryLeaks(Default());\n"],
|
|
5
|
+
"mappings": ";AAYA,SAAS,eAAe;AACxB,SAAS,0BAA0B;AAEnC,mBAAmB,QAAQ,CAAC;",
|
|
6
|
+
"names": []
|
|
7
7
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["contextual-help.test-vrt.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport * as stories from '../stories/contextual-help.stories.js';\nimport { regressVisuals } from '../../../test/visual/test.js';\nimport type { TestsType } from '../../../test/visual/test.js';\n\nregressVisuals('ContextualHelpStories', stories as unknown as TestsType);\n"],
|
|
5
|
+
"mappings": ";AAYA,YAAY,aAAa;AACzB,SAAS,sBAAsB;AAG/B,eAAe,yBAAyB,OAA+B;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
import { elementUpdated, expect, fixture, oneEvent } from "@open-wc/testing";
|
|
3
|
+
import { nextFrame } from "@spectrum-web-components/overlay/src/AbstractOverlay.js";
|
|
4
|
+
import { sendKeys } from "@web/test-runner-commands";
|
|
5
|
+
import { testForLitDevWarnings } from "../../../test/testing-helpers.js";
|
|
6
|
+
import { DEFAULT_ARIA_LABELS } from "../src/ContextualHelp.js";
|
|
7
|
+
import { ContextualHelpMarkup } from "../stories";
|
|
8
|
+
import { render } from "lit";
|
|
9
|
+
describe("ContextualHelp", () => {
|
|
10
|
+
testForLitDevWarnings(
|
|
11
|
+
async () => await fixture(ContextualHelpMarkup())
|
|
12
|
+
);
|
|
13
|
+
it("loads default contextual-help accessibly", async () => {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
16
|
+
await elementUpdated(el);
|
|
17
|
+
await expect(el).to.be.accessible();
|
|
18
|
+
const button = (_b = (_a = document.querySelector("sp-contextual-help")) == null ? void 0 : _a.shadowRoot) == null ? void 0 : _b.querySelector("sp-action-button");
|
|
19
|
+
expect(button).to.have.attribute(
|
|
20
|
+
"aria-label",
|
|
21
|
+
DEFAULT_ARIA_LABELS.info
|
|
22
|
+
);
|
|
23
|
+
el.variant = "help";
|
|
24
|
+
await elementUpdated(el);
|
|
25
|
+
expect(button).to.have.attribute(
|
|
26
|
+
"aria-label",
|
|
27
|
+
DEFAULT_ARIA_LABELS.help
|
|
28
|
+
);
|
|
29
|
+
});
|
|
30
|
+
it("is a popover on web", async () => {
|
|
31
|
+
var _a, _b, _c, _d, _e;
|
|
32
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
33
|
+
await elementUpdated(el);
|
|
34
|
+
const trigger = (_a = el.shadowRoot) == null ? void 0 : _a.querySelector("#trigger");
|
|
35
|
+
let popover = (_b = el.shadowRoot) == null ? void 0 : _b.querySelector("sp-popover");
|
|
36
|
+
expect(popover).not.to.exist;
|
|
37
|
+
const opened = oneEvent(el, "sp-opened");
|
|
38
|
+
trigger.click();
|
|
39
|
+
await opened;
|
|
40
|
+
popover = (_c = el.shadowRoot) == null ? void 0 : _c.querySelector("sp-popover");
|
|
41
|
+
expect(popover).to.exist;
|
|
42
|
+
const headingSlot = popover == null ? void 0 : popover.querySelector(
|
|
43
|
+
'slot[name="heading"]'
|
|
44
|
+
);
|
|
45
|
+
const heading = headingSlot.assignedElements()[0].textContent;
|
|
46
|
+
expect(heading).to.equal("Permission required");
|
|
47
|
+
const closed = oneEvent(el, "sp-closed");
|
|
48
|
+
await sendKeys({ press: "Escape" });
|
|
49
|
+
await closed;
|
|
50
|
+
await nextFrame();
|
|
51
|
+
await nextFrame();
|
|
52
|
+
popover = (_d = el.shadowRoot) == null ? void 0 : _d.querySelector("sp-popover");
|
|
53
|
+
expect((_e = el.shadowRoot) == null ? void 0 : _e.querySelector("sp-popover")).not.to.exist;
|
|
54
|
+
});
|
|
55
|
+
it("returns the label if set", async () => {
|
|
56
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
57
|
+
el.label = "Custom Label";
|
|
58
|
+
expect(el.buttonAriaLabel).to.equal("Custom Label");
|
|
59
|
+
});
|
|
60
|
+
it(`returns ${DEFAULT_ARIA_LABELS.help} if variant is "help" and label is not set`, async () => {
|
|
61
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
62
|
+
el.variant = "help";
|
|
63
|
+
expect(el.buttonAriaLabel).to.equal(DEFAULT_ARIA_LABELS.help);
|
|
64
|
+
});
|
|
65
|
+
it(`returns ${DEFAULT_ARIA_LABELS.info} if variant is not "help" and label is not set`, async () => {
|
|
66
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
67
|
+
expect(el.buttonAriaLabel).to.equal(DEFAULT_ARIA_LABELS.info);
|
|
68
|
+
});
|
|
69
|
+
it("renders correctly when actualPlacement is undefined", async () => {
|
|
70
|
+
var _a, _b;
|
|
71
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
72
|
+
el.isMobile.matches = true;
|
|
73
|
+
await elementUpdated(el);
|
|
74
|
+
const trigger = (_a = el.shadowRoot) == null ? void 0 : _a.querySelector("#trigger");
|
|
75
|
+
expect(trigger).to.exist;
|
|
76
|
+
expect(trigger).to.have.attribute(
|
|
77
|
+
"aria-label",
|
|
78
|
+
DEFAULT_ARIA_LABELS.info
|
|
79
|
+
);
|
|
80
|
+
const overlay = (_b = el.shadowRoot) == null ? void 0 : _b.querySelector(
|
|
81
|
+
"sp-overlay"
|
|
82
|
+
);
|
|
83
|
+
expect(overlay).to.exist;
|
|
84
|
+
expect(overlay).to.have.attribute("trigger", "trigger@click");
|
|
85
|
+
expect(overlay).to.have.attribute("receives-focus", "true");
|
|
86
|
+
expect(overlay).to.have.property("offset", el.offset);
|
|
87
|
+
expect(overlay).to.have.property("open", el.open);
|
|
88
|
+
});
|
|
89
|
+
it("renders dialog content when isMobile.matches is true", async () => {
|
|
90
|
+
const el = await fixture(ContextualHelpMarkup());
|
|
91
|
+
el.isMobile.matches = true;
|
|
92
|
+
await elementUpdated(el);
|
|
93
|
+
const template = el["renderOverlayContent"]();
|
|
94
|
+
const container = document.createElement("div");
|
|
95
|
+
render(template, container);
|
|
96
|
+
const dialogBase = container.querySelector("sp-dialog-base");
|
|
97
|
+
const dialog = container.querySelector("sp-dialog");
|
|
98
|
+
const headingSlot = container.querySelector('slot[name="heading"]');
|
|
99
|
+
const linkSlot = container.querySelector('slot[name="link"]');
|
|
100
|
+
expect(dialogBase).to.exist;
|
|
101
|
+
expect(dialog).to.exist;
|
|
102
|
+
expect(dialog).to.have.attribute("dismissable");
|
|
103
|
+
expect(dialog).to.have.attribute("size", "s");
|
|
104
|
+
expect(headingSlot).to.exist;
|
|
105
|
+
expect(linkSlot).to.exist;
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
//# sourceMappingURL=contextual-help.test.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["contextual-help.test.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * Copyright 2025 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { elementUpdated, expect, fixture, oneEvent } from '@open-wc/testing';\nimport { nextFrame } from '@spectrum-web-components/overlay/src/AbstractOverlay.js';\nimport { sendKeys } from '@web/test-runner-commands';\nimport { testForLitDevWarnings } from '../../../test/testing-helpers.js';\nimport { ContextualHelp, DEFAULT_ARIA_LABELS } from '../src/ContextualHelp.js';\nimport { ContextualHelpMarkup } from '../stories';\nimport { render, TemplateResult } from 'lit';\n\ndescribe('ContextualHelp', () => {\n testForLitDevWarnings(\n async () => await fixture<ContextualHelp>(ContextualHelpMarkup())\n );\n it('loads default contextual-help accessibly', async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n\n await elementUpdated(el);\n\n await expect(el).to.be.accessible();\n\n const button = document\n .querySelector('sp-contextual-help')\n ?.shadowRoot?.querySelector('sp-action-button');\n expect(button).to.have.attribute(\n 'aria-label',\n DEFAULT_ARIA_LABELS.info\n );\n\n el.variant = 'help';\n\n await elementUpdated(el);\n expect(button).to.have.attribute(\n 'aria-label',\n DEFAULT_ARIA_LABELS.help\n );\n });\n it('is a popover on web', async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n\n await elementUpdated(el);\n const trigger = el.shadowRoot?.querySelector('#trigger') as HTMLElement;\n\n let popover = el.shadowRoot?.querySelector('sp-popover');\n expect(popover).not.to.exist;\n\n const opened = oneEvent(el, 'sp-opened');\n trigger.click();\n await opened;\n\n popover = el.shadowRoot?.querySelector('sp-popover');\n expect(popover).to.exist;\n const headingSlot = popover?.querySelector(\n 'slot[name=\"heading\"]'\n ) as HTMLSlotElement;\n const heading = headingSlot.assignedElements()[0].textContent;\n expect(heading).to.equal('Permission required');\n\n const closed = oneEvent(el, 'sp-closed');\n await sendKeys({ press: 'Escape' });\n await closed;\n await nextFrame();\n await nextFrame();\n\n popover = el.shadowRoot?.querySelector('sp-popover');\n expect(el.shadowRoot?.querySelector('sp-popover')).not.to.exist;\n });\n it('returns the label if set', async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n el.label = 'Custom Label';\n expect(el.buttonAriaLabel).to.equal('Custom Label');\n });\n\n it(`returns ${DEFAULT_ARIA_LABELS.help} if variant is \"help\" and label is not set`, async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n el.variant = 'help';\n expect(el.buttonAriaLabel).to.equal(DEFAULT_ARIA_LABELS.help);\n });\n\n it(`returns ${DEFAULT_ARIA_LABELS.info} if variant is not \"help\" and label is not set`, async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n expect(el.buttonAriaLabel).to.equal(DEFAULT_ARIA_LABELS.info);\n });\n it('renders correctly when actualPlacement is undefined', async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n\n el.isMobile.matches = true;\n\n await elementUpdated(el);\n\n const trigger = el.shadowRoot?.querySelector('#trigger') as HTMLElement;\n expect(trigger).to.exist;\n expect(trigger).to.have.attribute(\n 'aria-label',\n DEFAULT_ARIA_LABELS.info\n );\n\n const overlay = el.shadowRoot?.querySelector(\n 'sp-overlay'\n ) as HTMLElement;\n expect(overlay).to.exist;\n expect(overlay).to.have.attribute('trigger', 'trigger@click');\n expect(overlay).to.have.attribute('receives-focus', 'true');\n expect(overlay).to.have.property('offset', el.offset);\n expect(overlay).to.have.property('open', el.open);\n });\n it('renders dialog content when isMobile.matches is true', async () => {\n const el = await fixture<ContextualHelp>(ContextualHelpMarkup());\n\n el.isMobile.matches = true;\n\n await elementUpdated(el);\n\n const template: TemplateResult = el['renderOverlayContent']();\n\n const container = document.createElement('div');\n render(template, container);\n\n const dialogBase = container.querySelector('sp-dialog-base');\n const dialog = container.querySelector('sp-dialog');\n const headingSlot = container.querySelector('slot[name=\"heading\"]');\n const linkSlot = container.querySelector('slot[name=\"link\"]');\n\n expect(dialogBase).to.exist;\n expect(dialog).to.exist;\n expect(dialog).to.have.attribute('dismissable');\n expect(dialog).to.have.attribute('size', 's');\n expect(headingSlot).to.exist;\n expect(linkSlot).to.exist;\n });\n});\n"],
|
|
5
|
+
"mappings": "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",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/custom-elements.json
DELETED
|
@@ -1,252 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"schemaVersion": "1.0.0",
|
|
3
|
-
"readme": "",
|
|
4
|
-
"modules": [
|
|
5
|
-
{
|
|
6
|
-
"kind": "javascript-module",
|
|
7
|
-
"path": "sp-contextual-help.js",
|
|
8
|
-
"declarations": [],
|
|
9
|
-
"exports": [
|
|
10
|
-
{
|
|
11
|
-
"kind": "custom-element-definition",
|
|
12
|
-
"name": "sp-contextual-help",
|
|
13
|
-
"declaration": {
|
|
14
|
-
"name": "ContextualHelp",
|
|
15
|
-
"module": "/src/ContextualHelp.js"
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
{
|
|
21
|
-
"kind": "javascript-module",
|
|
22
|
-
"path": "src/ContextualHelp.js",
|
|
23
|
-
"declarations": [
|
|
24
|
-
{
|
|
25
|
-
"kind": "variable",
|
|
26
|
-
"name": "DEFAULT_ARIA_LABELS",
|
|
27
|
-
"type": {
|
|
28
|
-
"text": "{\n help: 'Help',\n info: 'Information',\n}"
|
|
29
|
-
},
|
|
30
|
-
"default": "{ help: 'Help', info: 'Information', }"
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
"kind": "class",
|
|
34
|
-
"description": "Spectrum Contextual help provides additional information about\nthe state of either an adjacent component or an entire view.",
|
|
35
|
-
"name": "ContextualHelp",
|
|
36
|
-
"slots": [
|
|
37
|
-
{
|
|
38
|
-
"description": "content to display as the heading of the popover",
|
|
39
|
-
"name": "heading"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"description": "content to display in the popover",
|
|
43
|
-
"name": "Text"
|
|
44
|
-
},
|
|
45
|
-
{
|
|
46
|
-
"description": "link to additional informations",
|
|
47
|
-
"name": "link"
|
|
48
|
-
}
|
|
49
|
-
],
|
|
50
|
-
"members": [
|
|
51
|
-
{
|
|
52
|
-
"kind": "field",
|
|
53
|
-
"name": "isMobile",
|
|
54
|
-
"privacy": "public",
|
|
55
|
-
"default": "new MatchMediaController(this, IS_MOBILE)"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"kind": "field",
|
|
59
|
-
"name": "label",
|
|
60
|
-
"type": {
|
|
61
|
-
"text": "string | undefined"
|
|
62
|
-
},
|
|
63
|
-
"privacy": "public",
|
|
64
|
-
"description": "Provides an accessible name for the action button trigger.",
|
|
65
|
-
"parameters": [
|
|
66
|
-
{
|
|
67
|
-
"name": "label",
|
|
68
|
-
"type": {
|
|
69
|
-
"text": "String"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
],
|
|
73
|
-
"attribute": "label"
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
"kind": "field",
|
|
77
|
-
"name": "variant",
|
|
78
|
-
"type": {
|
|
79
|
-
"text": "'info' | 'help'"
|
|
80
|
-
},
|
|
81
|
-
"privacy": "public",
|
|
82
|
-
"default": "'info'",
|
|
83
|
-
"description": "The `variant` property applies specific styling on the action button trigger.",
|
|
84
|
-
"parameters": [
|
|
85
|
-
{
|
|
86
|
-
"name": "variant",
|
|
87
|
-
"type": {
|
|
88
|
-
"text": "String"
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"attribute": "variant"
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
"kind": "field",
|
|
96
|
-
"name": "placement",
|
|
97
|
-
"type": {
|
|
98
|
-
"text": "\"top\" | \"top-start\" | \"top-end\" | \"right\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left\" | \"left-start\" | \"left-end\""
|
|
99
|
-
},
|
|
100
|
-
"privacy": "public",
|
|
101
|
-
"default": "'bottom-start'",
|
|
102
|
-
"attribute": "placement",
|
|
103
|
-
"reflects": true
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
"kind": "field",
|
|
107
|
-
"name": "offset",
|
|
108
|
-
"type": {
|
|
109
|
-
"text": "number | [number, number]"
|
|
110
|
-
},
|
|
111
|
-
"privacy": "public",
|
|
112
|
-
"default": "0",
|
|
113
|
-
"description": "The `offset` property accepts either a single number, to\ndefine the offset of the Popover along the main axis from\nthe action button, or 2-tuple, to define the offset along the\nmain axis and the cross axis.",
|
|
114
|
-
"attribute": "offset"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"kind": "field",
|
|
118
|
-
"name": "open",
|
|
119
|
-
"type": {
|
|
120
|
-
"text": "boolean"
|
|
121
|
-
},
|
|
122
|
-
"default": "false",
|
|
123
|
-
"attribute": "open"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
"kind": "field",
|
|
127
|
-
"name": "buttonAriaLabel",
|
|
128
|
-
"type": {
|
|
129
|
-
"text": "string"
|
|
130
|
-
},
|
|
131
|
-
"privacy": "public",
|
|
132
|
-
"readonly": true
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
"kind": "method",
|
|
136
|
-
"name": "renderOverlayContent",
|
|
137
|
-
"privacy": "private",
|
|
138
|
-
"return": {
|
|
139
|
-
"type": {
|
|
140
|
-
"text": "TemplateResult"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
},
|
|
144
|
-
{
|
|
145
|
-
"kind": "method",
|
|
146
|
-
"name": "handleSlottableRequest",
|
|
147
|
-
"privacy": "private",
|
|
148
|
-
"return": {
|
|
149
|
-
"type": {
|
|
150
|
-
"text": "void"
|
|
151
|
-
}
|
|
152
|
-
},
|
|
153
|
-
"parameters": [
|
|
154
|
-
{
|
|
155
|
-
"name": "event",
|
|
156
|
-
"type": {
|
|
157
|
-
"text": "SlottableRequestEvent"
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
]
|
|
161
|
-
}
|
|
162
|
-
],
|
|
163
|
-
"attributes": [
|
|
164
|
-
{
|
|
165
|
-
"name": "placement",
|
|
166
|
-
"type": {
|
|
167
|
-
"text": "\"top\" | \"top-start\" | \"top-end\" | \"right\" | \"right-start\" | \"right-end\" | \"bottom\" | \"bottom-start\" | \"bottom-end\" | \"left\" | \"left-start\" | \"left-end\""
|
|
168
|
-
},
|
|
169
|
-
"default": "'bottom-start'",
|
|
170
|
-
"fieldName": "placement",
|
|
171
|
-
"attribute": "placement"
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
"name": "label",
|
|
175
|
-
"type": {
|
|
176
|
-
"text": "string | undefined"
|
|
177
|
-
},
|
|
178
|
-
"description": "Provides an accessible name for the action button trigger.",
|
|
179
|
-
"parameters": [
|
|
180
|
-
{
|
|
181
|
-
"name": "label",
|
|
182
|
-
"type": {
|
|
183
|
-
"text": "String"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
],
|
|
187
|
-
"fieldName": "label"
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
"name": "variant",
|
|
191
|
-
"type": {
|
|
192
|
-
"text": "'info' | 'help'"
|
|
193
|
-
},
|
|
194
|
-
"default": "'info'",
|
|
195
|
-
"description": "The `variant` property applies specific styling on the action button trigger.",
|
|
196
|
-
"parameters": [
|
|
197
|
-
{
|
|
198
|
-
"name": "variant",
|
|
199
|
-
"type": {
|
|
200
|
-
"text": "String"
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
],
|
|
204
|
-
"fieldName": "variant"
|
|
205
|
-
},
|
|
206
|
-
{
|
|
207
|
-
"name": "offset",
|
|
208
|
-
"type": {
|
|
209
|
-
"text": "number | [number, number]"
|
|
210
|
-
},
|
|
211
|
-
"default": "0",
|
|
212
|
-
"description": "The `offset` property accepts either a single number, to\ndefine the offset of the Popover along the main axis from\nthe action button, or 2-tuple, to define the offset along the\nmain axis and the cross axis.",
|
|
213
|
-
"fieldName": "offset"
|
|
214
|
-
},
|
|
215
|
-
{
|
|
216
|
-
"name": "open",
|
|
217
|
-
"type": {
|
|
218
|
-
"text": "boolean"
|
|
219
|
-
},
|
|
220
|
-
"default": "false",
|
|
221
|
-
"fieldName": "open"
|
|
222
|
-
}
|
|
223
|
-
],
|
|
224
|
-
"superclass": {
|
|
225
|
-
"name": "SpectrumElement",
|
|
226
|
-
"package": "@spectrum-web-components/base"
|
|
227
|
-
},
|
|
228
|
-
"tagName": "sp-contextual-help",
|
|
229
|
-
"customElement": true
|
|
230
|
-
}
|
|
231
|
-
],
|
|
232
|
-
"exports": [
|
|
233
|
-
{
|
|
234
|
-
"kind": "js",
|
|
235
|
-
"name": "DEFAULT_ARIA_LABELS",
|
|
236
|
-
"declaration": {
|
|
237
|
-
"name": "DEFAULT_ARIA_LABELS",
|
|
238
|
-
"module": "src/ContextualHelp.js"
|
|
239
|
-
}
|
|
240
|
-
},
|
|
241
|
-
{
|
|
242
|
-
"kind": "js",
|
|
243
|
-
"name": "ContextualHelp",
|
|
244
|
-
"declaration": {
|
|
245
|
-
"name": "ContextualHelp",
|
|
246
|
-
"module": "src/ContextualHelp.js"
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
]
|
|
250
|
-
}
|
|
251
|
-
]
|
|
252
|
-
}
|
package/sp-contextual-help.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2025 Adobe. All rights reserved.
|
|
3
|
-
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
5
|
-
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
6
|
-
*
|
|
7
|
-
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
8
|
-
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
9
|
-
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
10
|
-
* governing permissions and limitations under the License.
|
|
11
|
-
*/
|
|
12
|
-
import { ContextualHelp } from './src/ContextualHelp.js';
|
|
13
|
-
declare global {
|
|
14
|
-
interface HTMLElementTagNameMap {
|
|
15
|
-
'sp-contextual-help': ContextualHelp;
|
|
16
|
-
}
|
|
17
|
-
}
|
package/sp-contextual-help.js
DELETED