@1024pix/pix-ui 41.0.1 → 41.0.3

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.
@@ -18,6 +18,7 @@
18
18
  {{on "keyup" (fn this.handleKeyUp i)}}
19
19
  {{on "input" (fn this.handleCodeInput i)}}
20
20
  {{on "paste" (fn this.handlePaste i)}}
21
+ {{on "focus" (fn this.handleFocus i)}}
21
22
  />
22
23
  {{/each}}
23
24
  </fieldset>
@@ -125,6 +125,12 @@ export default class PixInputCode extends Component {
125
125
  this.focusElement(index);
126
126
  this.triggerAction();
127
127
  }
128
+
129
+ @action
130
+ handleFocus(index) {
131
+ const element = document.getElementById(`code-input-${index}`);
132
+ element && element.select();
133
+ }
128
134
  }
129
135
 
130
136
  function _extractValidCharacters(pastedText) {
@@ -1,10 +1,36 @@
1
+ // https://gist.github.com/ffoodd/000b59f431e3e64e4ce1a24d5bb36034
2
+
1
3
  .screen-reader-only, .screen-reader-only > * {
2
- position: absolute;
3
- width: 1px;
4
- height: 1px;
5
- margin: -1px;
6
- padding: 0;
7
- overflow: hidden;
8
- border: 0;
9
- clip: rect(0, 0, 0, 0);
10
- }
4
+ position: absolute !important;
5
+ width: 1px !important;
6
+ height: 1px !important;
7
+ margin: -1px !important;
8
+ padding: 0 !important;
9
+ overflow: hidden !important;
10
+ white-space: nowrap !important;
11
+ border: 0 !important;
12
+ clip: rect(1px, 1px, 1px, 1px) !important;
13
+ -webkit-clip-path: inset(50%) !important;
14
+ clip-path: inset(50%) !important;
15
+ }
16
+
17
+ /*
18
+ Use in conjunction with .screen-reader-only to only display content when it's focused.
19
+ @note Useful for skip links
20
+ @see http://www.w3.org/TR/2013/NOTE-WCAG20-TECHS-20130905/G1
21
+ @note Based on a HTML5 Boilerplate technique, included in Bootstrap
22
+ @note Fixed a bug with position: static on iOS 10.0.2 + VoiceOver
23
+ @author Sylvain Pigeard
24
+ @see https://github.com/twbs/bootstrap/issues/20732
25
+ */
26
+ .screen-reader-only-focusable:focus,
27
+ .screen-reader-only-focusable:active {
28
+ width: auto !important;
29
+ height: auto !important;
30
+ margin: auto !important;
31
+ overflow: visible !important;
32
+ white-space: normal !important;
33
+ clip: auto !important;
34
+ -webkit-clip-path: none !important;
35
+ clip-path: none !important;
36
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@1024pix/pix-ui",
3
- "version": "41.0.1",
3
+ "version": "41.0.3",
4
4
  "description": "Pix-UI is the implementation of Pix design principles and guidelines for its products.",
5
5
  "keywords": [
6
6
  "ember-addon"
@@ -8,7 +8,7 @@
8
8
  "license": "MIT",
9
9
  "author": "GIP Pix",
10
10
  "engines": {
11
- "node": "^20"
11
+ "node": "^20.9.0"
12
12
  },
13
13
  "ember": {
14
14
  "edition": "octane"