@sewadah/selaras 0.9.0 → 0.10.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 (66) hide show
  1. package/README.md +11 -0
  2. package/dist/agent/catalog.json +1 -1
  3. package/dist/module.json +1 -1
  4. package/dist/runtime/components/Checkbox.d.vue.ts +6 -4
  5. package/dist/runtime/components/Checkbox.vue +30 -22
  6. package/dist/runtime/components/Checkbox.vue.d.ts +6 -4
  7. package/dist/runtime/components/DatePicker.d.vue.ts +27 -27
  8. package/dist/runtime/components/DatePicker.vue +58 -99
  9. package/dist/runtime/components/DatePicker.vue.d.ts +27 -27
  10. package/dist/runtime/components/Editable.d.vue.ts +91 -0
  11. package/dist/runtime/components/Editable.vue +257 -0
  12. package/dist/runtime/components/Editable.vue.d.ts +91 -0
  13. package/dist/runtime/components/Input.vue +21 -22
  14. package/dist/runtime/components/Textarea.vue +20 -23
  15. package/dist/runtime/components/Toolbar.d.vue.ts +25 -0
  16. package/dist/runtime/components/Toolbar.vue +35 -0
  17. package/dist/runtime/components/Toolbar.vue.d.ts +25 -0
  18. package/dist/runtime/components/ToolbarButton.d.vue.ts +20 -0
  19. package/dist/runtime/components/ToolbarButton.vue +46 -0
  20. package/dist/runtime/components/ToolbarButton.vue.d.ts +20 -0
  21. package/dist/runtime/components/ToolbarSeparator.d.vue.ts +10 -0
  22. package/dist/runtime/components/ToolbarSeparator.vue +22 -0
  23. package/dist/runtime/components/ToolbarSeparator.vue.d.ts +10 -0
  24. package/dist/runtime/components/ToolbarToggleGroup.d.vue.ts +37 -0
  25. package/dist/runtime/components/ToolbarToggleGroup.vue +44 -0
  26. package/dist/runtime/components/ToolbarToggleGroup.vue.d.ts +37 -0
  27. package/dist/runtime/internal/ComboboxSelectBase.vue +41 -50
  28. package/dist/runtime/internal/FieldClearButton.d.vue.ts +21 -0
  29. package/dist/runtime/internal/FieldClearButton.vue +30 -0
  30. package/dist/runtime/internal/FieldClearButton.vue.d.ts +21 -0
  31. package/dist/runtime/internal/ListboxOption.d.vue.ts +2 -1
  32. package/dist/runtime/internal/ListboxOption.vue +3 -2
  33. package/dist/runtime/internal/ListboxOption.vue.d.ts +2 -1
  34. package/dist/runtime/theme/date-picker.d.ts +27 -0
  35. package/dist/runtime/theme/date-picker.js +6 -3
  36. package/dist/runtime/theme/editable.d.ts +155 -0
  37. package/dist/runtime/theme/editable.js +25 -0
  38. package/dist/runtime/theme/field-clear-button.d.ts +56 -0
  39. package/dist/runtime/theme/field-clear-button.js +15 -0
  40. package/dist/runtime/theme/input.d.ts +0 -9
  41. package/dist/runtime/theme/input.js +5 -12
  42. package/dist/runtime/theme/listbox.js +1 -1
  43. package/dist/runtime/theme/select.d.ts +9 -0
  44. package/dist/runtime/theme/select.js +11 -10
  45. package/dist/runtime/theme/textarea.d.ts +0 -9
  46. package/dist/runtime/theme/textarea.js +4 -4
  47. package/dist/runtime/theme/toolbar-button.d.ts +65 -0
  48. package/dist/runtime/theme/toolbar-button.js +21 -0
  49. package/dist/runtime/theme/toolbar-separator.d.ts +35 -0
  50. package/dist/runtime/theme/toolbar-separator.js +8 -0
  51. package/dist/runtime/theme/toolbar-toggle-group.d.ts +74 -0
  52. package/dist/runtime/theme/toolbar-toggle-group.js +13 -0
  53. package/dist/runtime/theme/toolbar.d.ts +35 -0
  54. package/dist/runtime/theme/toolbar.js +11 -0
  55. package/dist/runtime/theme-config.d.ts +36 -0
  56. package/dist/runtime/types/index.d.ts +5 -0
  57. package/dist/runtime/utils/field-clear.d.ts +9 -0
  58. package/dist/runtime/utils/field-clear.js +7 -0
  59. package/dist/runtime/utils/icons.d.ts +1 -0
  60. package/dist/runtime/utils/icons.js +1 -0
  61. package/dist/runtime/utils/messages.d.ts +4 -0
  62. package/dist/runtime/utils/messages.js +4 -0
  63. package/dist/runtime/utils/toolbar.d.ts +9 -0
  64. package/dist/runtime/utils/toolbar.js +1 -0
  65. package/package.json +9 -2
  66. package/skills/selaras/SKILL.md +4 -0
