entasis 0.5.0 → 0.7.0

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 (80) hide show
  1. package/dist/components/AIAskUserQuestion/aiAskUserQuestion.theme.js +1 -1
  2. package/dist/components/AIChat/aiChat.theme.js +2 -2
  3. package/dist/components/AIComposer/aiComposer.theme.js +2 -2
  4. package/dist/components/AIContext/aiContext.theme.js +2 -2
  5. package/dist/components/AIFilePreview/aiFilePreview.theme.js +1 -1
  6. package/dist/components/AIMarker/aiMarker.theme.js +2 -2
  7. package/dist/components/AIMessage/aiMessage.theme.js +2 -2
  8. package/dist/components/AIMessageActions/aiMessageActions.theme.js +1 -1
  9. package/dist/components/AIModelSelector/aiModelSelector.theme.js +1 -1
  10. package/dist/components/AIReasoning/aiReasoning.theme.js +1 -1
  11. package/dist/components/AISuggestion/aiSuggestion.theme.js +1 -1
  12. package/dist/components/AIThread/aiThread.theme.js +2 -2
  13. package/dist/components/AIThreadToc/aiThreadToc.theme.js +1 -1
  14. package/dist/components/AITool/aiTool.theme.js +2 -2
  15. package/dist/components/AudioPlayer/audioPlayer.theme.js +2 -2
  16. package/dist/components/Avatar/avatarGroup.theme.js +1 -1
  17. package/dist/components/Button/button.mcp.d.ts +1 -1
  18. package/dist/components/Button/button.mcp.js +2 -2
  19. package/dist/components/ButtonGroup/buttonGroup.theme.js +1 -1
  20. package/dist/components/DocumentViewer/documentViewer.theme.js +1 -1
  21. package/dist/components/EventCalendar/eventCalendar.theme.js +1 -1
  22. package/dist/components/Form/ColorInput/colorInput.theme.js +2 -2
  23. package/dist/components/Form/ColorPicker/colorPicker.theme.js +2 -2
  24. package/dist/components/Form/DateInput/dateInput.theme.js +2 -2
  25. package/dist/components/Form/DateSelector/dateSelector.theme.js +1 -1
  26. package/dist/components/Form/File/fileInput.theme.js +2 -2
  27. package/dist/components/Form/Form/form.state.svelte.d.ts +4 -4
  28. package/dist/components/Form/Form/visibility.d.ts +54 -54
  29. package/dist/components/Form/KeyValueInput/keyValueInput.theme.js +2 -2
  30. package/dist/components/Form/MultiStepForm/multiStepForm.state.svelte.d.ts +4 -4
  31. package/dist/components/Form/MultiStepForm/multiStepForm.theme.js +1 -1
  32. package/dist/components/Form/NumberInput/numberInput.theme.js +2 -2
  33. package/dist/components/Form/PasswordInput/passwordInput.theme.js +2 -2
  34. package/dist/components/Form/PhoneInput/phoneInput.theme.js +2 -2
  35. package/dist/components/Form/PinInput/pinInput.theme.js +2 -2
  36. package/dist/components/Form/TagsInput/tagsInput.theme.js +2 -2
  37. package/dist/components/Form/TextArea/textArea.theme.js +2 -2
  38. package/dist/components/Form/TextInput/textInput.theme.js +2 -2
  39. package/dist/components/Form/TimeInput/timeInput.theme.js +2 -2
  40. package/dist/components/Form/VoiceInput/voiceInput.theme.js +2 -2
  41. package/dist/components/GanttChart/ganttChart.theme.js +2 -2
  42. package/dist/components/Grid/gridSpan.theme.js +2 -2
  43. package/dist/components/MediaVolume/mediaVolumeControl.theme.js +1 -1
  44. package/dist/components/MenuBar/menuBar.theme.js +2 -2
  45. package/dist/components/MenuOption/menuOption.theme.js +2 -2
  46. package/dist/components/MetadataList/metadataList.theme.js +2 -2
  47. package/dist/components/MiniCalendar/miniCalendar.theme.js +2 -2
  48. package/dist/components/NetworkIndicator/networkIndicator.mcp.d.ts +1 -1
  49. package/dist/components/NetworkIndicator/networkIndicator.mcp.js +1 -1
  50. package/dist/components/NetworkIndicator/networkIndicator.theme.js +2 -2
  51. package/dist/components/QRCode/qrCode.theme.js +2 -2
  52. package/dist/components/RichTextInput/richTextInput.theme.js +2 -2
  53. package/dist/components/ScrollArea/scrollArea.theme.js +2 -2
  54. package/dist/components/SegmentedControl/segmentedControl.theme.js +1 -1
  55. package/dist/components/SelectionMenu/selectionMenu.theme.js +1 -1
  56. package/dist/components/Sidebar/Sidebar.svelte +8 -2
  57. package/dist/components/Sidebar/SidebarDesktopShell.svelte +3 -0
  58. package/dist/components/Sidebar/SidebarDesktopShell.svelte.d.ts +1 -0
  59. package/dist/components/Sidebar/SidebarMobileDrawer.svelte +3 -1
  60. package/dist/components/Sidebar/SidebarMobileDrawer.svelte.d.ts +1 -0
  61. package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
  62. package/dist/components/Sidebar/sidebar.mcp.js +24 -1
  63. package/dist/components/Sidebar/sidebar.props.d.ts +2 -0
  64. package/dist/components/Sidebar/sidebar.theme.d.ts +30 -0
  65. package/dist/components/Sidebar/sidebar.theme.js +46 -43
  66. package/dist/components/SortableList/sortableList.theme.js +2 -2
  67. package/dist/components/SpinnerText/spinnerText.mcp.d.ts +1 -1
  68. package/dist/components/SpinnerText/spinnerText.mcp.js +1 -1
  69. package/dist/components/SpinnerText/spinnerText.theme.js +2 -2
  70. package/dist/components/ToggleButton/toggleButton.theme.js +1 -1
  71. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +1 -1
  72. package/dist/components/ToggleMenu/toggleMenu.theme.js +2 -2
  73. package/dist/components/VideoPlayer/videoPlayer.theme.js +2 -2
  74. package/dist/generated/componentMcpRegistry.d.ts +5 -5
  75. package/dist/tailwind/global.js +4 -1
  76. package/dist/tailwind/theme.mcp.d.ts +1 -1
  77. package/dist/tailwind/theme.mcp.js +1 -1
  78. package/dist/utils/cva/merge.d.ts +108 -0
  79. package/dist/utils/cva/merge.js +6 -2
  80. package/package.json +1 -1
