@flikk/ui 1.0.0-beta.14 → 1.0.0-beta.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.
- package/dist/components/ai/CodeBlock/CodeBlock.theme.js +1 -1
- package/dist/components/ai/PromptInput/PromptInput.js +3 -1
- package/dist/components/ai/PromptSuggestions/PromptSuggestion.theme.js +4 -4
- package/dist/components/ai/StreamingResponse/StreamingResponse.js +6 -0
- package/dist/components/ai/ThinkingIndicator/ThinkingIndicator.js +3 -14
- package/dist/components/ai/index.d.ts +0 -5
- package/dist/components/ai/index.js +8 -4
- package/dist/components/charts/DonutChart/DonutChart.js +1 -1
- package/dist/components/charts/DonutChart/MultiSegmentDonutChart.js +1 -1
- package/dist/components/charts/shared/ChartLegend/ChartLegend.types.d.ts +13 -1
- package/dist/components/charts/shared/ChartLegend/ChartLegendContent.js +1 -1
- package/dist/components/charts/shared/ChartTooltip/ChartTooltip.types.d.ts +13 -2
- package/dist/components/core/Accordion/AccordionItem.js +1 -1
- package/dist/components/core/Accordion/AccordionTrigger.js +1 -1
- package/dist/components/core/Alert/Alert.animations.d.ts +11 -0
- package/dist/components/core/Alert/Alert.animations.js +44 -0
- package/dist/components/core/Alert/Alert.js +16 -3
- package/dist/components/core/Avatar/Avatar.js +12 -7
- package/dist/components/core/Avatar/Avatar.theme.d.ts +4 -6
- package/dist/components/core/Avatar/Avatar.theme.js +22 -12
- package/dist/components/core/Avatar/Avatar.types.d.ts +9 -0
- package/dist/components/core/AvatarGroup/AvatarGroup.animations.js +2 -2
- package/dist/components/core/AvatarGroup/AvatarGroup.js +1 -2
- package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +1 -1
- package/dist/components/core/Badge/Badge.animations.js +1 -1
- package/dist/components/core/Badge/Badge.js +23 -47
- package/dist/components/core/Badge/Badge.theme.js +48 -62
- package/dist/components/core/Badge/Badge.types.d.ts +5 -29
- package/dist/components/core/Button/Button.js +2 -2
- package/dist/components/core/Button/Button.theme.js +2 -2
- package/dist/components/core/ButtonGroup/ButtonGroup.theme.js +6 -6
- package/dist/components/core/ButtonGroup/ButtonGroupText.js +1 -3
- package/dist/components/core/Calendar/Calendar.js +29 -3
- package/dist/components/core/Calendar/Calendar.theme.js +11 -7
- package/dist/components/core/Calendar/Calendar.types.d.ts +3 -0
- package/dist/components/core/Carousel/CarouselBody.js +0 -1
- package/dist/components/core/CommandPalette/CommandItem.js +1 -1
- package/dist/components/core/CommandPalette/CommandPalette.js +6 -4
- package/dist/components/core/CommandPalette/CommandPalette.theme.js +1 -0
- package/dist/components/core/CommandPalette/CommandPalette.types.d.ts +6 -0
- package/dist/components/core/ContextMenu/ContextMenu.js +5 -4
- package/dist/components/core/ContextMenu/ContextMenuTrigger.js +5 -6
- package/dist/components/core/Drawer/Drawer.d.ts +1 -1
- package/dist/components/core/Drawer/Drawer.js +25 -2
- package/dist/components/core/Drawer/Drawer.theme.js +2 -2
- package/dist/components/core/Drawer/Drawer.types.d.ts +6 -0
- package/dist/components/core/Dropdown/Dropdown.d.ts +1 -1
- package/dist/components/core/Dropdown/Dropdown.js +5 -1
- package/dist/components/core/Dropdown/Dropdown.types.d.ts +1 -0
- package/dist/components/core/Dropdown/DropdownItem.js +1 -1
- package/dist/components/core/Dropdown/DropdownMenu.js +4 -4
- package/dist/components/core/Dropdown/DropdownSection.js +1 -1
- package/dist/components/core/Dropdown/DropdownSeparator.js +1 -1
- package/dist/components/core/Dropdown/DropdownTrigger.d.ts +6 -1
- package/dist/components/core/Dropdown/DropdownTrigger.js +10 -8
- package/dist/components/core/Kbd/Kbd.theme.js +3 -3
- package/dist/components/core/Link/Link.js +3 -1
- package/dist/components/core/Message/Message.d.ts +9 -0
- package/dist/components/core/Message/Message.js +44 -3
- package/dist/components/core/Message/Message.theme.js +22 -0
- package/dist/components/core/Message/Message.types.d.ts +115 -0
- package/dist/components/core/Message/MessageAudio.d.ts +8 -0
- package/dist/components/core/Message/MessageAudio.js +11 -0
- package/dist/components/core/Message/MessageContext.d.ts +3 -1
- package/dist/components/core/Message/MessageDateDivider.d.ts +6 -0
- package/dist/components/core/Message/MessageDateDivider.js +10 -0
- package/dist/components/core/Message/MessageFile.d.ts +9 -0
- package/dist/components/core/Message/MessageFile.js +15 -0
- package/dist/components/core/Message/MessageImage.d.ts +11 -0
- package/dist/components/core/Message/MessageImage.js +13 -0
- package/dist/components/core/Message/MessageLink.d.ts +10 -0
- package/dist/components/core/Message/MessageLink.js +15 -0
- package/dist/components/core/Message/MessageReactions.d.ts +8 -0
- package/dist/components/core/Message/MessageReactions.js +12 -0
- package/dist/components/core/Message/MessageReply.d.ts +8 -0
- package/dist/components/core/Message/MessageReply.js +10 -0
- package/dist/components/core/Message/MessageSenderName.d.ts +6 -0
- package/dist/components/core/Message/MessageSenderName.js +10 -0
- package/dist/components/core/Message/MessageStatusIndicator.d.ts +9 -0
- package/dist/components/core/Message/MessageStatusIndicator.js +45 -0
- package/dist/components/core/Message/index.d.ts +19 -1
- package/dist/components/core/Modal/Modal.animations.d.ts +1 -0
- package/dist/components/core/Modal/Modal.animations.js +14 -11
- package/dist/components/core/Pagination/Pagination.theme.js +1 -1
- package/dist/components/core/Popover/Popover.d.ts +1 -1
- package/dist/components/core/Popover/PopoverBody.js +2 -2
- package/dist/components/core/Popover/PopoverTrigger.d.ts +1 -1
- package/dist/components/core/Popover/PopoverTrigger.js +11 -11
- package/dist/components/core/Progress/Progress.d.ts +9 -8
- package/dist/components/core/Progress/Progress.js +16 -16
- package/dist/components/core/Progress/Progress.theme.js +5 -16
- package/dist/components/core/Progress/Progress.types.d.ts +2 -20
- package/dist/components/core/Progress/index.d.ts +1 -1
- package/dist/components/core/ScrollArea/ScrollArea.js +49 -7
- package/dist/components/core/ScrollArea/ScrollArea.types.d.ts +12 -3
- package/dist/components/core/ScrollArea/index.d.ts +1 -1
- package/dist/components/core/Segmented/SegmentedItem.js +1 -1
- package/dist/components/core/Sidebar/Sidebar.js +2 -1
- package/dist/components/core/Sidebar/SidebarMobileTrigger.js +2 -1
- package/dist/components/core/Sidebar/SidebarToggle.js +2 -1
- package/dist/components/core/Sidebar/SidebarUserProfile.js +1 -1
- package/dist/components/core/SocialIcon/SocialIcon.js +1 -1
- package/dist/components/core/Sortable/Sortable.js +2 -2
- package/dist/components/core/Sortable/Sortable.theme.js +1 -1
- package/dist/components/core/Sortable/Sortable.types.d.ts +7 -5
- package/dist/components/core/Tabs/TabsBody.js +1 -1
- package/dist/components/core/Tabs/TabsTrigger.js +1 -1
- package/dist/components/core/Tag/Tag.js +2 -2
- package/dist/components/core/Toast/Toast.d.ts +2 -2
- package/dist/components/core/Toast/Toast.js +30 -21
- package/dist/components/core/Toast/Toast.theme.js +4 -9
- package/dist/components/core/Toast/Toast.types.d.ts +4 -21
- package/dist/components/core/Toast/index.d.ts +1 -1
- package/dist/components/core/Tooltip/Tooltip.js +1 -1
- package/dist/components/core/Tooltip/Tooltip.theme.js +1 -1
- package/dist/components/core/index.js +9 -0
- package/dist/components/data-display/GanttChart/GanttChart.types.d.ts +2 -2
- package/dist/components/data-display/Table/Table.types.d.ts +8 -8
- package/dist/components/effects/CustomCursor/CustomCursor.js +2 -2
- package/dist/components/effects/GlassSurface/GlassSurface.d.ts +1 -1
- package/dist/components/effects/GlassSurface/GlassSurface.js +12 -4
- package/dist/components/effects/InteractiveCharacters/InteractiveCharacters.animations.d.ts +39 -0
- package/dist/components/effects/InteractiveCharacters/InteractiveCharacters.animations.js +98 -0
- package/dist/components/effects/InteractiveCharacters/InteractiveCharacters.d.ts +3 -0
- package/dist/components/effects/InteractiveCharacters/InteractiveCharacters.js +104 -0
- package/dist/components/effects/InteractiveCharacters/InteractiveCharacters.types.d.ts +30 -0
- package/dist/components/effects/InteractiveCharacters/characters/BlobCharacter.d.ts +3 -0
- package/dist/components/effects/InteractiveCharacters/characters/BlobCharacter.js +36 -0
- package/dist/components/effects/InteractiveCharacters/characters/SmallCharacter.d.ts +3 -0
- package/dist/components/effects/InteractiveCharacters/characters/SmallCharacter.js +36 -0
- package/dist/components/effects/InteractiveCharacters/characters/TallCharacter.d.ts +3 -0
- package/dist/components/effects/InteractiveCharacters/characters/TallCharacter.js +37 -0
- package/dist/components/effects/InteractiveCharacters/hooks/useBlink.d.ts +14 -0
- package/dist/components/effects/InteractiveCharacters/hooks/useBlink.js +41 -0
- package/dist/components/effects/InteractiveCharacters/hooks/useIdleAnimation.d.ts +25 -0
- package/dist/components/effects/InteractiveCharacters/hooks/useIdleAnimation.js +84 -0
- package/dist/components/effects/InteractiveCharacters/hooks/useMouseTracking.d.ts +18 -0
- package/dist/components/effects/InteractiveCharacters/hooks/useMouseTracking.js +35 -0
- package/dist/components/effects/InteractiveCharacters/index.d.ts +2 -0
- package/dist/components/effects/MorphingText/MorphingText.d.ts +1 -1
- package/dist/components/effects/MorphingText/MorphingText.js +6 -5
- package/dist/components/effects/Neumorphic/InsetCircleButton.d.ts +9 -0
- package/dist/components/effects/Neumorphic/InsetCircleButton.js +10 -0
- package/dist/components/effects/Neumorphic/InsetPill.d.ts +7 -0
- package/dist/components/effects/Neumorphic/InsetPill.js +7 -0
- package/dist/components/effects/Neumorphic/index.d.ts +4 -0
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.d.ts +1 -1
- package/dist/components/effects/NoiseOverlay/NoiseOverlay.js +4 -4
- package/dist/components/effects/Overlay/Overlay.js +6 -4
- package/dist/components/effects/PageTransition/PageTransition.animations.d.ts +8 -0
- package/dist/components/effects/PageTransition/PageTransition.animations.js +53 -0
- package/dist/components/effects/PageTransition/PageTransition.d.ts +3 -0
- package/dist/components/effects/PageTransition/PageTransition.js +71 -0
- package/dist/components/effects/PageTransition/PageTransition.types.d.ts +15 -0
- package/dist/components/effects/PageTransition/index.d.ts +2 -0
- package/dist/components/effects/index.d.ts +6 -0
- package/dist/components/effects/index.js +4 -0
- package/dist/components/forms/Checkbox/Checkbox.animations.d.ts +14 -0
- package/dist/components/forms/Checkbox/Checkbox.animations.js +53 -0
- package/dist/components/forms/Checkbox/Checkbox.js +4 -2
- package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -3
- package/dist/components/forms/ColorPicker/ColorPicker.types.d.ts +1 -1
- package/dist/components/forms/ColorPicker/ColorPickerBody.js +3 -3
- package/dist/components/forms/Combobox/Combobox.js +5 -3
- package/dist/components/forms/DatePicker/DatePickerBody.js +1 -1
- package/dist/components/forms/DateRangePicker/DateRangePicker.animations.d.ts +1 -0
- package/dist/components/forms/DateRangePicker/DateRangePicker.d.ts +37 -0
- package/dist/components/forms/DateRangePicker/DateRangePicker.js +110 -0
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.d.ts +5 -0
- package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +52 -0
- package/dist/components/forms/DateRangePicker/DateRangePicker.types.d.ts +154 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerBody.d.ts +6 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerBody.js +208 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerPresets.d.ts +6 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerPresets.js +41 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.d.ts +6 -0
- package/dist/components/forms/DateRangePicker/DateRangePickerTrigger.js +32 -0
- package/dist/components/forms/DateRangePicker/dateRangePresets.d.ts +5 -0
- package/dist/components/forms/DateRangePicker/dateRangePresets.js +59 -0
- package/dist/components/forms/DateRangePicker/index.d.ts +4 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.animations.d.ts +36 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.animations.js +22 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.d.ts +3 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.js +111 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.d.ts +19 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +27 -0
- package/dist/components/forms/FileUpload/FileUploadProgress.types.d.ts +33 -0
- package/dist/components/forms/FileUpload/index.d.ts +3 -0
- package/dist/components/forms/Input/Input.js +8 -13
- package/dist/components/forms/Input/Input.types.d.ts +6 -0
- package/dist/components/forms/InputAddress/InputAddress.theme.js +1 -1
- package/dist/components/forms/InputCounter/InputCounter.js +1 -1
- package/dist/components/forms/InputCreditCard/InputCreditCard.theme.js +1 -1
- package/dist/components/forms/InputOTP/InputOTP.theme.js +1 -1
- package/dist/components/forms/Radio/Radio.animations.d.ts +10 -0
- package/dist/components/forms/Radio/Radio.animations.js +33 -0
- package/dist/components/forms/Radio/Radio.js +11 -2
- package/dist/components/forms/Radio/Radio.theme.js +3 -3
- package/dist/components/forms/RichTextEditor/RichTextEditor.js +13 -4
- package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +2 -2
- package/dist/components/forms/RichTextEditor/RichTextEditor.types.d.ts +11 -0
- package/dist/components/forms/Select/Select.d.ts +1 -1
- package/dist/components/forms/Select/Select.js +7 -7
- package/dist/components/forms/Select/Select.types.d.ts +3 -3
- package/dist/components/forms/SelectableCard/SelectableCard.js +1 -1
- package/dist/components/forms/Slider/Slider.theme.js +1 -1
- package/dist/components/forms/Switch/Switch.theme.js +3 -3
- package/dist/components/forms/forms.theme.js +1 -1
- package/dist/components/forms/index.d.ts +6 -0
- package/dist/components/forms/index.js +8 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/useMediaQuery.d.ts +5 -0
- package/dist/hooks/useMediaQuery.js +21 -0
- package/dist/index.js +21 -0
- package/dist/styles.css +1 -1
- package/dist/utils/dateUtils.js +56 -5
- package/dist/utils/formatUtils.d.ts +10 -0
- package/dist/utils/formatUtils.js +24 -0
- package/dist/utils/index.d.ts +1 -1
- package/package.json +12 -4
- package/src/global.scss +319 -39
- package/src/styles/theme.css +105 -16
- package/src/theme-plugin.css +13 -0
- package/dist/components/ai/ApprovalCard/ApprovalCard.d.ts +0 -3
- package/dist/components/ai/ApprovalCard/ApprovalCard.js +0 -16
- package/dist/components/ai/ApprovalCard/ApprovalCard.theme.d.ts +0 -13
- package/dist/components/ai/ApprovalCard/ApprovalCard.theme.js +0 -15
- package/dist/components/ai/ApprovalCard/ApprovalCard.types.d.ts +0 -43
- package/dist/components/ai/ApprovalCard/index.d.ts +0 -2
- package/dist/components/ai/MessageHistory/MessageHistory.d.ts +0 -18
- package/dist/components/ai/MessageHistory/MessageHistory.js +0 -98
- package/dist/components/ai/MessageHistory/MessageHistory.theme.d.ts +0 -2
- package/dist/components/ai/MessageHistory/MessageHistory.theme.js +0 -8
- package/dist/components/ai/MessageHistory/MessageHistory.types.d.ts +0 -94
- package/dist/components/ai/MessageHistory/index.d.ts +0 -3
- package/dist/icons/Icon.d.ts +0 -24
- package/dist/icons/Icon.js +0 -30
- package/dist/icons/Index.d.ts +0 -16
- package/dist/icons/core/ChevronUpDown.d.ts +0 -1
- package/dist/icons/core/ChevronUpDown.js +0 -7
- package/dist/icons/core/DollarIcon.d.ts +0 -1
- package/dist/icons/core/DollarIcon.js +0 -5
- package/dist/icons/core/LockIcon.d.ts +0 -1
- package/dist/icons/core/LockIcon.js +0 -5
- package/dist/icons/core/MinusIcon.d.ts +0 -1
- package/dist/icons/core/MinusIcon.js +0 -7
- package/dist/icons/core/PlusIcon.d.ts +0 -1
- package/dist/icons/core/PlusIcon.js +0 -7
- package/dist/icons/core/SearchIcon.d.ts +0 -1
- package/dist/icons/core/SearchIcon.js +0 -7
- package/dist/icons/core/TickIcon.d.ts +0 -1
- package/dist/icons/core/TickIcon.js +0 -5
- package/dist/icons/core/User.d.ts +0 -1
- package/dist/utils/useClickOutside.d.ts +0 -1
package/src/styles/theme.css
CHANGED
|
@@ -47,18 +47,18 @@
|
|
|
47
47
|
--color-danger: var(--color-danger-600);
|
|
48
48
|
--color-danger-contrast: var(--color-neutral-50);
|
|
49
49
|
|
|
50
|
-
/* Success color palette - Tailwind v4
|
|
51
|
-
--color-success-50: oklch(0.
|
|
52
|
-
--color-success-100: oklch(0.
|
|
53
|
-
--color-success-200: oklch(0.
|
|
54
|
-
--color-success-300: oklch(0.
|
|
55
|
-
--color-success-400: oklch(0.
|
|
56
|
-
--color-success-500: oklch(0.
|
|
57
|
-
--color-success-600: oklch(0.
|
|
58
|
-
--color-success-700: oklch(0.
|
|
59
|
-
--color-success-800: oklch(0.
|
|
60
|
-
--color-success-900: oklch(0.
|
|
61
|
-
--color-success-950: oklch(0.
|
|
50
|
+
/* Success color palette - Tailwind v4 teal */
|
|
51
|
+
--color-success-50: oklch(0.984 0.014 180.72);
|
|
52
|
+
--color-success-100: oklch(0.953 0.051 180.801);
|
|
53
|
+
--color-success-200: oklch(0.91 0.096 180.426);
|
|
54
|
+
--color-success-300: oklch(0.855 0.138 181.071);
|
|
55
|
+
--color-success-400: oklch(0.777 0.152 181.912);
|
|
56
|
+
--color-success-500: oklch(0.704 0.14 182.503);
|
|
57
|
+
--color-success-600: oklch(0.6 0.118 184.704);
|
|
58
|
+
--color-success-700: oklch(0.511 0.096 186.391);
|
|
59
|
+
--color-success-800: oklch(0.437 0.078 188.216);
|
|
60
|
+
--color-success-900: oklch(0.386 0.063 188.416);
|
|
61
|
+
--color-success-950: oklch(0.277 0.046 192.524);
|
|
62
62
|
|
|
63
63
|
--color-success: var(--color-success-600);
|
|
64
64
|
--color-success-contrast: var(--color-neutral-50);
|
|
@@ -93,7 +93,7 @@
|
|
|
93
93
|
--color-surface: oklch(100% 0 0);
|
|
94
94
|
--color-chart-track: rgba(0, 0, 0, 0.06);
|
|
95
95
|
--color-background: oklch(98.5% 0.002 247.839);
|
|
96
|
-
--color-background-secondary: oklch(
|
|
96
|
+
--color-background-secondary: oklch(98.5% 0 0);
|
|
97
97
|
--color-background-tertiary: oklch(90% 0.002 247.839);
|
|
98
98
|
--color-background-quaternary: oklch(85% 0.002 247.839);
|
|
99
99
|
--color-background-quinary: oklch(80% 0.002 247.839);
|
|
@@ -159,8 +159,8 @@
|
|
|
159
159
|
--metric-radius: calc(var(--radius-base) * 2);
|
|
160
160
|
|
|
161
161
|
/* Surfaces (3x base = 24px) */
|
|
162
|
-
--card-radius: calc(var(--radius-base) *
|
|
163
|
-
--modal-radius: calc(var(--radius-base) *
|
|
162
|
+
--card-radius: calc(var(--radius-base) * 1.5);
|
|
163
|
+
--modal-radius: calc(var(--radius-base) * 1.5);
|
|
164
164
|
|
|
165
165
|
/* Special shapes - not part of scale */
|
|
166
166
|
--segmented-radius: var(--form-radius);
|
|
@@ -200,7 +200,7 @@
|
|
|
200
200
|
--button-icon-size-lg: var(--form-min-h-lg);
|
|
201
201
|
|
|
202
202
|
/* Badge variables */
|
|
203
|
-
--badge-radius:
|
|
203
|
+
--badge-radius: 6px;
|
|
204
204
|
|
|
205
205
|
/* Segmented variables - now defined in radius system above */
|
|
206
206
|
--segmented-min-h-sm: var(--form-min-h-sm);
|
|
@@ -296,6 +296,50 @@
|
|
|
296
296
|
--shadow-color-warning: var(--color-warning);
|
|
297
297
|
--shadow-color-danger: var(--color-danger);
|
|
298
298
|
--shadow-color-secondary: var(--color-secondary);
|
|
299
|
+
|
|
300
|
+
/* Neumorphic tokens — light mode (multi-layer realistic) */
|
|
301
|
+
--neu-raised-shadow:
|
|
302
|
+
1px 1px 2px rgba(0, 0, 0, 0.04), 3px 3px 6px rgba(0, 0, 0, 0.06),
|
|
303
|
+
6px 6px 14px rgba(0, 0, 0, 0.08), 12px 12px 28px rgba(0, 0, 0, 0.04),
|
|
304
|
+
-1px -1px 2px rgba(255, 255, 255, 0.5),
|
|
305
|
+
-3px -3px 6px rgba(255, 255, 255, 0.5),
|
|
306
|
+
-6px -6px 14px rgba(255, 255, 255, 0.3),
|
|
307
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.6), inset 0 -1px 0 rgba(0, 0, 0, 0.04);
|
|
308
|
+
--neu-inset-shadow:
|
|
309
|
+
inset 1px 1px 2px rgba(0, 0, 0, 0.06),
|
|
310
|
+
inset 2px 2px 4px rgba(0, 0, 0, 0.06),
|
|
311
|
+
inset 4px 4px 8px rgba(0, 0, 0, 0.05),
|
|
312
|
+
inset 8px 8px 16px rgba(0, 0, 0, 0.03),
|
|
313
|
+
inset -1px -1px 2px rgba(255, 255, 255, 0.5),
|
|
314
|
+
inset -3px -3px 6px rgba(255, 255, 255, 0.4),
|
|
315
|
+
inset -6px -6px 12px rgba(255, 255, 255, 0.2),
|
|
316
|
+
0 1px 0 rgba(255, 255, 255, 0.5);
|
|
317
|
+
--neu-circle-groove-shadow:
|
|
318
|
+
inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.08),
|
|
319
|
+
inset 1px 1px 3px rgba(0, 0, 0, 0.08),
|
|
320
|
+
inset 2px 2px 5px rgba(0, 0, 0, 0.04), 0.5px 0.5px 1px rgba(0, 0, 0, 0.4),
|
|
321
|
+
1px 1px 2px rgba(0, 0, 0, 0.3);
|
|
322
|
+
--neu-circle-disc-shadow:
|
|
323
|
+
inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.05),
|
|
324
|
+
inset 1px 1px 3px rgba(0, 0, 0, 0.04),
|
|
325
|
+
inset -0.5px -0.5px 1px rgba(255, 255, 255, 0.4),
|
|
326
|
+
inset -1px -1px 2px rgba(255, 255, 255, 0.3), 0 1px 2px rgba(0, 0, 0, 0.06),
|
|
327
|
+
0 2px 4px rgba(0, 0, 0, 0.04);
|
|
328
|
+
--neu-raised-border: linear-gradient(
|
|
329
|
+
145deg,
|
|
330
|
+
rgba(255, 255, 255, 0.7) 0%,
|
|
331
|
+
rgba(255, 255, 255, 0.35) 30%,
|
|
332
|
+
transparent 50%,
|
|
333
|
+
rgba(0, 0, 0, 0.06) 100%
|
|
334
|
+
);
|
|
335
|
+
--neu-inset-border: linear-gradient(
|
|
336
|
+
180deg,
|
|
337
|
+
rgba(0, 0, 0, 0.1) 0%,
|
|
338
|
+
rgba(0, 0, 0, 0.04) 25%,
|
|
339
|
+
rgba(255, 255, 255, 0.15) 50%,
|
|
340
|
+
rgba(255, 255, 255, 0.35) 75%,
|
|
341
|
+
rgba(255, 255, 255, 0.5) 100%
|
|
342
|
+
);
|
|
299
343
|
}
|
|
300
344
|
|
|
301
345
|
/* ============================================
|
|
@@ -370,5 +414,50 @@
|
|
|
370
414
|
--ui-scrollbar-thumb-active: rgb(75 85 99);
|
|
371
415
|
--ui-scrollbar-track-rest: transparent;
|
|
372
416
|
--ui-scrollbar-track-active: rgba(55, 65, 81, 0.1);
|
|
417
|
+
|
|
418
|
+
/* Neumorphic tokens — dark mode (multi-layer realistic) */
|
|
419
|
+
--neu-raised-shadow:
|
|
420
|
+
1px 1px 2px rgba(0, 0, 0, 0.2), 3px 3px 6px rgba(0, 0, 0, 0.25),
|
|
421
|
+
6px 6px 14px rgba(0, 0, 0, 0.2), 12px 12px 28px rgba(0, 0, 0, 0.1),
|
|
422
|
+
-1px -1px 2px rgba(255, 255, 255, 0.02),
|
|
423
|
+
-3px -3px 6px rgba(255, 255, 255, 0.015),
|
|
424
|
+
-6px -6px 14px rgba(255, 255, 255, 0.01),
|
|
425
|
+
inset 0 1px 0 rgba(255, 255, 255, 0.04),
|
|
426
|
+
inset 0 -1px 0 rgba(0, 0, 0, 0.15);
|
|
427
|
+
--neu-inset-shadow:
|
|
428
|
+
inset 1px 1px 2px rgba(0, 0, 0, 0.3),
|
|
429
|
+
inset 2px 2px 4px rgba(0, 0, 0, 0.25),
|
|
430
|
+
inset 4px 4px 8px rgba(0, 0, 0, 0.2),
|
|
431
|
+
inset 8px 8px 16px rgba(0, 0, 0, 0.1),
|
|
432
|
+
inset -1px -1px 2px rgba(255, 255, 255, 0.02),
|
|
433
|
+
inset -3px -3px 6px rgba(255, 255, 255, 0.015),
|
|
434
|
+
0 1px 0 rgba(255, 255, 255, 0.04);
|
|
435
|
+
--neu-circle-groove-shadow:
|
|
436
|
+
inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.4),
|
|
437
|
+
inset 1px 1px 2px rgba(0, 0, 0, 0.35),
|
|
438
|
+
inset 2px 2px 5px rgba(0, 0, 0, 0.2),
|
|
439
|
+
0.5px 0.5px 1px rgba(255, 255, 255, 0.04),
|
|
440
|
+
1px 1px 2px rgba(255, 255, 255, 0.03);
|
|
441
|
+
--neu-circle-disc-shadow:
|
|
442
|
+
inset 0.5px 0.5px 1px rgba(0, 0, 0, 0.2),
|
|
443
|
+
inset 1px 1px 3px rgba(0, 0, 0, 0.15),
|
|
444
|
+
inset -0.5px -0.5px 1px rgba(255, 255, 255, 0.04),
|
|
445
|
+
inset -1px -1px 2px rgba(255, 255, 255, 0.03),
|
|
446
|
+
0 1px 2px rgba(0, 0, 0, 0.25), 0 2px 4px rgba(0, 0, 0, 0.2);
|
|
447
|
+
--neu-raised-border: linear-gradient(
|
|
448
|
+
145deg,
|
|
449
|
+
rgba(255, 255, 255, 0.2) 0%,
|
|
450
|
+
rgba(255, 255, 255, 0.08) 30%,
|
|
451
|
+
transparent 50%,
|
|
452
|
+
rgba(0, 0, 0, 0.12) 100%
|
|
453
|
+
);
|
|
454
|
+
--neu-inset-border: linear-gradient(
|
|
455
|
+
180deg,
|
|
456
|
+
rgba(0, 0, 0, 0.4) 0%,
|
|
457
|
+
rgba(0, 0, 0, 0.15) 25%,
|
|
458
|
+
rgba(255, 255, 255, 0.03) 50%,
|
|
459
|
+
rgba(255, 255, 255, 0.08) 75%,
|
|
460
|
+
rgba(255, 255, 255, 0.12) 100%
|
|
461
|
+
);
|
|
373
462
|
}
|
|
374
463
|
}
|
package/src/theme-plugin.css
CHANGED
|
@@ -9,3 +9,16 @@
|
|
|
9
9
|
--font-weight-bold: 700;
|
|
10
10
|
--font-weight-extrabold: 800;
|
|
11
11
|
}
|
|
12
|
+
|
|
13
|
+
/* bg-image arbitrary value support for consumers */
|
|
14
|
+
@utility bg-image-scale-* {
|
|
15
|
+
--bg-image-scale: --value([number]);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
@utility bg-image-blur-* {
|
|
19
|
+
--bg-image-blur: --value([length]);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
@utility bg-image-opacity-* {
|
|
23
|
+
--bg-image-opacity: --value([number], [percentage]);
|
|
24
|
+
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import { ExclamationTriangleIcon, CheckCircleIcon } from '@heroicons/react/16/solid';
|
|
3
|
-
import { approvalCardTheme } from './ApprovalCard.theme.js';
|
|
4
|
-
import { Card } from '../../core/Card/Card.js';
|
|
5
|
-
import { Badge } from '../../core/Badge/Badge.js';
|
|
6
|
-
import { Button } from '../../core/Button/Button.js';
|
|
7
|
-
import 'react';
|
|
8
|
-
import { cn } from '../../../utils/cn.js';
|
|
9
|
-
|
|
10
|
-
const ApprovalCard = ({ title, subtitle, variant = "default", riskLevel = "medium", onApprove, onDeny, children, isApproving = false, className, }) => {
|
|
11
|
-
const riskColor = approvalCardTheme.badgeColors[riskLevel];
|
|
12
|
-
const riskIcon = riskLevel === "critical" || riskLevel === "high" ? (jsx(ExclamationTriangleIcon, { className: "" })) : (jsx(CheckCircleIcon, { className: "" }));
|
|
13
|
-
return (jsxs(Card, { className: cn(approvalCardTheme.baseStyle, approvalCardTheme.variants[variant], className), children: [jsx(Card.Header, { children: jsx("div", { className: "flex flex-col items-start", children: jsxs(Badge, { variant: "outline", color: riskColor, size: "sm", iconStart: riskIcon, className: "font-semibold shadow", children: [riskLevel.toUpperCase(), " RISK"] }) }) }), jsxs(Card.Body, { className: "space-y-3", children: [jsxs("div", { className: "space-y-1", children: [jsx(Card.Title, { className: "", children: title }), subtitle && (jsx("p", { className: "text-sm md:text-base text-[var(--color-text-secondary)]/80", children: subtitle }))] }), children && (jsx("div", { className: "bg-[var(--color-background-secondary)] rounded-md p-3 text-sm font-mono border border-[var(--color-border)] overflow-x-auto", children: children }))] }), jsxs(Card.Footer, { className: "justify-end gap-2 mt-3", children: [jsx(Button, { variant: "outline", color: "neutral", size: "sm", onClick: onDeny, children: "Deny" }), jsx(Button, { color: riskColor, size: "sm", state: isApproving ? "loading" : "default", onClick: onApprove, children: "Approve" })] })] }));
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export { ApprovalCard };
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export declare const approvalCardTheme: {
|
|
2
|
-
baseStyle: string;
|
|
3
|
-
variants: {
|
|
4
|
-
default: string;
|
|
5
|
-
glass: string;
|
|
6
|
-
};
|
|
7
|
-
badgeColors: {
|
|
8
|
-
readonly low: "success";
|
|
9
|
-
readonly medium: "warning";
|
|
10
|
-
readonly high: "danger";
|
|
11
|
-
readonly critical: "danger";
|
|
12
|
-
};
|
|
13
|
-
};
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const approvalCardTheme = {
|
|
2
|
-
baseStyle: "overflow-hidden",
|
|
3
|
-
variants: {
|
|
4
|
-
default: "border border-[var(--color-border)] bg-white dark:bg-[var(--color-background-secondary)]",
|
|
5
|
-
glass: "glass-effect",
|
|
6
|
-
},
|
|
7
|
-
badgeColors: {
|
|
8
|
-
low: "success",
|
|
9
|
-
medium: "warning",
|
|
10
|
-
high: "danger",
|
|
11
|
-
critical: "danger",
|
|
12
|
-
},
|
|
13
|
-
};
|
|
14
|
-
|
|
15
|
-
export { approvalCardTheme };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
export type ApprovalRiskLevel = "low" | "medium" | "high" | "critical";
|
|
3
|
-
export type ApprovalCardVariant = "default" | "glass";
|
|
4
|
-
export interface ApprovalCardProps {
|
|
5
|
-
/**
|
|
6
|
-
* Title of the approval request
|
|
7
|
-
*/
|
|
8
|
-
title: string;
|
|
9
|
-
/**
|
|
10
|
-
* Subtitle or context for the user
|
|
11
|
-
*/
|
|
12
|
-
subtitle?: string;
|
|
13
|
-
/**
|
|
14
|
-
* Risk level determining visual severity
|
|
15
|
-
* @default "medium"
|
|
16
|
-
*/
|
|
17
|
-
riskLevel?: ApprovalRiskLevel;
|
|
18
|
-
/**
|
|
19
|
-
* Visual style variant
|
|
20
|
-
* @default "default"
|
|
21
|
-
*/
|
|
22
|
-
variant?: ApprovalCardVariant;
|
|
23
|
-
/**
|
|
24
|
-
* Callback when user approves the action
|
|
25
|
-
*/
|
|
26
|
-
onApprove: () => void;
|
|
27
|
-
/**
|
|
28
|
-
* Callback when user denies/cancels the action
|
|
29
|
-
*/
|
|
30
|
-
onDeny: () => void;
|
|
31
|
-
/**
|
|
32
|
-
* Optional payload to display (e.g. code snippet, JSON)
|
|
33
|
-
*/
|
|
34
|
-
children?: ReactNode;
|
|
35
|
-
/**
|
|
36
|
-
* Loading state for the approve button
|
|
37
|
-
*/
|
|
38
|
-
isApproving?: boolean;
|
|
39
|
-
/**
|
|
40
|
-
* Additional class names
|
|
41
|
-
*/
|
|
42
|
-
className?: string;
|
|
43
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { MessageHistoryProps } from "./MessageHistory.types";
|
|
3
|
-
/**
|
|
4
|
-
* MessageHistory - Virtualized message container with auto-scroll
|
|
5
|
-
*
|
|
6
|
-
* Displays a scrollable list of chat messages with support for
|
|
7
|
-
* auto-scrolling on new messages and optional virtualization.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* ```tsx
|
|
11
|
-
* <MessageHistory
|
|
12
|
-
* messages={messages}
|
|
13
|
-
* virtualizeThreshold={50}
|
|
14
|
-
* autoScroll
|
|
15
|
-
* />
|
|
16
|
-
* ```
|
|
17
|
-
*/
|
|
18
|
-
export declare const MessageHistory: React.ForwardRefExoticComponent<MessageHistoryProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import React__default, { useRef, useCallback, useEffect, useMemo } from 'react';
|
|
3
|
-
import { messageHistoryTheme } from './MessageHistory.theme.js';
|
|
4
|
-
import { Message } from '../../core/Message/Message.js';
|
|
5
|
-
import '../../core/Message/TypeWriter.js';
|
|
6
|
-
import '../../core/Message/MessageBody.js';
|
|
7
|
-
import { cn } from '../../../utils/cn.js';
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* MessageHistory - Virtualized message container with auto-scroll
|
|
11
|
-
*
|
|
12
|
-
* Displays a scrollable list of chat messages with support for
|
|
13
|
-
* auto-scrolling on new messages and optional virtualization.
|
|
14
|
-
*
|
|
15
|
-
* @example
|
|
16
|
-
* ```tsx
|
|
17
|
-
* <MessageHistory
|
|
18
|
-
* messages={messages}
|
|
19
|
-
* virtualizeThreshold={50}
|
|
20
|
-
* autoScroll
|
|
21
|
-
* />
|
|
22
|
-
* ```
|
|
23
|
-
*/
|
|
24
|
-
const MessageHistory = React__default.forwardRef(({ messages, virtualizeThreshold = 50, autoScroll = true, showTimestamps = true, renderMessage, onCopyMessage, onRegenerateMessage, className, theme: customTheme = {}, ...props }, ref) => {
|
|
25
|
-
const scrollRef = useRef(null);
|
|
26
|
-
const lastMessageCountRef = useRef(0);
|
|
27
|
-
const userHasScrolledRef = useRef(false);
|
|
28
|
-
// Determine if virtualization should be enabled
|
|
29
|
-
const shouldVirtualize = messages.length > virtualizeThreshold;
|
|
30
|
-
// For simple virtualization, track visible range
|
|
31
|
-
const [visibleRange, setVisibleRange] = React__default.useState({
|
|
32
|
-
start: 0,
|
|
33
|
-
end: 50,
|
|
34
|
-
});
|
|
35
|
-
// Merge theme
|
|
36
|
-
const containerStyle = customTheme.containerStyle || messageHistoryTheme.containerStyle;
|
|
37
|
-
const scrollAreaStyle = customTheme.scrollAreaStyle || messageHistoryTheme.scrollAreaStyle;
|
|
38
|
-
const messageListStyle = customTheme.messageListStyle || messageHistoryTheme.messageListStyle;
|
|
39
|
-
const emptyStateStyle = customTheme.emptyStateStyle || messageHistoryTheme.emptyStateStyle;
|
|
40
|
-
// Scroll to bottom
|
|
41
|
-
const scrollToBottom = useCallback(() => {
|
|
42
|
-
if (scrollRef.current) {
|
|
43
|
-
scrollRef.current.scrollTop = scrollRef.current.scrollHeight;
|
|
44
|
-
}
|
|
45
|
-
}, []);
|
|
46
|
-
// Auto-scroll on new messages
|
|
47
|
-
useEffect(() => {
|
|
48
|
-
if (autoScroll && messages.length > lastMessageCountRef.current) {
|
|
49
|
-
// Only auto-scroll if user hasn't manually scrolled up
|
|
50
|
-
if (!userHasScrolledRef.current) {
|
|
51
|
-
scrollToBottom();
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
lastMessageCountRef.current = messages.length;
|
|
55
|
-
}, [messages.length, autoScroll, scrollToBottom]);
|
|
56
|
-
// Track user scroll position
|
|
57
|
-
const handleScroll = useCallback(() => {
|
|
58
|
-
if (!scrollRef.current)
|
|
59
|
-
return;
|
|
60
|
-
const { scrollTop, scrollHeight, clientHeight } = scrollRef.current;
|
|
61
|
-
const isAtBottom = scrollHeight - scrollTop - clientHeight < 100;
|
|
62
|
-
userHasScrolledRef.current = !isAtBottom;
|
|
63
|
-
// Update visible range for virtualization
|
|
64
|
-
if (shouldVirtualize) {
|
|
65
|
-
const itemHeight = 100; // Approximate message height
|
|
66
|
-
const start = Math.max(0, Math.floor(scrollTop / itemHeight) - 5);
|
|
67
|
-
const end = Math.min(messages.length, start + Math.ceil(clientHeight / itemHeight) + 10);
|
|
68
|
-
setVisibleRange({ start, end });
|
|
69
|
-
}
|
|
70
|
-
}, [shouldVirtualize, messages.length]);
|
|
71
|
-
// Initial scroll to bottom
|
|
72
|
-
useEffect(() => {
|
|
73
|
-
scrollToBottom();
|
|
74
|
-
}, [scrollToBottom]);
|
|
75
|
-
// Get visible messages
|
|
76
|
-
const visibleMessages = useMemo(() => {
|
|
77
|
-
if (!shouldVirtualize)
|
|
78
|
-
return messages;
|
|
79
|
-
return messages.slice(visibleRange.start, visibleRange.end);
|
|
80
|
-
}, [messages, shouldVirtualize, visibleRange]);
|
|
81
|
-
// Default message renderer
|
|
82
|
-
const defaultRenderMessage = useCallback((message, index) => (jsx(Message, { role: message.role, content: message.content, timestamp: message.timestamp, avatar: message.avatar, showTimestamp: showTimestamps, isStreaming: message.isStreaming, onCopy: onCopyMessage ? () => onCopyMessage(message) : undefined, onRegenerate: onRegenerateMessage ? () => onRegenerateMessage(message) : undefined }, message.id)), [showTimestamps, onCopyMessage, onRegenerateMessage]);
|
|
83
|
-
// Empty state
|
|
84
|
-
if (messages.length === 0) {
|
|
85
|
-
return (jsx("div", { ref: ref, className: cn(containerStyle, className), ...props, children: jsx("div", { className: emptyStateStyle, children: jsx("p", { children: "No messages yet. Start a conversation!" }) }) }));
|
|
86
|
-
}
|
|
87
|
-
return (jsx("div", { ref: ref, className: cn(containerStyle, className), ...props, children: jsx("div", { ref: scrollRef, className: scrollAreaStyle, onScroll: handleScroll, role: "log", "aria-label": "Message history", "aria-live": "polite", children: jsx("div", { className: messageListStyle, style: shouldVirtualize
|
|
88
|
-
? {
|
|
89
|
-
paddingTop: `${visibleRange.start * 100}px`,
|
|
90
|
-
paddingBottom: `${(messages.length - visibleRange.end) * 100}px`,
|
|
91
|
-
}
|
|
92
|
-
: undefined, children: visibleMessages.map((message, index) => renderMessage
|
|
93
|
-
? renderMessage(message, visibleRange.start + index)
|
|
94
|
-
: defaultRenderMessage(message, visibleRange.start + index)) }) }) }));
|
|
95
|
-
});
|
|
96
|
-
MessageHistory.displayName = "MessageHistory";
|
|
97
|
-
|
|
98
|
-
export { MessageHistory };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
const messageHistoryTheme = {
|
|
2
|
-
containerStyle: "flex flex-col h-full",
|
|
3
|
-
scrollAreaStyle: "flex-1 overflow-y-auto scroll-smooth",
|
|
4
|
-
messageListStyle: "flex flex-col gap-4 p-4",
|
|
5
|
-
emptyStateStyle: "flex items-center justify-center h-full text-[var(--color-text-muted)]",
|
|
6
|
-
};
|
|
7
|
-
|
|
8
|
-
export { messageHistoryTheme };
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import { ReactNode } from "react";
|
|
2
|
-
import { MessageRole, MessageAvatarProps } from "../../core/Message";
|
|
3
|
-
/**
|
|
4
|
-
* Message data structure for MessageHistory
|
|
5
|
-
*/
|
|
6
|
-
export interface ChatMessageData {
|
|
7
|
-
/**
|
|
8
|
-
* Unique identifier for the message
|
|
9
|
-
*/
|
|
10
|
-
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* Role of the message sender
|
|
13
|
-
*/
|
|
14
|
-
role: MessageRole;
|
|
15
|
-
/**
|
|
16
|
-
* Message content (text or ReactNode)
|
|
17
|
-
*/
|
|
18
|
-
content: ReactNode;
|
|
19
|
-
/**
|
|
20
|
-
* Timestamp of the message
|
|
21
|
-
*/
|
|
22
|
-
timestamp?: Date | string;
|
|
23
|
-
/**
|
|
24
|
-
* Avatar configuration
|
|
25
|
-
*/
|
|
26
|
-
avatar?: MessageAvatarProps;
|
|
27
|
-
/**
|
|
28
|
-
* Whether the message is currently streaming
|
|
29
|
-
*/
|
|
30
|
-
isStreaming?: boolean;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* MessageHistory component props
|
|
34
|
-
*/
|
|
35
|
-
export interface MessageHistoryProps extends React.HTMLAttributes<HTMLDivElement> {
|
|
36
|
-
/**
|
|
37
|
-
* Array of messages to display
|
|
38
|
-
*/
|
|
39
|
-
messages: ChatMessageData[];
|
|
40
|
-
/**
|
|
41
|
-
* Threshold for enabling virtualization
|
|
42
|
-
* When messages.length > virtualizeThreshold, virtualization is enabled
|
|
43
|
-
* @default 50
|
|
44
|
-
*/
|
|
45
|
-
virtualizeThreshold?: number;
|
|
46
|
-
/**
|
|
47
|
-
* Whether to auto-scroll to bottom on new messages
|
|
48
|
-
* @default true
|
|
49
|
-
*/
|
|
50
|
-
autoScroll?: boolean;
|
|
51
|
-
/**
|
|
52
|
-
* Whether to show timestamps
|
|
53
|
-
* @default true
|
|
54
|
-
*/
|
|
55
|
-
showTimestamps?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Custom render function for messages
|
|
58
|
-
*/
|
|
59
|
-
renderMessage?: (message: ChatMessageData, index: number) => ReactNode;
|
|
60
|
-
/**
|
|
61
|
-
* Callback when copy button is clicked
|
|
62
|
-
*/
|
|
63
|
-
onCopyMessage?: (message: ChatMessageData) => void;
|
|
64
|
-
/**
|
|
65
|
-
* Callback when regenerate button is clicked
|
|
66
|
-
*/
|
|
67
|
-
onRegenerateMessage?: (message: ChatMessageData) => void;
|
|
68
|
-
/**
|
|
69
|
-
* Additional className
|
|
70
|
-
*/
|
|
71
|
-
className?: string;
|
|
72
|
-
/**
|
|
73
|
-
* Theme overrides
|
|
74
|
-
*/
|
|
75
|
-
theme?: MessageHistoryThemeOverrides;
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Theme configuration
|
|
79
|
-
*/
|
|
80
|
-
export interface MessageHistoryTheme {
|
|
81
|
-
containerStyle: string;
|
|
82
|
-
scrollAreaStyle: string;
|
|
83
|
-
messageListStyle: string;
|
|
84
|
-
emptyStateStyle: string;
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Theme overrides
|
|
88
|
-
*/
|
|
89
|
-
export interface MessageHistoryThemeOverrides {
|
|
90
|
-
containerStyle?: string;
|
|
91
|
-
scrollAreaStyle?: string;
|
|
92
|
-
messageListStyle?: string;
|
|
93
|
-
emptyStateStyle?: string;
|
|
94
|
-
}
|
package/dist/icons/Icon.d.ts
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface IconProps extends React.SVGProps<SVGSVGElement> {
|
|
3
|
-
size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number;
|
|
4
|
-
color?: string;
|
|
5
|
-
strokeWidth?: number;
|
|
6
|
-
className?: string;
|
|
7
|
-
/**
|
|
8
|
-
* Force dark mode styling for the icon. Use when placing the icon
|
|
9
|
-
* on a dark background while the page is in light mode. This applies the
|
|
10
|
-
* 'dark' class to the container, making the icon use light colors for visibility.
|
|
11
|
-
* @default false
|
|
12
|
-
*/
|
|
13
|
-
darkMode?: boolean;
|
|
14
|
-
}
|
|
15
|
-
export interface IconComponent extends React.FC<IconProps> {
|
|
16
|
-
displayName?: string;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Icon factory function to create consistent icons
|
|
20
|
-
* @param Svg - The SVG component to render
|
|
21
|
-
* @param displayName - The display name for the component
|
|
22
|
-
* @returns A standardized Icon component
|
|
23
|
-
*/
|
|
24
|
-
export declare function createIcon(Svg: React.FC<IconProps>, displayName: string): IconComponent;
|
package/dist/icons/Icon.js
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* Icon factory function to create consistent icons
|
|
5
|
-
* @param Svg - The SVG component to render
|
|
6
|
-
* @param displayName - The display name for the component
|
|
7
|
-
* @returns A standardized Icon component
|
|
8
|
-
*/
|
|
9
|
-
function createIcon(Svg, displayName) {
|
|
10
|
-
const Icon = ({ size = 'md', color = 'currentColor', strokeWidth = 2, className = '', darkMode = false, ...props }) => {
|
|
11
|
-
// Map size names to pixel values
|
|
12
|
-
const sizeMap = {
|
|
13
|
-
xs: '16px',
|
|
14
|
-
sm: '20px',
|
|
15
|
-
md: '24px',
|
|
16
|
-
lg: '32px',
|
|
17
|
-
xl: '40px',
|
|
18
|
-
};
|
|
19
|
-
const pixelSize = typeof size === 'string' ? sizeMap[size] || '24px' : `${size}px`;
|
|
20
|
-
const svg = (jsx(Svg, { width: pixelSize, height: pixelSize, fill: "none", stroke: color, strokeWidth: strokeWidth, className: className, "aria-hidden": "true", style: { width: pixelSize, height: pixelSize, ...props.style }, ...props }));
|
|
21
|
-
if (darkMode) {
|
|
22
|
-
return (jsx("span", { className: "dark inline-flex", children: svg }));
|
|
23
|
-
}
|
|
24
|
-
return svg;
|
|
25
|
-
};
|
|
26
|
-
Icon.displayName = displayName;
|
|
27
|
-
return Icon;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export { createIcon };
|
package/dist/icons/Index.d.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
export * from './Icon';
|
|
2
|
-
export * from './core/PlusIcon';
|
|
3
|
-
export * from './core/MinusIcon';
|
|
4
|
-
export * from './core/SearchIcon';
|
|
5
|
-
export * from './core/LockIcon';
|
|
6
|
-
export * from './core/DollarIcon';
|
|
7
|
-
export * from './core/TickIcon';
|
|
8
|
-
import React from 'react';
|
|
9
|
-
interface IconProps {
|
|
10
|
-
size?: 'xs' | 'sm' | 'md' | 'lg';
|
|
11
|
-
className?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const CalendarIcon: React.FC<IconProps>;
|
|
14
|
-
export declare const ClockIcon: React.FC<IconProps>;
|
|
15
|
-
export declare const ChartBarIcon: React.FC<IconProps>;
|
|
16
|
-
export declare const UserIcon: React.FC<IconProps>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const ChevronUpDownIcon: import("../Icon").IconComponent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createIcon } from '../Icon.js';
|
|
3
|
-
|
|
4
|
-
const ChevronUpDownSvg = (props) => (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [jsx("path", { d: "m7 15 5 5 5-5" }), jsx("path", { d: "m7 9 5-5 5 5" })] }));
|
|
5
|
-
const ChevronUpDownIcon = createIcon(ChevronUpDownSvg, 'ChevronUpDownIcon');
|
|
6
|
-
|
|
7
|
-
export { ChevronUpDownIcon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const DollarIcon: import("../Icon").IconComponent;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createIcon } from '../Icon.js';
|
|
3
|
-
|
|
4
|
-
const DollarSvg = (props) => (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [jsx("line", { x1: "12", x2: "12", y1: "2", y2: "22" }), jsx("path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6" })] }));
|
|
5
|
-
createIcon(DollarSvg, 'DollarIcon');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const LockIcon: import("../Icon").IconComponent;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createIcon } from '../Icon.js';
|
|
3
|
-
|
|
4
|
-
const LockSvg = (props) => (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [jsx("rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2" }), jsx("path", { d: "M7 11V7a5 5 0 0 1 10 0v4" })] }));
|
|
5
|
-
createIcon(LockSvg, 'LockIcon');
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const MinusIcon: import("../Icon").IconComponent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createIcon } from '../Icon.js';
|
|
3
|
-
|
|
4
|
-
const MinusSvg = (props) => (jsx("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: jsx("path", { d: "M5 12h14" }) }));
|
|
5
|
-
const MinusIcon = createIcon(MinusSvg, 'MinusIcon');
|
|
6
|
-
|
|
7
|
-
export { MinusIcon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const PlusIcon: import("../Icon").IconComponent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createIcon } from '../Icon.js';
|
|
3
|
-
|
|
4
|
-
const PlusSvg = (props) => (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [jsx("path", { d: "M5 12h14" }), jsx("path", { d: "M12 5v14" })] }));
|
|
5
|
-
const PlusIcon = createIcon(PlusSvg, 'PlusIcon');
|
|
6
|
-
|
|
7
|
-
export { PlusIcon };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const SearchIcon: import("../Icon").IconComponent;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { jsxs, jsx } from 'react/jsx-runtime';
|
|
2
|
-
import { createIcon } from '../Icon.js';
|
|
3
|
-
|
|
4
|
-
const SearchSvg = (props) => (jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", strokeLinecap: "round", strokeLinejoin: "round", ...props, children: [jsx("circle", { cx: "11", cy: "11", r: "8" }), jsx("path", { d: "m21 21-4.3-4.3" })] }));
|
|
5
|
-
const SearchIcon = createIcon(SearchSvg, 'SearchIcon');
|
|
6
|
-
|
|
7
|
-
export { SearchIcon };
|