entasis 0.6.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 (65) 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/KeyValueInput/keyValueInput.theme.js +2 -2
  28. package/dist/components/Form/MultiStepForm/multiStepForm.theme.js +1 -1
  29. package/dist/components/Form/NumberInput/numberInput.theme.js +2 -2
  30. package/dist/components/Form/PasswordInput/passwordInput.theme.js +2 -2
  31. package/dist/components/Form/PhoneInput/phoneInput.theme.js +2 -2
  32. package/dist/components/Form/PinInput/pinInput.theme.js +2 -2
  33. package/dist/components/Form/TagsInput/tagsInput.theme.js +2 -2
  34. package/dist/components/Form/TextArea/textArea.theme.js +2 -2
  35. package/dist/components/Form/TextInput/textInput.theme.js +2 -2
  36. package/dist/components/Form/TimeInput/timeInput.theme.js +2 -2
  37. package/dist/components/Form/VoiceInput/voiceInput.theme.js +2 -2
  38. package/dist/components/GanttChart/ganttChart.theme.js +2 -2
  39. package/dist/components/Grid/gridSpan.theme.js +2 -2
  40. package/dist/components/MediaVolume/mediaVolumeControl.theme.js +1 -1
  41. package/dist/components/MenuBar/menuBar.theme.js +2 -2
  42. package/dist/components/MenuOption/menuOption.theme.js +2 -2
  43. package/dist/components/MetadataList/metadataList.theme.js +2 -2
  44. package/dist/components/MiniCalendar/miniCalendar.theme.js +2 -2
  45. package/dist/components/NetworkIndicator/networkIndicator.mcp.d.ts +1 -1
  46. package/dist/components/NetworkIndicator/networkIndicator.mcp.js +1 -1
  47. package/dist/components/NetworkIndicator/networkIndicator.theme.js +2 -2
  48. package/dist/components/QRCode/qrCode.theme.js +2 -2
  49. package/dist/components/RichTextInput/richTextInput.theme.js +2 -2
  50. package/dist/components/ScrollArea/scrollArea.theme.js +2 -2
  51. package/dist/components/SegmentedControl/segmentedControl.theme.js +1 -1
  52. package/dist/components/SelectionMenu/selectionMenu.theme.js +1 -1
  53. package/dist/components/Sidebar/sidebar.mcp.d.ts +1 -1
  54. package/dist/components/Sidebar/sidebar.mcp.js +23 -1
  55. package/dist/components/Sidebar/sidebar.theme.js +42 -43
  56. package/dist/components/SortableList/sortableList.theme.js +2 -2
  57. package/dist/components/SpinnerText/spinnerText.mcp.d.ts +1 -1
  58. package/dist/components/SpinnerText/spinnerText.mcp.js +1 -1
  59. package/dist/components/SpinnerText/spinnerText.theme.js +2 -2
  60. package/dist/components/ToggleButton/toggleButton.theme.js +1 -1
  61. package/dist/components/ToggleButtonGroup/toggleButtonGroup.theme.js +1 -1
  62. package/dist/components/ToggleMenu/toggleMenu.theme.js +2 -2
  63. package/dist/components/VideoPlayer/videoPlayer.theme.js +2 -2
  64. package/dist/generated/componentMcpRegistry.d.ts +4 -4
  65. 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);
@@ -87,5 +87,5 @@ export const keyValueInputTheme = {
87
87
  removeButton: defaultRemoveButton,
88
88
  addButton: defaultAddButton
89
89
  };
90
- export const setKeyValueInputTheme = setComponentTheme('keyValueInput');
91
- export const useKeyValueInputTheme = useComponentTheme('keyValueInput', keyValueInputTheme);
90
+ export const setKeyValueInputTheme = setComponentTheme('key-value-input');
91
+ export const useKeyValueInputTheme = useComponentTheme('key-value-input', keyValueInputTheme);
@@ -48,5 +48,5 @@ export const multiStepFormTheme = {
48
48
  multiStepFormContent: defaultMultiStepContent,
49
49
  multiStepFormFooter: defaultMultiStepFooter
50
50
  };
51
- export const setMultiStepFormTheme = setComponentTheme('multiStepForm');
51
+ export const setMultiStepFormTheme = setComponentTheme('multi-step-form');
52
52
  export const useMultiStepFormTheme = useComponentTheme('multiStepForm', multiStepFormTheme);
