@spectrum-web-components/button 1.3.0-beta.6 → 1.3.0

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 (161) hide show
  1. package/README.md +137 -51
  2. package/package.json +10 -11
  3. package/LICENSE +0 -201
  4. package/stories/button-accent-fill-pending.stories.js +0 -34
  5. package/stories/button-accent-fill-pending.stories.js.map +0 -7
  6. package/stories/button-accent-fill-sizes.stories.js +0 -32
  7. package/stories/button-accent-fill-sizes.stories.js.map +0 -7
  8. package/stories/button-accent-fill.stories.js +0 -33
  9. package/stories/button-accent-fill.stories.js.map +0 -7
  10. package/stories/button-accent-outline-pending.stories.js +0 -34
  11. package/stories/button-accent-outline-pending.stories.js.map +0 -7
  12. package/stories/button-accent-outline-sizes.stories.js +0 -32
  13. package/stories/button-accent-outline-sizes.stories.js.map +0 -7
  14. package/stories/button-accent-outline.stories.js +0 -33
  15. package/stories/button-accent-outline.stories.js.map +0 -7
  16. package/stories/button-black-fill-pending.stories.js +0 -34
  17. package/stories/button-black-fill-pending.stories.js.map +0 -7
  18. package/stories/button-black-fill-sizes.stories.js +0 -33
  19. package/stories/button-black-fill-sizes.stories.js.map +0 -7
  20. package/stories/button-black-fill.stories.js +0 -35
  21. package/stories/button-black-fill.stories.js.map +0 -7
  22. package/stories/button-black-outline-pending.stories.js +0 -34
  23. package/stories/button-black-outline-pending.stories.js.map +0 -7
  24. package/stories/button-black-outline-sizes.stories.js +0 -33
  25. package/stories/button-black-outline-sizes.stories.js.map +0 -7
  26. package/stories/button-black-outline.stories.js +0 -35
  27. package/stories/button-black-outline.stories.js.map +0 -7
  28. package/stories/button-negative-fill-pending.stories.js +0 -34
  29. package/stories/button-negative-fill-pending.stories.js.map +0 -7
  30. package/stories/button-negative-fill-sizes.stories.js +0 -32
  31. package/stories/button-negative-fill-sizes.stories.js.map +0 -7
  32. package/stories/button-negative-fill.stories.js +0 -33
  33. package/stories/button-negative-fill.stories.js.map +0 -7
  34. package/stories/button-negative-outline-pending.stories.js +0 -34
  35. package/stories/button-negative-outline-pending.stories.js.map +0 -7
  36. package/stories/button-negative-outline-sizes.stories.js +0 -32
  37. package/stories/button-negative-outline-sizes.stories.js.map +0 -7
  38. package/stories/button-negative-outline.stories.js +0 -33
  39. package/stories/button-negative-outline.stories.js.map +0 -7
  40. package/stories/button-primary-fill-pending.stories.js +0 -34
  41. package/stories/button-primary-fill-pending.stories.js.map +0 -7
  42. package/stories/button-primary-fill-sizes.stories.js +0 -32
  43. package/stories/button-primary-fill-sizes.stories.js.map +0 -7
  44. package/stories/button-primary-fill.stories.js +0 -46
  45. package/stories/button-primary-fill.stories.js.map +0 -7
  46. package/stories/button-primary-outline-pending.stories.js +0 -34
  47. package/stories/button-primary-outline-pending.stories.js.map +0 -7
  48. package/stories/button-primary-outline-sizes.stories.js +0 -32
  49. package/stories/button-primary-outline-sizes.stories.js.map +0 -7
  50. package/stories/button-primary-outline.stories.js +0 -33
  51. package/stories/button-primary-outline.stories.js.map +0 -7
  52. package/stories/button-secondary-fill-pending.stories.js +0 -34
  53. package/stories/button-secondary-fill-pending.stories.js.map +0 -7
  54. package/stories/button-secondary-fill-sizes.stories.js +0 -32
  55. package/stories/button-secondary-fill-sizes.stories.js.map +0 -7
  56. package/stories/button-secondary-fill.stories.js +0 -33
  57. package/stories/button-secondary-fill.stories.js.map +0 -7
  58. package/stories/button-secondary-outline-pending.stories.js +0 -34
  59. package/stories/button-secondary-outline-pending.stories.js.map +0 -7
  60. package/stories/button-secondary-outline-sizes.stories.js +0 -32
  61. package/stories/button-secondary-outline-sizes.stories.js.map +0 -7
  62. package/stories/button-secondary-outline.stories.js +0 -33
  63. package/stories/button-secondary-outline.stories.js.map +0 -7
  64. package/stories/button-white-fill-pending.stories.js +0 -34
  65. package/stories/button-white-fill-pending.stories.js.map +0 -7
  66. package/stories/button-white-fill-sizes.stories.js +0 -33
  67. package/stories/button-white-fill-sizes.stories.js.map +0 -7
  68. package/stories/button-white-fill.stories.js +0 -35
  69. package/stories/button-white-fill.stories.js.map +0 -7
  70. package/stories/button-white-outline-pending.stories.js +0 -34
  71. package/stories/button-white-outline-pending.stories.js.map +0 -7
  72. package/stories/button-white-outline-sizes.stories.js +0 -33
  73. package/stories/button-white-outline-sizes.stories.js.map +0 -7
  74. package/stories/button-white-outline.stories.js +0 -35
  75. package/stories/button-white-outline.stories.js.map +0 -7
  76. package/stories/index.js +0 -196
  77. package/stories/index.js.map +0 -7
  78. package/stories/template.js +0 -21
  79. package/stories/template.js.map +0 -7
  80. package/test/benchmark/test-basic.js +0 -14
  81. package/test/benchmark/test-basic.js.map +0 -7
  82. package/test/button-accent-fill-pending.test-vrt.js +0 -5
  83. package/test/button-accent-fill-pending.test-vrt.js.map +0 -7
  84. package/test/button-accent-fill-sizes.test-vrt.js +0 -5
  85. package/test/button-accent-fill-sizes.test-vrt.js.map +0 -7
  86. package/test/button-accent-fill.test-vrt.js +0 -5
  87. package/test/button-accent-fill.test-vrt.js.map +0 -7
  88. package/test/button-accent-outline-pending.test-vrt.js +0 -5
  89. package/test/button-accent-outline-pending.test-vrt.js.map +0 -7
  90. package/test/button-accent-outline-sizes.test-vrt.js +0 -5
  91. package/test/button-accent-outline-sizes.test-vrt.js.map +0 -7
  92. package/test/button-accent-outline.test-vrt.js +0 -5
  93. package/test/button-accent-outline.test-vrt.js.map +0 -7
  94. package/test/button-black-fill-pending.test-vrt.js +0 -5
  95. package/test/button-black-fill-pending.test-vrt.js.map +0 -7
  96. package/test/button-black-fill-sizes.test-vrt.js +0 -5
  97. package/test/button-black-fill-sizes.test-vrt.js.map +0 -7
  98. package/test/button-black-fill.test-vrt.js +0 -5
  99. package/test/button-black-fill.test-vrt.js.map +0 -7
  100. package/test/button-black-outline-pending.test-vrt.js +0 -5
  101. package/test/button-black-outline-pending.test-vrt.js.map +0 -7
  102. package/test/button-black-outline-sizes.test-vrt.js +0 -5
  103. package/test/button-black-outline-sizes.test-vrt.js.map +0 -7
  104. package/test/button-black-outline.test-vrt.js +0 -5
  105. package/test/button-black-outline.test-vrt.js.map +0 -7
  106. package/test/button-memory.test.js +0 -5
  107. package/test/button-memory.test.js.map +0 -7
  108. package/test/button-negative-fill-pending.test-vrt.js +0 -5
  109. package/test/button-negative-fill-pending.test-vrt.js.map +0 -7
  110. package/test/button-negative-fill-sizes.test-vrt.js +0 -5
  111. package/test/button-negative-fill-sizes.test-vrt.js.map +0 -7
  112. package/test/button-negative-fill.test-vrt.js +0 -5
  113. package/test/button-negative-fill.test-vrt.js.map +0 -7
  114. package/test/button-negative-outline-pending.test-vrt.js +0 -5
  115. package/test/button-negative-outline-pending.test-vrt.js.map +0 -7
  116. package/test/button-negative-outline-sizes.test-vrt.js +0 -5
  117. package/test/button-negative-outline-sizes.test-vrt.js.map +0 -7
  118. package/test/button-negative-outline.test-vrt.js +0 -5
  119. package/test/button-negative-outline.test-vrt.js.map +0 -7
  120. package/test/button-primary-fill-pending.test-vrt.js +0 -5
  121. package/test/button-primary-fill-pending.test-vrt.js.map +0 -7
  122. package/test/button-primary-fill-sizes.test-vrt.js +0 -5
  123. package/test/button-primary-fill-sizes.test-vrt.js.map +0 -7
  124. package/test/button-primary-fill.test-vrt.js +0 -5
  125. package/test/button-primary-fill.test-vrt.js.map +0 -7
  126. package/test/button-primary-outline-pending.test-vrt.js +0 -5
  127. package/test/button-primary-outline-pending.test-vrt.js.map +0 -7
  128. package/test/button-primary-outline-sizes.test-vrt.js +0 -5
  129. package/test/button-primary-outline-sizes.test-vrt.js.map +0 -7
  130. package/test/button-primary-outline.test-vrt.js +0 -5
  131. package/test/button-primary-outline.test-vrt.js.map +0 -7
  132. package/test/button-secondary-fill-pending.test-vrt.js +0 -5
  133. package/test/button-secondary-fill-pending.test-vrt.js.map +0 -7
  134. package/test/button-secondary-fill-sizes.test-vrt.js +0 -5
  135. package/test/button-secondary-fill-sizes.test-vrt.js.map +0 -7
  136. package/test/button-secondary-fill.test-vrt.js +0 -5
  137. package/test/button-secondary-fill.test-vrt.js.map +0 -7
  138. package/test/button-secondary-outline-pending.test-vrt.js +0 -5
  139. package/test/button-secondary-outline-pending.test-vrt.js.map +0 -7
  140. package/test/button-secondary-outline-sizes.test-vrt.js +0 -5
  141. package/test/button-secondary-outline-sizes.test-vrt.js.map +0 -7
  142. package/test/button-secondary-outline.test-vrt.js +0 -5
  143. package/test/button-secondary-outline.test-vrt.js.map +0 -7
  144. package/test/button-white-fill-pending.test-vrt.js +0 -5
  145. package/test/button-white-fill-pending.test-vrt.js.map +0 -7
  146. package/test/button-white-fill-sizes.test-vrt.js +0 -5
  147. package/test/button-white-fill-sizes.test-vrt.js.map +0 -7
  148. package/test/button-white-fill.test-vrt.js +0 -5
  149. package/test/button-white-fill.test-vrt.js.map +0 -7
  150. package/test/button-white-outline-pending.test-vrt.js +0 -5
  151. package/test/button-white-outline-pending.test-vrt.js.map +0 -7
  152. package/test/button-white-outline-sizes.test-vrt.js +0 -5
  153. package/test/button-white-outline-sizes.test-vrt.js.map +0 -7
  154. package/test/button-white-outline.test-vrt.js +0 -5
  155. package/test/button-white-outline.test-vrt.js.map +0 -7
  156. package/test/button.test.js +0 -659
  157. package/test/button.test.js.map +0 -7
  158. package/test/clear-button.test.js +0 -27
  159. package/test/clear-button.test.js.map +0 -7
  160. package/test/close-button.test.js +0 -27
  161. package/test/close-button.test.js.map +0 -7
