impact-nova 2.1.0-alpha.6 → 2.1.0-alpha.8
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/data/ag-grid-react/ag-grid.types.d.ts +6 -0
- package/dist/components/data/ag-grid-react/build-ag-grid-theme.d.ts +3 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/input-cell-editor.js +58 -58
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.d.ts +9 -0
- package/dist/components/data/ag-grid-react/column-indicator-sync-bus.js +15 -0
- package/dist/components/data/ag-grid-react/headers/column-menu/column-settings-menu.js +78 -73
- package/dist/components/data/ag-grid-react/headers/custom-header.js +3 -1
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +87 -91
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +109 -100
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.d.ts +3 -2
- package/dist/components/data/ag-grid-react/notify-column-indicator-sync.js +4 -3
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.d.ts +3 -0
- package/dist/components/data/ag-grid-react/sync-ag-grid-theme-mode.js +10 -0
- package/dist/components/data/ag-grid-react/theme.d.ts +1 -0
- package/dist/components/data/ag-grid-react/theme.js +93 -21
- package/dist/components/data/data-table/column-indicator.d.ts +1 -1
- package/dist/components/data/data-table/column-indicator.js +15 -11
- package/dist/components/data/data-table/data-table-column-def-pin.d.ts +9 -4
- package/dist/components/data/data-table/data-table-column-def-pin.js +38 -38
- package/dist/components/data/data-table/data-table-saved-views.js +37 -37
- package/dist/components/data/data-table/data-table-sheet.js +15 -17
- package/dist/components/data/data-table/data-table.js +62 -57
- package/dist/components/data/data-table/data-table.types.d.ts +7 -1
- package/dist/components/data/data-table/indicator-legend.d.ts +13 -2
- package/dist/components/data/data-table/indicator-legend.js +20 -17
- package/dist/components/data/data-table/pin-switch.js +9 -9
- package/dist/components/data/data-table/use-data-table-column-list-sync.js +133 -130
- package/dist/components/data/nested-list/nested-list-change-detection.d.ts +11 -0
- package/dist/components/data/nested-list/nested-list-change-detection.js +13 -0
- package/dist/components/data/nested-list/nested-list.js +107 -97
- package/dist/components/data-display/calendar/calendar.d.ts +1 -1
- package/dist/components/data-display/calendar/calendar.js +194 -189
- package/dist/components/data-display/chart/chart-palette.d.ts +16 -0
- package/dist/components/data-display/chart/chart-palette.js +28 -0
- package/dist/components/data-display/chart/chart.js +121 -115
- package/dist/components/data-display/chart/chart.utils.js +9 -6
- package/dist/components/data-display/chart/index.d.ts +1 -0
- package/dist/components/data-display/chart/index.js +15 -9
- package/dist/components/data-display/chart/resolve-highcharts-options.d.ts +3 -0
- package/dist/components/data-display/chart/resolve-highcharts-options.js +35 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.d.ts +6 -0
- package/dist/components/data-display/statistics-card/statistics-card.color.js +19 -0
- package/dist/components/data-display/statistics-card/statistics-card.hooks.js +50 -48
- package/dist/components/data-display/statistics-card/statistics-card.js +127 -146
- package/dist/components/feedback/alert-dialog/alert-dialog.js +15 -15
- package/dist/components/feedback/dialog/dialog.js +3 -3
- package/dist/components/feedback/drawer/drawer.js +32 -32
- package/dist/components/feedback/sheet/sheet.js +8 -8
- package/dist/components/feedback/sheet/sheet.variants.js +1 -1
- package/dist/components/feedback/toast/toast.js +83 -92
- package/dist/components/flows/command-palette/command-palette-context.types.d.ts +5 -0
- package/dist/components/flows/command-palette/command-palette.d.ts +4 -16
- package/dist/components/flows/command-palette/command-palette.js +245 -258
- package/dist/components/flows/command-palette/command-palette.types.d.ts +9 -0
- package/dist/components/flows/command-palette/shortcut-overlay.js +6 -6
- package/dist/components/flows/filter-panel/filter-panel.d.ts +3 -2
- package/dist/components/flows/filter-panel/filter-panel.js +99 -104
- package/dist/components/flows/filter-strip/filter-summary.js +41 -41
- package/dist/components/flows/filter-strip/filter-tag-list.js +48 -48
- package/dist/components/flows/wizard/wizard.js +32 -32
- package/dist/components/forms/choice-card/choice-card.d.ts +2 -2
- package/dist/components/forms/choice-card/choice-card.js +156 -166
- package/dist/components/forms/combobox/combobox.js +70 -70
- package/dist/components/forms/date-picker/date-picker.js +31 -30
- package/dist/components/forms/file-upload/file-upload.js +146 -168
- package/dist/components/forms/prompt/prompt.js +47 -48
- package/dist/components/forms/select/components/SelectAllRow.js +14 -14
- package/dist/components/forms/select/components/SelectMenuFooter.js +12 -12
- package/dist/components/forms/select/components/SelectMenuHeader.js +44 -44
- package/dist/components/forms/select/components/SelectMenuListBody.js +22 -22
- package/dist/components/forms/select/components/SelectMenuPanel.js +8 -8
- package/dist/components/forms/select/components/SelectOptionRow.js +62 -62
- package/dist/components/forms/select/select.d.ts +5 -4
- package/dist/components/forms/select/select.js +123 -120
- package/dist/components/forms/select/select.types.d.ts +95 -204
- package/dist/components/forms/slider/slider.js +17 -17
- package/dist/components/forms/smart-input/smart-input.js +49 -49
- package/dist/components/forms/textarea/textarea.js +25 -25
- package/dist/components/layout/breadcrumb/breadcrumb.js +112 -118
- package/dist/components/layout/header/header.d.ts +5 -17
- package/dist/components/layout/header/header.js +113 -116
- package/dist/components/layout/header/header.types.d.ts +3 -0
- package/dist/components/layout/sidebar/sidebar.js +5 -5
- package/dist/components/layout/sidebar/sidebar.variants.js +1 -1
- package/dist/components/primitives/accordion/accordion.js +38 -41
- package/dist/components/primitives/kbd/kbd.variants.js +1 -1
- package/dist/i18n/defaultMessages.d.ts +2 -0
- package/dist/i18n/defaultMessages.js +6 -4
- package/dist/i18n/locales/de.js +2 -0
- package/dist/i18n/locales/es.js +2 -0
- package/dist/i18n/locales/hi.js +2 -0
- package/dist/i18n/locales/kn.js +2 -0
- package/dist/impact-nova-base.scss +8 -5
- package/dist/impact-nova-components.css +2 -2
- package/dist/impact-nova-tokens.scss +346 -189
- package/dist/impact-nova.css +1 -1
- package/dist/index.js +505 -499
- package/dist/lib/primitives/create-component.d.ts +1 -1
- package/dist/lib/primitives/create-component.js +4 -4
- package/dist/lib/primitives/field.js +17 -18
- package/dist/lib/resolve-design-token-color.d.ts +5 -0
- package/dist/lib/resolve-design-token-color.js +12 -0
- package/dist/lib/virtualized/virtualized-list-parts.d.ts +1 -2
- package/dist/lib/virtualized/virtualized-list-parts.js +23 -23
- package/dist/lib/virtualized/virtualized.types.d.ts +10 -0
- package/dist/llms/rules/ag-grid.js +1 -1
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/theme/tokens/chart-series-palette.json.d.ts +53 -0
- package/dist/theme/tokens/chart-series-palette.json.js +7 -0
- package/package.json +22 -254
- package/tailwind.config.js +10 -229
|
@@ -1,52 +1,52 @@
|
|
|
1
|
-
import { jsx as n, jsxs as
|
|
2
|
-
import { useState as
|
|
1
|
+
import { jsx as n, jsxs as E } from "react/jsx-runtime";
|
|
2
|
+
import { useState as g, useMemo as u, useCallback as D, useEffect as w, memo as v } from "react";
|
|
3
3
|
import { AgGridWrapper as O } from "../ag-grid-react/index.js";
|
|
4
4
|
import { cn as H } from "../../../lib/utils.js";
|
|
5
|
-
import { DataTableContext as F, DataTableSheetPortalStoreContext as
|
|
5
|
+
import { DataTableContext as F, DataTableSheetPortalStoreContext as I, useDataTable as N, useDataTableSheetPortal as P } from "./data-table-context.js";
|
|
6
6
|
import { createDataTableSheetPortalStore as z } from "./data-table-sheet-portal-store.js";
|
|
7
7
|
import { DATA_TABLE_SCOPED_SHEET_HOST_MIN_HEIGHT_PX as B } from "./data-table-constants.js";
|
|
8
8
|
import { extractRuntimeColumnDefs as M, mergeInitialGridRuntimeState as j } from "./data-table-column-def-pin.js";
|
|
9
|
-
const
|
|
9
|
+
const _ = {
|
|
10
10
|
default: 46,
|
|
11
11
|
compact: 30,
|
|
12
12
|
comfort: 52
|
|
13
13
|
}, U = ({
|
|
14
|
-
children:
|
|
14
|
+
children: i,
|
|
15
15
|
className: t
|
|
16
16
|
}) => {
|
|
17
|
-
const [r, e] =
|
|
18
|
-
|
|
19
|
-
}, []),
|
|
20
|
-
e(
|
|
17
|
+
const [r, e] = g(null), [o, c] = g("medium"), [a, S] = g("full"), [s, f] = g("default"), l = u(() => z(), []), m = D((d) => {
|
|
18
|
+
l.registerScopedSheetDepth(d);
|
|
19
|
+
}, [l]), p = D((d) => {
|
|
20
|
+
e(d);
|
|
21
21
|
}, []), x = {
|
|
22
22
|
small: "12px",
|
|
23
23
|
medium: "14px",
|
|
24
24
|
large: "16px"
|
|
25
|
-
}[o], b = `${
|
|
25
|
+
}[o], b = `${_[s]}px`, T = u(
|
|
26
26
|
() => ({
|
|
27
27
|
gridApi: r,
|
|
28
|
-
registerApi:
|
|
29
|
-
registerScopedSheetDepth:
|
|
28
|
+
registerApi: p,
|
|
29
|
+
registerScopedSheetDepth: m,
|
|
30
30
|
fontSize: o,
|
|
31
31
|
setFontSize: c,
|
|
32
|
-
numericFormat:
|
|
32
|
+
numericFormat: a,
|
|
33
33
|
setNumericFormat: S,
|
|
34
34
|
rowHeight: s,
|
|
35
|
-
setRowHeight:
|
|
35
|
+
setRowHeight: f
|
|
36
36
|
}),
|
|
37
37
|
[
|
|
38
38
|
r,
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
p,
|
|
40
|
+
m,
|
|
41
41
|
o,
|
|
42
|
-
|
|
42
|
+
a,
|
|
43
43
|
s
|
|
44
44
|
]
|
|
45
45
|
);
|
|
46
46
|
return /* @__PURE__ */ n(F.Provider, { value: T, children: /* @__PURE__ */ n(
|
|
47
|
-
|
|
47
|
+
I.Provider,
|
|
48
48
|
{
|
|
49
|
-
value:
|
|
49
|
+
value: l,
|
|
50
50
|
children: /* @__PURE__ */ n(
|
|
51
51
|
"div",
|
|
52
52
|
{
|
|
@@ -59,19 +59,19 @@ const P = {
|
|
|
59
59
|
"--ag-font-size": x,
|
|
60
60
|
"--ag-row-height": b
|
|
61
61
|
},
|
|
62
|
-
children:
|
|
62
|
+
children: i
|
|
63
63
|
}
|
|
64
64
|
)
|
|
65
65
|
}
|
|
66
66
|
) });
|
|
67
|
-
},
|
|
67
|
+
}, A = {
|
|
68
68
|
full: "full_no",
|
|
69
69
|
k: "thou",
|
|
70
70
|
m: "mil",
|
|
71
71
|
b: "bil",
|
|
72
72
|
full_precision: "full_precision"
|
|
73
73
|
}, k = v(function() {
|
|
74
|
-
const { setSheetTarget: t } =
|
|
74
|
+
const { setSheetTarget: t } = P();
|
|
75
75
|
return /* @__PURE__ */ n(
|
|
76
76
|
"div",
|
|
77
77
|
{
|
|
@@ -83,8 +83,8 @@ const P = {
|
|
|
83
83
|
className: t,
|
|
84
84
|
children: r
|
|
85
85
|
}) {
|
|
86
|
-
const { scopedSheetOpen: e } =
|
|
87
|
-
return /* @__PURE__ */
|
|
86
|
+
const { scopedSheetOpen: e } = P();
|
|
87
|
+
return /* @__PURE__ */ E(
|
|
88
88
|
"div",
|
|
89
89
|
{
|
|
90
90
|
className: H(
|
|
@@ -104,12 +104,12 @@ const P = {
|
|
|
104
104
|
onGridReady: e,
|
|
105
105
|
columnDefs: o,
|
|
106
106
|
maintainColumnOrder: c = !0,
|
|
107
|
-
...
|
|
107
|
+
...a
|
|
108
108
|
}) {
|
|
109
109
|
return /* @__PURE__ */ n(
|
|
110
110
|
O,
|
|
111
111
|
{
|
|
112
|
-
...
|
|
112
|
+
...a,
|
|
113
113
|
columnDefs: o,
|
|
114
114
|
rowHeight: t,
|
|
115
115
|
onGridReady: e,
|
|
@@ -118,66 +118,71 @@ const P = {
|
|
|
118
118
|
}
|
|
119
119
|
);
|
|
120
120
|
});
|
|
121
|
-
function Z(
|
|
121
|
+
function Z(i) {
|
|
122
122
|
const {
|
|
123
123
|
registerApi: t,
|
|
124
124
|
rowHeight: r,
|
|
125
125
|
gridApi: e,
|
|
126
126
|
numericFormat: o
|
|
127
|
-
} =
|
|
127
|
+
} = N(), {
|
|
128
128
|
className: c,
|
|
129
|
-
onGridReady:
|
|
129
|
+
onGridReady: a,
|
|
130
130
|
rowHeight: S,
|
|
131
131
|
context: s,
|
|
132
|
-
columnDefs:
|
|
133
|
-
initialState:
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
132
|
+
columnDefs: f,
|
|
133
|
+
initialState: l,
|
|
134
|
+
suppressInitialRuntimeState: m,
|
|
135
|
+
maintainColumnOrder: p = !0,
|
|
136
|
+
...x
|
|
137
|
+
} = i, b = _[r], T = S ?? b, { runtimeColumnDefs: d, extractedRuntimeDefaults: y } = u(
|
|
138
|
+
() => M(f ?? void 0),
|
|
139
|
+
[f]
|
|
140
|
+
), C = u(
|
|
141
|
+
() => j(
|
|
142
|
+
l,
|
|
143
|
+
y,
|
|
144
|
+
m
|
|
145
|
+
),
|
|
146
|
+
[l, y, m]
|
|
147
|
+
), G = u(
|
|
143
148
|
() => ({
|
|
144
149
|
...s,
|
|
145
|
-
formatType:
|
|
150
|
+
formatType: A[o]
|
|
146
151
|
}),
|
|
147
152
|
[s, o]
|
|
148
153
|
);
|
|
149
|
-
|
|
154
|
+
w(() => {
|
|
150
155
|
e?.resetRowHeights();
|
|
151
|
-
}, [r, e]),
|
|
156
|
+
}, [r, e]), w(() => {
|
|
152
157
|
if (e) {
|
|
153
|
-
const
|
|
158
|
+
const h = e.getGridOption("context") || {};
|
|
154
159
|
e.setGridOption("context", {
|
|
155
|
-
...
|
|
156
|
-
formatType:
|
|
160
|
+
...h,
|
|
161
|
+
formatType: A[o]
|
|
157
162
|
}), e.refreshCells({ force: !0 });
|
|
158
163
|
}
|
|
159
164
|
}, [o, e]);
|
|
160
165
|
const R = D(
|
|
161
|
-
(
|
|
162
|
-
t(
|
|
166
|
+
(h) => {
|
|
167
|
+
t(h.api), a?.(h);
|
|
163
168
|
},
|
|
164
|
-
[t,
|
|
169
|
+
[t, a]
|
|
165
170
|
);
|
|
166
171
|
return /* @__PURE__ */ n(L, { className: c, children: /* @__PURE__ */ n(
|
|
167
172
|
W,
|
|
168
173
|
{
|
|
169
|
-
...
|
|
170
|
-
columnDefs:
|
|
171
|
-
initialState:
|
|
172
|
-
maintainColumnOrder:
|
|
173
|
-
resolvedRowHeight:
|
|
174
|
-
mergedContext:
|
|
174
|
+
...x,
|
|
175
|
+
columnDefs: d,
|
|
176
|
+
initialState: C,
|
|
177
|
+
maintainColumnOrder: p,
|
|
178
|
+
resolvedRowHeight: T,
|
|
179
|
+
mergedContext: G,
|
|
175
180
|
onGridReady: R
|
|
176
181
|
}
|
|
177
182
|
) });
|
|
178
183
|
}
|
|
179
184
|
const ee = ({
|
|
180
|
-
children:
|
|
185
|
+
children: i,
|
|
181
186
|
className: t
|
|
182
187
|
}) => /* @__PURE__ */ n(
|
|
183
188
|
"div",
|
|
@@ -187,7 +192,7 @@ const ee = ({
|
|
|
187
192
|
"flex items-center justify-between px-4 py-3 shrink-0 bg-canvas-elevated rounded-t-[inherit]",
|
|
188
193
|
t
|
|
189
194
|
),
|
|
190
|
-
children:
|
|
195
|
+
children: i
|
|
191
196
|
}
|
|
192
197
|
);
|
|
193
198
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AgGridWrapperProps } from '../ag-grid-react/ag-grid.types';
|
|
2
|
+
import { SuppressInitialRuntimeState } from './data-table-column-def-pin';
|
|
2
3
|
import type * as React from "react";
|
|
3
4
|
/**
|
|
4
5
|
* Root layout provider for data tables. Compose toolbar, sheet, and `DataTableContent` as children.
|
|
@@ -8,11 +9,16 @@ export type DataTableProps = {
|
|
|
8
9
|
className?: string;
|
|
9
10
|
};
|
|
10
11
|
/**
|
|
11
|
-
* AG Grid surface — forwards
|
|
12
|
+
* AG Grid surface — forwards `AgGridReact` grid options (`rowData`, `columnDefs`, `rowModelType`, …)
|
|
12
13
|
* with Impact Nova styling. See https://www.ag-grid.com/react-data-grid/grid-options/
|
|
13
14
|
*/
|
|
14
15
|
export type DataTableContentProps<TData = unknown> = AgGridWrapperProps<TData> & {
|
|
15
16
|
className?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Skip injecting extracted column pinning/visibility into `initialState` on
|
|
19
|
+
* first paint — use when a saved view will apply immediately after mount.
|
|
20
|
+
*/
|
|
21
|
+
suppressInitialRuntimeState?: SuppressInitialRuntimeState;
|
|
16
22
|
};
|
|
17
23
|
/**
|
|
18
24
|
* Top bar above the grid. Optional — omit to remove the toolbar from the DOM.
|
|
@@ -1,8 +1,19 @@
|
|
|
1
|
+
import { IndicatorType } from './column-indicator';
|
|
2
|
+
export type IndicatorLegendEntry = {
|
|
3
|
+
type: IndicatorType;
|
|
4
|
+
/** Override the default i18n label for this entry */
|
|
5
|
+
label?: string;
|
|
6
|
+
};
|
|
7
|
+
export interface IndicatorLegendProps {
|
|
8
|
+
/** Legend entries; defaults to sort + filter */
|
|
9
|
+
entries?: IndicatorLegendEntry[];
|
|
10
|
+
}
|
|
1
11
|
/**
|
|
2
|
-
* Legend showing the meaning of
|
|
12
|
+
* Legend showing the meaning of column indicator badge colors.
|
|
3
13
|
* Displayed in the Frozen Columns section header.
|
|
4
14
|
*
|
|
5
15
|
* @example
|
|
6
16
|
* <IndicatorLegend />
|
|
17
|
+
* <IndicatorLegend entries={[{ type: 'sort' }, { type: 'filter' }, { type: 'nonSavable' }]} />
|
|
7
18
|
*/
|
|
8
|
-
export declare const IndicatorLegend: React.FC
|
|
19
|
+
export declare const IndicatorLegend: React.FC<IndicatorLegendProps>;
|
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useImpactNovaI18n as
|
|
3
|
-
import { ColumnIndicator as
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
]
|
|
1
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
2
|
+
import { useImpactNovaI18n as r } from "../../../i18n/use-impact-nova-i18n.js";
|
|
3
|
+
import { ColumnIndicator as i } from "./column-indicator.js";
|
|
4
|
+
const c = [
|
|
5
|
+
{ type: "sort" },
|
|
6
|
+
{ type: "filter" }
|
|
7
|
+
], d = {
|
|
8
|
+
sort: "indicatorSort",
|
|
9
|
+
filter: "indicatorSearch",
|
|
10
|
+
nonSavable: "indicatorNonSavable"
|
|
11
|
+
}, s = ({
|
|
12
|
+
entries: a = c
|
|
13
|
+
}) => {
|
|
14
|
+
const { t: o } = r();
|
|
15
|
+
return /* @__PURE__ */ t("div", { className: "flex items-center gap-3 text-[10px] text-secondary-foreground", "data-component": "indicator-legend", children: a.map((e) => /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
|
|
16
|
+
/* @__PURE__ */ t(i, { type: e.type }),
|
|
17
|
+
/* @__PURE__ */ t("span", { children: e.label ?? o(`dataTable.${d[e.type]}`) })
|
|
18
|
+
] }, e.type)) });
|
|
16
19
|
};
|
|
17
|
-
|
|
20
|
+
s.displayName = "IndicatorLegend";
|
|
18
21
|
export {
|
|
19
|
-
|
|
22
|
+
s as IndicatorLegend
|
|
20
23
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
import { jsxs as m, jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import { useCallback as s } from "react";
|
|
3
3
|
import { cn as n } from "../../../lib/utils.js";
|
|
4
|
-
import { Pin as
|
|
5
|
-
import { useImpactNovaI18n as
|
|
4
|
+
import { Pin as d } from "impact-nova-icons";
|
|
5
|
+
import { useImpactNovaI18n as w } from "../../../i18n/use-impact-nova-i18n.js";
|
|
6
6
|
const u = ({
|
|
7
7
|
value: e,
|
|
8
8
|
onChange: r,
|
|
9
9
|
disabled: t = !1,
|
|
10
10
|
className: l
|
|
11
11
|
}) => {
|
|
12
|
-
const { t:
|
|
12
|
+
const { t: c } = w(), o = s(() => {
|
|
13
13
|
t || r(e === "left" ? "right" : "left");
|
|
14
14
|
}, [t, e, r]), f = s(
|
|
15
15
|
(a) => {
|
|
16
|
-
t || (a.key === " " || a.key === "Enter") && (a.preventDefault(),
|
|
16
|
+
t || (a.key === " " || a.key === "Enter") && (a.preventDefault(), o());
|
|
17
17
|
},
|
|
18
|
-
[t,
|
|
19
|
-
), p = () =>
|
|
18
|
+
[t, o]
|
|
19
|
+
), p = () => c(e === "left" ? "dataTable.pinSwitchPinnedLeft" : e === "right" ? "dataTable.pinSwitchPinnedRight" : "dataTable.pinSwitchNotPinned"), h = e === "right";
|
|
20
20
|
return /* @__PURE__ */ m("div", { className: n("inline-flex items-center gap-2", l), "data-component": "pin-switch", children: [
|
|
21
21
|
/* @__PURE__ */ i(
|
|
22
22
|
"span",
|
|
@@ -37,7 +37,7 @@ const u = ({
|
|
|
37
37
|
"aria-label": p(),
|
|
38
38
|
"aria-disabled": t,
|
|
39
39
|
tabIndex: t ? -1 : 0,
|
|
40
|
-
onClick:
|
|
40
|
+
onClick: o,
|
|
41
41
|
onKeyDown: f,
|
|
42
42
|
disabled: t,
|
|
43
43
|
className: n(
|
|
@@ -49,10 +49,10 @@ const u = ({
|
|
|
49
49
|
"div",
|
|
50
50
|
{
|
|
51
51
|
className: n(
|
|
52
|
-
"absolute flex w-5 h-5 p-0.5 justify-center items-center rounded bg-
|
|
52
|
+
"absolute flex w-5 h-5 p-0.5 justify-center items-center rounded bg-canvas-elevated shadow-elevation-pin-switch transition-all duration-200 ease-in-out",
|
|
53
53
|
e === "right" ? "left-[calc(100%-22px)]" : "left-0.5"
|
|
54
54
|
),
|
|
55
|
-
children: /* @__PURE__ */ i(
|
|
55
|
+
children: /* @__PURE__ */ i(d, { className: "w-3 h-3 text-content" })
|
|
56
56
|
}
|
|
57
57
|
)
|
|
58
58
|
}
|