@acorex/styles 5.6.0 → 5.9.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 (44) hide show
  1. package/index.js +195 -0
  2. package/index.scss +3 -4
  3. package/package.json +1 -1
  4. package/src/base/index.scss +3 -1
  5. package/src/components/_action-sheet.scss +1 -1
  6. package/src/components/_alert.scss +310 -42
  7. package/src/components/_avatar.scss +1 -1
  8. package/src/components/_badge.scss +146 -26
  9. package/src/components/_breadcrumbs.scss +12 -8
  10. package/src/components/_button.scss +340 -397
  11. package/src/components/_calendar.scss +36 -18
  12. package/src/components/_collapse.scss +5 -11
  13. package/src/components/_color-palette.scss +33 -23
  14. package/src/components/_color-picker.scss +1 -1
  15. package/src/components/_data-table.scss +30 -5
  16. package/src/components/_datapager.scss +35 -26
  17. package/src/components/_decoration.scss +17 -9
  18. package/src/components/_drawer.scss +5 -1
  19. package/src/components/_dropdown.scss +6 -2
  20. package/src/components/_editor-container.scss +7 -2
  21. package/src/components/_fieldset.scss +1 -1
  22. package/src/components/_input.scss +1 -1
  23. package/src/components/_menu.scss +1 -1
  24. package/src/components/_popup.scss +7 -3
  25. package/src/components/_progress.scss +9 -10
  26. package/src/components/_range-slider.scss +195 -7
  27. package/src/components/_result.scss +2 -2
  28. package/src/components/_selection-list.scss +1 -1
  29. package/src/components/_table.scss +40 -7
  30. package/src/components/_tabs.scss +3 -3
  31. package/src/icons/demo-files/demo.css +152 -152
  32. package/src/icons/demo-files/demo.js +30 -30
  33. package/src/icons/demo.html +556 -542
  34. package/src/icons/fonts/acorex-icon.eot +0 -0
  35. package/src/icons/fonts/acorex-icon.svg +46 -45
  36. package/src/icons/fonts/acorex-icon.ttf +0 -0
  37. package/src/icons/fonts/acorex-icon.woff +0 -0
  38. package/src/icons/selection.json +1 -1
  39. package/src/icons/style.css +138 -135
  40. package/src/icons/style.scss +215 -210
  41. package/src/icons/variables.scss +41 -40
  42. package/src/utility/_mixins.scss +6 -69
  43. package/src/utility/index.scss +3 -3
  44. package/src/variables/_colors.scss +15 -14
