@widgetic/editor 4.1.13 → 4.1.15

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 (89) hide show
  1. package/dist/components/PreviewChromeControls.svelte +15 -21
  2. package/dist/components/WidgetPreview.svelte +136 -105
  3. package/dist/components/color-select/ColorSelect.svelte +203 -224
  4. package/dist/components/color-select/constants.d.ts +4 -2
  5. package/dist/components/color-select/constants.js +4 -2
  6. package/dist/components/color-select/render.js +10 -9
  7. package/dist/components/editors/CompositionEditorApp.svelte +55 -40
  8. package/dist/components/editors/EditLeaseNotice.svelte +44 -33
  9. package/dist/components/editors/EmbedEditor.svelte +133 -259
  10. package/dist/components/editors/PropsEditor.svelte +426 -1333
  11. package/dist/components/editors/props-editor.css +5 -68
  12. package/dist/components/ic/AngleInputController.svelte +202 -277
  13. package/dist/components/ic/BrowserInputController.svelte +813 -803
  14. package/dist/components/ic/CheckboxInputController.svelte +92 -169
  15. package/dist/components/ic/CheckboxInputController.svelte.d.ts +2 -8
  16. package/dist/components/ic/ColorPickerInputController.svelte +1589 -1587
  17. package/dist/components/ic/ColorPickerInputController.svelte.d.ts +3 -3
  18. package/dist/components/ic/DateFieldInputController.svelte +455 -465
  19. package/dist/components/ic/DatePickerInputController.svelte +355 -368
  20. package/dist/components/ic/DatePickerInputController.svelte.d.ts +1 -1
  21. package/dist/components/ic/DropdownInputController.svelte +130 -200
  22. package/dist/components/ic/FixedPositionInputController.svelte +255 -276
  23. package/dist/components/ic/FixedPositionInputController.svelte.d.ts +5 -1
  24. package/dist/components/ic/FontInputController.svelte +2110 -2231
  25. package/dist/components/ic/FontInputController.svelte.d.ts +11 -11
  26. package/dist/components/ic/InputControllerHeader.svelte +141 -147
  27. package/dist/components/ic/InputControllerRenderer.svelte +5 -1
  28. package/dist/components/ic/InputControllerRenderer.svelte.d.ts +2 -1
  29. package/dist/components/ic/InputControllerRow.svelte +74 -0
  30. package/dist/components/ic/InputControllerRow.svelte.d.ts +14 -0
  31. package/dist/components/ic/KnowledgeDocumentsInputController.svelte +401 -0
  32. package/dist/components/ic/KnowledgeDocumentsInputController.svelte.d.ts +11 -0
  33. package/dist/components/ic/KnowledgeTextForm.svelte +109 -0
  34. package/dist/components/ic/KnowledgeTextForm.svelte.d.ts +15 -0
  35. package/dist/components/ic/NumberControls.svelte +303 -269
  36. package/dist/components/ic/NumberControls.svelte.d.ts +4 -1
  37. package/dist/components/ic/NumberInputController.svelte +361 -301
  38. package/dist/components/ic/NumberInputController.svelte.d.ts +2 -0
  39. package/dist/components/ic/PositionInputController.svelte +253 -176
  40. package/dist/components/ic/PositionInputController.svelte.d.ts +2 -0
  41. package/dist/components/ic/RadioGroupInputController.svelte +71 -137
  42. package/dist/components/ic/RadioGroupInputController.svelte.d.ts +2 -8
  43. package/dist/components/ic/RangeCalendarInputController.svelte +233 -270
  44. package/dist/components/ic/RangeCalendarInputController.svelte.d.ts +2 -2
  45. package/dist/components/ic/RoundedCornersInputController.svelte +412 -435
  46. package/dist/components/ic/RoundedCornersInputController.svelte.d.ts +2 -0
  47. package/dist/components/ic/SliderInputController.svelte +263 -332
  48. package/dist/components/ic/SliderInputController.svelte.d.ts +1 -1
  49. package/dist/components/ic/SliderRangeInputController.svelte +140 -144
  50. package/dist/components/ic/SliderRangeInputController.svelte.d.ts +3 -3
  51. package/dist/components/ic/SwitchInputController.svelte +47 -109
  52. package/dist/components/ic/TagsInputController.svelte +95 -110
  53. package/dist/components/ic/TextAreaInputController.svelte +1794 -1935
  54. package/dist/components/ic/TextAreaPreviewInputController.svelte +436 -438
  55. package/dist/components/ic/TextAreaPreviewInputController.svelte.d.ts +2 -2
  56. package/dist/components/ic/TextInputController.svelte +65 -75
  57. package/dist/components/ic/TextInputController.svelte.d.ts +2 -0
  58. package/dist/components/ic/TimeInputController.svelte +433 -431
  59. package/dist/components/ic/VectorInputController.svelte +1833 -1831
  60. package/dist/components/ic/VectorInputController.svelte.d.ts +10 -10
  61. package/dist/components/ic/index.d.ts +2 -0
  62. package/dist/components/ic/index.js +2 -0
  63. package/dist/components/ic/shared/CategoryTabs.svelte +28 -35
  64. package/dist/components/ic/shared/ItemGrid.svelte +145 -179
  65. package/dist/components/ic/shared/RecentItemsSection.svelte +208 -271
  66. package/dist/components/ic/shared/RecentItemsSection.svelte.d.ts +1 -1
  67. package/dist/components/ui/arrows/OpacitySliderArrows.svelte +23 -38
  68. package/dist/components/ui/arrows/OpacitySliderArrows.svelte.d.ts +1 -4
  69. package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte +45 -0
  70. package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte.d.ts +26 -0
  71. package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte +20 -12
  72. package/dist/components/ui/shadow-picker-host/ShadowPickerHost.svelte +39 -0
  73. package/dist/components/ui/shadow-picker-host/ShadowPickerHost.svelte.d.ts +10 -0
  74. package/dist/composition/compositionApi.d.ts +21 -1
  75. package/dist/composition/compositionApi.js +64 -5
  76. package/dist/composition/knowledgeDocuments.d.ts +90 -0
  77. package/dist/composition/knowledgeDocuments.js +94 -0
  78. package/dist/composition/knowledgeDocumentsPanel.d.ts +152 -0
  79. package/dist/composition/knowledgeDocumentsPanel.js +443 -0
  80. package/dist/i18n/language.d.ts +86 -36
  81. package/dist/i18n/messages.d.ts +97 -34
  82. package/dist/i18n/messages.js +104 -34
  83. package/dist/i18n/translate.d.ts +1 -1
  84. package/dist/index.d.ts +1 -0
  85. package/dist/knowledgeDocumentsContext.d.ts +10 -0
  86. package/dist/knowledgeDocumentsContext.js +31 -0
  87. package/dist/utils.d.ts +7 -0
  88. package/dist/utils.js +26 -2
  89. package/package.json +4 -4
@@ -30,7 +30,7 @@
30
30
  * COMPONENTS IMPORTS
31
31
  */
32
32
  // Shadcn Regular Components
33
- import { Button, Separator } from '@widgetic/design-system/components';
33
+ import { Button } from '@widgetic/design-system/components';
34
34
  // Shadcn namespaced(compound) components imports
35
35
  import { Tabs, Accordion, Card, Collapsible } from '@widgetic/design-system/components';
36
36
  // Import ScrollArea components
@@ -39,9 +39,13 @@
39
39
  /**
40
40
  * ICONS IMPORTS
41
41
  */
42
- import { ChevronDown, IconGripVertical } from '@widgetic/design-system/icons';
43
- import AddNew from '../icons/addnew.svelte';
44
- import DragHandle from '../icons/drag.svelte';
42
+ import {
43
+ IconChevronDown,
44
+ IconGripHorizontal,
45
+ IconGripVertical,
46
+ IconPlus
47
+ } from '@widgetic/design-system/icons';
48
+ import IconLoader2 from '@tabler/icons-svelte/icons/loader-2';
45
49
 
46
50
  // Input Controllers imports
47
51
  import {
@@ -63,11 +67,13 @@
63
67
  VectorInputController,
64
68
  AngleInputController,
65
69
  InputControllerHeader,
70
+ InputControllerRow,
66
71
  RadioGroupInputController,
67
72
  CheckboxInputController,
68
73
  TimeInputController,
69
74
  RoundedCornersInputController,
70
75
  TagsInputController,
76
+ KnowledgeDocumentsInputController,
71
77
  DateFieldInputController
72
78
  } from '../ic';
73
79
  import type { InputControllerConfig } from '../ic';
@@ -165,7 +171,7 @@
165
171
  /** Optional content below the shared toolbar, before property fields. */
166
172
  export let headerContent = undefined;
167
173
  export let headerClass = '';
168
- export let dragHandleClass = 'text-grey2';
174
+ export let dragHandleClass = '';
169
175
  export let title: string | undefined = undefined;
170
176
  /** Hide the default missing-schema message for header-only editors. */
171
177
  export let showSchemaError = true;
@@ -201,12 +207,10 @@
201
207
  * CONSTANTS
202
208
  */
203
209
  const CONTENT_PADDING = 16; // Outer padding for both tabs
204
- const CONTENT_INNER_PADDING = 16; // Inner padding for cards in Content tab
205
- const DRAG_BAR_HEIGHT = 28; // Drag handle / Save row (absolute, overlays the header top)
206
- const TABS_VERTICAL_PADDING = 14; // Breathing room above and below the tab list
207
- const TABS_LIST_HEIGHT = 56; // Tabs.List height
208
- // Drag bar band + gap + tabs + gap + 1px separator
209
- const HEADER_HEIGHT = DRAG_BAR_HEIGHT + TABS_VERTICAL_PADDING * 2 + TABS_LIST_HEIGHT + 1;
210
+ const DRAG_BAR_HEIGHT = 24; // Drag handle row: 8 of top padding + the 16px grip (Figma Panel Header, the Save variant is 40 high)
211
+ const TABS_HEADER_HEIGHT = 56; // 4 under the handle + the 36px tab list + 16 above the content (Figma Panel Header and panel gap)
212
+ // What the header (handle row + tabs) takes above the scrolling content
213
+ const HEADER_HEIGHT = DRAG_BAR_HEIGHT + TABS_HEADER_HEIGHT;
210
214
  const EDITOR_STROKE_COLOR = '#e5e7eb'; // Color for editor stroke
211
215
  const EDITOR_STROKE_WIDTH = '1px'; // Thickness of editor stroke
212
216
 
@@ -1094,6 +1098,7 @@
1094
1098
  case 'time': return TimeInputController;
1095
1099
  case 'roundedcorners': return RoundedCornersInputController;
1096
1100
  case 'tags': return TagsInputController;
1101
+ case 'knowledgedocuments': return KnowledgeDocumentsInputController;
1097
1102
  default: return TextInputController;
1098
1103
  }
1099
1104
  }
@@ -1172,7 +1177,8 @@
1172
1177
  value: props.value, onChange: props.onChange, onFocus: props.onFocus,
1173
1178
  maskThumb: props.maskThumb, onDragStateChange: props.onDragStateChange } };
1174
1179
  case BrowserInputController: return { kind: 'browser', props: {
1175
- header: props.header, label: props.label, value: props.value,
1180
+ // Label lives on InputControllerRow in the panel; do not pass header into the control.
1181
+ label: props.label, value: props.value,
1176
1182
  onChange: props.onChange, portalTarget: props.portalTarget, config: props.config } };
1177
1183
  case FixedPositionInputController: return { kind: 'fixedposition', props: {
1178
1184
  value: props.value, onChange: props.onChange, onFocus: props.onFocus, id: props.id } };
@@ -1194,12 +1200,22 @@
1194
1200
  case TagsInputController: return { kind: 'tags', props: {
1195
1201
  label: props.label, value: props.value, onChange: props.onChange, config: props.config,
1196
1202
  helpText: props.helpText, onFocus: props.onFocus } };
1203
+ // The documents of AI Answers hold no value of the widget: the panel takes nothing but the focus hook.
1204
+ case KnowledgeDocumentsInputController: return { kind: 'knowledgedocuments', props: {
1205
+ onFocus: props.onFocus } };
1197
1206
  default: return null;