@@ -65,5 +65,5 @@ export const aiAskUserQuestionTheme = {
65
65
  title: defaultTitle,
66
66
  description: defaultDescription
67
67
  };
68
- export const setAIAskUserQuestionTheme = setComponentTheme('aiAskUserQuestion');
68
+ export const setAIAskUserQuestionTheme = setComponentTheme('ai-ask-user-question');
69
69
  export const useAIAskUserQuestionTheme = useComponentTheme('aiAskUserQuestion', aiAskUserQuestionTheme);
@@ -27,5 +27,5 @@ export const aiChatTheme = {
27
27
  footer: defaultFooter,
28
28
  skeletonMessages: defaultSkeletonMessages
29
29
  };
30
- export const setAIChatTheme = setComponentTheme('aiChat');
31
- export const useAIChatTheme = useComponentTheme('aiChat', aiChatTheme);
30
+ export const setAIChatTheme = setComponentTheme('ai-chat');
31
+ export const useAIChatTheme = useComponentTheme('ai-chat', aiChatTheme);
@@ -85,5 +85,5 @@ export const aiComposerTheme = {
85
85
  queueItem: defaultQueueItem,
86
86
  queueText: defaultQueueText
87
87
  };
88
- export const setAIComposerTheme = setComponentTheme('aiComposer');
89
- export const useAIComposerTheme = useComponentTheme('aiComposer', aiComposerTheme);
88
+ export const setAIComposerTheme = setComponentTheme('ai-composer');
89
+ export const useAIComposerTheme = useComponentTheme('ai-composer', aiComposerTheme);
@@ -54,5 +54,5 @@ export const aiContextTheme = {
54
54
  rowLabel: defaultRowLabel,
55
55
  rowValue: defaultRowValue
56
56
  };
57
- export const setAIContextTheme = setComponentTheme('aiContext');
58
- export const useAIContextTheme = useComponentTheme('aiContext', aiContextTheme);
57
+ export const setAIContextTheme = setComponentTheme('ai-context');
58
+ export const useAIContextTheme = useComponentTheme('ai-context', aiContextTheme);
@@ -20,5 +20,5 @@ export const aiFilePreviewTheme = {
20
20
  meta: cva({ base: 'flex items-center gap-xs text-xs text-neutral/70' }),
21
21
  error: cva({ base: 'truncate text-xs text-danger-readable' })
22
22
  };
23
- export const setAIFilePreviewTheme = setComponentTheme('aiFilePreview');
23
+ export const setAIFilePreviewTheme = setComponentTheme('ai-file-preview');
24
24
  export const useAIFilePreviewTheme = useComponentTheme('aiFilePreview', aiFilePreviewTheme);
@@ -25,5 +25,5 @@ export const aiMarkerTheme = {
25
25
  icon: defaultIcon,
26
26
  content: defaultContent
27
27
  };