package/README.md CHANGED
@@ -1,7 +1,7 @@
1
- ## Description
1
+ ## Overview
2
2
 
3
3
  An `<sp-button>` represents an action a user can take. sp-buttons can be clicked
4
- or tapped to perform an action or to navigate to another page. sp-buttons in
4
+ or tapped to perform an action or to navigate to another page. Buttons in
5
5
  Spectrum have several variations for different uses and multiple levels of
6
6
  loudness for various attention-getting needs.
7
7
 
@@ -29,9 +29,78 @@ When looking to leverage the `Button`, `ClearButton`, or `CloseButton` base clas
29
29
  import { Button, ClearButton, CloseButton } from '@spectrum-web-components/button';
30
30
  ```
31
31
 
32
- ## Sizes
32
+ ### Anatomy
33
33
 
34
- <sp-tabs selected="m" auto label="Size Attribute Options">
34
+ #### Content
35
+
36
+ `<sp-button>` elements can be provided a visible label,
37
+ a label and an icon, or just an icon.
38
+
39
+ An icon is provided by placing an icon element in the `icon` slot.
40
+
41
+ If the button is `icon-only`, a non-visible label
42
+ can be provided via the `label` attribute on an `<sp-button>`
43
+ or on an `<sp-icon*>` element child to appropriately
44
+ fulfill the accessibility contract of the button.
45
+
46
+ <sp-tabs selected="label" auto label="Labelling a button">
47
+ <sp-tab value="label">Label only</sp-tab>
48
+ <sp-tab-panel value="label">
49
+
50
+ ```html demo
51
+ <sp-button variant="primary">Label only</sp-button>
52
+ ```
53
+
54
+ </sp-tab-panel>
55
+ <sp-tab value="icon-label">Icon + label</sp-tab>
56
+ <sp-tab-panel value="icon-label">
57
+
58
+ ```html demo
59
+ <sp-button variant="primary">
60
+ <sp-icon-help slot="icon"></sp-icon-help>
61
+ Icon + Label
62
+ </sp-button>
63
+ ```
64
+
65
+ </sp-tab-panel>
66
+ <sp-tab value="svg-label">SVG Icon + label</sp-tab>
67
+ <sp-tab-panel value="svg-label">
68
+
69
+ ```html demo
70
+ <sp-button variant="primary">
71
+ <svg
72
+ slot="icon"
73
+ viewBox="0 0 36 36"
74
+ focusable="false"
75
+ aria-hidden="true"
76
+ role="img"
77
+ >
78
+ <path
79
+ d="M16 36a4.407 4.407 0 0 0 4-4h-8a4.407 4.407 0 0 0 4 4zm9.143-24.615c0-3.437-3.206-4.891-7.143-5.268V3a1.079 1.079 0 0 0-1.143-1h-1.714A1.079 1.079 0 0 0 14 3v3.117c-3.937.377-7.143 1.831-7.143 5.268C6.857 26.8 2 26.111 2 28.154V30h28v-1.846C30 26 25.143 26.8 25.143 11.385z"
80
+ ></path>
81
+ </svg>
82
+ SVG Icon + Label
83
+ </sp-button>
84
+ ```
85
+
86
+ </sp-tab-panel>
87
+ <sp-tab value="icon-only">Icon only</sp-tab>
88
+ <sp-tab-panel value="icon-only">
89
+
90
+ ```html demo
91
+ <sp-button variant="primary" label="Icon only">
92
+ <sp-icon-help slot="icon"></sp-icon-help>
93
+ </sp-button>
94
+ ```
95
+
96
+ </sp-tab-panel>
97
+ </sp-tabs>
98
+
99
+ ### Options
100
+
101
+ #### Sizes
102
+
103
+ <sp-tabs selected="m" auto label="Size attribute options">
35
104
  <sp-tab value="s">Small</sp-tab>
36
105
  <sp-tab-panel value="s">
37
106
 
@@ -66,42 +135,10 @@ import { Button, ClearButton, CloseButton } from '@spectrum-web-components/butto
66
135
  </sp-tab-panel>
67
136
  </sp-tabs>
68
137
 
69
- ## Content
70
-
71
- `<sp-button>` elements can be provided a visible label, a label with an icon, or just an icon (a non-visible label can be prived via the `label` attribute on an `<sp-button>` or on an `<sp-icon*>` element child to appropriately fulfill the accessibility contract of the button). An icon is provided by
72
- placing an icon element to the `icon` slot.
73
-
74
- ```html
75
- <sp-button-group>
76
- <sp-button variant="primary">Label only</sp-button>
77
- <sp-button variant="primary">
78
- <sp-icon-help slot="icon"></sp-icon-help>
79
- Icon + Label
80
- </sp-button>
81
- <sp-button variant="primary">
82
- <svg
83
- slot="icon"
84
- viewBox="0 0 36 36"
85
- focusable="false"
86
- aria-hidden="true"
87
- role="img"
88
- >
89
- <path
90
- d="M16 36a4.407 4.407 0 0 0 4-4h-8a4.407 4.407 0 0 0 4 4zm9.143-24.615c0-3.437-3.206-4.891-7.143-5.268V3a1.079 1.079 0 0 0-1.143-1h-1.714A1.079 1.079 0 0 0 14 3v3.117c-3.937.377-7.143 1.831-7.143 5.268C6.857 26.8 2 26.111 2 28.154V30h28v-1.846C30 26 25.143 26.8 25.143 11.385z"
91
- ></path>
92
- </svg>
93
- SVG Icon + Label
94
- </sp-button>
95
- <sp-button variant="primary" label="Icon only" icon-only>
96
- <sp-icon-help slot="icon"></sp-icon-help>
97
- </sp-button>
98
- </sp-button-group>
99
- ```
100
-
101
- ## Variants
138
+ #### Variants
102
139
 
103
140
  There are many button variants to choose from in Spectrum. The `variant`
104
- attribute defaults to `accent` but also accepts the following value: `accent`, `primary`, `secondary`, `negative`, `white`, and `black`. They display as follows:
141
+ attribute defaults to `accent`, but also accepts the following value: `accent`, `primary`, `secondary`, `negative`, `white`, and `black`. They display as follows:
105
142
 
106
143
  <sp-tabs selected="accent" auto label="Variant Attribute Options">
107
144
  <sp-tab value="accent">Accent</sp-tab>
@@ -208,7 +245,7 @@ attribute defaults to `accent` but also accepts the following value: `accent`, `
208
245
  </sp-tab-panel>
