@ionic/core 8.2.3-dev.11721225504.1476a6ac → 8.2.3-dev.11724326037.1eacfaff

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 (124) hide show
  1. package/components/button.js +7 -6
  2. package/components/ion-badge.js +1 -1
  3. package/components/ion-card-content.js +5 -5
  4. package/components/ion-card-header.js +4 -4
  5. package/components/ion-card-subtitle.js +4 -4
  6. package/components/ion-card.js +3 -3
  7. package/components/ion-chip.js +1 -1
  8. package/components/ion-input-password-toggle.js +11 -7
  9. package/components/item.js +11 -4
  10. package/components/list.js +1 -1
  11. package/components/ripple-effect.js +15 -5
  12. package/components/spinner.js +4 -5
  13. package/css/core.css +1 -1
  14. package/css/core.css.map +1 -1
  15. package/css/ionic.bundle.css +1 -1
  16. package/css/ionic.bundle.css.map +1 -1
  17. package/dist/cjs/ion-avatar_3.cjs.entry.js +1 -1
  18. package/dist/cjs/ion-button_2.cjs.entry.js +6 -5
  19. package/dist/cjs/ion-card_5.cjs.entry.js +16 -16
  20. package/dist/cjs/ion-chip.cjs.entry.js +1 -1
  21. package/dist/cjs/ion-input-password-toggle.cjs.entry.js +11 -7
  22. package/dist/cjs/ion-item_8.cjs.entry.js +12 -5
  23. package/dist/cjs/ion-ripple-effect.cjs.entry.js +14 -4
  24. package/dist/cjs/ion-spinner.cjs.entry.js +3 -4
  25. package/dist/cjs/ionic.cjs.js +1 -1
  26. package/dist/cjs/loader.cjs.js +1 -1
  27. package/dist/collection/components/badge/badge.ionic.css +4 -4
  28. package/dist/collection/components/badge/test/basic/badge.e2e.js +1 -1
  29. package/dist/collection/components/button/button.ionic.css +346 -172
  30. package/dist/collection/components/button/button.ios.css +87 -20
  31. package/dist/collection/components/button/button.js +4 -3
  32. package/dist/collection/components/button/button.md.css +87 -20
  33. package/dist/collection/components/button/test/basic/button.e2e.js +3 -3
  34. package/dist/collection/components/button/test/clear/button.e2e.js +1 -1
  35. package/dist/collection/components/button/test/outline/button.e2e.js +1 -1
  36. package/dist/collection/components/button/test/states/button.e2e.js +3 -3
  37. package/dist/collection/components/card/card.ionic.css +61 -10
  38. package/dist/collection/components/card/card.ios.css +37 -12
  39. package/dist/collection/components/card/card.md.css +37 -12
  40. package/dist/collection/components/card-content/card-content.ionic.css +92 -0
  41. package/dist/collection/components/card-content/card-content.ios.css +4 -1
  42. package/dist/collection/components/card-content/card-content.js +3 -3
  43. package/dist/collection/components/card-content/card-content.md.css +4 -1
  44. package/dist/collection/components/card-header/card-header.ionic.css +89 -0
  45. package/dist/collection/components/card-header/card-header.ios.css +15 -15
  46. package/dist/collection/components/card-header/card-header.js +4 -4
  47. package/dist/collection/components/card-header/card-header.md.css +15 -15
  48. package/dist/collection/components/card-subtitle/card-subtitle.ionic.css +148 -0
  49. package/dist/collection/components/card-subtitle/card-subtitle.js +4 -4
  50. package/dist/collection/components/card-title/card-title.ios.css +61 -0
  51. package/dist/collection/components/card-title/card-title.md.css +61 -0
  52. package/dist/collection/components/chip/chip.ionic.css +22 -1
  53. package/dist/collection/components/chip/test/basic/chip.e2e.js +28 -29
  54. package/dist/collection/components/input-password-toggle/input-password-toggle.common.css +61 -0
  55. package/dist/collection/components/input-password-toggle/input-password-toggle.ionic.css +137 -0
  56. package/dist/collection/components/input-password-toggle/input-password-toggle.js +9 -7
  57. package/dist/collection/components/input-password-toggle/test/basic/input-password-toggle.e2e.js +1 -1
  58. package/dist/collection/components/item/item.ionic.css +77 -65
  59. package/dist/collection/components/item/item.js +10 -3
  60. package/dist/collection/components/item-sliding/test/basic/item-sliding.e2e.js +2 -2
  61. package/dist/collection/components/list/list.ionic.css +1 -0
  62. package/dist/collection/components/ripple-effect/ripple-effect.ionic.css +154 -0
  63. package/dist/collection/components/ripple-effect/ripple-effect.js +7 -3
  64. package/dist/collection/components/spinner/spinner.js +4 -5
  65. package/dist/collection/themes/ionic/test/colors/theme.e2e.js +120 -0
  66. package/dist/docs.json +157 -1
  67. package/dist/esm/ion-avatar_3.entry.js +1 -1
  68. package/dist/esm/ion-button_2.entry.js +7 -6
  69. package/dist/esm/ion-card_5.entry.js +16 -16
  70. package/dist/esm/ion-chip.entry.js +1 -1
  71. package/dist/esm/ion-input-password-toggle.entry.js +11 -7
  72. package/dist/esm/ion-item_8.entry.js +12 -5
  73. package/dist/esm/ion-ripple-effect.entry.js +14 -4
  74. package/dist/esm/ion-spinner.entry.js +4 -5
  75. package/dist/esm/ionic.js +1 -1
  76. package/dist/esm/loader.js +1 -1
  77. package/dist/esm-es5/ion-avatar_3.entry.js +1 -1
  78. package/dist/esm-es5/ion-button_2.entry.js +1 -1
  79. package/dist/esm-es5/ion-card_5.entry.js +1 -1
  80. package/dist/esm-es5/ion-chip.entry.js +1 -1
  81. package/dist/esm-es5/ion-input-password-toggle.entry.js +1 -1
  82. package/dist/esm-es5/ion-item_8.entry.js +1 -1
  83. package/dist/esm-es5/ion-ripple-effect.entry.js +1 -1
  84. package/dist/esm-es5/ion-spinner.entry.js +1 -1
  85. package/dist/esm-es5/ionic.js +1 -1
  86. package/dist/esm-es5/loader.js +1 -1
  87. package/dist/ionic/ionic.esm.js +1 -1
  88. package/dist/ionic/p-22952d7a.system.entry.js +4 -0
  89. package/dist/ionic/p-33dd8047.system.entry.js +4 -0
  90. package/dist/ionic/p-3d9c39bc.entry.js +4 -0
  91. package/dist/ionic/p-4f053633.system.entry.js +4 -0
  92. package/dist/ionic/p-6d47fa40.entry.js +4 -0
  93. package/dist/ionic/p-7b590e46.system.js +1 -1
  94. package/dist/ionic/p-81350e4b.system.entry.js +4 -0
  95. package/dist/ionic/p-8b09c4cb.system.entry.js +4 -0
  96. package/dist/ionic/p-91b33f25.entry.js +4 -0
  97. package/dist/ionic/p-a0e155e1.system.entry.js +4 -0
  98. package/dist/ionic/p-a814eee1.entry.js +4 -0
  99. package/dist/ionic/p-b4b44bf9.system.entry.js +4 -0
  100. package/dist/ionic/{p-3ce954c7.entry.js → p-c11fdca2.entry.js} +1 -1
  101. package/dist/ionic/p-c1bb715a.entry.js +4 -0
  102. package/dist/ionic/p-d3c9617d.system.entry.js +4 -0
  103. package/dist/ionic/p-d45fd591.entry.js +4 -0
  104. package/dist/ionic/p-f1aa5723.entry.js +4 -0
  105. package/dist/types/components/item/item.d.ts +5 -0
  106. package/hydrate/index.js +65 -44
  107. package/package.json +1 -1
  108. package/dist/collection/components/input-password-toggle/input-password-toggle.css +0 -0
  109. package/dist/ionic/p-128f0f15.system.entry.js +0 -4
  110. package/dist/ionic/p-1be0295f.entry.js +0 -4
  111. package/dist/ionic/p-41c9fb60.entry.js +0 -4
  112. package/dist/ionic/p-42452dc9.entry.js +0 -4
  113. package/dist/ionic/p-4d6c2031.system.entry.js +0 -4
  114. package/dist/ionic/p-8102551e.system.entry.js +0 -4
  115. package/dist/ionic/p-85ca50a9.system.entry.js +0 -4
  116. package/dist/ionic/p-924deb6b.entry.js +0 -4
  117. package/dist/ionic/p-935801cc.entry.js +0 -4
  118. package/dist/ionic/p-9771abb4.entry.js +0 -4
  119. package/dist/ionic/p-a0b51978.system.entry.js +0 -4
  120. package/dist/ionic/p-a3b856e6.system.entry.js +0 -4
  121. package/dist/ionic/p-ae79f1e2.entry.js +0 -4
  122. package/dist/ionic/p-bbefc52b.system.entry.js +0 -4
  123. package/dist/ionic/p-dc60009b.system.entry.js +0 -4
  124. /package/dist/collection/components/ripple-effect/{ripple-effect.css → ripple-effect.common.css} +0 -0