28
- export const setAIMarkerTheme = setComponentTheme('aiMarker');
29
- export const useAIMarkerTheme = useComponentTheme('aiMarker', aiMarkerTheme);
28
+ export const setAIMarkerTheme = setComponentTheme('ai-marker');
29
+ export const useAIMarkerTheme = useComponentTheme('ai-marker', aiMarkerTheme);
@@ -128,5 +128,5 @@ export const aiMessageTheme = {
128
128
  files: defaultFiles,
129
129
  actions: defaultActions
130
130
  };
131
- export const setAIMessageTheme = setComponentTheme('aiMessage');
132
- export const useAIMessageTheme = useComponentTheme('aiMessage', aiMessageTheme);
131
+ export const setAIMessageTheme = setComponentTheme('ai-message');
132
+ export const useAIMessageTheme = useComponentTheme('ai-message', aiMessageTheme);
@@ -38,5 +38,5 @@ export const aiMessageActionsTheme = {
38
38
  button: defaultButton,
39
39
  error: defaultError
40
40
  };
41
- export const setAIMessageActionsTheme = setComponentTheme('aiMessageActions');
41
+ export const setAIMessageActionsTheme = setComponentTheme('ai-message-actions');
42
42
  export const useAIMessageActionsTheme = useComponentTheme('aiMessageActions', aiMessageActionsTheme);
@@ -35,5 +35,5 @@ export const aiModelSelectorTheme = {
35
35
  group: defaultGroup,
36
36
  empty: defaultEmpty
37
37
  };
38
- export const setAIModelSelectorTheme = setComponentTheme('aiModelSelector');
38
+ export const setAIModelSelectorTheme = setComponentTheme('ai-model-selector');
39
39
  export const useAIModelSelectorTheme = useComponentTheme('aiModelSelector', aiModelSelectorTheme);
@@ -17,5 +17,5 @@ export const aiReasoningTheme = {
17
17
  duration: defaultDuration,
18
18
  content: defaultContent
19
19
  };
20
- export const setAIReasoningTheme = setComponentTheme('aiReasoning');
20
+ export const setAIReasoningTheme = setComponentTheme('ai-reasoning');
21
21
  export const useAIReasoningTheme = useComponentTheme('aiReasoning', aiReasoningTheme);
@@ -7,5 +7,5 @@ export const aiSuggestionTheme = {
7
7
  list: defaultList,
8
8
  suggestion: defaultSuggestion
9
9
  };
10
- export const setAISuggestionTheme = setComponentTheme('aiSuggestion');
10
+ export const setAISuggestionTheme = setComponentTheme('ai-suggestion');
11
11
  export const useAISuggestionTheme = useComponentTheme('aiSuggestion', aiSuggestionTheme);
@@ -60,5 +60,5 @@ export const aiThreadTheme = {
60
60
  tocOverlay: defaultTocOverlay,
61
61
  footer: defaultFooter
62
62
  };
63
- export const setAIThreadTheme = setComponentTheme('aiThread');
64
- export const useAIThreadTheme = useComponentTheme('aiThread', aiThreadTheme);
63
+ export const setAIThreadTheme = setComponentTheme('ai-thread');
64
+ export const useAIThreadTheme = useComponentTheme('ai-thread', aiThreadTheme);
@@ -84,5 +84,5 @@ export const aiThreadTocTheme = {
84
84
  previewMetadata: defaultPreviewMetadata,
85
85
  previewFiles: defaultPreviewFiles
86
86
  };
87
- export const setAIThreadTocTheme = setComponentTheme('aiThreadToc');
87
+ export const setAIThreadTocTheme = setComponentTheme('ai-thread-toc');
88
88
  export const useAIThreadTocTheme = useComponentTheme('aiThreadToc', aiThreadTocTheme);
@@ -310,5 +310,5 @@ export const aiToolTheme = {
310
310
  treeLeaf: defaultTreeLeaf,
311
311
  treeValue: defaultTreeValue
312
312
  };
313
- export const setAIToolTheme = setComponentTheme('aiTool');
314
- export const useAIToolTheme = useComponentTheme('aiTool', aiToolTheme);
313
+ export const setAIToolTheme = setComponentTheme('ai-tool');
314
+ export const useAIToolTheme = useComponentTheme('ai-tool', aiToolTheme);
@@ -363,5 +363,5 @@ export const audioPlayerTheme = {
363
363
  volumeSlider: defaultAudioPlayerVolumeSlider,
364
364
  status: defaultAudioPlayerStatus
365
365
  };
366
- export const setAudioPlayerTheme = setComponentTheme('audioPlayer');
367
- export const useAudioPlayerTheme = useComponentTheme('audioPlayer', audioPlayerTheme);
366
+ export const setAudioPlayerTheme = setComponentTheme('audio-player');
367
+ export const useAudioPlayerTheme = useComponentTheme('audio-player', audioPlayerTheme);
@@ -30,5 +30,5 @@ export const avatarGroupTheme = {
30
30
  root: defaultAvatarGroup,
31
31
  avatarGroupCount: defaultAvatarGroupCount
32
32
  };
