@happyvertical/smrt-content 0.34.6 → 0.34.8

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.
Files changed (43) hide show
  1. package/dist/manifest.json +2 -2
  2. package/dist/smrt-knowledge.json +4 -4
  3. package/dist/svelte/components/ContentAgentChat.svelte +17 -16
  4. package/dist/svelte/components/ContentAgentChat.svelte.d.ts.map +1 -1
  5. package/dist/svelte/components/ContentBodyEditor.svelte +4 -3
  6. package/dist/svelte/components/ContentBodyEditor.svelte.d.ts.map +1 -1
  7. package/dist/svelte/components/ContentClaimAuditTool.svelte +1 -0
  8. package/dist/svelte/components/ContentClaimAuditTool.svelte.d.ts.map +1 -1
  9. package/dist/svelte/components/ContentContributionForm.svelte +73 -68
  10. package/dist/svelte/components/ContentContributionForm.svelte.d.ts.map +1 -1
  11. package/dist/svelte/components/ContentContributionInbox.svelte +9 -7
  12. package/dist/svelte/components/ContentContributionInbox.svelte.d.ts.map +1 -1
  13. package/dist/svelte/components/ContentContributionTypeManager.svelte +117 -91
  14. package/dist/svelte/components/ContentContributionTypeManager.svelte.d.ts.map +1 -1
  15. package/dist/svelte/components/ContentContributorManager.svelte +34 -31
  16. package/dist/svelte/components/ContentContributorManager.svelte.d.ts.map +1 -1
  17. package/dist/svelte/components/ContentCorrectionsTool.svelte +11 -22
  18. package/dist/svelte/components/ContentCorrectionsTool.svelte.d.ts.map +1 -1
  19. package/dist/svelte/components/ContentEditor.svelte +40 -64
  20. package/dist/svelte/components/ContentEditor.svelte.d.ts.map +1 -1
  21. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte +76 -74
  22. package/dist/svelte/components/ContentGovernanceAssignmentEditor.svelte.d.ts.map +1 -1
  23. package/dist/svelte/components/ContentGovernancePanel.svelte +20 -31
  24. package/dist/svelte/components/ContentGovernancePanel.svelte.d.ts.map +1 -1
  25. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte +42 -44
  26. package/dist/svelte/components/ContentGovernancePolicyEditor.svelte.d.ts.map +1 -1
  27. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte +66 -67
  28. package/dist/svelte/components/ContentGovernanceProfileEditor.svelte.d.ts.map +1 -1
  29. package/dist/svelte/components/ContentList.svelte +12 -18
  30. package/dist/svelte/components/ContentList.svelte.d.ts.map +1 -1
  31. package/dist/svelte/components/ContentMetadataFields.svelte +8 -23
  32. package/dist/svelte/components/ContentMetadataFields.svelte.d.ts.map +1 -1
  33. package/dist/svelte/components/ContentReferencesPanel.svelte +11 -7
  34. package/dist/svelte/components/ContentReferencesPanel.svelte.d.ts.map +1 -1
  35. package/dist/svelte/components/ContentStatusFields.svelte +8 -19
  36. package/dist/svelte/components/ContentStatusFields.svelte.d.ts.map +1 -1
  37. package/dist/svelte/components/ContentTitleField.svelte +16 -12
  38. package/dist/svelte/components/ContentTitleField.svelte.d.ts.map +1 -1
  39. package/dist/svelte/routes/ContentContributionsRoute.svelte +26 -23
  40. package/dist/svelte/routes/ContentContributionsRoute.svelte.d.ts.map +1 -1
  41. package/dist/svelte/routes/ContentFactsRoute.svelte +10 -7
  42. package/dist/svelte/routes/ContentFactsRoute.svelte.d.ts.map +1 -1
  43. package/package.json +15 -15
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { Button } from '@happyvertical/smrt-ui/ui';
4
5
  import type { ContentReviewPolicyData } from '../../mock-smrt-client';
@@ -42,46 +43,49 @@ function handleSubmit() {
42
43
  }
43
44
  </script>
44
45
 
