@proyecto-viviana/ui 0.1.7 → 0.2.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 (130) hide show
  1. package/README.md +192 -0
  2. package/dist/autocomplete/index.d.ts +89 -0
  3. package/dist/autocomplete/index.d.ts.map +1 -0
  4. package/dist/breadcrumbs/index.d.ts +38 -0
  5. package/dist/breadcrumbs/index.d.ts.map +1 -0
  6. package/dist/button/Button.d.ts.map +1 -1
  7. package/dist/calendar/DateField.d.ts +47 -0
  8. package/dist/calendar/DateField.d.ts.map +1 -0
  9. package/dist/calendar/DatePicker.d.ts +48 -0
  10. package/dist/calendar/DatePicker.d.ts.map +1 -0
  11. package/dist/calendar/RangeCalendar.d.ts +42 -0
  12. package/dist/calendar/RangeCalendar.d.ts.map +1 -0
  13. package/dist/calendar/TimeField.d.ts +44 -0
  14. package/dist/calendar/TimeField.d.ts.map +1 -0
  15. package/dist/calendar/index.d.ts +50 -0
  16. package/dist/calendar/index.d.ts.map +1 -0
  17. package/dist/checkbox/index.d.ts.map +1 -1
  18. package/dist/color/index.d.ts +228 -0
  19. package/dist/color/index.d.ts.map +1 -0
  20. package/dist/combobox/index.d.ts +81 -0
  21. package/dist/combobox/index.d.ts.map +1 -0
  22. package/dist/components.css +116 -14
  23. package/dist/custom/chip/index.d.ts +7 -2
  24. package/dist/custom/chip/index.d.ts.map +1 -1
  25. package/dist/custom/event-card/index.d.ts +5 -1
  26. package/dist/custom/event-card/index.d.ts.map +1 -1
  27. package/dist/custom/header/index.d.ts +16 -0
  28. package/dist/custom/header/index.d.ts.map +1 -0
  29. package/dist/custom/logo/index.d.ts +2 -0
  30. package/dist/custom/logo/index.d.ts.map +1 -1
  31. package/dist/custom/page-layout/index.d.ts +2 -0
  32. package/dist/custom/page-layout/index.d.ts.map +1 -1
  33. package/dist/custom/profile-card/index.d.ts +5 -1
  34. package/dist/custom/profile-card/index.d.ts.map +1 -1
  35. package/dist/custom/timeline-item/index.d.ts +12 -2
  36. package/dist/custom/timeline-item/index.d.ts.map +1 -1
  37. package/dist/dialog/Dialog.d.ts +67 -0
  38. package/dist/dialog/Dialog.d.ts.map +1 -0
  39. package/dist/dialog/index.d.ts +2 -17
  40. package/dist/dialog/index.d.ts.map +1 -1
  41. package/dist/disclosure/index.d.ts +84 -0
  42. package/dist/disclosure/index.d.ts.map +1 -0
  43. package/dist/gridlist/index.d.ts +92 -0
  44. package/dist/gridlist/index.d.ts.map +1 -0
  45. package/dist/index.d.ts +58 -4
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +6984 -783
  48. package/dist/index.js.map +1 -1
  49. package/dist/index.ssr.js +5905 -571
  50. package/dist/index.ssr.js.map +1 -1
  51. package/dist/landmark/index.d.ts +83 -0
  52. package/dist/landmark/index.d.ts.map +1 -0
  53. package/dist/link/index.d.ts.map +1 -1
  54. package/dist/listbox/index.d.ts +47 -0
  55. package/dist/listbox/index.d.ts.map +1 -0
  56. package/dist/menu/index.d.ts +74 -0
  57. package/dist/menu/index.d.ts.map +1 -0
  58. package/dist/meter/index.d.ts +49 -0
  59. package/dist/meter/index.d.ts.map +1 -0
  60. package/dist/numberfield/index.d.ts +50 -0
  61. package/dist/numberfield/index.d.ts.map +1 -0
  62. package/dist/popover/index.d.ts +85 -0
  63. package/dist/popover/index.d.ts.map +1 -0
  64. package/dist/radio/index.d.ts +7 -4
  65. package/dist/radio/index.d.ts.map +1 -1
  66. package/dist/searchfield/index.d.ts +44 -0
  67. package/dist/searchfield/index.d.ts.map +1 -0
  68. package/dist/select/index.d.ts +72 -0
  69. package/dist/select/index.d.ts.map +1 -0
  70. package/dist/slider/index.d.ts +53 -0
  71. package/dist/slider/index.d.ts.map +1 -0
  72. package/dist/switch/ToggleSwitch.d.ts.map +1 -1
  73. package/dist/table/index.d.ts +140 -0
  74. package/dist/table/index.d.ts.map +1 -0
  75. package/dist/tabs/index.d.ts +56 -0
  76. package/dist/tabs/index.d.ts.map +1 -0
  77. package/dist/tag-group/index.d.ts +80 -0
  78. package/dist/tag-group/index.d.ts.map +1 -0
  79. package/dist/toast/index.d.ts +101 -0
  80. package/dist/toast/index.d.ts.map +1 -0
  81. package/dist/toolbar/index.d.ts +42 -0
  82. package/dist/toolbar/index.d.ts.map +1 -0
  83. package/dist/tooltip/index.d.ts +66 -5
  84. package/dist/tooltip/index.d.ts.map +1 -1
  85. package/dist/tree/index.d.ts +99 -0
  86. package/dist/tree/index.d.ts.map +1 -0
  87. package/package.json +66 -58
  88. package/src/autocomplete/index.tsx +313 -0
  89. package/src/breadcrumbs/index.tsx +207 -0
  90. package/src/button/Button.tsx +74 -75
  91. package/src/calendar/DateField.tsx +200 -0
  92. package/src/calendar/DatePicker.tsx +298 -0
  93. package/src/calendar/RangeCalendar.tsx +236 -0
  94. package/src/calendar/TimeField.tsx +196 -0
  95. package/src/calendar/index.tsx +223 -0
  96. package/src/checkbox/index.tsx +3 -4
  97. package/src/color/index.tsx +687 -0
  98. package/src/combobox/index.tsx +383 -0
  99. package/src/components.css +116 -14
  100. package/src/custom/chip/index.tsx +17 -3
  101. package/src/custom/event-card/index.tsx +8 -2
  102. package/src/custom/header/index.tsx +33 -0
  103. package/src/custom/logo/index.tsx +7 -3
  104. package/src/custom/page-layout/index.tsx +12 -3
  105. package/src/custom/profile-card/index.tsx +8 -2
  106. package/src/custom/timeline-item/index.tsx +28 -4
  107. package/src/dialog/Dialog.tsx +260 -0
  108. package/src/dialog/index.tsx +3 -69
  109. package/src/disclosure/index.tsx +307 -0
  110. package/src/gridlist/index.tsx +403 -0
  111. package/src/index.ts +219 -4
  112. package/src/landmark/index.tsx +231 -0
  113. package/src/link/index.tsx +1 -2
  114. package/src/listbox/index.tsx +231 -0
  115. package/src/menu/index.tsx +297 -0
  116. package/src/meter/index.tsx +163 -0
  117. package/src/numberfield/index.tsx +482 -0
  118. package/src/popover/index.tsx +260 -0
  119. package/src/radio/index.tsx +36 -82
  120. package/src/searchfield/index.tsx +453 -0
  121. package/src/select/index.tsx +349 -0
  122. package/src/slider/index.tsx +382 -0
  123. package/src/switch/ToggleSwitch.tsx +1 -2
  124. package/src/table/index.tsx +531 -0
  125. package/src/tabs/index.tsx +273 -0
  126. package/src/tag-group/index.tsx +240 -0
  127. package/src/toast/index.tsx +324 -0
  128. package/src/toolbar/index.tsx +108 -0
  129. package/src/tooltip/index.tsx +171 -5
  130. package/src/tree/index.tsx +494 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../src/switch/ToggleSwitch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA6C,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAwC,KAAK,iBAAiB,IAAI,yBAAyB,EAAgC,MAAM,wCAAwC,CAAC;AAMjL,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,OAAO,GAAG,UAAU,CAAC;IAC9F,8BAA8B;IAC9B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;AA4BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAoDlE"}
