@accelint/design-toolkit 5.0.0 → 5.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.
- package/dist/components/accordion/index.js +2 -0
- package/dist/components/accordion/styles.js +1 -1
- package/dist/components/accordion/styles.js.map +1 -1
- package/dist/components/action-bar/index.js +2 -0
- package/dist/components/action-bar/styles.d.ts +1 -1
- package/dist/components/action-bar/styles.js +1 -1
- package/dist/components/action-bar/styles.js.map +1 -1
- package/dist/components/avatar/index.js +2 -0
- package/dist/components/badge/index.js +2 -0
- package/dist/components/breadcrumbs/index.d.ts +15 -0
- package/dist/components/breadcrumbs/index.js +4 -0
- package/dist/components/breadcrumbs/index.js.map +1 -0
- package/dist/components/breadcrumbs/styles.d.ts +48 -0
- package/dist/components/breadcrumbs/styles.js +2 -0
- package/dist/components/breadcrumbs/styles.js.map +1 -0
- package/dist/components/breadcrumbs/types.d.ts +20 -0
- package/dist/components/breadcrumbs/types.js +2 -0
- package/dist/components/breadcrumbs/types.js.map +1 -0
- package/dist/components/button/index.d.ts +2 -2
- package/dist/components/button/index.js +3 -1
- package/dist/components/button/index.js.map +1 -1
- package/dist/components/button/styles.d.ts +15 -15
- package/dist/components/button/styles.js +1 -1
- package/dist/components/button/styles.js.map +1 -1
- package/dist/components/button/types.d.ts +7 -5
- package/dist/components/checkbox/index.js +2 -0
- package/dist/components/chip/index.js +2 -0
- package/dist/components/classification-badge/index.js +3 -1
- package/dist/components/classification-badge/index.js.map +1 -1
- package/dist/components/classification-badge/styles.d.ts +1 -1
- package/dist/components/classification-badge/styles.js +1 -1
- package/dist/components/classification-badge/styles.js.map +1 -1
- package/dist/components/classification-banner/index.js +3 -1
- package/dist/components/classification-banner/index.js.map +1 -1
- package/dist/components/classification-banner/styles.d.ts +1 -1
- package/dist/components/classification-banner/styles.js +1 -1
- package/dist/components/classification-banner/styles.js.map +1 -1
- package/dist/components/color-picker/index.js +2 -0
- package/dist/components/color-picker/styles.d.ts +3 -3
- package/dist/components/combobox-field/index.js +2 -0
- package/dist/components/combobox-field/styles.d.ts +1 -1
- package/dist/components/combobox-field/styles.js +1 -1
- package/dist/components/combobox-field/styles.js.map +1 -1
- package/dist/components/date-field/index.js +2 -0
- package/dist/components/date-field/index.js.map +1 -1
- package/dist/components/date-field/styles.d.ts +1 -1
- package/dist/components/date-field/styles.js +1 -1
- package/dist/components/date-field/styles.js.map +1 -1
- package/dist/components/details-list/index.js +2 -0
- package/dist/components/dialog/index.js +2 -0
- package/dist/components/dialog/styles.d.ts +1 -1
- package/dist/components/dialog/styles.js +1 -1
- package/dist/components/dialog/styles.js.map +1 -1
- package/dist/components/divider/index.d.ts +32 -0
- package/dist/components/divider/index.js +4 -0
- package/dist/components/divider/index.js.map +1 -0
- package/dist/components/divider/styles.d.ts +5 -0
- package/dist/components/divider/styles.js +2 -0
- package/dist/components/divider/styles.js.map +1 -0
- package/dist/components/divider/types.d.ts +11 -0
- package/dist/components/divider/types.js +2 -0
- package/dist/components/divider/types.js.map +1 -0
- package/dist/components/drawer/index.d.ts +12 -2
- package/dist/components/drawer/index.js +3 -1
- package/dist/components/drawer/index.js.map +1 -1
- package/dist/components/drawer/styles.d.ts +3 -3
- package/dist/components/drawer/styles.js +1 -1
- package/dist/components/drawer/styles.js.map +1 -1
- package/dist/components/drawer/types.d.ts +13 -7
- package/dist/components/hero/index.js +2 -0
- package/dist/components/hotkey/index.js +2 -0
- package/dist/components/icon/index.js +3 -1
- package/dist/components/icon/index.js.map +1 -1
- package/dist/components/input/index.js +2 -0
- package/dist/components/input/styles.js +1 -1
- package/dist/components/input/styles.js.map +1 -1
- package/dist/components/label/index.js +2 -0
- package/dist/components/link/index.js +2 -0
- package/dist/components/link/styles.d.ts +1 -1
- package/dist/components/link/styles.js +1 -1
- package/dist/components/link/styles.js.map +1 -1
- package/dist/components/menu/index.js +2 -0
- package/dist/components/menu/styles.js +1 -1
- package/dist/components/menu/styles.js.map +1 -1
- package/dist/components/options/index.js +2 -0
- package/dist/components/options/styles.d.ts +1 -1
- package/dist/components/options/styles.js +1 -1
- package/dist/components/options/styles.js.map +1 -1
- package/dist/components/popover/index.js +2 -0
- package/dist/components/popover/index.js.map +1 -1
- package/dist/components/query-builder/action-element.js +2 -0
- package/dist/components/query-builder/group.js +2 -0
- package/dist/components/query-builder/rule.js +2 -0
- package/dist/components/query-builder/value-editor.js +2 -0
- package/dist/components/radio/index.js +2 -0
- package/dist/components/search-field/index.js +2 -0
- package/dist/components/search-field/styles.js +1 -1
- package/dist/components/search-field/styles.js.map +1 -1
- package/dist/components/select-field/index.js +2 -0
- package/dist/components/select-field/types.d.ts +0 -1
- package/dist/components/sidenav/index.d.ts +16 -8
- package/dist/components/sidenav/index.js +3 -1
- package/dist/components/sidenav/index.js.map +1 -1
- package/dist/components/sidenav/styles.d.ts +43 -1
- package/dist/components/sidenav/styles.js +1 -1
- package/dist/components/sidenav/styles.js.map +1 -1
- package/dist/components/sidenav/types.d.ts +40 -8
- package/dist/components/slider/index.js +2 -0
- package/dist/components/slider/styles.d.ts +1 -1
- package/dist/components/slider/styles.js +1 -1
- package/dist/components/slider/styles.js.map +1 -1
- package/dist/components/switch/index.js +2 -0
- package/dist/components/table/context.d.ts +11 -0
- package/dist/components/table/context.js +2 -0
- package/dist/components/table/context.js.map +1 -0
- package/dist/components/table/index.d.ts +27 -0
- package/dist/components/table/index.js +4 -0
- package/dist/components/table/index.js.map +1 -0
- package/dist/components/table/styles.d.ts +134 -0
- package/dist/components/table/styles.js +2 -0
- package/dist/components/table/styles.js.map +1 -0
- package/dist/components/table/table-body.d.ts +12 -0
- package/dist/components/table/table-body.js +2 -0
- package/dist/components/table/table-body.js.map +1 -0
- package/dist/components/table/table-cell.d.ts +12 -0
- package/dist/components/table/table-cell.js +2 -0
- package/dist/components/table/table-cell.js.map +1 -0
- package/dist/components/table/table-header-cell.d.ts +12 -0
- package/dist/components/table/table-header-cell.js +2 -0
- package/dist/components/table/table-header-cell.js.map +1 -0
- package/dist/components/table/table-header.d.ts +12 -0
- package/dist/components/table/table-header.js +2 -0
- package/dist/components/table/table-header.js.map +1 -0
- package/dist/components/table/table-row.d.ts +12 -0
- package/dist/components/table/table-row.js +2 -0
- package/dist/components/table/table-row.js.map +1 -0
- package/dist/components/table/types.d.ts +185 -0
- package/dist/components/table/types.js +2 -0
- package/dist/components/table/types.js.map +1 -0
- package/dist/components/tabs/index.js +2 -0
- package/dist/components/tabs/styles.d.ts +1 -1
- package/dist/components/tabs/styles.js +1 -1
- package/dist/components/tabs/styles.js.map +1 -1
- package/dist/components/text-area-field/index.js +2 -0
- package/dist/components/text-field/index.js +2 -0
- package/dist/components/time-field/index.d.ts +10 -0
- package/dist/components/time-field/index.js +4 -0
- package/dist/components/time-field/index.js.map +1 -0
- package/dist/components/time-field/styles.d.ts +69 -0
- package/dist/components/time-field/styles.js +2 -0
- package/dist/components/time-field/styles.js.map +1 -0
- package/dist/components/time-field/types.d.ts +23 -0
- package/dist/components/time-field/types.js +2 -0
- package/dist/components/time-field/types.js.map +1 -0
- package/dist/components/tooltip/index.js +3 -1
- package/dist/components/tooltip/index.js.map +1 -1
- package/dist/components/tree/index.js +3 -1
- package/dist/components/tree/index.js.map +1 -1
- package/dist/components/tree/styles.js +1 -1
- package/dist/components/tree/styles.js.map +1 -1
- package/dist/components/view-stack/index.js +2 -0
- package/dist/foundation/token-data.js +1 -1
- package/dist/foundation/token-data.js.map +1 -1
- package/dist/hooks/use-tree/actions/cache.js +1 -1
- package/dist/hooks/use-tree/actions/cache.js.map +1 -1
- package/dist/hooks/use-tree/actions/index.js +2 -0
- package/dist/index.d.ts +21 -2
- package/dist/index.js +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/theme-provider.js +2 -0
- package/dist/styles.css +3079 -901
- package/dist/tokens/themes.css +56 -24
- package/dist/tokens/tokens.css +8 -8
- package/dist/tokens/tokens.d.ts +18 -0
- package/dist/tokens/tokens.js +1 -1
- package/dist/tokens/tokens.js.map +1 -1
- package/dist/tokens/types.d.ts +9 -0
- package/dist/variants/variants.css +3 -0
- package/package.json +12 -5
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {jsx}from'react/jsx-runtime';import {TableRowStyles}from'./styles.js';import {TableCell}from'./table-cell.js';function i({ref:o,children:a,className:s,row:e,...p}){const r=e?.getAllCells();return jsx("tr",{...p,ref:o,className:TableRowStyles({className:s}),"data-pinned":e?.getIsPinned()||null,"data-selected":e?.getIsSelected()||null,children:a||r?.map(l=>jsx(TableCell,{cell:l},l.id))})}export{i as TableRow};//# sourceMappingURL=table-row.js.map
|
|
2
|
+
//# sourceMappingURL=table-row.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/table/table-row.tsx"],"names":["ref","row","cells","jsx","t","cell"],"mappings":"qHAiBO,SACLA,CACA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,CAAA,SACAC,CACA,CAAA,CAAA,GACF,CAAqB,CACnB,CAAA,GAAA,CAAA,CAAMC,CAAAA,CAAQD,MAAK,CAAA,CAAA,CAAA,EAAA,WAEnB,EACEE,QACGC,GAAA,CAAA,IACD,CAAA,CAAA,GACA,CAAA,CAAA,GAAA,CAAA,CAAA,CAAA,mCACA,CAAA,CAAA,CAAA,CAAA,CAAA,aAAkB,CAAA,CAAA,EAAA,WAAiB,wBACf,CAAA,CAAA,EAAA,aAAmB,EAEtC,EAAA,IAAA,CAAA,QACQ,CAAA,CAAA,KAAcD,GAAC,CAAwB,CAAA,EAAAC,GAAA,CAAMC,SAAAA,CAAAA,CAAfA,IAAqB,CAAE,EAChE,CAEJ,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,CAAA","file":"table-row.js","sourcesContent":["// __private-exports\n/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { TableRowStyles } from './styles';\nimport { TableCell } from './table-cell';\nimport type { TableRowProps } from './types';\n\nexport function TableRow<T>({\n ref,\n children,\n className,\n row,\n ...rest\n}: TableRowProps<T>) {\n const cells = row?.getAllCells();\n\n return (\n <tr\n {...rest}\n ref={ref}\n className={TableRowStyles({ className })}\n data-pinned={row?.getIsPinned() || null}\n data-selected={row?.getIsSelected() || null}\n >\n {children ||\n cells?.map((cell) => <TableCell key={cell.id} cell={cell} />)}\n </tr>\n );\n}\n"]}
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
import { Key } from '@react-types/shared';
|
|
2
|
+
import { ColumnDef, Row, Cell, HeaderGroup, Header } from '@tanstack/react-table';
|
|
3
|
+
import { Dispatch, SetStateAction, ComponentPropsWithRef, PropsWithChildren } from 'react';
|
|
4
|
+
import { VariantProps } from 'tailwind-variants';
|
|
5
|
+
import { TableCellStyles, TableHeaderCellStyles } from './styles.js';
|
|
6
|
+
import 'tailwind-merge';
|
|
7
|
+
|
|
8
|
+
type BaseTableProps = Omit<ComponentPropsWithRef<'table'>, 'children'>;
|
|
9
|
+
type ExtendedTableProps<T extends {
|
|
10
|
+
id: Key;
|
|
11
|
+
}> = {
|
|
12
|
+
/**
|
|
13
|
+
* An array of column definitions, one for each key in `T`.
|
|
14
|
+
*/
|
|
15
|
+
columns: {
|
|
16
|
+
[K in keyof Required<T>]: ColumnDef<T, T[K]>;
|
|
17
|
+
}[keyof T][];
|
|
18
|
+
/**
|
|
19
|
+
* An array of data objects of type `T`.
|
|
20
|
+
* Each object must have a unique `id` property.
|
|
21
|
+
*/
|
|
22
|
+
data: T[];
|
|
23
|
+
/**
|
|
24
|
+
* Whether to display a checkbox column.
|
|
25
|
+
*/
|
|
26
|
+
showCheckbox?: boolean;
|
|
27
|
+
/**
|
|
28
|
+
* Position of the kebab menu, either 'left' or 'right'.
|
|
29
|
+
*/
|
|
30
|
+
kebabPosition?: 'left' | 'right';
|
|
31
|
+
/**
|
|
32
|
+
* Whether to persist the header kebab menu.
|
|
33
|
+
* If true, the header kebab menu is always visible.
|
|
34
|
+
* If false, it is only visible on hover or when the row is hovered.
|
|
35
|
+
*/
|
|
36
|
+
persistHeaderKebabMenu?: boolean;
|
|
37
|
+
/**
|
|
38
|
+
* Whether to persist the kebab menu.
|
|
39
|
+
* If true, the kebab menu is always visible.
|
|
40
|
+
* If false, it is only visible on hover or when the row is hovered.
|
|
41
|
+
*/
|
|
42
|
+
persistRowKebabMenu?: boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Whether to persist numeral columns.
|
|
45
|
+
* If true, numeral columns are always visible.
|
|
46
|
+
* If false, they are only visible on hover or when the row is hovered.
|
|
47
|
+
*/
|
|
48
|
+
persistNumerals?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to enable sorting.
|
|
51
|
+
* If true, the table will support sorting.
|
|
52
|
+
* If false, the table will not support sorting.
|
|
53
|
+
*/
|
|
54
|
+
enableSorting?: boolean;
|
|
55
|
+
/**
|
|
56
|
+
* Whether to enable column ordering.
|
|
57
|
+
* If true, the table will support column ordering.
|
|
58
|
+
* If false, the table will not support column ordering.
|
|
59
|
+
*/
|
|
60
|
+
enableColumnOrdering?: boolean;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to enable actions for rows.
|
|
63
|
+
* If true, the table will support ability to take action on row.
|
|
64
|
+
* If false, the table will not support ability to take action on row.
|
|
65
|
+
*/
|
|
66
|
+
enableRowActions?: boolean;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* Props for the Table component.
|
|
70
|
+
*
|
|
71
|
+
* @template T - The type of data objects, which must include an `id` property of type `string` or `number`.
|
|
72
|
+
*
|
|
73
|
+
* This type extends `BaseTableProps` and supports two mutually exclusive prop sets:
|
|
74
|
+
*
|
|
75
|
+
* 1. **Data Table Mode**:
|
|
76
|
+
* - `columns`: An array of column definitions, one for each key in `T`.
|
|
77
|
+
* - `data`: An array of data objects of type `T`.
|
|
78
|
+
* - `showCheckbox` (optional): Whether to display a checkbox column.
|
|
79
|
+
* - `kebabPosition` (optional): Position of the kebab menu, either `'left'` or `'right'`.
|
|
80
|
+
* - `persistRowActionMenu` (optional): Whether to persist the kebab menu.
|
|
81
|
+
* - `persistNumerals` (optional): Whether to persist numeral columns.
|
|
82
|
+
* - `children`: Must not be provided in this mode.
|
|
83
|
+
*
|
|
84
|
+
* 2. **Custom Content Mode**:
|
|
85
|
+
* - All table-related props (`data`, `columns`, etc.) must not be provided.
|
|
86
|
+
* - Allows for custom children content.
|
|
87
|
+
*
|
|
88
|
+
* @see {@link BaseTableProps}
|
|
89
|
+
*/
|
|
90
|
+
type TableProps<T extends {
|
|
91
|
+
id: Key;
|
|
92
|
+
}> = BaseTableProps & ((ExtendedTableProps<T> & {
|
|
93
|
+
children?: never;
|
|
94
|
+
}) | PropsWithChildren<{
|
|
95
|
+
[K in keyof ExtendedTableProps<T>]?: never;
|
|
96
|
+
}>);
|
|
97
|
+
/**
|
|
98
|
+
* Props for the `<tbody>` section of a table component.
|
|
99
|
+
*
|
|
100
|
+
* Extends standard HTML attributes and ref attributes for the `<tbody>` element,
|
|
101
|
+
* allowing you to pass any valid HTML properties or refs to the table body.
|
|
102
|
+
*
|
|
103
|
+
* @see {@link HTMLAttributes}
|
|
104
|
+
* @see {@link RefAttributes}
|
|
105
|
+
*/
|
|
106
|
+
type TableBodyProps<T> = ComponentPropsWithRef<'tbody'> & {
|
|
107
|
+
rows?: Row<T>[];
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Props for a table row (`<tr>`) component.
|
|
111
|
+
*
|
|
112
|
+
* Extends standard HTML attributes and ref attributes for an HTMLTableRowElement,
|
|
113
|
+
* allowing you to pass any valid `<tr>` properties and a ref.
|
|
114
|
+
*
|
|
115
|
+
* @see {@link HTMLAttributes}
|
|
116
|
+
* @see {@link RefAttributes}
|
|
117
|
+
*/
|
|
118
|
+
type TableRowProps<T> = ComponentPropsWithRef<'tr'> & {
|
|
119
|
+
row?: Row<T>;
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Props for a table cell component.
|
|
123
|
+
*
|
|
124
|
+
* Extends the standard HTML `<td>` element attributes and includes variant styling props.
|
|
125
|
+
*
|
|
126
|
+
* @remarks
|
|
127
|
+
* - Inherits all properties from `TdHTMLAttributes<HTMLTableCellElement>`.
|
|
128
|
+
* - Includes variant properties from `cellStyles`.
|
|
129
|
+
* - Optionally accepts a `ref` to the underlying `<td>` element.
|
|
130
|
+
*
|
|
131
|
+
* @property ref - Optional React ref for the table cell element.
|
|
132
|
+
* @property className - Optional class name for custom styling.
|
|
133
|
+
* @property narrow - Optional boolean to apply narrow styling.
|
|
134
|
+
* @property numeral - Optional boolean to apply numeral styling.
|
|
135
|
+
* @property persistent - Optional boolean to control visibility behavior.
|
|
136
|
+
* If true, the cell is always visible.
|
|
137
|
+
* If false, the cell content is only visible on hover or when the row is hovered.
|
|
138
|
+
*/
|
|
139
|
+
type TableCellProps<T> = ComponentPropsWithRef<'td'> & VariantProps<typeof TableCellStyles> & {
|
|
140
|
+
cell?: Cell<T, unknown>;
|
|
141
|
+
};
|
|
142
|
+
/**
|
|
143
|
+
* Props for a table header cell component.
|
|
144
|
+
*
|
|
145
|
+
* This type combines standard HTML `<th>` element attributes, style variant props,
|
|
146
|
+
* and ref attributes for a table header cell.
|
|
147
|
+
*
|
|
148
|
+
* @see {@link VariantProps}
|
|
149
|
+
* @see {@link RefAttributes}
|
|
150
|
+
*/
|
|
151
|
+
type TableHeaderCellProps<T> = ComponentPropsWithRef<'th'> & VariantProps<typeof TableHeaderCellStyles> & {
|
|
152
|
+
header?: Header<T, unknown>;
|
|
153
|
+
};
|
|
154
|
+
/**
|
|
155
|
+
* Props for the table header (`<thead>`) component.
|
|
156
|
+
*
|
|
157
|
+
* Extends standard HTML attributes and ref attributes for an HTMLTableSectionElement.
|
|
158
|
+
*
|
|
159
|
+
* @see {@link HTMLAttributes}
|
|
160
|
+
* @see {@link RefAttributes}
|
|
161
|
+
*/
|
|
162
|
+
type TableHeaderProps<T> = ComponentPropsWithRef<'thead'> & {
|
|
163
|
+
/**
|
|
164
|
+
* Array of header groups of the table
|
|
165
|
+
*/
|
|
166
|
+
headerGroups?: HeaderGroup<T>[];
|
|
167
|
+
/**
|
|
168
|
+
* The currently selected column ID
|
|
169
|
+
*/
|
|
170
|
+
columnSelection?: string | null;
|
|
171
|
+
};
|
|
172
|
+
type TableContextValue = {
|
|
173
|
+
columnSelection: string | null;
|
|
174
|
+
enableColumnReordering: boolean;
|
|
175
|
+
enableSorting: boolean;
|
|
176
|
+
enableRowActions: boolean;
|
|
177
|
+
persistHeaderKebabMenu: boolean;
|
|
178
|
+
persistRowKebabMenu: boolean;
|
|
179
|
+
persistNumerals: boolean;
|
|
180
|
+
moveColumnLeft: (index: number) => void;
|
|
181
|
+
moveColumnRight: (index: number) => void;
|
|
182
|
+
setColumnSelection: Dispatch<SetStateAction<string | null>>;
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export type { TableBodyProps, TableCellProps, TableContextValue, TableHeaderCellProps, TableHeaderProps, TableProps, TableRowProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import {jsx}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {Tab,composeRenderProps,useContextProps,Tabs,TabPanel,TabList}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {TabStyles}from'./styles.js';const {tabs:v,list:A,tab:C,panel:E}=TabStyles(),l=createContext(null);function m({children:a,...s}){return jsx(l.Provider,{value:s,children:a})}m.displayName="Tabs.Provider";function b({children:a,className:s,...e}){return jsx(Tab,{...e,className:composeRenderProps(s,t=>C({className:t})),children:a})}b.displayName="Tabs.List.Tab";function n({children:a,className:s,...e}){return containsExactChildren({children:a,componentName:n.displayName,restrictions:[[b,{min:1}]]}),jsx(TabList,{...e,className:composeRenderProps(s,t=>A({className:t})),children:a})}n.displayName="Tabs.List";function T({children:a,className:s,...e}){return jsx(TabPanel,{...e,className:composeRenderProps(s,t=>E({className:t})),children:a})}T.displayName="Tabs.Panel";function r({ref:a,...s}){[s,a]=useContextProps(s,a??null,l);const{children:e,className:t,...P}=s;return containsExactChildren({children:e,componentName:r.displayName,restrictions:[[n,{min:1,max:1}],[T,{min:1}]]}),jsx(Tabs,{...P,ref:a,className:composeRenderProps(t,c=>v({className:c})),children:e})}r.displayName="Tabs",r.Provider=m,r.List=n,r.List.Tab=b,r.Panel=T;export{r as Tabs,l as TabsContext};//# sourceMappingURL=index.js.map
|
|
2
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {tv}from'
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const e=tv({slots:{tabs:["group/tabs flex w-content","orientation-horizontal:flex-col","orientation-vertical:flex-row"],list:["flex","orientation-horizontal:flex-row","orientation-vertical:flex-col"],tab:["fg-primary-muted relative cursor-pointer rounded-small p-s","group-orientation-horizontal/tabs:rounded-b-none","group-orientation-horizontal/tabs:after:absolute group-orientation-horizontal/tabs:after:bottom-0 group-orientation-horizontal/tabs:after:left-0 group-orientation-horizontal/tabs:after:block group-orientation-horizontal/tabs:after:h-[1px] group-orientation-horizontal/tabs:after:w-full group-orientation-horizontal/tabs:after:bg-[color:var(--outline-static)]","enabled:hover:fg-primary-bold","enabled:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:focus:fg-primary-bold","enabled:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:fg-accent-primary-bold selected:bg-accent-primary-muted","enabled:selected:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:hover:fg-accent-primary-bold","enabled:selected:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","enabled:selected:focus:fg-accent-primary-bold","enabled:selected:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]","disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-interactive-disabled","disabled:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-interactive-disabled)]"],panel:"fg-primary-bold p-s"}});export{e as TabStyles};//# sourceMappingURL=styles.js.map
|
|
2
2
|
//# sourceMappingURL=styles.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/tabs/styles.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tabs/styles.ts"],"names":["o"],"mappings":"sCAeE,MAAA,CAAO,CACLA,SACE,CAAA,CAAA,IAAA,CAAA,CAAA,6DAEA,CAAA,+BAGA,CAAA,CAAA,8CAEA,CAAA,kGAIA,CAAA,kDACA,CAAA,wYAGA,CAAA,qGAEA,CAAA,qIAGA,CAAA,0EACA,CAAA,wJAGA,CAAA,8GAEA,CAAA,8JAGA,CAAA,mFACA,CAAA,iGAEK,CAAA,CAAA,KAAA,CAAA,qBAEV,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport { tv } from '@/lib/utils';\n\nexport const TabStyles = tv({\n slots: {\n tabs: [\n 'group/tabs flex w-content',\n 'orientation-horizontal:flex-col',\n 'orientation-vertical:flex-row',\n ],\n list: [\n 'flex',\n 'orientation-horizontal:flex-row',\n 'orientation-vertical:flex-col',\n ],\n tab: [\n 'fg-primary-muted relative cursor-pointer rounded-small p-s',\n 'group-orientation-horizontal/tabs:rounded-b-none',\n 'group-orientation-horizontal/tabs:after:absolute group-orientation-horizontal/tabs:after:bottom-0 group-orientation-horizontal/tabs:after:left-0 group-orientation-horizontal/tabs:after:block group-orientation-horizontal/tabs:after:h-[1px] group-orientation-horizontal/tabs:after:w-full group-orientation-horizontal/tabs:after:bg-[color:var(--outline-static)]',\n\n 'enabled:hover:fg-primary-bold',\n 'enabled:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:focus:fg-primary-bold',\n 'enabled:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:fg-accent-primary-bold selected:bg-accent-primary-muted',\n 'enabled:selected:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:hover:fg-accent-primary-bold',\n 'enabled:selected:hover:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'enabled:selected:focus:fg-accent-primary-bold',\n 'enabled:selected:focus:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-accent-primary-bold)]',\n\n 'disabled:fg-disabled disabled:cursor-not-allowed disabled:bg-interactive-disabled',\n 'disabled:group-orientation-horizontal/tabs:after:bg-[color:var(--outline-interactive-disabled)]',\n ],\n panel: 'fg-primary-bold p-s',\n },\n});\n"]}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,TextField,composeRenderProps,TextArea,Text,FieldError}from'react-aria-components';import {Label}from'../label/index.js';import {TextAreaStyles}from'./styles.js';const {field:I,label:z,input:D,description:R,error:S}=TextAreaStyles(),c=createContext(null);function x({children:r,...t}){return jsx(c.Provider,{value:t,children:r})}x.displayName="TextAreaField.Provider";function P({ref:r,...t}){[t,r]=useContextProps(t,r??null,c);const{classNames:i,description:a,errorMessage:u,label:d,inputProps:T,size:n="medium",isInvalid:v,...F}=t,p=u||null,m=n==="small";return jsx(TextField,{...F,ref:r,className:composeRenderProps(i?.field,o=>I({className:o})),isInvalid:v||(p?true:void 0),"data-size":n,children:({isDisabled:o,isInvalid:f,isRequired:A})=>jsxs(Fragment,{children:[!!d&&!m&&jsx(Label,{className:z({className:i?.label}),isDisabled:o,isRequired:A,children:d}),jsx(TextArea,{...T,className:composeRenderProps(i?.input,l=>D({className:l}))}),!!a&&!(m||f)&&jsx(Text,{slot:"description",className:R({className:i?.description}),children:a}),jsx(FieldError,{className:composeRenderProps(i?.error,l=>S({className:l})),children:p})]})})}P.displayName="TextAreaField",P.Provider=x;export{P as TextAreaField,c as TextAreaFieldContext};//# sourceMappingURL=index.js.map
|
|
2
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {createContext}from'react';import {useContextProps,TextField,composeRenderProps,Text,FieldError}from'react-aria-components';import {Input}from'../input/index.js';import {Label}from'../label/index.js';import {TextFieldStyles}from'./styles.js';const {field:E,label:A,description:S,error:V}=TextFieldStyles(),x=createContext(null);function P({children:r,...t}){return jsx(x.Provider,{value:t,children:r})}P.displayName="TextField.Provider";function u({ref:r,...t}){[t,r]=useContextProps(t,r??null,x);const{classNames:i,description:s,errorMessage:T,inputProps:F,label:a,size:l="medium",isInvalid:v,...f}=t,d=T||null,n=l==="small";return jsx(TextField,{...f,ref:r,className:composeRenderProps(i?.field,o=>E({className:o})),isInvalid:v||(d?true:void 0),"data-size":l,children:({isDisabled:o,isInvalid:p,isRequired:m})=>jsxs(Fragment,{children:[!!a&&!n&&jsx(Label,{className:A({className:i?.label}),isDisabled:o,isRequired:m,children:a}),jsx(Input,{...F,classNames:i?.input,disabled:o,required:m,size:l,isInvalid:p}),!!s&&!(n||p)&&jsx(Text,{slot:"description",className:S({className:i?.description}),children:s}),jsx(FieldError,{className:composeRenderProps(i?.error,b=>V({className:b})),children:d})]})})}u.displayName="TextField",u.Provider=P;export{u as TextField,x as TextFieldContext};//# sourceMappingURL=index.js.map
|
|
2
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import { TimeValue } from 'react-aria-components';
|
|
3
|
+
import { TimeFieldProps } from './types.js';
|
|
4
|
+
import 'tailwind-variants';
|
|
5
|
+
import './styles.js';
|
|
6
|
+
import 'tailwind-merge';
|
|
7
|
+
|
|
8
|
+
declare function TimeField<T extends TimeValue>({ classNames, description: descriptionProp, errorMessage: errorMessageProp, granularity, hourCycle, inputProps, label: labelProp, shouldForceLeadingZeros, size, isDisabled, isInvalid: isInvalidProp, isRequired, ...rest }: TimeFieldProps<T>): react_jsx_runtime.JSX.Element;
|
|
9
|
+
|
|
10
|
+
export { TimeField };
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx,jsxs,Fragment}from'react/jsx-runtime';import'client-only';import {Time}from'@accelint/icons';import {TimeField,composeRenderProps,DateInput,DateSegment,Text,FieldError}from'react-aria-components';import {Icon}from'../icon/index.js';import {Label}from'../label/index.js';import {TimeFieldStyles}from'./styles.js';const{field:R,label:c,control:V,input:Z,description:k,error:q,segment:C}=TimeFieldStyles();function P({classNames:i,description:s,errorMessage:T,granularity:f="second",hourCycle:F=24,inputProps:b,label:m,shouldForceLeadingZeros:g=true,size:t="medium",isDisabled:y,isInvalid:n,isRequired:d,...A}){const l=T||null,p=t==="small";return jsx(TimeField,{...A,className:composeRenderProps(i?.field,o=>R({className:o})),granularity:f,hourCycle:F,shouldForceLeadingZeros:g,isDisabled:y,isInvalid:n||(l?true:void 0),isRequired:d,"aria-label":m,"data-size":t,children:({isDisabled:o})=>jsxs(Fragment,{children:[!p&&c&&jsx(Label,{className:c({className:i?.label}),isDisabled:o,isRequired:d,children:m}),jsxs("div",{className:V({className:i?.control}),children:[t==="medium"&&jsx(Icon,{children:jsx(Time,{})}),jsx(DateInput,{...b,className:composeRenderProps(i?.input,r=>Z({className:r})),children:r=>jsx(DateSegment,{segment:r,className:composeRenderProps(i?.segment,D=>C({className:D}))})}),jsx("span",{children:"Z"})]}),s&&!(p||n)&&!l&&jsx(Text,{className:k({className:i?.description}),slot:"description",children:s}),jsx(FieldError,{className:composeRenderProps(i?.error,r=>q({className:r})),children:l})]})})}export{P as TimeField};//# sourceMappingURL=index.js.map
|
|
4
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/time-field/index.tsx"],"names":["control","input","description","error","TimeField","M","classNames","labelProp","shouldForceLeadingZeros","isDisabled","isInvalidProp","isRequired","isSmall","AriaTimeField","rest","L","className","field","a","hourCycle","label","Label","w","e","E","u","size","jsx","AriaDateInput","composeRenderProps","v","segmentProp","AriaText","x","descriptionProp","errorMessage"],"mappings":"oUA6BsB,KAAA,CAAAA,QAASC,KAAO,CAAA,CAAA,CAAA,OAAAC,CAAa,CAAA,CAAA,KAAAC,CAAO,CAAA,CAAA,WACxC,CAAA,CAEX,CAAA,KAAA,CAAA,CAAA,CAASC,OACd,CAAA,CAAA,CAAA,CAAAC,eAAA,EAAAC,CAAAA,SACA,CAAA,CAAA,CAAA,UACA,CAAA,CAAA,CAAA,WACA,CAAA,CAAA,CAAA,YAAc,CAAA,CACd,CAAA,WAAY,CAAA,CAAA,CACZ,QAAA,CAAA,SACA,CAAOC,CAAAA,CACP,EAAA,CAAA,UAAA,CAAA,CAAA,CAAA,KAAA,CAAA,CAAA,CAAAC,uBAEA,CAAA,CAAA,CAAA,IAAA,CAAA,IAAAC,CACA,CAAA,CAAA,QAAWC,CAAAA,UACX,CAAA,CAAAC,CAAAA,SAGA,CAAA,CAAA,CAAA,UAAyC,CAAA,CACnCC,CAAAA,KAAmB,CAAA,CAAA,MAEzB,CAAA,CAAA,CAAA,EAAA,IACGC,CAAAA,CAAA,CACE,CAAA,GAAGC,OACJ,CAAA,OAA8BR,GAAY,CAAAS,SAAA,CAAA,CAAA,GAAQC,CAAAA,CAChDC,SAAQ,CAAAC,kBAAA,CAAA,CAAAF,EAAW,KAErB,CAAA,CAAA,EAAA,CAAA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAWG,WACX,CAAA,CAAA,CAAA,SAAA,CAAA,CAAA,CAAyBX,uBAEzB,CAAA,CAAWE,CAAAA,UAAwC,CAAA,CAAA,CAAA,SACnD,CAAA,CAAA,GAAYC,CAAAA,CACZ,uBACA,CAAA,CAAA,CAAA,YAEC,CAAA,CAAA,CACC,WAAE,CAAAF,CAAW,CAAA,QAGV,CAAA,CAAA,CAAA,UAACG,CAAWQ,CAAAA,CAAAA,GACVC,IAAAA,CAAAC,QACC,CAAA,CAAA,QAAWF,CAAAA,CAAM,CAAE,CAAA,EAAA,CAAA,EAAAG,GAAA,CAAAC,KAAA,CAAWlB,CAAAA,SAAmB,CACjD,CAAA,CAAA,CAAA,SAAYG,CACZ,CAAA,EAAA,KAAA,CAAA,CAAA,CAAYE,UAEX,CAAAJ,CAAAA,CACH,WAEG,CAAA,CAAA,QAAWP,CAAAA,CAAQ,CAAE,CAAA,CAAAyB,IAAA,CAAA,KAAA,CAAWnB,CAAAA,SAAoB,CAAC,CAAA,CACvD,CAAA,SAAAoB,CAAAA,CAAAA,EAAS,OAAA,CAAA,CAAA,CACRC,QACE,CAAA,CAAA,CAAA,GAAAA,QACF,EAEFA,GAAAA,CAACC,IAAAA,CAAA,CACE,oBACUC,CAAAA,CAAmBvB,CAAAA,CAAAA,GAAY,CAAAwB,SAAA,CAAA,CAAA,GAAQd,CAAAA,CAChDf,SACE,CAAAiB,kBAAA,CAAA,CAAAF,EACD,KAGF,CAAA,CAAA,EAAA,CAAA,CAAA,CAACe,SAEE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QACA,CAAA,CAAA,EAAAR,GAAWM,CAAAA,WACTvB,CAAAA,CAAAA,OAAY,CAAA,CACXU,CAAAA,gCAAwBA,OAIjC,CAAA,CACAW,EAAC,CAAA,CAAA,CAAA,SAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAAJ,GAAA,CACT,MACoB,CAAEX,CAAAA,YACnBoB,CAAAA,CAAA,CACC,CAAA,CAAA,CAAA,CAAA,EAAA,EAAA,CAAA,EAAW9B,CAAY,CACrB,EAAA,CAAA,CAAA,EAAAqB,GAAA,CAAAU,IAAA,CAAW3B,CAAAA,SAAY,CAAA,CAAA,CAAA,CACzB,SACK,CAAA,CAAA,EAAA,WAEJ,CAAA,CAAA,CAAA,IAAA4B,CAAAA,aAIH,CAAA,QAA8B5B,CAAY,CAAA,CAAA,CAAA,CAAAiB,GAAA,CAAQP,UAAAA,CAAAA,CAChDb,SAAQ,CAAAe,kBAAA,CAAA,CAAAF,EAAW,KAGpB,CAAA,CAAA,EAAA,CAAA,CAAA,CAAAmB,SAMb,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { Time } from '@accelint/icons';\nimport {\n DateInput as AriaDateInput,\n Text as AriaText,\n TimeField as AriaTimeField,\n composeRenderProps,\n DateSegment,\n FieldError,\n type TimeValue,\n} from 'react-aria-components';\nimport { Icon } from '../icon';\nimport { Label } from '../label';\nimport { TimeFieldStyles } from './styles';\nimport type { TimeFieldProps } from './types';\n\nconst { field, label, control, input, description, error, segment } =\n TimeFieldStyles();\n\nexport function TimeField<T extends TimeValue>({\n classNames,\n description: descriptionProp,\n errorMessage: errorMessageProp,\n granularity = 'second',\n hourCycle = 24,\n inputProps,\n label: labelProp,\n shouldForceLeadingZeros = true,\n size = 'medium',\n isDisabled,\n isInvalid: isInvalidProp,\n isRequired,\n ...rest\n}: TimeFieldProps<T>) {\n const errorMessage = errorMessageProp || null; // Protect against empty string\n const isSmall = size === 'small';\n\n return (\n <AriaTimeField<T>\n {...rest}\n className={composeRenderProps(classNames?.field, (className) =>\n field({ className }),\n )}\n granularity={granularity}\n hourCycle={hourCycle}\n shouldForceLeadingZeros={shouldForceLeadingZeros}\n isDisabled={isDisabled}\n isInvalid={isInvalidProp || (errorMessage ? true : undefined)} // Leave uncontrolled if possible to fallback to validation state\n isRequired={isRequired}\n aria-label={labelProp}\n data-size={size}\n >\n {(\n { isDisabled }, // Rely on internal state, not props, since state could differ from props\n ) => (\n <>\n {!isSmall && label && (\n <Label\n className={label({ className: classNames?.label })}\n isDisabled={isDisabled}\n isRequired={isRequired}\n >\n {labelProp}\n </Label>\n )}\n <div className={control({ className: classNames?.control })}>\n {size === 'medium' && (\n <Icon>\n <Time />\n </Icon>\n )}\n <AriaDateInput\n {...inputProps}\n className={composeRenderProps(classNames?.input, (className) =>\n input({\n className,\n }),\n )}\n >\n {(segmentProp) => (\n <DateSegment\n segment={segmentProp}\n className={composeRenderProps(\n classNames?.segment,\n (className) => segment({ className }),\n )}\n />\n )}\n </AriaDateInput>\n <span>Z</span>\n </div>\n {descriptionProp && !(isSmall || isInvalidProp) && !errorMessage && (\n <AriaText\n className={description({\n className: classNames?.description,\n })}\n slot='description'\n >\n {descriptionProp}\n </AriaText>\n )}\n <FieldError\n className={composeRenderProps(classNames?.error, (className) =>\n error({ className }),\n )}\n >\n {errorMessage}\n </FieldError>\n </>\n )}\n </AriaTimeField>\n );\n}\n"]}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import * as tailwind_variants from 'tailwind-variants';
|
|
2
|
+
import * as tailwind_merge from 'tailwind-merge';
|
|
3
|
+
|
|
4
|
+
declare const TimeFieldSylesDefaults: {
|
|
5
|
+
readonly isDisabled: false;
|
|
6
|
+
};
|
|
7
|
+
declare const TimeFieldStyles: tailwind_variants.TVReturnType<{
|
|
8
|
+
[key: string]: {
|
|
9
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
|
10
|
+
description?: tailwind_merge.ClassNameValue;
|
|
11
|
+
input?: tailwind_merge.ClassNameValue;
|
|
12
|
+
label?: tailwind_merge.ClassNameValue;
|
|
13
|
+
control?: tailwind_merge.ClassNameValue;
|
|
14
|
+
field?: tailwind_merge.ClassNameValue;
|
|
15
|
+
error?: tailwind_merge.ClassNameValue;
|
|
16
|
+
segment?: tailwind_merge.ClassNameValue;
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
} | {
|
|
20
|
+
[x: string]: {
|
|
21
|
+
[x: string]: tailwind_merge.ClassNameValue | {
|
|
22
|
+
description?: tailwind_merge.ClassNameValue;
|
|
23
|
+
input?: tailwind_merge.ClassNameValue;
|
|
24
|
+
label?: tailwind_merge.ClassNameValue;
|
|
25
|
+
control?: tailwind_merge.ClassNameValue;
|
|
26
|
+
field?: tailwind_merge.ClassNameValue;
|
|
27
|
+
error?: tailwind_merge.ClassNameValue;
|
|
28
|
+
segment?: tailwind_merge.ClassNameValue;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
} | {}, {
|
|
32
|
+
field: string;
|
|
33
|
+
label: string;
|
|
34
|
+
control: string[];
|
|
35
|
+
input: string;
|
|
36
|
+
segment: string[];
|
|
37
|
+
description: string[];
|
|
38
|
+
error: string;
|
|
39
|
+
}, undefined, {
|
|
40
|
+
[key: string]: {
|
|
41
|
+
[key: string]: tailwind_merge.ClassNameValue | {
|
|
42
|
+
description?: tailwind_merge.ClassNameValue;
|
|
43
|
+
input?: tailwind_merge.ClassNameValue;
|
|
44
|
+
label?: tailwind_merge.ClassNameValue;
|
|
45
|
+
control?: tailwind_merge.ClassNameValue;
|
|
46
|
+
field?: tailwind_merge.ClassNameValue;
|
|
47
|
+
error?: tailwind_merge.ClassNameValue;
|
|
48
|
+
segment?: tailwind_merge.ClassNameValue;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
} | {}, {
|
|
52
|
+
field: string;
|
|
53
|
+
label: string;
|
|
54
|
+
control: string[];
|
|
55
|
+
input: string;
|
|
56
|
+
segment: string[];
|
|
57
|
+
description: string[];
|
|
58
|
+
error: string;
|
|
59
|
+
}, tailwind_variants.TVReturnType<unknown, {
|
|
60
|
+
field: string;
|
|
61
|
+
label: string;
|
|
62
|
+
control: string[];
|
|
63
|
+
input: string;
|
|
64
|
+
segment: string[];
|
|
65
|
+
description: string[];
|
|
66
|
+
error: string;
|
|
67
|
+
}, undefined, unknown, unknown>>;
|
|
68
|
+
|
|
69
|
+
export { TimeFieldStyles, TimeFieldSylesDefaults };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import {tv}from'./../../lib/utils.js';const i={isDisabled:false},t=tv({slots:{field:"group/time-field flex flex-col gap-xs",label:"",control:["flex w-full items-center gap-xs rounded-medium px-s py-xs font-display outline outline-interactive","group-size-medium/time-field:text-body-s","group-size-small/time-field:text-body-xs","fg-primary-bold","hover:outline-interactive-hover","focus-visible-within:outline-accent-primary-bold","group-invalid/time-field:outline-serious-bold","group-disabled/time-field:placeholder:fg-disabled group-disabled/time-field:fg-disabled group-disabled/time-field:outline-interactive-disabled"],input:"flex",segment:["text-right","placeholder-shown:fg-primary-muted","focus-visible:fg-a11y-on-accent focus-visible:bg-accent-primary-bold focus-visible:outline-none"],description:["fg-primary-muted text-body-xs","group-disabled/time-field:fg-disabled"],error:"fg-serious-bold text-body-xs"},defaultVariants:i});export{t as TimeFieldStyles,i as TimeFieldSylesDefaults};//# sourceMappingURL=styles.js.map
|
|
2
|
+
//# sourceMappingURL=styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/time-field/styles.ts"],"names":["e"],"mappings":"sCAcE,MAAA,CAAA,CAAA,CAAA,UAIA,CAAA,KAAA,CAAA,CAAA,CAAO,CACLA,EAAA,CAAA,CAAA,KAAO,CAAA,CAAA,KAAA,CAAA,uCAEP,CAAA,KAAA,CAAA,EACE,CAAA,OAAA,CAAA,CAAA,oGACA,CAAA,0CACA,CAAA,4DAEA,CAAA,iCACA,CAAA,kGAEA,CAAA,gJAEK,CAAA,CAAA,KACP,CAAA,MACE,CAAA,OAAA,CAAA,CAAA,YACA,CAAA,oCACA,CAAA,iGAEF,CAAA,CAAA,4CAEE,CAAA,uCAEK,CAAA,CAAA,KAAA,CAAA,8BAET,CAAA,CAAA,eACD,CAAA,CAAA,CAAA","file":"styles.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\nimport { tv } from '@/lib/utils';\n\nexport const TimeFieldSylesDefaults = {\n isDisabled: false,\n} as const;\n\nexport const TimeFieldStyles = tv({\n slots: {\n field: 'group/time-field flex flex-col gap-xs',\n label: '',\n control: [\n 'flex w-full items-center gap-xs rounded-medium px-s py-xs font-display outline outline-interactive',\n 'group-size-medium/time-field:text-body-s',\n 'group-size-small/time-field:text-body-xs',\n 'fg-primary-bold',\n 'hover:outline-interactive-hover',\n 'focus-visible-within:outline-accent-primary-bold',\n 'group-invalid/time-field:outline-serious-bold',\n 'group-disabled/time-field:placeholder:fg-disabled group-disabled/time-field:fg-disabled group-disabled/time-field:outline-interactive-disabled',\n ],\n input: 'flex',\n segment: [\n 'text-right',\n 'placeholder-shown:fg-primary-muted',\n 'focus-visible:fg-a11y-on-accent focus-visible:bg-accent-primary-bold focus-visible:outline-none',\n ],\n description: [\n 'fg-primary-muted text-body-xs',\n 'group-disabled/time-field:fg-disabled',\n ],\n error: 'fg-serious-bold text-body-xs',\n },\n defaultVariants: TimeFieldSylesDefaults,\n});\n"]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { TimeValue, TimeFieldProps as TimeFieldProps$1, LabelProps, DateInputProps, DateSegmentProps, FieldErrorProps } from 'react-aria-components';
|
|
2
|
+
import { VariantProps } from 'tailwind-variants';
|
|
3
|
+
import { TimeFieldStyles } from './styles.js';
|
|
4
|
+
import 'tailwind-merge';
|
|
5
|
+
|
|
6
|
+
type TimeFieldProps<T extends TimeValue> = Omit<TimeFieldProps$1<T>, 'children' | 'className' | 'placeholder'> & VariantProps<typeof TimeFieldStyles> & {
|
|
7
|
+
classNames?: {
|
|
8
|
+
field?: TimeFieldProps$1<T>['className'];
|
|
9
|
+
label?: LabelProps['className'];
|
|
10
|
+
control?: string;
|
|
11
|
+
input?: DateInputProps['className'];
|
|
12
|
+
segment?: DateSegmentProps['className'];
|
|
13
|
+
description?: string;
|
|
14
|
+
error?: FieldErrorProps['className'];
|
|
15
|
+
};
|
|
16
|
+
label?: string;
|
|
17
|
+
description?: string;
|
|
18
|
+
errorMessage?: string;
|
|
19
|
+
size?: 'small' | 'medium';
|
|
20
|
+
inputProps?: Omit<DateInputProps, 'children' | 'className'>;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
export type { TimeFieldProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"names":[],"mappings":"","file":"types.js"}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx}from'react/jsx-runtime';import'client-only';import {UNSAFE_PortalProvider}from'@react-aria/overlays';import {useIsSSR}from'@react-aria/ssr';import {createContext,useState,useEffect}from'react';import {useContextProps,TooltipTrigger,Focusable,Tooltip,composeRenderProps}from'react-aria-components';import {containsExactChildren}from'./../../lib/react.js';import {TooltipStyles}from'./styles.js';const B=createContext(null);function p({ref:t,...o}){[o,t]=useContextProps(o,t??null,B);const{children:r,delay:s=250,...a}=o;return containsExactChildren({children:r,componentName:p.displayName,restrictions:[[m,{min:1,max:1}],[T,{min:1,max:1}]]}),jsx(TooltipTrigger,{...a,delay:s,children:r})}p.displayName="Tooltip";function m({children:t,...o}){return jsx(Focusable,{...o,children:t})}m.displayName="Tooltip.Trigger";function T({children:t,parentRef:o,className:r,offset:s=5,placement:a="bottom",...u}){const i=useIsSSR(),[d,c]=useState(i?null:document.body);return useEffect(()=>{const l=o?.current,e=i?null:document.createElement("div");return e?.setAttribute("style","position: absolute;"),l&&e&&(l.appendChild(e),c(e)),()=>{e?.remove(),c(i?null:document.body);}},[i,o]),jsx(UNSAFE_PortalProvider,{getContainer:()=>d,children:jsx(Tooltip,{...u,className:composeRenderProps(r,l=>TooltipStyles({className:l})),offset:s,placement:a,children:t})})}T.displayName="Tooltip.Body",p.Trigger=m,p.Body=T;export{p as Tooltip,B as TooltipContext};//# sourceMappingURL=index.js.map
|
|
2
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["
|
|
1
|
+
{"version":3,"sources":["../../../src/components/tooltip/index.tsx"],"names":["P","props","useContextProps","ref","TooltipContext","A","E","Tooltip","jsx","AriaTooltipTrigger","rest","delay","Focusable","n","b","children","TooltipTrigger","parentRef","className","placement","isSSR","portal","g","x","useEffect","node","port","setPortal","UNSAFE_PortalProvider","y","AriaTooltip","C","S","v","offset","TooltipBody"],"mappings":"sZA8EO,MAAA,CAAA,CAAAA,aAAA,CAAA,IAAmB,EAAA,SAAc,CAAiB,CACvD,CAACC,GAAU,CAAA,CAAIC,CAAAA,GAAuBC,CAAAA,CAAAA,CAAO,KAAMC,CAAc,CAAAC,eAEjE,CAAA,CAAA,CAAA,CAAA,EAAQ,IAAA,CAAA,CAAA,CAAA,CAAA,KAAU,CAAA,QAAQ,CAAK,CAAA,CAAA,KAAYJ,CAE3C,CAAA,CAAA,GAAA,CAAA,GAAsB,CACpB,CAAA,CAAA,CAAA,CAAA,OACAK,qBAAA,CAAA,CAAA,QAAA,CAAA,CAAA,CAAeC,aAAQ,CACvB,CAAA,CAAA,WAAc,CACZ,YAA2B,CAAA,CAAK,CAAE,CAAC,CAAA,CACnC,GAAc,CAAE,CAAA,CAAA,GAAK,CAAG,CAAA,CAAA,CAAA,CAAK,CAAE,CAAC,CAClC,CACF,GAGEC,CAAAA,CAACC,CAAAA,GAAoB,CAAA,CAAGC,CAAAA,CAAM,QAAOC,cAAAA,CAClC,CAAA,GAAA,CAAA,CAAA,KACH,CAEJ,CACAJ,CAAAA,QAAQ,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAEtB,CAAA,SAA0B,CAAA,SAAU,CAAA,CAAA,CAAGN,QACrC,CAAA,CAAA,CAAOO,GAACI,CAAA,CAAW,CAAA,CAAA,OAAWC,GAAA,CAAAC,SAAA,CAAA,CAAAC,GAChC,CACAC,CAAAA,QAAe,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,iBAG3B,CAAA,SACA,CAAA,CAAA,CAAA,QAAAC,CACA,CAAA,CAAA,SAAAC,CACA,CAAA,CAAA,SACA,CAAA,CAAA,CAAA,MAAA,CAAAC,CAAAA,CAAY,CAAA,CAAA,SACZ,CAAGlB,CACL,CAAA,QACQmB,CAAAA,GAAiB,CAAA,CACjB,CAACC,CAAAA,MAA8BD,CAAAA,CAAQE,QAAA,EAAA,CAAA,CAAO,CAAA,CAAA,CAAA,CAAA,CAAAC,QAAA,CAAA,CAAA,CAAS,IAAI,CAAA,QAEjEC,CAAAA,IAAU,CAAM,CACd,OAAMC,SAAOR,CAAAA,IAAW,CAAA,MAElBS,CAAON,CAAAA,CAAQ,EAAA,OAAO,CAAA,CAAA,CAAA,CAAA,CAAS,IAAA,CAAA,QAAA,CAAc,aACnD,CAAAM,KAAM,CAAA,CAAA,OAAA,CAAA,EAAa,0CAGZ,CAAA,CAAA,CAAA,EAAA,CAAA,GAAYA,CAAI,CAAA,WAKV,CACXA,CAAAA,CAAAA,CAAM,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,IAENC,CAAUP,CAAAA,EAAQ,MAAO,EAAA,CAAA,CAAA,CAAA,CAAA,CAAS,IAAI,CACxC,QACmB,CAAA,IAGlBQ,EAAA,CAAsB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAAf,GAAA,CAAAgB,qBAAA,CAAc,aACnC,CAAA,IAACC,CAAA,CACE,QACD,CAAAjB,GAAA,CAAAkB,OAAA,CAAA,CAAA,GAA8Bb,CAAAA,CAAYA,SACxB,CAAAc,kBAAA,CAAA,CAAA,CAAA,CAAA,EAAUC,aAAC,CAC7B,CAAA,SACQC,CACR,CAAA,CAAA,CAAA,CAAA,CAAA,MAAWf,CAEV,CAAA,CAAA,SACH,CAAA,CACF,CAEJ,QACY,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAc,CAAA,CAAA,WAAA,CAAA,eAGlB,CAAA,CAAA,OAAOgB,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,IAAAA,CAAAA,CAAAA","file":"index.js","sourcesContent":["/*\n * Copyright 2025 Hypergiant Galactic Systems Inc. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at https://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n'use client';\n\nimport 'client-only';\nimport { UNSAFE_PortalProvider } from '@react-aria/overlays';\nimport { useIsSSR } from '@react-aria/ssr';\nimport { createContext, useEffect, useState } from 'react';\nimport {\n Tooltip as AriaTooltip,\n TooltipTrigger as AriaTooltipTrigger,\n type ContextValue,\n composeRenderProps,\n Focusable,\n useContextProps,\n} from 'react-aria-components';\nimport { containsExactChildren } from '@/lib/react';\nimport { TooltipStyles } from './styles';\nimport type {\n TooltipBodyProps,\n TooltipProps,\n TooltipTriggerProps,\n} from './types';\n\nexport const TooltipContext =\n createContext<ContextValue<TooltipProps, HTMLDivElement>>(null);\n\n/**\n * Tooltip - A contextual popup component for providing additional information\n *\n * Displays helpful information when users hover over or focus on an element.\n * Provides accessible tooltip functionality with proper positioning, keyboard\n * navigation, and screen reader support for enhanced user experience.\n *\n * @example\n * // Basic tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover me</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * This is helpful information\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Tooltip with custom positioning\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button>Hover for info</Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body placement=\"top\" offset={10}>\n * Positioned above with custom offset\n * </Tooltip.Body>\n * </Tooltip>\n *\n * @example\n * // Icon with tooltip\n * <Tooltip>\n * <Tooltip.Trigger>\n * <Button variant=\"icon\">\n * <Icon><Info /></Icon>\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Body>\n * Additional context for this action\n * </Tooltip.Body>\n * </Tooltip>\n */\nexport function Tooltip({ ref, ...props }: TooltipProps) {\n [props, ref] = useContextProps(props, ref ?? null, TooltipContext);\n\n const { children, delay = 250, ...rest } = props;\n\n containsExactChildren({\n children,\n componentName: Tooltip.displayName,\n restrictions: [\n [TooltipTrigger, { min: 1, max: 1 }],\n [TooltipBody, { min: 1, max: 1 }],\n ],\n });\n\n return (\n <AriaTooltipTrigger {...rest} delay={delay}>\n {children}\n </AriaTooltipTrigger>\n );\n}\nTooltip.displayName = 'Tooltip';\n\nfunction TooltipTrigger({ children, ...props }: TooltipTriggerProps) {\n return <Focusable {...props}>{children}</Focusable>;\n}\nTooltipTrigger.displayName = 'Tooltip.Trigger';\n\nfunction TooltipBody({\n children,\n parentRef,\n className,\n offset = 5,\n placement = 'bottom',\n ...props\n}: TooltipBodyProps) {\n const isSSR = useIsSSR();\n const [portal, setPortal] = useState(isSSR ? null : document.body);\n\n useEffect(() => {\n const node = parentRef?.current;\n // TODO: Ensure proper ssr hydration\n const port = isSSR ? null : document.createElement('div');\n port?.setAttribute('style', 'position: absolute;');\n\n if (node && port) {\n node.appendChild(port);\n\n setPortal(port);\n }\n\n return () => {\n port?.remove();\n\n setPortal(isSSR ? null : document.body);\n };\n }, [isSSR, parentRef]);\n\n return (\n <UNSAFE_PortalProvider getContainer={() => portal}>\n <AriaTooltip\n {...props}\n className={composeRenderProps(className, (className) =>\n TooltipStyles({ className }),\n )}\n offset={offset}\n placement={placement}\n >\n {children}\n </AriaTooltip>\n </UNSAFE_PortalProvider>\n );\n}\nTooltipBody.displayName = 'Tooltip.Body';\n\nTooltip.Trigger = TooltipTrigger;\nTooltip.Body = TooltipBody;\n"]}
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
3
|
+
import {jsx,jsxs}from'react/jsx-runtime';import {Show,Hide,ChevronDown,ChevronUp,DragVert}from'@accelint/icons';import {Cache}from'./../../hooks/use-tree/actions/cache.js';import'client-only';import {createContext,memo,useContext,useMemo}from'react';import {TreeItemContent,TreeItem,composeRenderProps,Text,useDragAndDrop,Tree,DropIndicator}from'react-aria-components';import {Button}from'../button/index.js';import {Checkbox}from'../checkbox/index.js';import {Icon}from'../icon/index.js';import {Lines}from'../lines/index.js';import {TreeStyles,TreeStylesDefaults}from'./styles.js';const {tree:pe,item:ue,content:ye,display:fe,icon:be,label:ve,actions:Te,spacing:E,description:he,drag:Ie,expansion:Ce,visibility:ge}=TreeStyles(),x=createContext({visibilityComputedKeys:new Set,showRuleLines:true,showVisibility:false,variant:TreeStylesDefaults.variant,isStatic:true,onVisibilityChange:()=>{}}),xe=t=>jsx(DropIndicator,{target:t,className:"border border-highlight-hover"}),we=memo(function({level:o,isLastOfSet:s}){const{showRuleLines:m,variant:r}=useContext(x);return Array.from({length:o}).map((i,n)=>{const a=n===o-1?"branch":"vert",d=s&&n>0?"last":a;return jsx(Lines,{variant:d,size:r==="crammed"?"medium":"large",isVisible:m,className:E({variant:r})},n)})});function H({children:t,className:o,disabledKeys:s,dragAndDropConfig:m,expandedKeys:r,items:i,selectedKeys:n,showRuleLines:a=true,showVisibility:d=true,selectionMode:l="multiple",variant:w=TreeStylesDefaults.variant,visibleKeys:y,onVisibilityChange:K,onSelectionChange:N,...D}){if(i&&(s||r||n||y))throw new Error("Tree should only be controlled with state from either `items` or keys props, not both");if(!!i!=(typeof t=="function"))throw new Error("Tree `items` and node iterator `children` must be used together");const{dragAndDropHooks:V}=useDragAndDrop({renderDropIndicator:xe,getAllowedDropOperations:()=>["move"],getDropOperation:()=>"move",...m}),f=useMemo(()=>i?new Cache([...i]):null,[i]),c=useMemo(()=>f?.getAllNodes(),[f]),{disabledKeys:S,expandedKeys:T,selectedKeys:h,visibleKeys:A,visibilityComputedKeys:I}=useMemo(()=>{const p={disabledKeys:c?new Set:s,expandedKeys:c?new Set:r,selectedKeys:c?new Set:n,visibleKeys:c?new Set:y,visibilityComputedKeys:new Set};return c?c.reduce((b,{key:C,isDisabled:G,isExpanded:J,isSelected:Q,isVisible:X,isVisibleComputed:Y})=>(G&&b.disabledKeys?.add(C),J&&b.expandedKeys?.add(C),Q&&b.selectedKeys?.add(C),X&&b.visibleKeys?.add(C),Y&&b.visibilityComputedKeys.add(C),b),p):p},[c,s,r,n,y]),F=h?p=>{p!=="all"&&N?.(p);}:void 0;return jsx(x.Provider,{value:{disabledKeys:S,expandedKeys:T,selectedKeys:h,showRuleLines:a,showVisibility:d,variant:w,visibleKeys:A,visibilityComputedKeys:I,isStatic:typeof t!="function",onVisibilityChange:K??(()=>{})},children:jsx(Tree,{...D,className:composeRenderProps(o,p=>pe({className:p,variant:w})),disabledKeys:S,dragAndDropHooks:V,expandedKeys:T,items:i,selectedKeys:h,onSelectionChange:F,selectionMode:l,children:t})})}H.displayName="Tree";const z=createContext({isVisible:true,isViewable:true,ancestors:[]});function u({className:t,id:o,...s}){const{visibilityComputedKeys:m,visibleKeys:r,isStatic:i}=useContext(x),{ancestors:n}=useContext(z),a=m?.has(o)||i&&n.every(l=>r?.has(l)),d=r?.has(o);return jsx(z.Provider,{value:{isVisible:d,isViewable:a,ancestors:[...n,o]},children:jsx(TreeItem,{...s,id:o,className:composeRenderProps(t,l=>ue({className:l})),"data-viewable":a||null,"data-visible":d||null})})}u.displayName="Tree.Item";function M({children:t}){const{showVisibility:o,variant:s,visibleKeys:m,onVisibilityChange:r}=useContext(x),{isVisible:i,isViewable:n}=useContext(z),a=s==="cozy"?"medium":"small";return jsx(TreeItemContent,{children:d=>{const{id:l,allowsDragging:w,hasChildItems:y,level:K,selectionBehavior:N,selectionMode:D,state:V,isDisabled:f,isExpanded:c,isSelected:S}=d,T=!(V.collection.getItem(l)?.nextKey||y),h=N==="toggle"&&D!=="none",A=()=>{const I=new Set(m);m?.has(l)?I.delete(l):I.add(l),r?.(I);};return jsx(Icon.Provider,{size:a,children:jsxs("div",{className:ye({variant:s}),"data-last-of-set":T,children:[o&&jsx(Button,{variant:"icon",color:"mono-bold",size:a,onPress:A,isDisabled:f,className:ge(),children:jsx(Icon,{children:i?jsx(Show,{}):jsx(Hide,{})})}),K>1&&jsx(we,{level:K,isLastOfSet:T}),y?jsx(Button,{slot:"chevron",variant:"icon",size:a,className:Ce(),children:jsx(Icon,{children:c?jsx(ChevronDown,{}):jsx(ChevronUp,{})})}):jsx("div",{className:E({variant:s})}),jsx("div",{className:fe({variant:s}),children:typeof t=="function"?t({...d,variant:s,isVisible:i,isViewable:n,defaultChildren:null}):t}),h&&jsx(Checkbox,{slot:"selection",isSelected:S,isDisabled:f}),w&&jsx(Button,{slot:"drag",variant:"icon",size:a,isDisabled:f,className:Ie({}),children:jsx(Icon,{children:jsx(DragVert,{})})})]})})}})}M.displayName="Tree.Item.Content";function W({children:t,className:o}){return jsx(Text,{className:ve({className:o}),children:t})}W.displayName="Tree.Item.Label";function U({children:t,className:o}){const{variant:s}=useContext(x);return s!=="crammed"?jsx(Text,{"data-slot":"description",className:he({className:o,variant:s}),children:t}):null}U.displayName="Tree.Item.Description";function _({children:t,className:o}){return jsx(Icon,{className:be({className:o}),children:t})}_.displayName="Tree.Item.PrefixIcon";function q({children:t,className:o}){return jsx("div",{className:Te({className:o}),children:t})}q.displayName="Tree.Icon.Actions",H.Item=u,u.Content=M,u.Label=W,u.Description=U,u.PrefixIcon=_,u.Actions=q;export{H as Tree,x as TreeContext,u as TreeItem,z as TreeItemContext};//# sourceMappingURL=index.js.map
|
|
2
4
|
//# sourceMappingURL=index.js.map
|