@dynamic-labs-sdk/droplet 1.49.1 → 1.51.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 (94) hide show
  1. package/dist/components/copy-button/copy-button.d.ts +3 -1
  2. package/dist/components/copy-button/copy-button.d.ts.map +1 -1
  3. package/dist/components/copy-button/copy-button.stories.d.ts +1 -1
  4. package/dist/components/empty-state/empty-state.d.ts +3 -3
  5. package/dist/components/empty-state/empty-state.d.ts.map +1 -1
  6. package/dist/components/migration/field/field.d.ts.map +1 -1
  7. package/dist/components/status-badge/status-badge.d.ts.map +1 -1
  8. package/dist/components/tab-navigation/tab-navigation.d.ts.map +1 -1
  9. package/dist/components/toggle-card/toggle-card.d.ts +10 -0
  10. package/dist/components/toggle-card/toggle-card.d.ts.map +1 -1
  11. package/dist/components/toggle-card/toggle-card.stories.d.ts +5 -0
  12. package/dist/components/toggle-card/toggle-card.stories.d.ts.map +1 -1
  13. package/dist/components/toggle-row/toggle-row.d.ts +22 -1
  14. package/dist/components/toggle-row/toggle-row.d.ts.map +1 -1
  15. package/dist/components/toggle-row/toggle-row.stories.d.ts +10 -6
  16. package/dist/components/toggle-row/toggle-row.stories.d.ts.map +1 -1
  17. package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
  18. package/dist/components/ui/combobox/combobox.d.ts +54 -12
  19. package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
  20. package/dist/components/ui/combobox/combobox.stories.d.ts +12 -1
  21. package/dist/components/ui/combobox/combobox.stories.d.ts.map +1 -1
  22. package/dist/components/ui/data-table/create-column-helper.d.ts +20 -0
  23. package/dist/components/ui/data-table/create-column-helper.d.ts.map +1 -0
  24. package/dist/components/ui/data-table/data-table-active-filters.d.ts +37 -0
  25. package/dist/components/ui/data-table/data-table-active-filters.d.ts.map +1 -0
  26. package/dist/components/ui/data-table/data-table-column-filter.d.ts +48 -0
  27. package/dist/components/ui/data-table/data-table-column-filter.d.ts.map +1 -0
  28. package/dist/components/ui/data-table/data-table-column-visibility.d.ts +37 -0
  29. package/dist/components/ui/data-table/data-table-column-visibility.d.ts.map +1 -0
  30. package/dist/components/ui/data-table/data-table-content.d.ts +43 -0
  31. package/dist/components/ui/data-table/data-table-content.d.ts.map +1 -0
  32. package/dist/components/ui/data-table/data-table-context.d.ts +13 -0
  33. package/dist/components/ui/data-table/data-table-context.d.ts.map +1 -0
  34. package/dist/components/ui/data-table/data-table-pagination.d.ts +38 -0
  35. package/dist/components/ui/data-table/data-table-pagination.d.ts.map +1 -0
  36. package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts +21 -0
  37. package/dist/components/ui/data-table/data-table-placeholder-rows.d.ts.map +1 -0
  38. package/dist/components/ui/data-table/data-table-rows.d.ts +22 -0
  39. package/dist/components/ui/data-table/data-table-rows.d.ts.map +1 -0
  40. package/dist/components/ui/data-table/data-table-search.d.ts +40 -0
  41. package/dist/components/ui/data-table/data-table-search.d.ts.map +1 -0
  42. package/dist/components/ui/data-table/data-table.d.ts +56 -0
  43. package/dist/components/ui/data-table/data-table.d.ts.map +1 -0
  44. package/dist/components/ui/data-table/data-table.stories.d.ts +32 -0
  45. package/dist/components/ui/data-table/data-table.stories.d.ts.map +1 -0
  46. package/dist/components/ui/data-table/data-table.types.d.ts +189 -0
  47. package/dist/components/ui/data-table/data-table.types.d.ts.map +1 -0
  48. package/dist/components/ui/data-table/expand-chevron.d.ts +7 -0
  49. package/dist/components/ui/data-table/expand-chevron.d.ts.map +1 -0
  50. package/dist/components/ui/data-table/get-column-label.d.ts +7 -0
  51. package/dist/components/ui/data-table/get-column-label.d.ts.map +1 -0
  52. package/dist/components/ui/data-table/get-pinned-cell-props.d.ts +15 -0
  53. package/dist/components/ui/data-table/get-pinned-cell-props.d.ts.map +1 -0
  54. package/dist/components/ui/data-table/selection-column.d.ts +24 -0
  55. package/dist/components/ui/data-table/selection-column.d.ts.map +1 -0
  56. package/dist/components/ui/data-table/use-data-table.d.ts +157 -0
  57. package/dist/components/ui/data-table/use-data-table.d.ts.map +1 -0
  58. package/dist/components/ui/field/field-control-context.d.ts +20 -0
  59. package/dist/components/ui/field/field-control-context.d.ts.map +1 -0
  60. package/dist/components/ui/field/field.d.ts +20 -4
  61. package/dist/components/ui/field/field.d.ts.map +1 -1
  62. package/dist/components/ui/field/field.stories.d.ts +18 -6
  63. package/dist/components/ui/field/field.stories.d.ts.map +1 -1
  64. package/dist/components/ui/label/label.d.ts +15 -0
  65. package/dist/components/ui/label/label.d.ts.map +1 -1
  66. package/dist/components/ui/pagination/pagination.d.ts +2 -2
  67. package/dist/components/ui/pagination/pagination.d.ts.map +1 -1
  68. package/dist/components/ui/select/select.d.ts.map +1 -1
  69. package/dist/components/ui/select/select.stories.d.ts.map +1 -1
  70. package/dist/components/ui/table/table.d.ts +7 -3
  71. package/dist/components/ui/table/table.d.ts.map +1 -1
  72. package/dist/components/ui/table/table.stories.d.ts +3 -1
  73. package/dist/components/ui/table/table.stories.d.ts.map +1 -1
  74. package/dist/components/ui/tabs/tabs.d.ts +3 -1
  75. package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
  76. package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
  77. package/dist/index.cjs +1722 -247
  78. package/dist/index.cjs.map +1 -1
  79. package/dist/index.d.ts +19 -0
  80. package/dist/index.d.ts.map +1 -1
  81. package/dist/index.esm.js +1714 -251
  82. package/dist/index.esm.js.map +1 -1
  83. package/dist/migration.cjs +1 -1
  84. package/dist/migration.cjs.map +1 -1
  85. package/dist/migration.esm.js +1 -1
  86. package/dist/migration.esm.js.map +1 -1
  87. package/dist/{toggle-row-PqelNVXI.esm.js → toggle-row-CeiCy3Aa.esm.js} +33 -8
  88. package/dist/toggle-row-CeiCy3Aa.esm.js.map +1 -0
  89. package/dist/{toggle-row-BBTk7_bT.cjs → toggle-row-DcV81G3w.cjs} +33 -8
  90. package/dist/toggle-row-DcV81G3w.cjs.map +1 -0
  91. package/package.json +3 -1
  92. package/src/styles/globals.css +54 -15
  93. package/dist/toggle-row-BBTk7_bT.cjs.map +0 -1
  94. package/dist/toggle-row-PqelNVXI.esm.js.map +0 -1