1
+ {"version":3,"file":"ToggleSwitch.d.ts","sourceRoot":"","sources":["../../src/switch/ToggleSwitch.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA6C,MAAM,UAAU,CAAC;AAC/E,OAAO,EAAwC,KAAK,iBAAiB,IAAI,yBAAyB,EAAgC,MAAM,wCAAwC,CAAC;AAMjL,MAAM,MAAM,UAAU,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE5C,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAAC,yBAAyB,EAAE,OAAO,GAAG,UAAU,CAAC;IAC9F,8BAA8B;IAC9B,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iCAAiC;IACjC,QAAQ,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;CACxB;AA4BD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAmDlE"}
@@ -0,0 +1,140 @@
1
+ /**
2
+ * Table component for proyecto-viviana-ui
3
+ *
4
+ * Styled table component built on top of solidaria-components.
5
+ * Inspired by Spectrum 2's Table component patterns.
6
+ */
7
+ import { type JSX } from 'solid-js';
8
+ import { type TableProps as HeadlessTableProps, type TableHeaderProps as HeadlessTableHeaderProps, type TableColumnProps as HeadlessTableColumnProps, type TableBodyProps as HeadlessTableBodyProps, type TableRowProps as HeadlessTableRowProps, type TableCellProps as HeadlessTableCellProps } from '@proyecto-viviana/solidaria-components';
9
+ import type { Key, SortDescriptor, ColumnDefinition } from '@proyecto-viviana/solid-stately';
10
+ export type TableSize = 'sm' | 'md' | 'lg';
11
+ export type TableVariant = 'default' | 'striped' | 'bordered';
12
+ export interface TableProps<T extends object> extends Omit<HeadlessTableProps<T>, 'class' | 'style' | 'children'> {
13
+ /** The size of the table. */
14
+ size?: TableSize;
15
+ /** The visual variant of the table. */
16
+ variant?: TableVariant;
17
+ /** Additional CSS class name. */
18
+ class?: string;
19
+ /** Title for the table. */
20
+ title?: string;
21
+ /** Description for the table. */
22
+ description?: string;
23
+ /** Children components (TableHeader, TableBody). */
24
+ children?: JSX.Element | (() => JSX.Element);
25
+ }
26
+ export interface TableHeaderProps extends Omit<HeadlessTableHeaderProps, 'class' | 'style'> {
27
+ /** Additional CSS class name. */
28
+ class?: string;
29
+ }
30
+ export interface TableColumnProps extends Omit<HeadlessTableColumnProps, 'class' | 'style'> {
31
+ /** Additional CSS class name. */
32
+ class?: string;
33
+ /** Text alignment for the column. */
34
+ align?: 'left' | 'center' | 'right';
35
+ /** Width of the column (CSS value). */
36
+ width?: string;
37
+ }
38
+ export interface TableBodyProps<T> extends Omit<HeadlessTableBodyProps<T>, 'class' | 'style'> {
39
+ /** Additional CSS class name. */
40
+ class?: string;
41
+ }
42
+ export interface TableRowProps<T> extends Omit<HeadlessTableRowProps<T>, 'class' | 'style'> {
43
+ /** Additional CSS class name. */
44
+ class?: string;
45
+ }
46
+ export interface TableCellProps extends Omit<HeadlessTableCellProps, 'class' | 'style'> {
47
+ /** Additional CSS class name. */
48
+ class?: string;
49
+ /** Text alignment for the cell. */
50
+ align?: 'left' | 'center' | 'right';
51
+ }
52
+ /**
53
+ * A table displays data in rows and columns and enables a user to navigate its contents
54
+ * via directional navigation keys, and optionally supports row selection and sorting.
55
+ *
56
+ * Built on solidaria-components Table for full accessibility support.
57
+ *
58
+ * @example
59
+ * ```tsx
60
+ * const columns = [
61
+ * { key: 'name', name: 'Name' },
62
+ * { key: 'role', name: 'Role' },
63
+ * { key: 'status', name: 'Status' },
64
+ * ]
65
+ *
66
+ * const rows = [
67
+ * { id: '1', name: 'John', role: 'Developer', status: 'Active' },
68
+ * { id: '2', name: 'Jane', role: 'Designer', status: 'Active' },
69
+ * ]
70
+ *
71
+ * <Table items={rows} columns={columns} selectionMode="multiple">
72
+ * {() => (
73
+ * <>
74
+ * <TableHeader>
75
+ * {() => (
76
+ * <For each={columns}>
77
+ * {(col) => <TableColumn id={col.key}>{col.name}</TableColumn>}
78
+ * </For>
79
+ * )}
80
+ * </TableHeader>
81
+ * <TableBody>
82
+ * {(row) => (
83
+ * <TableRow id={row.id}>
84
+ * {() => (
85
+ * <>
86
+ * <TableCell>{row.name}</TableCell>
87
+ * <TableCell>{row.role}</TableCell>
88
+ * <TableCell>{row.status}</TableCell>
89
+ * </>
90
+ * )}
91
+ * </TableRow>
92
+ * )}
93
+ * </TableBody>
94
+ * </>
95
+ * )}
96
+ * </Table>
97
+ * ```
98
+ */
99
+ export declare function Table<T extends object>(props: TableProps<T>): JSX.Element;
100
+ export declare namespace Table {
101
+ var Header: typeof TableHeader;
102
+ var Column: typeof TableColumn;
103
+ var Body: typeof TableBody;
104
+ var Row: typeof TableRow;
105
+ var Cell: typeof TableCell;
106
+ var SelectionCheckbox: typeof TableSelectionCheckbox;
107
+ var SelectAllCheckbox: typeof TableSelectAllCheckbox;
108
+ }
109
+ /**
110
+ * A header row in a table containing column headers.
111
+ */
112
+ export declare function TableHeader(props: TableHeaderProps): JSX.Element;
113
+ /**
114
+ * A column header in a table.
115
+ */
116
+ export declare function TableColumn(props: TableColumnProps): JSX.Element;
117
+ /**
118
+ * The body of a table containing data rows.
119
+ */
120
+ export declare function TableBody<T extends object>(props: TableBodyProps<T>): JSX.Element;
121
+ /**
122
+ * A row in a table.
123
+ */
124
+ export declare function TableRow<T extends object>(props: TableRowProps<T>): JSX.Element;
125
+ /**
126
+ * A cell in a table row.
127
+ */
128
+ export declare function TableCell(props: TableCellProps): JSX.Element;
129
+ /**
130
+ * A styled checkbox cell for row selection.
131
+ */
132
+ export declare function TableSelectionCheckbox(props: {
133
+ rowKey: Key;
134
+ }): JSX.Element;
135
+ /**
136
+ * A styled checkbox for select-all functionality.
137
+ */
138
+ export declare function TableSelectAllCheckbox(): JSX.Element;
139
+ export type { Key, SortDescriptor, ColumnDefinition };
140
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/table/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA+C,MAAM,UAAU,CAAA;AAChF,OAAO,EASL,KAAK,UAAU,IAAI,kBAAkB,EACrC,KAAK,gBAAgB,IAAI,wBAAwB,EACjD,KAAK,gBAAgB,IAAI,wBAAwB,EACjD,KAAK,cAAc,IA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;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,GAAG,CAAC,OAAO,CAuB5D;AAMD;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAAE,MAAM,EAAE,GAAG,CAAA;CAAE,GAAG,GAAG,CAAC,OAAO,CAY1E;AAED;;GAEG;AACH,wBAAgB,sBAAsB,IAAI,GAAG,CAAC,OAAO,CAYpD;AAoDD,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,gBAAgB,EAAE,CAAA"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Tabs component for proyecto-viviana-ui
3
+ *
4
+ * Styled tabs component built on top of solidaria-components.
5
+ * Inspired by Spectrum 2's Tabs component patterns.
6
+ */
7
+ import { type JSX } from 'solid-js';
8
+ import { type TabsProps as HeadlessTabsProps, type TabListProps as HeadlessTabListProps, type TabProps as HeadlessTabProps, type TabPanelProps as HeadlessTabPanelProps } from '@proyecto-viviana/solidaria-components';
9
+ import type { Key, TabOrientation } from '@proyecto-viviana/solid-stately';
10
+ export type TabsSize = 'sm' | 'md' | 'lg';
11
+ export type TabsVariant = 'underline' | 'pill' | 'boxed';
12
+ export interface TabsProps<T> extends Omit<HeadlessTabsProps<T>, 'class' | 'style'> {
13
+ /** The size of the tabs. */
14
+ size?: TabsSize;
15
+ /** The visual variant of the tabs. */
16
+ variant?: TabsVariant;
17
+ /** Additional CSS class name. */
18
+ class?: string;
19
+ }
20
+ export interface TabListProps<T> extends Omit<HeadlessTabListProps<T>, 'class' | 'style'> {
21
+ /** Additional CSS class name. */
22
+ class?: string;
23
+ }
24
+ export interface TabProps extends Omit<HeadlessTabProps, 'class' | 'style'> {
25
+ /** Additional CSS class name. */
26
+ class?: string;
27
+ }
28
+ export interface TabPanelProps extends Omit<HeadlessTabPanelProps, 'class' | 'style'> {
29
+ /** Additional CSS class name. */
30
+ class?: string;
31
+ }
32
+ /**
33
+ * Tabs organize content into multiple sections and allow users to navigate between them.
34
+ *
35
+ * Built on solidaria-components Tabs for full accessibility support.
36
+ */
37
+ export declare function Tabs<T>(props: TabsProps<T>): JSX.Element;
38
+ export declare namespace Tabs {
39
+ var List: typeof TabList;
40
+ var Tab: typeof import(".").Tab;
41
+ var Panel: typeof TabPanel;
42
+ }
43
+ /**
44
+ * A TabList contains Tab elements that represent the available tabs.
45
+ */
46
+ export declare function TabList<T>(props: TabListProps<T>): JSX.Element;
47
+ /**
48
+ * A Tab represents an individual tab in a TabList.
49
+ */
50
+ export declare function Tab(props: TabProps): JSX.Element;
51
+ /**
52
+ * A TabPanel displays the content for a selected Tab.
53
+ */
54
+ export declare function TabPanel(props: TabPanelProps): JSX.Element;
55
+ export type { Key, TabOrientation };
56
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tabs/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAyC,MAAM,UAAU,CAAA;AAC1E,OAAO,EAKL,KAAK,SAAS,IAAI,iBAAiB,EACnC,KAAK,YAAY,IAAI,oBAAoB,EACzC,KAAK,QAAQ,IAAI,gBAAgB,EACjC,KAAK,aAAa,IAAI,qBAAqB,EAK5C,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAA;AAM1E,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AACzC,MAAM,MAAM,WAAW,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,CAAA;AAaxD,MAAM,WAAW,SAAS,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACjF,4BAA4B;IAC5B,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,sCAAsC;IACtC,OAAO,CAAC,EAAE,WAAW,CAAA;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY,CAAC,CAAC,CAAE,SAAQ,IAAI,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACvF,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,QAAS,SAAQ,IAAI,CAAC,gBAAgB,EAAE,OAAO,GAAG,OAAO,CAAC;IACzE,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,qBAAqB,EAAE,OAAO,GAAG,OAAO,CAAC;IACnF,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AA0DD;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CA2BxD;yBA3Be,IAAI;;;;;AAiCpB;;GAEG;AACH,wBAAgB,OAAO,CAAC,CAAC,EAAE,KAAK,EAAE,YAAY,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAyB9D;AAMD;;GAEG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,QAAQ,GAAG,GAAG,CAAC,OAAO,CAmChD;AAMD;;GAEG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,aAAa,GAAG,GAAG,CAAC,OAAO,CAuB1D;AAQD,YAAY,EAAE,GAAG,EAAE,cAAc,EAAE,CAAA"}
@@ -0,0 +1,80 @@
1
+ /**
2
+ * TagGroup component for proyecto-viviana-ui
3
+ *
4
+ * Styled tag group component built on top of solidaria-components.
5
+ * A tag group displays a collection of tags that can be selected and/or removed.
6
+ */
7
+ import { type JSX } from 'solid-js';
8
+ import type { Key, SelectionMode } from '@proyecto-viviana/solid-stately';
9
+ export type TagGroupSize = 'sm' | 'md' | 'lg';
10
+ export type TagGroupVariant = 'default' | 'outline' | 'solid';
11
+ export interface TagGroupProps<T> {
12
+ /** The label for the tag group. */
13
+ label?: string;
14
+ /** The items to display as tags. */
15
+ items: T[];
16
+ /** Function to render the content of each tag. */
17
+ children: (item: T) => JSX.Element;
18
+ /** Function to get a unique key from an item. */
19
+ getKey?: (item: T) => Key;
20
+ /** Handler called when tags are removed. */
21
+ onRemove?: (keys: Set<Key>) => void;
22
+ /** The size of the tags. @default 'md' */
23
+ size?: TagGroupSize;
24
+ /** The visual variant of the tags. @default 'default' */
25
+ variant?: TagGroupVariant;
26
+ /** The selection mode. @default 'none' */
27
+ selectionMode?: SelectionMode;
28
+ /** The currently selected keys (controlled). */
29
+ selectedKeys?: Iterable<Key>;
30
+ /** Handler called when selection changes. */
31
+ onSelectionChange?: (keys: 'all' | Set<Key>) => void;
32
+ /** Keys that are disabled. */
33
+ disabledKeys?: Iterable<Key>;
34
+ /** Additional CSS class name. */
35
+ class?: string;
36
+ /** Content to render when empty. */
37
+ renderEmptyState?: () => JSX.Element;
38
+ }
39
+ export interface TagProps {
40
+ /** A unique key for this tag. */
41
+ id: Key;
42
+ /** The content of the tag. */
43
+ children: JSX.Element;
44
+ /** Whether the tag is disabled. */
45
+ isDisabled?: boolean;
46
+ /** Additional CSS class name. */
47
+ class?: string;
48
+ }
49
+ /**
50
+ * A tag group displays a collection of tags that can be selected and/or removed.
51
+ *
52
+ * @example
53
+ * ```tsx
54
+ * // Simple tag group
55
+ * <TagGroup
56
+ * label="Categories"
57
+ * items={categories}
58
+ * onRemove={(keys) => removeCategories(keys)}
59
+ * >
60
+ * {(item) => item.name}
61
+ * </TagGroup>
62
+ *
63
+ * // With selection
64
+ * <TagGroup
65
+ * label="Filters"
66
+ * items={filters}
67
+ * selectionMode="multiple"
68
+ * selectedKeys={selectedFilters}
69
+ * onSelectionChange={setSelectedFilters}
70
+ * >
71
+ * {(item) => item.label}
72
+ * </TagGroup>
73
+ * ```
74
+ */
75
+ export declare function TagGroup<T extends {
76
+ id?: Key;
77
+ key?: Key;
78
+ }>(props: TagGroupProps<T>): JSX.Element;
79
+ export type { Key, SelectionMode };
80
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tag-group/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAoB,MAAM,UAAU,CAAC;AAKtD,OAAO,KAAK,EAAE,GAAG,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAM1E,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAC9C,MAAM,MAAM,eAAe,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,CAAC;AAE9D,MAAM,WAAW,aAAa,CAAC,CAAC;IAC9B,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,KAAK,EAAE,CAAC,EAAE,CAAC;IACX,kDAAkD;IAClD,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC,OAAO,CAAC;IACnC,iDAAiD;IACjD,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,GAAG,CAAC;IAC1B,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACpC,0CAA0C;IAC1C,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,yDAAyD;IACzD,OAAO,CAAC,EAAE,eAAe,CAAC;IAC1B,0CAA0C;IAC1C,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,gDAAgD;IAChD,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7B,6CAA6C;IAC7C,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC;IACrD,8BAA8B;IAC9B,YAAY,CAAC,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC;IAC7B,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,gBAAgB,CAAC,EAAE,MAAM,GAAG,CAAC,OAAO,CAAC;CACtC;AAED,MAAM,WAAW,QAAQ;IACvB,iCAAiC;IACjC,EAAE,EAAE,GAAG,CAAC;IACR,8BAA8B;IAC9B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,mCAAmC;IACnC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AA8CD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAgB,QAAQ,CAAC,CAAC,SAAS;IAAE,EAAE,CAAC,EAAE,GAAG,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAA;CAAE,EAAE,KAAK,EAAE,aAAa,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAyGhG;AAGD,YAAY,EAAE,GAAG,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,101 @@
1
+ /**
2
+ * Toast components for proyecto-viviana-ui
3
+ *
4
+ * Toast notifications with auto-dismiss, animations, and variants.
5
+ * Built on top of solidaria-components for accessibility.
6
+ */
7
+ import { type JSX } from 'solid-js';
8
+ import { ToastContext, globalToastQueue, useToastContext, type ToastContent, type ToastProps as HeadlessToastProps, type ToastRegionProps as HeadlessToastRegionProps, type ToastProviderProps as HeadlessToastProviderProps, type ToastRenderProps, type ToastRegionRenderProps } from '@proyecto-viviana/solidaria-components';
9
+ import { type QueuedToast, type ToastOptions } from '@proyecto-viviana/solid-stately';
10
+ export type ToastPlacement = 'top' | 'top-start' | 'top-end' | 'bottom' | 'bottom-start' | 'bottom-end';
11
+ export type ToastVariant = 'info' | 'success' | 'warning' | 'error' | 'neutral';
12
+ export interface ToastProviderProps extends HeadlessToastProviderProps {
13
+ }
14
+ export interface ToastRegionProps extends Omit<HeadlessToastRegionProps, 'class' | 'style' | 'children'> {
15
+ /** The placement of the toast region. */
16
+ placement?: ToastPlacement;
17
+ /** Additional CSS class name. */
18
+ class?: string;
19
+ }
20
+ export interface ToastProps extends Omit<HeadlessToastProps, 'class' | 'style'> {
21
+ /** Additional CSS class name. */
22
+ class?: string;
23
+ }
24
+ /**
25
+ * ToastProvider creates a toast queue context for descendant components.
26
+ * Wrap your app or a section that needs toast notifications.
27
+ *
28
+ * @example
29
+ * ```tsx
30
+ * <ToastProvider>
31
+ * <App />
32
+ * <ToastRegion placement="bottom-end" />
33
+ * </ToastProvider>
34
+ * ```
35
+ */
36
+ export declare function ToastProvider(props: ToastProviderProps): JSX.Element;
37
+ /**
38
+ * ToastRegion displays all visible toasts in a fixed position.
39
+ *
40
+ * @example
41
+ * ```tsx
42
+ * <ToastRegion placement="bottom-end" />
43
+ * ```
44
+ */
45
+ export declare function ToastRegion(props: ToastRegionProps): JSX.Element;
46
+ /**
47
+ * Toast displays an individual notification with icon, content, and close button.
48
+ *
49
+ * Usually you don't need to use this directly - ToastRegion renders toasts automatically.
50
+ */
51
+ export declare function Toast(props: ToastProps): JSX.Element;
52
+ /**
53
+ * Add a toast to the global queue.
54
+ * Use this to show toasts from anywhere in your app.
55
+ *
56
+ * @example
57
+ * ```tsx
58
+ * // Show a success toast
59
+ * addToast({
60
+ * title: 'Success!',
61
+ * description: 'Your changes have been saved.',
62
+ * type: 'success',
63
+ * });
64
+ *
65
+ * // Show an error toast with auto-dismiss
66
+ * addToast({
67
+ * title: 'Error',
68
+ * description: 'Something went wrong.',
69
+ * type: 'error',
70
+ * }, { timeout: 5000 });
71
+ *
72
+ * // Show a toast with action
73
+ * addToast({
74
+ * title: 'File deleted',
75
+ * type: 'info',
76
+ * action: {
77
+ * label: 'Undo',
78
+ * onAction: () => restoreFile(),
79
+ * },
80
+ * }, { timeout: 10000 });
81
+ * ```
82
+ */
83
+ export declare function addToast(content: ToastContent, options?: ToastOptions): string;
84
+ /**
85
+ * Convenience function to show a success toast.
86
+ */
87
+ export declare function toastSuccess(message: string, options?: Omit<ToastOptions, 'priority'>): string;
88
+ /**
89
+ * Convenience function to show an error toast.
90
+ */
91
+ export declare function toastError(message: string, options?: Omit<ToastOptions, 'priority'>): string;
92
+ /**
93
+ * Convenience function to show a warning toast.
94
+ */
95
+ export declare function toastWarning(message: string, options?: Omit<ToastOptions, 'priority'>): string;
96
+ /**
97
+ * Convenience function to show an info toast.
98
+ */
99
+ export declare function toastInfo(message: string, options?: Omit<ToastOptions, 'priority'>): string;
100
+ export { ToastContext, globalToastQueue, useToastContext, type ToastContent, type ToastRenderProps, type ToastRegionRenderProps, type QueuedToast, type ToastOptions, };
101
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toast/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAyB,MAAM,UAAU,CAAC;AAC3D,OAAO,EAIL,YAAY,EAEZ,gBAAgB,EAEhB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,UAAU,IAAI,kBAAkB,EACrC,KAAK,gBAAgB,IAAI,wBAAwB,EACjD,KAAK,kBAAkB,IAAI,0BAA0B,EACrD,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC5B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,KAAK,WAAW,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAMtF,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,WAAW,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,GAAG,YAAY,CAAC;AACxG,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;AAEhF,MAAM,WAAW,kBAAmB,SAAQ,0BAA0B;CAAG;AAEzE,MAAM,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AAC,EAAE,IAAI,CAAC,YAAY,EAAE,UAAU,CAAC,GAAG,MAAM,CAE3F;AAGD,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,KAAK,YAAY,EACjB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,WAAW,EAChB,KAAK,YAAY,GAClB,CAAC"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Toolbar component for proyecto-viviana-ui
3
+ *
4
+ * Styled toolbar component built on top of solidaria-components Toolbar.
5
+ */
6
+ import { type JSX } from 'solid-js';
7
+ import { type ToolbarProps as HeadlessToolbarProps } from '@proyecto-viviana/solidaria-components';
8
+ export type ToolbarSize = 'sm' | 'md' | 'lg';
9
+ export type ToolbarVariant = 'default' | 'bordered' | 'ghost';
10
+ export interface ToolbarProps extends Omit<HeadlessToolbarProps, 'class' | 'style'> {
11
+ /** The visual variant of the toolbar. @default 'default' */
12
+ variant?: ToolbarVariant;
13
+ /** The size of the toolbar. @default 'md' */
14
+ size?: ToolbarSize;
15
+ /** Additional CSS class name. */
16
+ class?: string;
17
+ /** Inline styles. */
18
+ style?: JSX.CSSProperties;
19
+ }
20
+ /**
21
+ * A styled toolbar for grouping interactive controls with keyboard navigation.
22
+ *
23
+ * @example
24
+ * ```tsx
25
+ * <Toolbar aria-label="Text formatting">
26
+ * <Button>Bold</Button>
27
+ * <Button>Italic</Button>
28
+ * <Separator orientation="vertical" />
29
+ * <Button>Align Left</Button>
30
+ * <Button>Align Center</Button>
31
+ * </Toolbar>
32
+ *
33
+ * // Vertical toolbar
34
+ * <Toolbar orientation="vertical" variant="bordered">
35
+ * <Button>Cut</Button>
36
+ * <Button>Copy</Button>
37
+ * <Button>Paste</Button>
38
+ * </Toolbar>
39
+ * ```
40
+ */
41
+ export declare function Toolbar(props: ToolbarProps): JSX.Element;
42
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/toolbar/index.tsx"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA0B,MAAM,UAAU,CAAA;AAC3D,OAAO,EAEL,KAAK,YAAY,IAAI,oBAAoB,EAE1C,MAAM,wCAAwC,CAAA;AAM/C,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AAC5C,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;AAE7D,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,OAAO,CAAC;IACjF,4DAA4D;IAC5D,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,WAAW,CAAA;IAClB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,qBAAqB;IACrB,KAAK,CAAC,EAAE,GAAG,CAAC,aAAa,CAAA;CAC1B;AA6BD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CA4BxD"}
@@ -1,5 +1,56 @@
1
- import type { JSX } from 'solid-js';
2
- export interface TooltipProps {
1
+ /**
2
+ * Tooltip component for proyecto-viviana-ui
3
+ *
4
+ * A tooltip displays a description of an element on hover or focus.
5
+ * Built on top of solidaria-components for accessibility.
6
+ */
7
+ import { type JSX } from 'solid-js';
8
+ import { type TooltipProps as HeadlessTooltipProps, type TooltipTriggerComponentProps as HeadlessTooltipTriggerProps, type TooltipRenderProps } from '@proyecto-viviana/solidaria-components';
9
+ export type TooltipPlacement = 'top' | 'bottom' | 'left' | 'right';
10
+ export type TooltipVariant = 'default' | 'neutral' | 'info';
11
+ export interface TooltipTriggerProps extends HeadlessTooltipTriggerProps {
12
+ /** The children of the tooltip trigger (trigger element and tooltip). */
13
+ children: JSX.Element;
14
+ }
15
+ export interface TooltipProps extends Omit<HeadlessTooltipProps, 'class' | 'style' | 'children'> {
16
+ /** The content of the tooltip. */
17
+ children: JSX.Element;
18
+ /** The position of the tooltip relative to the trigger. */
19
+ placement?: TooltipPlacement;
20
+ /** Visual variant of the tooltip. */
21
+ variant?: TooltipVariant;
22
+ /** Additional CSS class name. */
23
+ class?: string;
24
+ /** Whether to show an arrow pointing to the trigger. */
25
+ showArrow?: boolean;
26
+ }
27
+ /**
28
+ * TooltipTrigger wraps around a trigger element and a Tooltip.
29
+ * It handles opening and closing the Tooltip when the user hovers
30
+ * over or focuses the trigger.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * <TooltipTrigger>
35
+ * <Button>Hover me</Button>
36
+ * <Tooltip>This is helpful information</Tooltip>
37
+ * </TooltipTrigger>
38
+ * ```
39
+ */
40
+ export declare function TooltipTrigger(props: TooltipTriggerProps): JSX.Element;
41
+ /**
42
+ * Styled tooltip component that displays a description on hover or focus.
43
+ *
44
+ * @example
45
+ * ```tsx
46
+ * <TooltipTrigger>
47
+ * <Button>Save</Button>
48
+ * <Tooltip placement="top">Save your changes</Tooltip>
49
+ * </TooltipTrigger>
50
+ * ```
51
+ */
52
+ export declare function Tooltip(props: TooltipProps): JSX.Element;
53
+ export interface SimpleTooltipProps {
3
54
  /** The content to show in the tooltip */
4
55
  label: string;
5
56
  /** The trigger element */
@@ -10,8 +61,18 @@ export interface TooltipProps {
10
61
  class?: string;
11
62
  }
12
63
  /**
13
- * Tooltip component that shows a label on hover.
14
- * Uses CSS-only hover effect for performance.
64
+ * Simple CSS-only tooltip component.
65
+ * Uses CSS hover effect for performance. No JS state management.
66
+ *
67
+ * @deprecated Use the accessible Tooltip + TooltipTrigger components instead.
68
+ *
69
+ * @example
70
+ * ```tsx
71
+ * <SimpleTooltip label="Save your changes">
72
+ * <button>Save</button>
73
+ * </SimpleTooltip>
74
+ * ```
15
75
  */
16
- export declare function Tooltip(props: TooltipProps): JSX.Element;
76
+ export declare function SimpleTooltip(props: SimpleTooltipProps): JSX.Element;
77
+ export type { TooltipRenderProps };
17
78
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,UAAU,CAAA;AAEnC,MAAM,WAAW,YAAY;IAC3B,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC3B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;GAGG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAaxD"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tooltip/index.tsx"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,KAAK,GAAG,EAAoB,MAAM,UAAU,CAAA;AACrD,OAAO,EAGL,KAAK,YAAY,IAAI,oBAAoB,EACzC,KAAK,4BAA4B,IAAI,2BAA2B,EAChE,KAAK,kBAAkB,EACxB,MAAM,wCAAwC,CAAA;AAM/C,MAAM,MAAM,gBAAgB,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAA;AAClE,MAAM,MAAM,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,MAAM,CAAA;AAE3D,MAAM,WAAW,mBAAoB,SAAQ,2BAA2B;IACtE,yEAAyE;IACzE,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;CACtB;AAED,MAAM,WAAW,YAAa,SAAQ,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,OAAO,GAAG,UAAU,CAAC;IAC9F,kCAAkC;IAClC,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,2DAA2D;IAC3D,SAAS,CAAC,EAAE,gBAAgB,CAAA;IAC5B,qCAAqC;IACrC,OAAO,CAAC,EAAE,cAAc,CAAA;IACxB,iCAAiC;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wDAAwD;IACxD,SAAS,CAAC,EAAE,OAAO,CAAA;CACpB;AA2CD;;;;;;;;;;;;GAYG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAEtE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,YAAY,GAAG,GAAG,CAAC,OAAO,CAwCxD;AAMD,MAAM,WAAW,kBAAkB;IACjC,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAA;IACb,0BAA0B;IAC1B,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAA;IACrB,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAA;IAC3B,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,kBAAkB,GAAG,GAAG,CAAC,OAAO,CAapE;AAGD,YAAY,EAAE,kBAAkB,EAAE,CAAA"}
@@ -0,0 +1,99 @@
1
+ /**
2
+ * Tree component for proyecto-viviana-ui
3
+ *
4
+ * Styled tree component built on top of solidaria-components.
5
+ * Inspired by Spectrum 2's Tree component patterns.
6
+ *
7
+ * Tree displays hierarchical data with expandable/collapsible nodes,
8
+ * supporting keyboard navigation and selection.
9
+ */
10
+ import { type JSX } from 'solid-js';
11
+ import { type TreeProps as HeadlessTreeProps, type TreeItemProps as HeadlessTreeItemProps, type TreeExpandButtonProps as HeadlessTreeExpandButtonProps, type TreeRenderItemState } from '@proyecto-viviana/solidaria-components';
12
+ import type { Key, TreeItemData } from '@proyecto-viviana/solid-stately';
13
+ export type TreeSize = 'sm' | 'md' | 'lg';
14
+ export type TreeVariant = 'default' | 'bordered' | 'quiet';
15
+ export interface TreeProps<T extends object> extends Omit<HeadlessTreeProps<T>, 'class' | 'style'> {
16
+ /** The size of the tree. */
17
+ size?: TreeSize;
18
+ /** The visual variant of the tree. */
19
+ variant?: TreeVariant;
20
+ /** Additional CSS class name. */
21
+ class?: string;
22
+ /** Label for the tree. */
23
+ label?: string;
24
+ /** Description for the tree. */
25
+ description?: string;
26
+ }
27
+ export interface TreeItemProps<T extends object> extends Omit<HeadlessTreeItemProps<T>, 'class' | 'style'> {
28
+ /** Additional CSS class name. */
29
+ class?: string;
30
+ /** Optional description text. */
31
+ description?: string;
32
+ /**
33
+ * Optional icon to display before the content.
34
+ * Use a function returning JSX for SSR compatibility: `icon={() => <FolderIcon />}`
35
+ */
36
+ icon?: () => JSX.Element;
37
+ }
38
+ export interface TreeExpandButtonProps extends Omit<HeadlessTreeExpandButtonProps, 'class' | 'style'> {
39
+ /** Additional CSS class name. */
40
+ class?: string;
41
+ }
42
+ /**
43
+ * A tree displays hierarchical data with expandable/collapsible nodes,
44
+ * supporting keyboard navigation and selection.
45
+ *
46
+ * Built on solidaria-components Tree for full accessibility support.
47
+ *
48
+ * @example
49
+ * ```tsx
50
+ * const items = [
51
+ * {
52
+ * key: 'documents',
53
+ * value: { name: 'Documents' },
54
+ * children: [
55
+ * { key: 'doc1', value: { name: 'Report.pdf' } },
56
+ * { key: 'doc2', value: { name: 'Notes.txt' } },
57
+ * ],
58
+ * },
59
+ * {
60
+ * key: 'images',
61
+ * value: { name: 'Images' },
62
+ * children: [
63
+ * { key: 'img1', value: { name: 'Photo.jpg' } },
64
+ * ],
65
+ * },
66
+ * ]
67
+ *
68
+ * <Tree items={items} defaultExpandedKeys={['documents']}>
69
+ * {(item, state) => (
70
+ * <TreeItem id={item.key} icon={() => <FolderIcon />}>
71
+ * {item.value.name}
72
+ * </TreeItem>
73
+ * )}
74
+ * </Tree>
75
+ * ```
76
+ */
77
+ export declare function Tree<T extends object>(props: TreeProps<T>): JSX.Element;
78
+ export declare namespace Tree {
79
+ var Item: typeof TreeItem;
80
+ var ExpandButton: typeof TreeExpandButton;
81
+ var SelectionCheckbox: typeof TreeSelectionCheckbox;
82
+ }
83
+ /**
84
+ * An item in a tree.
85
+ */
86
+ export declare function TreeItem<T extends object>(props: TreeItemProps<T>): JSX.Element;
87
+ /**
88
+ * A button to expand/collapse a tree item.
89
+ */
90
+ export declare function TreeExpandButton(props: TreeExpandButtonProps): JSX.Element;
91
+ /**
92
+ * A styled checkbox for item selection in a tree.
93
+ */
94
+ export declare function TreeSelectionCheckbox(props: {
95
+ itemKey: Key;
96
+ class?: string;
97
+ }): JSX.Element;
98
+ export type { Key, TreeItemData, TreeRenderItemState };
99
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tree/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAAE,KAAK,GAAG,EAA+C,MAAM,UAAU,CAAA;AAChF,OAAO,EAKL,KAAK,SAAS,IAAI,iBAAiB,EACnC,KAAK,aAAa,IAAI,qBAAqB,EAC3C,KAAK,qBAAqB,IAAI,6BAA6B,EAG3D,KAAK,mBAAmB,EACzB,MAAM,wCAAwC,CAAA;AAC/C,OAAO,KAAK,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAMxE,MAAM,MAAM,QAAQ,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAA;AACzC,MAAM,MAAM,WAAW,GAAG,SAAS,GAAG,UAAU,GAAG,OAAO,CAAA;AAa1D,MAAM,WAAW,SAAS,CAAC,CAAC,SAAS,MAAM,CACzC,SAAQ,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC;IACrD,4BAA4B;IAC5B,IAAI,CAAC,EAAE,QAAQ,CAAA;IACf,sCAAsC;IACtC,OAAO,CAAC,EAAE,WAAW,C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