@ionic/core 8.2.3-dev.11718879673.1a3f486b → 8.2.3-dev.11719301373.17616928
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.
- package/components/buttons.js +6 -6
- package/components/ion-item-option.js +21 -5
- package/components/ion-item-options.js +3 -3
- package/components/ion-menu-button.js +6 -6
- package/components/ion-searchbar.js +8 -8
- package/components/ion-tab-bar.js +3 -3
- package/components/ion-tab-button.js +1 -1
- package/components/ion-title.js +6 -6
- package/components/ion-toolbar.js +11 -7
- package/components/list.js +22 -3
- package/dist/cjs/ion-app_8.cjs.entry.js +21 -18
- package/dist/cjs/ion-item-option_3.cjs.entry.js +22 -7
- package/dist/cjs/ion-item_8.cjs.entry.js +21 -3
- package/dist/cjs/ion-menu_3.cjs.entry.js +6 -6
- package/dist/cjs/ion-searchbar.cjs.entry.js +8 -8
- package/dist/cjs/ion-tab-bar_2.cjs.entry.js +4 -4
- package/dist/cjs/ionic.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/buttons/buttons.ionic.css +101 -0
- package/dist/collection/components/buttons/buttons.ios.css +37 -3
- package/dist/collection/components/buttons/buttons.js +4 -4
- package/dist/collection/components/buttons/buttons.md.css +37 -3
- package/dist/collection/components/item-option/item-option.ionic.css +325 -0
- package/dist/collection/components/item-option/item-option.js +36 -4
- package/dist/collection/components/item-options/item-options.ionic.css +260 -0
- package/dist/collection/components/item-options/item-options.js +3 -3
- package/dist/collection/components/item-sliding/test/icons/item-sliding.e2e.js +1 -1
- package/dist/collection/components/item-sliding/test/shapes/item-sliding.e2e.js +28 -0
- package/dist/collection/components/list/list.ionic.css +174 -0
- package/dist/collection/components/list/list.js +38 -3
- package/dist/collection/components/list/list.md.css +2 -2
- package/dist/collection/components/list/test/shape/list.e2e.js +204 -0
- package/dist/collection/components/menu-button/menu-button.ionic.css +240 -0
- package/dist/collection/components/menu-button/menu-button.ios.css +32 -10
- package/dist/collection/components/menu-button/menu-button.js +4 -4
- package/dist/collection/components/menu-button/menu-button.md.css +32 -10
- package/dist/collection/components/searchbar/searchbar.ionic.css +269 -0
- package/dist/collection/components/searchbar/searchbar.ios.css +42 -16
- package/dist/collection/components/searchbar/searchbar.js +6 -6
- package/dist/collection/components/searchbar/searchbar.md.css +42 -16
- package/dist/collection/components/tab-bar/tab-bar.ionic.css +94 -57
- package/dist/collection/components/tab-bar/tab-bar.ios.css +46 -43
- package/dist/collection/components/tab-bar/tab-bar.md.css +46 -43
- package/dist/collection/components/tab-button/tab-button.ionic.css +2 -2
- package/dist/collection/components/title/test/theme-ionic/title.e2e.js +14 -0
- package/dist/collection/components/title/title.ionic.css +155 -0
- package/dist/collection/components/title/title.ios.css +26 -4
- package/dist/collection/components/title/title.js +4 -4
- package/dist/collection/components/title/title.md.css +26 -4
- package/dist/collection/components/toolbar/toolbar.ionic.css +233 -0
- package/dist/collection/components/toolbar/toolbar.ios.css +82 -51
- package/dist/collection/components/toolbar/toolbar.js +25 -4
- package/dist/collection/components/toolbar/toolbar.md.css +82 -51
- package/dist/docs.json +89 -1
- package/dist/esm/ion-app_8.entry.js +21 -18
- package/dist/esm/ion-item-option_3.entry.js +22 -7
- package/dist/esm/ion-item_8.entry.js +21 -3
- package/dist/esm/ion-menu_3.entry.js +6 -6
- package/dist/esm/ion-searchbar.entry.js +8 -8
- package/dist/esm/ion-tab-bar_2.entry.js +4 -4
- package/dist/esm/ionic.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm-es5/ion-app_8.entry.js +1 -1
- package/dist/esm-es5/ion-item-option_3.entry.js +1 -1
- package/dist/esm-es5/ion-item_8.entry.js +1 -1
- package/dist/esm-es5/ion-menu_3.entry.js +1 -1
- package/dist/esm-es5/ion-searchbar.entry.js +1 -1
- package/dist/esm-es5/ion-tab-bar_2.entry.js +1 -1
- package/dist/esm-es5/ionic.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/html.html-data.json +34 -0
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-12a0de44.system.entry.js +4 -0
- package/dist/ionic/p-214631b2.system.entry.js +4 -0
- package/dist/ionic/p-224ad51a.entry.js +4 -0
- package/dist/ionic/{p-12c07c03.system.entry.js → p-663d8429.system.entry.js} +1 -1
- package/dist/ionic/p-7141dfca.entry.js +4 -0
- package/dist/ionic/p-7b590e46.system.js +1 -1
- package/dist/ionic/p-8052f3ad.entry.js +4 -0
- package/dist/ionic/p-82297db9.system.entry.js +4 -0
- package/dist/ionic/{p-89efe86f.entry.js → p-9a52a085.entry.js} +1 -1
- package/dist/ionic/p-b14d56c8.system.entry.js +4 -0
- package/dist/ionic/{p-59cd0dd7.system.entry.js → p-c2eece5e.system.entry.js} +1 -1
- package/dist/ionic/p-cd9a7c32.entry.js +4 -0
- package/dist/ionic/p-d718695f.entry.js +4 -0
- package/dist/types/components/item-option/item-option.d.ts +9 -0
- package/dist/types/components/list/list.d.ts +13 -0
- package/dist/types/components/toolbar/toolbar.d.ts +5 -0
- package/dist/types/components.d.ts +24 -0
- package/hydrate/index.js +88 -49
- package/package.json +1 -1
- package/dist/ionic/p-0116d120.entry.js +0 -4
- package/dist/ionic/p-24d2aea3.entry.js +0 -4
- package/dist/ionic/p-2fdc82b4.entry.js +0 -4
- package/dist/ionic/p-350462f9.system.entry.js +0 -4
- package/dist/ionic/p-37e801db.entry.js +0 -4
- package/dist/ionic/p-cdc9a11c.system.entry.js +0 -4
- package/dist/ionic/p-d5fc7d63.entry.js +0 -4
- package/dist/ionic/p-ea8c8541.system.entry.js +0 -4
- package/dist/ionic/p-fc0922fa.system.entry.js +0 -4
|
@@ -0,0 +1,325 @@
|
|
|
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
|
+
* This is an auto-generated file, please do not change it directly.
|
|
9
|
+
* Ionic Design System
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A heuristic that applies CSS to tablet
|
|
13
|
+
* viewports.
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* @include tablet-viewport() {
|
|
17
|
+
* :host {
|
|
18
|
+
* background-color: green;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* A heuristic that applies CSS to mobile
|
|
24
|
+
* viewports (i.e. phones, not tablets).
|
|
25
|
+
*
|
|
26
|
+
* Usage:
|
|
27
|
+
* @include mobile-viewport() {
|
|
28
|
+
* :host {
|
|
29
|
+
* background-color: blue;
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Convert a font size to a dynamic font size.
|
|
35
|
+
* Fonts that participate in Dynamic Type should use
|
|
36
|
+
* dynamic font sizes.
|
|
37
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
38
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
39
|
+
* convert to a unit other than $baselineUnit.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Convert a font size to a dynamic font size but impose
|
|
43
|
+
* a maximum font size.
|
|
44
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
45
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
46
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
47
|
+
* convert to a unit other than $baselineUnit.
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Convert a font size to a dynamic font size but impose
|
|
51
|
+
* a minimum font size.
|
|
52
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
53
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
54
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
55
|
+
* convert to a unit other than $baselineUnit.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Convert a font size to a dynamic font size but impose
|
|
59
|
+
* maximum and minimum font sizes.
|
|
60
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
61
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
62
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
63
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
64
|
+
* convert to a unit other than $baselineUnit.
|
|
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
|
+
*/
|
|
127
|
+
:host {
|
|
128
|
+
/**
|
|
129
|
+
* @prop --background: Background of the item option
|
|
130
|
+
* @prop --color: Color of the item option
|
|
131
|
+
*/
|
|
132
|
+
--background: var(--ion-color-primary, #0054e9);
|
|
133
|
+
--color: var(--ion-color-primary-contrast, #fff);
|
|
134
|
+
background: var(--background);
|
|
135
|
+
color: var(--color);
|
|
136
|
+
font-family: var(--ion-font-family, inherit);
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
:host(.ion-color) {
|
|
140
|
+
background: var(--ion-color-base);
|
|
141
|
+
color: var(--ion-color-contrast);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.button-native {
|
|
145
|
+
color: inherit;
|
|
146
|
+
font-family: inherit;
|
|
147
|
+
font-size: inherit;
|
|
148
|
+
font-style: inherit;
|
|
149
|
+
font-weight: inherit;
|
|
150
|
+
letter-spacing: inherit;
|
|
151
|
+
text-align: inherit;
|
|
152
|
+
text-decoration: inherit;
|
|
153
|
+
text-indent: inherit;
|
|
154
|
+
text-overflow: inherit;
|
|
155
|
+
text-transform: inherit;
|
|
156
|
+
white-space: inherit;
|
|
157
|
+
-webkit-padding-start: 0.7em;
|
|
158
|
+
padding-inline-start: 0.7em;
|
|
159
|
+
-webkit-padding-end: 0.7em;
|
|
160
|
+
padding-inline-end: 0.7em;
|
|
161
|
+
padding-top: 0;
|
|
162
|
+
padding-bottom: 0;
|
|
163
|
+
display: inline-block;
|
|
164
|
+
position: relative;
|
|
165
|
+
width: 100%;
|
|
166
|
+
height: 100%;
|
|
167
|
+
border: 0;
|
|
168
|
+
outline: none;
|
|
169
|
+
background: transparent;
|
|
170
|
+
cursor: pointer;
|
|
171
|
+
appearance: none;
|
|
172
|
+
box-sizing: border-box;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
.button-inner {
|
|
176
|
+
display: flex;
|
|
177
|
+
flex-flow: column nowrap;
|
|
178
|
+
flex-shrink: 0;
|
|
179
|
+
align-items: center;
|
|
180
|
+
justify-content: center;
|
|
181
|
+
width: 100%;
|
|
182
|
+
height: 100%;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.horizontal-wrapper {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-flow: row nowrap;
|
|
188
|
+
flex-shrink: 0;
|
|
189
|
+
align-items: center;
|
|
190
|
+
justify-content: center;
|
|
191
|
+
width: 100%;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
::slotted(*) {
|
|
195
|
+
flex-shrink: 0;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
::slotted([slot=start]) {
|
|
199
|
+
-webkit-margin-start: 0;
|
|
200
|
+
margin-inline-start: 0;
|
|
201
|
+
-webkit-margin-end: 5px;
|
|
202
|
+
margin-inline-end: 5px;
|
|
203
|
+
margin-top: 0;
|
|
204
|
+
margin-bottom: 0;
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
::slotted([slot=end]) {
|
|
208
|
+
-webkit-margin-start: 5px;
|
|
209
|
+
margin-inline-start: 5px;
|
|
210
|
+
-webkit-margin-end: 0;
|
|
211
|
+
margin-inline-end: 0;
|
|
212
|
+
margin-top: 0;
|
|
213
|
+
margin-bottom: 0;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
::slotted([slot=icon-only]) {
|
|
217
|
+
padding-left: 0;
|
|
218
|
+
padding-right: 0;
|
|
219
|
+
padding-top: 0;
|
|
220
|
+
padding-bottom: 0;
|
|
221
|
+
-webkit-margin-start: 10px;
|
|
222
|
+
margin-inline-start: 10px;
|
|
223
|
+
-webkit-margin-end: 10px;
|
|
224
|
+
margin-inline-end: 10px;
|
|
225
|
+
margin-top: 0;
|
|
226
|
+
margin-bottom: 0;
|
|
227
|
+
min-width: 0.9em;
|
|
228
|
+
font-size: 1.8em;
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
:host(.item-option-expandable) {
|
|
232
|
+
flex-shrink: 0;
|
|
233
|
+
transition-duration: 0;
|
|
234
|
+
transition-property: none;
|
|
235
|
+
transition-timing-function: cubic-bezier(0.65, 0.05, 0.36, 1);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
:host(.item-option-disabled) {
|
|
239
|
+
pointer-events: none;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
:host(.item-option-disabled) .button-native {
|
|
243
|
+
cursor: default;
|
|
244
|
+
opacity: 0.5;
|
|
245
|
+
pointer-events: none;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
:host {
|
|
249
|
+
padding-left: 0;
|
|
250
|
+
padding-right: 0;
|
|
251
|
+
padding-top: 0;
|
|
252
|
+
padding-bottom: 0;
|
|
253
|
+
min-width: var(--ionic-scale-1600, 64px);
|
|
254
|
+
height: var(--ionic-scale-1600, 64px);
|
|
255
|
+
font-size: var(--ionic-font-size-350, 0.875rem);
|
|
256
|
+
font-weight: var(--ionic-font-weight-medium, 500);
|
|
257
|
+
line-height: var(--ionic-line-height-500, 20px);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.button-native {
|
|
261
|
+
-webkit-padding-start: var(--ionic-space-200, 8px);
|
|
262
|
+
padding-inline-start: var(--ionic-space-200, 8px);
|
|
263
|
+
-webkit-padding-end: var(--ionic-space-200, 8px);
|
|
264
|
+
padding-inline-end: var(--ionic-space-200, 8px);
|
|
265
|
+
padding-top: var(--ionic-space-200, 8px);
|
|
266
|
+
padding-bottom: var(--ionic-space-200, 8px);
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
::slotted([slot=top]) {
|
|
270
|
+
margin-left: 0;
|
|
271
|
+
margin-right: 0;
|
|
272
|
+
margin-top: 0;
|
|
273
|
+
margin-bottom: var(--ionic-space-100, 4px);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
::slotted([slot=bottom]) {
|
|
277
|
+
margin-left: 0;
|
|
278
|
+
margin-right: 0;
|
|
279
|
+
margin-top: var(--ionic-space-100, 4px);
|
|
280
|
+
margin-bottom: 0;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
::slotted([slot=start]) {
|
|
284
|
+
-webkit-margin-start: 0;
|
|
285
|
+
margin-inline-start: 0;
|
|
286
|
+
-webkit-margin-end: var(--ionic-space-100, 4px);
|
|
287
|
+
margin-inline-end: var(--ionic-space-100, 4px);
|
|
288
|
+
margin-top: 0;
|
|
289
|
+
margin-bottom: 0;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
::slotted([slot=end]) {
|
|
293
|
+
-webkit-margin-start: var(--ionic-space-100, 4px);
|
|
294
|
+
margin-inline-start: var(--ionic-space-100, 4px);
|
|
295
|
+
-webkit-margin-end: 0;
|
|
296
|
+
margin-inline-end: 0;
|
|
297
|
+
margin-top: 0;
|
|
298
|
+
margin-bottom: 0;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
::slotted(ion-icon),
|
|
302
|
+
::slotted([slot=icon-only]) {
|
|
303
|
+
margin-left: 0;
|
|
304
|
+
margin-right: 0;
|
|
305
|
+
margin-top: 0;
|
|
306
|
+
margin-bottom: 0;
|
|
307
|
+
width: var(--ionic-scale-500, 20px);
|
|
308
|
+
min-width: initial;
|
|
309
|
+
height: var(--ionic-scale-500, 20px);
|
|
310
|
+
}
|
|
311
|
+
|
|
312
|
+
/* Round */
|
|
313
|
+
:host(.item-option-round) {
|
|
314
|
+
border-radius: var(--ionic-border-radius-300, 12px);
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/* Soft */
|
|
318
|
+
:host(.item-option-soft) {
|
|
319
|
+
border-radius: var(--ionic-border-radius-200, 8px);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/* Rectangular */
|
|
323
|
+
:host(.item-option-rectangular) {
|
|
324
|
+
border-radius: var(--ionic-border-radius-0, 0px);
|
|
325
|
+
}
|
|
@@ -33,11 +33,25 @@ export class ItemOption {
|
|
|
33
33
|
this.rel = undefined;
|
|
34
34
|
this.target = undefined;
|
|
35
35
|
this.type = 'button';
|
|
36
|
+
this.shape = undefined;
|
|
37
|
+
}
|
|
38
|
+
getShape() {
|
|
39
|
+
const theme = getIonTheme(this);
|
|
40
|
+
const { shape } = this;
|
|
41
|
+
// TODO(ROU-10841): Remove theme check when shapes are defined for all themes.
|
|
42
|
+
if (theme !== 'ionic') {
|
|
43
|
+
return undefined;
|
|
44
|
+
}
|
|
45
|
+
if (shape === undefined) {
|
|
46
|
+
return 'round';
|
|
47
|
+
}
|
|
48
|
+
return shape;
|
|
36
49
|
}
|
|
37
50
|
render() {
|
|
38
51
|
const { disabled, expandable, href } = this;
|
|
39
52
|
const TagType = href === undefined ? 'button' : 'a';
|
|
40
53
|
const theme = getIonTheme(this);
|
|
54
|
+
const shape = this.getShape();
|
|
41
55
|
const attrs = TagType === 'button'
|
|
42
56
|
? { type: this.type }
|
|
43
57
|
: {
|
|
@@ -45,12 +59,13 @@ export class ItemOption {
|
|
|
45
59
|
href: this.href,
|
|
46
60
|
target: this.target,
|
|
47
61
|
};
|
|
48
|
-
return (h(Host, { key: '
|
|
62
|
+
return (h(Host, { key: '09b71dcaf3342450748a98100df32834062db93a', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
49
63
|
[theme]: true,
|
|
64
|
+
[`item-option-${shape}`]: shape !== undefined,
|
|
50
65
|
'item-option-disabled': disabled,
|
|
51
66
|
'item-option-expandable': expandable,
|
|
52
67
|
'ion-activatable': true,
|
|
53
|
-
}) }, h(TagType, Object.assign({ key: '
|
|
68
|
+
}) }, h(TagType, Object.assign({ key: 'b48ff174c3e9bcf025aada0fa5f0cf22971e01c4' }, attrs, { class: "button-native", part: "native", disabled: disabled }), h("span", { key: 'd22049f3784a5233ca6228f716363a2c21959359', class: "button-inner" }, h("slot", { key: 'b1c8517a9315edde86a51591e6ac47f3e3a4c112', name: "top" }), h("div", { key: 'af5c2a0a9de5b4d63e76176d86c1da15a963686a', class: "horizontal-wrapper" }, h("slot", { key: 'e65b22fd0b8833f1de48460bc5f966eec32df3e6', name: "start" }), h("slot", { key: '7d6e752eff451d6a52550323374386e5508c4e27', name: "icon-only" }), h("slot", { key: '4c9b989db132d09dec4e82b2079962f1ab8b2bbf' }), h("slot", { key: '01a1e19fb393196276a8c6618093e1eb59fc77a4', name: "end" })), h("slot", { key: '108211231dd4c22a9bb69b49c798593407c054f2', name: "bottom" })), theme === 'md' && h("ion-ripple-effect", { key: '4330c49a1637a0d44d1627abfe6104674c7c88dd' }))));
|
|
54
69
|
}
|
|
55
70
|
static get is() { return "ion-item-option"; }
|
|
56
71
|
static get encapsulation() { return "shadow"; }
|
|
@@ -58,14 +73,14 @@ export class ItemOption {
|
|
|
58
73
|
return {
|
|
59
74
|
"ios": ["item-option.ios.scss"],
|
|
60
75
|
"md": ["item-option.md.scss"],
|
|
61
|
-
"ionic": ["item-option.
|
|
76
|
+
"ionic": ["item-option.ionic.scss"]
|
|
62
77
|
};
|
|
63
78
|
}
|
|
64
79
|
static get styleUrls() {
|
|
65
80
|
return {
|
|
66
81
|
"ios": ["item-option.ios.css"],
|
|
67
82
|
"md": ["item-option.md.css"],
|
|
68
|
-
"ionic": ["item-option.
|
|
83
|
+
"ionic": ["item-option.ionic.css"]
|
|
69
84
|
};
|
|
70
85
|
}
|
|
71
86
|
static get properties() {
|
|
@@ -214,6 +229,23 @@ export class ItemOption {
|
|
|
214
229
|
"attribute": "type",
|
|
215
230
|
"reflect": false,
|
|
216
231
|
"defaultValue": "'button'"
|
|
232
|
+
},
|
|
233
|
+
"shape": {
|
|
234
|
+
"type": "string",
|
|
235
|
+
"mutable": false,
|
|
236
|
+
"complexType": {
|
|
237
|
+
"original": "'soft' | 'round' | 'rectangular'",
|
|
238
|
+
"resolved": "\"rectangular\" | \"round\" | \"soft\" | undefined",
|
|
239
|
+
"references": {}
|
|
240
|
+
},
|
|
241
|
+
"required": false,
|
|
242
|
+
"optional": true,
|
|
243
|
+
"docs": {
|
|
244
|
+
"tags": [],
|
|
245
|
+
"text": "Set to `\"rectangular\"` for non-rounded corners.\nSet to `\"soft\"` for slightly rounded corners.\nSet to `\"round\"` for fully rounded corners.\n\nDefaults to `\"round\"` for the `ionic` theme, undefined for all other themes."
|
|
246
|
+
},
|
|
247
|
+
"attribute": "shape",
|
|
248
|
+
"reflect": false
|
|
217
249
|
}
|
|
218
250
|
};
|
|
219
251
|
}
|
|
@@ -0,0 +1,260 @@
|
|
|
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
|
+
* This is an auto-generated file, please do not change it directly.
|
|
9
|
+
* Ionic Design System
|
|
10
|
+
*/
|
|
11
|
+
/**
|
|
12
|
+
* A heuristic that applies CSS to tablet
|
|
13
|
+
* viewports.
|
|
14
|
+
*
|
|
15
|
+
* Usage:
|
|
16
|
+
* @include tablet-viewport() {
|
|
17
|
+
* :host {
|
|
18
|
+
* background-color: green;
|
|
19
|
+
* }
|
|
20
|
+
* }
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* A heuristic that applies CSS to mobile
|
|
24
|
+
* viewports (i.e. phones, not tablets).
|
|
25
|
+
*
|
|
26
|
+
* Usage:
|
|
27
|
+
* @include mobile-viewport() {
|
|
28
|
+
* :host {
|
|
29
|
+
* background-color: blue;
|
|
30
|
+
* }
|
|
31
|
+
* }
|
|
32
|
+
*/
|
|
33
|
+
/**
|
|
34
|
+
* Convert a font size to a dynamic font size.
|
|
35
|
+
* Fonts that participate in Dynamic Type should use
|
|
36
|
+
* dynamic font sizes.
|
|
37
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
38
|
+
* @param unit (optional) - The unit to convert to. Use this if you want to
|
|
39
|
+
* convert to a unit other than $baselineUnit.
|
|
40
|
+
*/
|
|
41
|
+
/**
|
|
42
|
+
* Convert a font size to a dynamic font size but impose
|
|
43
|
+
* a maximum font size.
|
|
44
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
45
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
46
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
47
|
+
* convert to a unit other than $baselineUnit.
|
|
48
|
+
*/
|
|
49
|
+
/**
|
|
50
|
+
* Convert a font size to a dynamic font size but impose
|
|
51
|
+
* a minimum font size.
|
|
52
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
53
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
54
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
55
|
+
* convert to a unit other than $baselineUnit.
|
|
56
|
+
*/
|
|
57
|
+
/**
|
|
58
|
+
* Convert a font size to a dynamic font size but impose
|
|
59
|
+
* maximum and minimum font sizes.
|
|
60
|
+
* @param size - The initial font size including the unit (i.e. px or pt)
|
|
61
|
+
* @param minScale - The minimum scale of the font (i.e. 0.8 for a minimum 80% scale).
|
|
62
|
+
* @param maxScale - The maximum scale of the font (i.e. 2.5 for a maximum 250% scale).
|
|
63
|
+
* @param unit (optional) - The unit to convert the initial font size to. Use this if you want to
|
|
64
|
+
* convert to a unit other than $baselineUnit.
|
|
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
|
+
*/
|
|
127
|
+
ion-item-options {
|
|
128
|
+
/* stylelint-disable property-disallowed-list */
|
|
129
|
+
top: 0;
|
|
130
|
+
right: 0;
|
|
131
|
+
/* stylelint-enable property-disallowed-list */
|
|
132
|
+
justify-content: flex-end;
|
|
133
|
+
display: none;
|
|
134
|
+
position: absolute;
|
|
135
|
+
height: 100%;
|
|
136
|
+
user-select: none;
|
|
137
|
+
z-index: 1;
|
|
138
|
+
}
|
|
139
|
+
:host-context([dir=rtl]) ion-item-options {
|
|
140
|
+
justify-content: flex-start;
|
|
141
|
+
}
|
|
142
|
+
:host-context([dir=rtl]) ion-item-options:not(.item-options-end) {
|
|
143
|
+
/* stylelint-disable property-disallowed-list */
|
|
144
|
+
right: auto;
|
|
145
|
+
left: 0;
|
|
146
|
+
/* stylelint-enable property-disallowed-list */
|
|
147
|
+
justify-content: flex-end;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[dir=rtl] ion-item-options {
|
|
151
|
+
justify-content: flex-start;
|
|
152
|
+
}
|
|
153
|
+
[dir=rtl] ion-item-options:not(.item-options-end) {
|
|
154
|
+
/* stylelint-disable property-disallowed-list */
|
|
155
|
+
right: auto;
|
|
156
|
+
left: 0;
|
|
157
|
+
/* stylelint-enable property-disallowed-list */
|
|
158
|
+
justify-content: flex-end;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
@supports selector(:dir(rtl)) {
|
|
162
|
+
ion-item-options:dir(rtl) {
|
|
163
|
+
justify-content: flex-start;
|
|
164
|
+
}
|
|
165
|
+
ion-item-options:dir(rtl):not(.item-options-end) {
|
|
166
|
+
/* stylelint-disable property-disallowed-list */
|
|
167
|
+
right: auto;
|
|
168
|
+
left: 0;
|
|
169
|
+
/* stylelint-enable property-disallowed-list */
|
|
170
|
+
justify-content: flex-end;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
.item-options-start {
|
|
175
|
+
/* stylelint-disable property-disallowed-list */
|
|
176
|
+
right: auto;
|
|
177
|
+
left: 0;
|
|
178
|
+
/* stylelint-enable property-disallowed-list */
|
|
179
|
+
justify-content: flex-start;
|
|
180
|
+
}
|
|
181
|
+
:host-context([dir=rtl]) .item-options-start {
|
|
182
|
+
justify-content: flex-end;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
[dir=rtl] .item-options-start {
|
|
186
|
+
justify-content: flex-end;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
@supports selector(:dir(rtl)) {
|
|
190
|
+
.item-options-start:dir(rtl) {
|
|
191
|
+
justify-content: flex-end;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
/* stylelint-disable property-disallowed-list */
|
|
196
|
+
[dir=ltr] .item-options-start ion-item-option:first-child,
|
|
197
|
+
[dir=rtl] .item-options-start ion-item-option:last-child {
|
|
198
|
+
padding-left: var(--ion-safe-area-left);
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
[dir=ltr] .item-options-end ion-item-option:last-child,
|
|
202
|
+
[dir=rtl] .item-options-end ion-item-option:first-child {
|
|
203
|
+
padding-right: var(--ion-safe-area-right);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/* stylelint-enable property-disallowed-list */
|
|
207
|
+
:host-context([dir=rtl]) .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end) {
|
|
208
|
+
width: 100%;
|
|
209
|
+
visibility: visible;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
[dir=rtl] .item-sliding-active-slide.item-sliding-active-options-start ion-item-options:not(.item-options-end) {
|
|
213
|
+
width: 100%;
|
|
214
|
+
visibility: visible;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
@supports selector(:dir(rtl)) {
|
|
218
|
+
.item-sliding-active-slide:dir(rtl).item-sliding-active-options-start ion-item-options:not(.item-options-end) {
|
|
219
|
+
width: 100%;
|
|
220
|
+
visibility: visible;
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
.item-sliding-active-slide ion-item-options {
|
|
224
|
+
display: flex;
|
|
225
|
+
visibility: hidden;
|
|
226
|
+
}
|
|
227
|
+
.item-sliding-active-slide.item-sliding-active-options-start .item-options-start, .item-sliding-active-slide.item-sliding-active-options-end ion-item-options:not(.item-options-start) {
|
|
228
|
+
width: 100%;
|
|
229
|
+
visibility: visible;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
.item-options-ionic {
|
|
233
|
+
align-items: center;
|
|
234
|
+
gap: var(--ionic-space-100, 4px);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
/* stylelint-disable property-disallowed-list */
|
|
238
|
+
[dir=ltr] .item-options-start ion-item-option:last-child,
|
|
239
|
+
[dir=rtl] .item-options-start ion-item-option:first-child {
|
|
240
|
+
margin-right: var(--ionic-space-200, 8px);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
[dir=ltr] .item-options-start ion-item-option:first-child,
|
|
244
|
+
[dir=rtl] .item-options-start ion-item-option:last-child {
|
|
245
|
+
margin-left: calc(var(--ionic-space-200, 8px) + var(--ion-safe-area-left, 0));
|
|
246
|
+
padding-left: initial;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
[dir=ltr] .item-options-end ion-item-option:first-child,
|
|
250
|
+
[dir=rtl] .item-options-end ion-item-option:last-child {
|
|
251
|
+
margin-left: var(--ionic-space-200, 8px);
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
[dir=ltr] .item-options-end ion-item-option:last-child,
|
|
255
|
+
[dir=rtl] .item-options-end ion-item-option:first-child {
|
|
256
|
+
margin-right: calc(var(--ionic-space-200, 8px) + var(--ion-safe-area-right, 0));
|
|
257
|
+
padding-right: initial;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
/* stylelint-enable property-disallowed-list */
|
|
@@ -21,7 +21,7 @@ export class ItemOptions {
|
|
|
21
21
|
render() {
|
|
22
22
|
const theme = getIonTheme(this);
|
|
23
23
|
const isEnd = isEndSide(this.side);
|
|
24
|
-
return (h(Host, { key: '
|
|
24
|
+
return (h(Host, { key: '8604c0801ebbd6e08e4f6abc155a336d80929a9f', class: {
|
|
25
25
|
[theme]: true,
|
|
26
26
|
// Used internally for styling
|
|
27
27
|
[`item-options-${theme}`]: true,
|
|
@@ -42,14 +42,14 @@ export class ItemOptions {
|
|
|
42
42
|
return {
|
|
43
43
|
"ios": ["item-options.ios.scss"],
|
|
44
44
|
"md": ["item-options.md.scss"],
|
|
45
|
-
"ionic": ["item-options.
|
|
45
|
+
"ionic": ["item-options.ionic.scss"]
|
|
46
46
|
};
|
|
47
47
|
}
|
|
48
48
|
static get styleUrls() {
|
|
49
49
|
return {
|
|
50
50
|
"ios": ["item-options.ios.css"],
|
|
51
51
|
"md": ["item-options.md.css"],
|
|
52
|
-
"ionic": ["item-options.
|
|
52
|
+
"ionic": ["item-options.ionic.css"]
|
|
53
53
|
};
|
|
54
54
|
}
|
|
55
55
|
static get properties() {
|
|
@@ -10,7 +10,7 @@ import { configs, test, dragElementBy } from "../../../../utils/test/playwright/
|
|
|
10
10
|
* It is important to test all modes to ensure that the
|
|
11
11
|
* child components are being rendered correctly.
|
|
12
12
|
*/
|
|
13
|
-
configs().forEach(({ title, screenshot, config }) => {
|
|
13
|
+
configs({ modes: ['ionic-md', 'ios', 'md'] }).forEach(({ title, screenshot, config }) => {
|
|
14
14
|
test.describe(title('item-sliding: icons'), () => {
|
|
15
15
|
test('should not have visual regressions', async ({ page }) => {
|
|
16
16
|
await page.goto(`/src/components/item-sliding/test/icons`, config);
|