33
- export const setAvatarGroupTheme = setComponentTheme('avatarGroup');
33
+ export const setAvatarGroupTheme = setComponentTheme('avatar-group');
34
34
  export const useAvatarGroupTheme = useComponentTheme('avatarGroup', avatarGroupTheme);
@@ -1 +1 @@
1
- export declare const buttonDescription = "\n# Button Component\n\nThe Button component is a flexible and customizable button element that supports various variants, sizes, colors, and interactive states.\n\n## Basic Usage\n\n```svelte\n<Button>Click me</Button>\n<Button variant=\"outline\">Outline Button</Button>\n<Button color=\"primary\" size=\"large\">Large Primary Button</Button>\n```\n\n## Props\n\n### Core Props\n- **variant**: 'solid' | 'outline' | 'soft' | 'ghost' | 'link' (default: 'solid')\n - solid: Filled background with color\n - outline: Transparent background with colored border\n - soft: Muted color background\n - ghost: Transparent background with a transient state layer on hover and press\n - link: Text-only styling with underline on hover\n\n- **color**: 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' (default: 'neutral')\n - Determines the color scheme of the button\n\n- **size**: 'small' | 'normal' | 'large' (default: 'normal')\n - small: 24px height, smaller padding and text\n - normal: 32px height, standard padding\n - large: 36px height, larger padding and text\n\n### Layout Props\n- **fullWidth**: boolean (default: false) - Makes button take full width of container\n- **squared**: boolean - Makes button square (aspect-ratio 1:1), auto-determined if only prefix/suffix is provided\n- **disabled**: boolean (default: false) - Disables button interaction\n- **loading**: boolean (default: false) - Shows the Theme-configured loading spinner and disables interaction\n\n### State Props\nDescribe the meaning; the Button writes the ARIA. Never pass an aria-* attribute to a Button.\n- **pressed**: boolean - Toggle state of a button that stays on or off (a bold button in a toolbar, a \"show password\" eye). Rendered as aria-pressed\n- **selected**: boolean - Chosen state of a button acting as one option among several (a tab, a listbox option). Rendered as aria-selected\n- **expanded**: boolean - Whether the surface this button opens is showing. Rendered as aria-expanded. A entasis surface (Popover, PopupMenu, Select, Combobox) sets this on its own trigger, so pass it only for a surface you open yourself\n- **haspopup**: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | true - What the surface this button opens contains. Rendered as aria-haspopup, and likewise set by a entasis surface on its own trigger\n\n### Link Props\n- **href**: string - Makes button render as anchor tag\n- **target**: string - Link target (e.g., \"_blank\")\n- **rel**: string - Link relationship\n\n### Event Props\n- **onclick**: (event: MouseEvent) => void - Native click event handler\n- **onpointerenter**: (event: PointerEvent) => void - Native pointer enter event handler\n- **onpointerleave**: (event: PointerEvent) => void - Native pointer leave event handler\n\n### Content Props (Slots)\n- **children**: Snippet - Main button content\n- **prefix**: Snippet - Content before main text (typically icons)\n- **suffix**: Snippet - Content after main text (typically icons)\n\n### Advanced Props\n- **label**: string - Accessible label applied as aria-label on the root element (required for icon-only buttons)\n- **ref**: HTMLElement - Reference to the button element\n- **class**: string - Additional CSS classes\n- **theme**: ComponentTheme - Custom theme overrides\n\n## Structure\n\nThe button follows this DOM structure:\n```\n<Button>\n\t<Prefix /> <!-- Optional prefix content -->\n\t<Children /> <!-- Main button content -->\n\t<Suffix /> <!-- Optional suffix content -->\n</Button>\n```\n\n## Examples\n\n### Basic Buttons\n```svelte\n<Button>Default Button</Button>\n<Button variant=\"outline\" color=\"primary\">Primary Outline</Button>\n<Button variant=\"soft\" color=\"danger\">Soft Danger</Button>\n<Button variant=\"ghost\">Ghost Button</Button>\n<Button variant=\"link\">Link Button</Button>\n```\n\n### With Icons\n```svelte\n<Button>\n\t{#snippet prefix()}\n\t\t{@render icon()}\n\t{/snippet}\n\tAdd Item\n</Button>\n\n<Button squared>\n\t{#snippet prefix()}\n\t\t{@render icon()}\n\t{/snippet}\n</Button>\n```\n\n### Interactive States\n```svelte\n<Button loading>Loading...</Button>\n<Button disabled>Disabled</Button>\n<Button fullWidth>Full Width Button</Button>\n```\n\n### As Link\n```svelte\n<Button href=\"/dashboard\" target=\"_blank\">Go to Dashboard</Button>\n```\n\n### With Event Handlers\n```svelte\n<script lang=\"ts\">\n\tfunction handleClick(event: MouseEvent) {\n\t\tconsole.log('Clicked:', event.currentTarget);\n\t}\n</script>\n\n<Button onclick={handleClick}>\n\tClick\n</Button>\n```\n\n### Custom Styling\n```svelte\n<Button class=\"lift-4 border-2\" color=\"primary\" variant=\"outline\">\n\tCustom Styled\n</Button>\n```\n\n## Accessibility\n\n- Automatically sets appropriate ARIA roles (button/link)\n- Supports keyboard navigation\n- Disabled state prevents interaction\n- Loading state provides visual feedback\n\n## Notes\n\n- When `href` is provided, renders as `<a>` tag, otherwise `<button>`\n- `squared` is automatically determined when only prefix or suffix is provided without children\n- All event handlers respect disabled state\n- Icon sizing is automatically adjusted based on button size\n\n## Theme Customization\n\nThe Button component uses a theme object that can be customized using the `theme` prop or by setting a global theme.\n\n### Theme Structure\n\nThe theme object contains the following parts:\n- **root**: Main button container styles\n- **prefix**: Styles for prefix content (icons before text)\n- **suffix**: Styles for suffix content (icons after text)\n\n### Theme Type Definition\n\n```typescript\nimport type { ButtonThemeProps } from 'entasis/button';\n\n// Example theme customization\nconst customTheme: ButtonThemeProps = {\n root: {\n base: 'custom-base-classes',\n size: {\n small: 'custom-small-classes',\n normal: 'custom-normal-classes',\n large: 'custom-large-classes'\n },\n color: {\n primary: 'bg-blue-500 text-white',\n danger: 'bg-red-500 text-white'\n },\n variant: {\n solid: 'bg-color text-color-contrast',\n outline: 'border-2 border-color'\n }\n },\n prefix: {\n size: {\n small: 'w-3 h-3',\n normal: 'w-4 h-4',\n large: 'w-5 h-5'\n }\n }\n};\n```\n\n### Available Variants\n\n**root**:\n- base: Base classes applied to all buttons\n- Variants:\n - size: 'small' | 'normal' | 'large' - Controls padding, text size, and height\n - color: 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' - Color scheme\n - variant: 'solid' | 'outline' | 'soft' | 'ghost' | 'link' - Visual style variant\n - loading: boolean - Loading state styling\n - disabled: boolean - Disabled state styling\n - squared: boolean - Square button styling\n - fullWidth: boolean - Full width styling\n\n**prefix**:\n- base: Base classes for prefix content\n- Variants:\n - size: 'small' | 'normal' | 'large' - Icon size based on button size\n\n**suffix**:\n- base: Base classes for suffix content\n- Variants:\n - size: 'small' | 'normal' | 'large' - Icon size based on button size\n\n### Usage Examples\n\n**Basic Theme Override**:\n```svelte\n<Button \n theme={{\n root: {\n base: 'rounded-full lift-4',\n size: {\n large: 'px-8 py-4 text-xl'\n }\n }\n }}\n>\n Custom Styled Button\n</Button>\n```\n\n**Color Variant Customization**:\n```svelte\n<Button \n color=\"primary\"\n theme={{\n root: {\n color: {\n primary: 'state-layer bg-gradient-to-r from-blue-500 to-purple-500'\n }\n }\n }}\n>\n Gradient Button\n</Button>\n```\n\n**Global Theme Setting**:\n```svelte\n<script>\n import { setButtonTheme } from './index.ts';\n \n setButtonTheme({\n root: {\n variant: {\n solid: 'state-layer bg-color text-color-contrast lift-3 hover:lift-4 transition-shadow',\n outline: 'state-layer border-2 border-color'\n }\n },\n prefix: {\n size: {\n normal: 'w-5 h-5'\n }\n }\n });\n</script>\n```\n";
1
+ export declare const buttonDescription = "\n# Button Component\n\nThe Button component is a flexible and customizable button element that supports various variants, sizes, colors, and interactive states.\n\n## Basic Usage\n\n```svelte\n<Button>Click me</Button>\n<Button variant=\"outline\">Outline Button</Button>\n<Button color=\"primary\" size=\"large\">Large Primary Button</Button>\n```\n\n## Props\n\n### Core Props\n- **variant**: 'solid' | 'outline' | 'soft' | 'ghost' | 'link' (default: 'solid')\n - solid: Filled background with color\n - outline: Transparent background with colored border\n - soft: Muted color background\n - ghost: Transparent background with a transient state layer on hover and press\n - link: Text-only styling with underline on hover\n\n- **color**: 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' (default: 'neutral')\n - Determines the color scheme of the button\n\n- **size**: 'small' | 'normal' | 'large' (default: 'normal')\n - small: 28px height, smaller padding and text\n - normal: 32px height, standard padding\n - large: 36px height, larger padding and text\n\n### Layout Props\n- **fullWidth**: boolean (default: false) - Makes button take full width of container\n- **squared**: boolean - Makes button square (aspect-ratio 1:1), auto-determined if only prefix/suffix is provided\n- **disabled**: boolean (default: false) - Disables button interaction\n- **loading**: boolean (default: false) - Shows the Theme-configured loading spinner and disables interaction\n\n### State Props\nDescribe the meaning; the Button writes the ARIA. Never pass an aria-* attribute to a Button.\n- **pressed**: boolean - Toggle state of a button that stays on or off (a bold button in a toolbar, a \"show password\" eye). Rendered as aria-pressed\n- **selected**: boolean - Chosen state of a button acting as one option among several (a tab, a listbox option). Rendered as aria-selected\n- **expanded**: boolean - Whether the surface this button opens is showing. Rendered as aria-expanded. A entasis surface (Popover, PopupMenu, Select, Combobox) sets this on its own trigger, so pass it only for a surface you open yourself\n- **haspopup**: 'dialog' | 'menu' | 'listbox' | 'tree' | 'grid' | true - What the surface this button opens contains. Rendered as aria-haspopup, and likewise set by a entasis surface on its own trigger\n\n### Link Props\n- **href**: string - Makes button render as anchor tag\n- **target**: string - Link target (e.g., \"_blank\")\n- **rel**: string - Link relationship\n\n### Event Props\n- **onclick**: (event: MouseEvent) => void - Native click event handler\n- **onpointerenter**: (event: PointerEvent) => void - Native pointer enter event handler\n- **onpointerleave**: (event: PointerEvent) => void - Native pointer leave event handler\n\n### Content Props (Slots)\n- **children**: Snippet - Main button content\n- **prefix**: Snippet - Content before main text (typically icons)\n- **suffix**: Snippet - Content after main text (typically icons)\n\n### Advanced Props\n- **label**: string - Accessible label applied as aria-label on the root element (required for icon-only buttons)\n- **ref**: HTMLElement - Reference to the button element\n- **class**: string - Additional CSS classes\n- **theme**: ComponentTheme - Custom theme overrides\n\n## Structure\n\nThe button follows this DOM structure:\n```\n<Button>\n\t<Prefix /> <!-- Optional prefix content -->\n\t<Children /> <!-- Main button content -->\n\t<Suffix /> <!-- Optional suffix content -->\n</Button>\n```\n\n## Examples\n\n### Basic Buttons\n```svelte\n<Button>Default Button</Button>\n<Button variant=\"outline\" color=\"primary\">Primary Outline</Button>\n<Button variant=\"soft\" color=\"danger\">Soft Danger</Button>\n<Button variant=\"ghost\">Ghost Button</Button>\n<Button variant=\"link\">Link Button</Button>\n```\n\n### With Icons\n```svelte\n<Button>\n\t{#snippet prefix()}\n\t\t{@render icon()}\n\t{/snippet}\n\tAdd Item\n</Button>\n\n<Button squared>\n\t{#snippet prefix()}\n\t\t{@render icon()}\n\t{/snippet}\n</Button>\n```\n\n### Interactive States\n```svelte\n<Button loading>Loading...</Button>\n<Button disabled>Disabled</Button>\n<Button fullWidth>Full Width Button</Button>\n```\n\n### As Link\n```svelte\n<Button href=\"/dashboard\" target=\"_blank\">Go to Dashboard</Button>\n```\n\n### With Event Handlers\n```svelte\n<script lang=\"ts\">\n\tfunction handleClick(event: MouseEvent) {\n\t\tconsole.log('Clicked:', event.currentTarget);\n\t}\n</script>\n\n<Button onclick={handleClick}>\n\tClick\n</Button>\n```\n\n### Custom Styling\n```svelte\n<Button class=\"lift-4 border-2\" color=\"primary\" variant=\"outline\">\n\tCustom Styled\n</Button>\n```\n\n## Accessibility\n\n- Automatically sets appropriate ARIA roles (button/link)\n- Supports keyboard navigation\n- Disabled state prevents interaction\n- Loading state provides visual feedback\n\n## Notes\n\n- When `href` is provided, renders as `<a>` tag, otherwise `<button>`\n- `squared` is automatically determined when only prefix or suffix is provided without children\n- All event handlers respect disabled state\n- Icon sizing is automatically adjusted based on button size\n\n## Theme Customization\n\nThe Button component uses a theme object that can be customized using the `theme` prop or by setting a global theme.\n\n### Theme Structure\n\nThe theme object contains the following parts:\n- **root**: Main button container styles\n- **prefix**: Styles for prefix content (icons before text)\n- **suffix**: Styles for suffix content (icons after text)\n\n### Theme Type Definition\n\n```typescript\nimport type { ButtonThemeProps } from 'entasis/button';\n\n// Example theme customization\nconst customTheme: ButtonThemeProps = {\n root: {\n base: 'custom-base-classes',\n size: {\n small: 'custom-small-classes',\n normal: 'custom-normal-classes',\n large: 'custom-large-classes'\n },\n color: {\n primary: 'bg-blue-500 text-white',\n danger: 'bg-red-500 text-white'\n },\n variant: {\n solid: 'bg-color text-color-contrast',\n outline: 'border-2 border-color'\n }\n },\n prefix: {\n size: {\n small: 'w-3 h-3',\n normal: 'w-4 h-4',\n large: 'w-5 h-5'\n }\n }\n};\n```\n\n### Available Variants\n\n**root**:\n- base: Base classes applied to all buttons\n- Variants:\n - size: 'small' | 'normal' | 'large' - Controls padding, text size, and height\n - color: 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' - Color scheme\n - variant: 'solid' | 'outline' | 'soft' | 'ghost' | 'link' - Visual style variant\n - loading: boolean - Loading state styling\n - disabled: boolean - Disabled state styling\n - squared: boolean - Square button styling\n - fullWidth: boolean - Full width styling\n\n**prefix**:\n- base: Base classes for prefix content\n- Variants:\n - size: 'small' | 'normal' | 'large' - Icon size based on button size\n\n**suffix**:\n- base: Base classes for suffix content\n- Variants:\n - size: 'small' | 'normal' | 'large' - Icon size based on button size\n\n### Usage Examples\n\n**Basic Theme Override**:\n```svelte\n<Button \n theme={{\n root: {\n base: 'rounded-full lift-4',\n size: {\n large: 'px-8 py-4 text-xl'\n }\n }\n }}\n>\n Custom Styled Button\n</Button>\n```\n\n**Color Variant Customization**:\n```svelte\n<Button \n color=\"primary\"\n theme={{\n root: {\n color: {\n primary: 'state-layer bg-linear-to-r from-blue-500 to-purple-500'\n }\n }\n }}\n>\n Gradient Button\n</Button>\n```\n\n**Global Theme Setting**:\n```svelte\n<script>\n import { setButtonTheme } from './index.ts';\n \n setButtonTheme({\n root: {\n variant: {\n solid: 'state-layer bg-color text-color-contrast lift-3 hover:lift-4 transition-shadow',\n outline: 'state-layer border-2 border-color'\n }\n },\n prefix: {\n size: {\n normal: 'w-5 h-5'\n }\n }\n });\n</script>\n```\n";
@@ -25,7 +25,7 @@ The Button component is a flexible and customizable button element that supports
25
25
  - Determines the color scheme of the button
