@sewadah/selaras 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 (46) hide show
  1. package/dist/agent/catalog.json +1 -1
  2. package/dist/module.json +1 -1
  3. package/dist/runtime/components/DashboardSidebar.d.vue.ts +16 -1
  4. package/dist/runtime/components/DashboardSidebar.vue +44 -6
  5. package/dist/runtime/components/DashboardSidebar.vue.d.ts +16 -1
  6. package/dist/runtime/components/DatePicker.vue +1 -1
  7. package/dist/runtime/components/NavigationMenu.d.vue.ts +22 -11
  8. package/dist/runtime/components/NavigationMenu.vue +59 -29
  9. package/dist/runtime/components/NavigationMenu.vue.d.ts +22 -11
  10. package/dist/runtime/components/NavigationMenuAccordionItem.vue +2 -2
  11. package/dist/runtime/components/NavigationMenuFlyoutList.vue +2 -2
  12. package/dist/runtime/components/NavigationMenuFlyoutTrigger.d.vue.ts +2 -1
  13. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue +12 -2
  14. package/dist/runtime/components/NavigationMenuFlyoutTrigger.vue.d.ts +2 -1
  15. package/dist/runtime/components/ProsePre.d.vue.ts +2 -2
  16. package/dist/runtime/components/ProsePre.vue +13 -6
  17. package/dist/runtime/components/ProsePre.vue.d.ts +2 -2
  18. package/dist/runtime/components/SplitterPanel.vue +29 -3
  19. package/dist/runtime/components/Stepper.d.vue.ts +5 -0
  20. package/dist/runtime/components/Stepper.vue +12 -0
  21. package/dist/runtime/components/Stepper.vue.d.ts +5 -0
  22. package/dist/runtime/components/Table.vue +6 -1
  23. package/dist/runtime/internal/NavigationMenuTooltip.d.vue.ts +19 -0
  24. package/dist/runtime/internal/NavigationMenuTooltip.vue +13 -0
  25. package/dist/runtime/internal/NavigationMenuTooltip.vue.d.ts +19 -0
  26. package/dist/runtime/internal/stepper-root-element.d.ts +5 -0
  27. package/dist/runtime/internal/stepper-root-element.js +8 -0
  28. package/dist/runtime/structural.css +1 -1
  29. package/dist/runtime/theme/date-picker.d.ts +3 -0
  30. package/dist/runtime/theme/date-picker.js +1 -0
  31. package/dist/runtime/theme/navigation-menu.d.ts +18 -0
  32. package/dist/runtime/theme/navigation-menu.js +21 -28
  33. package/dist/runtime/theme/prose.d.ts +3 -0
  34. package/dist/runtime/theme/prose.js +7 -6
  35. package/dist/runtime/theme/stepper.d.ts +3 -0
  36. package/dist/runtime/theme/stepper.js +1 -0
  37. package/dist/runtime/theme/table.d.ts +6 -3
  38. package/dist/runtime/theme/table.js +5 -3
  39. package/dist/runtime/theme-config.d.ts +1 -1
  40. package/dist/runtime/types/index.d.ts +1 -1
  41. package/dist/runtime/utils/file-icons.js +1 -0
  42. package/dist/runtime/utils/messages.d.ts +4 -0
  43. package/dist/runtime/utils/messages.js +4 -0
  44. package/dist/runtime/utils/navigation-menu.d.ts +17 -0
  45. package/dist/runtime/utils/navigation-menu.js +25 -0
  46. package/package.json +3 -3
@@ -100,7 +100,7 @@ export type { IconRegistry } from '../utils/icons.js';
100
100
  export { defaultIcons } from '../utils/icons.js';
101
101
  export type { MessageRegistry } from '../utils/messages.js';
102
102
  export { defaultMessages } from '../utils/messages.js';