@@ -0,0 +1,157 @@
1
+ import { type ColumnDef, type ColumnSizingState, type GroupingState, type PaginationState, type RowSelectionState, type SortingState, type Table, type VisibilityState } from '@tanstack/react-table';
2
+ import type { DataTableColumnPinningState, DataTableFilterState } from './data-table.types';
3
+ /** A feature whose state the app owns, for example when the server sorts or pages. `onChange` receives the next state. */
4
+ type ControlledState<TState> = {
5
+ onChange: (next: TState) => void;
6
+ state: TState;
7
+ };
8
+ /** A feature whose state the table owns, optionally seeded. */
9
+ type UncontrolledState<TState> = {
10
+ initial?: TState;
11
+ };
12
+ type FeatureState<TState> = ControlledState<TState> | UncontrolledState<TState>;
13
+ type DataTableSortingOptions = {
14
+ initial?: SortingState;
15
+ mode: 'client';
16
+ } | ({
17
+ mode: 'manual';
18
+ } & ControlledState<SortingState>);
19
+ /** `client` filters the data in memory; `manual` lets the app filter, usually on the server. */
20
+ type DataTableFilteringOptions = {
21
+ initial?: Partial<DataTableFilterState>;
22
+ mode: 'client';
23
+ } | ({
24
+ mode: 'manual';
25
+ } & ControlledState<DataTableFilterState>);
26
+ /**
27
+ * Turns on row virtualization in `DataTableContent`: only the rows in view are rendered, for long client-side lists.
28
+ * `estimateRowHeight` is the expected row height in pixels before rows are measured; `overscan` is how many rows to render beyond the edges of the view.
29
+ * The table needs a bounded height to scroll within: pass `fill` to `DataTable` inside a bounded parent, or a max height through `scrollAreaProps` on `DataTableContent`.
30
+ * Without one, every row is in view and every row renders.
31
+ *
32
+ * @example
33
+ * ```tsx
34
+ * const virtualization: DataTableVirtualization = { estimateRowHeight: 41, overscan: 8 };
35
+ *
36
+ * const dataTable = useDataTable({ columns, data, virtualization });
37
+ * ```
38
+ * @see useDataTable
39
+ * @see DataTableContent
40
+ */
41
+ type DataTableVirtualization = {
42
+ estimateRowHeight: number;
43
+ overscan?: number;
44
+ };
45
+ type DataTablePaginationOptions = {
46
+ mode: 'client';
47
+ pageSize: number;
48
+ } | ({
49
+ mode: 'manual';
50
+ rowCount: number;
51
+ } & ControlledState<PaginationState>);
52
+ /**
53
+ * Options for {@link useDataTable}: the rows and columns to show, plus one option per feature to turn on (sorting, filtering, pagination, selection, grouping, column visibility, pinning, sizing and virtualization).
54
+ *
55
+ * @example
56
+ * ```tsx
57
+ * const options: UseDataTableOptions<User> = {
58
+ * columns,
59
+ * data: users,
60
+ * getRowId: (user) => user.id,
61
+ * selection: { initial: {} },
62
+ * sorting: { mode: 'client' },
63
+ * };
64
+ * ```
65
+ * @see useDataTable
66
+ * @see DataTableInstance
67
+ */
68
+ type UseDataTableOptions<TData> = {
69
+ /**
70
+ * Pin columns to one edge: `left` pins to the start, `right` to the end. Turns pinning on.
71
+ * A table pins to one edge only: pinning a column to the other edge unpins the columns on the first.
72
+ * Pinning switches the table to fixed column widths, so give columns a `size`.
73
+ */
74
+ columnPinning?: FeatureState<DataTableColumnPinningState>;
75
+ /** Column widths. Turns resizing on. */
76
+ columnSizing?: FeatureState<ColumnSizingState>;
77
+ /** Which columns are shown. Columns can always be hidden; this seeds or controls it. */
78
+ columnVisibility?: FeatureState<VisibilityState>;
79
+ columns: ColumnDef<TData, any>[];
80
+ data: TData[];
81
+ /**
82
+ * `client` filters the data in memory; `manual` lets the app filter, usually on the server. Turns search and column filters on.
83
+ * Only columns with `meta.filter` get a column filter.
84
+ * With `manual`, `onChange` fires on every keystroke in the search: store the state right away and debounce the fetch instead.
85
+ * Treat the search text and filter values as untrusted input on the server.
86
+ */
87
+ filtering?: DataTableFilteringOptions;
88
+ /** Stable row ids, so selection survives sorting and refetching. Defaults to the row index. */
89
+ getRowId?: (row: TData, index: number) => string;
90
+ /**
91
+ * Column ids to group rows by. Turns grouping on. Groups start open.
92
+ * While every group is open, groups that appear later open too; collapsing one fixes the open set to the groups shown at that moment.
93
+ */
94
+ grouping?: FeatureState<GroupingState>;
95
+ /** Show skeleton rows instead of data. */
96
+ loading?: boolean;
97
+ /**
98
+ * `client` pages the data in memory; `manual` lets the app fetch each page.
99
+ * With `manual`, client sorting only sorts the current page. With grouping, client pages count group header rows as rows.
100
+ */
101
+ pagination?: DataTablePaginationOptions;
102
+ /** Selected rows by id. Turns selection on. */
103
+ selection?: FeatureState<RowSelectionState>;
104
+ /**
105
+ * `client` sorts the data in memory; `manual` lets the app sort, usually on the server.
106
+ * Shift-click a second header to sort by more than one column.
107
+ */
108
+ sorting?: DataTableSortingOptions;
109
+ /**
110
+ * Render only the rows in view. Use it for long lists without pagination.
111
+ * Needs a bounded table height: `fill` on `DataTable`, or a max height through `scrollAreaProps` on `DataTableContent`.
112
+ */
113
+ virtualization?: DataTableVirtualization;
114
+ };
115
+ /**
116
+ * The value `useDataTable` returns. Pass it to `DataTable` as `table`; it holds the table state and the loading flag.
117
+ *
118
+ * @example
119
+ * ```tsx
120
+ * const dataTable: DataTableInstance<User> = useDataTable({ columns, data });
121
+ *
122
+ * return <DataTable table={dataTable}>...</DataTable>;
123
+ * ```
124
+ * @see useDataTable
125
+ * @see DataTable
126
+ */
127
+ type DataTableInstance<TData> = {
128
+ loading: boolean;
129
+ table: Table<TData>;
130
+ virtualization: DataTableVirtualization | undefined;
131
+ };
132
+ /**
133
+ * Create the state for a `DataTable`. Each feature stays off until its option is passed.
134
+ * Pass `{ state, onChange }` to own a feature's state, or `mode: 'manual'` for server-driven sorting and pagination.
135
+ * `onChange` receives the next state, ready to store.
136
+ *
137
+ * @example
138
+ * const dataTable = useDataTable({
139
+ * columns,
140
+ * data,
141
+ * pagination: { mode: 'client', pageSize: 25 },
142
+ * sorting: { mode: 'client' },
143
+ * });
144
+ *
145
+ * <DataTable table={dataTable}>
146
+ * <DataTableContent />
147
+ * <DataTablePagination />
148
+ * </DataTable>
149
+ * @returns A table instance to pass to `DataTable` as `table`.
150
+ * @see UseDataTableOptions
151
+ * @see DataTable
152
+ * @see DataTableContent
153
+ */
154
+ declare const useDataTable: <TData>({ columnPinning, columnSizing, columnVisibility, columns, data, filtering, getRowId, grouping, loading, pagination, selection, sorting, virtualization, }: UseDataTableOptions<TData>) => DataTableInstance<TData>;
155
+ export { useDataTable };
156
+ export type { DataTableInstance, DataTableVirtualization, UseDataTableOptions, };
157
+ //# sourceMappingURL=use-data-table.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-data-table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/data-table/use-data-table.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,SAAS,EAGd,KAAK,iBAAiB,EAEtB,KAAK,aAAa,EAElB,KAAK,eAAe,EACpB,KAAK,iBAAiB,EACtB,KAAK,YAAY,EACjB,KAAK,KAAK,EAEV,KAAK,eAAe,EAWrB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,KAAK,EACV,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAO5B,0HAA0H;AAC1H,KAAK,eAAe,CAAC,MAAM,IAAI;IAC7B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAQF,+DAA+D;AAC/D,KAAK,iBAAiB,CAAC,MAAM,IAAI;IAC/B,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,YAAY,CAAC,MAAM,IAAI,eAAe,CAAC,MAAM,CAAC,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAEhF,KAAK,uBAAuB,GACxB;IAAE,OAAO,CAAC,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,QAAQ,CAAA;CAAE,GAC1C,CAAC;IAAE,IAAI,EAAE,QAAQ,CAAA;CAAE,GAAG,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC;AAEzD,gGAAgG;AAChG,KAAK,yBAAyB,GAC1B;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAAC,IAAI,EAAE,QAA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AAC,iBAAiB,CAAC,CAAC;IAC5C;;;OAGG;IACH,OAAO,CAAC,EAAE,uBAAuB,CAAC;IAClC;;;OAGG;IACH,cAAc,CAAC,EAAE,uBAAuB,CAAC;CAC1C,CAAC;AAEF;;;;;;;;;;;GAWG;AACH,KAAK,iBAAiB,CAAC,KAAK,IAAI;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;IACpB,cAAc,EAAE,uBAAuB,GAAG,SAAS,CAAC;CACrD,CAAC;AAqQF;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,QAAA,MAAM,YAAY,GAAI,KAAK,6JAcxB,mBAAmB,CAAC,KAAK,CAAC,KAAG,iBAAiB,CAAC,KAAK,CA0ItD,CAAC;AAEF,OAAO,EAAE,YAAY,EAAE,CAAC;AACxB,YAAY,EACV,iBAAiB,EACjB,uBAAuB,EACvB,mBAAmB,GACpB,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * The attributes `Field` hands to the element that receives focus inside it.
3
+ */
4
+ type FieldControlProps = {
5
+ 'aria-describedby'?: string;
6
+ 'aria-invalid'?: true;
7
+ id: string;
8
+ };
9
+ /**
10
+ * Carries a `Field`'s control attributes to a control that renders its focusable
11
+ * element deeper than `Field`'s direct child.
12
+ *
13
+ * `Field` injects `id` and the `aria-*` attributes onto its direct child. That
14
+ * works for `Input` and `Textarea`, but `Select` renders no element of its own,
15
+ * so `SelectTrigger` reads them from here instead.
16
+ */
17
+ declare const FieldControlContext: import("react").Context<FieldControlProps | null>;
18
+ export { FieldControlContext };
19
+ export type { FieldControlProps };
20
+ //# sourceMappingURL=field-control-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"field-control-context.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/field/field-control-context.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,KAAK,iBAAiB,GAAG;IACvB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,cAAc,CAAC,EAAE,IAAI,CAAC;IACtB,EAAE,EAAE,MAAM,CAAC;CACZ,CAAC;AAEF;;;;;;;GAOG;AACH,QAAA,MAAM,mBAAmB,mDAAgD,CAAC;AAE1E,OAAO,EAAE,mBAAmB,EAAE,CAAC;AAC/B,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
@@ -8,7 +8,12 @@ type FieldProps = {
8
8
  * wrapper, so column, flex and direct-child utilities apply to each of them.
9
9
  */
10
10
  className?: string;
11
- /** Secondary helper text rendered below the control. */
11
+ /**
12
+ * Helper text rendered below the control, hidden while `error` is set.
13
+ *
14
+ * @deprecated Don't add helper text to fields. The label carries the
15
+ * meaning and the error is the only message under a control.
16
+ */
12
17
  description?: ReactNode;
13
18
  /**
14
19
  * Validation error message. When present, renders with `role="alert"` and
@@ -19,7 +24,8 @@ type FieldProps = {
19
24
  /**
20
25
  * Override the auto-generated control id. Useful when the consumer already
21
26
  * manages a stable id. When omitted, a React-stable id is generated via
22
- * `useId()` and injected onto the single child element (if applicable).
27
+ * `useId()` and injected onto the single child element (if applicable). A
28
+ * single child that already has an `id` keeps it, and the label points at it.
23
29
  */
24
30
  htmlFor?: string;
25
31
  /** Visible label rendered above the control and linked via `htmlFor`. */
@@ -38,16 +44,26 @@ type FieldProps = {
38
44
  * an error message together with the correct `id`/`htmlFor`/`aria-describedby`
39
45
  * associations so callers don't have to hand-assemble these.
40
46
  *
47
+ * Always wrap a form control in `Field` rather than pairing a bare `<Label>`
48
+ * with it: `Field` owns the label-to-control gap (10px) and the gap to the
49
+ * error (6px). Don't add helper text: the error is the only message under a
50
+ * control.
51
+ *
41
52
  * When there is exactly one child element, `Field` uses `cloneElement` to
42
53
  * inject:
43
54
  * - `id` — links the label's `htmlFor` to the control
55
+ * - `aria-labelledby` — names group controls such as `RadioGroup`, which a
56
+ * `<label for>` cannot name
44
57
  * - `aria-describedby` — references the description and/or error paragraph ids
45
58
  * - `aria-invalid` — `true` when `error` is present
46
59
  *
60
+ * `Select` renders no element of its own, so `SelectTrigger` picks up `id`,
61
+ * `aria-describedby` and `aria-invalid` from `Field` instead.
62
+ *
47
63
  * @example
48
64
  * ```tsx
49
- * <Field label="Email" description="We'll never share your email." required>
50
- * <Input type="email" />
65
+ * <Field label="Email" required>
66
+ * <Input type="email" required />
51
67
  * </Field>
52
68
  *
53
69
  * <Field label="Email" error="Enter a valid email address.">
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/field/field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAAE,KAAK,SAAS,EAAuC,MAAM,OAAO,CAAC;AAK/F,KAAK,UAAU,GAAG;IAChB,8DAA8D;IAC9D,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wDAAwD;IACxD,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAYF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAkFzB,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/field/field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAY,KAAK,EAAE,EAAE,KAAK,SAAS,EAAgD,MAAM,OAAO,CAAC;AAOxG,KAAK,UAAU,GAAG;IAChB,8DAA8D;IAC9D,QAAQ,EAAE,SAAS,CAAC;IACpB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB;;;;OAIG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAqBF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,QAAA,MAAM,KAAK,EAAE,EAAE,CAAC,UAAU,CAgHzB,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,CAAC;AACjB,YAAY,EAAE,UAAU,EAAE,CAAC"}
@@ -14,14 +14,13 @@ declare const meta: {
14
14
  export default meta;
15
15
  type Story = StoryObj<typeof meta>;
16
16
  /**
17
- * A basic labeled input field with a helper description.
18
- * `Field` auto-generates a stable `id` and wires `htmlFor`/`aria-describedby`
19
- * so the consumer only needs to provide the control as a child.
17
+ * A basic labeled input field. `Field` auto-generates a stable `id` and wires
18
+ * `htmlFor` so the consumer only needs to provide the control as a child.
20
19
  */
21
20
  export declare const Default: Story;
22
21
  /**
23
- * When `required` is true, a red asterisk is appended to the label.
24
- * Set `required` on the `<Input>` itself to trigger browser validation.
22
+ * When `required` is true, a red asterisk is appended to the label. Also set
23
+ * `required` on the `<Input>` so assistive tech announces it.
25
24
  */
26
25
  export declare const Required: Story;
27
26
  /**
@@ -32,7 +31,20 @@ export declare const Required: Story;
32
31
  export declare const WithError: Story;
33
32
  /**
34
33
  * `Field` is not limited to text inputs — any form control works as a child.
35
- * Here a `RadioGroup` is labeled and described by the wrapper.
34
+ * Here a `RadioGroup` is labeled by the wrapper.
36
35
  */
37
36
  export declare const WithRadioGroup: Story;
37
+ /**
38
+ * The form pattern: one column, 16px between fields (`flex flex-col gap-4`),
39
+ * larger than the 10px label gap so each label groups with its own control.
40
+ * Two fields share a row only when they make up one value. `noValidate` turns
41
+ * off the browser's validation popup; errors show through `Field` instead.
42
+ * Submit it empty to see one.
43
+ */
44
+ export declare const Form: Story;
45
+ /**
46
+ * Why every control goes in a `Field`: a bare `Label` has no spacing of its
47
+ * own. Left, a hand-built pair at `gap-1.5` (6px). Right, `Field` at 10px.
48
+ */
49
+ export declare const BareLabelVsField: Story;
38
50
  //# sourceMappingURL=field.stories.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"field.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/field/field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAM5D,QAAA,MAAM,IAAI;;;;;;;;;;CAOoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KAkC5B,CAAC"}
1
+ {"version":3,"file":"field.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/field/field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAe5D,QAAA,MAAM,IAAI;;;;;;;;;;CAOoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC;;;GAGG;AACH,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,QAAQ,EAAE,KAQtB,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,EAAE,KAevB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,EAAE,KA+B5B,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,IAAI,EAAE,KAmDlB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,KAY9B,CAAC"}
@@ -1,4 +1,19 @@
1
1
  import { type VariantProps } from 'class-variance-authority';
2
+ /**
3
+ * The text label for a form control.
4
+ *
5
+ * `Label` carries no spacing of its own. To label a form control, wrap the
6
+ * control in `Field` and pass `label`: `Field` sets the gap between the label
7
+ * and the control and wires up `htmlFor`. A bare `Label` placed next to a
8
+ * control ends up at whatever gap its parent happens to use.
9
+ *
10
+ * @example
11
+ * ```tsx
12
+ * <Field label="Email">
13
+ * <Input type="email" />
14
+ * </Field>
15
+ * ```
16
+ */
2
17
  declare const Label: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-label").LabelProps & import("react").RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/types").ClassProp | undefined) => string> & import("react").RefAttributes<HTMLLabelElement>>;
3
18
  export { Label };
4
19
  //# sourceMappingURL=label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/label/label.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAQlE,QAAA,MAAM,KAAK,2SAKT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/label/label.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAQlE;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,KAAK,2SAKT,CAAC;AAGH,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -48,7 +48,7 @@ type CursorPaginationProps = {
48
48
  /** Whether a previous page exists; disables the previous button when false. */
49
49
  hasPrevious: boolean;
50
50
  /**
51
- * Optional content rendered between the two navigation buttons.
51
+ * Optional content rendered before the navigation buttons.
52
52
  * Commonly used for a "Page N of M" or record-range label.
53
53
  */
54
54
  label?: ReactNode;
@@ -60,7 +60,7 @@ type CursorPaginationProps = {
60
60
  /**
61
61
  * Pre-assembled cursor-based pagination bar.
62
62
  *
63
- * Renders a Previous button, an optional center label, and a Next button.
63
+ * Renders an optional label, such as a record range, followed by previous and next arrow buttons, aligned to the end.
64
64
  * Each button is disabled automatically when there is no page in that direction.
65
65
  * Designed for dashboard tables and lists that use cursor/keyset pagination rather
66
66
  * than numbered pages — which is the dominant pattern in the Redcoast design system.
@@ -1 +1 @@
1
- {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/pagination/pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc/E;;;GAGG;AACH,QAAA,MAAM,UAAU,4BAGb,cAAc,CAAC,KAAK,CAAC,KAAG,YAQ1B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,iBAAiB,4BAGpB,cAAc,CAAC,IAAI,CAAC,KAAG,YAMzB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,4BAGjB,cAAc,CAAC,IAAI,CAAC,KAAG,YAEzB,CAAC;AAEF,KAAK,mBAAmB,GAAG,cAAc,CAAC,GAAG,CAAC,GAAG;IAC/C,6FAA6F;IAC7F,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,cAAc,gDAKjB,mBAAmB,KAAG,YAgBxB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,sCAIrB,cAAc,CAAC,GAAG,CAAC,KAAG,YAgBxB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,sCAIjB,cAAc,CAAC,GAAG,CAAC,KAAG,YAexB,CAAC;AAEF;;;;GAIG;AACH,QAAA,MAAM,kBAAkB,4BAGrB,cAAc,CAAC,MAAM,CAAC,KAAG,YAa3B,CAAC;AAMF,KAAK,qBAAqB,GAAG;IAC3B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,uEAAuE;IACvE,OAAO,EAAE,OAAO,CAAC;IACjB,+EAA+E;IAC/E,WAAW,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,kDAAkD;IAClD,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,sDAAsD;IACtD,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;;;;;;;;;;;;;GAkBG;AACH,QAAA,MAAM,gBAAgB,oEAOnB,qBAAqB,KAAG,YAiC1B,CAAC;AAEF,OAAO,EACL,gBAAgB,EAChB,UAAU,EACV,iBAAiB,EACjB,kBAAkB,EAClB,cAAc,EACd,cAAc,EACd,cAAc,EACd,kBAAkB,GACnB,CAAC;AACF,YAAY,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,CAAC"}
1
+ {"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/pagination/pagination.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAc/E;;;GAGG;AACH,QAAA,MAAM,UAAU,4BAGb,cAAc,CAAC,KAAK,CAAC,KAAG,YAQ1B,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,iBAAiB,4BAGpB,cAAc,CAAC,IAAI,CAAC,KAAG,YAMzB,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,4BAGjB,cAAc,CAAC,IAAI,CAAC,KAAG,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EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"select.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/select/select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAc5D,QAAA,MAAM,IAAI;;;;;;;CAKqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAiBrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAuBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC"}
1
+ {"version":3,"file":"select.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/select/select.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAc5D,QAAA,MAAM,IAAI;;;;;;;CAKqB,CAAC;AAEhC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAgBrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAsBrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAUtB,CAAC"}
@@ -1,16 +1,20 @@
1
- import { type ComponentProps, type ReactElement } from 'react';
1
+ import { type ComponentProps, type ReactElement, type Ref } from 'react';
2
2
  type TableProps = ComponentProps<'table'> & {
3
+ /** Stretch to the height the parent gives it, with one scroller and a pinned header. The parent must be a flex column with a bounded height. */
4
+ fill?: boolean;
3
5
  /** Customize the native scroll viewport, including an optional max-height. */
4
6
  scrollAreaProps?: Omit<ComponentProps<'div'>, 'children' | 'ref' | 'role' | 'tabIndex'>;
5
7
  /** Pin the first column at inline-start; cells spanning multiple columns stay unpinned. */
6
8
  stickyFirstColumn?: boolean;
9
+ /** Receives the scroll viewport element, for code that follows its scrolling such as row virtualization. */
10
+ viewportRef?: Ref<HTMLDivElement>;
7
11
  };
8
12
  /** Render a table in a stable tray with keyboard access only when content overflows. */
9
- declare const Table: ({ className, scrollAreaProps, stickyFirstColumn, ...props }: TableProps) => ReactElement;
13
+ declare const Table: ({ className, fill, scrollAreaProps, stickyFirstColumn, viewportRef, ...props }: TableProps) => ReactElement;
10
14
  declare const TableHeader: ({ className, ...props }: ComponentProps<"thead">) => ReactElement;
11
15
  declare const TableBody: ({ className, ...props }: ComponentProps<"tbody">) => ReactElement;
12
16
  declare const TableFooter: ({ className, ...props }: ComponentProps<"tfoot">) => ReactElement;
13
- declare const TableRow: ({ className, ...props }: ComponentProps<"tr">) => ReactElement;
17
+ declare const TableRow: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLTableRowElement>, HTMLTableRowElement>, "ref"> & import("react").RefAttributes<HTMLTableRowElement>>;
14
18
  declare const TableHead: ({ className, scope, ...props }: ComponentProps<"th">) => ReactElement;
15
19
  declare const TableCell: ({ className, ...props }: ComponentProps<"td">) => ReactElement;
16
20
  declare const TableCaption: ({ className, ...props }: ComponentProps<"caption">) => ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.tsx"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,cAAc,EACnB,KAAK,YAAY,EAIlB,MAAM,OAAO,CAAC;AAKf,KAAK,UAAU,GAAG,cAAc,CAAC,OAAO,CAAC,GAAG;IAC1C,8EAA8E;IAC9E,eAAe,CAAC,EAAE,IAAI,CACpB,cAAc,CAAC,KAAK,CAAC,EACrB,UAAU,GAAG,KAAK,GAAG,MAAM,GAAG,UAAU,CACzC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EAAE,OAAO,CAAC;IAC5B,4GAA4G;IAC5G,WAAW,CAAC,EAAE,GAAG,CAAC,cAAc,CAAC,CAAC;CACnC,CAAC;AAwEF,wFAAwF;AACxF,QAAA,MAAM,KAAK,mFAOR,UAAU,KAAG,YA0Rf,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,SAAS,4BAGZ,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,CAAC,KAAG,YAW5B,CAAC;AAGF,QAAA,MAAM,QAAQ,0NAcb,CAAC;AAGF,QAAA,MAAM,SAAS,mCAIZ,cAAc,CAAC,IAAI,CAAC,KAAG,YAYzB,CAAC;AAEF,QAAA,MAAM,SAAS,4BAGZ,cAAc,CAAC,IAAI,CAAC,KAAG,YAWzB,CAAC;AAEF,QAAA,MAAM,YAAY,4BAGf,cAAc,CAAC,SAAS,CAAC,KAAG,YAW9B,CAAC;AAEF,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAC"}
@@ -1,8 +1,10 @@
1
1
  import type { StoryObj } from '@storybook/react-vite';
2
2
  declare const meta: {
3
- component: ({ className, scrollAreaProps, stickyFirstColumn, ...props }: import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement> & {
3
+ component: ({ className, fill, scrollAreaProps, stickyFirstColumn, viewportRef, ...props }: import("react").ClassAttributes<HTMLTableElement> & import("react").TableHTMLAttributes<HTMLTableElement> & {
4
+ fill?: boolean;
4
5
  scrollAreaProps?: Omit<import("react").ComponentProps<"div">, "children" | "ref" | "role" | "tabIndex">;
5
6
  stickyFirstColumn?: boolean;
7
+ viewportRef?: import("react").Ref<HTMLDivElement>;
6
8
  }) => import("react").ReactElement;
7
9
  parameters: {
8
10
  layout: string;
@@ -1 +1 @@
1
- {"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgB5D,QAAA,MAAM,IAAI;;;;;;;;;;CAKoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0CnC,eAAO,MAAM,OAAO,EAAE,KAsCrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkCtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA6ChC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoD9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA6G9B,CAAC"}
1
+ {"version":3,"file":"table.stories.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/table/table.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAgB5D,QAAA,MAAM,IAAI;;;;;;;;;;;;CAKoB,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AA0CnC,eAAO,MAAM,OAAO,EAAE,KAsCrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAkCtB,CAAC;AAEF,eAAO,MAAM,KAAK,EAAE,KAwBnB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KA8BrB,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,KA6ChC,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAoD9B,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KA6G9B,CAAC"}
@@ -5,7 +5,9 @@ declare const Tabs: ({ className, orientation, ...props }: ComponentProps<typeof
5
5
  declare const tabsListVariants: (props?: ({
6
6
  variant?: "default" | "line" | "navigation" | null | undefined;
7
7
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
8
- declare const TabsList: ({ className, variant, ...props }: ComponentProps<typeof TabsPrimitive.List> & VariantProps<typeof tabsListVariants>) => ReactElement;
8
+ declare const TabsList: import("react").ForwardRefExoticComponent<Omit<TabsPrimitive.TabsListProps & import("react").RefAttributes<HTMLDivElement> & VariantProps<(props?: ({
9
+ variant?: "default" | "line" | "navigation" | null | undefined;
10
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
9
11
  declare const TabsTrigger: ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Trigger>) => ReactElement;
10
12
  declare const TabsContent: ({ className, ...props }: ComponentProps<typeof TabsPrimitive.Content>) => ReactElement;
11
13
  export { Tabs, TabsList, TabsTrigger, TabsContent, tabsListVariants };
@@ -1 +1 @@
1
- {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAE,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AAC/D,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,QAAA,MAAM,IAAI,yCAIP,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,KAAG,YAa9C,CAAC;AAEF,QAAA,MAAM,gBAAgB;;8EAcrB,CAAC;AAEF,QAAA,MAAM,QAAQ,qCAIX,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,GAC1C,YAAY,CAAC,OAAO,gBAAgB,CAAC,KAAG,YASzC,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAejD,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAWjD,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
1
+ {"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tabs/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,cAAc,EAEnB,KAAK,YAAY,EAElB,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,KAAK,YAAY,EAAO,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,QAAA,MAAM,IAAI,yCAIP,cAAc,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,KAAG,YAa9C,CAAC;AAEF,QAAA,MAAM,gBAAgB;;8EAcrB,CAAC;AAIF,QAAA,MAAM,QAAQ;;wIAYZ,CAAC;AAGH,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAejD,CAAC;AAEF,QAAA,MAAM,WAAW,4BAGd,cAAc,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,KAAG,YAWjD,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"names":[],"mappings":"AAcA,QAAA,MAAM,eAAe,4EAAW,CAAC;AAEjC,QAAA,MAAM,OAAO,oEAAO,CAAC;AAErB,QAAA,MAAM,cAAc,qJAAU,CAAC;AAE/B,QAAA,MAAM,cAAc,+MAelB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}
1
+ {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/tooltip/tooltip.tsx"],"names":[],"mappings":"AAeA,QAAA,MAAM,eAAe,4EAAW,CAAC;AAEjC,QAAA,MAAM,OAAO,oEAAO,CAAC;AAErB,QAAA,MAAM,cAAc,qJAAU,CAAC;AAG/B,QAAA,MAAM,cAAc,+MA6BlB,CAAC;AAGH,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,cAAc,EAAE,CAAC"}