209
246
  </sp-tabs>
210
247
 
211
- ### Treatment
248
+ #### Treatment
212
249
 
213
250
  The `treatment` attribute accepts `fill` and `outline` as values, and defaults to `fill`. These display as follows:
214
251
 
@@ -293,11 +330,11 @@ The `treatment` attribute accepts `fill` and `outline` as values, and defaults t
293
330
  </sp-tab-panel>
294
331
  </sp-tabs>
295
332
 
296
- ## States
333
+ ### States
297
334
 
298
335
  In addition to the variant, `<sp-button>` elements support two different visual states, disabled and pending, which can be applied by adding the attribute `disabled` or `pending` respectively. All `<sp-button>` variants support these states.
299
336
 
300
- ### Disabled
337
+ #### Disabled
301
338
 
302
339
  While disabled, `<sp-button>` elements will not respond to click events and will appear faded.
303
340
 
@@ -308,13 +345,12 @@ While disabled, `<sp-button>` elements will not respond to click events and will
308
345
  </sp-button-group>
309
346
  ```
310
347
 
311
- ### Pending
348
+ #### Pending
312
349
 
313
- While in pending state, `<sp-button>` elements will not respond to click events and will appear faded with an indeterminent `<sp-progress-circle>`.
314
- `<sp-button>` elements label and icon will be hidden while in pending state.
350
+ While in pending state, `<sp-button>` elements will not respond to click events and will appear faded with an indeterminate `<sp-progress-circle>`.
351
+ The `<sp-button>` element's label and icon will be hidden while in pending state.
315
352
 
316
- Note: `pending` state of the `<sp-button>` element is applied after 1s delay to avoid flashing the pending state for quick actions.
317
- You can override the delay by adding custom css var `--pending-delay` to your css.
353
+ Note: The pending state of the `<sp-button>` element is applied after a 1s delay to avoid flashing the pending state for quick actions. You can override the delay by adding custom css var `--pending-delay` to your css.
318
354
 
319
355
  ```html
