@saooti/octopus-sdk 33.1.3 → 33.2.1
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/README.md +1 -0
- package/index.ts +5 -0
- package/package.json +1 -3
- package/src/App.vue +1 -1
- package/src/assets/_utilities.scss +532 -0
- package/src/assets/bootstrap.scss +231 -0
- package/src/assets/form.scss +3 -46
- package/src/assets/general.scss +10 -58
- package/src/assets/multiselect.scss +8 -3
- package/src/assets/octopus-library.scss +2 -4
- package/src/components/display/categories/CategoryChooser.vue +2 -2
- package/src/components/display/categories/CategoryFilter.vue +60 -46
- package/src/components/display/categories/CategoryList.vue +22 -19
- package/src/components/display/comments/AddCommentModal.vue +60 -67
- package/src/components/display/comments/CommentBasicView.vue +3 -4
- package/src/components/display/comments/CommentInput.vue +4 -4
- package/src/components/display/comments/CommentItem.vue +2 -2
- package/src/components/display/comments/CommentPlayer.vue +2 -2
- package/src/components/display/emission/EmissionChooser.vue +1 -1
- package/src/components/display/emission/EmissionItem.vue +2 -1
- package/src/components/display/emission/EmissionPlayerItem.vue +0 -11
- package/src/components/display/filter/AdvancedSearch.vue +2 -2
- package/src/components/display/filter/MonetizableFilter.vue +1 -1
- package/src/components/display/filter/RubriqueChoice.vue +1 -1
- package/src/components/display/organisation/OrganisationChooser.vue +1 -1
- package/src/components/display/participant/ParticipantItem.vue +2 -1
- package/src/components/display/playlist/PlaylistItem.vue +3 -2
- package/src/components/display/podcasts/ParticipantDescription.vue +2 -1
- package/src/components/display/podcasts/PodcastImage.vue +3 -3
- package/src/components/display/podcasts/PodcastInlineList.vue +1 -1
- package/src/components/display/podcasts/PodcastInlineListClassic.vue +1 -1
- package/src/components/display/podcasts/PodcastInlineListTemplate.vue +6 -2
- package/src/components/display/podcasts/PodcastItemInfo.vue +2 -2
- package/src/components/display/podcasts/PodcastPlayBar.vue +9 -35
- package/src/components/display/podcasts/TagList.vue +0 -2
- package/src/components/display/rubriques/RubriqueChooser.vue +2 -2
- package/src/components/display/rubriques/RubriqueList.vue +25 -20
- package/src/components/display/sharing/PlayerParameters.vue +76 -99
- package/src/components/display/sharing/ShareButtons.vue +3 -5
- package/src/components/display/sharing/ShareButtonsIntern.vue +1 -1
- package/src/components/display/sharing/ShareDistribution.vue +11 -10
- package/src/components/display/sharing/SharePlayer.vue +3 -0
- package/src/components/display/sharing/SubscribeButtons.vue +1 -1
- package/src/components/form/ClassicCheckbox.vue +73 -14
- package/src/components/form/ClassicLoading.vue +5 -1
- package/src/components/form/ClassicRadio.vue +12 -3
- package/src/components/form/ClassicSelect.vue +2 -9
- package/src/components/misc/Accordion.vue +76 -0
- package/src/components/misc/ErrorMessage.vue +2 -1
- package/src/components/misc/HomeDropdown.vue +66 -63
- package/src/components/misc/Nav.vue +99 -0
- package/src/components/misc/Popover.vue +139 -98
- package/src/components/misc/ProgressBar.vue +96 -0
- package/src/components/misc/Spinner.vue +37 -0
- package/src/components/misc/TopBar.vue +1 -1
- package/src/components/misc/modal/ClassicModal.vue +140 -0
- package/src/components/misc/modal/ClipboardModal.vue +25 -40
- package/src/components/misc/modal/MessageModal.vue +45 -60
- package/src/components/misc/modal/NewsletterModal.vue +85 -94
- package/src/components/misc/modal/QrCodeModal.vue +19 -36
- package/src/components/misc/modal/ShareModalPlayer.vue +72 -133
- package/src/components/misc/player/Player.vue +0 -6
- package/src/components/misc/player/PlayerCompact.vue +5 -4
- package/src/components/misc/player/PlayerLarge.vue +13 -9
- package/src/components/misc/player/PlayerProgressBar.vue +10 -48
- package/src/components/mixins/player/playerLogic.ts +3 -3
- package/src/components/pages/Podcast.vue +1 -1
- package/src/assets/bootstrap-diff.scss +0 -195
- package/src/assets/modal.scss +0 -49
package/README.md
CHANGED
package/index.ts
CHANGED
|
@@ -15,6 +15,10 @@ export const getRubrique = () => import("./src/components/pages/Rubrique.vue");
|
|
|
15
15
|
export const getError403Page = () => import("./src/components/pages/Error403Page.vue");
|
|
16
16
|
|
|
17
17
|
//Misc
|
|
18
|
+
export const getAccordion = () => import("./src/components/misc/Accordion.vue");
|
|
19
|
+
export const getNav = () => import("./src/components/misc/Nav.vue");
|
|
20
|
+
export const getProgressBar = () => import("./src/components/misc/ProgressBar.vue");
|
|
21
|
+
export const getSpinner = () => import("./src/components/misc/Spinner.vue");
|
|
18
22
|
export const getFooter = () => import("./src/components/misc/Footer.vue");
|
|
19
23
|
export const getLeftMenu = () => import("./src/components/misc/LeftMenu.vue");
|
|
20
24
|
export const getPlayer = () => import("./src/components/misc/player/Player.vue");
|
|
@@ -24,6 +28,7 @@ export const getHomeDropdown = () => import("./src/components/misc/HomeDropdown.
|
|
|
24
28
|
export const getMessageModal = () => import("./src/components/misc/modal/MessageModal.vue");
|
|
25
29
|
export const getErrorMessage = () => import("./src/components/misc/ErrorMessage.vue");
|
|
26
30
|
export const getPopover = () => import("./src/components/misc/Popover.vue");
|
|
31
|
+
export const getClassicModal = () => import("./src/components/misc/modal/ClassicModal.vue");
|
|
27
32
|
|
|
28
33
|
|
|
29
34
|
//Display
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@saooti/octopus-sdk",
|
|
3
|
-
"version": "33.1
|
|
3
|
+
"version": "33.2.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Javascript SDK for using octopus",
|
|
6
6
|
"author": "Saooti",
|
|
@@ -21,7 +21,6 @@
|
|
|
21
21
|
"@vue/compat": "^3.2.37",
|
|
22
22
|
"autoprefixer": "^10.4.8",
|
|
23
23
|
"axios": "^0.24.0",
|
|
24
|
-
"bootstrap": "5.2.0",
|
|
25
24
|
"express": "^4.18.2",
|
|
26
25
|
"hls.js": "^1.1.5",
|
|
27
26
|
"humanize-duration": "^3.27.2",
|
|
@@ -44,7 +43,6 @@
|
|
|
44
43
|
"vuex": "^4.0.2"
|
|
45
44
|
},
|
|
46
45
|
"devDependencies": {
|
|
47
|
-
"@types/bootstrap": "^5.1.13",
|
|
48
46
|
"@types/jquery": "^3.5.14",
|
|
49
47
|
"@typescript-eslint/eslint-plugin": "^5.30.7",
|
|
50
48
|
"@typescript-eslint/parser": "^5.30.7",
|
package/src/App.vue
CHANGED
|
@@ -0,0 +1,532 @@
|
|
|
1
|
+
// Utilities
|
|
2
|
+
$spacer: 1rem !default;
|
|
3
|
+
$font-size-base: 1rem !default;
|
|
4
|
+
$spacers: (
|
|
5
|
+
0: 0,
|
|
6
|
+
1: $spacer * .25,
|
|
7
|
+
2: $spacer * .5,
|
|
8
|
+
3: $spacer,
|
|
9
|
+
4: $spacer * 1.5,
|
|
10
|
+
5: $spacer * 3,
|
|
11
|
+
) !default;
|
|
12
|
+
$font-sizes: (
|
|
13
|
+
1: $font-size-base * 2.5,
|
|
14
|
+
2: $font-size-base * 2,
|
|
15
|
+
3: $font-size-base * 1.75,
|
|
16
|
+
4: $font-size-base * 1.5,
|
|
17
|
+
5: $font-size-base * 1.25,
|
|
18
|
+
6: $font-size-base,
|
|
19
|
+
) !default;
|
|
20
|
+
$white: #fff !default;
|
|
21
|
+
$black: #000 !default;
|
|
22
|
+
$primary: #0d6efd !default;
|
|
23
|
+
$secondary: #6c757d !default;
|
|
24
|
+
$success: #198754 !default;
|
|
25
|
+
$info: #0dcaf0 !default;
|
|
26
|
+
$warning: #ff924f94 !default;
|
|
27
|
+
$danger: #dc3545 !default;
|
|
28
|
+
$light: #f8f9fa !default;
|
|
29
|
+
$dark: #212529 !default;
|
|
30
|
+
$theme-colors: (
|
|
31
|
+
"primary": $primary,
|
|
32
|
+
"secondary": $secondary,
|
|
33
|
+
"success": $success,
|
|
34
|
+
"info": $info,
|
|
35
|
+
"warning": $warning,
|
|
36
|
+
"danger": $danger,
|
|
37
|
+
"light": $light,
|
|
38
|
+
"dark": $dark,
|
|
39
|
+
"black": $black,
|
|
40
|
+
"white": $white,
|
|
41
|
+
) !default;
|
|
42
|
+
|
|
43
|
+
$utilities: () !default;
|
|
44
|
+
// stylelint-disable-next-line scss/dollar-variable-default
|
|
45
|
+
$utilities: map-merge(
|
|
46
|
+
(
|
|
47
|
+
"align": (
|
|
48
|
+
property: vertical-align,
|
|
49
|
+
class: align,
|
|
50
|
+
values: baseline top middle bottom text-bottom text-top
|
|
51
|
+
),
|
|
52
|
+
"float": (
|
|
53
|
+
responsive: true,
|
|
54
|
+
property: float,
|
|
55
|
+
values: (
|
|
56
|
+
start: left,
|
|
57
|
+
end: right,
|
|
58
|
+
none: none,
|
|
59
|
+
)
|
|
60
|
+
),
|
|
61
|
+
"opacity": (
|
|
62
|
+
property: opacity,
|
|
63
|
+
values: (
|
|
64
|
+
0: 0,
|
|
65
|
+
25: .25,
|
|
66
|
+
50: .5,
|
|
67
|
+
75: .75,
|
|
68
|
+
100: 1,
|
|
69
|
+
)
|
|
70
|
+
),
|
|
71
|
+
"overflow": (
|
|
72
|
+
property: overflow,
|
|
73
|
+
values: auto hidden visible scroll,
|
|
74
|
+
),
|
|
75
|
+
"display": (
|
|
76
|
+
responsive: true,
|
|
77
|
+
print: true,
|
|
78
|
+
property: display,
|
|
79
|
+
class: d,
|
|
80
|
+
values: inline inline-block block grid table table-row table-cell flex inline-flex none
|
|
81
|
+
),
|
|
82
|
+
"position": (
|
|
83
|
+
property: position,
|
|
84
|
+
values: static relative absolute fixed sticky
|
|
85
|
+
),
|
|
86
|
+
"border": (
|
|
87
|
+
property: border,
|
|
88
|
+
values: (
|
|
89
|
+
null: 1px solid #dee2e6,
|
|
90
|
+
0: 0,
|
|
91
|
+
)
|
|
92
|
+
),
|
|
93
|
+
"border-top": (
|
|
94
|
+
property: border-top,
|
|
95
|
+
values: (
|
|
96
|
+
null: 1px solid #dee2e6,
|
|
97
|
+
0: 0,
|
|
98
|
+
)
|
|
99
|
+
),
|
|
100
|
+
"border-end": (
|
|
101
|
+
property: border-right,
|
|
102
|
+
class: border-end,
|
|
103
|
+
values: (
|
|
104
|
+
null: 1px solid #dee2e6,
|
|
105
|
+
0: 0,
|
|
106
|
+
)
|
|
107
|
+
),
|
|
108
|
+
"border-bottom": (
|
|
109
|
+
property: border-bottom,
|
|
110
|
+
values: (
|
|
111
|
+
null: 1px solid #dee2e6,
|
|
112
|
+
0: 0,
|
|
113
|
+
)
|
|
114
|
+
),
|
|
115
|
+
"border-start": (
|
|
116
|
+
property: border-left,
|
|
117
|
+
class: border-start,
|
|
118
|
+
values: (
|
|
119
|
+
null: 1px solid #dee2e6,
|
|
120
|
+
0: 0,
|
|
121
|
+
)
|
|
122
|
+
),
|
|
123
|
+
"border-color": (
|
|
124
|
+
property: border-color,
|
|
125
|
+
class: border,
|
|
126
|
+
values: $theme-colors
|
|
127
|
+
),
|
|
128
|
+
"width": (
|
|
129
|
+
property: width,
|
|
130
|
+
class: w,
|
|
131
|
+
values: (
|
|
132
|
+
0: 0,
|
|
133
|
+
5: 5%,
|
|
134
|
+
10: 10%,
|
|
135
|
+
15: 15%,
|
|
136
|
+
20: 20%,
|
|
137
|
+
25: 25%,
|
|
138
|
+
30: 30%,
|
|
139
|
+
35: 35%,
|
|
140
|
+
40: 40%,
|
|
141
|
+
50: 50%,
|
|
142
|
+
60: 60%,
|
|
143
|
+
75: 75%,
|
|
144
|
+
100: 100%,
|
|
145
|
+
auto: auto
|
|
146
|
+
)
|
|
147
|
+
),
|
|
148
|
+
"height": (
|
|
149
|
+
property: height,
|
|
150
|
+
class: h,
|
|
151
|
+
values: (
|
|
152
|
+
25: 25%,
|
|
153
|
+
50: 50%,
|
|
154
|
+
75: 75%,
|
|
155
|
+
100: 100%,
|
|
156
|
+
auto: auto
|
|
157
|
+
)
|
|
158
|
+
),
|
|
159
|
+
"flex": (
|
|
160
|
+
responsive: true,
|
|
161
|
+
property: flex,
|
|
162
|
+
values: (fill: 1 1 auto)
|
|
163
|
+
),
|
|
164
|
+
"flex-direction": (
|
|
165
|
+
responsive: true,
|
|
166
|
+
property: flex-direction,
|
|
167
|
+
class: flex,
|
|
168
|
+
values: row column row-reverse column-reverse
|
|
169
|
+
),
|
|
170
|
+
"flex-grow": (
|
|
171
|
+
responsive: true,
|
|
172
|
+
property: flex-grow,
|
|
173
|
+
class: flex,
|
|
174
|
+
values: (
|
|
175
|
+
grow-0: 0,
|
|
176
|
+
grow-1: 1,
|
|
177
|
+
)
|
|
178
|
+
),
|
|
179
|
+
"flex-shrink": (
|
|
180
|
+
responsive: true,
|
|
181
|
+
property: flex-shrink,
|
|
182
|
+
class: flex,
|
|
183
|
+
values: (
|
|
184
|
+
shrink-0: 0,
|
|
185
|
+
shrink-1: 1,
|
|
186
|
+
)
|
|
187
|
+
),
|
|
188
|
+
"flex-wrap": (
|
|
189
|
+
responsive: true,
|
|
190
|
+
property: flex-wrap,
|
|
191
|
+
class: flex,
|
|
192
|
+
values: wrap nowrap wrap-reverse
|
|
193
|
+
),
|
|
194
|
+
"justify-content": (
|
|
195
|
+
responsive: true,
|
|
196
|
+
property: justify-content,
|
|
197
|
+
values: (
|
|
198
|
+
start: flex-start,
|
|
199
|
+
end: flex-end,
|
|
200
|
+
center: center,
|
|
201
|
+
between: space-between,
|
|
202
|
+
around: space-around,
|
|
203
|
+
evenly: space-evenly,
|
|
204
|
+
)
|
|
205
|
+
),
|
|
206
|
+
"align-items": (
|
|
207
|
+
responsive: true,
|
|
208
|
+
property: align-items,
|
|
209
|
+
values: (
|
|
210
|
+
start: flex-start,
|
|
211
|
+
end: flex-end,
|
|
212
|
+
center: center,
|
|
213
|
+
baseline: baseline,
|
|
214
|
+
stretch: stretch,
|
|
215
|
+
)
|
|
216
|
+
),
|
|
217
|
+
"align-content": (
|
|
218
|
+
responsive: true,
|
|
219
|
+
property: align-content,
|
|
220
|
+
values: (
|
|
221
|
+
start: flex-start,
|
|
222
|
+
end: flex-end,
|
|
223
|
+
center: center,
|
|
224
|
+
between: space-between,
|
|
225
|
+
around: space-around,
|
|
226
|
+
stretch: stretch,
|
|
227
|
+
)
|
|
228
|
+
),
|
|
229
|
+
"align-self": (
|
|
230
|
+
responsive: true,
|
|
231
|
+
property: align-self,
|
|
232
|
+
values: (
|
|
233
|
+
auto: auto,
|
|
234
|
+
start: flex-start,
|
|
235
|
+
end: flex-end,
|
|
236
|
+
center: center,
|
|
237
|
+
baseline: baseline,
|
|
238
|
+
stretch: stretch,
|
|
239
|
+
)
|
|
240
|
+
),
|
|
241
|
+
"margin": (
|
|
242
|
+
responsive: true,
|
|
243
|
+
property: margin,
|
|
244
|
+
class: m,
|
|
245
|
+
values: map-merge($spacers, (auto: auto))
|
|
246
|
+
),
|
|
247
|
+
"margin-x": (
|
|
248
|
+
responsive: true,
|
|
249
|
+
property: margin-right margin-left,
|
|
250
|
+
class: mx,
|
|
251
|
+
values: map-merge($spacers, (auto: auto))
|
|
252
|
+
),
|
|
253
|
+
"margin-y": (
|
|
254
|
+
responsive: true,
|
|
255
|
+
property: margin-top margin-bottom,
|
|
256
|
+
class: my,
|
|
257
|
+
values: map-merge($spacers, (auto: auto))
|
|
258
|
+
),
|
|
259
|
+
"margin-top": (
|
|
260
|
+
responsive: true,
|
|
261
|
+
property: margin-top,
|
|
262
|
+
class: mt,
|
|
263
|
+
values: map-merge($spacers, (auto: auto))
|
|
264
|
+
),
|
|
265
|
+
"margin-end": (
|
|
266
|
+
responsive: true,
|
|
267
|
+
property: margin-right,
|
|
268
|
+
class: me,
|
|
269
|
+
values: map-merge($spacers, (auto: auto))
|
|
270
|
+
),
|
|
271
|
+
"margin-bottom": (
|
|
272
|
+
responsive: true,
|
|
273
|
+
property: margin-bottom,
|
|
274
|
+
class: mb,
|
|
275
|
+
values: map-merge($spacers, (auto: auto))
|
|
276
|
+
),
|
|
277
|
+
"margin-start": (
|
|
278
|
+
responsive: true,
|
|
279
|
+
property: margin-left,
|
|
280
|
+
class: ms,
|
|
281
|
+
values: map-merge($spacers, (auto: auto))
|
|
282
|
+
),
|
|
283
|
+
// Padding utilities
|
|
284
|
+
"padding": (
|
|
285
|
+
responsive: true,
|
|
286
|
+
property: padding,
|
|
287
|
+
class: p,
|
|
288
|
+
values: $spacers
|
|
289
|
+
),
|
|
290
|
+
"padding-x": (
|
|
291
|
+
responsive: true,
|
|
292
|
+
property: padding-right padding-left,
|
|
293
|
+
class: px,
|
|
294
|
+
values: $spacers
|
|
295
|
+
),
|
|
296
|
+
"padding-y": (
|
|
297
|
+
responsive: true,
|
|
298
|
+
property: padding-top padding-bottom,
|
|
299
|
+
class: py,
|
|
300
|
+
values: $spacers
|
|
301
|
+
),
|
|
302
|
+
"padding-top": (
|
|
303
|
+
responsive: true,
|
|
304
|
+
property: padding-top,
|
|
305
|
+
class: pt,
|
|
306
|
+
values: $spacers
|
|
307
|
+
),
|
|
308
|
+
"padding-end": (
|
|
309
|
+
responsive: true,
|
|
310
|
+
property: padding-right,
|
|
311
|
+
class: pe,
|
|
312
|
+
values: $spacers
|
|
313
|
+
),
|
|
314
|
+
"padding-bottom": (
|
|
315
|
+
responsive: true,
|
|
316
|
+
property: padding-bottom,
|
|
317
|
+
class: pb,
|
|
318
|
+
values: $spacers
|
|
319
|
+
),
|
|
320
|
+
"padding-start": (
|
|
321
|
+
responsive: true,
|
|
322
|
+
property: padding-left,
|
|
323
|
+
class: ps,
|
|
324
|
+
values: $spacers
|
|
325
|
+
),
|
|
326
|
+
"font-size": (
|
|
327
|
+
rfs: true,
|
|
328
|
+
property: font-size,
|
|
329
|
+
class: fs,
|
|
330
|
+
values: $font-sizes
|
|
331
|
+
),
|
|
332
|
+
"font-weight": (
|
|
333
|
+
property: font-weight,
|
|
334
|
+
class: fw,
|
|
335
|
+
values: (
|
|
336
|
+
light: 300,
|
|
337
|
+
lighter:lighter,
|
|
338
|
+
normal: 400,
|
|
339
|
+
bold: 700,
|
|
340
|
+
semibold: 600,
|
|
341
|
+
bolder:bolder
|
|
342
|
+
)
|
|
343
|
+
),
|
|
344
|
+
"text-align": (
|
|
345
|
+
responsive: true,
|
|
346
|
+
property: text-align,
|
|
347
|
+
class: text,
|
|
348
|
+
values: (
|
|
349
|
+
start: left,
|
|
350
|
+
end: right,
|
|
351
|
+
center: center,
|
|
352
|
+
)
|
|
353
|
+
),
|
|
354
|
+
"text-decoration": (
|
|
355
|
+
property: text-decoration,
|
|
356
|
+
values: none underline line-through
|
|
357
|
+
),
|
|
358
|
+
"text-transform": (
|
|
359
|
+
property: text-transform,
|
|
360
|
+
class: text,
|
|
361
|
+
values: lowercase uppercase capitalize
|
|
362
|
+
),
|
|
363
|
+
"white-space": (
|
|
364
|
+
property: white-space,
|
|
365
|
+
class: text,
|
|
366
|
+
values: (
|
|
367
|
+
wrap: normal,
|
|
368
|
+
nowrap: nowrap,
|
|
369
|
+
)
|
|
370
|
+
),
|
|
371
|
+
"word-wrap": (
|
|
372
|
+
property: word-wrap word-break,
|
|
373
|
+
class: text,
|
|
374
|
+
values: (break: break-word),
|
|
375
|
+
rtl: false
|
|
376
|
+
),
|
|
377
|
+
"color": (
|
|
378
|
+
property: color,
|
|
379
|
+
class: text,
|
|
380
|
+
values: $theme-colors,
|
|
381
|
+
),
|
|
382
|
+
"background-color": (
|
|
383
|
+
property: background-color,
|
|
384
|
+
class: bg,
|
|
385
|
+
values: map-merge(
|
|
386
|
+
$theme-colors,
|
|
387
|
+
(
|
|
388
|
+
"transparent": transparent
|
|
389
|
+
)
|
|
390
|
+
)
|
|
391
|
+
),
|
|
392
|
+
// scss-docs-end utils-bg-color
|
|
393
|
+
"gradient": (
|
|
394
|
+
property: background-image,
|
|
395
|
+
class: bg,
|
|
396
|
+
values: (gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)))
|
|
397
|
+
),
|
|
398
|
+
"rounded": (
|
|
399
|
+
property: border-radius,
|
|
400
|
+
class: rounded,
|
|
401
|
+
values: (
|
|
402
|
+
null: .375rem,
|
|
403
|
+
0: 0,
|
|
404
|
+
1: .25rem,
|
|
405
|
+
2: .375rem,
|
|
406
|
+
3: .5rem,
|
|
407
|
+
4: 1rem,
|
|
408
|
+
5:2rem,
|
|
409
|
+
circle: 50%,
|
|
410
|
+
pill: 50rem
|
|
411
|
+
)
|
|
412
|
+
),
|
|
413
|
+
"rounded-top": (
|
|
414
|
+
property: border-top-left-radius border-top-right-radius,
|
|
415
|
+
class: rounded-top,
|
|
416
|
+
values: (null: .375rem)
|
|
417
|
+
),
|
|
418
|
+
"rounded-end": (
|
|
419
|
+
property: border-top-right-radius border-bottom-right-radius,
|
|
420
|
+
class: rounded-end,
|
|
421
|
+
values: (null: .375rem)
|
|
422
|
+
),
|
|
423
|
+
"rounded-bottom": (
|
|
424
|
+
property: border-bottom-right-radius border-bottom-left-radius,
|
|
425
|
+
class: rounded-bottom,
|
|
426
|
+
values: (null: .375rem)
|
|
427
|
+
),
|
|
428
|
+
"rounded-start": (
|
|
429
|
+
property: border-bottom-left-radius border-top-left-radius,
|
|
430
|
+
class: rounded-start,
|
|
431
|
+
values: (null: .375rem)
|
|
432
|
+
),
|
|
433
|
+
"visibility": (
|
|
434
|
+
property: visibility,
|
|
435
|
+
class: null,
|
|
436
|
+
values: (
|
|
437
|
+
visible: visible,
|
|
438
|
+
invisible: hidden,
|
|
439
|
+
)
|
|
440
|
+
)
|
|
441
|
+
),
|
|
442
|
+
$utilities
|
|
443
|
+
);
|
|
444
|
+
@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {
|
|
445
|
+
$values: map-get($utility, values);
|
|
446
|
+
// If the values are a list or string, convert it into a map
|
|
447
|
+
@if type-of($values) == "string" or type-of(nth($values, 1)) != "list" {
|
|
448
|
+
$values: zip($values, $values);
|
|
449
|
+
}
|
|
450
|
+
@each $key, $value in $values {
|
|
451
|
+
$properties: map-get($utility, property);
|
|
452
|
+
// Multiple properties are possible, for example with vertical or horizontal margins or paddings
|
|
453
|
+
@if type-of($properties) == "string" {
|
|
454
|
+
$properties: append((), $properties);
|
|
455
|
+
}
|
|
456
|
+
|
|
457
|
+
// Use custom class if present
|
|
458
|
+
$property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));
|
|
459
|
+
$property-class: if($property-class == null, "", $property-class);
|
|
460
|
+
|
|
461
|
+
// Use custom CSS variable name if present, otherwise default to `class`
|
|
462
|
+
$css-variable-name: if(map-has-key($utility, css-variable-name), map-get($utility, css-variable-name), map-get($utility, class));
|
|
463
|
+
|
|
464
|
+
// State params to generate pseudo-classes
|
|
465
|
+
$state: if(map-has-key($utility, state), map-get($utility, state), ());
|
|
466
|
+
|
|
467
|
+
$infix: if($property-class == "" and str-slice($infix, 1, 1) == "-", str-slice($infix, 2), $infix);
|
|
468
|
+
|
|
469
|
+
// Don't prefix if value key is null (eg. with shadow class)
|
|
470
|
+
$property-class-modifier: if($key, if($property-class == "" and $infix == "", "", "-") + $key, "");
|
|
471
|
+
|
|
472
|
+
@if map-get($utility, rfs) {
|
|
473
|
+
// Inside the media query
|
|
474
|
+
@if $is-rfs-media-query {
|
|
475
|
+
$val: rfs-value($value);
|
|
476
|
+
|
|
477
|
+
// Do not render anything if fluid and non fluid values are the same
|
|
478
|
+
$value: if($val == rfs-fluid-value($value), null, $val);
|
|
479
|
+
}
|
|
480
|
+
@else {
|
|
481
|
+
$value: rfs-fluid-value($value);
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
$is-css-var: map-get($utility, css-var);
|
|
486
|
+
$is-rtl: map-get($utility, rtl);
|
|
487
|
+
|
|
488
|
+
@if $value != null {
|
|
489
|
+
@if $is-rtl == false {
|
|
490
|
+
/* rtl:begin:remove */
|
|
491
|
+
}
|
|
492
|
+
|
|
493
|
+
@if $is-css-var {
|
|
494
|
+
.#{$property-class + $infix + $property-class-modifier} {
|
|
495
|
+
#{$css-variable-name}: #{$value};
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
@each $pseudo in $state {
|
|
499
|
+
.#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
|
|
500
|
+
#{$css-variable-name}: #{$value};
|
|
501
|
+
}
|
|
502
|
+
}
|
|
503
|
+
} @else {
|
|
504
|
+
.#{$property-class + $infix + $property-class-modifier} {
|
|
505
|
+
@each $property in $properties {
|
|
506
|
+
#{$property}: $value if(true, !important, null);
|
|
507
|
+
}
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
@each $pseudo in $state {
|
|
511
|
+
.#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {
|
|
512
|
+
@each $property in $properties {
|
|
513
|
+
#{$property}: $value if(true, !important, null);
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@if $is-rtl == false {
|
|
520
|
+
/* rtl:end:remove */
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
@each $key, $utility in $utilities {
|
|
527
|
+
// The utility can be disabled with `false`, thus check if the utility is a map first
|
|
528
|
+
// Then check if the utility needs print styles
|
|
529
|
+
@if type-of($utility) == "map" {
|
|
530
|
+
@include generate-utility($utility, "");
|
|
531
|
+
}
|
|
532
|
+
}
|