@ionic/core 8.0.0-dev.11711408410.14d71406 → 8.0.0-dev.11711476529.17eae6ec

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 (189) hide show
  1. package/components/button.js +21 -7
  2. package/css/core.css +18 -0
  3. package/css/core.css.map +1 -1
  4. package/css/display.css +6 -0
  5. package/css/display.css.map +1 -1
  6. package/css/float-elements.css +6 -0
  7. package/css/float-elements.css.map +1 -1
  8. package/css/global.bundle.css +12 -0
  9. package/css/global.bundle.css.map +1 -1
  10. package/css/ionic-swiper.css +6 -0
  11. package/css/ionic-swiper.css.map +1 -1
  12. package/css/ionic.bundle.css.map +1 -1
  13. package/css/padding.css +6 -0
  14. package/css/padding.css.map +1 -1
  15. package/css/structure.css +6 -0
  16. package/css/structure.css.map +1 -1
  17. package/css/text-alignment.css +6 -0
  18. package/css/text-alignment.css.map +1 -1
  19. package/css/text-transformation.css +6 -0
  20. package/css/text-transformation.css.map +1 -1
  21. package/css/typography.css +6 -0
  22. package/css/typography.css.map +1 -1
  23. package/css/utils.bundle.css +30 -0
  24. package/css/utils.bundle.css.map +1 -1
  25. package/dist/cjs/ion-button_2.cjs.entry.js +20 -6
  26. package/dist/collection/components/accordion/accordion.ios.css +12 -0
  27. package/dist/collection/components/accordion/accordion.md.css +6 -0
  28. package/dist/collection/components/accordion-group/accordion-group.ios.css +12 -0
  29. package/dist/collection/components/accordion-group/accordion-group.md.css +18 -0
  30. package/dist/collection/components/action-sheet/action-sheet.ios.css +12 -0
  31. package/dist/collection/components/action-sheet/action-sheet.md.css +12 -0
  32. package/dist/collection/components/alert/alert.ios.css +18 -0
  33. package/dist/collection/components/alert/alert.md.css +18 -0
  34. package/dist/collection/components/avatar/avatar.ios.css +12 -0
  35. package/dist/collection/components/avatar/avatar.md.css +12 -0
  36. package/dist/collection/components/back-button/back-button.ios.css +12 -0
  37. package/dist/collection/components/back-button/back-button.md.css +12 -0
  38. package/dist/collection/components/backdrop/backdrop.ios.css +12 -0
  39. package/dist/collection/components/backdrop/backdrop.md.css +12 -0
  40. package/dist/collection/components/badge/badge.ios.css +12 -0
  41. package/dist/collection/components/badge/badge.md.css +12 -0
  42. package/dist/collection/components/breadcrumb/breadcrumb.ios.css +12 -0
  43. package/dist/collection/components/breadcrumb/breadcrumb.md.css +12 -0
  44. package/dist/collection/components/breadcrumbs/breadcrumbs.ios.css +6 -0
  45. package/dist/collection/components/breadcrumbs/breadcrumbs.md.css +6 -0
  46. package/dist/collection/components/button/button.ionic.css +565 -0
  47. package/dist/collection/components/button/button.ios.css +18 -0
  48. package/dist/collection/components/button/button.js +24 -10
  49. package/dist/collection/components/button/button.md.css +12 -0
  50. package/dist/collection/components/button/test/clear/button.e2e.js +6 -3
  51. package/dist/collection/components/button/test/shape/button.e2e.js +88 -0
  52. package/dist/collection/components/button/test/size/button.e2e.js +19 -1
  53. package/dist/collection/components/buttons/buttons.ios.css +18 -0
  54. package/dist/collection/components/buttons/buttons.md.css +18 -0
  55. package/dist/collection/components/card/card.ios.css +12 -0
  56. package/dist/collection/components/card/card.md.css +12 -0
  57. package/dist/collection/components/card-content/card-content.ios.css +12 -0
  58. package/dist/collection/components/card-content/card-content.md.css +12 -0
  59. package/dist/collection/components/card-header/card-header.ios.css +12 -0
  60. package/dist/collection/components/card-header/card-header.md.css +12 -0
  61. package/dist/collection/components/card-subtitle/card-subtitle.ios.css +12 -0
  62. package/dist/collection/components/card-subtitle/card-subtitle.md.css +12 -0
  63. package/dist/collection/components/card-title/card-title.ios.css +12 -0
  64. package/dist/collection/components/card-title/card-title.md.css +12 -0
  65. package/dist/collection/components/checkbox/checkbox.ios.css +18 -0
  66. package/dist/collection/components/checkbox/checkbox.md.css +18 -0
  67. package/dist/collection/components/chip/chip.ios.css +6 -0
  68. package/dist/collection/components/chip/chip.md.css +6 -0
  69. package/dist/collection/components/col/col.css +12 -0
  70. package/dist/collection/components/content/content.css +6 -0
  71. package/dist/collection/components/datetime/datetime.ios.css +12 -0
  72. package/dist/collection/components/datetime/datetime.md.css +12 -0
  73. package/dist/collection/components/datetime-button/datetime-button.ios.css +6 -0
  74. package/dist/collection/components/datetime-button/datetime-button.md.css +6 -0
  75. package/dist/collection/components/fab/fab.css +24 -0
  76. package/dist/collection/components/fab-button/fab-button.ios.css +12 -0
  77. package/dist/collection/components/fab-button/fab-button.md.css +12 -0
  78. package/dist/collection/components/fab-list/fab-list.css +12 -0
  79. package/dist/collection/components/footer/footer.ios.css +12 -0
  80. package/dist/collection/components/footer/footer.md.css +12 -0
  81. package/dist/collection/components/grid/grid.css +12 -0
  82. package/dist/collection/components/header/header.ios.css +12 -0
  83. package/dist/collection/components/header/header.md.css +12 -0
  84. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.ios.css +12 -0
  85. package/dist/collection/components/infinite-scroll-content/infinite-scroll-content.md.css +12 -0
  86. package/dist/collection/components/input/input.ios.css +18 -0
  87. package/dist/collection/components/input/input.md.css +36 -0
  88. package/dist/collection/components/item/item.ios.css +12 -0
  89. package/dist/collection/components/item/item.md.css +24 -0
  90. package/dist/collection/components/item-divider/item-divider.ios.css +18 -0
  91. package/dist/collection/components/item-divider/item-divider.md.css +18 -0
  92. package/dist/collection/components/item-group/item-group.ios.css +12 -0
  93. package/dist/collection/components/item-group/item-group.md.css +12 -0
  94. package/dist/collection/components/item-option/item-option.ios.css +12 -0
  95. package/dist/collection/components/item-option/item-option.md.css +12 -0
  96. package/dist/collection/components/item-options/item-options.ios.css +18 -0
  97. package/dist/collection/components/item-options/item-options.md.css +18 -0
  98. package/dist/collection/components/item-sliding/item-sliding.css +6 -0
  99. package/dist/collection/components/label/label.ios.css +18 -0
  100. package/dist/collection/components/label/label.md.css +18 -0
  101. package/dist/collection/components/list/list.ios.css +18 -0
  102. package/dist/collection/components/list/list.md.css +18 -0
  103. package/dist/collection/components/list-header/list-header.ios.css +18 -0
  104. package/dist/collection/components/list-header/list-header.md.css +18 -0
  105. package/dist/collection/components/loading/loading.ios.css +12 -0
  106. package/dist/collection/components/loading/loading.md.css +12 -0
  107. package/dist/collection/components/menu/menu.ios.css +12 -0
  108. package/dist/collection/components/menu/menu.md.css +12 -0
  109. package/dist/collection/components/menu-button/menu-button.ios.css +12 -0
  110. package/dist/collection/components/menu-button/menu-button.md.css +12 -0
  111. package/dist/collection/components/modal/modal.ios.css +12 -0
  112. package/dist/collection/components/modal/modal.md.css +12 -0
  113. package/dist/collection/components/nav/nav.css +6 -0
  114. package/dist/collection/components/note/note.ios.css +12 -0
  115. package/dist/collection/components/note/note.md.css +12 -0
  116. package/dist/collection/components/picker/picker.ios.css +12 -0
  117. package/dist/collection/components/picker/picker.md.css +12 -0
  118. package/dist/collection/components/picker-column/picker-column.css +6 -0
  119. package/dist/collection/components/picker-column-option/picker-column-option.ios.css +6 -0
  120. package/dist/collection/components/picker-column-option/picker-column-option.md.css +6 -0
  121. package/dist/collection/components/picker-legacy/picker.ios.css +12 -0
  122. package/dist/collection/components/picker-legacy/picker.md.css +12 -0
  123. package/dist/collection/components/picker-legacy-column/picker-column.ios.css +12 -0
  124. package/dist/collection/components/picker-legacy-column/picker-column.md.css +12 -0
  125. package/dist/collection/components/popover/popover.ios.css +12 -0
  126. package/dist/collection/components/popover/popover.md.css +12 -0
  127. package/dist/collection/components/progress-bar/progress-bar.ios.css +6 -0
  128. package/dist/collection/components/progress-bar/progress-bar.md.css +6 -0
  129. package/dist/collection/components/radio/radio.ios.css +18 -0
  130. package/dist/collection/components/radio/radio.md.css +18 -0
  131. package/dist/collection/components/range/range.ios.css +12 -0
  132. package/dist/collection/components/range/range.md.css +12 -0
  133. package/dist/collection/components/refresher/refresher.ios.css +12 -0
  134. package/dist/collection/components/refresher/refresher.md.css +12 -0
  135. package/dist/collection/components/reorder/reorder.ios.css +6 -0
  136. package/dist/collection/components/reorder/reorder.md.css +6 -0
  137. package/dist/collection/components/reorder-group/reorder-group.css +6 -0
  138. package/dist/collection/components/ripple-effect/ripple-effect.css +6 -0
  139. package/dist/collection/components/router-link/router-link.css +6 -0
  140. package/dist/collection/components/router-outlet/router-outlet.css +6 -0
  141. package/dist/collection/components/row/row.css +12 -0
  142. package/dist/collection/components/searchbar/searchbar.ios.css +12 -0
  143. package/dist/collection/components/searchbar/searchbar.md.css +12 -0
  144. package/dist/collection/components/segment/segment.ios.css +18 -0
  145. package/dist/collection/components/segment/segment.md.css +18 -0
  146. package/dist/collection/components/segment-button/segment-button.ios.css +12 -0
  147. package/dist/collection/components/segment-button/segment-button.md.css +12 -0
  148. package/dist/collection/components/select/select.ios.css +18 -0
  149. package/dist/collection/components/select/select.md.css +30 -0
  150. package/dist/collection/components/select-popover/select-popover.ios.css +18 -0
  151. package/dist/collection/components/select-popover/select-popover.md.css +18 -0
  152. package/dist/collection/components/skeleton-text/skeleton-text.css +6 -0
  153. package/dist/collection/components/spinner/spinner.css +6 -0
  154. package/dist/collection/components/split-pane/split-pane.ios.css +18 -0
  155. package/dist/collection/components/split-pane/split-pane.md.css +18 -0
  156. package/dist/collection/components/tab-bar/tab-bar.ios.css +18 -0
  157. package/dist/collection/components/tab-bar/tab-bar.md.css +18 -0
  158. package/dist/collection/components/tab-button/tab-button.ios.css +12 -0
  159. package/dist/collection/components/tab-button/tab-button.md.css +12 -0
  160. package/dist/collection/components/tabs/tabs.css +6 -0
  161. package/dist/collection/components/text/text.css +6 -0
  162. package/dist/collection/components/textarea/textarea.ios.css +24 -0
  163. package/dist/collection/components/textarea/textarea.md.css +36 -0
  164. package/dist/collection/components/thumbnail/thumbnail.css +6 -0
  165. package/dist/collection/components/title/title.ios.css +6 -0
  166. package/dist/collection/components/title/title.md.css +6 -0
  167. package/dist/collection/components/toast/toast.ios.css +12 -0
  168. package/dist/collection/components/toast/toast.md.css +12 -0
  169. package/dist/collection/components/toggle/toggle.ios.css +18 -0
  170. package/dist/collection/components/toggle/toggle.md.css +18 -0
  171. package/dist/collection/components/toolbar/toolbar.ios.css +12 -0
  172. package/dist/collection/components/toolbar/toolbar.md.css +12 -0
  173. package/dist/docs.json +19 -7
  174. package/dist/esm/ion-button_2.entry.js +21 -7
  175. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  176. package/dist/html.html-data.json +9 -0
  177. package/dist/ionic/ionic.esm.js +1 -1
  178. package/dist/ionic/p-1cc1ce24.system.entry.js +4 -0
  179. package/dist/ionic/p-9385f3c5.entry.js +4 -0
  180. package/dist/ionic/p-c8985963.system.js +1 -1
  181. package/dist/types/components/button/button.d.ts +6 -2
  182. package/dist/types/components.d.ts +4 -4
  183. package/hydrate/index.js +20 -6
  184. package/package.json +1 -1
  185. package/css/core.ionic.css +0 -13
  186. package/css/core.ionic.css.map +0 -1
  187. package/dist/collection/components/button/test/round/button.e2e.js +0 -52
  188. package/dist/ionic/p-41908d5c.entry.js +0 -4
  189. package/dist/ionic/p-e4cd4316.system.entry.js +0 -4