@@ -4,19 +4,16 @@ export declare const textareaTheme: import("tailwind-variants").TVReturnType<{
4
4
  base: string;
5
5
  leadingIcon: string;
6
6
  trailingIcon: string;
7
- clear: string;
8
7
  };
9
8
  md: {
10
9
  base: string;
11
10
  leadingIcon: string;
12
11
  trailingIcon: string;
13
- clear: string;
14
12
  };
15
13
  lg: {
16
14
  base: string;
17
15
  leadingIcon: string;
18
16
  trailingIcon: string;
19
- clear: string;
20
17
  };
21
18
  };
22
19
  color: {
@@ -62,19 +59,16 @@ export declare const textareaTheme: import("tailwind-variants").TVReturnType<{
62
59
  base: string;
63
60
  leadingIcon: string;
64
61
  trailingIcon: string;
65
- clear: string;
66
62
  };
67
63
  md: {
68
64
  base: string;
69
65
  leadingIcon: string;
70
66
  trailingIcon: string;
71
- clear: string;
72
67
  };
73
68
  lg: {
74
69
  base: string;
75
70
  leadingIcon: string;
76
71
  trailingIcon: string;
77
- clear: string;
78
72
  };
79
73
  };
80
74
  color: {
@@ -120,19 +114,16 @@ export declare const textareaTheme: import("tailwind-variants").TVReturnType<{
120
114
  base: string;
121
115
  leadingIcon: string;
122
116
  trailingIcon: string;
123
- clear: string;
124
117
  };
125
118
  md: {
126
119
  base: string;
127
120
  leadingIcon: string;
128
121
  trailingIcon: string;
129
- clear: string;
130
122
  };
131
123
  lg: {
132
124
  base: string;
133
125
  leadingIcon: string;
134
126
  trailingIcon: string;
135
- clear: string;
136
127
  };
137
128
  };