1198
1207
  }
1199
1208
  }
1200
1209
 
1201
1210
  // Create a store for managing open dropdowns (only one should be open at a time)
1202
1211
  const openDropdowns = writable<Set<string>>(new Set());
1212
+
1213
+ /**
1214
+ * The state a row reports to the styles through data-state: a row whose dropdown is open is lifted above the rows
1215
+ * under it. Computed here (not in the markup) because it is a state name, not a word a person reads.
1216
+ */
1217
+ const rowDataStateOf = (controllerId: string): 'open' | 'closed' =>
1218
+ $openDropdowns?.has(controllerId) ? 'open' : 'closed';
1203
1219
 
1204
1220
  /**
1205
1221
  * Closes all open dropdowns and color pickers
@@ -2036,54 +2052,51 @@
2036
2052
 
2037
2053
  <div
2038
2054
  bind:this={rootElement}
2039
- class="{className ? className + ' ' : ''}props-editor-container relative widgetic-colors widgetic-radius overflow-hidden"
2040
- style="
2041
- width: {width};
2042
- height: {height};
2043
- border: 1px solid hsl(var(--grey2));
2044
- {style ? ' ' + style : ''}
2045
- ">
2055
+ class="{className ? className + ' ' : ''}props-editor-container relative flex flex-col overflow-hidden rounded-card bg-background text-foreground shadow-floating ring-1 ring-inset ring-border"
2056
+ style="width: {width}; height: {height};{style ? ' ' + style : ''}"
2057
+ >
2046
2058
  <Tabs.Root
2047
2059
  value={getActiveTab()}
2048
- class="tabs-container relative w-full h-full flex flex-col z-10 bg-white rounded-large"
2060
+ class="tabs-container relative z-10 flex h-full w-full flex-col"
2049
2061
  onValueChange={handleTabChange}
2050
2062
  >
2051
2063
 
2052
2064
  <!-- A single toolbar owns drag and Save for all editor variants. -->
2053
2065
  {#if showDragHandle && (designSchema || contentSchema || headerContent)}
2054
2066
  <!-- svelte-ignore a11y_no_static_element_interactions -->
2055
- <div class="props-editor-drag-bar top-0 start-0 w-full flex h-7 shrink-0 items-center justify-center z-999 px-3 {headerContent ? 'relative ' + headerClass : 'absolute'}">
2067
+ <!-- Figma handle row: 8 of top padding, then the grip row (16 high, 32 high with the Save control so the grip lines up with its centre); Save sits absolute end-6 top-2. -->
2068
+ <div class="props-editor-drag-bar relative z-999 flex w-full shrink-0 items-start justify-center px-6 pt-2 {showSaveButton ? 'h-10' : 'h-6'} {headerContent ? headerClass : ''}">
2056
2069
  <!-- svelte-ignore a11y_no_static_element_interactions -->
2057
- <div
2058
- class="flex items-center justify-center h-7 cursor-move transition-all duration-200 widgetic-colors opacity-0 hover:opacity-100 drag-handle-container"
2070
+ <div
2071
+ class="drag-handle-container flex cursor-move items-center justify-center opacity-100 duration-fast transition-opacity {showSaveButton ? 'h-8' : 'h-4'}"
2059
2072
  onmousedown={handleDragStart}
2060
2073
  >
2061
- <DragHandle class="w-16.5 h-6 {dragHandleClass} hover:text-grey3 transition-colors" />
2074
+ <IconGripHorizontal class="size-4 stroke-[1.333] text-muted-foreground {dragHandleClass}" />
2062
2075
  </div>
2063
2076
  {#if showSaveButton}
2064
- {#if titleLabel}<span class="props-editor-title-label absolute start-6 top-1.75 pointer-events-none select-none text-[13px] font-bold leading-none text-[hsl(var(--grey5))]">{titleLabel}</span>{/if}
2065
- <button
2077
+ {#if titleLabel}
2078
+ <!-- The Figma handle row shows no title: the label stays for screen readers only. -->
2079
+ <span class="props-editor-title-label sr-only">{titleLabel}</span>
2080
+ {/if}
2081
+ <!-- Clean: faded primary look via opacity, not disabled (focus ring unchanged); only saveSaving uses disabled. -->
2082
+ <Button
2066
2083
  type="button"
2067
- class="props-editor-save-btn absolute end-6 top-1 inline-flex h-5 w-19 items-center justify-center rounded-md text-[10px] font-semibold leading-none transition-colors focus:outline-none focus-visible:outline-none
2068
- {saveSaving
2069
- ? 'text-[hsl(var(--deep-forest-green))] bg-[hsl(var(--light-green))]'
2070
- : saveDirty
2071
- ? 'text-white bg-[hsl(var(--deep-forest-green))] hover:bg-[hsl(var(--dark))] hover:text-white'
2072
- : 'text-[hsl(var(--grey5))] bg-grey2 inset-ring inset-ring-grey3/20 hover:inset-ring-deep-forest-green hover:bg-[hsl(var(--deep-forest-green))] hover:text-white'}"
2084
+ variant="default"
2085
+ size="sm"
2086
+ class="props-editor-save-btn absolute end-6 top-2 {!saveDirty && !saveSaving ? 'opacity-50' : ''}"
2073
2087
  disabled={saveSaving}
2088
+ aria-disabled={!saveDirty && !saveSaving ? true : undefined}
2074
2089
  onclick={(e) => {
2075
2090
  e.stopPropagation();
2076
2091
  if (!saveSaving && saveDirty) dispatch('save');
2077
2092
  }}
2078
2093
  onmousedown={(e) => e.stopPropagation()}
2079
2094
  >
2080
- <svg class="props-editor-save-icon absolute start-2 h-3 w-3 shrink-0" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
2081
- <path d="M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z" />
2082
- <polyline points="17 21 17 13 7 13 7 21" />
2083
- <polyline points="7 3 7 8 15 8" />
2084
- </svg>
2085
- <span class="props-editor-save-label">{saveSaving ? $t('editor.props.saving') : $t('editor.props.save')}</span>
2086
- </button>
2095
+ {#if saveSaving}
2096
+ <IconLoader2 class="size-4 animate-spin stroke-[1.333]" aria-hidden="true" />
2097
+ {/if}
2098
+ {saveSaving ? $t('editor.props.saving') : $t('editor.props.save')}
2099
+ </Button>
2087
2100
  {/if}
2088
2101
  </div>
2089
2102
  {/if}
@@ -2094,44 +2107,32 @@
2094
2107
 
2095
2108
  {#if !designSchema && !contentSchema}
2096
2109
  {#if showSchemaError}
2097
- <div class="props-editor-schema-error flex flex-col items-center justify-center h-full">
2098
- <div class="props-editor-error-title text-error text-lg font-medium">{$t('editor.props.noConfiguration')}</div>
2099
- <div class="props-editor-error-code text-grey5 subtext mt-1">{$t('editor.failure.errorCode', { code: 'CONFIG_NOT_FOUND' })}</div>
2110
+ <div class="props-editor-schema-error flex h-full flex-col items-center justify-center p-6">
2111
+ <div class="props-editor-error-title text-body-large text-destructive">{$t('editor.props.noConfiguration')}</div>
2112
+ <div class="props-editor-error-code text-caption text-muted-foreground mt-2">{$t('editor.failure.errorCode', { code: 'CONFIG_NOT_FOUND' })}</div>
2100
2113
  </div>
2101
2114
  {/if}
2102
2115
  {:else}
2103
2116
  <!-- Tabs header with buttons and separator - only show if both schemas exist -->
2104
2117
  {#if designSchema && contentSchema}
2105
- <div
2106
- class="tabs-header h-28 shrink-0 flex items-start pt-10.5 px-6 pb-3.5 rounded-t-large header-hover-area relative"
2118
+ <div
2119
+ class="tabs-header h-14 shrink-0 flex items-start pt-1 px-6 pb-4 header-hover-area relative w-full flex-col gap-1"
2107
2120
  >
2108
- <Tabs.List
2109
- class="tabs-list w-full h-14 rounded-large bg-grey2 p-1"
2110
- >
2111
- <Tabs.Trigger
2112
- value="design"
2113
- class="flex-1 h-full rounded-[11px] transition-colors duration-250 text-grey5 hover:text-grey7 hover:underline data-[state=active]:bg-white data-[state=active]:text-grey7 data-[state=active]:hover:text-grey7"
2114
- >
2115
- <span class="body">{designTabTitle ?? $t('editor.props.designTab')}</span>
2121
+ <Tabs.List class="tabs-list w-full">
2122
+ <Tabs.Trigger value="design" class="flex-1">
2123
+ {designTabTitle ?? $t('editor.props.designTab')}
2116
2124
  </Tabs.Trigger>
2117
2125
  {#if contentSchema}
2118
- <Tabs.Trigger
2119
- value="content"
2120
- class="flex-1 h-full rounded-[11px] transition-colors duration-250 text-grey5 hover:text-grey7 hover:underline data-[state=active]:bg-white data-[state=active]:text-grey7 data-[state=active]:hover:text-grey7"
2121
- >
2122
- <span class="body">{contentTabTitle ?? $t('editor.props.contentTab')}</span>
2126
+ <Tabs.Trigger value="content" class="flex-1">
2127
+ {contentTabTitle ?? $t('editor.props.contentTab')}
2123
2128
  </Tabs.Trigger>
2124
2129
  {/if}
2125
2130
  </Tabs.List>
2126
2131
  </div>
2127
-
2128
- <Separator
2129
- class="bg-grey2"
2130
- />
2131
2132
  {/if}
2132
2133
 
2133
2134
  <!-- Design Tab Content -->
2134
- <div class="tab-design-container grow scroll-area widgetic-colors hidden {headerContent ? 'min-h-0 flex-1 overflow-hidden' : 'overflow-y-auto'}"
2135
+ <div class="tab-design-container grow scroll-area hidden {headerContent ? 'min-h-0 flex-1 overflow-hidden' : 'overflow-y-auto'}"
2135
2136
  class:hidden={currentTab !== 'design'}
2136
2137
  style="max-height: {!designSchema || !contentSchema ? '100%' : `calc(100% - ${HEADER_HEIGHT}px)`}"
2137
2138
  data-scrollable={$designScrollState.shouldShowScroll}
@@ -2140,10 +2141,10 @@
2140
2141
  class="h-full"
2141
2142
  type="hover"
2142
2143
  scrollHideDelay={0}
2143
- scrollbarYClasses="flex touch-none select-none transition-colors w-6 px-2 {headerContent ? 'bg-transparent' : 'bg-white'} {!designSchema || !contentSchema ? 'pt-7' : 'pt-4'} pb-6 [&>div]:w-2 [&>div]:bg-grey1 [&>div]:rounded-pill [&>div]:cursor-pointer [&>div]:transition-colors [&>div]:duration-250 [&>div]:hover:bg-grey2"
2144
+ scrollbarYClasses="flex w-6 touch-none select-none px-2 pb-6 transition-colors duration-fast {headerContent ? 'bg-transparent' : 'bg-background'} {!designSchema || !contentSchema ? 'pt-6' : 'pt-0'} [&>div]:w-2 [&>div]:cursor-pointer [&>div]:rounded-full [&>div]:bg-border [&>div]:duration-fast [&>div]:hover:bg-muted-foreground/30"
2144
2145
  >
2145
2146
  <div class="scroll-viewport" data-radix-scroll-area-viewport bind:this={designScrollViewport}>
2146
- <div class="px-6 {!designSchema || !contentSchema ? 'pt-7 pb-6' : 'pt-4 pb-6'}" bind:this={designContentWrapper}>
2147
+ <div class="px-6 pb-6 {!designSchema || !contentSchema ? 'pt-6' : 'pt-0'}" bind:this={designContentWrapper}>
2147
2148
  <Tabs.Content
2148
2149
  value="design"
2149
2150
  class="design-tab-content mt-0! tabs-content-container w-full outline-none {isFirstLoad ? 'initial-load' : !isInitialTabLoad ? 'animate-slide-left' : ''}"
@@ -2155,7 +2156,7 @@
2155
2156
  value={currentTab === 'design' ? designOpenAccordion : contentOpenAccordion}
2156
2157
  onValueChange={handleAccordionChange}
2157
2158
  type="multiple"
2158
- class="design-tab-accordion tab-accordion-root w-full"
2159
+ class="design-tab-accordion tab-accordion-root flex w-full flex-col gap-2"
2159
2160
  style="position: relative; z-index: 1;"
2160
2161
  >
2161
2162
  {#each designSchema[0].components as component}
@@ -2169,12 +2170,13 @@
2169
2170
  data-accordion-id={propertyGroup.name}
2170
2171
  data-position={getAccordionItemPosition(component, propertyGroup, groupIndex)}
2171
2172
  >
2172
- <Accordion.Trigger class="accordion-trigger flex items-center justify-between w-full px-4 py-4">
2173
- <span class="body-medium" style="color: hsl(var(--grey7));">{propertyGroup.name}</span>
2173
+ <Accordion.Trigger class="accordion-trigger">
2174
+ <span class="text-body-medium text-foreground">{propertyGroup.name}</span>
2174
2175
  </Accordion.Trigger>
2175
2176
 
2176
- <Accordion.Content class="accordion-content w-full p-0 px-4">
2177
- <div class="properties-list flex flex-col" style="gap: 8px;">
2177
+ <!-- The DS body pads 4 / 16 / 16 / 16 (Figma Accordion Item). Every row carries 6 above and below its 36px control (48 pitch), so the list pulls 6 back at both ends and the padding lands on the controls. -->
2178
+ <Accordion.Content class="accordion-content w-full min-w-0" data-accordion-content>
2179
+ <div class="properties-list -my-1.5 flex w-full flex-col">
2178
2180
  {#each propertyGroup.properties as property, propertyIndex (propertyGroup.name + '_' + (property.id ?? property.name ?? propertyIndex))}
2179
2181
  {@const result = renderInputController('design', property, propertyIndex, groupIndex === 0)}
2180
2182
  {@const InputComponent = result.component}
@@ -2186,34 +2188,37 @@
2186
2188
 
2187
2189
  {#if isVisible}
2188
2190
  {@const isFontIc = property.inputController.type.toLowerCase() === 'font'}
2189
- <div
2190
- class="ictrl input-controller flex {isFontIc ? 'font-ic-host flex-col items-stretch' : 'items-center justify-between'} w-full p-0"
2191
- data-state={$openDropdowns?.has(props.controllerId) ? 'open' : 'closed'}
2192
- class:double-height={isFontIc}
2193
- class:position-height={property.inputController.type.toLowerCase() === 'position'}
2194
- class:fixed-position-height={property.inputController.type.toLowerCase() === 'fixedposition'}
2195
- class:text-area-preview-height={property.inputController.type.toLowerCase() === 'textarea' || property.inputController.type.toLowerCase() === 'textArea'}
2196
- class:position-controller={property.inputController.type.toLowerCase() === 'position'}
2197
- class:position-dragging={property.inputController.type.toLowerCase() === 'position' && isDragging}
2198
- >
2199
- {#if !isFontIc}
2200
- <div class="ic-header-ct flex-1 min-w-0">
2201
- <InputControllerHeader
2202
- label={header.label}
2203
- helpText={header.helpText}
2204
- />
2191
+ {@const isPositionIc = property.inputController.type.toLowerCase() === 'position'}
2192
+ {@const rowDataState = rowDataStateOf(props.controllerId)}
2193
+ {#if isFontIc}
2194
+ <div
2195
+ class="ictrl input-controller font-ic-host flex w-full flex-col items-stretch p-0"
2196
+ data-state={rowDataState}
2197
+ >
2198
+ <div class="ic-input-ct w-full">
2199
+ <InputControllerRenderer
2200
+ controller={describeInputController(InputComponent, {
2201
+ ...props,
2202
+ value: reactiveValue !== undefined ? reactiveValue : props.value
2203
+ })}
2204
+ />
2205
+ </div>
2205
2206
  </div>
2206
- {/if}
2207
-
2208
- <div class="ic-input-ct {isFontIc ? 'w-full' : 'shrink-0 ms-auto'}" style={isFontIc ? '' : 'width: 185px;'}>
2207
+ {:else}
2208
+ <InputControllerRow
2209
+ class="ictrl input-controller p-0 {isPositionIc ? 'position-controller' : ''} {isPositionIc && isDragging ? 'position-dragging' : ''}"
2210
+ dataState={rowDataState}
2211
+ label={header.label}
2212
+ helpText={header.helpText}
2213
+ >
2209
2214
  <InputControllerRenderer
2210
2215
  controller={describeInputController(InputComponent, {
2211
2216
  ...props,
2212
2217
  value: reactiveValue !== undefined ? reactiveValue : props.value
2213
2218
  })}
2214
2219
  />
2215
- </div>
2216
- </div>
2220
+ </InputControllerRow>
2221
+ {/if}
2217
2222
  {/if}
2218
2223
  {/each}
2219
2224
  </div>
@@ -2223,7 +2228,7 @@
2223
2228
  {/each}
2224
2229
  </Accordion.Root>
2225
2230
  {:else}
2226
- <div class="p-4 text-gray-500">
2231
+ <div class="p-4 text-body text-muted-foreground">
2227
2232
  {#if !designSchema}
2228
2233
  {$t('editor.props.noDesignSchema')}
2229
2234
  {:else if !designSchema[0]}
@@ -2243,7 +2248,7 @@
2243
2248
 
2244
2249
  <!-- Content Tab Content -->
2245
2250
  {#if contentSchema}
2246
- <div class="tab-content-container grow overflow-y-auto scroll-area widgetic-colors hidden"
2251
+ <div class="tab-content-container scroll-area hidden grow overflow-y-auto"
2247
2252
  class:hidden={currentTab !== 'content'}
2248
2253
  style="max-height: {!contentSchema || !designSchema ? '100%' : `calc(100% - ${HEADER_HEIGHT}px)`}"
2249
2254
  data-scrollable={$contentScrollState.shouldShowScroll}
@@ -2252,40 +2257,38 @@
2252
2257
  class="h-full"
2253
2258
  type="hover"
2254
2259
  scrollHideDelay={0}
2255
- scrollbarYClasses="flex touch-none select-none transition-colors w-6 px-2 {headerContent ? 'bg-transparent' : 'bg-white'} {!designSchema || !contentSchema ? 'pt-7' : 'pt-4'} pb-6 [&>div]:w-2 [&>div]:bg-grey1 [&>div]:rounded-pill [&>div]:cursor-pointer [&>div]:transition-colors [&>div]:duration-250 [&>div]:hover:bg-grey2"
2260
+ scrollbarYClasses="flex w-6 touch-none select-none px-2 pb-6 transition-colors duration-fast {headerContent ? 'bg-transparent' : 'bg-background'} {!designSchema || !contentSchema ? 'pt-6' : 'pt-0'} [&>div]:w-2 [&>div]:cursor-pointer [&>div]:rounded-full [&>div]:bg-border [&>div]:duration-fast [&>div]:hover:bg-muted-foreground/30"
2256
2261
  >
2257
2262
  <div class="scroll-viewport" data-radix-scroll-area-viewport bind:this={contentScrollViewport}>
2258
- <div class="px-6 {!designSchema || !contentSchema ? 'pt-7 pb-6' : 'pt-4 pb-6'}" bind:this={contentWrapper}>
2263
+ <div class="px-6 pb-6 {!designSchema || !contentSchema ? 'pt-6' : 'pt-0'}" bind:this={contentWrapper}>
2259
2264
  <Tabs.Content
2260
2265
  value="content"
2261
2266
  class="content-tab-content mt-0! tabs-content-container w-full {isFirstLoad ? 'initial-load' : !isInitialTabLoad ? 'animate-slide-right' : ''}"
2262
2267
  data-tab="content"
2263
2268
  style="transform: none; position: relative; z-index: 1;"
2264
2269
  >
2265
- <div class="tab-content-root w-full" style="position: relative; z-index: 1;">
2270
+ <!-- Content tab body text: Card defaults to text-card-foreground (16px); force Body 14/20 on controls. -->
2271
+ <div class="tab-content-root w-full text-body" style="position: relative; z-index: 1;">
2266
2272
  <!-- Generic Content Collapsible Card -->
2267
2273
  {#if shouldShowGenericContentSection(contentSchema)}
2268
- <Card.Root class="generic-content-card relative mt-0" style="position: relative; z-index: 1;">
2274
+ <Card.Root class="generic-content-card relative mt-0 overflow-hidden rounded-xl border-0 bg-popover text-body shadow-none ring-1 ring-inset ring-border" style="position: relative; z-index: 1;">
2269
2275
  <Collapsible.Root
2270
2276
  open={isGenericContentOpen}
2271
2277
  onOpenChange={() => isGenericContentOpen = !isGenericContentOpen}
2272
2278
  >
2273
- <Collapsible.Trigger class="generic-content-trigger w-full">
2274
- <div class="flex items-center h-13" style="padding-inline-start: {CONTENT_INNER_PADDING}px; padding-inline-end: {CONTENT_INNER_PADDING}px;">
2275
- <h3 class="body-medium text-grey7 flex-1 content-title">{contentSchema?.genericContent?.title || $t('editor.props.contentCard')}</h3>
2276
- <ChevronDown class="h-6 w-6 text-grey5 transition-transform chevron" />
2279
+ <Collapsible.Trigger class="generic-content-trigger w-full focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">
2280
+ <div class="flex h-12 cursor-pointer items-center gap-2 px-4 hover:bg-accent duration-fast transition-colors">
2281
+ <h3 class="text-body-medium text-foreground flex-1 text-start content-title">{contentSchema?.genericContent?.title || $t('editor.props.contentCard')}</h3>
2282
+ <IconChevronDown class="chevron size-4 shrink-0 stroke-[1.333] text-muted-foreground transition-transform duration-base {isGenericContentOpen ? 'rotate-180' : ''}" />
2277
2283
  </div>
2278
2284
  </Collapsible.Trigger>
2279
2285
 
2280
- {#if isGenericContentOpen}
2281
- <Separator class="separator border-grey2" />
2282
- {/if}
2283
-
2284
2286
  <Collapsible.Content>
2285
2287
  {#if isGenericContentOpen}
2286
2288
  <Card.Content class="p-0 px-4">
2287
- <div class="pt-3.5 pb-4">
2288
- <div class="properties-list flex flex-col" style="gap: 8px;">
2289
+ <!-- Figma Content Card body: 4 / 16 / 16 / 16; every row carries 6 above and below its 36px control (48 pitch), so the list pulls 6 back at both ends. -->
2290
+ <div class="pt-1 pb-4">
2291
+ <div class="properties-list -my-1.5 flex w-full flex-col">
2289
2292
  {#each contentSchema?.genericContent?.properties || [] as property, propertyIndex}
2290
2293
  {@const result = renderInputController(
2291
2294
  'content',
@@ -2300,29 +2303,38 @@
2300
2303
 
2301
2304
  {#if isVisible}
2302
2305
  {@const isFontIc = property.inputController.type.toLowerCase() === 'font'}
2303
- <div class="ictrl input-controller flex {isFontIc ? 'font-ic-host flex-col items-stretch' : 'items-center justify-between'} w-full p-0 browser-input-wrapper"
2304
- class:double-height={isFontIc}
2305
- >
2306
- {#if !isFontIc && InputComponent !== BrowserInputController}
2307
- <InputControllerHeader
2308
- label={header.label}
2309
- helpText={header.helpText}
2310
- />
2311
- {:else if !isFontIc}
2312
- <div class="flex-1 min-w-0 pe-4">
2313
- <InputControllerHeader
2314
- label={header.label}
2315
- helpText={header.helpText}
2306
+ <!-- A panel (the documents of AI Answers) is a list and a form: it gets the whole width under its header. -->
2307
+ {@const isPanelIc = property.inputController.type.toLowerCase() === 'knowledgedocuments'}
2308
+ {#if isFontIc}
2309
+ <div class="ictrl input-controller font-ic-host flex w-full flex-col items-stretch p-0">
2310
+ <div class="ic-input-ct w-full">
2311
+ <InputControllerRenderer
2312
+ controller={describeInputController(InputComponent, props)}
2316
2313
  />
2317
2314
  </div>
2318
- {/if}
2319
-
2320
- <div class="ic-input-ct {isFontIc ? 'w-full' : 'shrink-0'}" style={isFontIc ? '' : 'width: 185px;'}>
2315
+ </div>
2316
+ {:else if isPanelIc}
2317
+ <div class="ictrl input-controller panel-ic-host flex w-full flex-col items-stretch gap-1 px-0 py-1.5">
2318
+ <div class="ic-header-ct w-full">
2319
+ <InputControllerHeader class="h-9" label={header.label} helpText={header.helpText} />
2320
+ </div>
2321
+ <div class="ic-input-ct w-full">
2322
+ <InputControllerRenderer
2323
+ controller={describeInputController(InputComponent, props)}
2324
+ />
2325
+ </div>
2326
+ </div>
2327
+ {:else}
2328
+ <InputControllerRow
2329
+ class="ictrl input-controller p-0"
2330
+ label={header.label}
2331
+ helpText={header.helpText}
2332
+ >
2321
2333
  <InputControllerRenderer
2322
- controller={describeInputController(InputComponent, { ...props, header })}
2334
+ controller={describeInputController(InputComponent, props)}
2323
2335
  />
2324
- </div>
2325
- </div>
2336
+ </InputControllerRow>
2337
+ {/if}
2326
2338
  {/if}
2327
2339
  {/each}
2328
2340
  </div>
@@ -2335,9 +2347,9 @@
2335
2347
  {/if}
2336
2348
 
2337
2349
  <!-- Content Items Container -->
2338
- <div class="content-items-wrapper mt-0" style="position: relative; z-index: 1;">
2350
+ <div class="content-items-wrapper {shouldShowGenericContentSection(contentSchema) ? 'mt-2' : 'mt-0'}" style="position: relative; z-index: 1;">
2339
2351
  <!-- Sortable Container -->
2340
- <div class="content-items flex flex-col gap-4" bind:this={contentItemsContainer} use:reorderableList={contentItemsReorderOptions} style="position: relative; z-index: 1;">
2352
+ <div class="content-items flex flex-col gap-2" bind:this={contentItemsContainer} use:reorderableList={contentItemsReorderOptions} style="position: relative; z-index: 1;">
2341
2353
  {@html (() => {
2342
2354
  const items = contentSchema?.contentItems;
2343
2355
  if (!Array.isArray(items)) return '';
@@ -2351,38 +2363,34 @@
2351
2363
  {#each (Array.isArray(contentSchema?.contentItems) ? contentSchema.contentItems : []) as item, index (item.id)}
2352
2364
  <!-- Content Item Collapsible Card -->
2353
2365
  <div class="content-item" data-id={item.id}>
2354
- <Card.Root class="content-item-card relative">
2366
+ <Card.Root class="content-item-card relative overflow-hidden rounded-xl border-0 bg-popover text-body shadow-none ring-1 ring-inset ring-border transition-shadow duration-fast data-[dragging=true]:ring-1 data-[dragging=true]:ring-brand">
2355
2367
  <Collapsible.Root
2356
2368
  open={isItemOpen(item.id)}
2357
2369
  onOpenChange={() => toggleItem(item.id)}
2358
2370
  >
2359
- <Collapsible.Trigger class="content-item-trigger w-full">
2360
- <div class="flex items-center h-13 cursor-pointer widgetic-colors">
2361
- <div class="drag-handle flex items-center justify-center w-14 cursor-move hover:text-grey5">
2362
- <IconGripVertical class="w-6 h-6 text-grey2 transition-colors duration-200" />
2371
+ <Collapsible.Trigger class="content-item-trigger w-full focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background">
2372
+ <div class="flex h-12 cursor-pointer items-center hover:bg-accent duration-fast transition-colors">
2373
+ <!-- 32 wide, grip centred: the 16px icon sits 8 from the start and the title begins at 32 (Figma Card Header). -->
2374
+ <div class="drag-handle flex w-8 shrink-0 cursor-move items-center justify-center touch-none">
2375
+ <IconGripVertical class="size-4 stroke-[1.333] text-muted-foreground duration-fast transition-colors" />
2363
2376
  </div>
2364
2377
 
2365
2378
  <!-- Item Title — user caption/title wins; Slide N / Item 0N follow list position -->
2366
- <h4 class="body-medium text-grey7 flex-1 content-title">
2379
+ <h4 class="text-body-medium text-foreground content-title me-2 min-w-0 flex-1 text-start">
2367
2380
  {getDisplayItemTitle(item, index)}
2368
2381
  </h4>
2369
2382
 
2370
- <!-- Arrow Icon -->
2371
2383
  <div class="pe-4">
2372
- <ChevronDown class="h-6 w-6 text-grey7 transition-transform chevron" />
2384
+ <IconChevronDown class="chevron size-4 shrink-0 stroke-[1.333] text-muted-foreground transition-transform duration-base {isItemOpen(item.id) ? 'rotate-180' : ''}" />
2373
2385
  </div>
2374
2386
  </div>
2375
2387
  </Collapsible.Trigger>
2376
2388
 
2377
- {#if isItemOpen(item.id)}
2378
- <Separator class="separator border-grey2" />
2379
- {/if}
2380
-
2381
2389
  <Collapsible.Content>
2382
2390
  {#if isItemOpen(item.id)}
2383
2391
  <Card.Content class="p-0 px-4">
2384
- <div class="pt-3.5 pb-4">
2385
- <div class="properties-list flex flex-col" style="gap: 8px;">
2392
+ <div class="pt-1 pb-4">
2393
+ <div class="properties-list -my-1.5 flex w-full flex-col">
2386
2394
  {#each item.properties as property, propertyIndex}
2387
2395
  {@const result = renderInputController(
2388
2396
  'content',
@@ -2398,61 +2406,54 @@
2398
2406
 
2399
2407
  {#if isVisible && InputComponent}
2400
2408
  {@const isFontIc = (property.inputController?.type || '').toLowerCase() === 'font'}
2401
- <div class="ictrl input-controller flex {isFontIc ? 'font-ic-host flex-col items-stretch' : 'items-center justify-between'} w-full p-0 browser-input-wrapper"
2402
- class:double-height={isFontIc}
2403
- >
2404
- {#if !isFontIc && InputComponent !== BrowserInputController}
2405
- <InputControllerHeader
2406
- label={header.label}
2407
- helpText={header.helpText}
2408
- />
2409
- {:else if !isFontIc}
2410
- <div class="flex-1 min-w-0 pe-4">
2411
- <InputControllerHeader
2412
- label={header.label}
2413
- helpText={header.helpText}
2409
+ {@const isPanelIc = (property.inputController?.type || '').toLowerCase() === 'knowledgedocuments'}
2410
+ {#if isFontIc}
2411
+ <div class="ictrl input-controller font-ic-host flex w-full flex-col items-stretch p-0">
2412
+ <div class="ic-input-ct w-full">
2413
+ <InputControllerRenderer
2414
+ controller={describeInputController(InputComponent, props)}
2414
2415
  />
2415
2416
  </div>
2416
- {/if}
2417
-
2418
- <div class="ic-input-ct {isFontIc ? 'w-full' : 'shrink-0'}" style={isFontIc ? '' : 'width: 185px;'}>
2417
+ </div>
2418
+ {:else if isPanelIc}
2419
+ <div class="ictrl input-controller panel-ic-host flex w-full flex-col items-stretch gap-1 px-0 py-1.5">
2420
+ <div class="ic-header-ct w-full">
2421
+ <InputControllerHeader class="h-9" label={header.label} helpText={header.helpText} />
2422
+ </div>
2423
+ <div class="ic-input-ct w-full">
2424
+ <InputControllerRenderer
2425
+ controller={describeInputController(InputComponent, props)}
2426
+ />
2427
+ </div>
2428
+ </div>
2429
+ {:else}
2430
+ <InputControllerRow
2431
+ class="ictrl input-controller p-0"
2432
+ label={header.label}
2433
+ helpText={header.helpText}
2434
+ >
2419
2435
  <InputControllerRenderer
2420
- controller={describeInputController(InputComponent, { ...props, header })}
2436
+ controller={describeInputController(InputComponent, props)}
2421
2437
  />
2422
- </div>
2423
- </div>
2438
+ </InputControllerRow>
2439
+ {/if}
2424
2440
  {/if}
2425
2441
  {/each}
2426
2442
  </div>
2427
2443
 
2428
2444
  <!-- Delete Item Button -->
2429
- <div class="mt-4 flex flex-col gap-2 relative z-10">
2430
- <!-- svelte-ignore a11y_mouse_events_have_key_events -->
2431
- <button
2445
+ <div class="relative z-10 mt-3 flex flex-col gap-2">
2446
+ <Button
2432
2447
  type="button"
2433
- class="widgetic-colors h-8.5 w-full flex items-center justify-center relative z-10 group"
2434
- style="
2435
- background-color: hsl(var(--error)) !important;
2436
- border-radius: var(--radius-small) !important;
2437
- color: white !important;
2438
- transition: background-color 0.2s ease !important;
2439
- line-height: 1 !important;
2440
- "
2448
+ variant="destructive"
2449
+ class="h-9 w-full"
2441
2450
  onclick={(e: MouseEvent) => {
2442
2451
  e.stopPropagation();
2443
2452
  handleDeleteItem(item.id);
2444
2453
  }}
2445
- onmouseover={(e) => {
2446
- e.currentTarget.style.backgroundColor = 'color-mix(in srgb, hsl(var(--error)) 90%, black) !important';
2447
- }}
2448
- onmouseout={(e) => {
2449
- e.currentTarget.style.backgroundColor = 'hsl(var(--error)) !important';
2450
- }}
2451
2454
  >
2452
- <span class="subtext text-white transition-colors duration-200">
2453
- {$t('editor.props.deleteItem')}
2454
- </span>
2455
- </button>
2455
+ {$t('editor.props.deleteItem')}
2456
+ </Button>
2456
2457
  </div>
2457
2458
  </div>
2458
2459
  </Card.Content>
@@ -2466,17 +2467,14 @@
2466
2467
 
2467
2468
  {#if canAddContentItem()}
2468
2469
  <div class="content-add-item-ct mt-4">
2469
- <Button
2470
- variant="ghost"
2471
- class="group w-full h-13 bg-grey1 hover:bg-grey2 active:scale-[0.98] border-2 border-grey2 rounded-medium"
2472
- style="transition: background-color 0.2s ease, transform 0.15s ease !important;"
2470
+ <button
2471
+ type="button"
2472
+ class="flex h-12 w-full items-center justify-center gap-2 rounded-xl border border-brand bg-brand-subtle text-body-medium text-foreground duration-fast transition-colors hover:bg-accent focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
2473
2473
  onclick={handleAddNewItem}
2474
2474
  >
2475
- <div class="flex items-center justify-center gap-2">
2476
- <AddNew class="w-5 h-5 text-grey5" />
2477
- <span class="body-medium text-grey7 group-hover:underline">{$t('editor.props.addItem')}</span>
2478
- </div>
2479
- </Button>
2475
+ <IconPlus class="size-4 stroke-[1.333] text-brand" aria-hidden="true" />
2476
+ {$t('editor.props.addItem')}
2477
+ </button>
2480
2478
  </div>
2481
2479
  {/if}
2482
2480
  </div>
@@ -2498,1148 +2496,243 @@
2498
2496
  </div>
2499
2497
 
2500
2498
  <style>
2501
- .props-editor-container {
2502
- --has-both-schemas: 0;
2503
- border-radius: var(--radius-large);
2504
- }
2505
-
2506
- /* ── Drag handle visibility on hover ── */
2507
- :global(.header-hover-area:hover .drag-handle-container) {
2508
- opacity: 1 !important;
2509
- }
2510
- .props-editor-container:not(:has(.header-hover-area)) {
2511
- position: relative;
2512
- }
2513
- .props-editor-container:not(:has(.header-hover-area)):hover :global(.drag-handle-container),
2514
- .props-editor-container:has(.header-hover-area:hover) :global(.props-editor-drag-bar .drag-handle-container),
2515
- .props-editor-container :global(.props-editor-drag-bar:hover .drag-handle-container) {
2516
- opacity: 1 !important;
2517
- }
2518
- :global(.drag-handle-container) {
2519
- opacity: 0;
2520
- transition: opacity 0.3s ease;
2521
- }
2522
- :global(.widgetic-colors .drag-handle svg) {
2523
- color: hsl(var(--grey2)) !important;
2524
- transition: color 0.2s ease !important;
2525
- }
2526
- :global(.widgetic-colors .drag-handle:hover svg) {
2527
- color: hsl(var(--grey3)) !important;
2528
- }
2529
-
2530
- /* ── Button hover states within widgetic-colors ── */
2531
- :global(.widgetic-colors button.bg-white),
2532
- :global(.widgetic-colors button.bg-white:hover) {
2533
- background-color: white !important;
2534
- }
2535
- :global(.widgetic-colors button span) {
2536
- line-height: 1;
2537
- }
2538
- :global(.widgetic-colors button svg) {
2539
- color: hsl(var(--grey5));
2540
- }
2541
- :global(.widgetic-colors button:hover svg) {
2542
- color: hsl(var(--grey7));
2543
- }
2544
-
2545
- /* ── Design tab content spacing ── */
2546
- :global(.design-tab-content[data-state="active"]) {
2547
- display: block;
2548
- margin-top: var(--has-both-schemas, 1rem);
2549
- }
2550
- .props-editor-container:has(.tabs-header) {
2551
- --has-both-schemas: 1rem;
2552
- }
2553
-
2554
- /* ── Save button (composition drag bar) ── */
2555
- /* Icon stays put next to the text; label is centered in the remaining space
2556
- with a small left bias so "Save" and "Saving" never shift the icon. */
2557
- .props-editor-save-label {
2558
- padding-inline-start: 14px;
2559
- line-height: 1;
2560
- }
2561
- .props-editor-save-btn .props-editor-save-icon {
2562
- color: currentColor !important;
2563
- stroke: currentColor !important;
2564
- }
2565
- .props-editor-save-label,
2566
- :global(.props-editor-save-label) {
2567
- color: currentColor !important;
2568
- line-height: 1;
2569
- }
2570
- :global(.content-items-wrapper) {
2571
- padding-top: 1rem;
2572
- }
2573
-
2574
- /* Style all chevrons across the editor */
2575
- :global([data-radix-accordion-trigger] > svg),
2576
- :global(.accordion-trigger > svg),
2577
- :global(.generic-content-card button > svg),
2578
- :global(.content-item-card button > svg) {
2579
- width: 24px !important;
2580
- height: 24px !important;
2581
- flex-shrink: 0 !important;
2582
- }
2583
-
2584
- /* Style accordion items */
2585
- :global(.accordion-item) {
2586
- border: 2px solid hsl(var(--grey2));
2587
- border-radius: 0;
2588
- overflow: hidden;
2589
- margin: 0;
2590
- margin-bottom: -2px;
2591
- background-color: white;
2592
- position: relative;
2593
- }
2594
-
2595
- /* Remove default Radix borders and add our own */
2596
- :global(.accordion-trigger),
2597
- :global([data-radix-accordion-trigger]) {
2598
- border: none !important;
2599
- outline: none !important;
2600
- position: relative;
2601
- padding: 0 16px !important;
2602
- height: 52px !important;
2603
- box-sizing: border-box;
2604
- display: flex !important;
2605
- align-items: center !important;
2606
- }
2607
-
2608
- /* Add our own border using a pseudo-element */
2609
- :global(.accordion-trigger)::after {
2610
- content: '';
2611
- position: absolute;
2612
- bottom: -2px;
2613
- left: 0;
2614
- right: 0;
2615
- height: 2px;
2616
- background-color: hsl(var(--grey2));
2617
- opacity: 1;
2618
- }
2619
-
2620
- /* Only hide the border after the content has retracted */
2621
- :global([data-state="closed"] .accordion-trigger)::after {
2622
- transition: opacity 0ms linear 200ms;
2623
- opacity: 0;
2624
- }
2625
-
2626
- /* Show border immediately when opening */
2627
- :global([data-state="open"] .accordion-trigger)::after {
2628
- transition: none;
2629
- opacity: 1;
2630
- }
2631
-
2632
- /* Adjust the trigger content layout */
2633
- :global(.accordion-trigger) {
2634
- display: flex !important;
2635
- align-items: center !important;
2636
- justify-content: space-between !important;
2637
- }
2638
-
2639
- /* First item - rounded at top only */
2640
- :global(.accordion-item[data-position="first"]) {
2641
- border-start-start-radius: var(--radius-small);
2642
- border-start-end-radius: var(--radius-small);
2643
- border-end-start-radius: 0;
2644
- border-end-end-radius: 0;
2645
- margin-top: 0; /* Explicitly remove top margin */
2646
- }
2647
-
2648
- /* Last item - rounded at bottom only */
2649
- :global(.accordion-item[data-position="last"]) {
2650
- margin-bottom: 0;
2651
- border-start-start-radius: 0;
2652
- border-start-end-radius: 0;
2653
- border-end-start-radius: var(--radius-small);
2654
- border-end-end-radius: var(--radius-small);
2655
- }
2656
-
2657
- /* Middle items - no rounded corners */
2658
- :global(.accordion-item[data-position="middle"]) {
2659
- border-radius: 0;
2660
- }
2661
-
2662
- :global(.content-items) {
2663
- position: relative;
2664
- transition: min-height 0.2s ease-out;
2665
- }
2666
-
2667
- :global(.drag-handle) {
2668
- opacity: 1 !important;
2669
- display: flex !important;
2670
- align-items: center !important;
2671
- justify-content: center !important;
2672
- }
2673
-
2674
- :global([data-scrollable="false"] .scrollbar) {
2675
- display: none;
2676
- }
2677
-
2678
- :global(.content-item .drag-handle) {
2679
- transition: opacity 0.2s ease;
2680
- }
2681
-
2682
- :global(.content-item:hover .drag-handle span) {
2683
- opacity: 0;
2684
- }
2685
-
2686
- :global(.content-item:hover .drag-handle div) {
2687
- display: flex;
2688
- }
2689
-
2690
- :global(.content-item .number) {
2691
- transition: opacity 0.2s ease;
2692
- opacity: 1; /* Explicitly set opacity */
2693
- }
2694
-
2695
- :global(.content-item:hover .number) {
2696
- opacity: 0;
2697
- }
2698
-
2699
- :global(.content-item .drag-icon) {
2700
- transition: opacity 0.2s ease;
2701
- opacity: 0;
2702
- }
2703
-
2704
- :global(.content-item:hover .drag-icon) {
2705
- display: flex !important;
2706
- opacity: 1;
2707
- }
2708
-
2709
- /* Debug styles */
2710
- :global(.drag-handle) {
2711
- border: none;
2712
- }
2713
-
2714
- :global(.content-item:hover .drag-handle) {
2715
- border-color: #e5e7eb;
2716
- }
2717
-
2718
- /* Replace with new simplified drag handle styles */
2719
- :global(.drag-handle) {
2720
- transition: color 0.2s ease;
2721
- }
2722
-
2723
- /* Ensure inputs maintain their container width */
2724
- :global(.props-editor-container input),
2725
- :global(.props-editor-container select),
2726
- :global(.props-editor-container textarea),
2727
- :global(.props-editor-container .input-wrapper),
2728
- :global(.props-editor-container .input-container),
2729
- :global(.props-editor-container .color-picker-popover) {
2730
- width: 100%;
2731
- min-width: 0;
2732
- box-sizing: border-box;
2733
- }
2734
-
2735
- /* Force width constraints on accordion content */
2736
- :global(.accordion-content) {
2737
- width: 100%;
2738
- min-width: 0;
2739
- }
2740
-
2741
- /* Ensure popover content stays within viewport */
2742
- :global(.popover-content) {
2743
- max-width: calc(100vw - 2rem);
2744
- min-width: 0;
2745
- }
2746
-
2747
- /* Ensure text inputs can expand as needed */
2748
- :global(.props-editor input[type="text"]),
2749
- :global(.props-editor textarea) {
2750
- min-height: fit-content;
2751
- }
2752
-
2753
- /* Update scrollbar styling to match */
2754
- :global([data-scrollable="true"] .scrollbar) {
2755
- width: 8px !important; /* Thinner scrollbar */
2756
- margin-inline-end: 2px !important; /* Add padding from the right */
2757
- }
2758
-
2759
- :global([data-scrollable="true"] .thumb) {
2760
- background-color: hsl(var(--grey1)) !important;
2761
- border-radius: 3px !important;
2762
- margin-inline-end: 2px !important;
2763
- }
2764
-
2765
- :global([data-scrollable="true"] .thumb:hover) {
2766
- background-color: hsl(var(--muted-foreground) / 0.6) !important;
2767
- }
2768
-
2769
- :global([data-scrollable="true"] .track) {
2770
- background-color: transparent !important;
2771
- margin-inline-end: 2px !important;
2772
- }
2773
-
2774
- :global([data-scrollable="true"]) {
2775
- padding-inline-end: 2px !important; /* Add padding for scrollbar */
2776
- }
2777
-
2778
- /* Add these styles to ensure proper z-index layering */
2779
- :global(.props-editor) {
2780
- position: relative;
2781
- z-index: 0;
2782
- }
2783
-
2784
- :global(.props-editor .color-suggestions) {
2785
- z-index: 99999 !important; /* Force highest z-index */
2786
- }
2787
-
2788
- :global(.popover-content) {
2789
- z-index: 50;
2790
- }
2791
-
2792
- /* Ensure text area and its dropdowns are above other content */
2793
- :global(.props-editor .text-area-input) {
2794
- position: relative;
2795
- z-index: 1;
2796
- }
2797
-
2798
- :global(.props-editor .text-area-input .color-suggestions) {
2799
- z-index: 99999 !important;
2800
- }
2801
-
2802
- /* Make any input controller that's being interacted with appear on top */
2803
- :global(.props-editor .input-controller) {
2804
- position: relative;
2805
- z-index: 1;
2806
- }
2807
-
2808
- :global(.props-editor .input-controller:focus-within),
2809
- :global(.props-editor .input-controller[data-state="open"]) {
2810
- z-index: 99999 !important; /* Bring to front when active */
2811
- }
2812
-
2813
- /* Specific handling for text area controller */
2814
- :global(.props-editor .text-area-input) {
2815
- position: relative;
2816
- z-index: 1;
2817
- }
2818
-
2819
- :global(.props-editor .text-area-input:focus-within),
2820
- :global(.props-editor .text-area-input[data-state="open"]) {
2821
- z-index: 99999 !important;
2822
- }
2823
-
2824
- /* Ensure dropdowns and suggestions always appear above */
2825
- :global(.props-editor .color-suggestions),
2826
- :global(.props-editor .popover-content),
2827
- :global(.props-editor .dropdown-content) {
2828
- z-index: 99999 !important;
2829
- }
2830
-
2831
- /* Add these specific styles to remove focus borders from cards */
2832
- :global(.content-item .card),
2833
- :global(.content-item [data-radix-collapsible-trigger]),
2834
- :global(.content-item [data-radix-collapsible-content]) {
2835
- outline: none !important;
2836
- box-shadow: none !important;
2837
- --tw-ring-offset-width: 0 !important;
2838
- --tw-ring-width: 0 !important;
2839
- --tw-ring-color: transparent !important;
2840
- --tw-ring-offset-shadow: none !important;
2841
- --tw-ring-shadow: none !important;
2842
- }
2843
-
2844
- /* Target the collapsible trigger button specifically */
2845
- :global(.content-item [data-radix-collapsible-trigger] button),
2846
- :global(.content-item [data-state]),
2847
- :global(.content-item [aria-expanded]) {
2848
- outline: none !important;
2849
- box-shadow: none !important;
2850
- border: none !important;
2851
- --tw-ring-offset-width: 0 !important;
2852
- --tw-ring-width: 0 !important;
2853
- --tw-ring-color: transparent !important;
2854
- --tw-ring-offset-shadow: none !important;
2855
- --tw-ring-shadow: none !important;
2856
- }
2857
-
2858
- /* Style all cards and collapsible elements in Content tab */
2859
- :global(.content-item-card),
2860
- :global(.generic-content-card) {
2861
- border: 2px solid hsl(var(--grey2)) !important;
2862
- border-radius: var(--radius-small) !important;
2863
- background-color: white !important;
2864
- position: relative !important;
2865
- box-shadow: none !important;
2866
- }
2867
-
2868
- /* Preserve card border but remove focus ring */
2869
- :global(.content-item-card),
2870
- :global(.generic-content-card) {
2871
- border: 2px solid hsl(var(--grey2)) !important;
2872
- }
2873
-
2874
- /* Style separator */
2875
- :global(.content-item-card) :global(.separator),
2876
- :global(.generic-content-card) :global(.separator) {
2877
- height: 2px !important;
2878
- background-color: hsl(var(--grey2)) !important;
2879
- border: none !important;
2880
- margin: 0 !important;
2881
- }
2882
-
2883
- /* Add hover effect to content items */
2884
- :global(.content-item-card [data-radix-collapsible-trigger]),
2885
- :global(.generic-content-card [data-radix-collapsible-trigger]) {
2886
- height: 52px !important;
2887
- box-sizing: border-box !important;
2888
- }
2889
-
2890
- /* Remove the existing height declaration from this rule */
2891
- :global(.content-item-card [data-radix-collapsible-trigger])::before,
2892
- :global(.generic-content-card [data-radix-collapsible-trigger])::before {
2893
- height: 52px !important;
2894
- }
2895
-
2896
- /* Add hover effect for title text */
2897
- :global(.content-item-card [data-radix-collapsible-trigger] h4),
2898
- :global(.generic-content-card [data-radix-collapsible-trigger] h3) {
2899
- text-align: start !important;
2900
- }
2901
-
2902
- /* Add hover overlay for the entire trigger area */
2903
- :global(.content-item-card [data-radix-collapsible-trigger])::before,
2904
- :global(.generic-content-card [data-radix-collapsible-trigger])::before {
2905
- content: '';
2906
- position: absolute;
2907
- inset: 0;
2908
- background-color: transparent;
2909
- transition: background-color 0.2s ease;
2910
- }
2911
-
2912
- :global(.content-item-card [data-radix-collapsible-trigger]:hover)::before,
2913
- :global(.generic-content-card [data-radix-collapsible-trigger]:hover)::before {
2914
- background-color: hsl(var(--grey1));
2915
- }
2916
-
2917
- /* Add bottom border to collapsible triggers */
2918
- :global(.content-item-card [data-radix-collapsible-trigger])::after,
2919
- :global(.generic-content-card [data-radix-collapsible-trigger])::after {
2920
- content: '';
2921
- position: absolute;
2922
- bottom: 0;
2923
- left: 0;
2924
- right: 0;
2925
- height: 2px;
2926
- background-color: hsl(var(--grey2));
2927
- opacity: 1;
2928
- }
2929
-
2930
- /* Only hide the border after the content has retracted */
2931
- :global([data-state="closed"] [data-radix-collapsible-trigger])::after {
2932
- transition: opacity 0ms linear 200ms;
2933
- opacity: 0;
2934
- }
2935
-
2936
- /* Show border immediately when opening */
2937
- :global([data-state="open"] [data-radix-collapsible-trigger])::after {
2938
- transition: none;
2939
- opacity: 1;
2940
- }
2941
-
2942
- /* Update chevron rotation animation to match Design tab */
2943
- :global(.content-item-card [data-radix-collapsible-trigger] .chevron),
2944
- :global(.generic-content-card [data-radix-collapsible-trigger] .chevron) {
2945
- transform: rotate(0deg);
2946
- transition: transform 250ms cubic-bezier(0.61, 0, 0.32, 1) !important;
2947
- }
2948
-
2949
- :global(.content-item-card [data-state="open"] .chevron),
2950
- :global(.generic-content-card [data-state="open"] .chevron) {
2951
- transform: rotate(180deg);
2952
- }
2953
-
2954
- /* Make buttons and drag handle clickable */
2955
- :global(.content-item-card [data-radix-collapsible-trigger] button),
2956
- :global(.content-item-card [data-radix-collapsible-trigger] .drag-handle),
2957
- :global(.generic-content-card [data-radix-collapsible-trigger] button) {
2958
- position: relative;
2959
- z-index: 2;
2960
- }
2961
-
2962
- /* Remove cursor pointer from content area */
2963
- :global(.content-item-card [data-radix-collapsible-content]),
2964
- :global(.generic-content-card [data-radix-collapsible-content]) {
2965
- cursor: default !important;
2966
- }
2967
-
2968
- /* Keep text left-aligned */
2969
- :global(.content-item-card h4),
2970
- :global(.generic-content-card h3) {
2971
- text-align: start !important;
2972
- }
2973
-
2974
- /* Add this new rule to remove focus borders */
2975
- :global(.content-item *:focus),
2976
- :global(.content-item *:focus-visible),
2977
- :global([data-radix-collapsible-trigger]:focus),
2978
- :global([data-radix-collapsible-trigger]:focus-visible) {
2979
- outline: none !important;
2980
- box-shadow: none !important;
2981
- }
2982
-
2983
- /* Update existing focus style rules to be more specific */
2984
- :global(.content-item button:focus),
2985
- :global(.content-item button:focus-visible),
2986
- :global(.content-item [role="button"]:focus),
2987
- :global(.content-item [role="button"]:focus-visible) {
2988
- outline: none !important;
2989
- box-shadow: none !important;
2990
- -webkit-tap-highlight-color: transparent !important;
2991
- }
2992
-
2993
- /* Add specific rule for collapsible triggers */
2994
- :global(.content-item [data-radix-collapsible-trigger]) {
2995
- --tw-ring-offset-width: 0 !important;
2996
- --tw-ring-width: 0 !important;
2997
- }
2998
-
2999
- /* Add more specific focus removal for card elements */
3000
- :global(.content-item-card:focus),
3001
- :global(.content-item-card:focus-within),
3002
- :global(.content-item-card [data-radix-collapsible-trigger]:focus),
3003
- :global(.content-item-card [data-radix-collapsible-trigger]:focus-visible) {
3004
- outline: none !important;
3005
- box-shadow: none !important;
3006
- --tw-ring-width: 0 !important;
3007
- }
3008
-
3009
- /* Target button elements specifically */
3010
- :global(.content-items button),
3011
- :global(.content-items button *),
3012
- :global(.content-items [role="button"]),
3013
- :global(.content-items [role="button"] *) {
3014
- outline: none !important;
3015
- box-shadow: none !important;
3016
- --tw-ring-offset-width: 0 !important;
3017
- --tw-ring-width: 0 !important;
3018
- --tw-ring-color: transparent !important;
3019
- --tw-ring-offset-shadow: none !important;
3020
- --tw-ring-shadow: none !important;
3021
- -webkit-tap-highlight-color: transparent !important;
3022
- }
3023
-
3024
- /* Keep only hover effect */
3025
- :global(.content-items button:hover) {
3026
- background-color: transparent !important;
3027
- }
3028
-
3029
- /* Add styles for input controller layout */
3030
- :global(.input-controller) {
3031
- display: flex !important;
3032
- align-items: center !important;
3033
- justify-content: space-between !important;
3034
- width: 100% !important;
3035
- position: relative !important;
3036
- }
3037
-
3038
- :global(.input-controller > div:first-child) {
3039
- flex: 1 !important;
3040
- min-width: 0 !important;
3041
- margin-inline-end: 16px !important;
3042
- }
3043
-
3044
- :global(.input-controller > div:last-child) {
3045
- width: 185px !important;
3046
- flex-shrink: 0 !important;
3047
- }
3048
-
3049
- /* FontIC is two stacked 185px rows with its own labels. Do not squeeze
3050
- the whole controller into the single 185px color column (that hid labels). */
3051
- :global(.input-controller.font-ic-host) {
3052
- display: flex !important;
3053
- flex-direction: column !important;
3054
- align-items: stretch !important;
3055
- justify-content: flex-start !important;
3056
- }
3057
-
3058
- :global(.input-controller.font-ic-host > div:first-child),
3059
- :global(.input-controller.font-ic-host > div:last-child) {
3060
- width: 100% !important;
3061
- max-width: 100% !important;
3062
- flex: none !important;
3063
- margin-inline-end: 0 !important;
3064
- }
3065
-
3066
- /* New animation system */
3067
- :global(.accordion-content) {
3068
- overflow: hidden;
3069
- will-change: transform, opacity;
3070
- }
3071
-
3072
- :global([data-state="open"] .accordion-content) {
3073
- animation: accordionOpen 0ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
3074
- }
3075
-
3076
- :global([data-state="closed"] .accordion-content) {
3077
- animation: accordionClose 0ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
3078
- }
3079
-
3080
- @keyframes accordionOpen {
3081
- 0% {
3082
- opacity: 0;
3083
- transform: translateY(-8px);
3084
- }
3085
- 100% {
3086
- opacity: 1;
3087
- transform: translateY(0);
3088
- }
3089
- }
3090
-
3091
- @keyframes accordionClose {
3092
- 0% {
3093
- opacity: 1;
3094
- transform: translateY(0);
3095
- }
3096
- 100% {
3097
- opacity: 0;
3098
- transform: translateY(-8px);
3099
- }
3100
- }
3101
-
3102
- /* Chevron animation */
3103
- :global(.accordion-trigger svg) {
3104
- transition: transform 200ms ease; /* Increase from 50ms to 200ms to match Content tab */
3105
- }
3106
-
3107
- :global([data-state="open"] .accordion-trigger svg) {
3108
- transform: rotate(180deg);
3109
- }
3110
-
3111
- /* Add this to match how we fixed card items */
3112
- :global(.content-items button:focus),
3113
- :global(.content-items button:focus-visible),
3114
- :global(.content-items button[role="button"]:focus),
3115
- :global(.content-items button[role="button"]:focus-visible) {
3116
- outline: none !important;
3117
- box-shadow: none !important;
3118
- --tw-ring-offset-width: 0 !important;
3119
- --tw-ring-width: 0 !important;
3120
- --tw-ring-color: transparent !important;
3121
- --tw-ring-offset-shadow: none !important;
3122
- --tw-ring-shadow: none !important;
3123
- }
3124
-
3125
- /* Target the button and its container */
3126
- :global(.content-items button),
3127
- :global(.content-items button *),
3128
- :global(.content-items [role="button"]),
3129
- :global(.content-items [role="button"] *) {
3130
- outline: none !important;
3131
- box-shadow: none !important;
3132
- --tw-ring-offset-width: 0 !important;
3133
- --tw-ring-width: 0 !important;
3134
- --tw-ring-color: transparent !important;
3135
- --tw-ring-offset-shadow: none !important;
3136
- --tw-ring-shadow: none !important;
3137
- -webkit-tap-highlight-color: transparent !important;
3138
- }
3139
-
3140
- /* Add this new style for double-height controllers */
3141
- .double-height {
3142
- height: 104px !important; /* Double the standard height (48 * 2) + gap (8) */
3143
- }
3144
-
3145
- /* Ensure padding is removed from all containers */
3146
- :global(.accordion-content),
3147
- :global(.card-content) {
3148
- padding: 0 !important;
3149
- }
3150
-
3151
- /* Specific style for font controllers */
3152
- :global(.input-controller.double-height) {
3153
- height: auto !important;
3154
- min-height: 104px;
3155
- align-items: flex-start !important;
3156
- }
3157
-
3158
- /* Ensure content containers maintain width */
3159
- :global(.accordion-content > div),
3160
- :global(.card-content > div) {
3161
- width: 100%;
3162
- box-sizing: border-box;
3163
- }
3164
-
3165
- /* Add padding to content containers */
3166
- :global(.accordion-content > div),
3167
- :global(.card-content > div) {
3168
- padding: 16px 16px !important;
3169
- }
3170
-
3171
- /* Height variations for different controllers */
3172
- .position-height {
3173
- height: 185px !important; /* Position controller */
3174
- }
3175
-
3176
- .fixed-position-height {
3177
- height: 110px !important; /* Fixed position controller */
3178
- }
3179
-
3180
- .text-area-preview-height {
3181
- height: 92px !important; /* Text area preview controller */
3182
- }
3183
-
3184
- /* Specific styles for other controllers */
3185
- :global(.input-controller.position-height) {
3186
- height: 185px !important;
3187
- }
3188
-
3189
- :global(.input-controller.fixed-position-height) {
3190
- height: 110px !important;
3191
- }
3192
-
3193
- :global(.input-controller.text-area-preview-height) {
3194
- height: 92px !important;
3195
- }
3196
-
3197
- /* Special handling for position controller */
3198
- .position-controller {
3199
- position: relative;
3200
- z-index: 1;
3201
- }
3202
-
3203
- /* When active or dragging, position it relative to the root stacking context */
3204
- .position-controller:hover,
3205
- .position-controller:focus-within,
3206
- .position-dragging {
3207
- position: relative;
3208
- z-index: 99999 !important;
3209
- }
3210
-
3211
- /* Ensure accordion items don't create new stacking contexts */
3212
- :global(.accordion-item) {
3213
- position: static !important;
3214
- }
3215
-
3216
- :global(.accordion-content) {
3217
- position: relative;
3218
- z-index: 1;
3219
- }
3220
-
3221
- /* Override any potential stacking contexts in the hierarchy */
3222
- :global(.scroll-viewport),
3223
- :global(.scroll-area),
3224
- :global([data-radix-scroll-area-viewport]) {
3225
- position: relative !important;
3226
- transform: none !important;
3227
- }
3228
-
3229
- /* Ensure the position controller can pierce through all layers */
3230
- .position-controller:hover *,
3231
- .position-controller:focus-within *,
3232
- .position-dragging * {
3233
- z-index: 99999 !important;
3234
- }
3235
-
3236
- /* Add new 'only' state */
3237
- :global(.accordion-item[data-position="only"]) {
3238
- border-radius: var(--radius-small) !important;
3239
- }
3240
-
3241
- /* Modify existing position rules */
3242
- :global(.accordion-item[data-position="first"]) {
3243
- border-start-start-radius: var(--radius-small);
3244
- border-start-end-radius: var(--radius-small);
3245
- border-end-start-radius: 0;
3246
- border-end-end-radius: 0;
3247
- }
3248
-
3249
- :global(.accordion-item[data-position="last"]) {
3250
- border-start-start-radius: 0;
3251
- border-start-end-radius: 0;
3252
- border-end-start-radius: var(--radius-small);
3253
- border-end-end-radius: var(--radius-small);
3254
- }
3255
-
3256
- :global(.accordion-item[data-position="middle"]) {
3257
- border-radius: 0;
3258
- }
3259
-
3260
- /* Override tab hover states */
3261
- :global([role="tab"][data-state="active"]) {
3262
- background-color: white !important;
3263
- }
3264
-
3265
- :global([role="tab"][data-state="active"]:hover) {
3266
- background-color: white !important;
3267
- }
3268
-
3269
- :global([role="tab"]:hover) {
3270
- background-color: transparent !important;
3271
- }
3272
-
3273
- /* TAB colors in all contexts */
3274
- /* Card & Collapsible buttons hover states */
3275
- :global(.card .widgetic-colors button:hover),
3276
- :global(.collapsible .widgetic-colors button:hover) {
3277
- background-color: white !important;
3278
- }
3279
-
3280
- /* Card & Collapsible Icons color states */
3281
- :global(.card .widgetic-colors button:hover svg),
3282
- :global(.collapsible .widgetic-colors button:hover svg) {
3283
- color: hsl(var(--grey7)) !important;
3284
- }
3285
-
3286
- /* Ensure scroll area maintains border radius */
3287
- :global([data-radix-scroll-area-viewport]) {
3288
- border-end-end-radius: var(--radius-large) !important;
3289
- }
3290
-
3291
- :global(.scroll-area) {
3292
- border-end-end-radius: var(--radius-large) !important;
3293
- }
3294
-
3295
- :global(.scroll-viewport) {
3296
- border-end-end-radius: var(--radius-large) !important;
3297
- }
3298
-
3299
- /* Ensure scrollbar doesn't affect border radius */
3300
- :global([data-radix-scroll-area-scrollbar]) {
3301
- border-end-end-radius: var(--radius-large) !important;
3302
- padding-inline-end: 2px !important;
3303
- }
3304
-
3305
- :global([data-radix-scroll-area-thumb]) {
3306
- border-radius: var(--radius-small) !important;
3307
- margin-inline-end: 2px !important;
3308
- }
3309
-
3310
- /* Add z-index management for tooltips */
3311
- :global(.props-editor-tooltip) {
3312
- z-index: 99999 !important;
3313
- }
3314
-
3315
- /* Drag Handle Visibility */
3316
- .header-hover-area {
3317
- position: relative;
3318
- }
3319
-
3320
- .header-hover-area:hover .drag-handle-container {
3321
- opacity: 1;
3322
- }
3323
-
3324
- .drag-handle-container {
3325
- transition: opacity 0.2s ease;
3326
- cursor: move; /* Make sure cursor is 'move' on the handle */
3327
- z-index: 999; /* Ensure it's always on top */
3328
- }
3329
-
3330
- .drag-handle-container:hover {
3331
- opacity: 1 !important;
3332
- }
3333
-
3334
- /* Drag Handle Icon */
3335
- :global(.drag-handle svg) {
3336
- color: hsl(var(--grey2)) !important;
3337
- transition: color 0.2s ease !important;
3338
- }
3339
-
3340
- :global(.drag-handle:hover svg) {
3341
- color: hsl(var(--grey5)) !important;
3342
- }
3343
-
3344
- /* Content Item Hover Styles */
3345
- :global(.content-item-card [data-radix-collapsible-trigger] h4),
3346
- :global(.generic-content-card [data-radix-collapsible-trigger] h3) {
3347
- text-align: start !important;
3348
- }
3349
-
3350
- /* Add new specific hover styles for content titles */
3351
- :global(.content-item-trigger:hover .content-title),
3352
- :global(.generic-content-trigger:hover .content-title) {
3353
- text-decoration: underline !important;
3354
- }
3355
-
3356
- /* Background hover effects */
3357
- :global(.content-item-card [data-radix-collapsible-trigger])::before,
3358
- :global(.generic-content-card [data-radix-collapsible-trigger])::before {
3359
- content: '';
3360
- position: absolute;
3361
- inset: 0;
3362
- background-color: transparent;
3363
- transition: background-color 0.2s ease;
3364
- }
3365
-
3366
- :global(.content-item-card [data-radix-collapsible-trigger]:hover)::before,
3367
- :global(.generic-content-card [data-radix-collapsible-trigger]:hover)::before {
3368
- background-color: hsl(var(--grey1));
3369
- }
3370
-
3371
- /* Add new button hover styles */
3372
- :global(.hover-button:hover .hover-button-inner) {
3373
- background-color: hsl(var(--grey1));
3374
- }
3375
-
3376
- :global(.hover-button:hover span) {
3377
- text-decoration: underline;
3378
- }
3379
-
3380
- :global(.content-item) {
3381
- position: relative;
3382
- z-index: 1;
3383
- will-change: transform;
3384
- transform: translate3d(0, 0, 0);
3385
- }
3386
-
3387
- /*
3388
- * Reordering the items by dragging a handle (utils/itemReorder.ts). While an item is dragged, every item is
3389
- * folded to one row at once (the items that were open keep their content, it is only hidden), so the whole
3390
- * list is within reach and the places to drop do not move under the pointer.
3391
- */
3392
- :global(.content-items.is-reordering) {
3393
- user-select: none;
3394
- -webkit-user-select: none;
3395
- }
3396
-
3397
- /* The card is what is folded, not the item: the line that shows the drop place sits outside the item's box */
3398
- :global(.content-items.is-reordering .content-item-card) {
3399
- height: 56px !important;
3400
- min-height: 56px !important;
3401
- max-height: 56px !important;
3402
- overflow: hidden !important;
3403
- }
3404
-
3405
- :global(.content-items.is-reordering [data-collapsible-content]) {
3406
- display: none !important;
3407
- }
3408
-
3409
- /* The item being dragged stays in place, faded; the floating copy is what follows the pointer */
3410
- :global(.content-item.is-reorder-source) {
3411
- opacity: 0.3;
3412
- }
3413
-
3414
- /* A line in the gap where the dragged item would be dropped: in front of an item, or behind the last one */
3415
- :global(.content-item.is-reorder-drop-before)::before,
3416
- :global(.content-item.is-reorder-drop-after)::after {
3417
- content: '';
3418
- position: absolute;
3419
- left: 0;
3420
- right: 0;
3421
- height: 3px;
3422
- border-radius: 2px;
3423
- background-color: hsl(var(--sage-green));
3424
- pointer-events: none;
3425
- }
3426
-
3427
- :global(.content-item.is-reorder-drop-before)::before {
3428
- top: -9px;
3429
- }
3430
-
3431
- :global(.content-item.is-reorder-drop-after)::after {
3432
- bottom: -9px;
3433
- }
3434
-
3435
- /* The floating copy of the dragged item: one row, with the editor's green outline */
3436
- :global(.reorder-mirror) {
3437
- box-sizing: border-box;
3438
- border: 2px solid hsl(var(--sage-green));
3439
- border-radius: var(--radius-small);
3440
- background-color: white;
3441
- box-shadow: none;
3442
- will-change: transform;
3443
- }
3444
-
3445
- :global(.reorder-mirror .content-title) {
3446
- color: hsl(var(--sage-green));
3447
- text-decoration: none !important;
3448
- }
3449
-
3450
- :global(.reorder-mirror .chevron),
3451
- :global(.reorder-mirror .drag-handle svg) {
3452
- color: hsl(var(--sage-green));
3453
- }
3454
-
3455
- /* The card inside the copy has its own border: the outline above is the only one */
3456
- :global(.reorder-mirror .content-item-card) {
3457
- border: none;
3458
- }
3459
-
3460
- /* Update drag handle hover area and content title behavior */
3461
- :global(.content-item .drag-handle) {
3462
- width: 56px !important;
3463
- display: flex !important;
3464
- align-items: center !important;
3465
- justify-content: center !important;
3466
- height: 100% !important;
3467
- cursor: move !important;
3468
- /* Touching the handle drags the item; it must not scroll the page */
3469
- touch-action: none;
3470
- }
3471
-
3472
- /* Keep the icon size consistent */
3473
- :global(.content-item .drag-handle svg) {
3474
- width: 24px !important;
3475
- height: 24px !important;
3476
- }
3477
-
3478
- /* Prevent title underline when hovering drag handle */
3479
- :global(.content-item .drag-handle:hover ~ .content-title) {
3480
- text-decoration: none !important;
3481
- }
3482
-
3483
- :global(.content-item .drag-handle:hover ~ h4) {
3484
- text-decoration: none !important;
3485
- }
3486
-
3487
- /* Ensure drag handle maintains proper positioning */
3488
- :global(.content-item-trigger .drag-handle) {
3489
- position: relative;
3490
- z-index: 3;
3491
- }
3492
-
3493
- /* Remove any previous left padding from the flex container */
3494
- :global(.content-item-trigger .flex) {
3495
- padding-inline-start: 0 !important;
3496
- }
3497
-
3498
- :global(.content-item) {
3499
- contain: layout style;
3500
- will-change: transform;
3501
- transform: translate3d(0, 0, 0);
3502
- }
3503
-
3504
- /* Animation classes */
3505
- :global(.design-tab-content[data-state="active"]) {
3506
- animation: none;
3507
- transform: none;
3508
- }
3509
-
3510
- :global(.design-tab-content.initial-load[data-state="active"]) {
3511
- animation: slideUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
3512
- transform: none;
3513
- }
3514
-
3515
- :global(.design-tab-content.animate-slide-left[data-state="active"]) {
3516
- animation: slideFromLeft 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
3517
- transform: none;
3518
- }
3519
-
3520
- :global(.content-tab-content.animate-slide-right[data-state="active"]) {
3521
- animation: slideFromRight 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
3522
- transform: none;
3523
- }
3524
-
3525
- /* The two tabs trade places on a right to left screen, so each panel slides in from the side that its tab is on. */
3526
- :global(.design-tab-content.animate-slide-left[data-state="active"]:dir(rtl)) {
3527
- animation-name: slideFromRight;
3528
- }
3529
-
3530
- :global(.content-tab-content.animate-slide-right[data-state="active"]:dir(rtl)) {
3531
- animation-name: slideFromLeft;
3532
- }
3533
-
3534
- @keyframes slideFromLeft {
3535
- from {
3536
- opacity: 0;
3537
- transform: translateX(-20px);
3538
- }
3539
- to {
3540
- opacity: 1;
3541
- transform: none;
3542
- }
3543
- }
3544
-
3545
- @keyframes slideFromRight {
3546
- from {
3547
- opacity: 0;
3548
- transform: translateX(20px);
3549
- }
3550
- to {
3551
- opacity: 1;
3552
- transform: none;
3553
- }
3554
- }
3555
-
3556
- @keyframes slideUp {
3557
- from {
3558
- opacity: 0;
3559
- transform: translateY(20px);
3560
- }
3561
- to {
3562
- opacity: 1;
3563
- transform: none;
3564
- }
3565
- }
3566
-
3567
- @keyframes fadeInUp {
3568
- from {
3569
- opacity: 0;
3570
- transform: translateY(10px);
3571
- }
3572
- to {
3573
- opacity: 1;
3574
- transform: translateY(0);
3575
- }
3576
- }
3577
-
3578
- @keyframes slideUp {
3579
- from {
3580
- opacity: 0;
3581
- transform: translateY(20px);
3582
- }
3583
- to {
3584
- opacity: 1;
3585
- transform: none;
3586
- }
3587
- }
3588
-
3589
- @keyframes slideRight {
3590
- from {
3591
- opacity: 0;
3592
- transform: translateX(20px);
3593
- }
3594
- to {
3595
- opacity: 1;
3596
- transform: none;
3597
- }
3598
- }
3599
-
3600
- :global(.animate-slide-up) {
3601
- animation: slideUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
3602
- }
3603
-
3604
- :global(.animate-slide-right) {
3605
- animation: slideRight 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards !important;
3606
- }
3607
-
3608
- /* Add these styles at the end of the style block */
3609
-
3610
- /* Empty state animations */
3611
- :global(.content-tab-content .empty-state) {
3612
- opacity: 0;
3613
- transform: translateY(10px);
3614
- animation: fadeInUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
3615
- animation-delay: 100ms;
3616
- }
3617
-
3618
- @keyframes fadeInUp {
3619
- from {
3620
- opacity: 0;
3621
- transform: translateY(10px);
3622
- }
3623
- to {
3624
- opacity: 1;
3625
- transform: translateY(0);
3626
- }
3627
- }
3628
-
3629
- :global(body.dragging-preserve-borders .form-input),
3630
- :global(body.dragging-preserve-borders [id^="number-input"]),
3631
- :global(body.dragging-preserve-borders .number-input-button),
3632
- :global(body.dragging-preserve-borders input),
3633
- :global(body.dragging-preserve-borders select),
3634
- :global(body.dragging-preserve-borders textarea),
3635
- :global(body.dragging-preserve-borders button) {
3636
- border: 1px solid hsl(var(--grey2)) !important;
3637
- }
3638
-
3639
- /* Add explicit transition for content tab chevrons */
3640
- :global(.content-item-card .chevron),
3641
- :global(.generic-content-card .chevron) {
3642
- transition: transform 200ms ease !important; /* Make explicit matching transition */
3643
- }
2499
+ .props-editor-container {
2500
+ --has-both-schemas: 0;
2501
+ }
2502
+
2503
+ /* Both tabs: design content sits below the tab list when both schemas exist. */
2504
+ .props-editor-container:has(.tabs-header) {
2505
+ --has-both-schemas: 1rem;
2506
+ }
2507
+
2508
+ :global(.design-tab-content[data-state="active"]) {
2509
+ display: block;
2510
+ margin-top: var(--has-both-schemas, 1rem);
2511
+ }
2512
+
2513
+ /* Save control: icon stays beside the label text without shifting between Save and Saving. */
2514
+ .props-editor-save-label {
2515
+ padding-inline-start: 14px;
2516
+ line-height: 1;
2517
+ }
2518
+
2519
+ .props-editor-save-btn .props-editor-save-icon {
2520
+ color: currentColor;
2521
+ stroke: currentColor;
2522
+ }
2523
+
2524
+ :global([data-scrollable="false"] .scrollbar) {
2525
+ display: none;
2526
+ }
2527
+
2528
+ /* Open or focused rows stack above neighbours so popovers are not clipped. */
2529
+ :global(.props-editor .input-controller) {
2530
+ position: relative;
2531
+ z-index: 1;
2532
+ }
2533
+
2534
+ :global(.props-editor .input-controller:focus-within),
2535
+ :global(.props-editor .input-controller[data-state="open"]) {
2536
+ z-index: 50;
2537
+ }
2538
+
2539
+ /* Position pad: raise stacking while dragging (accordion overflow would clip the pad). */
2540
+ .position-controller {
2541
+ position: relative;
2542
+ z-index: 1;
2543
+ }
2544
+
2545
+ .position-controller:focus-within,
2546
+ .position-dragging {
2547
+ z-index: 50;
2548
+ }
2549
+
2550
+ /* Hovering raises the pad too, but only where a pointer can hover (a tap would leave it raised). */
2551
+ @media (hover: hover) {
2552
+ .position-controller:hover {
2553
+ z-index: 50;
2554
+ }
2555
+ }
2556
+
2557
+ :global(.accordion-item) {
2558
+ position: static;
2559
+ }
2560
+
2561
+ :global([data-state="open"] .accordion-trigger svg) {
2562
+ transform: rotate(180deg);
2563
+ }
2564
+
2565
+ :global(.accordion-trigger svg) {
2566
+ transition: transform var(--duration-base) ease-out;
2567
+ }
2568
+
2569
+ /* Content card headers: underline title on hover, not when hovering the drag handle. */
2570
+ :global(.content-item-trigger:hover .content-title),
2571
+ :global(.generic-content-trigger:hover .content-title) {
2572
+ text-decoration: underline;
2573
+ }
2574
+
2575
+ :global(.content-item .drag-handle:hover ~ .content-title),
2576
+ :global(.content-item .drag-handle:hover ~ h4) {
2577
+ text-decoration: none;
2578
+ }
2579
+
2580
+ :global(.content-item) {
2581
+ position: relative;
2582
+ z-index: 1;
2583
+ }
2584
+
2585
+ :global(.content-item .drag-handle) {
2586
+ touch-action: none;
2587
+ }
2588
+
2589
+ /*
2590
+ * itemReorder.ts: while dragging, fold every card to one row and show drop markers.
2591
+ */
2592
+ :global(.content-items.is-reordering) {
2593
+ user-select: none;
2594
+ -webkit-user-select: none;
2595
+ }
2596
+
2597
+ :global(.content-items.is-reordering .content-item-card) {
2598
+ height: 3rem;
2599
+ min-height: 3rem;
2600
+ max-height: 3rem;
2601
+ overflow: hidden;
2602
+ }
2603
+
2604
+ :global(.content-items.is-reordering [data-collapsible-content]) {
2605
+ display: none;
2606
+ }
2607
+
2608
+ :global(.content-item.is-reorder-source) {
2609
+ opacity: 0.3;
2610
+ }
2611
+
2612
+ :global(.content-item.is-reorder-source .content-item-card) {
2613
+ box-shadow: 0 0 0 1px var(--brand);
2614
+ }
2615
+
2616
+ :global(.content-item.is-reorder-drop-before)::before,
2617
+ :global(.content-item.is-reorder-drop-after)::after {
2618
+ content: '';
2619
+ position: absolute;
2620
+ left: 0;
2621
+ right: 0;
2622
+ height: 3px;
2623
+ border-radius: 2px;
2624
+ background-color: var(--brand);
2625
+ pointer-events: none;
2626
+ }
2627
+
2628
+ :global(.content-item.is-reorder-drop-before)::before {
2629
+ top: -9px;
2630
+ }
2631
+
2632
+ :global(.content-item.is-reorder-drop-after)::after {
2633
+ bottom: -9px;
2634
+ }
2635
+
2636
+ :global(.reorder-mirror) {
2637
+ box-sizing: border-box;
2638
+ border: 1px solid var(--brand);
2639
+ border-radius: var(--radius-xl);
2640
+ background-color: var(--popover);
2641
+ will-change: transform;
2642
+ }
2643
+
2644
+ :global(.reorder-mirror .content-title) {
2645
+ color: var(--brand);
2646
+ text-decoration: none;
2647
+ }
2648
+
2649
+ :global(.reorder-mirror .chevron),
2650
+ :global(.reorder-mirror .drag-handle svg) {
2651
+ color: var(--brand);
2652
+ }
2653
+
2654
+ :global(.reorder-mirror .content-item-card) {
2655
+ border: none;
2656
+ }
2657
+
2658
+ /* Tab panels slide in from the side of the active tab (RTL mirrored in editor-direction.test.mjs). */
2659
+ :global(.design-tab-content.initial-load[data-state="active"]) {
2660
+ animation: slideUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
2661
+ }
2662
+
2663
+ :global(.design-tab-content.animate-slide-left[data-state="active"]) {
2664
+ animation: slideFromLeft 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
2665
+ }
2666
+
2667
+ :global(.content-tab-content.animate-slide-right[data-state="active"]) {
2668
+ animation: slideFromRight 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
2669
+ }
2670
+
2671
+ :global(.design-tab-content.animate-slide-left[data-state="active"]:dir(rtl)) {
2672
+ animation-name: slideFromRight;
2673
+ }
2674
+
2675
+ :global(.content-tab-content.animate-slide-right[data-state="active"]:dir(rtl)) {
2676
+ animation-name: slideFromLeft;
2677
+ }
2678
+
2679
+ @keyframes slideFromLeft {
2680
+ from {
2681
+ opacity: 0;
2682
+ transform: translateX(-20px);
2683
+ }
2684
+ to {
2685
+ opacity: 1;
2686
+ transform: none;
2687
+ }
2688
+ }
2689
+
2690
+ @keyframes slideFromRight {
2691
+ from {
2692
+ opacity: 0;
2693
+ transform: translateX(20px);
2694
+ }
2695
+ to {
2696
+ opacity: 1;
2697
+ transform: none;
2698
+ }
2699
+ }
2700
+
2701
+ @keyframes slideUp {
2702
+ from {
2703
+ opacity: 0;
2704
+ transform: translateY(20px);
2705
+ }
2706
+ to {
2707
+ opacity: 1;
2708
+ transform: none;
2709
+ }
2710
+ }
2711
+
2712
+ :global(.content-tab-content .empty-state) {
2713
+ opacity: 0;
2714
+ transform: translateY(10px);
2715
+ animation: fadeInUp 300ms cubic-bezier(0.4, 0, 0.2, 1) forwards;
2716
+ animation-delay: 100ms;
2717
+ }
2718
+
2719
+ @keyframes fadeInUp {
2720
+ from {
2721
+ opacity: 0;
2722
+ transform: translateY(10px);
2723
+ }
2724
+ to {
2725
+ opacity: 1;
2726
+ transform: translateY(0);
2727
+ }
2728
+ }
2729
+
2730
+ .header-hover-area:hover .drag-handle-container {
2731
+ opacity: 1;
2732
+ }
2733
+
2734
+ .drag-handle-container {
2735
+ transition: opacity var(--duration-base) ease-out;
2736
+ }
3644
2737
  </style>
3645
2738