@@ -38,5 +38,5 @@ export const numberInputTheme = {
38
38
  input: defaultInput,
39
39
  inputContainer: defaultInputContainer
40
40
  };
41
- export const setNumberInputTheme = setComponentTheme('numberInput');
42
- export const useNumberInputTheme = useComponentTheme('numberInput', numberInputTheme);
41
+ export const setNumberInputTheme = setComponentTheme('number-input');
42
+ export const useNumberInputTheme = useComponentTheme('number-input', numberInputTheme);
@@ -38,5 +38,5 @@ export const passwordInputTheme = {
38
38
  input: defaultInput,
39
39
  inputContainer: defaultInputContainer
40
40
  };
41
- export const setPasswordInputTheme = setComponentTheme('passwordInput');
42
- export const usePasswordInputTheme = useComponentTheme('passwordInput', passwordInputTheme);
41
+ export const setPasswordInputTheme = setComponentTheme('password-input');
42
+ export const usePasswordInputTheme = useComponentTheme('password-input', passwordInputTheme);
@@ -217,5 +217,5 @@ export const phoneInputTheme = {
217
217
  countryCheck: defaultCountryCheck,
218
218
  countryEmpty: defaultCountryEmpty
219
219
  };
220
- export const setPhoneInputTheme = setComponentTheme('phoneInput');
221
- export const usePhoneInputTheme = useComponentTheme('phoneInput', phoneInputTheme);
220
+ export const setPhoneInputTheme = setComponentTheme('phone-input');
221
+ export const usePhoneInputTheme = useComponentTheme('phone-input', phoneInputTheme);
@@ -66,5 +66,5 @@ export const pinInputTheme = {
66
66
  character: defaultCharacter,
67
67
  caret: defaultCaret
68
68
  };
69
- export const setPinInputTheme = setComponentTheme('pinInput');
70
- export const usePinInputTheme = useComponentTheme('pinInput', pinInputTheme);
69
+ export const setPinInputTheme = setComponentTheme('pin-input');
70
+ export const usePinInputTheme = useComponentTheme('pin-input', pinInputTheme);
@@ -87,5 +87,5 @@ export const tagsInputTheme = {
87
87
  error: defaultError,
88
88
  noOptions: defaultNoOptions
89
89
  };
90
- export const setTagsInputTheme = setComponentTheme('tagsInput');
91
- export const useTagsInputTheme = useComponentTheme('tagsInput', tagsInputTheme);
90
+ export const setTagsInputTheme = setComponentTheme('tags-input');
91
+ export const useTagsInputTheme = useComponentTheme('tags-input', tagsInputTheme);
@@ -38,5 +38,5 @@ export const textAreaTheme = {
38
38
  input: defaultTextArea,
39
39
  inputContainer: defaultTextAreaContainer
40
40
  };
41
- export const setTextAreaTheme = setComponentTheme('textArea');
42
- export const useTextAreaTheme = useComponentTheme('textArea', textAreaTheme);
41
+ export const setTextAreaTheme = setComponentTheme('text-area');
42
+ export const useTextAreaTheme = useComponentTheme('text-area', textAreaTheme);
@@ -38,5 +38,5 @@ export const textInputTheme = {
38
38
  input: defaultInput,
39
39
  inputContainer: defaultInputContainer
40
40
  };
41
- export const setTextInputTheme = setComponentTheme('textInput');
42
- export const useTextInputTheme = useComponentTheme('textInput', textInputTheme);
41
+ export const setTextInputTheme = setComponentTheme('text-input');
42
+ export const useTextInputTheme = useComponentTheme('text-input', textInputTheme);
@@ -88,5 +88,5 @@ export const timeInputTheme = {
88
88
  pickerScrollArea: defaultPickerScrollArea,
89
89
  pickerOption: defaultPickerOption
90
90
  };
91
- export const setTimeInputTheme = setComponentTheme('timeInput');
92
- export const useTimeInputTheme = useComponentTheme('timeInput', timeInputTheme);
91
+ export const setTimeInputTheme = setComponentTheme('time-input');
92
+ export const useTimeInputTheme = useComponentTheme('time-input', timeInputTheme);
@@ -346,5 +346,5 @@ export const voiceInputTheme = {
346
346
  timer: defaultTimer,
347
347
  error: defaultError
348
348
  };