@@ -1,15 +1,203 @@
1
1
  @layer components {
2
- .ax-range-slider {
2
+ .ax-dark {
3
+ ax-range-slider {
4
+ &.ax-primary-default {
5
+ input {
6
+ background: linear-gradient(
7
+ to right,
8
+ rgb(var(--ax-color-primary-800)) 0%,
9
+ rgb(var(--ax-color-primary-800)) var(--ax-current-value),
10
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
11
+ rgba(255, 255, 255, 0.1) 100%
12
+ );
13
+ }
14
+ }
15
+ &.ax-secondary-default {
16
+ input {
17
+ background: linear-gradient(
18
+ to right,
19
+ rgb(var(--ax-color-secondary-800)) 0%,
20
+ rgb(var(--ax-color-secondary-800)) var(--ax-current-value),
21
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
22
+ rgba(255, 255, 255, 0.1) 100%
23
+ );
24
+ }
25
+ }
26
+ &.ax-success-default {
27
+ input {
28
+ background: linear-gradient(
29
+ to right,
30
+ rgb(var(--ax-color-success-800)) 0%,
31
+ rgb(var(--ax-color-success-800)) var(--ax-current-value),
32
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
33
+ rgba(255, 255, 255, 0.1) 100%
34
+ );
35
+ }
36
+ }
37
+ &.ax-warning-default {
38
+ input {
39
+ background: linear-gradient(
40
+ to right,
41
+ rgb(var(--ax-color-warning-800)) 0%,
42
+ rgb(var(--ax-color-warning-800)) var(--ax-current-value),
43
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
44
+ rgba(255, 255, 255, 0.1) 100%
45
+ );
46
+ }
47
+ }
48
+ &.ax-danger-default {
49
+ input {
50
+ background: linear-gradient(
51
+ to right,
52
+ rgb(var(--ax-color-danger-800)) 0%,
53
+ rgb(var(--ax-color-danger-800)) var(--ax-current-value),
54
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
55
+ rgba(255, 255, 255, 0.1) 100%
56
+ );
57
+ }
58
+ }
59
+ &.ax-info-default {
60
+ input {
61
+ background: linear-gradient(
62
+ to right,
63
+ rgb(var(--ax-color-info-800)) 0%,
64
+ rgb(var(--ax-color-info-800)) var(--ax-current-value),
65
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
66
+ rgba(255, 255, 255, 0.1) 100%
67
+ );
68
+ }
69
+ }
70
+ &.ax-light-default {
71
+ input {
72
+ background: linear-gradient(
73
+ to right,
74
+ rgb(var(--ax-color-light-600)) 0%,
75
+ rgb(var(--ax-color-light-600)) var(--ax-current-value),
76
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
77
+ rgba(255, 255, 255, 0.1) 100%
78
+ );
79
+ }
80
+ }
81
+ &.ax-dark-default {
82
+ input {
83
+ background: linear-gradient(
84
+ to right,
85
+ rgb(var(--ax-color-dark-200)) 0%,
86
+ rgb(var(--ax-color-dark-200)) var(--ax-current-value),
87
+ rgba(255, 255, 255, 0.1) var(--ax-current-value),
88
+ rgba(255, 255, 255, 0.1) 100%
89
+ );
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ax-range-slider {
3
95
  @apply ax-w-full;
4
- .ax-range-slider-input {
5
- @apply ax-appearance-none ax-w-full ax-h-2 ax-bg-light-100 ax-rounded-full ax-outline-none ax-transition-all dark:ax-bg-light-600;
96
+ --ax-current-value: 0%;
97
+ input {
98
+ @apply ax-appearance-none ax-w-full ax-h-2 ax-bg-light-200 ax-rounded-full ax-outline-none ax-transition-all dark:ax-bg-white/10;
6
99
  &::-webkit-slider-thumb {
7
- @apply ax-appearance-none ax-w-5 ax-h-5 ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300 ax-rounded-full ax-cursor-pointer dark:ax-bg-light-500;
100
+ @apply ax-appearance-none ax-w-5 ax-h-5 ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300 dark:ax-border-white/[0.1] ax-rounded-full ax-cursor-pointer dark:ax-bg-light-400;
8
101
  }
9
102
  &::-moz-range-thumb {
10
- @apply ax-appearance-none ax-w-5 ax-h-5 ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300 ax-rounded-full ax-cursor-pointer dark:ax-bg-light-500;
103
+ @apply ax-appearance-none ax-w-5 ax-h-5 ax-bg-white ax-shadow-sm ax-border ax-border-solid ax-border-light-300 dark:ax-border-white/[0.1] ax-rounded-full ax-cursor-pointer dark:ax-bg-light-400;
104
+ }
105
+ }
106
+
107
+ &.ax-primary-default {
108
+ input {
109
+ background: linear-gradient(
110
+ to right,
111
+ rgb(var(--ax-color-primary-500)) 0%,
112
+ rgb(var(--ax-color-primary-500)) var(--ax-current-value),
113
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
114
+ rgb(var(--ax-color-light-100)) 100%
115
+ );
116
+ }
117
+ }
118
+
119
+ &.ax-secondary-default {
120
+ input {
121
+ background: linear-gradient(
122
+ to right,
123
+ rgb(var(--ax-color-secondary-500)) 0%,
124
+ rgb(var(--ax-color-secondary-500)) var(--ax-current-value),
125
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
126
+ rgb(var(--ax-color-light-100)) 100%
127
+ );
128
+ }
129
+ }
130
+
131
+ &.ax-danger-default {
132
+ input {
133
+ background: linear-gradient(
134
+ to right,
135
+ rgb(var(--ax-color-danger-500)) 0%,
136
+ rgb(var(--ax-color-danger-500)) var(--ax-current-value),
137
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
138
+ rgb(var(--ax-color-light-100)) 100%
139
+ );
140
+ }
141
+ }
142
+
143
+ &.ax-success-default {
144
+ input {
145
+ background: linear-gradient(
146
+ to right,
147
+ rgb(var(--ax-color-success-500)) 0%,
148
+ rgb(var(--ax-color-success-500)) var(--ax-current-value),
149
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
150
+ rgb(var(--ax-color-light-100)) 100%
151
+ );
152
+ }
153
+ }
154
+
155
+ &.ax-warning-default {
156
+ input {
157
+ background: linear-gradient(
158
+ to right,
159
+ rgb(var(--ax-color-warning-500)) 0%,
160
+ rgb(var(--ax-color-warning-500)) var(--ax-current-value),
161
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
162
+ rgb(var(--ax-color-light-100)) 100%
163
+ );
164
+ }
165
+ }
166
+
167
+ &.ax-info-default {
168
+ input {
169
+ background: linear-gradient(
170
+ to right,
171
+ rgb(var(--ax-color-info-500)) 0%,
172
+ rgb(var(--ax-color-info-500)) var(--ax-current-value),
173
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
174
+ rgb(var(--ax-color-light-100)) 100%
175
+ );
176
+ }
177
+ }
178
+
179
+ &.ax-light-default {
180
+ input {
181
+ background: linear-gradient(
182
+ to right,
183
+ rgb(var(--ax-color-light-500)) 0%,
184
+ rgb(var(--ax-color-light-500)) var(--ax-current-value),
185
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
186
+ rgb(var(--ax-color-light-100)) 100%
187
+ );
188
+ }
189
+ }
190
+
191
+ &.ax-dark-default {
192
+ input {
193
+ background: linear-gradient(
194
+ to right,
195
+ rgb(var(--ax-color-dark-500)) 0%,
196
+ rgb(var(--ax-color-dark-500)) var(--ax-current-value),
197
+ rgb(var(--ax-color-light-100)) var(--ax-current-value),
198
+ rgb(var(--ax-color-light-100)) 100%
199
+ );
11
200
  }
12
-
13
201
  }
14
202
  }
15
- }
203
+ }
@@ -7,10 +7,10 @@
7
7
  }
8
8
  .ax-result-title,
9
9
  .ax-result-description {
10
- @apply ax-mt-4 ax-text-center;
10
+ @apply ax-mt-2 ax-text-center;
11
11
  }
12
12
  .ax-result-title {
13
- @apply ax-text-2xl ax-font-semibold ax-text-light-700 dark:ax-text-light-50;
13
+ @apply ax-text-lg ax-font-semibold ax-text-light-700 dark:ax-text-light-50;
14
14
  }
15
15
  .ax-result-description {
16
16
  @apply ax-text-sm ax-text-light-500 dark:ax-text-light-100;
@@ -43,7 +43,7 @@
43
43
  .ax-selection-list {
44
44
  &.ax-vertical,&.ax-horizontal {
45
45
  & > div {
46
- @apply ax-p-4 ax-border ax-border-light-300 dark:ax-border-white/[0.09] ax-rounded-md ax-shadow-sm;
46
+ @apply ax-p-4 ax-border ax-border-light-300 dark:ax-border-white/[0.09] ax-rounded-default ax-shadow-sm;
47
47
  &.ax-state-selected {
48
48
  @apply ax-border-primary-500 ax-ring-1 ax-ring-primary-500 ax-shadow-primary-500;
49
49
  }
@@ -1,26 +1,59 @@
1
1
  @layer components {
2
2
  .ax-table {
3
- @apply ax-w-full ax-rounded-md ax-border-collapse ax-border ax-border-light-200 dark:ax-border-dark-400;
3
+ @apply ax-w-full ax-rounded-default ax-border-collapse ax-border ax-border-light-200 dark:ax-border-white/10 ax-overflow-hidden;
4
4
  td {
5
- @apply ax-border-b ax-border-light-200 dark:ax-border-dark-400 ax-px-6 ax-py-4 ax-text-sm;
5
+ @apply ax-border-b ax-border-light-200 dark:ax-border-white/10 ax-px-6 ax-py-4 ax-text-sm;
6
6
  }
7
7
  thead {
8
+ @apply ax-bg-light-100 dark:ax-bg-white/10 ax-shadow-sm ax-border-b ax-border-light-200 dark:ax-border-white/10;
8
9
  th {
9
10
  @apply ax-text-sm ax-font-bold ax-text-start ax-py-4 ax-px-6;
10
11
  }
11
- tr {
12
- @apply ax-border-b ax-border-light-200 dark:ax-border-dark-400;
13
- }
12
+
14
13
  }
15
14
  &.ax-table-alternate {
16
15
  tbody {
17
16
  tr {
18
- &:nth-child(odd) {
17
+ &:nth-child(even) {
19
18
  @apply ax-bg-light-100 dark:ax-bg-dark-400/20;
20
19
  }
21
20
  }
22
21
  }
23
22
  }
23
+ &.ax-table-bordered {
24
+ thead {
25
+ th {
26
+ @apply ax-border-t-0 #{!important};
27
+ }
28
+ }
29
+ tbody {
30
+
31
+ tr {
32
+ &:last-child {
33
+ td {
34
+ @apply ax-border-b-0;
35
+ }
36
+ }
37
+ td {
38
+ &:last-child {
39
+ @apply ax-border-b-0;
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ td,
46
+ th {
47
+ @apply ax-border ax-border-light-200 dark:ax-border-white/10;
48
+ &:first-child {
49
+ @apply ax-border-s-0;
50
+ }
51
+ &:last-child {
52
+ @apply ax-border-e-0;
53
+ }
54
+ }
55
+
56
+ }
24
57
  @media screen and (max-width: 601px) {
25
58
  &.ax-table-responsive {
26
59
  @apply ax-break-words ax-block ax-border-0;
@@ -36,7 +69,7 @@
36
69
  }
37
70
  }
38
71
  tr {
39
- @apply ax-border ax-border-light-200 dark:ax-border-dark-400;
72
+ @apply ax-border ax-border-light-200 dark:ax-border-white/10;
40
73
  }
41
74
  tr,
42
75
  tbody {
@@ -49,17 +49,17 @@
49
49
  @include control-states("editor");
50
50
 
51
51
  ax-tab-item {
52
- @apply ax-bg-white ax-border-r ax-border-b-2 ax-border-solid ax-border-light-300 dark:ax-text-light-200;
52
+ @apply ax-bg-white ax-border-e ax-border-b-2 ax-border-solid ax-border-light-300 dark:ax-text-light-200;
53
53
  @include control-states("editor");
54
54
 
55
55
  border-bottom-color: transparent !important;
56
56
 
57
57
  &:first-child {
58
- @apply ax-rounded-l;
58
+ @apply ax-rounded-s;
59
59
  }
60
60
 
61
61
  &:last-child {
62
- @apply ax-rounded-r ax-border-r-0;
62
+ @apply ax-rounded-e ax-border-e-0;
63
63
  }
64
64
 
65
65
  &:hover,
@@ -1,152 +1,152 @@
1
- body {
2
- padding: 0;
3
- margin: 0;
4
- font-family: sans-serif;
5
- font-size: 1em;
6
- line-height: 1.5;
7
- color: #555;
8
- background: #fff;
9
- }
10
- h1 {
11
- font-size: 1.5em;
12
- font-weight: normal;
13
- }
14
- small {
15
- font-size: .66666667em;
16
- }
17
- a {
18
- color: #e74c3c;
19
- text-decoration: none;
20
- }
21
- a:hover, a:focus {
22
- box-shadow: 0 1px #e74c3c;
23
- }
24
- .bshadow0, input {
25
- box-shadow: inset 0 -2px #e7e7e7;
26
- }
27
- input:hover {
28
- box-shadow: inset 0 -2px #ccc;
29
- }
30
- input, fieldset {
31
- font-family: sans-serif;
32
- font-size: 1em;
33
- margin: 0;
34
- padding: 0;
35
- border: 0;
36
- }
37
- input {
38
- color: inherit;
39
- line-height: 1.5;
40
- height: 1.5em;
41
- padding: .25em 0;
42
- }
43
- input:focus {
44
- outline: none;
45
- box-shadow: inset 0 -2px #449fdb;
46
- }
47
- .glyph {
48
- font-size: 16px;
49
- width: 15em;
50
- padding-bottom: 1em;
51
- margin-right: 4em;
52
- margin-bottom: 1em;
53
- float: left;
54
- overflow: hidden;
55
- }
56
- .liga {
57
- width: 80%;
58
- width: calc(100% - 2.5em);
59
- }
60
- .talign-right {
61
- text-align: right;
62
- }
63
- .talign-center {
64
- text-align: center;
65
- }
66
- .bgc1 {
67
- background: #f1f1f1;
68
- }
69
- .fgc1 {
70
- color: #999;
71
- }
72
- .fgc0 {
73
- color: #000;
74
- }
75
- p {
76
- margin-top: 1em;
77
- margin-bottom: 1em;
78
- }
79
- .mvm {
80
- margin-top: .75em;
81
- margin-bottom: .75em;
82
- }
83
- .mtn {
84
- margin-top: 0;
85
- }
86
- .mtl, .mal {
87
- margin-top: 1.5em;
88
- }
89
- .mbl, .mal {
90
- margin-bottom: 1.5em;
91
- }
92
- .mal, .mhl {
93
- margin-left: 1.5em;
94
- margin-right: 1.5em;
95
- }
96
- .mhmm {
97
- margin-left: 1em;
98
- margin-right: 1em;
99
- }
100
- .mls {
101
- margin-left: .25em;
102
- }
103
- .ptl {
104
- padding-top: 1.5em;
105
- }
106
- .pbs, .pvs {
107
- padding-bottom: .25em;
108
- }
109
- .pvs, .pts {
110
- padding-top: .25em;
111
- }
112
- .unit {
113
- float: left;
114
- }
115
- .unitRight {
116
- float: right;
117
- }
118
- .size1of2 {
119
- width: 50%;
120
- }
121
- .size1of1 {
122
- width: 100%;
123
- }
124
- .clearfix:before, .clearfix:after {
125
- content: " ";
126
- display: table;
127
- }
128
- .clearfix:after {
129
- clear: both;
130
- }
131
- .hidden-true {
132
- display: none;
133
- }
134
- .textbox0 {
135
- width: 3em;
136
- background: #f1f1f1;
137
- padding: .25em .5em;
138
- line-height: 1.5;
139
- height: 1.5em;
140
- }
141
- #testDrive {
142
- display: block;
143
- padding-top: 24px;
144
- line-height: 1.5;
145
- }
146
- .fs0 {
147
- font-size: 16px;
148
- }
149
- .fs1 {
150
- font-size: 32px;
151
- }
152
-
1
+ body {
2
+ padding: 0;
3
+ margin: 0;
4
+ font-family: sans-serif;
5
+ font-size: 1em;
6
+ line-height: 1.5;
7
+ color: #555;
8
+ background: #fff;
9
+ }
10
+ h1 {
11
+ font-size: 1.5em;
12
+ font-weight: normal;
13
+ }
14
+ small {
15
+ font-size: .66666667em;
16
+ }
17
+ a {
18
+ color: #e74c3c;
19
+ text-decoration: none;
20
+ }
21
+ a:hover, a:focus {
22
+ box-shadow: 0 1px #e74c3c;
23
+ }
24
+ .bshadow0, input {
25
+ box-shadow: inset 0 -2px #e7e7e7;
26
+ }
27
+ input:hover {
28
+ box-shadow: inset 0 -2px #ccc;
29
+ }
30
+ input, fieldset {
31
+ font-family: sans-serif;
32
+ font-size: 1em;
33
+ margin: 0;
34
+ padding: 0;
35
+ border: 0;
36
+ }
37
+ input {
38
+ color: inherit;
39
+ line-height: 1.5;
40
+ height: 1.5em;
41
+ padding: .25em 0;
42
+ }
43
+ input:focus {
44
+ outline: none;
45
+ box-shadow: inset 0 -2px #449fdb;
46
+ }
47
+ .glyph {
48
+ font-size: 16px;
49
+ width: 15em;
50
+ padding-bottom: 1em;
51
+ margin-right: 4em;
52
+ margin-bottom: 1em;
53
+ float: left;
54
+ overflow: hidden;
55
+ }
56
+ .liga {
57
+ width: 80%;
58
+ width: calc(100% - 2.5em);
59
+ }
60
+ .talign-right {
61
+ text-align: right;
62
+ }
63
+ .talign-center {
64
+ text-align: center;
65
+ }
66
+ .bgc1 {
67
+ background: #f1f1f1;
68
+ }
69
+ .fgc1 {
70
+ color: #999;
71
+ }
72
+ .fgc0 {
73
+ color: #000;
74
+ }
75
+ p {
76
+ margin-top: 1em;
77
+ margin-bottom: 1em;
78
+ }
79
+ .mvm {
80
+ margin-top: .75em;
81
+ margin-bottom: .75em;
82
+ }
83
+ .mtn {
84
+ margin-top: 0;
85
+ }
86
+ .mtl, .mal {
87
+ margin-top: 1.5em;
88
+ }
89
+ .mbl, .mal {
90
+ margin-bottom: 1.5em;
91
+ }
92
+ .mal, .mhl {
93
+ margin-left: 1.5em;
94
+ margin-right: 1.5em;
95
+ }
96
+ .mhmm {
97
+ margin-left: 1em;
98
+ margin-right: 1em;
99
+ }
100
+ .mls {
101
+ margin-left: .25em;
102
+ }
103
+ .ptl {
104
+ padding-top: 1.5em;
105
+ }
106
+ .pbs, .pvs {
107
+ padding-bottom: .25em;
108
+ }
109
+ .pvs, .pts {
110
+ padding-top: .25em;
111
+ }
112
+ .unit {
113
+ float: left;
114
+ }
115
+ .unitRight {
116
+ float: right;
117
+ }
118
+ .size1of2 {
119
+ width: 50%;
120
+ }
121
+ .size1of1 {
122
+ width: 100%;
123
+ }
124
+ .clearfix:before, .clearfix:after {
125
+ content: " ";
126
+ display: table;
127
+ }
128
+ .clearfix:after {
129
+ clear: both;
130
+ }
131
+ .hidden-true {
132
+ display: none;
133
+ }
134
+ .textbox0 {
135
+ width: 3em;
136
+ background: #f1f1f1;
137
+ padding: .25em .5em;
138
+ line-height: 1.5;
139
+ height: 1.5em;
140
+ }
141
+ #testDrive {
142
+ display: block;
143
+ padding-top: 24px;
144
+ line-height: 1.5;
145
+ }
146
+ .fs0 {
147
+ font-size: 16px;
148
+ }
149
+ .fs1 {
150
+ font-size: 32px;
151
+ }
152
+
@@ -1,30 +1,30 @@
1
- if (!('boxShadow' in document.body.style)) {
2
- document.body.setAttribute('class', 'noBoxShadow');
3
- }
4
-
5
- document.body.addEventListener("click", function(e) {
6
- var target = e.target;
7
- if (target.tagName === "INPUT" &&
8
- target.getAttribute('class').indexOf('liga') === -1) {
9
- target.select();
10
- }
11
- });
12
-
13
- (function() {
14
- var fontSize = document.getElementById('fontSize'),
15
- testDrive = document.getElementById('testDrive'),
16
- testText = document.getElementById('testText');
17
- function updateTest() {
18
- testDrive.innerHTML = testText.value || String.fromCharCode(160);
19
- if (window.icomoonLiga) {
20
- window.icomoonLiga(testDrive);
21
- }
22
- }
23
- function updateSize() {
24
- testDrive.style.fontSize = fontSize.value + 'px';
25
- }
26
- fontSize.addEventListener('change', updateSize, false);
27
- testText.addEventListener('input', updateTest, false);
28
- testText.addEventListener('change', updateTest, false);
29
- updateSize();
30
- }());
1
+ if (!('boxShadow' in document.body.style)) {
2
+ document.body.setAttribute('class', 'noBoxShadow');
3
+ }
4
+
5
+ document.body.addEventListener("click", function(e) {
6
+ var target = e.target;
7
+ if (target.tagName === "INPUT" &&
8
+ target.getAttribute('class').indexOf('liga') === -1) {
9
+ target.select();
10
+ }
11
+ });
12
+
13
+ (function() {
14
+ var fontSize = document.getElementById('fontSize'),
15
+ testDrive = document.getElementById('testDrive'),
16
+ testText = document.getElementById('testText');
17
+ function updateTest() {
18
+ testDrive.innerHTML = testText.value || String.fromCharCode(160);
19
+ if (window.icomoonLiga) {
20
+ window.icomoonLiga(testDrive);
21
+ }
22
+ }
23
+ function updateSize() {
24
+ testDrive.style.fontSize = fontSize.value + 'px';
25
+ }
26
+ fontSize.addEventListener('change', updateSize, false);
27
+ testText.addEventListener('input', updateTest, false);
28
+ testText.addEventListener('change', updateTest, false);
29
+ updateSize();
30
+ }());