138
129
  color: {
@@ -13,13 +13,13 @@ export const textareaTheme = tv({
13
13
  trailing: "absolute top-1 end-0 m-0 flex min-w-0 items-center gap-1 border-0 p-0 pe-1 text-sm text-[var(--selaras-resolved-text-muted)] disabled:opacity-50",
14
14
  leadingIcon: "absolute start-3 top-2.5 shrink-0 text-[var(--selaras-resolved-text-muted)]",
15
15
  trailingIcon: "absolute end-3 top-2.5 shrink-0 text-[var(--selaras-resolved-text-muted)]",
16
- clear: "absolute end-1 top-1 shrink-0 rounded-full"
16
+ clear: "absolute end-1 top-1"
17
17
  },
18
18
  variants: {
19
19
  size: {
20
- sm: { base: "text-sm", leadingIcon: "size-4", trailingIcon: "size-4", clear: "size-7" },
21
- md: { base: "text-sm", leadingIcon: "size-4.5", trailingIcon: "size-4.5", clear: "size-9" },
22
- lg: { base: "text-base", leadingIcon: "size-5", trailingIcon: "size-5", clear: "size-10" }
20
+ sm: { base: "text-sm", leadingIcon: "size-4", trailingIcon: "size-4" },
21
+ md: { base: "text-sm", leadingIcon: "size-4.5", trailingIcon: "size-4.5" },
22
+ lg: { base: "text-base", leadingIcon: "size-5", trailingIcon: "size-5" }
23
23
  },
24
24
  // Focus-ring color only - the resting ring stays --selaras-resolved-border-default regardless
25
25
  // of `color`, matching Input's own scope (see input.ts).
@@ -0,0 +1,65 @@
1
+ export declare const toolbarButtonTheme: import("tailwind-variants").TVReturnType<{
2
+ size: {
3
+ sm: {};
4
+ md: {};
5
+ lg: {};
6
+ };
7
+ variant: {
8
+ solid: {};
9
+ soft: {};
10
+ subtle: {};
11
+ outline: {};
12
+ ghost: {
13
+ base: string;
14
+ };
15
+ text: {};
16
+ link: {};
17
+ };
18
+ }, {
19
+ base: string;
20
+ leadingIcon: string;
21
+ trailingIcon: string;
22
+ }, undefined, {
23
+ size: {
24
+ sm: {};
25
+ md: {};
26
+ lg: {};
27
+ };
28
+ variant: {
29
+ solid: {};
30
+ soft: {};
31
+ subtle: {};
32
+ outline: {};
33
+ ghost: {
34
+ base: string;
35
+ };
36
+ text: {};
37
+ link: {};
38
+ };
39
+ }, {
40
+ base: string;
41
+ leadingIcon: string;
42
+ trailingIcon: string;
43
+ }, import("tailwind-variants").TVReturnTypeLike<{
44
+ size: {
45
+ sm: {};
46
+ md: {};
47
+ lg: {};
48
+ };
49
+ variant: {
50
+ solid: {};
51
+ soft: {};
52
+ subtle: {};
53
+ outline: {};
54
+ ghost: {
55
+ base: string;
56
+ };
57
+ text: {};
58
+ link: {};
59
+ };
60
+ }, {
61
+ base: string;
62
+ leadingIcon: string;
63
+ trailingIcon: string;
64
+ }>>;
65
+ export type ToolbarButtonThemeSlots = keyof (typeof toolbarButtonTheme)['slots'];
@@ -0,0 +1,21 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const toolbarButtonTheme = tv({
3
+ slots: {
4
+ base: "",
5
+ leadingIcon: "",
6
+ trailingIcon: ""
7
+ },
8
+ variants: {
9
+ size: { sm: {}, md: {}, lg: {} },
10
+ variant: {
11
+ solid: {},
12
+ soft: {},
13
+ subtle: {},
14
+ outline: {},
15
+ ghost: { base: "text-[var(--selaras-resolved-text-muted)] hover:bg-[var(--selaras-resolved-surface-elevated)] hover:text-[var(--selaras-resolved-text-default)] data-[state=on]:bg-[var(--_selaras-color-subtle)] data-[state=on]:text-[var(--_selaras-color-on-subtle)] data-[state=on]:hover:bg-[var(--_selaras-color-subtle-hover)]" },
16
+ text: {},
17
+ link: {}
18
+ }
19
+ },
20
+ defaultVariants: { variant: "ghost" }
21
+ });
@@ -0,0 +1,35 @@
1
+ export declare const toolbarSeparatorTheme: import("tailwind-variants").TVReturnType<{
2
+ orientation: {
3
+ vertical: {
4
+ root: string;
5
+ };
6
+ horizontal: {
7
+ root: string;
8
+ };
9
+ };
10
+ }, {
11
+ root: string;
12
+ }, undefined, {
13
+ orientation: {
14
+ vertical: {
15
+ root: string;
16
+ };
17
+ horizontal: {
18
+ root: string;
19
+ };
20
+ };
21
+ }, {
22
+ root: string;
23
+ }, import("tailwind-variants").TVReturnTypeLike<{
24
+ orientation: {
25
+ vertical: {
26
+ root: string;
27
+ };
28
+ horizontal: {
29
+ root: string;
30
+ };
31
+ };
32
+ }, {
33
+ root: string;
34
+ }>>;
35
+ export type ToolbarSeparatorThemeSlots = keyof (typeof toolbarSeparatorTheme)['slots'];
@@ -0,0 +1,8 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const toolbarSeparatorTheme = tv({
3
+ slots: { root: "shrink-0 bg-[var(--selaras-resolved-border-default)]" },
4
+ variants: {
5
+ orientation: { vertical: { root: "mx-1 h-5 w-px" }, horizontal: { root: "my-1 h-px w-full" } }
6
+ },
7
+ defaultVariants: { orientation: "vertical" }
8
+ });
@@ -0,0 +1,74 @@
1
+ export declare const toolbarToggleGroupTheme: import("tailwind-variants").TVReturnType<{
2
+ orientation: {
3
+ horizontal: {
4
+ root: string;
5
+ };
6
+ vertical: {
7
+ root: string;
8
+ };
9
+ };
10
+ size: {
11
+ sm: {
12
+ icon: string;
13
+ };
14
+ md: {
15
+ icon: string;
16
+ };
17
+ lg: {
18
+ icon: string;
19
+ };
20
+ };
21
+ }, {
22
+ root: string;
23
+ item: string;
24
+ icon: string;
25
+ }, undefined, {
26
+ orientation: {
27
+ horizontal: {
28
+ root: string;
29
+ };
30
+ vertical: {
31
+ root: string;
32
+ };
33
+ };
34
+ size: {
35
+ sm: {
36
+ icon: string;
37
+ };
38
+ md: {
39
+ icon: string;
40
+ };
41
+ lg: {
42
+ icon: string;
43
+ };
44
+ };
45
+ }, {
46
+ root: string;
47
+ item: string;
48
+ icon: string;
49
+ }, import("tailwind-variants").TVReturnTypeLike<{
50
+ orientation: {
51
+ horizontal: {
52
+ root: string;
53
+ };
54
+ vertical: {
55
+ root: string;
56
+ };
57
+ };
58
+ size: {
59
+ sm: {
60
+ icon: string;
61
+ };
62
+ md: {
63
+ icon: string;
64
+ };
65
+ lg: {
66
+ icon: string;
67
+ };
68
+ };
69
+ }, {
70
+ root: string;
71
+ item: string;
72
+ icon: string;
73
+ }>>;
74
+ export type ToolbarToggleGroupThemeSlots = keyof (typeof toolbarToggleGroupTheme)['slots'];
@@ -0,0 +1,13 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const toolbarToggleGroupTheme = tv({
3
+ slots: {
4
+ root: "inline-flex gap-1",
5
+ item: "text-[var(--selaras-resolved-text-muted)] hover:bg-[var(--selaras-resolved-surface-elevated)] hover:text-[var(--selaras-resolved-text-default)] data-[state=on]:bg-[var(--_selaras-color-subtle)] data-[state=on]:text-[var(--_selaras-color-on-subtle)] data-[state=on]:hover:bg-[var(--_selaras-color-subtle-hover)]",
6
+ icon: "shrink-0"
7
+ },
8
+ variants: {
9
+ orientation: { horizontal: { root: "flex-row" }, vertical: { root: "flex-col" } },
10
+ size: { sm: { icon: "size-4" }, md: { icon: "size-4.5" }, lg: { icon: "size-5" } }
11
+ },
12
+ defaultVariants: { orientation: "horizontal", size: "sm" }
13
+ });
@@ -0,0 +1,35 @@
1
+ export declare const toolbarTheme: import("tailwind-variants").TVReturnType<{
2
+ orientation: {
3
+ horizontal: {
4
+ root: string;
5
+ };
6
+ vertical: {
7
+ root: string;
8
+ };
9
+ };
10
+ }, {
11
+ root: string;
12
+ }, undefined, {
13
+ orientation: {
14
+ horizontal: {
15
+ root: string;
16
+ };
17
+ vertical: {
18
+ root: string;
19
+ };
20
+ };
21
+ }, {
22
+ root: string;
23
+ }, import("tailwind-variants").TVReturnTypeLike<{
24
+ orientation: {
25
+ horizontal: {
26
+ root: string;
27
+ };
28
+ vertical: {
29
+ root: string;
30
+ };
31
+ };
32
+ }, {
33
+ root: string;
34
+ }>>;
35
+ export type ToolbarThemeSlots = keyof (typeof toolbarTheme)['slots'];
@@ -0,0 +1,11 @@
1
+ import { tv } from "tailwind-variants";
2
+ export const toolbarTheme = tv({
3
+ slots: { root: "flex gap-1 rounded-[var(--selaras-resolved-radius-md)] border border-[var(--selaras-resolved-border-default)] bg-[var(--selaras-resolved-surface-default)] p-1" },
4
+ variants: {
5
+ orientation: {
6
+ horizontal: { root: "flex-row flex-wrap items-center" },
7
+ vertical: { root: "inline-flex flex-col items-stretch" }
8
+ }
9
+ },
10
+ defaultVariants: { orientation: "horizontal" }
11
+ });
@@ -32,6 +32,8 @@ import type { dashboardSidebarTheme, DashboardSidebarThemeSlots } from './theme/
32
32
  import type { datePickerTheme, DatePickerThemeSlots } from './theme/date-picker.js';
33
33
  import type { drawerTheme, DrawerThemeSlots } from './theme/drawer.js';
34
34
  import type { dropdownTheme, DropdownThemeSlots } from './theme/dropdown.js';
35
+ import type { editableTheme, EditableThemeSlots } from './theme/editable.js';
36
+ import type { fieldClearButtonTheme, FieldClearButtonThemeSlots } from './theme/field-clear-button.js';
35
37
  import type { fileTreeTheme, FileTreeThemeSlots } from './theme/file-tree.js';
36
38
  import type { fileUploadTheme, FileUploadThemeSlots } from './theme/file-upload.js';
37
39
  import type { formFieldTheme, FormFieldThemeSlots } from './theme/form-field.js';
@@ -72,6 +74,10 @@ import type { timelineTheme, TimelineThemeSlots } from './theme/timeline.js';
72
74
  import type { toastTheme, ToastThemeSlots } from './theme/toast.js';
73
75
  import type { toggleTheme, ToggleThemeSlots } from './theme/toggle.js';
74
76
  import type { toggleGroupTheme, ToggleGroupThemeSlots } from './theme/toggle-group.js';
77
+ import type { toolbarTheme, ToolbarThemeSlots } from './theme/toolbar.js';
78
+ import type { toolbarButtonTheme, ToolbarButtonThemeSlots } from './theme/toolbar-button.js';
79
+ import type { toolbarSeparatorTheme, ToolbarSeparatorThemeSlots } from './theme/toolbar-separator.js';
80
+ import type { toolbarToggleGroupTheme, ToolbarToggleGroupThemeSlots } from './theme/toolbar-toggle-group.js';
75
81
  import type { tooltipTheme, TooltipThemeSlots } from './theme/tooltip.js';
76
82
  import type { transferListTheme, TransferListThemeSlots } from './theme/transfer-list.js';
77
83
  import type { treeTheme, TreeThemeSlots } from './theme/tree.js';
@@ -101,6 +107,7 @@ type ContentNavigationVariants = VariantProps<typeof contentNavigationTheme>;
101
107
  type ContentSurroundVariants = VariantProps<typeof contentSurroundTheme>;
102
108
  type ContentTocVariants = VariantProps<typeof contentTocTheme>;
103
109
  type InputVariants = VariantProps<typeof inputTheme>;
110
+ type EditableVariants = VariantProps<typeof editableTheme>;
104
111
  type InputGroupVariants = VariantProps<typeof inputGroupTheme>;
105
112
  type InputNumberVariants = VariantProps<typeof inputNumberTheme>;
106
113
  type KbdVariants = VariantProps<typeof kbdTheme>;
@@ -279,6 +286,15 @@ export interface ThemeComponentRegistry {
279
286
  conditions: WithRegisteredColor<Pick<InputVariants, 'color' | 'size' | 'hasLeadingIcon' | 'hasTrailingIcon' | 'invalid'>>;
280
287
  defaults: WithRegisteredColor<Pick<InputVariants, 'color' | 'size'>>;
281
288
  };
289
+ fieldClearButton: {
290
+ slots: FieldClearButtonThemeSlots;
291
+ conditions: Pick<VariantProps<typeof fieldClearButtonTheme>, 'size'>;
292
+ };
293
+ editable: {
294
+ slots: EditableThemeSlots;
295
+ conditions: WithRegisteredColor<Pick<EditableVariants, 'color' | 'size' | 'invalid' | 'empty' | 'multiline'>>;
296
+ defaults: WithRegisteredColor<Pick<EditableVariants, 'color' | 'size'>>;
297
+ };
282
298
  inputGroup: {
283
299
  slots: InputGroupThemeSlots;
284
300
  conditions: Pick<InputGroupVariants, 'orientation'>;
@@ -458,6 +474,26 @@ export interface ThemeComponentRegistry {
458
474
  slots: SlideoverThemeSlots;
459
475
  conditions: Pick<SlideoverVariants, 'side' | 'inset' | 'transition'>;
460
476
  };
477
+ toolbar: {
478
+ slots: ToolbarThemeSlots;
479
+ conditions: Pick<VariantProps<typeof toolbarTheme>, 'orientation'>;
480
+ defaults: {
481
+ size?: 'sm' | 'md' | 'lg';
482
+ color?: ColorRole;
483
+ };
484
+ };
485
+ toolbarButton: {
486
+ slots: ToolbarButtonThemeSlots;
487
+ conditions: Pick<VariantProps<typeof toolbarButtonTheme>, 'size' | 'variant'>;
488
+ };
489
+ toolbarToggleGroup: {
490
+ slots: ToolbarToggleGroupThemeSlots;
491
+ conditions: Pick<VariantProps<typeof toolbarToggleGroupTheme>, 'size' | 'orientation'>;
492
+ };
493
+ toolbarSeparator: {
494
+ slots: ToolbarSeparatorThemeSlots;
495
+ conditions: Pick<VariantProps<typeof toolbarSeparatorTheme>, 'orientation'>;
496
+ };
461
497
  tooltip: {
462
498
  slots: TooltipThemeSlots;
463
499
  conditions: Pick<TooltipVariants, never>;
@@ -37,6 +37,7 @@ export type * from '../components/DashboardSidebarToggle.vue';
37
37
  export type * from '../components/DatePicker.vue';
38
38
  export type * from '../components/Drawer.vue';
39
39
  export type * from '../components/Dropdown.vue';
40
+ export type * from '../components/Editable.vue';
40
41
  export type * from '../components/FileTree.vue';
41
42
  export type * from '../components/FileUpload.vue';
42
43
  export type * from '../components/FormField.vue';
@@ -83,6 +84,10 @@ export type * from '../components/Timeline.vue';
83
84
  export type * from '../components/Toast.vue';
84
85
  export type * from '../components/Toggle.vue';
85
86
  export type * from '../components/ToggleGroup.vue';
87
+ export type * from '../components/Toolbar.vue';
88
+ export type * from '../components/ToolbarButton.vue';
89
+ export type * from '../components/ToolbarSeparator.vue';
90
+ export type * from '../components/ToolbarToggleGroup.vue';
86
91
  export type * from '../components/Tooltip.vue';
87
92
  export type * from '../components/TransferList.vue';
88
93
  export type * from '../components/Tree.vue';
@@ -0,0 +1,9 @@
1
+ /** Presence follows native boolean-attribute semantics, including readonly="". */
2
+ export declare function isFieldReadonly(value: unknown): boolean;
3
+ export declare function canClearField(clearable: boolean | undefined, hasContent: boolean, disabled: boolean | undefined, readonly?: boolean): boolean;
4
+ /** The clear target is smaller than the field; glyph sizing is independent. */
5
+ export declare const fieldClearWidths: {
6
+ readonly sm: "1.5rem";
7
+ readonly md: "1.75rem";
8
+ readonly lg: "2rem";
9
+ };
@@ -0,0 +1,7 @@
1
+ export function isFieldReadonly(value) {
2
+ return value !== void 0 && value !== null && value !== false;
3
+ }
4
+ export function canClearField(clearable, hasContent, disabled, readonly = false) {
5
+ return !!clearable && hasContent && !disabled && !readonly;
6
+ }
7
+ export const fieldClearWidths = { sm: "1.5rem", md: "1.75rem", lg: "2rem" };
@@ -1,4 +1,5 @@
1
1
  export interface IconRegistry {
2
+ edit: string;
2
3
  close: string;
3
4
  check: string;
4
5
  indeterminate: string;
@@ -3,6 +3,7 @@ export function isFeedbackIntent(value) {
3
3
  return feedbackIntentNames.includes(value);
4
4
  }
5
5
  export const defaultIcons = {
6
+ edit: "hugeicons:pencil-edit-01",
6
7
  close: "hugeicons:cancel-01",
7
8
  check: "hugeicons:tick-02",
8
9
  indeterminate: "hugeicons:minus-sign",
@@ -1,4 +1,8 @@
1
1
  export interface MessageRegistry {
2
+ edit: string;
3
+ save: string;
4
+ editableInput: string;
5
+ editablePlaceholder: string;
2
6
  loading: string;
3
7
  clear: string;
4
8
  close: string;
@@ -1,4 +1,8 @@
1
1
  export const defaultMessages = {
2
+ edit: "Edit",
3
+ save: "Save",
4
+ editableInput: "Editable text",
5
+ editablePlaceholder: "Click to edit",
2
6
  loading: "Loading",
3
7
  clear: "Clear",
4
8
  close: "Close",
@@ -0,0 +1,9 @@
1
+ import type { ComputedRef, InjectionKey } from 'vue';
2
+ import type { ColorRole } from './color-registry.js';
3
+ export interface ToolbarContext {
4
+ size: 'sm' | 'md' | 'lg';
5
+ color: ColorRole;
6
+ disabled: boolean;
7
+ orientation: 'horizontal' | 'vertical';
8
+ }
9
+ export declare const TOOLBAR_CONTEXT: InjectionKey<ComputedRef<ToolbarContext>>;
@@ -0,0 +1 @@
1
+ export const TOOLBAR_CONTEXT = Symbol("selaras-toolbar");
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sewadah/selaras",
3
3
  "type": "module",
4
- "version": "0.9.0",
4
+ "version": "0.10.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",
@@ -132,7 +132,11 @@
132
132
  "tokens:check": "node scripts/generate-default-colors.mjs --check",
133
133
  "tokens:generate": "node scripts/generate-default-colors.mjs",
134
134
  "agent:build": "node scripts/build-agent-catalog.mjs",
135
- "test:agent": "node scripts/test-agent-support.mjs"
135
+ "test:agent": "node scripts/test-agent-support.mjs",
136
+ "prepare": "node scripts/install-git-hooks.mjs",
137
+ "commitlint": "commitlint",
138
+ "check": "bun run lint && bun run docs:prepare && bun run test:types && bun run test",
139
+ "test:docs-markdown": "node scripts/check-docs-markdown.mjs"
136
140
  },
137
141
  "peerDependencies": {
138
142
  "nuxt": "^4.5.2",
@@ -157,6 +161,8 @@
157
161
  },
158
162
  "devDependencies": {
159
163
  "@antfu/eslint-config": "^9.3.0",
164
+ "@commitlint/cli": "^21.2.3",
165
+ "@commitlint/config-conventional": "^21.2.3",
160
166
  "@nuxt/devtools": "^3.4.1",
161
167
  "@nuxt/module-builder": "^1.0.3",
162
168
  "@nuxt/schema": "^4.5.2",
@@ -167,6 +173,7 @@
167
173
  "changelogen": "^0.6.2",
168
174
  "eslint": "^10.8.1",
169
175
  "happy-dom": "^20.11.6",
176
+ "husky": "^9.1.7",
170
177
  "nuxt": "^4.5.2",
171
178
  "tailwindcss": "^4.3.0",
172
179
  "typescript": "^6.0.3",
@@ -38,3 +38,7 @@ For a new integration, read [Installation](https://selarasui.my.id/raw/overview/
38
38
  - Read [Adaptive interfaces](https://selarasui.my.id/raw/overview/getting-started/adaptive-interfaces.md) before opting supported controls into mobile modal presentation. `adaptive` is opt-in, not a universal component prop.
39
39
 
40
40
  Match item shapes, model values, and selection events to the component contract. Preserve accessible names, keyboard behavior, focus restoration, and form associations when customizing slots. Validate interactions relevant to the change in the project's normal checks, including mobile presentation when enabled.
41
+
42
+ ## Attribution
43
+
44
+ When referencing or adapting documentation or examples, please credit [Selaras by Sewadah](https://selarasui.my.id) and cite the relevant documentation page where appropriate. Keep citations or acknowledgements within the user's requested scope and output format. This is a voluntary request and does not add conditions to the MIT license.