349
- export const setVoiceInputTheme = setComponentTheme('voiceInput');
350
- export const useVoiceInputTheme = useComponentTheme('voiceInput', voiceInputTheme);
349
+ export const setVoiceInputTheme = setComponentTheme('voice-input');
350
+ export const useVoiceInputTheme = useComponentTheme('voice-input', voiceInputTheme);
@@ -267,5 +267,5 @@ export const ganttChartTheme = {
267
267
  empty,
268
268
  liveRegion
269
269
  };
270
- export const setGanttChartTheme = setComponentTheme('ganttChart');
271
- export const useGanttChartTheme = useComponentTheme('ganttChart', ganttChartTheme);
270
+ export const setGanttChartTheme = setComponentTheme('gantt-chart');
271
+ export const useGanttChartTheme = useComponentTheme('gantt-chart', ganttChartTheme);
@@ -28,5 +28,5 @@ const defaultGridSpan = cva({
28
28
  export const gridSpanTheme = {
29
29
  root: defaultGridSpan
30
30
  };
31
- export const setGridSpanTheme = setComponentTheme('gridSpan');
32
- export const useGridSpanTheme = useComponentTheme('gridSpan', gridSpanTheme);
31
+ export const setGridSpanTheme = setComponentTheme('grid-span');
32
+ export const useGridSpanTheme = useComponentTheme('grid-span', gridSpanTheme);
@@ -45,5 +45,5 @@ export const mediaVolumeControlTheme = {
45
45
  panel: defaultMediaVolumeControlPanel,
46
46
  slider: defaultMediaVolumeControlSlider
47
47
  };
48
- export const setMediaVolumeControlTheme = setComponentTheme('mediaVolumeControl');
48
+ export const setMediaVolumeControlTheme = setComponentTheme('media-volume-control');
49
49
  export const useMediaVolumeControlTheme = useComponentTheme('mediaVolumeControl', mediaVolumeControlTheme);
@@ -30,5 +30,5 @@ export const menuBarTheme = {
30
30
  root: defaultMenuBar,
31
31
  trigger: defaultMenuBarTrigger
32
32
  };
33
- export const setMenuBarTheme = setComponentTheme('menuBar');
34
- export const useMenuBarTheme = useComponentTheme('menuBar', menuBarTheme);
33
+ export const setMenuBarTheme = setComponentTheme('menu-bar');
34
+ export const useMenuBarTheme = useComponentTheme('menu-bar', menuBarTheme);
@@ -139,5 +139,5 @@ export const menuOptionTheme = {
139
139
  suffix: defaultMenuOptionSuffix,
140
140
  content: defaultMenuOptionContent
141
141
  };
142
- export const setMenuOptionTheme = setComponentTheme('menuOption');
143
- export const useMenuOptionTheme = useComponentTheme('menuOption', menuOptionTheme);
142
+ export const setMenuOptionTheme = setComponentTheme('menu-option');
143
+ export const useMenuOptionTheme = useComponentTheme('menu-option', menuOptionTheme);
@@ -189,5 +189,5 @@ export const metadataListTheme = {
189
189
  toggle: defaultToggle,
190
190
  toggleIcon: defaultToggleIcon
191
191
  };
192
- export const setMetadataListTheme = setComponentTheme('metadataList');
193
- export const useMetadataListTheme = useComponentTheme('metadataList', metadataListTheme);
192
+ export const setMetadataListTheme = setComponentTheme('metadata-list');
193
+ export const useMetadataListTheme = useComponentTheme('metadata-list', metadataListTheme);
@@ -175,5 +175,5 @@ export const miniCalendarTheme = {
175
175
  dayMonth: defaultDayMonth,
176
176
  dayNumber: defaultDayNumber
177
177
  };
178
- export const setMiniCalendarTheme = setComponentTheme('miniCalendar');
179
- export const useMiniCalendarTheme = useComponentTheme('miniCalendar', miniCalendarTheme);
178
+ export const setMiniCalendarTheme = setComponentTheme('mini-calendar');
179
+ export const useMiniCalendarTheme = useComponentTheme('mini-calendar', miniCalendarTheme);
@@ -1 +1 @@
1
- export declare const networkIndicatorDescription = "\n# NetworkIndicator Component\n\nNetworkIndicator is a fixed top loading bar for SvelteKit navigation and explicit async work. Mount one instance near the root layout. It shows automatically during SvelteKit route transitions, can be driven by a controlled `loading` prop, and exposes imperative helpers for request lifecycles.\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n\timport { NetworkIndicator } from 'entasis/network-indicator';\n</script>\n```\n\n## Basic Usage\n\n```svelte\n<!-- +layout.svelte -->\n<script lang=\"ts\">\n\timport { NetworkIndicator } from 'entasis/network-indicator';\n</script>\n\n<NetworkIndicator />\n\n{@render children()}\n```\n\n## Props\n\n- **loading**: boolean = false\n - Controlled visibility. Use this when the owner already has request state or when rendering examples/previews.\n- **variant**: 'bar' | 'trail' | 'trail-bounce' = 'bar'\n - `bar` progressively grows one indicator. `trail` renders one randomly sized moving segment at a time. `trail-bounce` sends that random trail fully off one edge, then returns from the opposite edge.\n- **trailGap**: number = 0\n - Pause between trail passes in milliseconds. Only applies to `variant=\"trail\"`.\n- **color**: 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' = 'neutral'\n - Applies the semantic color token to the bar.\n- **height**: number = 3\n - Height in pixels. Keep most navigation indicators between 2 and 6.\n- Animation duration and easing come from the `motion` theme slot \u2014 `theme={{ motion: { duration: 450, easing: 'expoOut' } }}` \u2014 not from props; see Motion below.\n- **label**: string = 'Loading'\n - Accessible label for the indeterminate `role=\"progressbar\"`.\n- **ref**: HTMLDivElement | null\n - Bindable root element reference while the indicator is visible.\n- **class**: string\n - Additional classes for the root bar.\n- **theme**: NetworkIndicatorThemeProps\n - Theme override for the root bar.\n\n## Helper API\n\n```ts\nimport {\n\thideNetworkIndicator,\n\tshowNetworkIndicator,\n\ttoggleNetworkIndicator\n} from 'entasis/network-indicator';\n```\n\nPrefer `showNetworkIndicator()` and `hideNetworkIndicator()` for async work. `toggleNetworkIndicator()` is available for simple demos or manual toggles, but it is easier to desynchronize in request lifecycles.\n\n## Patterns\n\n### Controlled Loading\n\n```svelte\n<script lang=\"ts\">\n\timport { NetworkIndicator } from 'entasis/network-indicator';\n\n\tlet loading = $state(false);\n</script>\n\n<NetworkIndicator {loading} color=\"primary\" label=\"Saving changes\" />\n```\n\n### Async Request\n\n```svelte\n<script lang=\"ts\">\n\timport { Button } from 'entasis/button';\n\timport {\n\t\thideNetworkIndicator,\n\t\tshowNetworkIndicator\n\t} from 'entasis/network-indicator';\n\n\tasync function save() {\n\t\tshowNetworkIndicator();\n\t\ttry {\n\t\t\tawait fetch('/api/save', { method: 'POST' });\n\t\t} finally {\n\t\t\thideNetworkIndicator();\n\t\t}\n\t}\n</script>\n\n<Button onclick={save}>Save</Button>\n```\n\n### Color Variations\n\n```svelte\n<NetworkIndicator loading color=\"primary\" />\n<NetworkIndicator loading color=\"success\" />\n<NetworkIndicator loading color=\"warning\" />\n<NetworkIndicator loading color=\"danger\" />\n```\n\n### Trail Variant\n\n```svelte\n<NetworkIndicator loading variant=\"trail\" color=\"primary\" theme={{ motion: { duration: 650 } }} trailGap={0} />\n<NetworkIndicator loading variant=\"trail\" color=\"success\" height={5} theme={{ motion: { duration: 450 } }} trailGap={120} />\n<NetworkIndicator loading variant=\"trail-bounce\" color=\"info\" theme={{ motion: { duration: 700 } }} trailGap={80} />\n```\n\n### Height Variations\n\n```svelte\n<NetworkIndicator loading height={2} />\n<NetworkIndicator loading height={4} color=\"primary\" />\n<NetworkIndicator loading height={6} color=\"info\" />\n```\n\n### Motion Variations\n\n```svelte\n<NetworkIndicator loading theme={{ motion: { duration: 300, easing: 'cubicInOut' } }} />\n<NetworkIndicator loading theme={{ motion: { duration: 450, easing: 'expoOut' } }} />\n<NetworkIndicator loading theme={{ motion: { duration: 500, easing: 'backOut' } }} />\n```\n\n### Theme Override\n\n```svelte\n<NetworkIndicator\n\tloading\n\tcolor=\"success\"\n\theight={5}\n\ttheme={{\n\t\troot: {\n\t\t\tbase: 'ui-network-indicator fixed top-0 left-0 w-full z-[9999] origin-left rounded-none lift-4'\n\t\t}\n\t}}\n/>\n```\n\n## Theme\n\nThe theme has two parts:\n\n- **root**: the fixed top bar.\n - `base`: positioning, origin, radius, z-index, and shared bar classes.\n - `variant`: `bar`, `trail`, or `trail-bounce` container styling.\n - `color`: semantic color variants.\n- **segment**: trail segment styling.\n - `base`: segment positioning, radius, opacity, shadow, and transform hints.\n - `color`: semantic color variants for each trail segment.\n\nThe default root base includes `ui-network-indicator`; keep that class if overriding the base because `toggleNetworkIndicator()` uses it to read current state.\n\n## Accessibility\n\nThe visible bar renders `role=\"progressbar\"` without a value because progress is indeterminate. Use a specific `label` when the loading context matters, such as \"Uploading files\" or \"Saving changes\". If screen readers need richer lifecycle announcements, pair the indicator with app-level live region text.\n\n## Motion\n\n- **motion** theme slot, keyed by `variant`: one growth step of the `bar` loop (`slow`), or\n one pass of the `trail` / `trail-bounce` variants (the `slower` token, 500ms). Only `duration` / `easing` are read.\n- Ladder: `<Theme components={{ networkIndicator: { motion } }}>` \u2192\n `setNetworkIndicatorTheme({ motion })` \u2192 `theme={{ motion: { duration, easing } }}`.\n- A resolved duration of 0 (reduced motion) holds the indicator still instead of looping.\n";
1
+ export declare const networkIndicatorDescription = "\n# NetworkIndicator Component\n\nNetworkIndicator is a fixed top loading bar for SvelteKit navigation and explicit async work. Mount one instance near the root layout. It shows automatically during SvelteKit route transitions, can be driven by a controlled `loading` prop, and exposes imperative helpers for request lifecycles.\n\n## Import\n\n```svelte\n<script lang=\"ts\">\n\timport { NetworkIndicator } from 'entasis/network-indicator';\n</script>\n```\n\n## Basic Usage\n\n```svelte\n<!-- +layout.svelte -->\n<script lang=\"ts\">\n\timport { NetworkIndicator } from 'entasis/network-indicator';\n</script>\n\n<NetworkIndicator />\n\n{@render children()}\n```\n\n## Props\n\n- **loading**: boolean = false\n - Controlled visibility. Use this when the owner already has request state or when rendering examples/previews.\n- **variant**: 'bar' | 'trail' | 'trail-bounce' = 'bar'\n - `bar` progressively grows one indicator. `trail` renders one randomly sized moving segment at a time. `trail-bounce` sends that random trail fully off one edge, then returns from the opposite edge.\n- **trailGap**: number = 0\n - Pause between trail passes in milliseconds. Only applies to `variant=\"trail\"`.\n- **color**: 'primary' | 'secondary' | 'neutral' | 'danger' | 'success' | 'warning' | 'info' = 'neutral'\n - Applies the semantic color token to the bar.\n- **height**: number = 3\n - Height in pixels. Keep most navigation indicators between 2 and 6.\n- Animation duration and easing come from the `motion` theme slot \u2014 `theme={{ motion: { duration: 450, easing: 'expoOut' } }}` \u2014 not from props; see Motion below.\n- **label**: string = 'Loading'\n - Accessible label for the indeterminate `role=\"progressbar\"`.\n- **ref**: HTMLDivElement | null\n - Bindable root element reference while the indicator is visible.\n- **class**: string\n - Additional classes for the root bar.\n- **theme**: NetworkIndicatorThemeProps\n - Theme override for the root bar.\n\n## Helper API\n\n```ts\nimport {\n\thideNetworkIndicator,\n\tshowNetworkIndicator,\n\ttoggleNetworkIndicator\n} from 'entasis/network-indicator';\n```\n\nPrefer `showNetworkIndicator()` and `hideNetworkIndicator()` for async work. `toggleNetworkIndicator()` is available for simple demos or manual toggles, but it is easier to desynchronize in request lifecycles.\n\n## Patterns\n\n### Controlled Loading\n\n```svelte\n<script lang=\"ts\">\n\timport { NetworkIndicator } from 'entasis/network-indicator';\n\n\tlet loading = $state(false);\n</script>\n\n<NetworkIndicator {loading} color=\"primary\" label=\"Saving changes\" />\n```\n\n### Async Request\n\n```svelte\n<script lang=\"ts\">\n\timport { Button } from 'entasis/button';\n\timport {\n\t\thideNetworkIndicator,\n\t\tshowNetworkIndicator\n\t} from 'entasis/network-indicator';\n\n\tasync function save() {\n\t\tshowNetworkIndicator();\n\t\ttry {\n\t\t\tawait fetch('/api/save', { method: 'POST' });\n\t\t} finally {\n\t\t\thideNetworkIndicator();\n\t\t}\n\t}\n</script>\n\n<Button onclick={save}>Save</Button>\n```\n\n### Color Variations\n\n```svelte\n<NetworkIndicator loading color=\"primary\" />\n<NetworkIndicator loading color=\"success\" />\n<NetworkIndicator loading color=\"warning\" />\n<NetworkIndicator loading color=\"danger\" />\n```\n\n### Trail Variant\n\n```svelte\n<NetworkIndicator loading variant=\"trail\" color=\"primary\" theme={{ motion: { duration: 650 } }} trailGap={0} />\n<NetworkIndicator loading variant=\"trail\" color=\"success\" height={5} theme={{ motion: { duration: 450 } }} trailGap={120} />\n<NetworkIndicator loading variant=\"trail-bounce\" color=\"info\" theme={{ motion: { duration: 700 } }} trailGap={80} />\n```\n\n### Height Variations\n\n```svelte\n<NetworkIndicator loading height={2} />\n<NetworkIndicator loading height={4} color=\"primary\" />\n<NetworkIndicator loading height={6} color=\"info\" />\n```\n\n### Motion Variations\n\n```svelte\n<NetworkIndicator loading theme={{ motion: { duration: 300, easing: 'cubicInOut' } }} />\n<NetworkIndicator loading theme={{ motion: { duration: 450, easing: 'expoOut' } }} />\n<NetworkIndicator loading theme={{ motion: { duration: 500, easing: 'backOut' } }} />\n```\n\n### Theme Override\n\n```svelte\n<NetworkIndicator\n\tloading\n\tcolor=\"success\"\n\theight={5}\n\ttheme={{\n\t\troot: {\n\t\t\tbase: 'ui-network-indicator fixed top-0 left-0 w-full z-[9999] origin-left rounded-none lift-4'\n\t\t}\n\t}}\n/>\n```\n\n## Theme\n\nThe theme has two parts:\n\n- **root**: the fixed top bar.\n - `base`: positioning, origin, radius, z-index, and shared bar classes.\n - `variant`: `bar`, `trail`, or `trail-bounce` container styling.\n - `color`: semantic color variants.\n- **segment**: trail segment styling.\n - `base`: segment positioning, radius, opacity, shadow, and transform hints.\n - `color`: semantic color variants for each trail segment.\n\nThe default root base includes `ui-network-indicator`; keep that class if overriding the base because `toggleNetworkIndicator()` uses it to read current state.\n\n## Accessibility\n\nThe visible bar renders `role=\"progressbar\"` without a value because progress is indeterminate. Use a specific `label` when the loading context matters, such as \"Uploading files\" or \"Saving changes\". If screen readers need richer lifecycle announcements, pair the indicator with app-level live region text.\n\n## Motion\n\n- **motion** theme slot, keyed by `variant`: one growth step of the `bar` loop (`slow`), or\n one pass of the `trail` / `trail-bounce` variants (the `slower` token, 500ms). Only `duration` / `easing` are read.\n- Ladder: `<Theme components={{ 'network-indicator': { motion } }}>` \u2192\n `setNetworkIndicatorTheme({ motion })` \u2192 `theme={{ motion: { duration, easing } }}`.\n- A resolved duration of 0 (reduced motion) holds the indicator still instead of looping.\n";
@@ -165,7 +165,7 @@ The visible bar renders \`role="progressbar"\` without a value because progress
165
165
 
166
166
  - **motion** theme slot, keyed by \`variant\`: one growth step of the \`bar\` loop (\`slow\`), or
167
167
  one pass of the \`trail\` / \`trail-bounce\` variants (the \`slower\` token, 500ms). Only \`duration\` / \`easing\` are read.
168
- - Ladder: \`<Theme components={{ networkIndicator: { motion } }}>\` →
168
+ - Ladder: \`<Theme components={{ 'network-indicator': { motion } }}>\` →
169
169
  \`setNetworkIndicatorTheme({ motion })\` → \`theme={{ motion: { duration, easing } }}\`.
170
170
  - A resolved duration of 0 (reduced motion) holds the indicator still instead of looping.
171
171
  `;
@@ -77,6 +77,6 @@ export const networkIndicatorTheme = {
77
77
  root: defaultNetworkIndicator,
78
78
  segment: defaultNetworkIndicatorSegment
79
79
  };
80
- export const setNetworkIndicatorTheme = setComponentTheme('networkIndicator');
80
+ export const setNetworkIndicatorTheme = setComponentTheme('network-indicator');
81
81
  export const useNetworkIndicatorTheme = useComponentTheme('networkIndicator', networkIndicatorTheme);
82
- export const useNetworkIndicatorMotion = () => useComponentMotion('networkIndicator', defaultNetworkIndicatorMotion);
82
+ export const useNetworkIndicatorMotion = () => useComponentMotion('network-indicator', defaultNetworkIndicatorMotion);
@@ -26,5 +26,5 @@ const defaultQRCode = cva({
26
26
  export const qrCodeTheme = {
27
27
  root: defaultQRCode
28
28
  };
29
- export const setQRCodeTheme = setComponentTheme('qrCode');
30
- export const useQRCodeTheme = useComponentTheme('qrCode', qrCodeTheme);
29
+ export const setQRCodeTheme = setComponentTheme('qr-code');
30
+ export const useQRCodeTheme = useComponentTheme('qr-code', qrCodeTheme);
@@ -289,5 +289,5 @@ export const richTextInputTheme = {
289
289
  suggestionsStatus: defaultRichTextInputSuggestionsStatus,
290
290
  suggestionsError: defaultRichTextInputSuggestionsError
291
291
  };
292
- export const setRichTextInputTheme = setComponentTheme('richTextInput');
293
- export const useRichTextInputTheme = useComponentTheme('richTextInput', richTextInputTheme);
292
+ export const setRichTextInputTheme = setComponentTheme('rich-text-input');
293
+ export const useRichTextInputTheme = useComponentTheme('rich-text-input', richTextInputTheme);
@@ -41,5 +41,5 @@ export const scrollAreaTheme = {
41
41
  scrollbarX: defaultScrollAreaScrollbarX,
42
42
  scrollbarThumb: defaultScrollAreaScrollbarThumb
43
43
  };
44
- export const setScrollAreaTheme = setComponentTheme('scrollArea');
45
- export const useScrollAreaTheme = useComponentTheme('scrollArea', scrollAreaTheme);
44
+ export const setScrollAreaTheme = setComponentTheme('scroll-area');
45
+ export const useScrollAreaTheme = useComponentTheme('scroll-area', scrollAreaTheme);
@@ -126,5 +126,5 @@ export const segmentedControlTheme = {
126
126
  indicator: defaultIndicator,
127
127
  staticIndicator: defaultStaticIndicator
128
128
  };
129
- export const setSegmentedControlTheme = setComponentTheme('segmentedControl');
129
+ export const setSegmentedControlTheme = setComponentTheme('segmented-control');
130
130
  export const useSegmentedControlTheme = useComponentTheme('segmentedControl', segmentedControlTheme);
@@ -10,5 +10,5 @@ export const selectionMenuTheme = {
10
10
  popover: defaultSelectionMenuPopover,
11
11
  content: defaultSelectionMenuContent
12
12
  };
13
- export const setSelectionMenuTheme = setComponentTheme('selectionMenu');
13
+ export const setSelectionMenuTheme = setComponentTheme('selection-menu');
14
14
  export const useSelectionMenuTheme = useComponentTheme('selectionMenu', selectionMenuTheme);