@mixd-id/web-scaffold 0.2.240705 → 0.2.250801009
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/docs/components/Dashboard.md +56 -0
- package/log.txt +7 -0
- package/package.json +27 -19
- package/src/components/404.vue +61 -0
- package/src/components/AccountIcon.vue +19 -0
- package/src/components/Ahref.vue +1 -1
- package/src/components/Alert.vue +4 -13
- package/src/components/ArrayList.vue +49 -0
- package/src/components/Article.vue +24 -30
- package/src/components/Button.vue +79 -167
- package/src/components/Card.vue +235 -0
- package/src/components/Carousel.vue +61 -60
- package/src/components/Cart.vue +192 -0
- package/src/components/CartIcon.vue +89 -0
- package/src/components/ChartBar.vue +2 -3
- package/src/components/Checkbox.vue +20 -11
- package/src/components/Checkout.vue +373 -0
- package/src/components/CheckoutDelivery.vue +267 -0
- package/src/components/CodeEditor.vue +5 -16
- package/src/components/CollapsiblePanel.vue +70 -0
- package/src/components/ColorPicker.vue +8 -3
- package/src/components/ColorPicker2.vue +41 -19
- package/src/components/ColorPicker3.vue +100 -0
- package/src/components/Confirm.vue +9 -7
- package/src/components/ContextMenu.vue +122 -206
- package/src/components/ContextMenuItem.vue +53 -0
- package/src/components/Dashboard.vue +243 -0
- package/src/components/Dashboard2.vue +118 -0
- package/src/components/DashboardComponentSelector.vue +96 -0
- package/src/components/DashboardConfigs.vue +202 -0
- package/src/components/Datepicker.vue +102 -41
- package/src/components/DayTimeRange.vue +3 -2
- package/src/components/Dropdown.vue +7 -4
- package/src/components/Flex.vue +14 -40
- package/src/components/GHeatMaps.vue +2 -2
- package/src/components/Grid.vue +6 -6
- package/src/components/HTMLEditor.vue +27 -14
- package/src/components/Image.vue +62 -108
- package/src/components/ImagePreview.vue +14 -4
- package/src/components/ImageUploader.vue +114 -0
- package/src/components/ImportModal.vue +3 -3
- package/src/components/Link.vue +62 -6
- package/src/components/List.vue +524 -402
- package/src/components/ListContextMenu.vue +88 -0
- package/src/components/ListItem.vue +5 -3
- package/src/components/ListPage1.vue +14 -15
- package/src/components/ListView.vue +5 -6
- package/src/components/ListViewSettings.vue +2 -2
- package/src/components/LogViewerItem.vue +1 -1
- package/src/components/MarkdownEdit.vue +128 -0
- package/src/components/MarkdownPreview.vue +102 -0
- package/src/components/MenuItem1.vue +36 -0
- package/src/components/Modal.vue +95 -43
- package/src/components/MultiDropdown.vue +124 -0
- package/src/components/MultilineText.vue +1 -4
- package/src/components/OTPField.vue +11 -17
- package/src/components/ObjectTree.vue +1 -1
- package/src/components/PageBuilder.vue +3 -3
- package/src/components/Paragraph.vue +1 -2
- package/src/components/PresetSelectorFilterItem.vue +107 -95
- package/src/components/Radio.vue +1 -1
- package/src/components/SearchModal.vue +153 -0
- package/src/components/Slider.vue +1 -1
- package/src/components/Svg.vue +1 -1
- package/src/components/SvgEditor.vue +173 -0
- package/src/components/Switch.vue +4 -5
- package/src/components/Table.vue +2 -2
- package/src/components/TableView.vue +2 -3
- package/src/components/TableViewHead.vue +2 -2
- package/src/components/Tabs.vue +1 -1
- package/src/components/Testimonial.vue +2 -2
- package/src/components/Text.vue +7 -22
- package/src/components/TextEditor.vue +3 -3
- package/src/components/TextWithTag.vue +61 -30
- package/src/components/Textarea.vue +11 -16
- package/src/components/Textbox.vue +9 -19
- package/src/components/Timepicker.vue +25 -15
- package/src/components/Toast.vue +5 -3
- package/src/components/TreeMenu.vue +122 -0
- package/src/components/TreeView.vue +15 -10
- package/src/components/TreeView2.vue +38 -0
- package/src/components/TreeViewItem.vue +58 -29
- package/src/components/TreeViewItem2.vue +55 -0
- package/src/components/Uploader.vue +45 -0
- package/src/components/Video.vue +119 -0
- package/src/components/VirtualGrid.vue +24 -7
- package/src/components/VirtualTable.vue +363 -128
- package/src/configs/dashboard/data-table.js +9 -0
- package/src/configs/web-page-builder.js +118 -0
- package/src/directives/intersect.js +26 -0
- package/src/hooks/device.js +14 -0
- package/src/index.js +62 -107
- package/src/mixin/component.js +147 -67
- package/src/themes/default/index.js +83 -155
- package/src/utils/dashboard.js +22 -962
- package/src/utils/helpers.cjs +635 -0
- package/src/utils/helpers.js +91 -60
- package/src/utils/helpers.mjs +245 -12
- package/src/utils/importer.js +22 -3
- package/src/utils/list.mjs +1509 -0
- package/src/utils/preset-selector.cjs +1455 -0
- package/src/utils/preset-selector.js +489 -95
- package/src/utils/preset-selector.mjs +59 -20
- package/src/utils/queue.js +63 -0
- package/src/utils/web.mjs +120 -0
- package/src/utils/wss.js +37 -29
- package/src/utils/wss.mjs +24 -19
- package/src/widgets/AhrefSetting.vue +16 -13
- package/src/widgets/ArticleSetting.vue +15 -27
- package/src/widgets/BackgroundColorSetting.vue +153 -0
- package/src/widgets/BorderColorSetting.vue +57 -0
- package/src/widgets/BotEditor/BotEditorActions.vue +3 -2
- package/src/widgets/BotEditor/BotEditorSettings.vue +21 -0
- package/src/widgets/BotEditor.vue +35 -15
- package/src/widgets/ButtonSetting.vue +12 -13
- package/src/widgets/CarouselSetting.vue +33 -45
- package/src/widgets/CartSetting.vue +46 -0
- package/src/widgets/CheckoutSetting.vue +46 -0
- package/src/widgets/CollapsiblePanelSetting.vue +46 -0
- package/src/widgets/ColumnSelector.vue +29 -5
- package/src/widgets/ComponentSetting.vue +1 -1
- package/src/widgets/ComponentSetting2.vue +112 -234
- package/src/widgets/ComponentSetting3.vue +1 -1
- package/src/widgets/ContactForm.vue +3 -3
- package/src/widgets/ContactFormSetting.vue +41 -30
- package/src/widgets/Dashboard/BarChart.vue +47 -11
- package/src/widgets/Dashboard/BarChartSetting.vue +1 -1
- package/src/widgets/Dashboard/DataTable.vue +125 -0
- package/src/widgets/Dashboard/DataTableSetting.vue +243 -0
- package/src/widgets/Dashboard/DatasourceSelector.vue +1 -1
- package/src/widgets/Dashboard/Doughnut.vue +49 -7
- package/src/widgets/Dashboard/DoughnutSetting.vue +2 -2
- package/src/widgets/Dashboard/Metric.vue +78 -19
- package/src/widgets/Dashboard/MetricSetting.vue +81 -28
- package/src/widgets/Dashboard/Pie.vue +55 -6
- package/src/widgets/Dashboard/PieSetting.vue +1 -1
- package/src/widgets/Dashboard/PolarArea.vue +49 -7
- package/src/widgets/Dashboard/PolarAreaSetting.vue +1 -1
- package/src/widgets/Dashboard/SharingModal.vue +4 -5
- package/src/widgets/Dashboard/ViewSelector.vue +2 -2
- package/src/widgets/Dashboard/VirtualTableSetting.vue +121 -184
- package/src/widgets/{Dashboard.vue → Dashboard0.vue} +426 -343
- package/src/widgets/EmbeddedVideoSetting.vue +7 -5
- package/src/widgets/FAQ.vue +16 -3
- package/src/widgets/FAQSetting.vue +53 -47
- package/src/widgets/FeatureList.vue +3 -0
- package/src/widgets/FeatureListSetting.vue +112 -102
- package/src/widgets/FlexSetting.vue +83 -106
- package/src/widgets/GridSetting.vue +71 -196
- package/src/widgets/Header2.vue +34 -71
- package/src/widgets/Header2Setting.vue +95 -179
- package/src/widgets/HeaderSetting.vue +16 -18
- package/src/widgets/IconListSetting.vue +69 -65
- package/src/widgets/ImageSetting.vue +33 -60
- package/src/widgets/LinkSetting.vue +60 -37
- package/src/widgets/LinkSettingModal.vue +173 -0
- package/src/widgets/LogViewer.vue +1 -1
- package/src/widgets/MarginSetting.vue +2 -2
- package/src/widgets/MenuEditor.vue +1 -1
- package/src/widgets/MenuItem1Setting.vue +78 -0
- package/src/widgets/ModalSetting.vue +42 -44
- package/src/widgets/MultiValueSetting.vue +2 -2
- package/src/widgets/MultiValueSetting2.vue +78 -45
- package/src/widgets/OGSettingModal.vue +103 -0
- package/src/widgets/PaddingSetting.vue +2 -2
- package/src/widgets/ParagraphSetting.vue +16 -13
- package/src/widgets/PositionSetting.vue +209 -0
- package/src/widgets/PresetBar.vue +359 -210
- package/src/widgets/PresetBarPivot.vue +31 -19
- package/src/widgets/PresetSelector.vue +29 -17
- package/src/widgets/SearchModalSetting.vue +70 -0
- package/src/widgets/Share.vue +1 -2
- package/src/widgets/ShareSetting.vue +67 -60
- package/src/widgets/StyleSetting.vue +227 -116
- package/src/widgets/TestimonialSetting.vue +97 -88
- package/src/widgets/TextBlockSetting.vue +16 -13
- package/src/widgets/UserActionBuilder/UserActionConsole.vue +30 -10
- package/src/widgets/UserActionBuilder/UserActionOutput.vue +2 -2
- package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +64 -87
- package/src/widgets/UserActionBuilder/UserActionProps.vue +3 -3
- package/src/widgets/UserActionBuilder.vue +4 -16
- package/src/widgets/WebComponentSelector.vue +15 -11
- package/src/widgets/WebLayoutSelector.vue +41 -270
- package/src/widgets/WebPageBuilder.vue +693 -704
- package/src/widgets/WebPageBuilder2.vue +7 -7
- package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -8
- package/src/widgets/WebPageBuilder4/CarouselSetting.vue +63 -7
- package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +3 -3
- package/src/widgets/WebPageBuilder4/FlexSetting.vue +1 -10
- package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +2 -2
- package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -7
- package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +1 -7
- package/src/widgets/WebPageBuilder4.vue +289 -575
- package/src/widgets/WebPageSelector.vue +1 -1
- package/src/widgets/YoutubeVideoSetting.vue +16 -13
- package/tailwind.config.js +3 -35
- package/docs/schema/user-action.json +0 -266
- package/src/App.vue +0 -25
- package/src/components/SearchButton.vue +0 -57
- package/src/entry-client.js +0 -27
- package/src/entry-server.js +0 -73
- package/src/events/event.js +0 -2
- package/src/main.js +0 -29
- package/src/mixin/website.js +0 -121
- package/src/router.js +0 -57
- package/src/widgets/MobileMenu.vue +0 -182
- package/src/widgets/WebPageBuilder4/ActionSetting.vue +0 -158
- package/src/widgets/WebPageBuilder4/ColorSetting.vue +0 -63
- package/src/widgets/WebPageBuilder4/DataSetting.vue +0 -92
- package/src/widgets/WebPageBuilder4/FontSizeSetting.vue +0 -76
- package/src/widgets/WebPageBuilder4/LinkSetting.vue +0 -68
- package/src/widgets/WebPageBuilder4/MobileMenuSetting.vue +0 -106
- package/src/widgets/WebPageBuilder4/Setting.vue +0 -73
- package/src/widgets/WebPageBuilder4/StyleSetting.vue +0 -77
- package/src/widgets/WebPageBuilder4/SvgSetting.vue +0 -207
- package/src/widgets/WebPageBuilder4/TextTransformSetting.vue +0 -70
- package/src/widgets/WebPageBuilder4/WebPageDataEdit.vue +0 -121
- package/test.json +0 -22
- /package/src/widgets/{Header1.vue → Header0.vue} +0 -0
- /package/src/widgets/{Header1Setting.vue → Header0Setting.vue} +0 -0
|
@@ -1,177 +1,264 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div
|
|
5
|
-
v-show="_.value === viewType">
|
|
6
|
-
<div class="flex flex-col gap-8">
|
|
4
|
+
<div class="flex flex-col divide-y divide-border-50">
|
|
7
5
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
<div class="flex flex-row gap-4 items-center cursor-pointer">
|
|
11
|
-
<strong class="flex-1 text-text-400">All</strong>
|
|
12
|
-
</div>
|
|
13
|
-
|
|
14
|
-
<div class="h-[1px] bg-text-100 mt-2 mb-4"></div>
|
|
15
|
-
|
|
16
|
-
<div class="flex flex-col gap-4">
|
|
6
|
+
<div class="flex flex-col gap-4 p-6">
|
|
17
7
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
8
|
+
<div>
|
|
9
|
+
<small class="text-text-400">Font Family</small>
|
|
10
|
+
<Dropdown v-model="mediaOf(viewType, '*')['font-family']" class="mt-1">
|
|
11
|
+
<option value="">Default</option>
|
|
12
|
+
<option v-for="opt in components.fontFamily"
|
|
13
|
+
:value="`${opt[1]}`">
|
|
14
|
+
{{ opt[0] }}
|
|
15
|
+
</option>
|
|
16
|
+
</Dropdown>
|
|
17
|
+
</div>
|
|
28
18
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
19
|
+
<div>
|
|
20
|
+
<small class="text-text-400">Font Size</small>
|
|
21
|
+
<Dropdown v-model="mediaOf(viewType, 'html, .html')['font-size']" class="mt-1">
|
|
22
|
+
<option value="">Default</option>
|
|
23
|
+
<option v-for="opt in components.fontSize"
|
|
24
|
+
:value="`${opt[1]}`">
|
|
25
|
+
{{ opt[0] }}
|
|
26
|
+
</option>
|
|
27
|
+
</Dropdown>
|
|
28
|
+
</div>
|
|
39
29
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
30
|
+
<div>
|
|
31
|
+
<label :class="$style.label">Primary Color</label>
|
|
32
|
+
<div class="mt-1 flex flex-row items-center gap-4">
|
|
33
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary']" item-class="w-[48px] h-[48px]"
|
|
34
|
+
mode="hex" :custom-color="true" value-type="rgb"
|
|
35
|
+
@change="generateShade('--primary', mediaOf(viewType, 'html, .html')['--primary'])" />
|
|
36
|
+
|
|
37
|
+
<div class="grid grid-cols-5 gap-2 text-center">
|
|
38
|
+
<div>
|
|
39
|
+
<small class="text-xs text-text-400">400</small>
|
|
40
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-400']"
|
|
44
41
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
45
|
-
|
|
42
|
+
</div>
|
|
43
|
+
<div>
|
|
44
|
+
<small class="text-xs text-text-400">300</small>
|
|
45
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-300']"
|
|
46
46
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
47
|
-
|
|
47
|
+
</div>
|
|
48
|
+
<div>
|
|
49
|
+
<small class="text-xs text-text-400">200</small>
|
|
50
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-200']"
|
|
48
51
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
49
|
-
|
|
52
|
+
</div>
|
|
53
|
+
<div>
|
|
54
|
+
<small class="text-xs text-text-400">100</small>
|
|
55
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-100']"
|
|
50
56
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
51
|
-
|
|
57
|
+
</div>
|
|
58
|
+
<div>
|
|
59
|
+
<small class="text-xs text-text-400">50</small>
|
|
60
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-50']"
|
|
52
61
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
53
|
-
|
|
62
|
+
</div>
|
|
63
|
+
<div>
|
|
64
|
+
<small class="text-xs text-text-400">600</small>
|
|
65
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-600']"
|
|
54
66
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
55
|
-
|
|
67
|
+
</div>
|
|
68
|
+
<div>
|
|
69
|
+
<small class="text-xs text-text-400">700</small>
|
|
70
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-700']"
|
|
56
71
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
57
|
-
|
|
72
|
+
</div>
|
|
73
|
+
<div>
|
|
74
|
+
<small class="text-xs text-text-400">800</small>
|
|
75
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-800']"
|
|
76
|
+
mode="hex" :custom-color="true" value-type="rgb" />
|
|
77
|
+
</div>
|
|
78
|
+
<div>
|
|
79
|
+
<small class="text-xs text-text-400">900</small>
|
|
80
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--primary-900']"
|
|
58
81
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
59
82
|
</div>
|
|
60
83
|
</div>
|
|
84
|
+
</div>
|
|
85
|
+
</div>
|
|
61
86
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
87
|
+
<div>
|
|
88
|
+
<label :class="$style.label">Secondary Color</label>
|
|
89
|
+
<div class="mt-1 flex flex-row items-center gap-4">
|
|
90
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary']" item-class="w-[48px] h-[48px]"
|
|
91
|
+
mode="hex" :custom-color="true" value-type="rgb"
|
|
92
|
+
@change="generateShade('--secondary', mediaOf(viewType, 'html, .html')['--secondary'])" />
|
|
93
|
+
|
|
94
|
+
<div class="grid grid-cols-5 gap-2 text-center">
|
|
95
|
+
<div>
|
|
96
|
+
<small class="text-xs text-text-400">400</small>
|
|
97
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-400']"
|
|
66
98
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
67
|
-
|
|
99
|
+
</div>
|
|
100
|
+
<div>
|
|
101
|
+
<small class="text-xs text-text-400">300</small>
|
|
102
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-300']"
|
|
68
103
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
69
|
-
|
|
104
|
+
</div>
|
|
105
|
+
<div>
|
|
106
|
+
<small class="text-xs text-text-400">200</small>
|
|
107
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-200']"
|
|
70
108
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
71
|
-
|
|
109
|
+
</div>
|
|
110
|
+
<div>
|
|
111
|
+
<small class="text-xs text-text-400">100</small>
|
|
112
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-100']"
|
|
72
113
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
73
|
-
|
|
114
|
+
</div>
|
|
115
|
+
<div>
|
|
116
|
+
<small class="text-xs text-text-400">50</small>
|
|
117
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-50']"
|
|
118
|
+
mode="hex" :custom-color="true" value-type="rgb" />
|
|
119
|
+
</div>
|
|
120
|
+
<div>
|
|
121
|
+
<small class="text-xs text-text-400">600</small>
|
|
122
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-600']"
|
|
74
123
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
75
|
-
|
|
124
|
+
</div>
|
|
125
|
+
<div>
|
|
126
|
+
<small class="text-xs text-text-400">700</small>
|
|
127
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-700']"
|
|
76
128
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
77
|
-
|
|
129
|
+
</div>
|
|
130
|
+
<div>
|
|
131
|
+
<small class="text-xs text-text-400">800</small>
|
|
132
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-800']"
|
|
78
133
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
79
|
-
|
|
134
|
+
</div>
|
|
135
|
+
<div>
|
|
136
|
+
<small class="text-xs text-text-400">900</small>
|
|
137
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--secondary-900']"
|
|
80
138
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
81
139
|
</div>
|
|
82
140
|
</div>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
83
143
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
144
|
+
<div>
|
|
145
|
+
<label :class="$style.label">Text Color</label>
|
|
146
|
+
<div class="mt-1 flex flex-row items-center gap-4">
|
|
147
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text']" item-class="w-[48px] h-[48px]"
|
|
148
|
+
mode="hex" :custom-color="true" value-type="rgb"
|
|
149
|
+
@change="generateShade('--text', mediaOf(viewType, 'html, .html')['--text'])" />
|
|
150
|
+
|
|
151
|
+
<div class="grid grid-cols-5 gap-2 text-center">
|
|
152
|
+
<div>
|
|
153
|
+
<small class="text-xs text-text-400">400</small>
|
|
154
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-400']"
|
|
88
155
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
89
|
-
|
|
156
|
+
</div>
|
|
157
|
+
<div>
|
|
158
|
+
<small class="text-xs text-text-400">300</small>
|
|
159
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-300']"
|
|
90
160
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
91
|
-
|
|
161
|
+
</div>
|
|
162
|
+
<div>
|
|
163
|
+
<small class="text-xs text-text-400">200</small>
|
|
164
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-200']"
|
|
92
165
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
93
|
-
|
|
166
|
+
</div>
|
|
167
|
+
<div>
|
|
168
|
+
<small class="text-xs text-text-400">100</small>
|
|
169
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-100']"
|
|
94
170
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
95
|
-
|
|
171
|
+
</div>
|
|
172
|
+
<div>
|
|
173
|
+
<small class="text-xs text-text-400">50</small>
|
|
174
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-50']"
|
|
96
175
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
97
|
-
|
|
176
|
+
</div>
|
|
177
|
+
<div>
|
|
178
|
+
<small class="text-xs text-text-400">600</small>
|
|
179
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-600']"
|
|
98
180
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
99
|
-
|
|
181
|
+
</div>
|
|
182
|
+
<div>
|
|
183
|
+
<small class="text-xs text-text-400">700</small>
|
|
184
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-700']"
|
|
100
185
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
101
|
-
|
|
186
|
+
</div>
|
|
187
|
+
<div>
|
|
188
|
+
<small class="text-xs text-text-400">800</small>
|
|
189
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-800']"
|
|
190
|
+
mode="hex" :custom-color="true" value-type="rgb" />
|
|
191
|
+
</div>
|
|
192
|
+
<div>
|
|
193
|
+
<small class="text-xs text-text-400">900</small>
|
|
194
|
+
<ColorPicker v-model="mediaOf(viewType, 'html, .html')['--text-900']"
|
|
102
195
|
mode="hex" :custom-color="true" value-type="rgb" />
|
|
103
196
|
</div>
|
|
104
197
|
</div>
|
|
105
|
-
|
|
106
198
|
</div>
|
|
107
|
-
|
|
108
|
-
|
|
109
199
|
</div>
|
|
110
200
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
<div class="flex flex-row gap-4 items-center cursor-pointer">
|
|
114
|
-
<strong class="flex-1 text-text-400">Headings</strong>
|
|
115
|
-
</div>
|
|
201
|
+
</div>
|
|
116
202
|
|
|
117
|
-
|
|
203
|
+
<div class="p-6">
|
|
118
204
|
|
|
119
|
-
|
|
205
|
+
<small class="flex-1 text-text-400">Headings</small>
|
|
120
206
|
|
|
121
|
-
|
|
122
|
-
<label :class="$style.label">Font Family</label>
|
|
123
|
-
<Dropdown v-model="mediaOf(_.value, 'h1, h2, h3, h4, h5')['font-family']" class="mt-1">
|
|
124
|
-
<option value="">Default</option>
|
|
125
|
-
<option v-for="opt in components.fontFamily"
|
|
126
|
-
:value="`${opt[1]}`">
|
|
127
|
-
{{ opt[0] }}
|
|
128
|
-
</option>
|
|
129
|
-
</Dropdown>
|
|
130
|
-
</div>
|
|
207
|
+
<div class="flex flex-col gap-4 mt-2">
|
|
131
208
|
|
|
209
|
+
<div>
|
|
210
|
+
<small class="text-text-400">Font Family</small>
|
|
211
|
+
<Dropdown v-model="mediaOf(viewType, 'h1, h2, h3, h4, h5')['font-family']" class="mt-1">
|
|
212
|
+
<option value="">Default</option>
|
|
213
|
+
<option v-for="opt in components.fontFamily"
|
|
214
|
+
:value="`${opt[1]}`">
|
|
215
|
+
{{ opt[0] }}
|
|
216
|
+
</option>
|
|
217
|
+
</Dropdown>
|
|
132
218
|
</div>
|
|
133
|
-
</div>
|
|
134
219
|
|
|
220
|
+
</div>
|
|
135
221
|
</div>
|
|
136
|
-
</div>
|
|
137
222
|
|
|
138
|
-
|
|
223
|
+
<div class="p-6">
|
|
224
|
+
|
|
225
|
+
<small class="text-text-400">Splash</small>
|
|
226
|
+
|
|
227
|
+
<div class="mt-1 flex flex-col items-center gap-2">
|
|
228
|
+
<Image ref="splashImg"
|
|
229
|
+
:src="item.props.splash"
|
|
230
|
+
:editable="true"
|
|
231
|
+
@change="setSplash"
|
|
232
|
+
class="aspect-square bg-text-50 rounded-lg w-[100px]" />
|
|
233
|
+
|
|
234
|
+
<div class="flex flex-row gap-8">
|
|
235
|
+
<button type="button" class="text-primary"
|
|
236
|
+
@click="$refs.splashImg.edit()">
|
|
237
|
+
Upload
|
|
238
|
+
</button>
|
|
239
|
+
<button type="button" class="text-primary"
|
|
240
|
+
@click="removeSplash">
|
|
241
|
+
Remove
|
|
242
|
+
</button>
|
|
243
|
+
</div>
|
|
244
|
+
</div>
|
|
139
245
|
|
|
140
|
-
<div class="flex flex-row gap-4 items-center cursor-pointer">
|
|
141
|
-
<strong class="flex-1 text-text-400">Splash</strong>
|
|
142
246
|
</div>
|
|
143
247
|
|
|
144
|
-
<div class="
|
|
145
|
-
<
|
|
146
|
-
|
|
147
|
-
:editable="true"
|
|
148
|
-
@change="setSplash"
|
|
149
|
-
class="aspect-square bg-text-50 rounded-lg w-[100px]" />
|
|
150
|
-
|
|
151
|
-
<div class="flex flex-row gap-8">
|
|
152
|
-
<button type="button" class="text-primary"
|
|
153
|
-
@click="$refs.splashImg.edit()">
|
|
154
|
-
Upload
|
|
155
|
-
</button>
|
|
156
|
-
<button type="button" class="text-primary"
|
|
157
|
-
@click="removeSplash">
|
|
158
|
-
Remove
|
|
159
|
-
</button>
|
|
160
|
-
</div>
|
|
248
|
+
<div class="p-6 text-center">
|
|
249
|
+
<br />
|
|
250
|
+
<button type="button" class="text-text-300 hover:text-primary" @click="resetMedia">Reset</button>
|
|
161
251
|
</div>
|
|
162
252
|
|
|
163
253
|
</div>
|
|
164
254
|
|
|
165
|
-
<div class="p-6 text-center">
|
|
166
|
-
<button type="button" class="text-primary" @click="resetMedia">Reset to Default Style</button>
|
|
167
|
-
</div>
|
|
168
|
-
|
|
169
255
|
</div>
|
|
170
256
|
</template>
|
|
171
257
|
|
|
172
258
|
<script>
|
|
173
259
|
|
|
174
260
|
import ColorPicker from "../components/ColorPicker.vue";
|
|
261
|
+
import tinycolor from "tinycolor2";
|
|
175
262
|
|
|
176
263
|
export default{
|
|
177
264
|
components: {ColorPicker},
|
|
@@ -189,6 +276,8 @@ export default{
|
|
|
189
276
|
|
|
190
277
|
viewType: String,
|
|
191
278
|
|
|
279
|
+
viewIndex: Number,
|
|
280
|
+
|
|
192
281
|
viewTypes: Array,
|
|
193
282
|
|
|
194
283
|
},
|
|
@@ -226,14 +315,32 @@ export default{
|
|
|
226
315
|
return this.media[key][propertyKey]
|
|
227
316
|
},
|
|
228
317
|
|
|
229
|
-
|
|
318
|
+
generateShade(key, value){
|
|
319
|
+
this.mediaOf('', 'html, .html')[`${key}`] = value
|
|
320
|
+
this.mediaOf('', 'html, .html')[`${key}-500`] = value
|
|
321
|
+
|
|
322
|
+
const lightenLevels = [[50, 52], [100, 37], [200, 26], [300, 12], [400, 6]];
|
|
323
|
+
const darkenLevels = [[600, 6], [700, 12], [800, 18], [900, 24]];
|
|
324
|
+
|
|
325
|
+
for(let [ idx, lvl ] of lightenLevels){
|
|
326
|
+
this.mediaOf(this.viewType, 'html, .html')[`${key}-${idx}`] =
|
|
327
|
+
tinycolor(`rgb(${value})`).lighten(lvl).toRgbString().substring(4).slice(0, -1)
|
|
328
|
+
}
|
|
230
329
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
this.item.props.media[key] = { '*': {}, 'html, .html': {}, 'h1, h2, h3, h4, h5':{} }
|
|
330
|
+
for(let [ idx, lvl ] of darkenLevels){
|
|
331
|
+
this.mediaOf(this.viewType, 'html, .html')[`${key}-${idx}`] =
|
|
332
|
+
tinycolor(`rgb(${value})`).darken(lvl).toRgbString().substring(4).slice(0, -1)
|
|
235
333
|
}
|
|
334
|
+
},
|
|
236
335
|
|
|
336
|
+
resetMedia(){
|
|
337
|
+
this.confirm('Reset styles?', () => {
|
|
338
|
+
this.item.props.media = {}
|
|
339
|
+
for(let i in this.viewTypes){
|
|
340
|
+
const key = this.viewTypes[i].value
|
|
341
|
+
this.item.props.media[key] = { '*': {}, 'html, .html': {}, 'h1, h2, h3, h4, h5':{} }
|
|
342
|
+
}
|
|
343
|
+
})
|
|
237
344
|
},
|
|
238
345
|
|
|
239
346
|
setSplash(base64, file){
|
|
@@ -293,10 +400,14 @@ export default{
|
|
|
293
400
|
['Montserrat', 'Montserrat, sans-serif'],
|
|
294
401
|
['Noto Sans', '"Noto Sans", sans-serif'],
|
|
295
402
|
['Oswald', 'Oswald, sans-serif'],
|
|
403
|
+
['Oxygen', 'Oxygen, sans-serif'],
|
|
296
404
|
['Poppins', 'Poppins, sans-serif'],
|
|
405
|
+
['Quantico', 'Quantico, sans-serif'],
|
|
297
406
|
['Raleway', 'Raleway, sans-serif'],
|
|
407
|
+
['Reddit Sans', '"Reddit Sans", sans-serif'],
|
|
298
408
|
['Roboto', '"Roboto", sans-serif'],
|
|
299
409
|
['Roboto Slab', '"Roboto Slab", serif'],
|
|
410
|
+
['Volkhov', 'Volkhov, serif'],
|
|
300
411
|
['Work Sans', '"Work Sans", serif'],
|
|
301
412
|
],
|
|
302
413
|
|