Commit 7641286
feat: Adds uui-button-copy-text (#985)
* Adds scaffolding files for uui-copy
npm run new-package
* Adds first attempt at uui-copy
* Make eslint happy
* WIP: To add useful tests
* Update packages/uui-copy/lib/uui-copy.element.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Update packages/uui-copy/lib/uui-copy.element.ts
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
* Remove the reflect on the props as PR suggestion
* Adds in the util func demandCustomElement in ctor as suggested by Jacob
* Fix typo
* Remove the tests for the clipboard API - agreed with Jacob to keep the tests minimal due to the permisions problem with the clipboard API running headless
* Waits 2 seconds before setting uuiButton state to success
* Fix the problem with the story, as you needed to browse to uui-button before this would work properly as it had not registered the webcoponents that it depends upon
* Adds the LabelMixin to add the prop.
Flows the label prop down into the UUI-button for the aria-label for the uui-button used inside uui-copy
* Make the sonar code quality thing a bit happier
* Add a prop & story for the timeout delay for the animation/state of the button
* An explicit story to help with docs to show how to use a different icon
* Fix test failing on CI only - not locally
* Rename from uui-copy to more explicit uui-text-copy-button
* Renaming files & folders was bein a PITA and things not working 🤬
So had to stub it out again with npm run new-package
* FIx problem from test
* Remove console.log
* Wrap with try/catch & drop the uneeded .then()
* Removes the event from bubbling, not sure there is a valid reason to
* feat: rename element to `uui-button-copy-text`
* feat: rename to uui-button-copy-text and add dependencies
* feat: rename to uui-button-copy-text and add dependencies
* feat: uui-icon package is optional
* feat: uui-icon package is optional
* feat: extend from uui-button and rename `value` to `text`
* feat: copy only from other element if there is no 'value' field
* feat: use real class property to hold copied value
* feat: clear animation timer if element disconnects
* feat: rename base folder
* chore: format lint
* docs: update README
* chore: cleanup old files
---------
Co-authored-by: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com>
Co-authored-by: Niels Lyngsø <niels.lyngso@gmail.com>1 parent 0291215 commit 7641286
File tree
11 files changed
+553
-0
lines changed- packages
- uui-button-copy-text
- lib
- uui/lib
11 files changed
+553
-0
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
Lines changed: 126 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 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 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
0 commit comments