320
356
  <sp-button-group>
@@ -323,10 +359,12 @@ You can override the delay by adding custom css var `--pending-delay` to your cs
323
359
  </sp-button-group>
324
360
  ```
325
361
 
326
- ## Handling events
362
+ ### Behaviors
363
+
364
+ #### Handling events
327
365
 
328
366
  Events handlers for clicks and other user actions can be registered on a
329
- `<sp-button>` as on a standard HTML `<button>` element.
367
+ `<sp-button>` as one would on a standard HTML `<button>` element.
330
368
 
331
369
  ```html
332
370
  <sp-button onclick="spAlert(this, '<sp-button> clicked!')">Click me</sp-button>
@@ -334,7 +372,7 @@ Events handlers for clicks and other user actions can be registered on a
334
372
 
335
373
  In addition to handling events like a native `<button>` HTML element, one can also use a `<sp-button>` in place of the `<a>` HTML element by using the `href` and optional `target` attribute.
336
374
 
337
- ```html
375
+ ```html demo
338
376
  <sp-button
339
377
  href="https://github.com/adobe/spectrum-web-components"
340
378
  target="_blank"
@@ -343,12 +381,60 @@ In addition to handling events like a native `<button>` HTML element, one can al
343
381
  </sp-button>
344
382
  ```
345
383
 
346
- ### Autofocus
384
+ #### Autofocus
347
385
 
348
- The `autofocus` attribute sets focus to the `<sp-button>` when the component
386
+ The `autofocus` attribute sets focus on the `<sp-button>` when the component
349
387
  mounts. This is useful for setting focus to a specific sp-button when a
350
388
  popover or dialog opens.
351
389
 
352
390
  ```html