@@ -63,8 +63,101 @@
63
63
  * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
64
64
  * convert to a unit other than $baselineUnit.
65
65
  */
66
+ /**
67
+ * Convert a pixels given value into rem
68
+ *
69
+ * @param pixels - Value in pixels to be converted (i.e. px)
70
+ * @param context (optional) - Baseline value
71
+ */
72
+ /**
73
+ * Convert a font size to a dynamic font size.
74
+ * Fonts that participate in Dynamic Type should use
75
+ * dynamic font sizes.
76
+ * @param size - The initial font size including the unit (i.e. px or pt)
77
+ * @param unit (optional) - The unit to convert to. Use this if you want to
78
+ * convert to a unit other than $baselineUnit.
79
+ */
80
+ /**
81
+ * Convert a font size to a dynamic font size but impose
82
+ * a maximum font size.
83
+ * @param size - The initial font size including the unit (i.e. px or pt)
84
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
85
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
86
+ * convert to a unit other than $baselineUnit.
87
+ */
88
+ /**
89
+ * Convert a font size to a dynamic font size but impose
90
+ * a minimum font size.
91
+ * @param size - The initial font size including the unit (i.e. px or pt)
92
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
93
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
94
+ * convert to a unit other than $baselineUnit.
95
+ */
96
+ /**
97
+ * Convert a font size to a dynamic font size but impose
98
+ * maximum and minimum font sizes.
99
+ * @param size - The initial font size including the unit (i.e. px or pt)
100
+ * @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
101
+ * @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
102
+ * @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
103
+ * convert to a unit other than $baselineUnit.
104
+ */
105
+ /**
106
+ * A heuristic that applies CSS to tablet
107
+ * viewports.
108
+ *
109
+ * Usage:
110
+ * @include tablet-viewport() {
111
+ * :host {
112
+ * background-color: green;
113
+ * }
114
+ * }
115
+ */
116
+ /**
117
+ * A heuristic that applies CSS to mobile
118
+ * viewports (i.e. phones, not tablets).
119
+ *
120
+ * Usage:
121
+ * @include mobile-viewport() {
122
+ * :host {
123
+ * background-color: blue;
124
+ * }
125
+ * }
126
+ */
66
127
  :host {
128
+ /**
129
+ * @prop --background: Background of the button
130
+ * @prop --background-activated: Background of the button when pressed. Note: setting this will interfere with the Material Design ripple.
131
+ * @prop --background-activated-opacity: Opacity of the button when pressed
132
+ * @prop --background-focused: Background of the button when focused with the tab key
133
+ * @prop --background-focused-opacity: Opacity of the button when focused with the tab key
134
+ * @prop --background-hover: Background of the button on hover
135
+ * @prop --background-hover-opacity: Opacity of the background on hover
136
+ *
137
+ * @prop --color: Text color of the button
138
+ * @prop --color-activated: Text color of the button when pressed
139
+ * @prop --color-focused: Text color of the button when focused with the tab key
140
+ * @prop --color-hover: Text color of the button when hover
141
+ *
142
+ * @prop --transition: Transition of the button
143
+ *
144
+ * @prop --border-radius: Border radius of the button
145
+ * @prop --border-width: Border width of the button
146
+ * @prop --border-style: Border style of the button
147
+ * @prop --border-color: Border color of the button
148
+ *
149
+ * @prop --ripple-color: Color of the button ripple effect
150
+ *
151
+ * @prop --box-shadow: Box shadow of the button
152
+ * @prop --opacity: Opacity of the button
153
+ *
154
+ * @prop --padding-top: Top padding of the button
155
+ * @prop --padding-end: Right padding if direction is left-to-right, and left padding if direction is right-to-left of the button
156
+ * @prop --padding-bottom: Bottom padding of the button
157
+ * @prop --padding-start: Left padding if direction is left-to-right, and right padding if direction is right-to-left of the button
158
+ */
67
159
  --overflow: hidden;
160
+ --ripple-color: currentColor;
68
161
  --border-width: initial;
69
162
  --border-color: initial;
70
163
  --border-style: initial;
@@ -72,19 +165,9 @@
72
165
  --color-focused: var(--color);
73
166
  --color-hover: var(--color);
74
167
  --box-shadow: none;
75
- --padding-bottom: var(--padding-top);
76
- --padding-end: var(--ionic-space-400, 16px);
77
- --padding-start: var(--padding-end);
78
- --padding-top: var(--ionic-space-300, 12px);
79
- --focus-ring-color: var(--ionic-state-focus-1, #9ec4fd);
80
- --focus-ring-width: var(--ionic-border-size-050, 2px);
81
168
  display: inline-block;
82
- position: relative;
83
169
  width: auto;
84
- min-height: var(--ionic-scale-1000, 40px);
85
170
  color: var(--color);
86
- font-family: var(--ionic-font-family, "Inter", sans-serif);
87
- font-size: var(--ionic-font-size-350, 0.875rem);
88
171
  text-align: center;
89
172
  text-decoration: none;
90
173
  white-space: normal;
@@ -93,182 +176,28 @@
93
176
  vertical-align: -webkit-baseline-middle;
94
177
  font-kerning: none;
95
178
  }
96
- :host::after {
97
- right: 0;
98
- left: 0;
99
- top: 50%;
100
- position: absolute;
101
- height: 100%;
102
- min-height: var(--ionic-scale-1200, 48px);
103
- transform: translateY(-50%);
104
- content: "";
105
- cursor: pointer;
106
- z-index: 1;
107
- }
108
- :host ::slotted(ion-icon[slot=start]) {
109
- -webkit-margin-end: var(--ionic-space-200, 8px);
110
- margin-inline-end: var(--ionic-space-200, 8px);
111
- }
112
- :host ::slotted(ion-icon[slot=end]) {
113
- -webkit-margin-start: var(--ionic-space-200, 8px);
114
- margin-inline-start: var(--ionic-space-200, 8px);
115
- }
116
-
117
- /* Extra Small and Small Button */
118
- :host(.button-xsmall) ::slotted(ion-icon[slot=start]),
119
- :host(.button-small) ::slotted(ion-icon[slot=start]) {
120
- -webkit-margin-end: var(--ionic-space-100, 4px);
121
- margin-inline-end: var(--ionic-space-100, 4px);
122
- }
123
- :host(.button-xsmall) ::slotted(ion-icon[slot=end]),
124
- :host(.button-small) ::slotted(ion-icon[slot=end]) {
125
- -webkit-margin-start: var(--ionic-space-100, 4px);
126
- margin-inline-start: var(--ionic-space-100, 4px);
127
- }
128
-
129
- /* Extra Small Button */
130
- :host(.button-xsmall) {
131
- --padding-top: var(--ionic-space-100, 4px);
132
- --padding-end: var(--ionic-space-300, 12px);
133
- min-height: var(--ionic-space-600, 24px);
134
- font-size: var(--ionic-font-size-300, 0.75rem);
135
- }
136
-
137
- /* Small Button */
138
- :host(.button-small) {
139
- --padding-top: var(--ionic-space-200, 8px);
140
- --padding-end: var(--ionic-space-400, 16px);
141
- min-height: var(--ionic-scale-800, 32px);
142
- font-size: var(--ionic-font-size-300, 0.75rem);
143
- }
144
-
145
- /* Large Button */
146
- :host(.button-large) {
147
- --padding-top: var(--ionic-space-400, 16px);
148
- --padding-end: var(--ionic-space-600, 24px);
149
- min-height: var(--ionic-scale-1200, 48px);
150
- font-size: var(--ionic-font-size-400, 1rem);
151
- }
152
-
153
- /* Extra Large Button */
154
- :host(.button-xlarge) {
155
- --padding-top: var(--ionic-space-400, 16px);
156
- --padding-end: var(--ionic-space-800, 32px);
157
- min-height: var(--ionic-scale-1400, 56px);
158
- font-size: var(--ionic-font-size-500, 1.25rem);
159
- }
160
-
161
- /* Button containing only an icon */
162
- ::slotted(ion-icon[slot=start]),
163
- ::slotted(ion-icon[slot=end]),
164
- ::slotted(ion-icon[slot=icon-only]) {
165
- font-size: var(--ionic-font-size-400, 1rem);
166
- }
167
-
168
- :host(.button-xsmall) ::slotted(ion-icon[slot=start]),
169
- :host(.button-xsmall) ::slotted(ion-icon[slot=end]),
170
- :host(.button-xsmall) ::slotted(ion-icon[slot=icon-only]),
171
- :host(.button-small) ::slotted(ion-icon[slot=start]),
172
- :host(.button-small) ::slotted(ion-icon[slot=end]),
173
- :host(.button-small) ::slotted(ion-icon[slot=icon-only]),
174
- :host(.button-large) ::slotted(ion-icon[slot=start]),
175
- :host(.button-large) ::slotted(ion-icon[slot=end]),
176
- :host(.button-large) ::slotted(ion-icon[slot=icon-only]),
177
- :host(.button-xlarge) ::slotted(ion-icon[slot=start]),
178
- :host(.button-xlarge) ::slotted(ion-icon[slot=end]),
179
- :host(.button-xlarge) ::slotted(ion-icon[slot=icon-only]) {
180
- font-size: inherit;
181
- }
182
-
183
- :host(.button-has-icon-only) {
184
- --padding-end: var(--padding-top);
185
- aspect-ratio: 1/1;
186
- }
187
-
188
- :host(.button-soft) {
189
- --border-radius: var(--ionic-border-radius-200, 8px);
190
- }
191
-
192
- :host(.button-soft.button-xsmall),
193
- :host(.button-soft.button-small) {
194
- --border-radius: var(--ionic-border-radius-100, 4px);
195
- }
196
-
197
- :host(.button-round) {
198
- --border-radius: var(--ionic-border-radius-full, 999px);
199
- }
200
-
201
- :host(.button-rectangular) {
202
- --border-radius: var(--ionic-border-radius-0, 0px);
203
- }
204
-
205
- :host(.ion-focused) .button-native {
206
- outline: var(--focus-ring-width) var(--ionic-border-style-solid, solid) var(--focus-ring-color);
207
- outline-offset: var(--ionic-border-size-050, 2px);
208
- }
209
-
210
- :host(.button-solid) {
211
- --background-activated: var(--ionic-color-primary-base, #105cef);
212
- }
213
-
214
- :host(.button-solid.ion-activated) .button-native::after {
215
- background: var(--ionic-color-primary-900, #0d4bc3);
216
- }
217
-
218
- :host(.button-outline) {
219
- --border-width: var(--ionic-border-size-025, 1px);
220
- --border-style: var(--ionic-border-style-solid, solid);
221
- --background-activated: var(--ionic-color-neutral-200, #e7e7e7);
222
- --background-activated-opacity: 1;
223
- --background-focused: transparent;
224
- --background-hover: transparent;
225
- --background-focused-opacity: 0.1;
226
- --color-activated: var(--ionic-color-primary-base, #105cef);
227
- }
228
-
229
- :host(.button-outline.ion-focused) {
230
- --border-color: transparent;
231
- }
232
-
233
- :host(.button-clear) {
234
- --background-activated: var(--ionic-color-neutral-200, #e7e7e7);
235
- --background-activated-opacity: 1;
236
- --background-focused: transparent;
237
- --background-hover: transparent;
238
- }
239
-
240
- :host(.button-solid) {
241
- --background-hover: var(--ionic-color-primary-800, #0f54da);
242
- }
243
-
244
- :host(.button-outline),
245
- :host(.button-clear) {
246
- --background-hover: var(--ionic-color-neutral-100, #f1f1f1);
247
- }
248
179
 
249
180
  :host(.button-disabled) {
250
- --background: var(--ionic-state-disabled, rgba(255, 255, 255, 0.6));
251
- --border-color: var(--color);
252
181
  cursor: default;
253
182
  opacity: 0.5;
254
183
  pointer-events: none;
255
184
  }
256
185
 
257
186
  :host(.button-solid) {
258
- --background: var(--ionic-color-primary-base, #105cef);
259
- --color: var(--ionic-color-base-white, #ffffff);
187
+ --background: var(--ion-color-primary, #0054e9);
188
+ --color: var(--ion-color-primary-contrast, #fff);
260
189
  }
261
190
 
262
191
  :host(.button-outline) {
263
- --border-color: var(--ionic-color-primary-base, #105cef);
264
- --background: var(--ionic-color-base-white, #ffffff);
265
- --color: var(--ionic-color-primary-base, #105cef);
192
+ --border-color: var(--ion-color-primary, #0054e9);
193
+ --background: transparent;
194
+ --color: var(--ion-color-primary, #0054e9);
266
195
  }
267
196
 
268
197
  :host(.button-clear) {
269
- --border-width: var(--ionic-border-size-0, 0px);
198
+ --border-width: 0;
270
199
  --background: transparent;
271
- --color: var(--ionic-color-primary-base, #105cef);
200
+ --color: var(--ion-color-primary, #0054e9);
272
201
  }
273
202
 
274
203
  :host(.button-block) {
@@ -375,10 +304,13 @@
375
304
  }
376
305
 
377
306
  ::slotted(ion-icon) {
378
- font-size: var(--ionic-font-size-500, 1.25rem);
379
307
  pointer-events: none;
380
308
  }
381
309
 
310
+ ion-ripple-effect {
311
+ color: var(--ripple-color);
312
+ }
313
+
382
314
  .button-native::after {
383
315
  right: 0;
384
316
  left: 0;
@@ -414,4 +346,246 @@
414
346
  :host(.ion-activated) .button-native::after {
415
347
  background: var(--background-activated);
416
348
  opacity: var(--background-activated-opacity);
349
+ }
350
+
351
+ :host(.button-solid.ion-color) .button-native {
352
+ background: var(--ion-color-base);
353
+ color: var(--ion-color-contrast);
354
+ }
355
+
356
+ :host(.button-outline.ion-color) .button-native {
357
+ border-color: var(--ion-color-base);
358
+ background: transparent;
359
+ color: var(--ion-color-base);
360
+ }
361
+
362
+ :host(.button-clear.ion-color) .button-native {
363
+ background: transparent;
364
+ color: var(--ion-color-base);
365
+ }
366
+
367
+ :host(.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
368
+ color: var(--ion-toolbar-color, var(--color));
369
+ }
370
+
371
+ :host(.button-outline.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
372
+ border-color: var(--ion-toolbar-color, var(--color, var(--border-color)));
373
+ }
374
+
375
+ :host(.button-solid.in-toolbar:not(.ion-color):not(.in-toolbar-color)) .button-native {
376
+ background: var(--ion-toolbar-color, var(--background));
377
+ color: var(--ion-toolbar-background, var(--color));
378
+ }
379
+
380
+ :host {
381
+ --padding-bottom: var(--padding-top);
382
+ --padding-end: var(--ionic-space-500, 20px);
383
+ --padding-start: var(--padding-end);
384
+ --padding-top: var(--ionic-space-0, 0px);
385
+ --focus-ring-color: var(--ionic-state-focus-1, #9ec4fd);
386
+ --focus-ring-width: var(--ionic-border-size-050, 2px);
387
+ position: relative;
388
+ min-height: var(--ionic-scale-1000, 40px);
389
+ font-family: var(--ionic-font-family, "Inter", sans-serif);
390
+ font-size: var(--ionic-font-size-350, 0.875rem);
391
+ }
392
+ :host::after {
393
+ right: 0;
394
+ left: 0;
395
+ top: 50%;
396
+ position: absolute;
397
+ height: 100%;
398
+ min-height: var(--ionic-scale-1200, 48px);
399
+ transform: translateY(-50%);
400
+ content: "";
401
+ cursor: pointer;
402
+ z-index: 1;
403
+ }
404
+
405
+ :host(.button-solid) {
406
+ --background-activated: var(--ion-color-primary-shade, get-color-shade(#105cef));
407
+ --background-hover: var(--ion-color-primary-contrast, #fff);
408
+ --background-focused: var(--ion-color-primary-contrast, #fff);
409
+ --background-focused-opacity: 0.24;
410
+ --background-hover-opacity: 0.08;
411
+ --ripple-opacity: var(--background-activated-opacity, 1);
412
+ --ripple-color: var(--background-activated);
413
+ }
414
+
415
+ :host(.button-outline) {
416
+ --border-width: var(--ionic-border-size-025, 1px);
417
+ --border-style: var(--ionic-border-style-solid, solid);
418
+ --background-activated: var(--ionic-color-neutral-200, #e7e7e7);
419
+ --background-focused: transparent;
420
+ --background-hover: var(--ion-color-primary, #105cef);
421
+ --background-hover-opacity: 0.04;
422
+ --ripple-opacity: var(--background-activated-opacity, 1);
423
+ --ripple-color: var(--background-activated);
424
+ }
425
+
426
+ :host(.button-clear) {
427
+ --background-activated: var(--ionic-color-neutral-200, #e7e7e7);
428
+ --background-focused: transparent;
429
+ --background-hover: var(--ion-color-primary, #105cef);
430
+ --background-hover-opacity: 0.04;
431
+ --ripple-opacity: var(--background-activated-opacity, 1);
432
+ --ripple-color: var(--background-activated);
433
+ }
434
+
435
+ :host(.button-solid.ion-color) ion-ripple-effect {
436
+ color: var(--ion-color-shade);
437
+ }
438
+
439
+ :host(.button-outline.ion-color) ion-ripple-effect,
440
+ :host(.button-clear.ion-color) ion-ripple-effect {
441
+ color: var(--ionic-color-neutral-200, #e7e7e7);
442
+ }
443
+
444
+ /* Extra Small and Small Button */
445
+ :host(.button-xsmall) ::slotted(ion-icon[slot=start]),
446
+ :host(.button-small) ::slotted(ion-icon[slot=start]) {
447
+ -webkit-margin-end: var(--ionic-space-100, 4px);
448
+ margin-inline-end: var(--ionic-space-100, 4px);
449
+ }
450
+ :host(.button-xsmall) ::slotted(ion-icon[slot=end]),
451
+ :host(.button-small) ::slotted(ion-icon[slot=end]) {
452
+ -webkit-margin-start: var(--ionic-space-100, 4px);
453
+ margin-inline-start: var(--ionic-space-100, 4px);
454
+ }
455
+
456
+ /* Extra Small Button */
457
+ :host(.button-xsmall) {
458
+ --padding-top: var(--ionic-space-100, 4px);
459
+ --padding-end: var(--ionic-space-300, 12px);
460
+ min-height: var(--ionic-space-600, 24px);
461
+ font-size: var(--ionic-font-size-300, 0.75rem);
462
+ }
463
+
464
+ /* Small Button */
465
+ :host(.button-small) {
466
+ --padding-top: var(--ionic-space-200, 8px);
467
+ --padding-end: var(--ionic-space-400, 16px);
468
+ min-height: var(--ionic-scale-800, 32px);
469
+ font-size: var(--ionic-font-size-300, 0.75rem);
470
+ }
471
+
472
+ /* Large Button */
473
+ :host(.button-large) {
474
+ --padding-top: var(--ionic-space-400, 16px);
475
+ --padding-end: var(--ionic-space-600, 24px);
476
+ min-height: var(--ionic-scale-1200, 48px);
477
+ font-size: var(--ionic-font-size-400, 1rem);
478
+ }
479
+
480
+ /* Extra Large Button */
481
+ :host(.button-xlarge) {
482
+ --padding-top: var(--ionic-space-400, 16px);
483
+ --padding-end: var(--ionic-space-800, 32px);
484
+ min-height: var(--ionic-scale-1400, 56px);
485
+ font-size: var(--ionic-font-size-500, 1.25rem);
486
+ }
487
+
488
+ /* Button containing only an icon */
489
+ ::slotted(ion-icon[slot=start]),
490
+ ::slotted(ion-icon[slot=end]),
491
+ ::slotted(ion-icon[slot=icon-only]) {
492
+ font-size: var(--ionic-font-size-400, 1rem);
493
+ }
494
+
495
+ :host(.button-xsmall) ::slotted(ion-icon[slot=start]),
496
+ :host(.button-xsmall) ::slotted(ion-icon[slot=end]),
497
+ :host(.button-xsmall) ::slotted(ion-icon[slot=icon-only]),
498
+ :host(.button-small) ::slotted(ion-icon[slot=start]),
499
+ :host(.button-small) ::slotted(ion-icon[slot=end]),
500
+ :host(.button-small) ::slotted(ion-icon[slot=icon-only]),
501
+ :host(.button-large) ::slotted(ion-icon[slot=start]),
502
+ :host(.button-large) ::slotted(ion-icon[slot=end]),
503
+ :host(.button-large) ::slotted(ion-icon[slot=icon-only]),
504
+ :host(.button-xlarge) ::slotted(ion-icon[slot=start]),
505
+ :host(.button-xlarge) ::slotted(ion-icon[slot=end]),
506
+ :host(.button-xlarge) ::slotted(ion-icon[slot=icon-only]) {
507
+ font-size: inherit;
508
+ }
509
+
510
+ :host(.button-has-icon-only) {
511
+ --padding-end: var(--padding-top);
512
+ aspect-ratio: 1/1;
513
+ }
514
+
515
+ :host(.button-soft) {
516
+ --border-radius: var(--ionic-border-radius-200, 8px);
517
+ }
518
+
519
+ :host(.button-soft.button-xsmall),
520
+ :host(.button-soft.button-small) {
521
+ --border-radius: var(--ionic-border-radius-100, 4px);
522
+ }
523
+
524
+ :host(.button-round) {
525
+ --border-radius: var(--ionic-border-radius-full, 999px);
526
+ }
527
+
528
+ :host(.button-rectangular) {
529
+ --border-radius: var(--ionic-border-radius-0, 0px);
530
+ }
531
+
532
+ :host(.ion-focused) .button-native {
533
+ outline: var(--focus-ring-width) var(--ionic-border-style-solid, solid) var(--focus-ring-color);
534
+ outline-offset: var(--ionic-border-size-050, 2px);
535
+ }
536
+
537
+ /**
538
+ * Only allow overriding of opacity here
539
+ * as developers should not be overriding
540
+ * colors when using the color prop.
541
+ */
542
+ :host(.button-solid.ion-color.ion-focused) .button-native::after {
543
+ background: var(--ion-color-contrast);
544
+ }
545
+
546
+ :host(.button-solid.ion-color.ion-activated) .button-native::after {
547
+ background: var(--ion-color-shade);
548
+ }
549
+
550
+ :host(.ion-activated) .button-native:has(ion-ripple-effect)::after,
551
+ :host(.button-solid.ion-color.ion-activated) .button-native:has(ion-ripple-effect)::after {
552
+ background: transparent;
553
+ }
554
+
555
+ :host(.button-disabled) {
556
+ opacity: 0.6;
557
+ }
558
+
559
+ ::slotted(ion-icon) {
560
+ font-size: var(--ionic-font-size-500, 1.25rem);
561
+ }
562
+
563
+ :host(.button-small) ::slotted(ion-icon[slot=start]) {
564
+ -webkit-margin-end: var(--ionic-space-200, 8px);
565
+ margin-inline-end: var(--ionic-space-200, 8px);
566
+ }
567
+
568
+ ::slotted(ion-icon[slot=start]) {
569
+ -webkit-margin-end: var(--ionic-space-250, 10px);
570
+ margin-inline-end: var(--ionic-space-250, 10px);
571
+ }
572
+
573
+ :host(.button-large) ::slotted(ion-icon[slot=start]) {
574
+ -webkit-margin-end: var(--ionic-space-300, 12px);
575
+ margin-inline-end: var(--ionic-space-300, 12px);
576
+ }
577
+
578
+ :host(.button-small) ::slotted(ion-icon[slot=end]) {
579
+ -webkit-margin-start: var(--ionic-space-200, 8px);
580
+ margin-inline-start: var(--ionic-space-200, 8px);
581
+ }
582
+
583
+ ::slotted(ion-icon[slot=end]) {
584
+ -webkit-margin-start: var(--ionic-space-250, 10px);
585
+ margin-inline-start: var(--ionic-space-250, 10px);
586
+ }
587
+
588
+ :host(.button-large) ::slotted(ion-icon[slot=end]) {
589
+ -webkit-margin-start: var(--ionic-space-300, 12px);
590
+ margin-inline-start: var(--ionic-space-300, 12px);
417
591
  }
@@ -1,3 +1,64 @@
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
+ */
1
62
  /**
2
63
  * Convert a pixels given value into rem
3
64
  *
@@ -103,7 +164,6 @@
103
164
  display: inline-block;
104
165
  width: auto;
105
166
  color: var(--color);
106
- font-family: var(--ion-font-family, inherit);
107
167
  text-align: center;
108
168
  text-decoration: none;
109
169
  white-space: normal;
@@ -240,28 +300,9 @@
240
300
  }
241
301
 
242
302
  ::slotted(ion-icon) {
243
- font-size: 1.35em;
244
303
  pointer-events: none;
245
304
  }
246
305
 
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
306
  ion-ripple-effect {
266
307
  color: var(--ripple-color);
267
308
  }
@@ -332,6 +373,32 @@ ion-ripple-effect {
332
373
  color: var(--ion-toolbar-background, var(--color));
333
374
  }
334
375
 
376
+ :host {
377
+ font-family: var(--ion-font-family, inherit);
378
+ }
379
+
380
+ ::slotted(ion-icon) {
381
+ font-size: 1.35em;
382
+ }
383
+
384
+ ::slotted(ion-icon[slot=start]) {
385
+ -webkit-margin-start: -0.3em;
386
+ margin-inline-start: -0.3em;
387
+ -webkit-margin-end: 0.3em;
388
+ margin-inline-end: 0.3em;
389
+ margin-top: 0;
390
+ margin-bottom: 0;
391
+ }
392
+
393
+ ::slotted(ion-icon[slot=end]) {
394
+ -webkit-margin-start: 0.3em;
395
+ margin-inline-start: 0.3em;
396
+ -webkit-margin-end: -0.2em;
397
+ margin-inline-end: -0.2em;
398
+ margin-top: 0;
399
+ margin-bottom: 0;
400
+ }
401
+
335
402
  /**
336
403
  * Convert a pixels given value into rem
337
404
  *