@@ -0,0 +1,565 @@
1
+ /**
2
+ * Convert a pixels given value into rem
3
+ *
4
+ * @param pixels - Value in pixels to be converted (i.e. px)
5
+ * @param context (optional) - Baseline value
6
+ */
7
+ /**
8
+ * Convert a font size to a dynamic font size.
9
+ * Fonts that participate in Dynamic Type should use
10
+ * dynamic font sizes.
11
+ * @param size - The initial font size including the unit (i.e. px or pt)
12
+ * @param unit (optional) - The unit to convert to. Use this if you want to
13
+ * convert to a unit other than $baselineUnit.
14
+ */
15
+ /**
16
+ * Convert a font size to a dynamic font size but impose
17
+ * a maximum font size.
18
+ * @param size - The initial font size including the unit (i.e. px or pt)
19
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
20
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
21
+ * convert to a unit other than $baselineUnit.
22
+ */
23
+ /**
24
+ * Convert a font size to a dynamic font size but impose
25
+ * a minimum font size.
26
+ * @param size - The initial font size including the unit (i.e. px or pt)
27
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
28
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
29
+ * convert to a unit other than $baselineUnit.
30
+ */
31
+ /**
32
+ * Convert a font size to a dynamic font size but impose
33
+ * maximum and minimum font sizes.
34
+ * @param size - The initial font size including the unit (i.e. px or pt)
35
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
36
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
37
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
38
+ * convert to a unit other than $baselineUnit.
39
+ */
40
+ /**
41
+ * A heuristic that applies CSS to tablet
42
+ * viewports.
43
+ *
44
+ * Usage:
45
+ * @include tablet-viewport() {
46
+ * :host {
47
+ * background-color: green;
48
+ * }
49
+ * }
50
+ */
51
+ /**
52
+ * A heuristic that applies CSS to mobile
53
+ * viewports (i.e. phones, not tablets).
54
+ *
55
+ * Usage:
56
+ * @include mobile-viewport() {
57
+ * :host {
58
+ * background-color: blue;
59
+ * }
60
+ * }
61
+ */
62
+ :host {
63
+ /**
64
+ * @prop --background: Background of the button
65
+ * @prop --background-activated: Background of the button when pressed. Note: setting this will interfere with the Material Design ripple.
66
+ * @prop --background-activated-opacity: Opacity of the button when pressed
67
+ * @prop --background-focused: Background of the button when focused with the tab key
68
+ * @prop --background-focused-opacity: Opacity of the button when focused with the tab key
69
+ * @prop --background-hover: Background of the button on hover
70
+ * @prop --background-hover-opacity: Opacity of the background on hover
71
+ *
72
+ * @prop --color: Text color of the button
73
+ * @prop --color-activated: Text color of the button when pressed
74
+ * @prop --color-focused: Text color of the button when focused with the tab key
75
+ * @prop --color-hover: Text color of the button when hover
76
+ *
77
+ * @prop --transition: Transition of the button
78
+ *
79
+ * @prop --border-radius: Border radius of the button
80
+ * @prop --border-width: Border width of the button
81
+ * @prop --border-style: Border style of the button
82
+ * @prop --border-color: Border color of the button
83
+ *
84
+ * @prop --ripple-color: Color of the button ripple effect
85
+ *
86
+ * @prop --box-shadow: Box shadow of the button
87
+ * @prop --opacity: Opacity of the button
88
+ *
89
+ * @prop --padding-top: Top padding of the button
90
+ * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button
91
+ * @prop --padding-bottom: Bottom padding of the button
92
+ * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button
93
+ */
94
+ --overflow: hidden;
95
+ --ripple-color: currentColor;
96
+ --border-width: initial;
97
+ --border-color: initial;
98
+ --border-style: initial;
99
+ --color-activated: var(--color);
100
+ --color-focused: var(--color);
101
+ --color-hover: var(--color);
102
+ --box-shadow: none;
103
+ display: inline-block;
104
+ width: auto;
105
+ color: var(--color);
106
+ font-family: var(--ion-font-family, inherit);
107
+ text-align: center;
108
+ text-decoration: none;
109
+ white-space: normal;
110
+ user-select: none;
111
+ vertical-align: top;
112
+ vertical-align: -webkit-baseline-middle;
113
+ font-kerning: none;
114
+ }
115
+
116
+ :host(.button-disabled) {
117
+ cursor: default;
118
+ opacity: 0.5;
119
+ pointer-events: none;
120
+ }
121
+
122
+ :host(.button-solid) {
123
+ --background: var(--ion-color-primary, #0054e9);
124
+ --color: var(--ion-color-primary-contrast, #fff);
125
+ }
126
+
127
+ :host(.button-outline) {
128
+ --border-color: var(--ion-color-primary, #0054e9);
129
+ --background: transparent;
130
+ --color: var(--ion-color-primary, #0054e9);
131
+ }
132
+
133
+ :host(.button-clear) {
134
+ --border-width: 0;
135
+ --background: transparent;
136
+ --color: var(--ion-color-primary, #0054e9);
137
+ }
138
+
139
+ :host(.button-block) {
140
+ display: block;
141
+ }
142
+
143
+ :host(.button-block) .button-native {
144
+ margin-left: 0;
145
+ margin-right: 0;
146
+ width: 100%;
147
+ clear: both;
148
+ contain: content;
149
+ }
150
+
151
+ :host(.button-block) .button-native::after {
152
+ clear: both;
153
+ }
154
+
155
+ :host(.button-full) {
156
+ display: block;
157
+ }
158
+
159
+ :host(.button-full) .button-native {
160
+ margin-left: 0;
161
+ margin-right: 0;
162
+ width: 100%;
163
+ contain: content;
164
+ }
165
+
166
+ :host(.button-full:not(.button-round)) .button-native {
167
+ border-radius: 0;
168
+ border-right-width: 0;
169
+ border-left-width: 0;
170
+ }
171
+
172
+ .button-native {
173
+ border-radius: var(--border-radius);
174
+ -moz-osx-font-smoothing: grayscale;
175
+ -webkit-font-smoothing: antialiased;
176
+ margin-left: 0;
177
+ margin-right: 0;
178
+ margin-top: 0;
179
+ margin-bottom: 0;
180
+ -webkit-padding-start: var(--padding-start);
181
+ padding-inline-start: var(--padding-start);
182
+ -webkit-padding-end: var(--padding-end);
183
+ padding-inline-end: var(--padding-end);
184
+ padding-top: var(--padding-top);
185
+ padding-bottom: var(--padding-bottom);
186
+ font-family: inherit;
187
+ font-size: inherit;
188
+ font-style: inherit;
189
+ font-weight: inherit;
190
+ letter-spacing: inherit;
191
+ text-decoration: inherit;
192
+ text-indent: inherit;
193
+ text-overflow: inherit;
194
+ text-transform: inherit;
195
+ text-align: inherit;
196
+ white-space: inherit;
197
+ color: inherit;
198
+ display: flex;
199
+ position: relative;
200
+ align-items: center;
201
+ width: 100%;
202
+ height: 100%;
203
+ min-height: inherit;
204
+ transition: var(--transition);
205
+ border-width: var(--border-width);
206
+ border-style: var(--border-style);
207
+ border-color: var(--border-color);
208
+ outline: none;
209
+ background: var(--background);
210
+ line-height: 1;
211
+ box-shadow: var(--box-shadow);
212
+ contain: layout style;
213
+ cursor: pointer;
214
+ opacity: var(--opacity);
215
+ overflow: var(--overflow);
216
+ z-index: 0;
217
+ box-sizing: border-box;
218
+ appearance: none;
219
+ }
220
+
221
+ .button-native::-moz-focus-inner {
222
+ border: 0;
223
+ }
224
+
225
+ .button-inner {
226
+ display: flex;
227
+ position: relative;
228
+ flex-flow: row nowrap;
229
+ flex-shrink: 0;
230
+ align-items: center;
231
+ justify-content: center;
232
+ width: 100%;
233
+ height: 100%;
234
+ z-index: 1;
235
+ }
236
+
237
+ ::slotted([slot=start]),
238
+ ::slotted([slot=end]) {
239
+ flex-shrink: 0;
240
+ }
241
+
242
+ ::slotted(ion-icon) {
243
+ font-size: 1.35em;
244
+ pointer-events: none;
245
+ }
246
+
247
+ ::slotted(ion-icon[slot=start]) {
248
+ -webkit-margin-start: -0.3em;
249
+ margin-inline-start: -0.3em;
250
+ -webkit-margin-end: 0.3em;
251
+ margin-inline-end: 0.3em;
252
+ margin-top: 0;
253
+ margin-bottom: 0;
254
+ }
255
+
256
+ ::slotted(ion-icon[slot=end]) {
257
+ -webkit-margin-start: 0.3em;
258
+ margin-inline-start: 0.3em;
259
+ -webkit-margin-end: -0.2em;
260
+ margin-inline-end: -0.2em;
261
+ margin-top: 0;
262
+ margin-bottom: 0;
263
+ }
264
+
265
+ ion-ripple-effect {
266
+ color: var(--ripple-color);
267
+ }
268
+
269
+ .button-native::after {
270
+ left: 0;
271
+ right: 0;
272
+ top: 0;
273
+ bottom: 0;
274
+ position: absolute;
275
+ content: "";
276
+ opacity: 0;
277
+ }
278
+
279
+ :host(.ion-focused) {
280
+ color: var(--color-focused);
281
+ }
282
+
283
+ :host(.ion-focused) .button-native::after {
284
+ background: var(--background-focused);
285
+ opacity: var(--background-focused-opacity);
286
+ }
287
+
288
+ @media (any-hover: hover) {
289
+ :host(:hover) {
290
+ color: var(--color-hover);
291
+ }
292
+ :host(:hover) .button-native::after {
293
+ background: var(--background-hover);
294
+ opacity: var(--background-hover-opacity);
295
+ }
296
+ }
297
+ :host(.ion-activated) {
298
+ color: var(--color-activated);
299
+ }
300
+
301
+ :host(.ion-activated) .button-native::after {
302
+ background: var(--background-activated);
303
+ opacity: var(--background-activated-opacity);
304
+ }
305
+
306
+ :host(.button-solid.ion-color) .button-native {
307
+ background: var(--ion-color-base);
308
+ color: var(--ion-color-contrast);
309
+ }
310
+
311
+ :host(.button-outline.ion-color) .button-native {
312
+ border-color: var(--ion-color-base);
313
+ background: transparent;
314
+ color: var(--ion-color-base);
315
+ }
316
+
317
+ :host(.button-clear.ion-color) .button-native {
318
+ background: transparent;
319
+ color: var(--ion-color-base);
320
+ }
321
+
322
+ :host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
323
+ color: var(--ion-toolbar-color, var(--color));
324
+ }
325
+
326
+ :host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
327
+ border-color: var(--ion-toolbar-color, var(--color, var(--border-color)));
328
+ }
329
+
330
+ :host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
331
+ background: var(--ion-toolbar-color, var(--background));
332
+ color: var(--ion-toolbar-background, var(--color));
333
+ }
334
+
335
+ :host(.button-outline.ion-activated.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
336
+ background: var(--ion-toolbar-color, var(--color));
337
+ color: var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff));
338
+ }
339
+
340
+ /**
341
+ * Convert a pixels given value into rem
342
+ *
343
+ * @param pixels - Value in pixels to be converted (i.e. px)
344
+ * @param context (optional) - Baseline value
345
+ */
346
+ /**
347
+ * Convert a font size to a dynamic font size.
348
+ * Fonts that participate in Dynamic Type should use
349
+ * dynamic font sizes.
350
+ * @param size - The initial font size including the unit (i.e. px or pt)
351
+ * @param unit (optional) - The unit to convert to. Use this if you want to
352
+ * convert to a unit other than $baselineUnit.
353
+ */
354
+ /**
355
+ * Convert a font size to a dynamic font size but impose
356
+ * a maximum font size.
357
+ * @param size - The initial font size including the unit (i.e. px or pt)
358
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
359
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
360
+ * convert to a unit other than $baselineUnit.
361
+ */
362
+ /**
363
+ * Convert a font size to a dynamic font size but impose
364
+ * a minimum font size.
365
+ * @param size - The initial font size including the unit (i.e. px or pt)
366
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
367
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
368
+ * convert to a unit other than $baselineUnit.
369
+ */
370
+ /**
371
+ * Convert a font size to a dynamic font size but impose
372
+ * maximum and minimum font sizes.
373
+ * @param size - The initial font size including the unit (i.e. px or pt)
374
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
375
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
376
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
377
+ * convert to a unit other than $baselineUnit.
378
+ */
379
+ /**
380
+ * A heuristic that applies CSS to tablet
381
+ * viewports.
382
+ *
383
+ * Usage:
384
+ * @include tablet-viewport() {
385
+ * :host {
386
+ * background-color: green;
387
+ * }
388
+ * }
389
+ */
390
+ /**
391
+ * A heuristic that applies CSS to mobile
392
+ * viewports (i.e. phones, not tablets).
393
+ *
394
+ * Usage:
395
+ * @include mobile-viewport() {
396
+ * :host {
397
+ * background-color: blue;
398
+ * }
399
+ * }
400
+ */
401
+ :host {
402
+ --border-radius: 0.5rem;
403
+ --padding-bottom: var(--padding-top);
404
+ --padding-end: 1rem;
405
+ --padding-start: var(--padding-end);
406
+ --padding-top: 0.75rem;
407
+ --focus-ring-color: #9ec4fd;
408
+ --focus-ring-width: 2px;
409
+ position: relative;
410
+ min-height: 2.5rem;
411
+ font-size: min(0.875rem, 42px);
412
+ }
413
+ :host::after {
414
+ left: 0;
415
+ right: 0;
416
+ top: 50%;
417
+ position: absolute;
418
+ height: 100%;
419
+ min-height: 3rem;
420
+ transform: translateY(-50%);
421
+ content: "";
422
+ cursor: pointer;
423
+ z-index: 1;
424
+ }
425
+ :host ::slotted(ion-icon[slot=start]) {
426
+ -webkit-margin-end: 0.5rem;
427
+ margin-inline-end: 0.5rem;
428
+ }
429
+ :host ::slotted(ion-icon[slot=end]) {
430
+ -webkit-margin-start: 0.5rem;
431
+ margin-inline-start: 0.5rem;
432
+ }
433
+
434
+ /* Extra Small and Small Button */
435
+ :host(.button-xsmall) ::slotted(ion-icon[slot=start]),
436
+ :host(.button-small) ::slotted(ion-icon[slot=start]) {
437
+ -webkit-margin-end: 0.25rem;
438
+ margin-inline-end: 0.25rem;
439
+ }
440
+ :host(.button-xsmall) ::slotted(ion-icon[slot=end]),
441
+ :host(.button-small) ::slotted(ion-icon[slot=end]) {
442
+ -webkit-margin-start: 0.25rem;
443
+ margin-inline-start: 0.25rem;
444
+ }
445
+
446
+ /* Extra Small Button */
447
+ :host(.button-xsmall) {
448
+ --border-radius: 0.25rem;
449
+ --padding-top: 0.25rem;
450
+ --padding-end: 0.75rem;
451
+ min-height: 1.5rem;
452
+ font-size: min(0.75rem, 36px);
453
+ }
454
+
455
+ /* Small Button */
456
+ :host(.button-small) {
457
+ --border-radius: 0.25rem;
458
+ --padding-top: 0.5rem;
459
+ --padding-end: 1rem;
460
+ min-height: 2rem;
461
+ font-size: min(0.75rem, 36px);
462
+ }
463
+
464
+ /* Large Button */
465
+ :host(.button-large) {
466
+ --padding-top: 1rem;
467
+ --padding-end: 1.5rem;
468
+ min-height: 3rem;
469
+ font-size: min(1rem, 48px);
470
+ }
471
+
472
+ /* Extra Large Button */
473
+ :host(.button-xlarge) {
474
+ --padding-top: 1rem;
475
+ --padding-end: 2rem;
476
+ min-height: 3.5rem;
477
+ font-size: min(1.25rem, 60px);
478
+ }
479
+
480
+ /* Button containing only an icon */
481
+ ::slotted(ion-icon[slot=start]),
482
+ ::slotted(ion-icon[slot=end]),
483
+ ::slotted(ion-icon[slot=icon-only]) {
484
+ font-size: 1em;
485
+ }
486
+
487
+ /* Button extra small */
488
+ :host(.button-has-icon-only.button-xsmall) {
489
+ --padding-end: 0.375rem;
490
+ }
491
+
492
+ /* Button small */
493
+ :host(.button-has-icon-only.button-small) {
494
+ --padding-end: 0.625rem;
495
+ }
496
+
497
+ /* Default */
498
+ :host(.button-has-icon-only) {
499
+ --padding-end: 0.8125rem;
500
+ }
501
+
502
+ /* Button large */
503
+ :host(.button-has-icon-only.button-large) {
504
+ --padding-end: 1rem;
505
+ }
506
+
507
+ /* Button extra large */
508
+ :host(.button-has-icon-only.button-xlarge) {
509
+ --padding-end: 1.125rem;
510
+ }
511
+
512
+ :host(.button-rectangular) {
513
+ --border-radius: 0;
514
+ }
515
+
516
+ :host(.button-round) {
517
+ --border-radius: 62.4375rem;
518
+ }
519
+
520
+ :host(.ion-focused) .button-native {
521
+ outline: var(--focus-ring-width) solid var(--focus-ring-color);
522
+ outline-offset: 2px;
523
+ }
524
+
525
+ :host(.button-solid) {
526
+ --background-activated: var(--ion-color-primary-shade, #004acd);
527
+ }
528
+
529
+ :host(.button-outline) {
530
+ --border-width: 1px;
531
+ --border-style: solid;
532
+ --background-activated: #e3e3e3;
533
+ --background-activated-opacity: 1;
534
+ --background-focused: transparent;
535
+ --background-hover: transparent;
536
+ --background-focused-opacity: 0.1;
537
+ --color-activated: var(--ion-color-primary, #0054e9);
538
+ }
539
+
540
+ :host(.button-outline.ion-focused) {
541
+ --border-color: transparent;
542
+ }
543
+
544
+ :host(.button-clear) {
545
+ --background-activated: #e3e3e3;
546
+ --background-activated-opacity: 1;
547
+ --background-focused: transparent;
548
+ --background-hover: transparent;
549
+ }
550
+
551
+ :host(.button-outline),
552
+ :host(.button-clear) {
553
+ --background-hover: #121212;
554
+ --background-hover-opacity: 0.04;
555
+ }
556
+
557
+ :host(.button-disabled) {
558
+ --color: #c9c9c9;
559
+ --border-color: var(--color);
560
+ opacity: 1;
561
+ }
562
+
563
+ :host(.button-solid.button-disabled) {
564
+ --background: #f5f5f5;
565
+ }
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Convert a pixels given value into rem
3
+ *
4
+ * @param pixels - Value in pixels to be converted (i.e. px)
5
+ * @param context (optional) - Baseline value
6
+ */
1
7
  /**
2
8
  * Convert a font size to a dynamic font size.
3
9
  * Fonts that participate in Dynamic Type should use
@@ -331,6 +337,12 @@ ion-ripple-effect {
331
337
  color: var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff));
332
338
  }
333
339
 
340
+ /**
341
+ * Convert a pixels given value into rem
342
+ *
343
+ * @param pixels - Value in pixels to be converted (i.e. px)
344
+ * @param context (optional) - Baseline value
345
+ */
334
346
  /**
335
347
  * Convert a font size to a dynamic font size.
336
348
  * Fonts that participate in Dynamic Type should use
@@ -386,6 +398,12 @@ ion-ripple-effect {
386
398
  * }
387
399
  * }
388
400
  */
401
+ /**
402
+ * Convert a pixels given value into rem
403
+ *
404
+ * @param pixels - Value in pixels to be converted (i.e. px)
405
+ * @param context (optional) - Baseline value
406
+ */
389
407
  /**
390
408
  * Convert a font size to a dynamic font size.
391
409
  * Fonts that participate in Dynamic Type should use
@@ -122,6 +122,20 @@ export class Button {
122
122
  }
123
123
  return 'bounded';
124
124
  }
125
+ /**
126
+ * Disable the "xsmall" and "xlarge" sizes if the theme is "ios" or "md"
127
+ */
128
+ getSize() {
129
+ const theme = getIonTheme(this);
130
+ const { size } = this;
131
+ if (size === undefined && this.inItem) {
132
+ return 'small';
133
+ }
134
+ if ((theme === 'ios' || theme === 'md') && (size === 'xsmall' || size === 'xlarge')) {
135
+ return undefined;
136
+ }
137
+ return size;
138
+ }
125
139
  /**
126
140
  * Finds the form element based on the provided `form` selector
127
141
  * or element reference provided.
@@ -182,9 +196,9 @@ export class Button {
182
196
  }
183
197
  }
184
198
  render() {
185
- const { buttonType, type, disabled, rel, target, size, href, color, expand, hasIconOnly, shape, strong, inheritedAttributes, } = this;
199
+ const { buttonType, type, disabled, rel, target, href, color, expand, hasIconOnly, shape, strong, inheritedAttributes, } = this;
186
200
  const theme = getIonTheme(this);
187
- const finalSize = size === undefined && this.inItem ? 'small' : size;
201
+ const finalSize = this.getSize();
188
202
  const TagType = href === undefined ? 'button' : 'a';
189
203
  const attrs = TagType === 'button'
190
204
  ? { type }
@@ -212,7 +226,7 @@ export class Button {
212
226
  {
213
227
  type !== 'button' && this.renderHiddenButton();
214
228
  }
215
- return (h(Host, { key: '8747e78e8ed107ee28ce351c5937613705dc4d7e', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses(color, {
229
+ return (h(Host, { key: 'ad194a242d68360d9bbbd025a409af09d87b4d34', onClick: this.handleClick, "aria-disabled": disabled ? 'true' : null, class: createColorClasses(color, {
216
230
  [theme]: true,
217
231
  [buttonType]: true,
218
232
  [`${buttonType}-${expand}`]: expand !== undefined,
@@ -227,7 +241,7 @@ export class Button {
227
241
  'button-disabled': disabled,
228
242
  'ion-activatable': true,
229
243
  'ion-focusable': true,
230
- }) }, h(TagType, Object.assign({ key: '4db8bfcb127a3a8eb70ee0dc075a181f6af59635' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), h("span", { key: 'cdb4ff90e0163f9fc557957bef1a2e95d1aa4acf', class: "button-inner" }, h("slot", { key: '3c57a70645a1818dc2cd8887dbf98448c757b399', name: "icon-only", onSlotchange: this.slotChanged }), h("slot", { key: 'c5edf0cf141395cb9587f3dd8cd39240e38d8100', name: "start" }), h("slot", { key: 'be7ad33a9d0a50db11a33fdb33dbd03fb71b50ce' }), h("slot", { key: 'e7fb30ccdeb8a3231ef8432c65921209b3325ce4', name: "end" })), theme === 'md' && h("ion-ripple-effect", { type: this.rippleType }))));
244
+ }) }, h(TagType, Object.assign({ key: '6ca717c26b637859f780c22f8b4a7e921b723e12' }, attrs, { class: "button-native", part: "native", disabled: disabled, onFocus: this.onFocus, onBlur: this.onBlur }, inheritedAttributes), h("span", { key: '60ff7c727df3fee342bed8839a493057149e2600', class: "button-inner" }, h("slot", { key: 'e048881659c50129e29668694ef11420400c9059', name: "icon-only", onSlotchange: this.slotChanged }), h("slot", { key: '3783397b79a5f4756fce1ba546c9b3e00e8afb69', name: "start" }), h("slot", { key: '1e3c2fd3969bf4c83e432e2a1a2058d699d9685a' }), h("slot", { key: 'badb9b5954d8d8a19a53ff4be3ff5d0e0b3354ae', name: "end" })), theme === 'md' && h("ion-ripple-effect", { type: this.rippleType }))));
231
245
  }
232
246
  static get is() { return "ion-button"; }
233
247
  static get encapsulation() { return "shadow"; }
@@ -235,14 +249,14 @@ export class Button {
235
249
  return {
236
250
  "ios": ["button.ios.scss"],
237
251
  "md": ["button.md.scss"],
238
- "ionic": ["button.md.scss"]
252
+ "ionic": ["button.ionic.scss"]
239
253
  };
240
254
  }
241
255
  static get styleUrls() {
242
256
  return {
243
257
  "ios": ["button.ios.css"],
244
258
  "md": ["button.md.css"],
245
- "ionic": ["button.md.css"]
259
+ "ionic": ["button.ionic.css"]
246
260
  };
247
261
  }
248
262
  static get properties() {
@@ -440,8 +454,8 @@ export class Button {
440
454
  "type": "string",
441
455
  "mutable": false,
442
456
  "complexType": {
443
- "original": "'round'",
444
- "resolved": "\"round\" | undefined",
457
+ "original": "'round' | 'rectangular'",
458
+ "resolved": "\"rectangular\" | \"round\" | undefined",
445
459
  "references": {}
446
460
  },
447
461
  "required": false,
@@ -457,8 +471,8 @@ export class Button {
457
471
  "type": "string",
458
472
  "mutable": false,
459
473
  "complexType": {
460
- "original": "'small' | 'default' | 'large'",
461
- "resolved": "\"default\" | \"large\" | \"small\" | undefined",
474
+ "original": "'xsmall' | 'small' | 'default' | 'large' | 'xlarge'",
475
+ "resolved": "\"default\" | \"large\" | \"small\" | \"xlarge\" | \"xsmall\" | undefined",
462
476
  "references": {}
463
477
  },
464
478
  "required": false,
@@ -1,3 +1,9 @@
1
+ /**
2
+ * Convert a pixels given value into rem
3
+ *
4
+ * @param pixels - Value in pixels to be converted (i.e. px)
5
+ * @param context (optional) - Baseline value
6
+ */
1
7
  /**
2
8
  * Convert a font size to a dynamic font size.
3
9
  * Fonts that participate in Dynamic Type should use
@@ -331,6 +337,12 @@ ion-ripple-effect {
331
337
  color: var(--ion-toolbar-background, var(--background), var(--ion-color-primary-contrast, #fff));
332
338
  }
333
339
 
340
+ /**
341
+ * Convert a pixels given value into rem
342
+ *
343
+ * @param pixels - Value in pixels to be converted (i.e. px)
344
+ * @param context (optional) - Baseline value
345
+ */
334
346
  /**
335
347
  * Convert a font size to a dynamic font size.
336
348
  * Fonts that participate in Dynamic Type should use