353
391
  <sp-button autofocus>Confirm</sp-button>
354
392
  ```
393
+
394
+ ### Accessibility
395
+
396
+ #### Include a label
397
+
398
+ A button is required to have either a visible text label or a `label` attribute on either the `<sp-button>` itself
399
+ or on an `<sp-icon*>` element child.
400
+
401
+ #### Don't override color
402
+
403
+ Do not use custom colors for buttons. The colors of different button variations have been designed to be consistent and accessible.
404
+
405
+ #### Don't mix href and non-href buttons in a set of buttons
406
+
407
+ A screen reader user will not encounter href buttons when navigating by buttons or form controls. While they can both be used in the same page problems could occur if mixing the types in close proximity to each other.
408
+
409
+ #### Use static black or static white to contrast with backgrounds and images
410
+
411
+ To ensure maximum contrast with the background, use static black for light backgrounds and images, and static white for dark backgrounds and images. Avoid placing static components on top of busy images with a lot of variance in contrast.
412
+
413
+ <sp-tabs selected="black" auto label="Static variants for contrast">
414
+ <sp-tab value="black">Static black on light background</sp-tab>
415
+ <sp-tab-panel value="black">
416
+
417
+ ```html demo
418
+ <div style="background-color: #ccffee; padding: 20px">
419
+ <sp-button static="black">Click me</sp-button>
420
+ <sp-button static="black" treatment="outline">Click me</sp-button>
421
+ </div>
422
+ ```
423
+
424
+ </sp-tab-panel>
425
+ <sp-tab value="white">Static white on dark background</sp-tab>
426
+ <sp-tab-panel value="white">
427
+
428
+ ```html demo
429
+ <div style="background-color: #220033; padding: 20px">
430
+ <sp-button static="white">Click me</sp-button>
431
+ <sp-button static="white" treatment="outline">Click me</sp-button>
432
+ </div>
433
+ ```
434
+
435
+ </sp-tab-panel>
436
+ </sp-tabs>
437
+
438
+ #### Clearly state the action
439
+
440
+ Make sure that a button’s label clearly states the outcome of the action. Use the same word or phrase as found elsewhere in the experience.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spectrum-web-components/button",
3
- "version": "1.3.0-beta.6",
3
+ "version": "1.3.0",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -83,14 +83,14 @@
83
83
  "lit-html"
84
84
  ],
85
85
  "dependencies": {
86
- "@spectrum-web-components/base": "^1.3.0-beta.6",
87
- "@spectrum-web-components/clear-button": "^1.3.0-beta.6",
88
- "@spectrum-web-components/close-button": "^1.3.0-beta.6",
89
- "@spectrum-web-components/icon": "^1.3.0-beta.6",
90
- "@spectrum-web-components/icons-ui": "^1.3.0-beta.6",
91
- "@spectrum-web-components/progress-circle": "^1.3.0-beta.6",
92
- "@spectrum-web-components/reactive-controllers": "^1.3.0-beta.6",
93
- "@spectrum-web-components/shared": "^1.3.0-beta.6"
86
+ "@spectrum-web-components/base": "1.3.0",
87
+ "@spectrum-web-components/clear-button": "1.3.0",
88
+ "@spectrum-web-components/close-button": "1.3.0",
89
+ "@spectrum-web-components/icon": "1.3.0",
90
+ "@spectrum-web-components/icons-ui": "1.3.0",
91
+ "@spectrum-web-components/progress-circle": "1.3.0",
92
+ "@spectrum-web-components/reactive-controllers": "1.3.0",
93
+ "@spectrum-web-components/shared": "1.3.0"
94
94
  },
95
95
  "devDependencies": {
96
96
  "@spectrum-css/button": "14.1.1"
@@ -100,6 +100,5 @@
100
100
  "sideEffects": [
101
101
  "./sp-*.js",
102
102
  "./**/*.dev.js"
103
- ],
104
- "gitHead": "7a244ef2b2cad9f06962483af6fdff89828d9a83"
103
+ ]
105
104
  }
package/LICENSE DELETED
@@ -1,201 +0,0 @@
1
- Apache License
2
- Version 2.0, January 2004
3
- http://www.apache.org/licenses/
4
-
5
- TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
-
7
- 1. Definitions.
8
-
9
- "License" shall mean the terms and conditions for use, reproduction,
10
- and distribution as defined by Sections 1 through 9 of this document.
11
-
12
- "Licensor" shall mean the copyright owner or entity authorized by
13
- the copyright owner that is granting the License.
14
-
15
- "Legal Entity" shall mean the union of the acting entity and all
16
- other entities that control, are controlled by, or are under common
17
- control with that entity. For the purposes of this definition,
18
- "control" means (i) the power, direct or indirect, to cause the
19
- direction or management of such entity, whether by contract or
20
- otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
- outstanding shares, or (iii) beneficial ownership of such entity.
22
-
23
- "You" (or "Your") shall mean an individual or Legal Entity
24
- exercising permissions granted by this License.
25
-
26
- "Source" form shall mean the preferred form for making modifications,
27
- including but not limited to software source code, documentation
28
- source, and configuration files.
29
-
30
- "Object" form shall mean any form resulting from mechanical
31
- transformation or translation of a Source form, including but
32
- not limited to compiled object code, generated documentation,
33
- and conversions to other media types.
34
-
35
- "Work" shall mean the work of authorship, whether in Source or
36
- Object form, made available under the License, as indicated by a
37
- copyright notice that is included in or attached to the work
38
- (an example is provided in the Appendix below).
39
-
40
- "Derivative Works" shall mean any work, whether in Source or Object
41
- form, that is based on (or derived from) the Work and for which the
42
- editorial revisions, annotations, elaborations, or other modifications
43
- represent, as a whole, an original work of authorship. For the purposes
44
- of this License, Derivative Works shall not include works that remain
45
- separable from, or merely link (or bind by name) to the interfaces of,
46
- the Work and Derivative Works thereof.
47
-
48
- "Contribution" shall mean any work of authorship, including
49
- the original version of the Work and any modifications or additions
50
- to that Work or Derivative Works thereof, that is intentionally
51
- submitted to Licensor for inclusion in the Work by the copyright owner
52
- or by an individual or Legal Entity authorized to submit on behalf of
53
- the copyright owner. For the purposes of this definition, "submitted"
54
- means any form of electronic, verbal, or written communication sent
55
- to the Licensor or its representatives, including but not limited to
56
- communication on electronic mailing lists, source code control systems,
57
- and issue tracking systems that are managed by, or on behalf of, the
58
- Licensor for the purpose of discussing and improving the Work, but
59
- excluding communication that is conspicuously marked or otherwise
60
- designated in writing by the copyright owner as "Not a Contribution."
61
-
62
- "Contributor" shall mean Licensor and any individual or Legal Entity
63
- on behalf of whom a Contribution has been received by Licensor and
64
- subsequently incorporated within the Work.
65
-
66
- 2. Grant of Copyright License. Subject to the terms and conditions of
67
- this License, each Contributor hereby grants to You a perpetual,
68
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
- copyright license to reproduce, prepare Derivative Works of,
70
- publicly display, publicly perform, sublicense, and distribute the
71
- Work and such Derivative Works in Source or Object form.
72
-
73
- 3. Grant of Patent License. Subject to the terms and conditions of
74
- this License, each Contributor hereby grants to You a perpetual,
75
- worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
- (except as stated in this section) patent license to make, have made,
77
- use, offer to sell, sell, import, and otherwise transfer the Work,
78
- where such license applies only to those patent claims licensable
79
- by such Contributor that are necessarily infringed by their
80
- Contribution(s) alone or by combination of their Contribution(s)
81
- with the Work to which such Contribution(s) was submitted. If You
82
- institute patent litigation against any entity (including a
83
- cross-claim or counterclaim in a lawsuit) alleging that the Work
84
- or a Contribution incorporated within the Work constitutes direct
85
- or contributory patent infringement, then any patent licenses
86
- granted to You under this License for that Work shall terminate
87
- as of the date such litigation is filed.
88
-
89
- 4. Redistribution. You may reproduce and distribute copies of the
90
- Work or Derivative Works thereof in any medium, with or without
91
- modifications, and in Source or Object form, provided that You
92
- meet the following conditions:
93
-
94
- (a) You must give any other recipients of the Work or
95
- Derivative Works a copy of this License; and
96
-
97
- (b) You must cause any modified files to carry prominent notices
98
- stating that You changed the files; and
99
-
100
- (c) You must retain, in the Source form of any Derivative Works
101
- that You distribute, all copyright, patent, trademark, and
102
- attribution notices from the Source form of the Work,
103
- excluding those notices that do not pertain to any part of
104
- the Derivative Works; and
105
-
106
- (d) If the Work includes a "NOTICE" text file as part of its
107
- distribution, then any Derivative Works that You distribute must
108
- include a readable copy of the attribution notices contained
109
- within such NOTICE file, excluding those notices that do not
110
- pertain to any part of the Derivative Works, in at least one
111
- of the following places: within a NOTICE text file distributed
112
- as part of the Derivative Works; within the Source form or
113
- documentation, if provided along with the Derivative Works; or,
114
- within a display generated by the Derivative Works, if and
115
- wherever such third-party notices normally appear. The contents
116
- of the NOTICE file are for informational purposes only and
117
- do not modify the License. You may add Your own attribution
118
- notices within Derivative Works that You distribute, alongside
119
- or as an addendum to the NOTICE text from the Work, provided
120
- that such additional attribution notices cannot be construed
121
- as modifying the License.
122
-
123
- You may add Your own copyright statement to Your modifications and
124
- may provide additional or different license terms and conditions
125
- for use, reproduction, or distribution of Your modifications, or
126
- for any such Derivative Works as a whole, provided Your use,
127
- reproduction, and distribution of the Work otherwise complies with
128
- the conditions stated in this License.
129
-
130
- 5. Submission of Contributions. Unless You explicitly state otherwise,
131
- any Contribution intentionally submitted for inclusion in the Work
132
- by You to the Licensor shall be under the terms and conditions of
133
- this License, without any additional terms or conditions.
134
- Notwithstanding the above, nothing herein shall supersede or modify
135
- the terms of any separate license agreement you may have executed
136
- with Licensor regarding such Contributions.
137
-
138
- 6. Trademarks. This License does not grant permission to use the trade
139
- names, trademarks, service marks, or product names of the Licensor,
140
- except as required for reasonable and customary use in describing the
141
- origin of the Work and reproducing the content of the NOTICE file.
142
-
143
- 7. Disclaimer of Warranty. Unless required by applicable law or
144
- agreed to in writing, Licensor provides the Work (and each
145
- Contributor provides its Contributions) on an "AS IS" BASIS,
146
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
- implied, including, without limitation, any warranties or conditions
148
- of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
- PARTICULAR PURPOSE. You are solely responsible for determining the
150
- appropriateness of using or redistributing the Work and assume any
151
- risks associated with Your exercise of permissions under this License.
152
-
153
- 8. Limitation of Liability. In no event and under no legal theory,
154
- whether in tort (including negligence), contract, or otherwise,
155
- unless required by applicable law (such as deliberate and grossly
156
- negligent acts) or agreed to in writing, shall any Contributor be
157
- liable to You for damages, including any direct, indirect, special,
158
- incidental, or consequential damages of any character arising as a
159
- result of this License or out of the use or inability to use the
160
- Work (including but not limited to damages for loss of goodwill,
161
- work stoppage, computer failure or malfunction, or any and all
162
- other commercial damages or losses), even if such Contributor
163
- has been advised of the possibility of such damages.
164
-
165
- 9. Accepting Warranty or Additional Liability. While redistributing
166
- the Work or Derivative Works thereof, You may choose to offer,
167
- and charge a fee for, acceptance of support, warranty, indemnity,
168
- or other liability obligations and/or rights consistent with this
169
- License. However, in accepting such obligations, You may act only
170
- on Your own behalf and on Your sole responsibility, not on behalf
171
- of any other Contributor, and only if You agree to indemnify,
172
- defend, and hold each Contributor harmless for any liability
173
- incurred by, or claims asserted against, such Contributor by reason
174
- of your accepting any such warranty or additional liability.
175
-
176
- END OF TERMS AND CONDITIONS
177
-
178
- APPENDIX: How to apply the Apache License to your work.
179
-
180
- To apply the Apache License to your work, attach the following
181
- boilerplate notice, with the fields enclosed by brackets "[]"
182
- replaced with your own identifying information. (Don't include
183
- the brackets!) The text should be enclosed in the appropriate
184
- comment syntax for the file format. We also recommend that a
185
- file or class name and description of purpose be included on the
186
- same "printed page" as the copyright notice for easier
187
- identification within third-party archives.
188
-
189
- Copyright [yyyy] [name of copyright owner]
190
-
191
- Licensed under the Apache License, Version 2.0 (the "License");
192
- you may not use this file except in compliance with the License.
193
- You may obtain a copy of the License at
194
-
195
- http://www.apache.org/licenses/LICENSE-2.0
196
-
197
- Unless required by applicable law or agreed to in writing, software
198
- distributed under the License is distributed on an "AS IS" BASIS,
199
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
- See the License for the specific language governing permissions and
201
- limitations under the License.
@@ -1,34 +0,0 @@
1
- "use strict";
2
- import { renderButtonSet } from "./index.js";
3
- import { args, argTypes } from "./index.js";
4
- const variant = "accent";
5
- const treatment = "fill";
6
- const pending = true;
7
- export default {
8
- component: "sp-button",
9
- title: "Button/Accent/Fill/Pending",
10
- args: {
11
- ...args,
12
- variant,
13
- treatment,
14
- pending
15
- },
16
- argTypes
17
- };
18
- export const s = (args2) => renderButtonSet(args2);
19
- s.args = {
20
- size: "s"
21
- };
22
- export const m = (args2) => renderButtonSet(args2);
23
- m.args = {
24
- size: "m"
25
- };
26
- export const l = (args2) => renderButtonSet(args2);
27
- l.args = {
28
- size: "l"
29
- };
30
- export const XL = (args2) => renderButtonSet(args2);
31
- XL.args = {
32
- size: "xl"
33
- };
34
- //# sourceMappingURL=button-accent-fill-pending.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-fill-pending.stories.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 { TemplateResult } from '@spectrum-web-components/base';\nimport { Properties, renderButtonSet } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'accent';\nconst treatment = 'fill';\nconst pending = true;\n\nexport default {\n component: 'sp-button',\n title: 'Button/Accent/Fill/Pending',\n args: {\n ...args,\n variant,\n treatment,\n pending,\n },\n argTypes,\n};\n\nexport const s = (args: Properties): TemplateResult => renderButtonSet(args);\ns.args = {\n size: 's',\n};\n\nexport const m = (args: Properties): TemplateResult => renderButtonSet(args);\nm.args = {\n size: 'm',\n};\n\nexport const l = (args: Properties): TemplateResult => renderButtonSet(args);\nl.args = {\n size: 'l',\n};\n\nexport const XL = (args: Properties): TemplateResult => renderButtonSet(args);\nXL.args = {\n size: 'xl',\n};\n"],
5
- "mappings": ";AAYA,SAAqB,uBAAuB;AAC5C,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAClB,MAAM,UAAU;AAEhB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,KAAK,CAACA,UAAqC,gBAAgBA,KAAI;AAC5E,GAAG,OAAO;AAAA,EACN,MAAM;AACV;",
6
- "names": ["args"]
7
- }
@@ -1,32 +0,0 @@
1
- "use strict";
2
- import { renderButtonSet } from "./index.js";
3
- import { args, argTypes } from "./index.js";
4
- const variant = "accent";
5
- const treatment = "fill";
6
- export default {
7
- component: "sp-button",
8
- title: "Button/Accent/Fill/Sizes",
9
- args: {
10
- ...args,
11
- variant,
12
- treatment
13
- },
14
- argTypes
15
- };
16
- export const s = (args2) => renderButtonSet(args2);
17
- s.args = {
18
- size: "s"
19
- };
20
- export const m = (args2) => renderButtonSet(args2);
21
- m.args = {
22
- size: "m"
23
- };
24
- export const l = (args2) => renderButtonSet(args2);
25
- l.args = {
26
- size: "l"
27
- };
28
- export const XL = (args2) => renderButtonSet(args2);
29
- XL.args = {
30
- size: "xl"
31
- };
32
- //# sourceMappingURL=button-accent-fill-sizes.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-fill-sizes.stories.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 { TemplateResult } from '@spectrum-web-components/base';\nimport { Properties, renderButtonSet } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'accent';\nconst treatment = 'fill';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Accent/Fill/Sizes',\n args: {\n ...args,\n variant,\n treatment,\n },\n argTypes,\n};\n\nexport const s = (args: Properties): TemplateResult => renderButtonSet(args);\ns.args = {\n size: 's',\n};\n\nexport const m = (args: Properties): TemplateResult => renderButtonSet(args);\nm.args = {\n size: 'm',\n};\n\nexport const l = (args: Properties): TemplateResult => renderButtonSet(args);\nl.args = {\n size: 'l',\n};\n\nexport const XL = (args: Properties): TemplateResult => renderButtonSet(args);\nXL.args = {\n size: 'xl',\n};\n"],
5
- "mappings": ";AAYA,SAAqB,uBAAuB;AAC5C,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAElB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,IAAI,CAACA,UAAqC,gBAAgBA,KAAI;AAC3E,EAAE,OAAO;AAAA,EACL,MAAM;AACV;AAEO,aAAM,KAAK,CAACA,UAAqC,gBAAgBA,KAAI;AAC5E,GAAG,OAAO;AAAA,EACN,MAAM;AACV;",
6
- "names": ["args"]
7
- }
@@ -1,33 +0,0 @@
1
- "use strict";
2
- import {
3
- renderButtonSet,
4
- renderLink,
5
- renderLinkWithTarget,
6
- renderMinWidthButton,
7
- renderWithIcon,
8
- renderWithIconOnly
9
- } from "./index.js";
10
- import "@spectrum-web-components/icons-workflow/icons/sp-icon-help.js";
11
- import { args, argTypes } from "./index.js";
12
- const variant = "accent";
13
- const treatment = "fill";
14
- export default {
15
- component: "sp-button",
16
- title: "Button/Accent/Fill",
17
- args: {
18
- ...args,
19
- variant,
20
- treatment
21
- },
22
- argTypes
23
- };
24
- export const Default = (props) => renderButtonSet(props);
25
- export const withIcon = (props) => renderWithIcon(props);
26
- export const withIconOnly = (props) => renderWithIconOnly(props);
27
- export const minWidthButton = (props) => renderMinWidthButton(props);
28
- minWidthButton.storyName = "min-width";
29
- export const link = (props) => renderLink(props);
30
- link.storyName = "href";
31
- export const linkWithTarget = (props) => renderLinkWithTarget(props);
32
- linkWithTarget.storyName = 'href with target="_blank"';
33
- //# sourceMappingURL=button-accent-fill.stories.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["button-accent-fill.stories.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 { TemplateResult } from '@spectrum-web-components/base';\nimport {\n renderButtonSet,\n renderLink,\n renderLinkWithTarget,\n renderMinWidthButton,\n renderWithIcon,\n renderWithIconOnly,\n} from './index.js';\nimport '@spectrum-web-components/icons-workflow/icons/sp-icon-help.js';\nimport type { Properties } from './index.js';\nimport { args, argTypes } from './index.js';\n\nconst variant = 'accent';\nconst treatment = 'fill';\n\nexport default {\n component: 'sp-button',\n title: 'Button/Accent/Fill',\n args: {\n ...args,\n variant,\n treatment,\n },\n argTypes,\n};\n\nexport const Default = (props: Properties): TemplateResult =>\n renderButtonSet(props);\n\nexport const withIcon = (props: Properties): TemplateResult =>\n renderWithIcon(props);\n\nexport const withIconOnly = (props: Properties): TemplateResult =>\n renderWithIconOnly(props);\n\nexport const minWidthButton = (props: Properties): TemplateResult =>\n renderMinWidthButton(props);\n\nminWidthButton.storyName = 'min-width';\n\nexport const link = (props: Properties): TemplateResult => renderLink(props);\n\nlink.storyName = 'href';\n\nexport const linkWithTarget = (props: Properties): TemplateResult =>\n renderLinkWithTarget(props);\n\nlinkWithTarget.storyName = 'href with target=\"_blank\"';\n"],
5
- "mappings": ";AAYA;AAAA,EACI;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;AACP,OAAO;AAEP,SAAS,MAAM,gBAAgB;AAE/B,MAAM,UAAU;AAChB,MAAM,YAAY;AAElB,eAAe;AAAA,EACX,WAAW;AAAA,EACX,OAAO;AAAA,EACP,MAAM;AAAA,IACF,GAAG;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AAAA,EACA;AACJ;AAEO,aAAM,UAAU,CAAC,UACpB,gBAAgB,KAAK;AAElB,aAAM,WAAW,CAAC,UACrB,eAAe,KAAK;AAEjB,aAAM,eAAe,CAAC,UACzB,mBAAmB,KAAK;AAErB,aAAM,iBAAiB,CAAC,UAC3B,qBAAqB,KAAK;AAE9B,eAAe,YAAY;AAEpB,aAAM,OAAO,CAAC,UAAsC,WAAW,KAAK;AAE3E,KAAK,YAAY;AAEV,aAAM,iBAAiB,CAAC,UAC3B,qBAAqB,KAAK;AAE9B,eAAe,YAAY;",
6
- "names": []
7
- }