@widgetic/editor 4.1.14 → 4.1.16

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