103
- export type { NavigationMenuItem } from '../utils/navigation-menu.js';
103
+ export type { NavigationMenuItem, NavigationMenuPopover, NavigationMenuPositioning } from '../utils/navigation-menu.js';
104
104
  export type { ContextMenuPositioning, OverlayPortal, OverlayPositioning } from '../utils/overlay.js';
105
105
  export type { SelectGroup, SelectIdentity, SelectModel, SelectModelValue, SelectResolvedOption, SelectValue } from '../utils/select-contracts.js';
106
106
  export type { TableEmits, TableProps, TableSlots } from '../utils/table-contracts.js';
@@ -1,5 +1,6 @@
1
1
  export const defaultFileIcons = {
2
2
  "vue": "vscode-icons:file-type-vue",
3
+ "vue-html": "vscode-icons:file-type-vue",
3
4
  "ts": "vscode-icons:file-type-typescript",
4
5
  "typescript": "vscode-icons:file-type-typescript",
5
6
  "mts": "vscode-icons:file-type-typescript",
@@ -18,6 +18,8 @@ export interface MessageRegistry {
18
18
  first: string;
19
19
  last: string;
20
20
  pagination: string;
21
+ stepper: string;
22
+ stepperProgress: (step: number, total: number) => string;
21
23
  scrollTabsLeft: string;
22
24
  scrollTabsRight: string;
23
25
  datePicker: string;
@@ -55,6 +57,8 @@ export interface MessageRegistry {
55
57
  avatarGroupOverflow: (count: number) => string;
56
58
  paginationInfo: (page: number, total: number) => string;
57
59
  codeTabFallback: (index: number) => string;
60
+ copyCode: string;
61
+ codeCopied: string;
58
62
  dropFiles: string;
59
63
  invalidFileType: (name: string) => string;
60
64
  invalidFileSize: (name: string, max: string) => string;
@@ -18,6 +18,8 @@ export const defaultMessages = {
18
18
  first: "First",
19
19
  last: "Last",
20
20
  pagination: "Pagination",
21
+ stepper: "Progress",
22
+ stepperProgress: (step, total) => `Step ${step} of ${total}`,
21
23
  scrollTabsLeft: "Scroll tabs left",
22
24
  scrollTabsRight: "Scroll tabs right",
23
25
  datePicker: "Date picker",
@@ -54,6 +56,8 @@ export const defaultMessages = {
54
56
  avatarGroupOverflow: (count) => `+${count}`,
55
57
  paginationInfo: (page, total) => `Page ${page} of ${total}`,
56
58
  codeTabFallback: (index) => `Tab ${index}`,
59
+ copyCode: "Copy code",
60
+ codeCopied: "Copied!",
57
61
  dropFiles: "Drop files here or click to browse",
58
62
  invalidFileType: (name) => `${name}: invalid file type`,
59
63
  invalidFileSize: (name, max) => `${name}: exceeds the ${max} size limit`,
@@ -1,4 +1,10 @@
1
+ import type { PopoverProps } from '../components/Popover.vue.js';
2
+ import type { TooltipProps } from '../components/Tooltip.vue.js';
1
3
  import type { HotkeyOptions } from '../directives/hotkey.js';
4
+ import type { OverlayPositioning } from './overlay.js';
5
+ export type NavigationMenuPopover = Pick<PopoverProps, 'side' | 'align' | 'positioning' | 'portal' | 'arrow' | 'ui'>;
6
+ /** Alignment of a horizontal navigation menu's compact dropdown. */
7
+ export type NavigationMenuPositioning = Pick<OverlayPositioning, 'align'>;
2
8
  export interface NavigationMenuItem {
3
9
  label: string;
4
10
  icon?: string;
@@ -6,6 +12,10 @@ export interface NavigationMenuItem {
6
12
  target?: string;
7
13
  rel?: string;
8
14
  ariaLabel?: string;
15
+ /** Collapsed leaf tooltip override. `false` disables this item's tooltip. */
16
+ tooltip?: boolean | TooltipProps;
17
+ /** Presentation of this item's collapsed child flyout. */
18
+ popover?: NavigationMenuPopover;
9
19
  disabled?: boolean;
10
20
  /** Force active state - otherwise auto-detected against the current route when `to` is set. */
11
21
  active?: boolean;
@@ -40,3 +50,10 @@ export interface NavigationMenuItem {
40
50
  export declare function isNavigationMenuItemActive(item: NavigationMenuItem, currentPath: string): boolean;
41
51
  /** The v-hotkey binding for an item that opts in with `hotkey: true`. */
42
52
  export declare function navigationMenuHotkey(item: NavigationMenuItem): HotkeyOptions | undefined;
53
+ interface CollapsedNavigationMenuEntry {
54
+ item: NavigationMenuItem;
55
+ boundary: false | 'separator' | 'spacing';
56
+ }
57
+ /** Defer a boundary until the next action, avoiding edge and repeated dividers. */
58
+ export declare function collapsedNavigationMenuEntries(items: NavigationMenuItem[], presentation: 'separator' | 'spacing' | 'none'): CollapsedNavigationMenuEntry[];
59
+ export {};
@@ -6,3 +6,28 @@ export function isNavigationMenuItemActive(item, currentPath) {
6
6
  export function navigationMenuHotkey(item) {
7
7
  return item.hotkey && item.shortcut && !item.disabled ? { keys: item.shortcut } : void 0;
8
8
  }
9
+ export function collapsedNavigationMenuEntries(items, presentation) {
10
+ const entries = [];
11
+ let hasAction = false;
12
+ let groupBoundary = false;
13
+ let explicitBoundary = false;
14
+ for (const item of items) {
15
+ if (item.type === "separator") {
16
+ explicitBoundary = hasAction;
17
+ continue;
18
+ }
19
+ if (item.type === "label") {
20
+ entries.push({ item, boundary: false });
21
+ groupBoundary = hasAction;
22
+ continue;
23
+ }
24
+ const boundary = explicitBoundary ? "separator" : groupBoundary && presentation !== "none" ? presentation : false;
25
+ if (boundary)
26
+ entries.push({ item: { label: item.label, type: "separator" }, boundary });
27
+ entries.push({ item, boundary: false });
28
+ hasAction = true;
29
+ groupBoundary = false;
30
+ explicitBoundary = false;
31
+ }
32
+ return entries;
33
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sewadah/selaras",
3
3
  "type": "module",
4
- "version": "0.5.0",
4
+ "version": "0.7.0",
5
5
  "description": "A UI component library for Nuxt, built on Reka UI and Tailwind v4",
6
6
  "author": "Wicaksana Pratama <wicaksanapratama@gmail.com>",
7
7
  "license": "MIT",
@@ -111,9 +111,9 @@
111
111
  "dev:preview": "bunx nuxt preview docs",
112
112
  "dev:prepare": "bun run docs:prepare",
113
113
  "docs:build": "nuxt build docs",
114
- "docs:dev": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare packages/docs/preview && nuxt dev packages/docs/preview",
114
+ "docs:dev": "nuxt-module-build build --stub && bun run scripts/sync-workspace-dist.mjs && nuxt-module-build prepare && nuxt prepare packages/docs/preview && nuxt dev packages/docs/preview",
115
115
  "docs:generate": "nuxt generate docs",
116
- "docs:prepare": "nuxt-module-build build --stub && nuxt-module-build prepare && nuxt prepare docs && bun run scripts/sync-workspace-dist.mjs",
116
+ "docs:prepare": "nuxt-module-build build --stub && bun run scripts/sync-workspace-dist.mjs && nuxt-module-build prepare && nuxt prepare docs",
117
117
  "docs:types": "cd docs && vue-tsc --noEmit",
118
118
  "release": "bun run release:both",
119
119
  "release:both": "bun run release:selaras && bun run release:docs",