45
- <form class="governance-editor" onsubmit={(event) => {
46
- event.preventDefault();
47
- handleSubmit();
48
- }}>
49
- <label>
50
- Key
51
- <input type="text" bind:value={draft.key} required />
52
- </label>
53
- <label>
54
- Label
55
- <input type="text" bind:value={draft.label} />
56
- </label>
57
- <label>
58
- Kind
59
- <select bind:value={draft.kind}>
60
- <option value="facts">Facts</option>
61
- <option value="safety">Safety</option>
62
- <option value="custom">Custom</option>
63
- </select>
64
- </label>
65
- <label>
66
- Instructions
67
- <textarea rows="4" bind:value={draft.instructions}></textarea>
68
- </label>
69
- <label class="checkbox">
70
- <input type="checkbox" bind:checked={draft.enabled} />
71
- Enabled
72
- </label>
73
- <div class="actions">
74
- <Button variant="primary" type="submit">{t(M['content.governance_policy_editor.save_policy'])}</Button>
75
- {#if onCancel}
76
- <Button variant="secondary" type="button" onclick={() => onCancel?.()}>
77
- Cancel
78
- </Button>
79
- {/if}
80
- </div>
81
- </form>
46
+ <div class="governance-editor-shell">
47
+ <Form class="governance-editor" onsubmit={(event) => {
48
+ event.preventDefault();
49
+ handleSubmit();
50
+ }}>
51
+ <label>
52
+ Key
53
+ <Input type="text" bind:value={draft.key} required />
54
+ </label>
55
+ <label>
56
+ Label
57
+ <Input type="text" bind:value={draft.label} />
58
+ </label>
59
+ <label>
60
+ Kind
61
+ <Select bind:value={draft.kind}>
62
+ <option value="facts">Facts</option>
63
+ <option value="safety">Safety</option>
64
+ <option value="custom">Custom</option>
65
+ </Select>
66
+ </label>
67
+ <label>
68
+ Instructions
69
+ <Textarea rows={4} bind:value={draft.instructions}></Textarea>
70
+ </label>
71
+ <label class="checkbox">
72
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
73
+ <input type="checkbox" bind:checked={draft.enabled} />
74
+ Enabled
75
+ </label>
76
+ <div class="actions">
77
+ <Button variant="primary" type="submit">{t(M['content.governance_policy_editor.save_policy'])}</Button>
78
+ {#if onCancel}
79
+ <Button variant="secondary" type="button" onclick={() => onCancel?.()}>
80
+ Cancel
81
+ </Button>
82
+ {/if}
83
+ </div>
84
+ </Form>
85
+ </div>
82
86
 
83
87
  <style>
84
- .governance-editor {
88
+ .governance-editor-shell :global(.governance-editor) {
85
89
  display: grid;
86
90
  gap: 0.75rem;
87
91
  }
@@ -92,12 +96,6 @@ function handleSubmit() {
92
96
  font-size: var(--smrt-typography-label-large-size, 0.9rem);
93
97
  }
94
98
 
95
- input,
96
- select,
97
- textarea {
98
- width: 100%;
99
- }
100
-
101
99
  .checkbox {
102
100
  display: flex;
103
101
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGovernancePolicyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePolicyEditor.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC1C,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAkFD,QAAA,MAAM,6BAA6B,2CAAwC,CAAC;AAC5E,KAAK,6BAA6B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACtF,eAAe,6BAA6B,CAAC"}
1
+ {"version":3,"file":"ContentGovernancePolicyEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernancePolicyEditor.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AAItE,MAAM,WAAW,KAAK;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;IAC1C,MAAM,EAAE,CAAC,MAAM,EAAE,OAAO,CAAC,uBAAuB,CAAC,KAAK,IAAI,CAAC;IAC3D,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAsFD,QAAA,MAAM,6BAA6B,2CAAwC,CAAC;AAC5E,KAAK,6BAA6B,GAAG,UAAU,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACtF,eAAe,6BAA6B,CAAC"}
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Form, Input, Select, Textarea } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { Button } from '@happyvertical/smrt-ui/ui';
4
5
  import type {
@@ -82,72 +83,76 @@ function handleSubmit() {
82
83
  }
83
84
  </script>
84
85
 
85
- <form class="governance-editor" onsubmit={(event) => {
86
- event.preventDefault();
87
- handleSubmit();
88
- }}>
89
- <label>
90
- Key
91
- <input type="text" bind:value={draft.key} required />
92
- </label>
93
- <label>
94
- Label
95
- <input type="text" bind:value={draft.label} />
96
- </label>
97
- <label>
98
- Description
99
- <textarea rows="2" bind:value={draft.description}></textarea>
100
- </label>
101
- <label class="checkbox">
102
- <input type="checkbox" bind:checked={draft.enabled} />
103
- Enabled
104
- </label>
105
-
106
- <div class="requirements">
107
- <div class="requirements__header">
108
- <strong>Requirements</strong>
109
- <Button variant="secondary" type="button" onclick={addRequirement}>
110
- {t(M['content.governance_profile_editor.add_requirement'])}
111
- </Button>
86
+ <div class="governance-editor-shell">
87
+ <Form class="governance-editor" onsubmit={(event) => {
88
+ event.preventDefault();
89
+ handleSubmit();
90
+ }}>
91
+ <label>
92
+ Key
93
+ <Input type="text" bind:value={draft.key} required />
94
+ </label>
95
+ <label>
96
+ Label
97
+ <Input type="text" bind:value={draft.label} />
98
+ </label>
99
+ <label>
100
+ Description
101
+ <Textarea rows={2} bind:value={draft.description}></Textarea>
102
+ </label>
103
+ <label class="checkbox">
104
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
105
+ <input type="checkbox" bind:checked={draft.enabled} />
106
+ Enabled
107
+ </label>
108
+
109
+ <div class="requirements">
110
+ <div class="requirements__header">
111
+ <strong>Requirements</strong>
112
+ <Button variant="secondary" type="button" onclick={addRequirement}>
113
+ {t(M['content.governance_profile_editor.add_requirement'])}
114
+ </Button>
115
+ </div>
116
+
117
+ {#each draft.requirements as requirement, index (`${requirement.policyKey}-${index}`)}
118
+ <div class="requirement-row">
119
+ <label>
120
+ Policy
121
+ <Select bind:value={requirement.policyKey}>
122
+ {#each policies as policy (policy.key)}
123
+ <option value={policy.key}>{policy.label}</option>
124
+ {/each}
125
+ </Select>
126
+ </label>
127
+ <label>
128
+ Label
129
+ <Input type="text" bind:value={requirement.label} />
130
+ </label>
131
+ <label class="checkbox">
132
+ <!-- raw-primitive-allow: native checkbox; no Provider-free checkbox primitive (Toggle is a switch with different semantics, CheckboxInput requires a Provider) -->
133
+ <input type="checkbox" bind:checked={requirement.blocking} />
134
+ Blocking
135
+ </label>
136
+ <Button variant="danger" type="button" onclick={() => removeRequirement(index)}>
137
+ Remove
138
+ </Button>
139
+ </div>
140
+ {/each}
112
141
  </div>
113
142
 
114
- {#each draft.requirements as requirement, index (`${requirement.policyKey}-${index}`)}
115
- <div class="requirement-row">
116
- <label>
117
- Policy
118
- <select bind:value={requirement.policyKey}>
119
- {#each policies as policy (policy.key)}
120
- <option value={policy.key}>{policy.label}</option>
121
- {/each}
122
- </select>
123
- </label>
124
- <label>
125
- Label
126
- <input type="text" bind:value={requirement.label} />
127
- </label>
128
- <label class="checkbox">
129
- <input type="checkbox" bind:checked={requirement.blocking} />
130
- Blocking
131
- </label>
132
- <Button variant="danger" type="button" onclick={() => removeRequirement(index)}>
133
- Remove
143
+ <div class="actions">
144
+ <Button variant="primary" type="submit">{t(M['content.governance_profile_editor.save_profile'])}</Button>
145
+ {#if onCancel}
146
+ <Button variant="secondary" type="button" onclick={() => onCancel?.()}>
147
+ Cancel
134
148
  </Button>
135
- </div>
136
- {/each}
137
- </div>
138
-
139
- <div class="actions">
140
- <Button variant="primary" type="submit">{t(M['content.governance_profile_editor.save_profile'])}</Button>
141
- {#if onCancel}
142
- <Button variant="secondary" type="button" onclick={() => onCancel?.()}>
143
- Cancel
144
- </Button>
145
- {/if}
146
- </div>
147
- </form>
149
+ {/if}
150
+ </div>
151
+ </Form>
152
+ </div>
148
153
 
149
154
  <style>
150
- .governance-editor {
155
+ .governance-editor-shell :global(.governance-editor) {
151
156
  display: grid;
152
157
  gap: 0.75rem;
153
158
  }
@@ -158,12 +163,6 @@ function handleSubmit() {
158
163
  font-size: var(--smrt-typography-label-large-size, 0.9rem);
159
164
  }
160
165
 
161
- input,
162
- select,
163
- textarea {
164
- width: 100%;
165
- }
166
-
167
166
  .checkbox {
168
167
  display: flex;
169
168
  align-items: center;
@@ -1 +1 @@
1
- {"version":3,"file":"ContentGovernanceProfileEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceProfileEditor.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EACV,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACrC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,4BAA4B,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAgJD,QAAA,MAAM,8BAA8B,2CAAwC,CAAC;AAC7E,KAAK,8BAA8B,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACxF,eAAe,8BAA8B,CAAC"}
1
+ {"version":3,"file":"ContentGovernanceProfileEditor.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentGovernanceProfileEditor.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EACV,4BAA4B,EAC5B,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAIhC,MAAM,WAAW,KAAK;IACpB,OAAO,CAAC,EAAE,OAAO,CAAC,4BAA4B,CAAC,CAAC;IAChD,QAAQ,CAAC,EAAE,uBAAuB,EAAE,CAAC;IACrC,MAAM,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,4BAA4B,CAAC,KAAK,IAAI,CAAC;IACjE,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAqJD,QAAA,MAAM,8BAA8B,2CAAwC,CAAC;AAC7E,KAAK,8BAA8B,GAAG,UAAU,CAAC,OAAO,8BAA8B,CAAC,CAAC;AACxF,eAAe,8BAA8B,CAAC"}
@@ -1,5 +1,6 @@
1
1
  <script lang="ts">
2
2
  import { ConfirmDialog } from '@happyvertical/smrt-ui/feedback';
3
+ import { Input, Select } from '@happyvertical/smrt-ui/forms';
3
4
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
4
5
  import { Button } from '@happyvertical/smrt-ui/ui';
5
6
  import type { Snippet } from 'svelte';
@@ -152,23 +153,23 @@ function cancelDelete() {
152
153
 
153
154
  <div class="content-controls">
154
155
  <div class="search-filters">
155
- <input type="text" placeholder={t(M['content.content_list.search_placeholder'])} bind:value={searchTerm} />
156
-
156
+ <Input type="text" placeholder={t(M['content.content_list.search_placeholder'])} bind:value={searchTerm} />
157
+
157
158
  {#if !type}
158
- <select bind:value={selectedType}>
159
+ <Select bind:value={selectedType}>
159
160
  <option value="All Types">{t(M['content.content_list.all_types'])}</option>
160
161
  <option value="Articles">Articles</option>
161
162
  <option value="Documents">Documents</option>
162
163
  <option value="Mirrors">Mirrors</option>
163
- </select>
164
+ </Select>
164
165
  {/if}
165
-
166
- <select bind:value={selectedStatus}>
166
+
167
+ <Select bind:value={selectedStatus}>
167
168
  <option value="All Statuses">{t(M['content.content_list.all_statuses'])}</option>
168
169
  <option value="Published">Published</option>
169
170
  <option value="Draft">Draft</option>
170
171
  <option value="Archived">Archived</option>
171
- </select>
172
+ </Select>
172
173
 
173
174
  {#if controls}
174
175
  {@render controls()}
@@ -439,8 +440,8 @@ function cancelDelete() {
439
440
  align-items: center;
440
441
  }
441
442
 
442
- .search-filters input,
443
- .search-filters select {
443
+ .search-filters :global(.input),
444
+ .search-filters :global(.select) {
444
445
  padding: 0.5rem 0.9rem;
445
446
  border: 1px solid var(--smrt-color-outline);
446
447
  border-radius: 0.5rem;
@@ -450,13 +451,6 @@ function cancelDelete() {
450
451
  color: var(--smrt-color-on-surface);
451
452
  }
452
453
 
453
- .search-filters input:focus,
454
- .search-filters select:focus {
455
- outline: none;
456
- border-color: var(--smrt-color-primary);
457
- box-shadow: 0 0 0 2px color-mix(in srgb, var(--smrt-color-primary) 20%, transparent);
458
- }
459
-
460
454
  .actions-group {
461
455
  display: flex;
462
456
  gap: 0.75rem;
@@ -926,8 +920,8 @@ function cancelDelete() {
926
920
  width: 100%;
927
921
  }
928
922
 
929
- .search-filters input,
930
- .search-filters select,
923
+ .search-filters :global(.input),
924
+ .search-filters :global(.select),
931
925
  .add-button {
932
926
  width: 100%;
933
927
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentList.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentList.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKrC,KAAK,gBAAgB,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C,CAAC;AA6WF,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
1
+ {"version":3,"file":"ContentList.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentList.svelte.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AAKrC,KAAK,gBAAgB,GAAG;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,GAAG,EAAE,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,eAAe,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC;IAClD,MAAM,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IAC/B,QAAQ,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,IAAI,CAAC;IAClB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,MAAM,GAAG,IAAI,CAAC;CAC/C,CAAC;AA8WF,QAAA,MAAM,WAAW,sDAAwC,CAAC;AAC1D,KAAK,WAAW,GAAG,UAAU,CAAC,OAAO,WAAW,CAAC,CAAC;AAClD,eAAe,WAAW,CAAC"}
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Input, Textarea } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { M } from '../i18n.editor.js';
4
5
 
@@ -33,7 +34,7 @@ function updateTags(value: string) {
33
34
  <div class="content-metadata-fields">
34
35
  <label>
35
36
  <span>Author</span>
36
- <input
37
+ <Input
37
38
  type="text"
38
39
  value={data.author || ''}
39
40
  oninput={(event) => updateField('author', event.currentTarget.value)}
@@ -41,15 +42,15 @@ function updateTags(value: string) {
41
42
  </label>
42
43
  <label>
43
44
  <span>Description</span>
44
- <textarea
45
- rows="4"
45
+ <Textarea
46
+ rows={4}
46
47
  value={data.description || ''}
47
48
  oninput={(event) => updateField('description', event.currentTarget.value)}
48
- ></textarea>
49
+ ></Textarea>
49
50
  </label>
50
51
  <label>
51
52
  <span>Tags</span>
52
- <input
53
+ <Input
53
54
  type="text"
54
55
  value={tagsValue}
55
56
  placeholder={t(M['content.content_metadata_fields.tags_placeholder'])}
@@ -58,7 +59,7 @@ function updateTags(value: string) {
58
59
  </label>
59
60
  <label>
60
61
  <span>URL</span>
61
- <input
62
+ <Input
62
63
  type="url"
63
64
  value={data.url || ''}
64
65
  oninput={(event) => updateField('url', event.currentTarget.value)}
@@ -66,7 +67,7 @@ function updateTags(value: string) {
66
67
  </label>
67
68
  <label>
68
69
  <span>{t(M['content.content_metadata_fields.file_key'])}</span>
69
- <input
70
+ <Input
70
71
  type="text"
71
72
  value={data.fileKey || ''}
72
73
  oninput={(event) => updateField('fileKey', event.currentTarget.value)}
@@ -88,20 +89,4 @@ function updateTags(value: string) {
88
89
  font-weight: var(--smrt-typography-weight-medium, 500);
89
90
  }
90
91
 
91
- input,
92
- textarea {
93
- width: 100%;
94
- box-sizing: border-box;
95
- border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 50%, transparent);
96
- border-radius: 0.5rem;
97
- background: var(--smrt-color-surface-container-low);
98
- color: var(--smrt-color-on-surface);
99
- font: inherit;
100
- padding: 0.75rem 0.875rem;
101
- }
102
-
103
- textarea {
104
- min-height: 7rem;
105
- resize: vertical;
106
- }
107
92
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentMetadataFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentMetadataFields.svelte.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAwDD,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
1
+ {"version":3,"file":"ContentMetadataFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentMetadataFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAyDD,QAAA,MAAM,qBAAqB,2CAAwC,CAAC;AACpE,KAAK,qBAAqB,GAAG,UAAU,CAAC,OAAO,qBAAqB,CAAC,CAAC;AACtE,eAAe,qBAAqB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Input } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { Button } from '@happyvertical/smrt-ui/ui';
4
5
  import type { Snippet } from 'svelte';
@@ -114,7 +115,7 @@ function removeReference(id: string) {
114
115
  {/if}
115
116
 
116
117
  <div class="reference-input-row">
117
- <input
118
+ <Input
118
119
  type="text"
119
120
  aria-label={t(M['content.content_references_panel.add_reference_by_id_or_url'])}
120
121
  placeholder={t(M['content.content_references_panel.reference_id_or_url_placeholder'])}
@@ -207,19 +208,14 @@ function removeReference(id: string) {
207
208
  gap: 0.65rem;
208
209
  }
209
210
 
210
- input,
211
211
  .content-references-panel :global(.reference-button) {
212
212
  min-height: 2.5rem;
213
213
  border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 50%, transparent);
214
214
  border-radius: 0.5rem;
215
- background: var(--smrt-color-surface-container-low);
215
+ background: var(--smrt-color-surface-container);
216
216
  color: var(--smrt-color-on-surface);
217
217
  font: inherit;
218
218
  padding: 0.55rem 0.875rem;
219
- }
220
-
221
- .content-references-panel :global(.reference-button) {
222
- background: var(--smrt-color-surface-container);
223
219
  cursor: pointer;
224
220
  font-weight: var(--smrt-typography-weight-semibold, 600);
225
221
  }
@@ -227,4 +223,12 @@ function removeReference(id: string) {
227
223
  .content-references-panel :global(.reference-button:hover) {
228
224
  background: var(--smrt-color-surface-container-high);
229
225
  }
226
+
227
+ /* Match the Input primitive's height/radius to the sibling reference-button so
228
+ the two grid columns of .reference-input-row align (the primitive's base
229
+ .input has no min-height). */
230
+ .content-references-panel :global(.input) {
231
+ min-height: 2.5rem;
232
+ border-radius: 0.5rem;
233
+ }
230
234
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentReferencesPanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReferencesPanel.svelte.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAuHD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ContentReferencesPanel.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentReferencesPanel.svelte.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAIrE,MAAM,WAAW,KAAK;IACpB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,sBAAsB,EAAE,CAAC;IACtC,oBAAoB,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxD;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAwHD,QAAA,MAAM,sBAAsB,2CAAwC,CAAC;AACrE,KAAK,sBAAsB,GAAG,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACxE,eAAe,sBAAsB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  <script lang="ts">
2
+ import { Input, Select } from '@happyvertical/smrt-ui/forms';
2
3
  import { useI18n } from '@happyvertical/smrt-ui/i18n';
3
4
  import { M } from '../i18n.editor.js';
4
5
 
@@ -19,33 +20,33 @@ function updateField(key: string, value: unknown) {
19
20
  <div class="content-status-fields">
20
21
  <label>
21
22
  <span>Type</span>
22
- <select value={data.type || 'article'} onchange={(event) => updateField('type', event.currentTarget.value)}>
23
+ <Select value={data.type || 'article'} onchange={(event) => updateField('type', event.currentTarget.value)}>
23
24
  <option value="article">Article</option>
24
25
  <option value="document">Document</option>
25
26
  <option value="mirror">Mirror</option>
26
27
  <option value="video-segment">{t(M['content.content_status_fields.video_segment'])}</option>
27
- </select>
28
+ </Select>
28
29
  </label>
29
30
  <label>
30
31
  <span>State</span>
31
- <select value={data.state || 'active'} onchange={(event) => updateField('state', event.currentTarget.value)}>
32
+ <Select value={data.state || 'active'} onchange={(event) => updateField('state', event.currentTarget.value)}>
32
33
  <option value="active">Active</option>
33
34
  <option value="highlighted">Highlighted</option>
34
35
  <option value="deprecated">Deprecated</option>
35
- </select>
36
+ </Select>
36
37
  </label>
37
38
  <label>
38
39
  <span>Status</span>
39
- <select value={data.status || 'draft'} onchange={(event) => updateField('status', event.currentTarget.value)}>
40
+ <Select value={data.status || 'draft'} onchange={(event) => updateField('status', event.currentTarget.value)}>
40
41
  <option value="draft">Draft</option>
41
42
  <option value="review">Review</option>
42
43
  <option value="published">Published</option>
43
44
  <option value="archived">Archived</option>
44
- </select>
45
+ </Select>
45
46
  </label>
46
47
  <label>
47
48
  <span>Published</span>
48
- <input
49
+ <Input
49
50
  type="datetime-local"
50
51
  value={data.publish_date || ''}
51
52
  onchange={(event) => updateField('publish_date', event.currentTarget.value)}
@@ -70,16 +71,4 @@ function updateField(key: string, value: unknown) {
70
71
  font-weight: var(--smrt-typography-weight-semibold, 600);
71
72
  }
72
73
 
73
- select,
74
- input {
75
- min-height: 2.5rem;
76
- border: 1px solid color-mix(in srgb, var(--smrt-color-outline) 50%, transparent);
77
- border-radius: 0.5rem;
78
- background: var(--smrt-color-surface-container-low);
79
- color: var(--smrt-color-on-surface);
80
- font: inherit;
81
- font-size: var(--smrt-typography-body-medium-size, 0.875rem);
82
- font-weight: var(--smrt-typography-weight-medium, 500);
83
- padding: 0.55rem 0.75rem;
84
- }
85
74
  </style>
@@ -1 +1 @@
1
- {"version":3,"file":"ContentStatusFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentStatusFields.svelte.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAoDD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"ContentStatusFields.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentStatusFields.svelte.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,KAAK;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC1B,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;CACtD;AAqDD,QAAA,MAAM,mBAAmB,2CAAwC,CAAC;AAClE,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAClE,eAAe,mBAAmB,CAAC"}
@@ -1,4 +1,6 @@
1
1
  <script lang="ts">
2
+ import { Input } from '@happyvertical/smrt-ui/forms';
3
+
2
4
  export interface Props {
3
5
  value?: string;
4
6
  placeholder?: string;
@@ -14,17 +16,19 @@ let {
14
16
  }: Props = $props();
15
17
  </script>
16
18
 
17
- <input
18
- class="content-title-field"
19
- type="text"
20
- {placeholder}
21
- {required}
22
- value={value || ''}
23
- oninput={(event) => onChange?.(event.currentTarget.value)}
24
- />
19
+ <div class="content-title-field-shell">
20
+ <Input
21
+ class="content-title-field"
22
+ type="text"
23
+ {placeholder}
24
+ {required}
25
+ value={value || ''}
26
+ oninput={(event) => onChange?.(event.currentTarget.value)}
27
+ />
28
+ </div>
25
29
 
26
30
  <style>
27
- .content-title-field {
31
+ .content-title-field-shell :global(.content-title-field) {
28
32
  width: 100%;
29
33
  box-sizing: border-box;
30
34
  border: 0;
@@ -39,15 +43,15 @@ let {
39
43
  padding: 0;
40
44
  }
41
45
 
42
- .content-title-field::placeholder {
46
+ .content-title-field-shell :global(.content-title-field)::placeholder {
43
47
  color: color-mix(in srgb, var(--smrt-color-on-surface-variant) 70%, transparent);
44
48
  }
45
49
 
46
- .content-title-field:focus {
50
+ .content-title-field-shell :global(.content-title-field):focus {
47
51
  outline: none;
48
52
  }
49
53
 
50
- .content-title-field:focus-visible {
54
+ .content-title-field-shell :global(.content-title-field):focus-visible {
51
55
  outline: 2px solid var(--smrt-color-primary, #005ac1);
52
56
  outline-offset: 0.35rem;
53
57
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ContentTitleField.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTitleField.svelte.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAkBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"ContentTitleField.svelte.d.ts","sourceRoot":"","sources":["../../../src/svelte/components/ContentTitleField.svelte.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,KAAK;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAqBD,QAAA,MAAM,iBAAiB,2CAAwC,CAAC;AAChE,KAAK,iBAAiB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,eAAe,iBAAiB,CAAC"}