26
26
 
27
27
  - **size**: 'small' | 'normal' | 'large' (default: 'normal')
28
- - small: 24px height, smaller padding and text
28
+ - small: 28px height, smaller padding and text
29
29
  - normal: 32px height, standard padding
30
30
  - large: 36px height, larger padding and text
31
31
 
@@ -239,7 +239,7 @@ const customTheme: ButtonThemeProps = {
239
239
  theme={{
240
240
  root: {
241
241
  color: {
242
- primary: 'state-layer bg-gradient-to-r from-blue-500 to-purple-500'
242
+ primary: 'state-layer bg-linear-to-r from-blue-500 to-purple-500'
243
243
  }
244
244
  }
245
245
  }}
@@ -9,5 +9,5 @@ const defaultButtonGroup = cva({
9
9
  export const buttonGroupTheme = {
10
10
  root: defaultButtonGroup
11
11
  };
12
- export const setButtonGroupTheme = setComponentTheme('buttonGroup');
12
+ export const setButtonGroupTheme = setComponentTheme('button-group');
13
13
  export const useButtonGroupTheme = useComponentTheme('buttonGroup', buttonGroupTheme);
@@ -162,5 +162,5 @@ export const documentViewerTheme = {
162
162
  export const documentViewerScrollAreaTheme = {
163
163
  content: { base: 'h-full' }
164
164
  };
165
- export const setDocumentViewerTheme = setComponentTheme('documentViewer');
165
+ export const setDocumentViewerTheme = setComponentTheme('document-viewer');
166
166
  export const useDocumentViewerTheme = useComponentTheme('documentViewer', documentViewerTheme);
@@ -186,5 +186,5 @@ export const eventCalendarTheme = {
186
186
  agendaDetails,
187
187
  resourceHeader
188
188
  };
189
- export const setEventCalendarTheme = setComponentTheme('eventCalendar');
189
+ export const setEventCalendarTheme = setComponentTheme('event-calendar');
190
190
  export const useEventCalendarTheme = useComponentTheme('eventCalendar', eventCalendarTheme);
@@ -63,5 +63,5 @@ export const colorInputTheme = {
63
63
  popover: defaultPopover,
64
64
  swatch: defaultSwatch
65
65
  };
66
- export const setColorInputTheme = setComponentTheme('colorInput');
67
- export const useColorInputTheme = useComponentTheme('colorInput', colorInputTheme);
66
+ export const setColorInputTheme = setComponentTheme('color-input');
67
+ export const useColorInputTheme = useComponentTheme('color-input', colorInputTheme);
@@ -267,5 +267,5 @@ export const colorPickerTheme = {
267
267
  alphaInput: defaultAlphaInput,
268
268
  alphaSuffix: defaultAlphaSuffix
269
269
  };
270
- export const setColorPickerTheme = setComponentTheme('colorPicker');
271
- export const useColorPickerTheme = useComponentTheme('colorPicker', colorPickerTheme);
270
+ export const setColorPickerTheme = setComponentTheme('color-picker');
271
+ export const useColorPickerTheme = useComponentTheme('color-picker', colorPickerTheme);
@@ -42,5 +42,5 @@ export const dateInputTheme = {
42
42
  inputContainer: defaultInputContainer,
43
43
  popover: defaultPopover
44
44
  };
45
- export const setDateInputTheme = setComponentTheme('dateInput');
46
- export const useDateInputTheme = useComponentTheme('dateInput', dateInputTheme);
45
+ export const setDateInputTheme = setComponentTheme('date-input');
46
+ export const useDateInputTheme = useComponentTheme('date-input', dateInputTheme);
@@ -42,5 +42,5 @@ export const dateSelectorTheme = {
42
42
  preset: defaultPreset,
43
43
  calendar: defaultCalendar
44
44
  };
45
- export const setDateSelectorTheme = setComponentTheme('dateSelector');
45
+ export const setDateSelectorTheme = setComponentTheme('date-selector');
46
46
  export const useDateSelectorTheme = useComponentTheme('dateSelector', dateSelectorTheme);
@@ -68,5 +68,5 @@ export const fileInputTheme = {
68
68
  fileList: defaultFileList,
69
69
  file: defaultFile
70
70
  };
71
- export const setFileInputTheme = setComponentTheme('fileInput');
72
- export const useFileInputTheme = useComponentTheme('fileInput', fileInputTheme);
71
+ export const setFileInputTheme = setComponentTheme('file-input');
72
+ export const useFileInputTheme = useComponentTheme('file-input', fileInputTheme);
@@ -553,9 +553,9 @@ export declare class FormState<I extends FormInputs = FormInputs> {
553
553
  disabled?: boolean | undefined;
554
554
  error?: import("../../Slot/slot.js").Slot<undefined> | undefined;
555
555
  class?: string | undefined;
556
+ prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
556
557
  size?: import("../../../types/theme.js").Sizes | undefined;
557
558
  value?: string | null | undefined;
558
- prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
559
559
  suffix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
560
560
  name?: string | undefined;
561
561
  label?: import("../../Slot/slot.js").Slot<undefined> | undefined;
@@ -1324,9 +1324,9 @@ export declare class FormState<I extends FormInputs = FormInputs> {
1324
1324
  disabled?: boolean | undefined;
1325
1325
  error?: import("../../Slot/slot.js").Slot<undefined> | undefined;
1326
1326
  class?: string | undefined;
1327
+ prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
1327
1328
  size?: import("../../../types/theme.js").Sizes | undefined;
1328
1329
  value?: string | null | undefined;
1329
- prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
1330
1330
  suffix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
1331
1331
  name?: string | undefined;
1332
1332
  label?: import("../../Slot/slot.js").Slot<undefined> | undefined;
@@ -2129,9 +2129,9 @@ export declare class FormState<I extends FormInputs = FormInputs> {
2129
2129
  disabled?: boolean | undefined;
2130
2130
  error?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2131
2131
  class?: string | undefined;
2132
+ prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2132
2133
  size?: import("../../../types/theme.js").Sizes | undefined;
2133
2134
  value?: string | null | undefined;
2134
- prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2135
2135
  suffix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2136
2136
  name?: string | undefined;
2137
2137
  label?: import("../../Slot/slot.js").Slot<undefined> | undefined;
@@ -2900,9 +2900,9 @@ export declare class FormState<I extends FormInputs = FormInputs> {
2900
2900
  disabled?: boolean | undefined;
2901
2901
  error?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2902
2902
  class?: string | undefined;
2903
+ prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2903
2904
  size?: import("../../../types/theme.js").Sizes | undefined;
2904
2905
  value?: string | null | undefined;
2905
- prefix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2906
2906
  suffix?: import("../../Slot/slot.js").Slot<undefined> | undefined;
2907
2907
  name?: string | undefined;
2908
2908
  label?: import("../../Slot/slot.js").Slot<undefined> | undefined;