@happyvertical/smrt-content 0.60.15 → 0.60.17
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 +8 -0
- package/dist/body-format.d.ts.map +1 -1
- package/dist/body-format.js +9 -5
- package/dist/body-format.js.map +1 -1
- package/dist/chunks/{content-query-Btubw6aG.js → content-query-YT83-Llc.js} +4 -4
- package/dist/chunks/{content-query-Btubw6aG.js.map → content-query-YT83-Llc.js.map} +1 -1
- package/dist/chunks/{content-versions-D9CG72yc.js → content-versions-DPdLvWjx.js} +2 -2
- package/dist/chunks/{content-versions-D9CG72yc.js.map → content-versions-DPdLvWjx.js.map} +1 -1
- package/dist/chunks/{contents-B72075dG.js → contents-vO5U0lE9.js} +2 -2
- package/dist/chunks/{contents-B72075dG.js.map → contents-vO5U0lE9.js.map} +1 -1
- package/dist/index.js +4 -4
- package/dist/manifest.json +1 -1
- package/dist/server.js +1 -1
- package/dist/smrt-knowledge.json +3 -3
- package/dist/svelte/components/ArticleCard.svelte +39 -36
- package/dist/svelte/components/ArticleList.svelte +10 -5
- package/dist/svelte/components/ContentAgentChat.svelte +90 -82
- package/dist/svelte/components/ContentBodyEditor.svelte +246 -231
- package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
- package/dist/svelte/components/ContentBodyRenderer.svelte +76 -82
- package/dist/svelte/components/ContentClaimAuditTool.svelte +100 -112
- package/dist/svelte/components/ContentContributionForm.svelte +17 -15
- package/dist/svelte/components/ContentContributionInbox.svelte +55 -51
- package/dist/svelte/components/ContentContributionPortal.svelte +50 -48
- package/dist/svelte/components/ContentContributionTypeManager.svelte +33 -31
- package/dist/svelte/components/ContentContributorManager.svelte +29 -27
- package/dist/svelte/components/ContentCorrectionsTool.svelte +76 -79
- package/dist/svelte/components/ContentEditor.svelte +523 -527
- package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +19 -16
- package/dist/svelte/components/ContentGovernanceManager.svelte +33 -33
- package/dist/svelte/components/ContentGovernancePanel.svelte +336 -359
- package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +14 -11
- package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +21 -19
- package/dist/svelte/components/ContentImageBrowser.svelte +72 -68
- package/dist/svelte/components/ContentImageChooser.svelte +30 -22
- package/dist/svelte/components/ContentList.svelte +504 -488
- package/dist/svelte/components/ContentListLifecyclePanel.svelte +19 -21
- package/dist/svelte/components/ContentMetadataFields.svelte +15 -12
- package/dist/svelte/components/ContentPictureDrawer.svelte +115 -112
- package/dist/svelte/components/ContentReferencesPanel.svelte +59 -54
- package/dist/svelte/components/ContentReviewStatusTray.svelte +40 -38
- package/dist/svelte/components/ContentStatusFields.svelte +12 -9
- package/dist/svelte/components/ContentTitleField.svelte +20 -20
- package/dist/svelte/components/ContentTransparencyReport.svelte +94 -92
- package/dist/svelte/components/ContentTransparencyTool.svelte +84 -87
- package/dist/svelte/components/ContentVersionsTool.svelte +60 -63
- package/dist/svelte/components/GovernedContentEditor.svelte +36 -35
- package/dist/svelte/components/ImageThumbnail.svelte +18 -12
- package/dist/svelte/components/Markdown.svelte +58 -55
- package/dist/svelte/routes/ContentContributionsRoute.svelte +206 -209
- package/dist/svelte/routes/ContentFactsRoute.svelte +239 -252
- package/dist/svelte/routes/ContentGovernanceRoute.svelte +77 -78
- package/dist/svelte/routes/ContentWorkspaceRoute.svelte +98 -106
- package/dist/svelte/routes/PublishedArticleRoute.svelte +81 -77
- package/package.json +24 -24
|
@@ -46,7 +46,7 @@ function handleSubmit() {
|
|
|
46
46
|
}
|
|
47
47
|
</script>
|
|
48
48
|
|
|
49
|
-
<div class="governance-
|
|
49
|
+
<div class="smrt-content-governance-policy-editor__root" data-smrt-component="ContentGovernancePolicyEditor">
|
|
50
50
|
<Form class="governance-editor" onsubmit={(event) => {
|
|
51
51
|
event.preventDefault();
|
|
52
52
|
handleSubmit();
|
|
@@ -71,12 +71,12 @@ function handleSubmit() {
|
|
|
71
71
|
Instructions
|
|
72
72
|
<Textarea rows={4} bind:value={draft.instructions}></Textarea>
|
|
73
73
|
</label>
|
|
74
|
-
<label class="
|
|
74
|
+
<label class="smrt-content-governance-policy-editor__checkbox" data-smrt-part="field">
|
|
75
75
|
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
76
76
|
<input type="checkbox" bind:checked={draft.enabled} />
|
|
77
77
|
Enabled
|
|
78
78
|
</label>
|
|
79
|
-
<div class="actions">
|
|
79
|
+
<div class="smrt-content-governance-policy-editor__actions" data-smrt-part="actions">
|
|
80
80
|
<Button variant="primary" type="submit">{t(M['content.governance_policy_editor.save_policy'])}</Button>
|
|
81
81
|
{#if onCancel}
|
|
82
82
|
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
@@ -89,27 +89,30 @@ function handleSubmit() {
|
|
|
89
89
|
|
|
90
90
|
<style>
|
|
91
91
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
92
|
-
@layer smrt.
|
|
93
|
-
.governance-
|
|
92
|
+
@layer smrt.structure {
|
|
93
|
+
.smrt-content-governance-policy-editor__root :global(.governance-editor) {
|
|
94
94
|
display: grid;
|
|
95
95
|
gap: 0.75rem;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
97
|
label {
|
|
99
98
|
display: grid;
|
|
100
99
|
gap: 0.35rem;
|
|
101
|
-
font-size: var(--smrt-typography-label-large-size, 0.9rem);
|
|
102
100
|
}
|
|
103
|
-
|
|
104
|
-
.checkbox {
|
|
101
|
+
.smrt-content-governance-policy-editor__checkbox {
|
|
105
102
|
display: flex;
|
|
106
103
|
align-items: center;
|
|
107
104
|
gap: 0.5rem;
|
|
108
105
|
}
|
|
109
|
-
|
|
110
|
-
.actions {
|
|
106
|
+
.smrt-content-governance-policy-editor__actions {
|
|
111
107
|
display: flex;
|
|
112
108
|
gap: 0.75rem;
|
|
113
109
|
}
|
|
114
110
|
}
|
|
111
|
+
|
|
112
|
+
@layer smrt.theme {
|
|
113
|
+
label {
|
|
114
|
+
font-size: var(--smrt-typography-label-large-size, 0.9rem);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
115
118
|
</style>
|
|
@@ -87,7 +87,7 @@ function handleSubmit() {
|
|
|
87
87
|
}
|
|
88
88
|
</script>
|
|
89
89
|
|
|
90
|
-
<div class="governance-
|
|
90
|
+
<div class="smrt-content-governance-profile-editor__root" data-smrt-component="ContentGovernanceProfileEditor">
|
|
91
91
|
<Form class="governance-editor" onsubmit={(event) => {
|
|
92
92
|
event.preventDefault();
|
|
93
93
|
handleSubmit();
|
|
@@ -104,14 +104,14 @@ function handleSubmit() {
|
|
|
104
104
|
Description
|
|
105
105
|
<Textarea rows={2} bind:value={draft.description}></Textarea>
|
|
106
106
|
</label>
|
|
107
|
-
<label class="
|
|
107
|
+
<label class="smrt-content-governance-profile-editor__checkbox" data-smrt-part="field">
|
|
108
108
|
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
109
109
|
<input type="checkbox" bind:checked={draft.enabled} />
|
|
110
110
|
Enabled
|
|
111
111
|
</label>
|
|
112
112
|
|
|
113
|
-
<div class="
|
|
114
|
-
<div class="
|
|
113
|
+
<div class="smrt-content-governance-profile-editor__requirements" data-smrt-part="list">
|
|
114
|
+
<div class="smrt-content-governance-profile-editor__requirements-header" data-smrt-part="header">
|
|
115
115
|
<strong>Requirements</strong>
|
|
116
116
|
<Button variant="secondary" type="button" onclick={addRequirement}>
|
|
117
117
|
{t(M['content.governance_profile_editor.add_requirement'])}
|
|
@@ -119,7 +119,7 @@ function handleSubmit() {
|
|
|
119
119
|
</div>
|
|
120
120
|
|
|
121
121
|
{#each draft.requirements as requirement, index (`${requirement.policyKey}-${index}`)}
|
|
122
|
-
<div class="
|
|
122
|
+
<div class="smrt-content-governance-profile-editor__requirement-row" data-smrt-part="row">
|
|
123
123
|
<label>
|
|
124
124
|
Policy
|
|
125
125
|
<Select bind:value={requirement.policyKey}>
|
|
@@ -132,7 +132,7 @@ function handleSubmit() {
|
|
|
132
132
|
Label
|
|
133
133
|
<Input type="text" bind:value={requirement.label} />
|
|
134
134
|
</label>
|
|
135
|
-
<label class="
|
|
135
|
+
<label class="smrt-content-governance-profile-editor__checkbox" data-smrt-part="field">
|
|
136
136
|
<!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
|
|
137
137
|
<input type="checkbox" bind:checked={requirement.blocking} />
|
|
138
138
|
Blocking
|
|
@@ -144,7 +144,7 @@ function handleSubmit() {
|
|
|
144
144
|
{/each}
|
|
145
145
|
</div>
|
|
146
146
|
|
|
147
|
-
<div class="actions">
|
|
147
|
+
<div class="smrt-content-governance-profile-editor__actions" data-smrt-part="actions">
|
|
148
148
|
<Button variant="primary" type="submit">{t(M['content.governance_profile_editor.save_profile'])}</Button>
|
|
149
149
|
{#if onCancel}
|
|
150
150
|
<Button variant="secondary" type="button" onclick={() => onCancel?.()}>
|
|
@@ -157,36 +157,38 @@ function handleSubmit() {
|
|
|
157
157
|
|
|
158
158
|
<style>
|
|
159
159
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
160
|
-
@layer smrt.
|
|
161
|
-
.governance-
|
|
160
|
+
@layer smrt.structure {
|
|
161
|
+
.smrt-content-governance-profile-editor__root :global(.governance-editor) {
|
|
162
162
|
display: grid;
|
|
163
163
|
gap: 0.75rem;
|
|
164
164
|
}
|
|
165
|
-
|
|
166
165
|
label {
|
|
167
166
|
display: grid;
|
|
168
167
|
gap: 0.35rem;
|
|
169
|
-
font-size: var(--smrt-typography-label-large-size, 0.9rem);
|
|
170
168
|
}
|
|
171
|
-
|
|
172
|
-
.checkbox {
|
|
169
|
+
.smrt-content-governance-profile-editor__checkbox {
|
|
173
170
|
display: flex;
|
|
174
171
|
align-items: center;
|
|
175
172
|
gap: 0.5rem;
|
|
176
173
|
}
|
|
177
|
-
|
|
178
|
-
.requirements {
|
|
174
|
+
.smrt-content-governance-profile-editor__requirements {
|
|
179
175
|
display: grid;
|
|
180
176
|
gap: 0.75rem;
|
|
181
177
|
}
|
|
182
|
-
|
|
183
|
-
.
|
|
184
|
-
.
|
|
185
|
-
.actions {
|
|
178
|
+
.smrt-content-governance-profile-editor__requirements-header,
|
|
179
|
+
.smrt-content-governance-profile-editor__requirement-row,
|
|
180
|
+
.smrt-content-governance-profile-editor__actions {
|
|
186
181
|
display: flex;
|
|
187
182
|
gap: 0.75rem;
|
|
188
183
|
align-items: center;
|
|
189
184
|
flex-wrap: wrap;
|
|
190
185
|
}
|
|
191
186
|
}
|
|
187
|
+
|
|
188
|
+
@layer smrt.theme {
|
|
189
|
+
label {
|
|
190
|
+
font-size: var(--smrt-typography-label-large-size, 0.9rem);
|
|
191
|
+
}
|
|
192
|
+
}
|
|
193
|
+
|
|
192
194
|
</style>
|
|
@@ -76,27 +76,27 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
76
76
|
}
|
|
77
77
|
</script>
|
|
78
78
|
|
|
79
|
-
<div class="content-image-
|
|
79
|
+
<div class="smrt-content-image-browser__root" data-smrt-component="ContentImageBrowser">
|
|
80
80
|
{#if assets.length}
|
|
81
|
-
<div class="
|
|
81
|
+
<div class="smrt-content-image-browser__asset-grid" data-smrt-part="grid">
|
|
82
82
|
{#each assets as asset, index (asset.id || `${getAssetLabel(asset)}-${index}`)}
|
|
83
83
|
{@const source = getAssetImageSource(asset)}
|
|
84
84
|
{@const assetId = typeof asset.id === 'string' ? asset.id : ''}
|
|
85
|
-
<article class="
|
|
86
|
-
<div class="
|
|
85
|
+
<article class="smrt-content-image-browser__asset-card" class:smrt-content-image-browser__asset-card--thumbnail={thumbnailAssetId === assetId} data-smrt-part="item">
|
|
86
|
+
<div class="smrt-content-image-browser__asset-preview" data-smrt-part="panel">
|
|
87
87
|
{#if source}
|
|
88
88
|
<img src={source} alt={getAssetLabel(asset)} loading="lazy" decoding="async" />
|
|
89
89
|
{:else}
|
|
90
90
|
<span>{getAssetLabel(asset).slice(0, 1).toUpperCase()}</span>
|
|
91
91
|
{/if}
|
|
92
92
|
</div>
|
|
93
|
-
<div class="
|
|
93
|
+
<div class="smrt-content-image-browser__asset-meta" data-smrt-part="meta">
|
|
94
94
|
<strong>{getAssetLabel(asset)}</strong>
|
|
95
95
|
{#if thumbnailAssetId === assetId}
|
|
96
96
|
<span>Thumbnail</span>
|
|
97
97
|
{/if}
|
|
98
98
|
</div>
|
|
99
|
-
<div class="
|
|
99
|
+
<div class="smrt-content-image-browser__asset-actions" data-smrt-part="actions">
|
|
100
100
|
{#if onUseAsset}
|
|
101
101
|
<Button variant="ghost" type="button" class="asset-action-btn" onclick={() => onUseAsset?.(asset)}>{selectActionLabel}</Button>
|
|
102
102
|
{/if}
|
|
@@ -111,11 +111,11 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
111
111
|
{/each}
|
|
112
112
|
</div>
|
|
113
113
|
{:else}
|
|
114
|
-
<p class="
|
|
114
|
+
<p class="smrt-content-image-browser__empty-state" data-smrt-part="empty">{t(M['content.content_image_browser.no_images_attached'])}</p>
|
|
115
115
|
{/if}
|
|
116
116
|
|
|
117
117
|
{#if showUploader}
|
|
118
|
-
<div class="
|
|
118
|
+
<div class="smrt-content-image-browser__uploader-panel" data-smrt-part="panel">
|
|
119
119
|
<ImageUploader {apiBaseUrl} onSelect={handleSelect} onCancel={() => showUploader = false} />
|
|
120
120
|
</div>
|
|
121
121
|
{:else if onSelectImage}
|
|
@@ -132,126 +132,130 @@ function handleSelect(selected: ImageLike | File | string) {
|
|
|
132
132
|
|
|
133
133
|
<style>
|
|
134
134
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
135
|
-
@layer smrt.
|
|
136
|
-
.content-image-
|
|
135
|
+
@layer smrt.structure {
|
|
136
|
+
.smrt-content-image-browser__root {
|
|
137
137
|
display: grid;
|
|
138
138
|
gap: 1rem;
|
|
139
139
|
min-height: 5.5rem;
|
|
140
140
|
padding: 1rem;
|
|
141
|
-
border: 1px dashed color-mix(in srgb, var(--smrt-color-outline) 45%, transparent);
|
|
142
|
-
border-radius: 0.5rem;
|
|
143
141
|
}
|
|
144
|
-
|
|
145
|
-
.asset-grid {
|
|
142
|
+
.smrt-content-image-browser__asset-grid {
|
|
146
143
|
display: grid;
|
|
147
144
|
grid-template-columns: repeat(auto-fill, minmax(12rem, 1fr));
|
|
148
145
|
gap: 0.75rem;
|
|
149
146
|
}
|
|
150
|
-
|
|
151
|
-
.asset-card {
|
|
147
|
+
.smrt-content-image-browser__asset-card {
|
|
152
148
|
display: grid;
|
|
153
149
|
gap: 0.75rem;
|
|
154
|
-
border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 28%, transparent);
|
|
155
|
-
border-radius: 0.5rem;
|
|
156
|
-
background: var(--smrt-color-surface-container-low);
|
|
157
150
|
padding: 0.75rem;
|
|
158
151
|
}
|
|
159
|
-
|
|
160
|
-
.asset-card--thumbnail {
|
|
161
|
-
border-color: var(--smrt-color-primary);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
.asset-preview {
|
|
152
|
+
.smrt-content-image-browser__asset-preview {
|
|
165
153
|
display: grid;
|
|
166
154
|
place-items: center;
|
|
167
155
|
aspect-ratio: 16 / 9;
|
|
168
156
|
overflow: hidden;
|
|
169
|
-
border-radius: 0.375rem;
|
|
170
|
-
background: var(--smrt-color-surface-container);
|
|
171
|
-
color: var(--smrt-color-on-surface-variant);
|
|
172
|
-
font-size: var(--smrt-typography-headline-small-size, 1.5rem);
|
|
173
|
-
font-weight: var(--smrt-typography-weight-bold, 700);
|
|
174
157
|
}
|
|
175
|
-
|
|
176
|
-
.asset-preview img {
|
|
158
|
+
.smrt-content-image-browser__asset-preview img {
|
|
177
159
|
width: 100%;
|
|
178
160
|
height: 100%;
|
|
179
161
|
object-fit: cover;
|
|
180
162
|
}
|
|
181
|
-
|
|
182
|
-
.asset-meta {
|
|
163
|
+
.smrt-content-image-browser__asset-meta {
|
|
183
164
|
display: grid;
|
|
184
165
|
gap: 0.2rem;
|
|
185
166
|
min-width: 0;
|
|
186
167
|
}
|
|
187
|
-
|
|
188
|
-
.asset-meta strong {
|
|
168
|
+
.smrt-content-image-browser__asset-meta strong {
|
|
189
169
|
overflow: hidden;
|
|
190
|
-
color: var(--smrt-color-on-surface);
|
|
191
|
-
font-size: var(--smrt-typography-title-small-size, 0.875rem);
|
|
192
170
|
text-overflow: ellipsis;
|
|
193
171
|
white-space: nowrap;
|
|
194
172
|
}
|
|
195
|
-
|
|
196
|
-
.asset-meta span,
|
|
197
|
-
.empty-state {
|
|
198
|
-
color: var(--smrt-color-on-surface-variant);
|
|
199
|
-
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
.empty-state {
|
|
173
|
+
.smrt-content-image-browser__empty-state {
|
|
203
174
|
margin: 0;
|
|
204
|
-
font-style: italic;
|
|
205
175
|
}
|
|
206
|
-
|
|
207
|
-
.asset-actions {
|
|
176
|
+
.smrt-content-image-browser__asset-actions {
|
|
208
177
|
display: flex;
|
|
209
178
|
flex-wrap: wrap;
|
|
210
179
|
gap: 0.5rem;
|
|
211
180
|
}
|
|
212
|
-
|
|
213
|
-
.content-image-browser :global(.asset-action-btn) {
|
|
181
|
+
.smrt-content-image-browser__root :global(.asset-action-btn) {
|
|
214
182
|
display: inline-flex;
|
|
215
183
|
align-items: center;
|
|
216
184
|
justify-content: center;
|
|
217
185
|
gap: 0.45rem;
|
|
218
186
|
min-height: 2.35rem;
|
|
187
|
+
cursor: pointer;
|
|
188
|
+
padding: 0.5rem 0.875rem;
|
|
189
|
+
}
|
|
190
|
+
.smrt-content-image-browser__root :global(.add-image-button) {
|
|
191
|
+
justify-self: start;
|
|
192
|
+
}
|
|
193
|
+
.smrt-content-image-browser__root :global(.add-image-button svg) {
|
|
194
|
+
width: 1rem;
|
|
195
|
+
height: 1rem;
|
|
196
|
+
}
|
|
197
|
+
.smrt-content-image-browser__uploader-panel {
|
|
198
|
+
overflow: hidden;
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
@layer smrt.theme {
|
|
203
|
+
.smrt-content-image-browser__root {
|
|
204
|
+
border: 1px dashed color-mix(in srgb, var(--smrt-color-outline) 45%, transparent);
|
|
205
|
+
border-radius: 0.5rem;
|
|
206
|
+
}
|
|
207
|
+
.smrt-content-image-browser__asset-card {
|
|
208
|
+
border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 28%, transparent);
|
|
209
|
+
border-radius: 0.5rem;
|
|
210
|
+
background: var(--smrt-color-surface-container-low);
|
|
211
|
+
}
|
|
212
|
+
.smrt-content-image-browser__asset-card--thumbnail {
|
|
213
|
+
border-color: var(--smrt-color-primary);
|
|
214
|
+
}
|
|
215
|
+
.smrt-content-image-browser__asset-preview {
|
|
216
|
+
border-radius: 0.375rem;
|
|
217
|
+
background: var(--smrt-color-surface-container);
|
|
218
|
+
color: var(--smrt-color-on-surface-variant);
|
|
219
|
+
font-size: var(--smrt-typography-headline-small-size, 1.5rem);
|
|
220
|
+
font-weight: var(--smrt-typography-weight-bold, 700);
|
|
221
|
+
}
|
|
222
|
+
.smrt-content-image-browser__asset-meta strong {
|
|
223
|
+
color: var(--smrt-color-on-surface);
|
|
224
|
+
font-size: var(--smrt-typography-title-small-size, 0.875rem);
|
|
225
|
+
}
|
|
226
|
+
.smrt-content-image-browser__asset-meta span,
|
|
227
|
+
.smrt-content-image-browser__empty-state {
|
|
228
|
+
color: var(--smrt-color-on-surface-variant);
|
|
229
|
+
font-size: var(--smrt-typography-body-medium-size, 0.875rem);
|
|
230
|
+
}
|
|
231
|
+
.smrt-content-image-browser__empty-state {
|
|
232
|
+
font-style: italic;
|
|
233
|
+
}
|
|
234
|
+
.smrt-content-image-browser__root :global(.asset-action-btn) {
|
|
219
235
|
border: var(--smrt-hairline-strong);
|
|
220
236
|
border-radius: 0.5rem;
|
|
221
237
|
background: var(--smrt-color-surface-container);
|
|
222
238
|
color: var(--smrt-color-on-surface);
|
|
223
|
-
cursor: pointer;
|
|
224
239
|
font: inherit;
|
|
225
240
|
font-size: var(--smrt-typography-label-large-size, 0.875rem);
|
|
226
241
|
font-weight: var(--smrt-typography-weight-semibold, 600);
|
|
227
|
-
padding: 0.5rem 0.875rem;
|
|
228
242
|
}
|
|
229
|
-
|
|
230
|
-
.content-image-browser :global(.asset-action-btn:hover) {
|
|
243
|
+
.smrt-content-image-browser__root :global(.asset-action-btn:hover) {
|
|
231
244
|
background: var(--smrt-color-surface-container-high);
|
|
232
245
|
}
|
|
233
|
-
|
|
234
|
-
.content-image-browser :global(.asset-action-btn--danger) {
|
|
246
|
+
.smrt-content-image-browser__root :global(.asset-action-btn--danger) {
|
|
235
247
|
color: var(--smrt-color-error);
|
|
236
248
|
}
|
|
237
|
-
|
|
238
|
-
.content-image-browser :global(.add-image-button) {
|
|
239
|
-
justify-self: start;
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
.content-image-browser :global(.add-image-button svg) {
|
|
243
|
-
width: 1rem;
|
|
244
|
-
height: 1rem;
|
|
249
|
+
.smrt-content-image-browser__root :global(.add-image-button svg) {
|
|
245
250
|
fill: none;
|
|
246
251
|
stroke: currentColor;
|
|
247
252
|
stroke-width: 2;
|
|
248
253
|
stroke-linecap: round;
|
|
249
254
|
stroke-linejoin: round;
|
|
250
255
|
}
|
|
251
|
-
|
|
252
|
-
.uploader-panel {
|
|
256
|
+
.smrt-content-image-browser__uploader-panel {
|
|
253
257
|
border-radius: 0.5rem;
|
|
254
|
-
overflow: hidden;
|
|
255
258
|
}
|
|
256
259
|
}
|
|
260
|
+
|
|
257
261
|
</style>
|
|
@@ -51,7 +51,7 @@ function cycle(delta: number) {
|
|
|
51
51
|
</script>
|
|
52
52
|
|
|
53
53
|
{#if activeImage}
|
|
54
|
-
<div class="content-image-
|
|
54
|
+
<div class="smrt-content-image-chooser__root" aria-label={t(M['content.content_image_chooser.body_images'])} data-smrt-component="ContentImageChooser">
|
|
55
55
|
{#if hasMultiple}
|
|
56
56
|
<Button
|
|
57
57
|
variant="ghost"
|
|
@@ -98,51 +98,59 @@ function cycle(delta: number) {
|
|
|
98
98
|
|
|
99
99
|
<style>
|
|
100
100
|
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
101
|
-
@layer smrt.
|
|
102
|
-
.content-image-
|
|
101
|
+
@layer smrt.structure {
|
|
102
|
+
.smrt-content-image-chooser__root {
|
|
103
103
|
display: inline-flex;
|
|
104
104
|
align-items: center;
|
|
105
105
|
gap: 0.4rem;
|
|
106
106
|
min-height: 2.75rem;
|
|
107
107
|
}
|
|
108
|
-
|
|
109
|
-
.content-image-
|
|
110
|
-
.content-image-chooser :global(.chooser-preview) {
|
|
111
|
-
border: var(--smrt-hairline);
|
|
112
|
-
background: var(--smrt-color-surface-container);
|
|
113
|
-
color: var(--smrt-color-on-surface);
|
|
114
|
-
border-radius: var(--smrt-radius-full);
|
|
108
|
+
.smrt-content-image-chooser__root :global(.chooser-arrow),
|
|
109
|
+
.smrt-content-image-chooser__root :global(.chooser-preview) {
|
|
115
110
|
cursor: pointer;
|
|
116
111
|
}
|
|
117
|
-
|
|
118
|
-
.content-image-chooser :global(.chooser-arrow) {
|
|
112
|
+
.smrt-content-image-chooser__root :global(.chooser-arrow) {
|
|
119
113
|
width: 2.25rem;
|
|
120
114
|
height: 2.25rem;
|
|
121
115
|
display: grid;
|
|
122
116
|
place-items: center;
|
|
123
117
|
padding: 0;
|
|
124
118
|
}
|
|
125
|
-
|
|
126
|
-
.content-image-chooser :global(.chooser-arrow:disabled) {
|
|
119
|
+
.smrt-content-image-chooser__root :global(.chooser-arrow:disabled) {
|
|
127
120
|
cursor: not-allowed;
|
|
128
|
-
opacity: 0.38;
|
|
129
121
|
}
|
|
130
|
-
|
|
131
|
-
.content-image-chooser :global(.chooser-preview) {
|
|
122
|
+
.smrt-content-image-chooser__root :global(.chooser-preview) {
|
|
132
123
|
display: inline-flex;
|
|
133
124
|
align-items: center;
|
|
134
125
|
gap: 0.45rem;
|
|
135
126
|
padding: 0.25rem 0.65rem 0.25rem 0.3rem;
|
|
136
|
-
font-size: var(--smrt-typography-label-large-size, 0.82rem);
|
|
137
|
-
font-weight: var(--smrt-typography-weight-bold, 650);
|
|
138
127
|
}
|
|
139
|
-
|
|
140
|
-
.content-image-chooser :global(.chooser-preview img) {
|
|
128
|
+
.smrt-content-image-chooser__root :global(.chooser-preview img) {
|
|
141
129
|
width: 2rem;
|
|
142
130
|
height: 2rem;
|
|
143
|
-
border-radius: var(--smrt-radius-full);
|
|
144
131
|
object-fit: cover;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@layer smrt.theme {
|
|
136
|
+
.smrt-content-image-chooser__root :global(.chooser-arrow),
|
|
137
|
+
.smrt-content-image-chooser__root :global(.chooser-preview) {
|
|
138
|
+
border: var(--smrt-hairline);
|
|
139
|
+
background: var(--smrt-color-surface-container);
|
|
140
|
+
color: var(--smrt-color-on-surface);
|
|
141
|
+
border-radius: var(--smrt-radius-full);
|
|
142
|
+
}
|
|
143
|
+
.smrt-content-image-chooser__root :global(.chooser-arrow:disabled) {
|
|
144
|
+
opacity: 0.38;
|
|
145
|
+
}
|
|
146
|
+
.smrt-content-image-chooser__root :global(.chooser-preview) {
|
|
147
|
+
font-size: var(--smrt-typography-label-large-size, 0.82rem);
|
|
148
|
+
font-weight: var(--smrt-typography-weight-bold, 650);
|
|
149
|
+
}
|
|
150
|
+
.smrt-content-image-chooser__root :global(.chooser-preview img) {
|
|
151
|
+
border-radius: var(--smrt-radius-full);
|
|
145
152
|
background: var(--smrt-color-surface-container-high);
|
|
146
153
|
}
|
|
147
154
|
}
|
|
155
|
+
|
|
148
156
|
</style>
|