origam 2.38.2 → 2.39.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/CHANGELOG.md +29 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +10 -0
- package/dist/src/assets/css/tokens/light.css +5 -0
- package/dist/src/assets/scss/tokens/_dark.scss +10 -0
- package/dist/src/assets/scss/tokens/_light.scss +5 -0
- package/dist/src/components/Card/OrigamCard.vue +12 -5
- package/dist/src/components/Code/OrigamCode.vue +2 -1
- package/dist/src/components/Dialog/OrigamDialog.vue +8 -4
- package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +8 -4
- package/dist/src/components/Form/OrigamForm.vue +20 -1
- package/dist/src/composables/Commons/content.composable.cjs +20 -0
- package/dist/src/composables/Commons/content.composable.d.ts +14 -0
- package/dist/src/composables/Commons/content.composable.js +9 -0
- package/dist/src/composables/Icon/icon.composable.cjs +9 -2
- package/dist/src/composables/Icon/icon.composable.d.ts +10 -0
- package/dist/src/composables/Icon/icon.composable.js +6 -2
- package/dist/src/composables/index.cjs +12 -0
- package/dist/src/composables/index.d.ts +1 -0
- package/dist/src/composables/index.js +1 -0
- package/dist/src/consts/Commons/mdi-core.const.cjs +61 -0
- package/dist/src/consts/Commons/mdi-core.const.d.ts +11 -0
- package/dist/src/consts/Commons/mdi-core.const.js +55 -0
- package/dist/src/consts/Commons/mdi.const.cjs +9 -54
- package/dist/src/consts/Commons/mdi.const.d.ts +2 -2
- package/dist/src/consts/Commons/mdi.const.js +3 -53
- package/dist/src/interfaces/Card/card.interface.d.ts +3 -11
- package/dist/src/interfaces/Commons/content.interface.cjs +1 -0
- package/dist/src/interfaces/Commons/content.interface.d.ts +26 -0
- package/dist/src/interfaces/Commons/content.interface.js +0 -0
- package/dist/src/interfaces/Commons/nuxt-module.interface.d.ts +20 -0
- package/dist/src/interfaces/Form/form.interface.d.ts +2 -1
- package/dist/src/interfaces/index.cjs +11 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/nuxt/create.core.cjs +12 -0
- package/dist/src/nuxt/create.core.d.ts +1 -0
- package/dist/src/nuxt/create.core.js +1 -0
- package/dist/src/nuxt/create.full.cjs +12 -0
- package/dist/src/nuxt/create.full.d.ts +7 -0
- package/dist/src/nuxt/create.full.js +1 -0
- package/dist/src/nuxt/module.cjs +84 -65
- package/dist/src/nuxt/module.js +78 -64
- package/dist/src/nuxt/plugin.client.cjs +2 -2
- package/dist/src/nuxt/plugin.client.js +1 -1
- package/dist/src/nuxt/plugin.server.cjs +2 -2
- package/dist/src/nuxt/plugin.server.js +1 -1
- package/dist/src/origam-core.cjs +153 -0
- package/dist/src/origam-core.d.ts +101 -0
- package/dist/src/origam-core.js +169 -0
- package/dist/src/origam.cjs +11 -133
- package/dist/src/origam.d.ts +14 -20
- package/dist/src/origam.js +7 -163
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/dist/src/utils/Code/trim-blank-lines.util.cjs +13 -0
- package/dist/src/utils/Code/trim-blank-lines.util.d.ts +9 -0
- package/dist/src/utils/Code/trim-blank-lines.util.js +7 -0
- package/dist/src/utils/CodeGroup/code-group.util.cjs +2 -1
- package/dist/src/utils/CodeGroup/code-group.util.js +2 -1
- package/dist/src/utils/index.cjs +11 -0
- package/dist/src/utils/index.d.ts +1 -0
- package/dist/src/utils/index.js +1 -0
- package/package.json +2 -1
|
@@ -432,6 +432,8 @@
|
|
|
432
432
|
--origam-card--loading---min-height: 120px;
|
|
433
433
|
--origam-card__asset---aspect-ratio: 16 / 9;
|
|
434
434
|
--origam-card__content---display: block;
|
|
435
|
+
--origam-card__content---gap: 0;
|
|
436
|
+
--origam-card__content---flex-direction: row;
|
|
435
437
|
--origam-card__loader---min-height: 4px;
|
|
436
438
|
--origam-card__skeleton---padding: var(--origam-space---4);
|
|
437
439
|
--origam-card__loader---z-index: 3;
|
|
@@ -1222,6 +1224,9 @@
|
|
|
1222
1224
|
--origam-field__loader---height: 4px;
|
|
1223
1225
|
--origam-form__actions---margin-top: var(--origam-space---4);
|
|
1224
1226
|
--origam-form__actions---gap: var(--origam-space---2);
|
|
1227
|
+
--origam-form__content---display: block;
|
|
1228
|
+
--origam-form__content---gap: 0;
|
|
1229
|
+
--origam-form__content---flex-direction: row;
|
|
1225
1230
|
--origam-form__actions---display: flex;
|
|
1226
1231
|
--origam-form__details---font-size: var(--origam-font__size---sm);
|
|
1227
1232
|
--origam-form__details---font-weight: var(--origam-font__weight---regular);
|
|
@@ -3480,6 +3485,8 @@
|
|
|
3480
3485
|
--origam-card--loading---min-height: 120px;
|
|
3481
3486
|
--origam-card__asset---aspect-ratio: 16 / 9;
|
|
3482
3487
|
--origam-card__content---display: block;
|
|
3488
|
+
--origam-card__content---gap: 0;
|
|
3489
|
+
--origam-card__content---flex-direction: row;
|
|
3483
3490
|
--origam-card__loader---min-height: 4px;
|
|
3484
3491
|
--origam-card__skeleton---padding: var(--origam-space---4);
|
|
3485
3492
|
--origam-card__loader---z-index: 3;
|
|
@@ -4270,6 +4277,9 @@
|
|
|
4270
4277
|
--origam-field__loader---height: 4px;
|
|
4271
4278
|
--origam-form__actions---margin-top: var(--origam-space---4);
|
|
4272
4279
|
--origam-form__actions---gap: var(--origam-space---2);
|
|
4280
|
+
--origam-form__content---display: block;
|
|
4281
|
+
--origam-form__content---gap: 0;
|
|
4282
|
+
--origam-form__content---flex-direction: row;
|
|
4273
4283
|
--origam-form__actions---display: flex;
|
|
4274
4284
|
--origam-form__details---font-size: var(--origam-font__size---sm);
|
|
4275
4285
|
--origam-form__details---font-weight: var(--origam-font__weight---regular);
|
|
@@ -332,6 +332,8 @@
|
|
|
332
332
|
--origam-card--loading---min-height: 120px;
|
|
333
333
|
--origam-card__asset---aspect-ratio: 16 / 9;
|
|
334
334
|
--origam-card__content---display: block;
|
|
335
|
+
--origam-card__content---gap: 0;
|
|
336
|
+
--origam-card__content---flex-direction: row;
|
|
335
337
|
--origam-card__loader---min-height: 4px;
|
|
336
338
|
--origam-card__skeleton---padding: var(--origam-space---4);
|
|
337
339
|
--origam-card__loader---z-index: 3;
|
|
@@ -1122,6 +1124,9 @@
|
|
|
1122
1124
|
--origam-field__loader---height: 4px;
|
|
1123
1125
|
--origam-form__actions---margin-top: var(--origam-space---4);
|
|
1124
1126
|
--origam-form__actions---gap: var(--origam-space---2);
|
|
1127
|
+
--origam-form__content---display: block;
|
|
1128
|
+
--origam-form__content---gap: 0;
|
|
1129
|
+
--origam-form__content---flex-direction: row;
|
|
1125
1130
|
--origam-form__actions---display: flex;
|
|
1126
1131
|
--origam-form__details---font-size: var(--origam-font__size---sm);
|
|
1127
1132
|
--origam-form__details---font-weight: var(--origam-font__weight---regular);
|
|
@@ -432,6 +432,8 @@
|
|
|
432
432
|
--origam-card--loading---min-height: 120px;
|
|
433
433
|
--origam-card__asset---aspect-ratio: 16 / 9;
|
|
434
434
|
--origam-card__content---display: block;
|
|
435
|
+
--origam-card__content---gap: 0;
|
|
436
|
+
--origam-card__content---flex-direction: row;
|
|
435
437
|
--origam-card__loader---min-height: 4px;
|
|
436
438
|
--origam-card__skeleton---padding: var(--origam-space---4);
|
|
437
439
|
--origam-card__loader---z-index: 3;
|
|
@@ -1222,6 +1224,9 @@
|
|
|
1222
1224
|
--origam-field__loader---height: 4px;
|
|
1223
1225
|
--origam-form__actions---margin-top: var(--origam-space---4);
|
|
1224
1226
|
--origam-form__actions---gap: var(--origam-space---2);
|
|
1227
|
+
--origam-form__content---display: block;
|
|
1228
|
+
--origam-form__content---gap: 0;
|
|
1229
|
+
--origam-form__content---flex-direction: row;
|
|
1225
1230
|
--origam-form__actions---display: flex;
|
|
1226
1231
|
--origam-form__details---font-size: var(--origam-font__size---sm);
|
|
1227
1232
|
--origam-form__details---font-weight: var(--origam-font__weight---regular);
|
|
@@ -3480,6 +3485,8 @@
|
|
|
3480
3485
|
--origam-card--loading---min-height: 120px;
|
|
3481
3486
|
--origam-card__asset---aspect-ratio: 16 / 9;
|
|
3482
3487
|
--origam-card__content---display: block;
|
|
3488
|
+
--origam-card__content---gap: 0;
|
|
3489
|
+
--origam-card__content---flex-direction: row;
|
|
3483
3490
|
--origam-card__loader---min-height: 4px;
|
|
3484
3491
|
--origam-card__skeleton---padding: var(--origam-space---4);
|
|
3485
3492
|
--origam-card__loader---z-index: 3;
|
|
@@ -4270,6 +4277,9 @@
|
|
|
4270
4277
|
--origam-field__loader---height: 4px;
|
|
4271
4278
|
--origam-form__actions---margin-top: var(--origam-space---4);
|
|
4272
4279
|
--origam-form__actions---gap: var(--origam-space---2);
|
|
4280
|
+
--origam-form__content---display: block;
|
|
4281
|
+
--origam-form__content---gap: 0;
|
|
4282
|
+
--origam-form__content---flex-direction: row;
|
|
4273
4283
|
--origam-form__actions---display: flex;
|
|
4274
4284
|
--origam-form__details---font-size: var(--origam-font__size---sm);
|
|
4275
4285
|
--origam-form__details---font-weight: var(--origam-font__weight---regular);
|
|
@@ -332,6 +332,8 @@
|
|
|
332
332
|
--origam-card--loading---min-height: 120px;
|
|
333
333
|
--origam-card__asset---aspect-ratio: 16 / 9;
|
|
334
334
|
--origam-card__content---display: block;
|
|
335
|
+
--origam-card__content---gap: 0;
|
|
336
|
+
--origam-card__content---flex-direction: row;
|
|
335
337
|
--origam-card__loader---min-height: 4px;
|
|
336
338
|
--origam-card__skeleton---padding: var(--origam-space---4);
|
|
337
339
|
--origam-card__loader---z-index: 3;
|
|
@@ -1122,6 +1124,9 @@
|
|
|
1122
1124
|
--origam-field__loader---height: 4px;
|
|
1123
1125
|
--origam-form__actions---margin-top: var(--origam-space---4);
|
|
1124
1126
|
--origam-form__actions---gap: var(--origam-space---2);
|
|
1127
|
+
--origam-form__content---display: block;
|
|
1128
|
+
--origam-form__content---gap: 0;
|
|
1129
|
+
--origam-form__content---flex-direction: row;
|
|
1125
1130
|
--origam-form__actions---display: flex;
|
|
1126
1131
|
--origam-form__details---font-size: var(--origam-font__size---sm);
|
|
1127
1132
|
--origam-form__details---font-weight: var(--origam-font__weight---regular);
|
|
@@ -198,6 +198,7 @@ import OrigamProgress from "../Progress/OrigamProgress.vue";
|
|
|
198
198
|
import OrigamSkeleton from "../Skeleton/OrigamSkeleton.vue";
|
|
199
199
|
import OrigamSkeletonGroup from "../Skeleton/OrigamSkeletonGroup.vue";
|
|
200
200
|
import { useAdjacent } from "../../composables/Commons/adjacent.composable";
|
|
201
|
+
import { useContent } from "../../composables/Commons/content.composable";
|
|
201
202
|
import { useDensity } from "../../composables/Commons/density.composable";
|
|
202
203
|
import { useDimension } from "../../composables/Commons/dimension.composable";
|
|
203
204
|
import { useLink } from "../../composables/Commons/link.composable";
|
|
@@ -223,10 +224,6 @@ import { computed, ref, StyleValue, toRef, useAttrs, useSlots } from "vue";
|
|
|
223
224
|
* Props, emits and link resolution for the Card component.
|
|
224
225
|
********************************************************/
|
|
225
226
|
const props = defineProps({
|
|
226
|
-
contentDisplay: {
|
|
227
|
-
type: null,
|
|
228
|
-
required: false
|
|
229
|
-
},
|
|
230
227
|
disabled: {
|
|
231
228
|
type: Boolean,
|
|
232
229
|
required: false
|
|
@@ -868,6 +865,14 @@ const props = defineProps({
|
|
|
868
865
|
hoverClass: {
|
|
869
866
|
type: String,
|
|
870
867
|
required: false
|
|
868
|
+
},
|
|
869
|
+
contentDisplay: {
|
|
870
|
+
type: null,
|
|
871
|
+
required: false
|
|
872
|
+
},
|
|
873
|
+
contentGap: {
|
|
874
|
+
type: [String, Number],
|
|
875
|
+
required: false
|
|
871
876
|
}
|
|
872
877
|
});
|
|
873
878
|
defineEmits([
|
|
@@ -1165,7 +1170,7 @@ const cardStyles = computed(() => {
|
|
|
1165
1170
|
* Instance-level `contentDisplay` rides INLINE on the wrapper itself, not as a custom property on the root.
|
|
1166
1171
|
* A custom property would inherit into any Card nested in the slot and flatten its content too.
|
|
1167
1172
|
********************************************************/
|
|
1168
|
-
const contentStyles =
|
|
1173
|
+
const { contentStyles } = useContent(props);
|
|
1169
1174
|
const cardProgressClasses = computed(() => {
|
|
1170
1175
|
return ["origam-card__progress", `origam-card__progress--${loaderConfig.value.kind === "line" ? "linear" : loaderConfig.value.kind}`];
|
|
1171
1176
|
});
|
|
@@ -1268,6 +1273,8 @@ defineExpose({
|
|
|
1268
1273
|
|
|
1269
1274
|
&__content {
|
|
1270
1275
|
display: var(--origam-card__content---display, block);
|
|
1276
|
+
flex-direction: var(--origam-card__content---flex-direction, row);
|
|
1277
|
+
gap: var(--origam-card__content---gap, 0);
|
|
1271
1278
|
}
|
|
1272
1279
|
|
|
1273
1280
|
&__asset {
|
|
@@ -113,6 +113,7 @@ import vContrast from "../../directives/Contrast/contrast.directive";
|
|
|
113
113
|
import { CODE_DEFAULTS } from "../../consts/Code/code.const";
|
|
114
114
|
import { CODE_LANG } from "../../enums/Code/code.enum";
|
|
115
115
|
import { parseHighlightLines } from "../../utils/Code/parse-highlight-lines.util";
|
|
116
|
+
import { trimBlankLines } from "../../utils/Code/trim-blank-lines.util";
|
|
116
117
|
/*********************************************************
|
|
117
118
|
* Global
|
|
118
119
|
*
|
|
@@ -811,7 +812,7 @@ function extractSlotText() {
|
|
|
811
812
|
const sourceCode = computed(() => {
|
|
812
813
|
if (typeof props.code === "string") return props.code;
|
|
813
814
|
const fromSlot = extractSlotText();
|
|
814
|
-
return fromSlot
|
|
815
|
+
return trimBlankLines(fromSlot);
|
|
815
816
|
});
|
|
816
817
|
/*********************************************************
|
|
817
818
|
* Format — currently a no-op past whitespace normalisation.
|
|
@@ -380,10 +380,6 @@ const props = defineProps({
|
|
|
380
380
|
required: false,
|
|
381
381
|
skipCheck: true
|
|
382
382
|
},
|
|
383
|
-
contentDisplay: {
|
|
384
|
-
type: null,
|
|
385
|
-
required: false
|
|
386
|
-
},
|
|
387
383
|
flat: {
|
|
388
384
|
type: Boolean,
|
|
389
385
|
required: false
|
|
@@ -968,6 +964,14 @@ const props = defineProps({
|
|
|
968
964
|
type: String,
|
|
969
965
|
required: false
|
|
970
966
|
},
|
|
967
|
+
contentDisplay: {
|
|
968
|
+
type: null,
|
|
969
|
+
required: false
|
|
970
|
+
},
|
|
971
|
+
contentGap: {
|
|
972
|
+
type: [String, Number],
|
|
973
|
+
required: false
|
|
974
|
+
},
|
|
971
975
|
status: {
|
|
972
976
|
type: null,
|
|
973
977
|
required: false
|
|
@@ -356,10 +356,6 @@ const props = defineProps({
|
|
|
356
356
|
required: false,
|
|
357
357
|
skipCheck: true
|
|
358
358
|
},
|
|
359
|
-
contentDisplay: {
|
|
360
|
-
type: null,
|
|
361
|
-
required: false
|
|
362
|
-
},
|
|
363
359
|
flat: {
|
|
364
360
|
type: Boolean,
|
|
365
361
|
required: false
|
|
@@ -944,6 +940,14 @@ const props = defineProps({
|
|
|
944
940
|
type: String,
|
|
945
941
|
required: false
|
|
946
942
|
},
|
|
943
|
+
contentDisplay: {
|
|
944
|
+
type: null,
|
|
945
|
+
required: false
|
|
946
|
+
},
|
|
947
|
+
contentGap: {
|
|
948
|
+
type: [String, Number],
|
|
949
|
+
required: false
|
|
950
|
+
},
|
|
947
951
|
status: {
|
|
948
952
|
type: null,
|
|
949
953
|
required: false
|
|
@@ -8,7 +8,10 @@
|
|
|
8
8
|
@reset="handleReset"
|
|
9
9
|
@submit="handleSubmit"
|
|
10
10
|
>
|
|
11
|
-
<div
|
|
11
|
+
<div
|
|
12
|
+
class="origam-form__content"
|
|
13
|
+
:style="contentStyles"
|
|
14
|
+
>
|
|
12
15
|
<slot
|
|
13
16
|
name="default"
|
|
14
17
|
v-bind="form"
|
|
@@ -57,6 +60,7 @@
|
|
|
57
60
|
<script lang="ts" setup>
|
|
58
61
|
import { computed, nextTick, ref, StyleValue, useSlots } from "vue";
|
|
59
62
|
import OrigamMessages from "../Messages/OrigamMessages.vue";
|
|
63
|
+
import { useContent } from "../../composables/Commons/content.composable";
|
|
60
64
|
import { useForm } from "../../composables/Form/form.composable";
|
|
61
65
|
import { useMessage } from "../../composables/Commons/message.composable";
|
|
62
66
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
@@ -136,6 +140,14 @@ const props = defineProps({
|
|
|
136
140
|
required: false,
|
|
137
141
|
skipCheck: true
|
|
138
142
|
},
|
|
143
|
+
contentDisplay: {
|
|
144
|
+
type: null,
|
|
145
|
+
required: false
|
|
146
|
+
},
|
|
147
|
+
contentGap: {
|
|
148
|
+
type: [String, Number],
|
|
149
|
+
required: false
|
|
150
|
+
},
|
|
139
151
|
fontSize: {
|
|
140
152
|
type: null,
|
|
141
153
|
required: false
|
|
@@ -161,6 +173,7 @@ const emits = defineEmits([
|
|
|
161
173
|
defineSlots();
|
|
162
174
|
const slots = useSlots();
|
|
163
175
|
const { filterProps } = useProps(props);
|
|
176
|
+
const { contentStyles } = useContent(props);
|
|
164
177
|
/*********************************************************
|
|
165
178
|
* Reset & Submit
|
|
166
179
|
*
|
|
@@ -291,6 +304,12 @@ defineExpose(forwardRefs({
|
|
|
291
304
|
.origam-form {
|
|
292
305
|
$this: &;
|
|
293
306
|
|
|
307
|
+
&__content {
|
|
308
|
+
display: var(--origam-form__content---display, block);
|
|
309
|
+
flex-direction: var(--origam-form__content---flex-direction, row);
|
|
310
|
+
gap: var(--origam-form__content---gap, 0);
|
|
311
|
+
}
|
|
312
|
+
|
|
294
313
|
&__actions {
|
|
295
314
|
margin-top: var(--origam-form__actions---margin-top, 16px);
|
|
296
315
|
display: var(--origam-form__actions---display, flex);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useContent = useContent;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
var _commons = require("../../utils/Commons/commons.util.cjs");
|
|
9
|
+
function useContent(props) {
|
|
10
|
+
const contentStyles = (0, _vue.computed)(() => {
|
|
11
|
+
const gap = (0, _commons.convertToUnit)(props.contentGap);
|
|
12
|
+
return props.contentDisplay || gap ? {
|
|
13
|
+
display: props.contentDisplay,
|
|
14
|
+
gap
|
|
15
|
+
} : void 0;
|
|
16
|
+
});
|
|
17
|
+
return {
|
|
18
|
+
contentStyles
|
|
19
|
+
};
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { IContentProps } from '../../interfaces/Commons/content.interface';
|
|
2
|
+
/*********************************************************
|
|
3
|
+
* useContent
|
|
4
|
+
*
|
|
5
|
+
* @description
|
|
6
|
+
* Inline style of a `__content` wrapper from `contentDisplay` / `contentGap`.
|
|
7
|
+
* `undefined` when neither is set, so the token defaults stay in charge.
|
|
8
|
+
********************************************************/
|
|
9
|
+
export declare function useContent(props: IContentProps): {
|
|
10
|
+
contentStyles: import("vue").ComputedRef<{
|
|
11
|
+
display: "block" | "grid" | "contents" | "flex" | undefined;
|
|
12
|
+
gap: string | undefined;
|
|
13
|
+
} | undefined>;
|
|
14
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { computed } from "vue";
|
|
2
|
+
import { convertToUnit } from "../../utils/Commons/commons.util.js";
|
|
3
|
+
export function useContent(props) {
|
|
4
|
+
const contentStyles = computed(() => {
|
|
5
|
+
const gap = convertToUnit(props.contentGap);
|
|
6
|
+
return props.contentDisplay || gap ? { display: props.contentDisplay, gap } : void 0;
|
|
7
|
+
});
|
|
8
|
+
return { contentStyles };
|
|
9
|
+
}
|
|
@@ -4,10 +4,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.createIcons = createIcons;
|
|
7
|
+
exports.createIconsCore = createIconsCore;
|
|
7
8
|
exports.useIcon = void 0;
|
|
8
9
|
var _vue = require("vue");
|
|
9
10
|
var _index = require("../../components/Icon/index.cjs");
|
|
10
11
|
var _mdi = require("../../consts/Commons/mdi.const.cjs");
|
|
12
|
+
var _mdiCore = require("../../consts/Commons/mdi-core.const.cjs");
|
|
11
13
|
var _icon = require("../../consts/Icon/icon.const.cjs");
|
|
12
14
|
var _commons = require("../../utils/Commons/commons.util.cjs");
|
|
13
15
|
const useIcon = props => {
|
|
@@ -62,14 +64,19 @@ const useIcon = props => {
|
|
|
62
64
|
};
|
|
63
65
|
exports.useIcon = useIcon;
|
|
64
66
|
function createIcons(options) {
|
|
67
|
+
return createIconsCore((0, _commons.mergeDeep)({
|
|
68
|
+
aliases: _mdi.MDI_ALIASES
|
|
69
|
+
}, options));
|
|
70
|
+
}
|
|
71
|
+
function createIconsCore(options) {
|
|
65
72
|
return (0, _commons.mergeDeep)({
|
|
66
73
|
defaultSet: "mdi",
|
|
67
74
|
sets: {
|
|
68
75
|
..._icon.DEFAULT_SETS,
|
|
69
|
-
mdi:
|
|
76
|
+
mdi: _mdiCore.MDI
|
|
70
77
|
},
|
|
71
78
|
aliases: {
|
|
72
|
-
...
|
|
79
|
+
..._mdiCore.MDI_CORE_ALIASES
|
|
73
80
|
}
|
|
74
81
|
}, options);
|
|
75
82
|
}
|
|
@@ -34,3 +34,13 @@ export declare const useIcon: (props: Ref<TIcon | undefined>) => {
|
|
|
34
34
|
* qui permet d'ecrire `icon="mdi-account"` sans configuration prealable.
|
|
35
35
|
********************************************************/
|
|
36
36
|
export declare function createIcons(options?: TIconOptions): Record<string, unknown>;
|
|
37
|
+
/*********************************************************
|
|
38
|
+
* createIconsCore (#1384)
|
|
39
|
+
*
|
|
40
|
+
* @description
|
|
41
|
+
* `createIcons` without the 7 000 `MDI_ICONS` aliases: the default set and
|
|
42
|
+
* the ~45 semantic aliases only. Used by `createOrigamCore`, so the enum is
|
|
43
|
+
* not bundled. `$ABACUS`-style aliases come back by passing
|
|
44
|
+
* `icons: {aliases: MDI_ICONS}`.
|
|
45
|
+
********************************************************/
|
|
46
|
+
export declare function createIconsCore(options?: TIconOptions): Record<string, unknown>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { computed, inject, unref } from "vue";
|
|
2
2
|
import { OrigamComponentIcon, OrigamSvgIcon } from "../../components/Icon/index.js";
|
|
3
|
-
import {
|
|
3
|
+
import { MDI_ALIASES } from "../../consts/Commons/mdi.const.js";
|
|
4
|
+
import { MDI, MDI_CORE_ALIASES } from "../../consts/Commons/mdi-core.const.js";
|
|
4
5
|
import { DEFAULT_SETS, ORIGAM_ICONS_KEY } from "../../consts/Icon/icon.const.js";
|
|
5
6
|
import { mergeDeep } from "../../utils/Commons/commons.util.js";
|
|
6
7
|
export const useIcon = (props) => {
|
|
@@ -50,6 +51,9 @@ export const useIcon = (props) => {
|
|
|
50
51
|
return { iconData };
|
|
51
52
|
};
|
|
52
53
|
export function createIcons(options) {
|
|
54
|
+
return createIconsCore(mergeDeep({ aliases: MDI_ALIASES }, options));
|
|
55
|
+
}
|
|
56
|
+
export function createIconsCore(options) {
|
|
53
57
|
return mergeDeep({
|
|
54
58
|
defaultSet: "mdi",
|
|
55
59
|
sets: {
|
|
@@ -57,7 +61,7 @@ export function createIcons(options) {
|
|
|
57
61
|
mdi: MDI
|
|
58
62
|
},
|
|
59
63
|
aliases: {
|
|
60
|
-
...
|
|
64
|
+
...MDI_CORE_ALIASES
|
|
61
65
|
}
|
|
62
66
|
}, options);
|
|
63
67
|
}
|
|
@@ -1704,4 +1704,16 @@ Object.keys(_chartRoving).forEach(function (key) {
|
|
|
1704
1704
|
return _chartRoving[key];
|
|
1705
1705
|
}
|
|
1706
1706
|
});
|
|
1707
|
+
});
|
|
1708
|
+
var _content = require("./Commons/content.composable.cjs");
|
|
1709
|
+
Object.keys(_content).forEach(function (key) {
|
|
1710
|
+
if (key === "default" || key === "__esModule") return;
|
|
1711
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
1712
|
+
if (key in exports && exports[key] === _content[key]) return;
|
|
1713
|
+
Object.defineProperty(exports, key, {
|
|
1714
|
+
enumerable: true,
|
|
1715
|
+
get: function () {
|
|
1716
|
+
return _content[key];
|
|
1717
|
+
}
|
|
1718
|
+
});
|
|
1707
1719
|
});
|
|
@@ -140,3 +140,4 @@ export * from "./Chart/chart-header-typography.composable.js";
|
|
|
140
140
|
export * from "./Chart/chart-zoom.composable.js";
|
|
141
141
|
export * from "./Chart/chart-size.composable.js";
|
|
142
142
|
export * from "./Chart/chart-roving.composable.js";
|
|
143
|
+
export * from "./Commons/content.composable.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.MDI_CORE_ALIASES = exports.MDI = void 0;
|
|
7
|
+
var _vue = require("vue");
|
|
8
|
+
var _index = require("../../components/Icon/index.cjs");
|
|
9
|
+
const MDI = exports.MDI = {
|
|
10
|
+
// The MDI font CSS exposes each glyph as `.mdi-<name>` (e.g. `.mdi-magnify`).
|
|
11
|
+
// Consumers may pass either the bare name (`magnify`) — as is the case when
|
|
12
|
+
// an `mdi:` prefix has been stripped by the icon resolver — or the already-
|
|
13
|
+
// prefixed form (`mdi-magnify`, as found in MDI_ALIASES below). We
|
|
14
|
+
// normalise to always emit the `mdi-` class so the font renders.
|
|
15
|
+
component: props => (0, _vue.h)(_index.OrigamClassIcon, {
|
|
16
|
+
...props,
|
|
17
|
+
icon: typeof props.icon === "string" && !props.icon.startsWith("mdi-") ? `mdi-${props.icon}` : props.icon,
|
|
18
|
+
class: "mdi"
|
|
19
|
+
})
|
|
20
|
+
};
|
|
21
|
+
const MDI_CORE_ALIASES = exports.MDI_CORE_ALIASES = {
|
|
22
|
+
collapse: "mdi-chevron-up",
|
|
23
|
+
complete: "mdi-check",
|
|
24
|
+
cancel: "mdi-close-circle",
|
|
25
|
+
close: "mdi-close",
|
|
26
|
+
delete: "mdi-close-circle",
|
|
27
|
+
clear: "mdi-close-circle",
|
|
28
|
+
success: "mdi-check-circle",
|
|
29
|
+
info: "mdi-information",
|
|
30
|
+
warning: "mdi-alert-circle",
|
|
31
|
+
error: "mdi-close-circle",
|
|
32
|
+
prev: "mdi-chevron-left",
|
|
33
|
+
next: "mdi-chevron-right",
|
|
34
|
+
checkboxOn: "mdi-checkbox-marked",
|
|
35
|
+
checkboxOff: "mdi-checkbox-blank-outline",
|
|
36
|
+
checkboxIndeterminate: "mdi-minus-box",
|
|
37
|
+
delimiter: "mdi-circle",
|
|
38
|
+
sortAsc: "mdi-arrow-up",
|
|
39
|
+
sortDesc: "mdi-arrow-down",
|
|
40
|
+
expand: "mdi-chevron-down",
|
|
41
|
+
menu: "mdi-menu",
|
|
42
|
+
subgroup: "mdi-menu-down",
|
|
43
|
+
dropdown: "mdi-menu-down",
|
|
44
|
+
radioOn: "mdi-radiobox-marked",
|
|
45
|
+
radioOff: "mdi-radiobox-blank",
|
|
46
|
+
edit: "mdi-pencil",
|
|
47
|
+
ratingEmpty: "mdi-star-outline",
|
|
48
|
+
ratingFull: "mdi-star",
|
|
49
|
+
ratingHalf: "mdi-star-half-full",
|
|
50
|
+
loading: "mdi-cached",
|
|
51
|
+
first: "mdi-page-first",
|
|
52
|
+
last: "mdi-page-last",
|
|
53
|
+
unfold: "mdi-unfold-more-horizontal",
|
|
54
|
+
file: "mdi-paperclip",
|
|
55
|
+
plus: "mdi-plus",
|
|
56
|
+
minus: "mdi-minus",
|
|
57
|
+
calendar: "mdi-calendar",
|
|
58
|
+
eyeDropper: "mdi-eyedropper",
|
|
59
|
+
eyeOff: "mdi-eye-off-outline",
|
|
60
|
+
eyeOn: "mdi-eye-outline"
|
|
61
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { IIconAliases, IIconSet } from '../../interfaces/Icon/icon.interface';
|
|
2
|
+
export declare const MDI: IIconSet;
|
|
3
|
+
/*********************************************************
|
|
4
|
+
* MDI_CORE_ALIASES (#1384)
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* The ~45 semantic aliases (`$loading`, `$close`, ...) the components rely on.
|
|
8
|
+
* Kept apart from the 7 000-entry `MDI_ICONS` enum so the lightweight entry
|
|
9
|
+
* (`createOrigamCore`) can carry them without the enum.
|
|
10
|
+
********************************************************/
|
|
11
|
+
export declare const MDI_CORE_ALIASES: IIconAliases;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { h } from "vue";
|
|
2
|
+
import { OrigamClassIcon } from "../../components/Icon/index.js";
|
|
3
|
+
export const MDI = {
|
|
4
|
+
// The MDI font CSS exposes each glyph as `.mdi-<name>` (e.g. `.mdi-magnify`).
|
|
5
|
+
// Consumers may pass either the bare name (`magnify`) — as is the case when
|
|
6
|
+
// an `mdi:` prefix has been stripped by the icon resolver — or the already-
|
|
7
|
+
// prefixed form (`mdi-magnify`, as found in MDI_ALIASES below). We
|
|
8
|
+
// normalise to always emit the `mdi-` class so the font renders.
|
|
9
|
+
component: (props) => h(OrigamClassIcon, {
|
|
10
|
+
...props,
|
|
11
|
+
icon: typeof props.icon === "string" && !props.icon.startsWith("mdi-") ? `mdi-${props.icon}` : props.icon,
|
|
12
|
+
class: "mdi"
|
|
13
|
+
})
|
|
14
|
+
};
|
|
15
|
+
export const MDI_CORE_ALIASES = {
|
|
16
|
+
collapse: "mdi-chevron-up",
|
|
17
|
+
complete: "mdi-check",
|
|
18
|
+
cancel: "mdi-close-circle",
|
|
19
|
+
close: "mdi-close",
|
|
20
|
+
delete: "mdi-close-circle",
|
|
21
|
+
clear: "mdi-close-circle",
|
|
22
|
+
success: "mdi-check-circle",
|
|
23
|
+
info: "mdi-information",
|
|
24
|
+
warning: "mdi-alert-circle",
|
|
25
|
+
error: "mdi-close-circle",
|
|
26
|
+
prev: "mdi-chevron-left",
|
|
27
|
+
next: "mdi-chevron-right",
|
|
28
|
+
checkboxOn: "mdi-checkbox-marked",
|
|
29
|
+
checkboxOff: "mdi-checkbox-blank-outline",
|
|
30
|
+
checkboxIndeterminate: "mdi-minus-box",
|
|
31
|
+
delimiter: "mdi-circle",
|
|
32
|
+
sortAsc: "mdi-arrow-up",
|
|
33
|
+
sortDesc: "mdi-arrow-down",
|
|
34
|
+
expand: "mdi-chevron-down",
|
|
35
|
+
menu: "mdi-menu",
|
|
36
|
+
subgroup: "mdi-menu-down",
|
|
37
|
+
dropdown: "mdi-menu-down",
|
|
38
|
+
radioOn: "mdi-radiobox-marked",
|
|
39
|
+
radioOff: "mdi-radiobox-blank",
|
|
40
|
+
edit: "mdi-pencil",
|
|
41
|
+
ratingEmpty: "mdi-star-outline",
|
|
42
|
+
ratingFull: "mdi-star",
|
|
43
|
+
ratingHalf: "mdi-star-half-full",
|
|
44
|
+
loading: "mdi-cached",
|
|
45
|
+
first: "mdi-page-first",
|
|
46
|
+
last: "mdi-page-last",
|
|
47
|
+
unfold: "mdi-unfold-more-horizontal",
|
|
48
|
+
file: "mdi-paperclip",
|
|
49
|
+
plus: "mdi-plus",
|
|
50
|
+
minus: "mdi-minus",
|
|
51
|
+
calendar: "mdi-calendar",
|
|
52
|
+
eyeDropper: "mdi-eyedropper",
|
|
53
|
+
eyeOff: "mdi-eye-off-outline",
|
|
54
|
+
eyeOn: "mdi-eye-outline"
|
|
55
|
+
};
|
|
@@ -3,61 +3,16 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
Object.defineProperty(exports, "MDI", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _mdiCore.MDI;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.MDI_ALIASES = void 0;
|
|
9
13
|
var _enums = require("../../enums/index.cjs");
|
|
10
|
-
|
|
11
|
-
// The MDI font CSS exposes each glyph as `.mdi-<name>` (e.g. `.mdi-magnify`).
|
|
12
|
-
// Consumers may pass either the bare name (`magnify`) — as is the case when
|
|
13
|
-
// an `mdi:` prefix has been stripped by the icon resolver — or the already-
|
|
14
|
-
// prefixed form (`mdi-magnify`, as found in MDI_ALIASES below). We
|
|
15
|
-
// normalise to always emit the `mdi-` class so the font renders.
|
|
16
|
-
component: props => (0, _vue.h)(_index.OrigamClassIcon, {
|
|
17
|
-
...props,
|
|
18
|
-
icon: typeof props.icon === "string" && !props.icon.startsWith("mdi-") ? `mdi-${props.icon}` : props.icon,
|
|
19
|
-
class: "mdi"
|
|
20
|
-
})
|
|
21
|
-
};
|
|
14
|
+
var _mdiCore = require("./mdi-core.const.cjs");
|
|
22
15
|
const MDI_ALIASES = exports.MDI_ALIASES = {
|
|
23
16
|
..._enums.MDI_ICONS,
|
|
24
|
-
|
|
25
|
-
complete: "mdi-check",
|
|
26
|
-
cancel: "mdi-close-circle",
|
|
27
|
-
close: "mdi-close",
|
|
28
|
-
delete: "mdi-close-circle",
|
|
29
|
-
clear: "mdi-close-circle",
|
|
30
|
-
success: "mdi-check-circle",
|
|
31
|
-
info: "mdi-information",
|
|
32
|
-
warning: "mdi-alert-circle",
|
|
33
|
-
error: "mdi-close-circle",
|
|
34
|
-
prev: "mdi-chevron-left",
|
|
35
|
-
next: "mdi-chevron-right",
|
|
36
|
-
checkboxOn: "mdi-checkbox-marked",
|
|
37
|
-
checkboxOff: "mdi-checkbox-blank-outline",
|
|
38
|
-
checkboxIndeterminate: "mdi-minus-box",
|
|
39
|
-
delimiter: "mdi-circle",
|
|
40
|
-
sortAsc: "mdi-arrow-up",
|
|
41
|
-
sortDesc: "mdi-arrow-down",
|
|
42
|
-
expand: "mdi-chevron-down",
|
|
43
|
-
menu: "mdi-menu",
|
|
44
|
-
subgroup: "mdi-menu-down",
|
|
45
|
-
dropdown: "mdi-menu-down",
|
|
46
|
-
radioOn: "mdi-radiobox-marked",
|
|
47
|
-
radioOff: "mdi-radiobox-blank",
|
|
48
|
-
edit: "mdi-pencil",
|
|
49
|
-
ratingEmpty: "mdi-star-outline",
|
|
50
|
-
ratingFull: "mdi-star",
|
|
51
|
-
ratingHalf: "mdi-star-half-full",
|
|
52
|
-
loading: "mdi-cached",
|
|
53
|
-
first: "mdi-page-first",
|
|
54
|
-
last: "mdi-page-last",
|
|
55
|
-
unfold: "mdi-unfold-more-horizontal",
|
|
56
|
-
file: "mdi-paperclip",
|
|
57
|
-
plus: "mdi-plus",
|
|
58
|
-
minus: "mdi-minus",
|
|
59
|
-
calendar: "mdi-calendar",
|
|
60
|
-
eyeDropper: "mdi-eyedropper",
|
|
61
|
-
eyeOff: "mdi-eye-off-outline",
|
|
62
|
-
eyeOn: "mdi-eye-outline"
|
|
17
|
+
..._mdiCore.MDI_CORE_ALIASES
|
|
63
18
|
};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import type { IIconAliases
|
|
2
|
-
export
|
|
1
|
+
import type { IIconAliases } from '../../interfaces/Icon/icon.interface';
|
|
2
|
+
export { MDI } from './mdi-core.const';
|
|
3
3
|
export declare const MDI_ALIASES: IIconAliases;
|