@nocoo/basalt 3.0.0 → 3.1.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/ai/DESIGN.md +64 -8
- package/ai/INTEGRATION.md +83 -8
- package/ai/USAGE.md +2 -2
- package/ai/registry.json +198 -17
- package/dist/components/alert-dialog.js +1 -1
- package/dist/components/alert-dialog.js.map +1 -1
- package/dist/components/data-table.d.ts +7 -1
- package/dist/components/data-table.js +127 -132
- package/dist/components/data-table.js.map +1 -1
- package/dist/components/dialog.js +2 -2
- package/dist/components/dialog.js.map +1 -1
- package/dist/components/diff-table.js +18 -13
- package/dist/components/diff-table.js.map +1 -1
- package/dist/components/sidebar.js +18 -15
- package/dist/components/sidebar.js.map +1 -1
- package/dist/components/table.d.ts +39 -2
- package/dist/components/table.js +48 -17
- package/dist/components/table.js.map +1 -1
- package/dist/styles/standalone.css +29 -7
- package/dist/styles/tailwind.css +1 -0
- package/dist/styles/tokens.css +2 -0
- package/dist/utils/use-hover-highlight.js +38 -36
- package/dist/utils/use-hover-highlight.js.map +1 -1
- package/package.json +28 -28
package/ai/registry.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"packageName": "@nocoo/basalt",
|
|
3
|
-
"packageVersion": "3.
|
|
3
|
+
"packageVersion": "3.1.0",
|
|
4
4
|
"totalModules": 131,
|
|
5
|
-
"totalSymbols":
|
|
6
|
-
"totalValues":
|
|
7
|
-
"totalTypes":
|
|
5
|
+
"totalSymbols": 781,
|
|
6
|
+
"totalValues": 406,
|
|
7
|
+
"totalTypes": 375,
|
|
8
8
|
"totalCssExports": 3,
|
|
9
9
|
"totalCatalogEntries": 120,
|
|
10
10
|
"modules": [
|
|
@@ -6522,7 +6522,7 @@
|
|
|
6522
6522
|
"importPath": "@nocoo/basalt/components/alert-dialog",
|
|
6523
6523
|
"subpath": "./components/alert-dialog",
|
|
6524
6524
|
"sourceFile": "packages/basalt/src/components/alert-dialog.tsx",
|
|
6525
|
-
"sourceHash": "
|
|
6525
|
+
"sourceHash": "6893fc30686191ed",
|
|
6526
6526
|
"rootAvailable": true,
|
|
6527
6527
|
"maturity": "ready",
|
|
6528
6528
|
"kind": "catalog-component",
|
|
@@ -12213,7 +12213,7 @@
|
|
|
12213
12213
|
"importPath": "@nocoo/basalt/components/data-table",
|
|
12214
12214
|
"subpath": "./components/data-table",
|
|
12215
12215
|
"sourceFile": "packages/basalt/src/components/data-table.tsx",
|
|
12216
|
-
"sourceHash": "
|
|
12216
|
+
"sourceHash": "cf4d04c79f9bcff5",
|
|
12217
12217
|
"rootAvailable": false,
|
|
12218
12218
|
"maturity": "ready",
|
|
12219
12219
|
"kind": "catalog-component",
|
|
@@ -12231,6 +12231,14 @@
|
|
|
12231
12231
|
"packageDoc": "ai/registry.json#data-table",
|
|
12232
12232
|
"originModule": "@nocoo/basalt/components/data-table"
|
|
12233
12233
|
},
|
|
12234
|
+
{
|
|
12235
|
+
"name": "DataTableEdge",
|
|
12236
|
+
"isValue": false,
|
|
12237
|
+
"isType": true,
|
|
12238
|
+
"ownerDoc": "src/pages/ui/data-table",
|
|
12239
|
+
"packageDoc": "ai/registry.json#data-table",
|
|
12240
|
+
"originModule": "@nocoo/basalt/components/data-table"
|
|
12241
|
+
},
|
|
12234
12242
|
{
|
|
12235
12243
|
"name": "DataTableColumn",
|
|
12236
12244
|
"isValue": false,
|
|
@@ -12454,6 +12462,13 @@
|
|
|
12454
12462
|
"type": "string",
|
|
12455
12463
|
"required": false,
|
|
12456
12464
|
"description": "ID of additional table instructions or summary."
|
|
12465
|
+
},
|
|
12466
|
+
{
|
|
12467
|
+
"name": "edge",
|
|
12468
|
+
"type": "DataTableEdge",
|
|
12469
|
+
"required": false,
|
|
12470
|
+
"default": "\"inset\"",
|
|
12471
|
+
"description": "Direct-card rails on the first and last display columns."
|
|
12457
12472
|
}
|
|
12458
12473
|
]
|
|
12459
12474
|
}
|
|
@@ -12650,6 +12665,13 @@
|
|
|
12650
12665
|
"type": "string",
|
|
12651
12666
|
"required": false,
|
|
12652
12667
|
"description": "ID of additional table instructions or summary."
|
|
12668
|
+
},
|
|
12669
|
+
{
|
|
12670
|
+
"name": "edge",
|
|
12671
|
+
"type": "DataTableEdge",
|
|
12672
|
+
"required": false,
|
|
12673
|
+
"default": "\"inset\"",
|
|
12674
|
+
"description": "Direct-card rails on the first and last display columns."
|
|
12653
12675
|
}
|
|
12654
12676
|
]
|
|
12655
12677
|
}
|
|
@@ -13225,7 +13247,7 @@
|
|
|
13225
13247
|
"importPath": "@nocoo/basalt/components/dialog",
|
|
13226
13248
|
"subpath": "./components/dialog",
|
|
13227
13249
|
"sourceFile": "packages/basalt/src/components/dialog.tsx",
|
|
13228
|
-
"sourceHash": "
|
|
13250
|
+
"sourceHash": "1190ff90dc8df750",
|
|
13229
13251
|
"rootAvailable": true,
|
|
13230
13252
|
"maturity": "ready",
|
|
13231
13253
|
"kind": "catalog-component",
|
|
@@ -13829,7 +13851,7 @@
|
|
|
13829
13851
|
"importPath": "@nocoo/basalt/components/diff-table",
|
|
13830
13852
|
"subpath": "./components/diff-table",
|
|
13831
13853
|
"sourceFile": "packages/basalt/src/components/diff-table.tsx",
|
|
13832
|
-
"sourceHash": "
|
|
13854
|
+
"sourceHash": "f5dc2b0dbcc625d4",
|
|
13833
13855
|
"rootAvailable": false,
|
|
13834
13856
|
"maturity": "ready",
|
|
13835
13857
|
"kind": "catalog-component",
|
|
@@ -23439,7 +23461,7 @@
|
|
|
23439
23461
|
"importPath": "@nocoo/basalt/components/sidebar",
|
|
23440
23462
|
"subpath": "./components/sidebar",
|
|
23441
23463
|
"sourceFile": "packages/basalt/src/components/sidebar.tsx",
|
|
23442
|
-
"sourceHash": "
|
|
23464
|
+
"sourceHash": "9f68a198780ffd4a",
|
|
23443
23465
|
"rootAvailable": true,
|
|
23444
23466
|
"maturity": "ready",
|
|
23445
23467
|
"kind": "catalog-component",
|
|
@@ -24857,14 +24879,14 @@
|
|
|
24857
24879
|
"importPath": "@nocoo/basalt/components/table",
|
|
24858
24880
|
"subpath": "./components/table",
|
|
24859
24881
|
"sourceFile": "packages/basalt/src/components/table.tsx",
|
|
24860
|
-
"sourceHash": "
|
|
24882
|
+
"sourceHash": "0633208cec31bc1d",
|
|
24861
24883
|
"rootAvailable": false,
|
|
24862
24884
|
"maturity": "ready",
|
|
24863
24885
|
"kind": "catalog-component",
|
|
24864
24886
|
"ownerDoc": "src/pages/ui/table",
|
|
24865
24887
|
"packageDoc": "ai/registry.json#table",
|
|
24866
24888
|
"summary": "Table component documentation and catalog playground",
|
|
24867
|
-
"peers": ["react"],
|
|
24889
|
+
"peers": ["lucide-react", "react"],
|
|
24868
24890
|
"optionalPeers": [],
|
|
24869
24891
|
"symbols": [
|
|
24870
24892
|
{
|
|
@@ -24875,6 +24897,22 @@
|
|
|
24875
24897
|
"packageDoc": "ai/registry.json#table",
|
|
24876
24898
|
"originModule": "@nocoo/basalt/components/table"
|
|
24877
24899
|
},
|
|
24900
|
+
{
|
|
24901
|
+
"name": "TableTextAlign",
|
|
24902
|
+
"isValue": false,
|
|
24903
|
+
"isType": true,
|
|
24904
|
+
"ownerDoc": "src/pages/ui/table",
|
|
24905
|
+
"packageDoc": "ai/registry.json#table",
|
|
24906
|
+
"originModule": "@nocoo/basalt/components/table"
|
|
24907
|
+
},
|
|
24908
|
+
{
|
|
24909
|
+
"name": "TableSortDirection",
|
|
24910
|
+
"isValue": false,
|
|
24911
|
+
"isType": true,
|
|
24912
|
+
"ownerDoc": "src/pages/ui/table",
|
|
24913
|
+
"packageDoc": "ai/registry.json#table",
|
|
24914
|
+
"originModule": "@nocoo/basalt/components/table"
|
|
24915
|
+
},
|
|
24878
24916
|
{
|
|
24879
24917
|
"name": "TableProps",
|
|
24880
24918
|
"isValue": false,
|
|
@@ -25002,6 +25040,22 @@
|
|
|
25002
25040
|
"ownerDoc": "src/pages/ui/table",
|
|
25003
25041
|
"packageDoc": "ai/registry.json#table",
|
|
25004
25042
|
"originModule": "@nocoo/basalt/components/table"
|
|
25043
|
+
},
|
|
25044
|
+
{
|
|
25045
|
+
"name": "TableSortableHeaderProps",
|
|
25046
|
+
"isValue": false,
|
|
25047
|
+
"isType": true,
|
|
25048
|
+
"ownerDoc": "src/pages/ui/table",
|
|
25049
|
+
"packageDoc": "ai/registry.json#table",
|
|
25050
|
+
"originModule": "@nocoo/basalt/components/table"
|
|
25051
|
+
},
|
|
25052
|
+
{
|
|
25053
|
+
"name": "TableSortableHeader",
|
|
25054
|
+
"isValue": true,
|
|
25055
|
+
"isType": false,
|
|
25056
|
+
"ownerDoc": "src/pages/ui/table",
|
|
25057
|
+
"packageDoc": "ai/registry.json#table",
|
|
25058
|
+
"originModule": "@nocoo/basalt/components/table"
|
|
25005
25059
|
}
|
|
25006
25060
|
],
|
|
25007
25061
|
"catalogEntries": [
|
|
@@ -25073,6 +25127,12 @@
|
|
|
25073
25127
|
"type": "string",
|
|
25074
25128
|
"required": false,
|
|
25075
25129
|
"description": "Additional classes for the header cell."
|
|
25130
|
+
},
|
|
25131
|
+
{
|
|
25132
|
+
"name": "textAlign",
|
|
25133
|
+
"type": "TableTextAlign",
|
|
25134
|
+
"required": false,
|
|
25135
|
+
"description": "Logical inline alignment. Omitted headers keep `text-start` unless native `align` is set."
|
|
25076
25136
|
}
|
|
25077
25137
|
]
|
|
25078
25138
|
},
|
|
@@ -25084,6 +25144,40 @@
|
|
|
25084
25144
|
"type": "string",
|
|
25085
25145
|
"required": false,
|
|
25086
25146
|
"description": "Additional classes for the cell."
|
|
25147
|
+
},
|
|
25148
|
+
{
|
|
25149
|
+
"name": "textAlign",
|
|
25150
|
+
"type": "TableTextAlign",
|
|
25151
|
+
"required": false,
|
|
25152
|
+
"description": "Logical inline alignment. Omitted cells inherit from the table or row. Native HTML `align` is unchanged."
|
|
25153
|
+
}
|
|
25154
|
+
]
|
|
25155
|
+
},
|
|
25156
|
+
{
|
|
25157
|
+
"name": "TableSortableHeader",
|
|
25158
|
+
"props": [
|
|
25159
|
+
{
|
|
25160
|
+
"name": "children",
|
|
25161
|
+
"type": "React.ReactNode",
|
|
25162
|
+
"required": true
|
|
25163
|
+
},
|
|
25164
|
+
{
|
|
25165
|
+
"name": "textAlign",
|
|
25166
|
+
"type": "TableTextAlign",
|
|
25167
|
+
"required": false,
|
|
25168
|
+
"default": "\"start\"",
|
|
25169
|
+
"description": "Logical control layout. `end` places the sort icon inward of the label."
|
|
25170
|
+
},
|
|
25171
|
+
{
|
|
25172
|
+
"name": "sorted",
|
|
25173
|
+
"type": "TableSortDirection",
|
|
25174
|
+
"required": false,
|
|
25175
|
+
"description": "Current sort direction when this column is sorted."
|
|
25176
|
+
},
|
|
25177
|
+
{
|
|
25178
|
+
"name": "className",
|
|
25179
|
+
"type": "string",
|
|
25180
|
+
"required": false
|
|
25087
25181
|
}
|
|
25088
25182
|
]
|
|
25089
25183
|
}
|
|
@@ -25151,6 +25245,12 @@
|
|
|
25151
25245
|
"type": "string",
|
|
25152
25246
|
"required": false,
|
|
25153
25247
|
"description": "Additional classes for the header cell."
|
|
25248
|
+
},
|
|
25249
|
+
{
|
|
25250
|
+
"name": "textAlign",
|
|
25251
|
+
"type": "TableTextAlign",
|
|
25252
|
+
"required": false,
|
|
25253
|
+
"description": "Logical inline alignment. Omitted headers keep `text-start` unless native `align` is set."
|
|
25154
25254
|
}
|
|
25155
25255
|
]
|
|
25156
25256
|
},
|
|
@@ -25162,6 +25262,40 @@
|
|
|
25162
25262
|
"type": "string",
|
|
25163
25263
|
"required": false,
|
|
25164
25264
|
"description": "Additional classes for the cell."
|
|
25265
|
+
},
|
|
25266
|
+
{
|
|
25267
|
+
"name": "textAlign",
|
|
25268
|
+
"type": "TableTextAlign",
|
|
25269
|
+
"required": false,
|
|
25270
|
+
"description": "Logical inline alignment. Omitted cells inherit from the table or row. Native HTML `align` is unchanged."
|
|
25271
|
+
}
|
|
25272
|
+
]
|
|
25273
|
+
},
|
|
25274
|
+
{
|
|
25275
|
+
"name": "TableSortableHeader",
|
|
25276
|
+
"props": [
|
|
25277
|
+
{
|
|
25278
|
+
"name": "children",
|
|
25279
|
+
"type": "React.ReactNode",
|
|
25280
|
+
"required": true
|
|
25281
|
+
},
|
|
25282
|
+
{
|
|
25283
|
+
"name": "textAlign",
|
|
25284
|
+
"type": "TableTextAlign",
|
|
25285
|
+
"required": false,
|
|
25286
|
+
"default": "\"start\"",
|
|
25287
|
+
"description": "Logical control layout. `end` places the sort icon inward of the label."
|
|
25288
|
+
},
|
|
25289
|
+
{
|
|
25290
|
+
"name": "sorted",
|
|
25291
|
+
"type": "TableSortDirection",
|
|
25292
|
+
"required": false,
|
|
25293
|
+
"description": "Current sort direction when this column is sorted."
|
|
25294
|
+
},
|
|
25295
|
+
{
|
|
25296
|
+
"name": "className",
|
|
25297
|
+
"type": "string",
|
|
25298
|
+
"required": false
|
|
25165
25299
|
}
|
|
25166
25300
|
]
|
|
25167
25301
|
}
|
|
@@ -32836,7 +32970,7 @@
|
|
|
32836
32970
|
"exportName": "Dialog",
|
|
32837
32971
|
"importPath": "@nocoo/basalt/components/dialog",
|
|
32838
32972
|
"sourceFile": "packages/basalt/src/components/dialog.tsx",
|
|
32839
|
-
"sourceHash": "
|
|
32973
|
+
"sourceHash": "1190ff90dc8df750",
|
|
32840
32974
|
"rootAvailable": true,
|
|
32841
32975
|
"maturity": "ready",
|
|
32842
32976
|
"packageDoc": "ai/registry.json#dialog",
|
|
@@ -33039,7 +33173,7 @@
|
|
|
33039
33173
|
"exportName": "AlertDialog",
|
|
33040
33174
|
"importPath": "@nocoo/basalt/components/alert-dialog",
|
|
33041
33175
|
"sourceFile": "packages/basalt/src/components/alert-dialog.tsx",
|
|
33042
|
-
"sourceHash": "
|
|
33176
|
+
"sourceHash": "6893fc30686191ed",
|
|
33043
33177
|
"rootAvailable": true,
|
|
33044
33178
|
"maturity": "ready",
|
|
33045
33179
|
"packageDoc": "ai/registry.json#alert-dialog",
|
|
@@ -34831,7 +34965,7 @@
|
|
|
34831
34965
|
"exportName": "Table",
|
|
34832
34966
|
"importPath": "@nocoo/basalt/components/table",
|
|
34833
34967
|
"sourceFile": "packages/basalt/src/components/table.tsx",
|
|
34834
|
-
"sourceHash": "
|
|
34968
|
+
"sourceHash": "0633208cec31bc1d",
|
|
34835
34969
|
"rootAvailable": false,
|
|
34836
34970
|
"maturity": "ready",
|
|
34837
34971
|
"packageDoc": "ai/registry.json#table",
|
|
@@ -34896,6 +35030,12 @@
|
|
|
34896
35030
|
"type": "string",
|
|
34897
35031
|
"required": false,
|
|
34898
35032
|
"description": "Additional classes for the header cell."
|
|
35033
|
+
},
|
|
35034
|
+
{
|
|
35035
|
+
"name": "textAlign",
|
|
35036
|
+
"type": "TableTextAlign",
|
|
35037
|
+
"required": false,
|
|
35038
|
+
"description": "Logical inline alignment. Omitted headers keep `text-start` unless native `align` is set."
|
|
34899
35039
|
}
|
|
34900
35040
|
]
|
|
34901
35041
|
},
|
|
@@ -34907,6 +35047,40 @@
|
|
|
34907
35047
|
"type": "string",
|
|
34908
35048
|
"required": false,
|
|
34909
35049
|
"description": "Additional classes for the cell."
|
|
35050
|
+
},
|
|
35051
|
+
{
|
|
35052
|
+
"name": "textAlign",
|
|
35053
|
+
"type": "TableTextAlign",
|
|
35054
|
+
"required": false,
|
|
35055
|
+
"description": "Logical inline alignment. Omitted cells inherit from the table or row. Native HTML `align` is unchanged."
|
|
35056
|
+
}
|
|
35057
|
+
]
|
|
35058
|
+
},
|
|
35059
|
+
{
|
|
35060
|
+
"name": "TableSortableHeader",
|
|
35061
|
+
"props": [
|
|
35062
|
+
{
|
|
35063
|
+
"name": "children",
|
|
35064
|
+
"type": "React.ReactNode",
|
|
35065
|
+
"required": true
|
|
35066
|
+
},
|
|
35067
|
+
{
|
|
35068
|
+
"name": "textAlign",
|
|
35069
|
+
"type": "TableTextAlign",
|
|
35070
|
+
"required": false,
|
|
35071
|
+
"default": "\"start\"",
|
|
35072
|
+
"description": "Logical control layout. `end` places the sort icon inward of the label."
|
|
35073
|
+
},
|
|
35074
|
+
{
|
|
35075
|
+
"name": "sorted",
|
|
35076
|
+
"type": "TableSortDirection",
|
|
35077
|
+
"required": false,
|
|
35078
|
+
"description": "Current sort direction when this column is sorted."
|
|
35079
|
+
},
|
|
35080
|
+
{
|
|
35081
|
+
"name": "className",
|
|
35082
|
+
"type": "string",
|
|
35083
|
+
"required": false
|
|
34910
35084
|
}
|
|
34911
35085
|
]
|
|
34912
35086
|
}
|
|
@@ -34918,7 +35092,7 @@
|
|
|
34918
35092
|
"exportName": "DataTable",
|
|
34919
35093
|
"importPath": "@nocoo/basalt/components/data-table",
|
|
34920
35094
|
"sourceFile": "packages/basalt/src/components/data-table.tsx",
|
|
34921
|
-
"sourceHash": "
|
|
35095
|
+
"sourceHash": "cf4d04c79f9bcff5",
|
|
34922
35096
|
"rootAvailable": false,
|
|
34923
35097
|
"maturity": "ready",
|
|
34924
35098
|
"packageDoc": "ai/registry.json#data-table",
|
|
@@ -35112,6 +35286,13 @@
|
|
|
35112
35286
|
"type": "string",
|
|
35113
35287
|
"required": false,
|
|
35114
35288
|
"description": "ID of additional table instructions or summary."
|
|
35289
|
+
},
|
|
35290
|
+
{
|
|
35291
|
+
"name": "edge",
|
|
35292
|
+
"type": "DataTableEdge",
|
|
35293
|
+
"required": false,
|
|
35294
|
+
"default": "\"inset\"",
|
|
35295
|
+
"description": "Direct-card rails on the first and last display columns."
|
|
35115
35296
|
}
|
|
35116
35297
|
]
|
|
35117
35298
|
}
|
|
@@ -35931,7 +36112,7 @@
|
|
|
35931
36112
|
"exportName": "Sidebar",
|
|
35932
36113
|
"importPath": "@nocoo/basalt/components/sidebar",
|
|
35933
36114
|
"sourceFile": "packages/basalt/src/components/sidebar.tsx",
|
|
35934
|
-
"sourceHash": "
|
|
36115
|
+
"sourceHash": "9f68a198780ffd4a",
|
|
35935
36116
|
"rootAvailable": true,
|
|
35936
36117
|
"maturity": "ready",
|
|
35937
36118
|
"packageDoc": "ai/registry.json#sidebar",
|
|
@@ -38280,7 +38461,7 @@
|
|
|
38280
38461
|
"exportName": "DiffTable",
|
|
38281
38462
|
"importPath": "@nocoo/basalt/components/diff-table",
|
|
38282
38463
|
"sourceFile": "packages/basalt/src/components/diff-table.tsx",
|
|
38283
|
-
"sourceHash": "
|
|
38464
|
+
"sourceHash": "f5dc2b0dbcc625d4",
|
|
38284
38465
|
"rootAvailable": false,
|
|
38285
38466
|
"maturity": "ready",
|
|
38286
38467
|
"packageDoc": "ai/registry.json#diff-table",
|
|
@@ -27,7 +27,7 @@ var f = a.forwardRef(({ className: e, size: t = "base", ...n }, a) => /* @__PURE
|
|
|
27
27
|
f.displayName = i.Content.displayName;
|
|
28
28
|
var p = a.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ o(i.Title, {
|
|
29
29
|
ref: r,
|
|
30
|
-
className: e("text-basalt-3xl font-semibold tracking-tight", t),
|
|
30
|
+
className: e("min-w-0 text-basalt-3xl font-semibold tracking-tight wrap-anywhere", t),
|
|
31
31
|
...n
|
|
32
32
|
}));
|
|
33
33
|
p.displayName = i.Title.displayName;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive","React","AlertDialog","AlertDialogTrigger","AlertDialogPortal","AlertDialogOverlay","props","dialogOverlayClass","className","AlertDialogContent","dialogPanelClass","AlertDialogTitle","cn","AlertDialogDescription","AlertDialogCancel","buttonVariants","AlertDialogAction","AlertDialogHeader","AlertDialogFooter"],"sources":["../../src/components/alert-dialog.tsx"],"sourcesContent":["import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { buttonVariants } from \"./button\";\nimport { type DialogSize, dialogOverlayClass, dialogPanelClass } from \"./dialog\";\n\ntype RadixAlertDialogProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root>;\ntype RadixAlertDialogTriggerProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Trigger\n>;\ntype RadixAlertDialogPortalProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Portal\n>;\ntype RadixAlertDialogOverlayProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Overlay\n>;\ntype RadixAlertDialogContentProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Content\n>;\ntype RadixAlertDialogTitleProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>;\ntype RadixAlertDialogDescriptionProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Description\n>;\ntype RadixAlertDialogActionProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Action\n>;\ntype RadixAlertDialogCancelProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Cancel\n>;\n\nexport interface AlertDialogProps\n\textends Omit<RadixAlertDialogProps, \"open\" | \"defaultOpen\" | \"onOpenChange\"> {\n\t/**\n\t * Controlled open state of the alert dialog.\n\t */\n\topen?: RadixAlertDialogProps[\"open\"];\n\t/**\n\t * Uncontrolled default open state of the alert dialog on initial render.\n\t * @default false\n\t */\n\tdefaultOpen?: RadixAlertDialogProps[\"defaultOpen\"];\n\t/**\n\t * Callback invoked when the open state changes.\n\t */\n\tonOpenChange?: RadixAlertDialogProps[\"onOpenChange\"];\n}\n\nexport const AlertDialog: React.FC<AlertDialogProps> = AlertDialogPrimitive.Root;\n\nexport interface AlertDialogTriggerProps extends Omit<RadixAlertDialogTriggerProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * Trigger forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogTriggerProps[\"asChild\"];\n}\n\nexport const AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nexport interface AlertDialogPortalProps\n\textends Omit<RadixAlertDialogPortalProps, \"container\" | \"forceMount\"> {\n\t/**\n\t * Target container element where the alert dialog overlay and content portal should mount.\n\t */\n\tcontainer?: RadixAlertDialogPortalProps[\"container\"];\n\t/**\n\t * Used to force mounting when controlling transition animations externally.\n\t */\n\tforceMount?: RadixAlertDialogPortalProps[\"forceMount\"];\n}\n\nexport const AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nexport interface AlertDialogOverlayProps\n\textends Omit<RadixAlertDialogOverlayProps, \"asChild\" | \"forceMount\"> {\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Overlay forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogOverlayProps[\"asChild\"];\n\t/**\n\t * Used to force mounting when controlling transition animations externally.\n\t */\n\tforceMount?: RadixAlertDialogOverlayProps[\"forceMount\"];\n}\n\nexport const AlertDialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tAlertDialogOverlayProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay ref={ref} className={dialogOverlayClass(className)} {...props} />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nexport interface AlertDialogContentProps\n\textends Omit<\n\t\tRadixAlertDialogContentProps,\n\t\t| \"size\"\n\t\t| \"asChild\"\n\t\t| \"forceMount\"\n\t\t| \"trapFocus\"\n\t\t| \"onOpenAutoFocus\"\n\t\t| \"onCloseAutoFocus\"\n\t\t| \"onEscapeKeyDown\"\n\t> {\n\t/**\n\t * Fixed desktop width preset, shared with Dialog. Content scrolls vertically when overflowing available height.\n\t * @default \"base\"\n\t */\n\tsize?: DialogSize;\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Content forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogContentProps[\"asChild\"];\n\t/**\n\t * Force mounting content in DOM for external animation controls.\n\t * When forceMount is true, the content remains mounted even when closed.\n\t * The caller is responsible for visibility transitions and unmounting after animation completes.\n\t * Note: Keeping modal content forceMounted may isolate background interactions until unmounted.\n\t */\n\tforceMount?: RadixAlertDialogContentProps[\"forceMount\"];\n\t/**\n\t * Event handler called when auto-focusing on open. Defaults to focusing the cancel button. Can be prevented with event.preventDefault().\n\t */\n\tonOpenAutoFocus?: RadixAlertDialogContentProps[\"onOpenAutoFocus\"];\n\t/**\n\t * Event handler called when restoring focus on close. Can be prevented with event.preventDefault().\n\t */\n\tonCloseAutoFocus?: RadixAlertDialogContentProps[\"onCloseAutoFocus\"];\n\t/**\n\t * Event handler called when the Escape key is pressed. Can be prevented with event.preventDefault().\n\t */\n\tonEscapeKeyDown?: RadixAlertDialogContentProps[\"onEscapeKeyDown\"];\n}\n\nexport const AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\n\tAlertDialogContentProps\n>(({ className, size = \"base\", ...props }, ref) => (\n\t<AlertDialogPortal forceMount={props.forceMount}>\n\t\t<AlertDialogOverlay forceMount={props.forceMount} />\n\t\t<AlertDialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tdata-basalt-surface-root=\"\"\n\t\t\tclassName={dialogPanelClass({ size, className })}\n\t\t\t{...props}\n\t\t/>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nexport interface AlertDialogTitleProps extends Omit<RadixAlertDialogTitleProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered heading element to the child element, merging props and behavior.\n\t * Title forwards ref to HTMLHeadingElement and inherits native h2 attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogTitleProps[\"asChild\"];\n}\n\nexport const AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Title>,\n\tAlertDialogTitleProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"text-basalt-3xl font-semibold tracking-tight\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nexport interface AlertDialogDescriptionProps\n\textends Omit<RadixAlertDialogDescriptionProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered paragraph element to the child element, merging props and behavior.\n\t * Description forwards ref to HTMLParagraphElement and inherits native p attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogDescriptionProps[\"asChild\"];\n}\n\nexport const AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\n\tAlertDialogDescriptionProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-basalt-lg text-basalt-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nexport interface AlertDialogCancelProps extends Omit<RadixAlertDialogCancelProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * Cancel forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogCancelProps[\"asChild\"];\n}\n\nexport const AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n\tAlertDialogCancelProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Cancel\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport interface AlertDialogActionProps extends Omit<RadixAlertDialogActionProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * Action forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogActionProps[\"asChild\"];\n}\n\nexport const AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\n\tAlertDialogActionProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Action\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants({ variant: \"destructive\" }), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nexport interface AlertDialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AlertDialogHeader = ({ className, ...props }: AlertDialogHeaderProps) => (\n\t<div className={cn(\"flex flex-col space-y-basalt-space-lg text-left\", className)} {...props} />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nexport interface AlertDialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AlertDialogFooter = ({ className, ...props }: AlertDialogFooterProps) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"mt-basalt-space-lg flex flex-col-reverse gap-basalt-space-lg sm:flex-row sm:justify-end\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n"],"mappings":";;;;;;;;AA+CA,IAAaE,IAA0CF,EAAqB,MAW/DG,IAAqBH,EAAqB,SAc1CI,IAAoBJ,EAAqB,QAgBzCK,IAAqBJ,EAAM,YAGrC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,SAAtB;CAAmC;CAAK,WAAWO,EAAmBC,CAAS;CAAG,GAAIF;AAAQ,CAAA,CAC9F;AACD,EAAmB,cAAcN,EAAqB,QAAQ;AA6C9D,IAAaS,IAAqBR,EAAM,YAGrC,EAAE,cAAW,UAAO,QAAQ,GAAGK,KAAS,MAC1C,kBAACF,GAAD;CAAmB,YAAYE,EAAM;CAArC,UAAA,CACC,kBAACD,GAAD,EAAoB,YAAYC,EAAM,WAAa,CAAA,GACnD,kBAACN,EAAqB,SAAtB;EACM;EACL,4BAAyB;EACzB,WAAWU,EAAiB;GAAE;GAAM;EAAU,CAAC;EAC/C,GAAIJ;CACJ,CAAA,CACiB;AACnB,CAAA,CAAA;AACD,EAAmB,cAAcN,EAAqB,QAAQ;AAW9D,IAAaW,IAAmBV,EAAM,YAGnC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,OAAtB;CACM;CACL,WAAWY,EAAG,gDAAgDJ,CAAS;CACvE,GAAIF;AACJ,CAAA,CACD;AACD,EAAiB,cAAcN,EAAqB,MAAM;AAY1D,IAAaa,IAAyBZ,EAAM,YAGzC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,aAAtB;CACM;CACL,WAAWY,EAAG,+CAA+CJ,CAAS;CACtE,GAAIF;AACJ,CAAA,CACD;AACD,EAAuB,cAAcN,EAAqB,YAAY;AAWtE,IAAac,IAAoBb,EAAM,YAGpC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,QAAtB;CACM;CACL,WAAWY,EAAGG,EAAe,EAAE,SAAS,UAAU,CAAC,GAAGP,CAAS;CAC/D,GAAIF;AACJ,CAAA,CACD;AACD,EAAkB,cAAcN,EAAqB,OAAO;AAW5D,IAAagB,IAAoBf,EAAM,YAGpC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,QAAtB;CACM;CACL,WAAWY,EAAGG,EAAe,EAAE,SAAS,cAAc,CAAC,GAAGP,CAAS;CACnE,GAAIF;AACJ,CAAA,CACD;AACD,EAAkB,cAAcN,EAAqB,OAAO;AAI5D,IAAaiB,KAAqB,EAAE,cAAW,GAAGX,QACjD,kBAAC,OAAD;CAAK,WAAWM,EAAG,mDAAmDJ,CAAS;CAAG,GAAIF;AAAQ,CAAA;AAE/F,EAAkB,cAAc;AAIhC,IAAaY,KAAqB,EAAE,cAAW,GAAGZ,QACjD,kBAAC,OAAD;CACC,WAAWM,EACV,2FACAJ,CACD;CACA,GAAIF;AACJ,CAAA;AAEF,EAAkB,cAAc"}
|
|
1
|
+
{"version":3,"file":"alert-dialog.js","names":["AlertDialogPrimitive","React","AlertDialog","AlertDialogTrigger","AlertDialogPortal","AlertDialogOverlay","props","dialogOverlayClass","className","AlertDialogContent","dialogPanelClass","AlertDialogTitle","cn","AlertDialogDescription","AlertDialogCancel","buttonVariants","AlertDialogAction","AlertDialogHeader","AlertDialogFooter"],"sources":["../../src/components/alert-dialog.tsx"],"sourcesContent":["import * as AlertDialogPrimitive from \"@radix-ui/react-alert-dialog\";\nimport * as React from \"react\";\nimport { cn } from \"../utils/cn\";\nimport { buttonVariants } from \"./button\";\nimport { type DialogSize, dialogOverlayClass, dialogPanelClass } from \"./dialog\";\n\ntype RadixAlertDialogProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Root>;\ntype RadixAlertDialogTriggerProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Trigger\n>;\ntype RadixAlertDialogPortalProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Portal\n>;\ntype RadixAlertDialogOverlayProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Overlay\n>;\ntype RadixAlertDialogContentProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Content\n>;\ntype RadixAlertDialogTitleProps = React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Title>;\ntype RadixAlertDialogDescriptionProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Description\n>;\ntype RadixAlertDialogActionProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Action\n>;\ntype RadixAlertDialogCancelProps = React.ComponentPropsWithoutRef<\n\ttypeof AlertDialogPrimitive.Cancel\n>;\n\nexport interface AlertDialogProps\n\textends Omit<RadixAlertDialogProps, \"open\" | \"defaultOpen\" | \"onOpenChange\"> {\n\t/**\n\t * Controlled open state of the alert dialog.\n\t */\n\topen?: RadixAlertDialogProps[\"open\"];\n\t/**\n\t * Uncontrolled default open state of the alert dialog on initial render.\n\t * @default false\n\t */\n\tdefaultOpen?: RadixAlertDialogProps[\"defaultOpen\"];\n\t/**\n\t * Callback invoked when the open state changes.\n\t */\n\tonOpenChange?: RadixAlertDialogProps[\"onOpenChange\"];\n}\n\nexport const AlertDialog: React.FC<AlertDialogProps> = AlertDialogPrimitive.Root;\n\nexport interface AlertDialogTriggerProps extends Omit<RadixAlertDialogTriggerProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * Trigger forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogTriggerProps[\"asChild\"];\n}\n\nexport const AlertDialogTrigger = AlertDialogPrimitive.Trigger;\n\nexport interface AlertDialogPortalProps\n\textends Omit<RadixAlertDialogPortalProps, \"container\" | \"forceMount\"> {\n\t/**\n\t * Target container element where the alert dialog overlay and content portal should mount.\n\t */\n\tcontainer?: RadixAlertDialogPortalProps[\"container\"];\n\t/**\n\t * Used to force mounting when controlling transition animations externally.\n\t */\n\tforceMount?: RadixAlertDialogPortalProps[\"forceMount\"];\n}\n\nexport const AlertDialogPortal = AlertDialogPrimitive.Portal;\n\nexport interface AlertDialogOverlayProps\n\textends Omit<RadixAlertDialogOverlayProps, \"asChild\" | \"forceMount\"> {\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Overlay forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogOverlayProps[\"asChild\"];\n\t/**\n\t * Used to force mounting when controlling transition animations externally.\n\t */\n\tforceMount?: RadixAlertDialogOverlayProps[\"forceMount\"];\n}\n\nexport const AlertDialogOverlay = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Overlay>,\n\tAlertDialogOverlayProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Overlay ref={ref} className={dialogOverlayClass(className)} {...props} />\n));\nAlertDialogOverlay.displayName = AlertDialogPrimitive.Overlay.displayName;\n\nexport interface AlertDialogContentProps\n\textends Omit<\n\t\tRadixAlertDialogContentProps,\n\t\t| \"size\"\n\t\t| \"asChild\"\n\t\t| \"forceMount\"\n\t\t| \"trapFocus\"\n\t\t| \"onOpenAutoFocus\"\n\t\t| \"onCloseAutoFocus\"\n\t\t| \"onEscapeKeyDown\"\n\t> {\n\t/**\n\t * Fixed desktop width preset, shared with Dialog. Content scrolls vertically when overflowing available height.\n\t * @default \"base\"\n\t */\n\tsize?: DialogSize;\n\t/**\n\t * Change the default rendered div element to the child element, merging props and behavior.\n\t * Content forwards ref to HTMLDivElement and inherits native div attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogContentProps[\"asChild\"];\n\t/**\n\t * Force mounting content in DOM for external animation controls.\n\t * When forceMount is true, the content remains mounted even when closed.\n\t * The caller is responsible for visibility transitions and unmounting after animation completes.\n\t * Note: Keeping modal content forceMounted may isolate background interactions until unmounted.\n\t */\n\tforceMount?: RadixAlertDialogContentProps[\"forceMount\"];\n\t/**\n\t * Event handler called when auto-focusing on open. Defaults to focusing the cancel button. Can be prevented with event.preventDefault().\n\t */\n\tonOpenAutoFocus?: RadixAlertDialogContentProps[\"onOpenAutoFocus\"];\n\t/**\n\t * Event handler called when restoring focus on close. Can be prevented with event.preventDefault().\n\t */\n\tonCloseAutoFocus?: RadixAlertDialogContentProps[\"onCloseAutoFocus\"];\n\t/**\n\t * Event handler called when the Escape key is pressed. Can be prevented with event.preventDefault().\n\t */\n\tonEscapeKeyDown?: RadixAlertDialogContentProps[\"onEscapeKeyDown\"];\n}\n\nexport const AlertDialogContent = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Content>,\n\tAlertDialogContentProps\n>(({ className, size = \"base\", ...props }, ref) => (\n\t<AlertDialogPortal forceMount={props.forceMount}>\n\t\t<AlertDialogOverlay forceMount={props.forceMount} />\n\t\t<AlertDialogPrimitive.Content\n\t\t\tref={ref}\n\t\t\tdata-basalt-surface-root=\"\"\n\t\t\tclassName={dialogPanelClass({ size, className })}\n\t\t\t{...props}\n\t\t/>\n\t</AlertDialogPortal>\n));\nAlertDialogContent.displayName = AlertDialogPrimitive.Content.displayName;\n\nexport interface AlertDialogTitleProps extends Omit<RadixAlertDialogTitleProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered heading element to the child element, merging props and behavior.\n\t * Title forwards ref to HTMLHeadingElement and inherits native h2 attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogTitleProps[\"asChild\"];\n}\n\nexport const AlertDialogTitle = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Title>,\n\tAlertDialogTitleProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Title\n\t\tref={ref}\n\t\tclassName={cn(\"min-w-0 text-basalt-3xl font-semibold tracking-tight wrap-anywhere\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogTitle.displayName = AlertDialogPrimitive.Title.displayName;\n\nexport interface AlertDialogDescriptionProps\n\textends Omit<RadixAlertDialogDescriptionProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered paragraph element to the child element, merging props and behavior.\n\t * Description forwards ref to HTMLParagraphElement and inherits native p attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogDescriptionProps[\"asChild\"];\n}\n\nexport const AlertDialogDescription = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Description>,\n\tAlertDialogDescriptionProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Description\n\t\tref={ref}\n\t\tclassName={cn(\"text-basalt-lg text-basalt-muted-foreground\", className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogDescription.displayName = AlertDialogPrimitive.Description.displayName;\n\nexport interface AlertDialogCancelProps extends Omit<RadixAlertDialogCancelProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * Cancel forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogCancelProps[\"asChild\"];\n}\n\nexport const AlertDialogCancel = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Cancel>,\n\tAlertDialogCancelProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Cancel\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants({ variant: \"outline\" }), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogCancel.displayName = AlertDialogPrimitive.Cancel.displayName;\n\nexport interface AlertDialogActionProps extends Omit<RadixAlertDialogActionProps, \"asChild\"> {\n\t/**\n\t * Change the default rendered button element to the child element, merging props and behavior.\n\t * Action forwards ref to HTMLButtonElement and inherits native button attributes.\n\t * @default false\n\t */\n\tasChild?: RadixAlertDialogActionProps[\"asChild\"];\n}\n\nexport const AlertDialogAction = React.forwardRef<\n\tReact.ElementRef<typeof AlertDialogPrimitive.Action>,\n\tAlertDialogActionProps\n>(({ className, ...props }, ref) => (\n\t<AlertDialogPrimitive.Action\n\t\tref={ref}\n\t\tclassName={cn(buttonVariants({ variant: \"destructive\" }), className)}\n\t\t{...props}\n\t/>\n));\nAlertDialogAction.displayName = AlertDialogPrimitive.Action.displayName;\n\nexport interface AlertDialogHeaderProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AlertDialogHeader = ({ className, ...props }: AlertDialogHeaderProps) => (\n\t<div className={cn(\"flex flex-col space-y-basalt-space-lg text-left\", className)} {...props} />\n);\nAlertDialogHeader.displayName = \"AlertDialogHeader\";\n\nexport interface AlertDialogFooterProps extends React.HTMLAttributes<HTMLDivElement> {}\n\nexport const AlertDialogFooter = ({ className, ...props }: AlertDialogFooterProps) => (\n\t<div\n\t\tclassName={cn(\n\t\t\t\"mt-basalt-space-lg flex flex-col-reverse gap-basalt-space-lg sm:flex-row sm:justify-end\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n);\nAlertDialogFooter.displayName = \"AlertDialogFooter\";\n"],"mappings":";;;;;;;;AA+CA,IAAaE,IAA0CF,EAAqB,MAW/DG,IAAqBH,EAAqB,SAc1CI,IAAoBJ,EAAqB,QAgBzCK,IAAqBJ,EAAM,YAGrC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,SAAtB;CAAmC;CAAK,WAAWO,EAAmBC,CAAS;CAAG,GAAIF;AAAQ,CAAA,CAC9F;AACD,EAAmB,cAAcN,EAAqB,QAAQ;AA6C9D,IAAaS,IAAqBR,EAAM,YAGrC,EAAE,cAAW,UAAO,QAAQ,GAAGK,KAAS,MAC1C,kBAACF,GAAD;CAAmB,YAAYE,EAAM;CAArC,UAAA,CACC,kBAACD,GAAD,EAAoB,YAAYC,EAAM,WAAa,CAAA,GACnD,kBAACN,EAAqB,SAAtB;EACM;EACL,4BAAyB;EACzB,WAAWU,EAAiB;GAAE;GAAM;EAAU,CAAC;EAC/C,GAAIJ;CACJ,CAAA,CACiB;AACnB,CAAA,CAAA;AACD,EAAmB,cAAcN,EAAqB,QAAQ;AAW9D,IAAaW,IAAmBV,EAAM,YAGnC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,OAAtB;CACM;CACL,WAAWY,EAAG,sEAAsEJ,CAAS;CAC7F,GAAIF;AACJ,CAAA,CACD;AACD,EAAiB,cAAcN,EAAqB,MAAM;AAY1D,IAAaa,IAAyBZ,EAAM,YAGzC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,aAAtB;CACM;CACL,WAAWY,EAAG,+CAA+CJ,CAAS;CACtE,GAAIF;AACJ,CAAA,CACD;AACD,EAAuB,cAAcN,EAAqB,YAAY;AAWtE,IAAac,IAAoBb,EAAM,YAGpC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,QAAtB;CACM;CACL,WAAWY,EAAGG,EAAe,EAAE,SAAS,UAAU,CAAC,GAAGP,CAAS;CAC/D,GAAIF;AACJ,CAAA,CACD;AACD,EAAkB,cAAcN,EAAqB,OAAO;AAW5D,IAAagB,IAAoBf,EAAM,YAGpC,EAAE,cAAW,GAAGK,KAAS,MAC3B,kBAACN,EAAqB,QAAtB;CACM;CACL,WAAWY,EAAGG,EAAe,EAAE,SAAS,cAAc,CAAC,GAAGP,CAAS;CACnE,GAAIF;AACJ,CAAA,CACD;AACD,EAAkB,cAAcN,EAAqB,OAAO;AAI5D,IAAaiB,KAAqB,EAAE,cAAW,GAAGX,QACjD,kBAAC,OAAD;CAAK,WAAWM,EAAG,mDAAmDJ,CAAS;CAAG,GAAIF;AAAQ,CAAA;AAE/F,EAAkB,cAAc;AAIhC,IAAaY,KAAqB,EAAE,cAAW,GAAGZ,QACjD,kBAAC,OAAD;CACC,WAAWM,EACV,2FACAJ,CACD;CACA,GAAIF;AACJ,CAAA;AAEF,EAAkB,cAAc"}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { type CSSProperties, type ReactNode } from "react";
|
|
2
|
+
import { type TableTextAlign } from "./table.js";
|
|
3
|
+
export type DataTableEdge = "inset" | "attached";
|
|
2
4
|
export type DataTableColumn<T> = {
|
|
3
5
|
id: string;
|
|
4
6
|
header: string;
|
|
@@ -17,6 +19,8 @@ export type DataTableColumn<T> = {
|
|
|
17
19
|
headerClassName?: string;
|
|
18
20
|
/** Classes applied to each data cell. */
|
|
19
21
|
cellClassName?: string;
|
|
22
|
+
/** Logical header and cell alignment. Omitted cells inherit from the table. */
|
|
23
|
+
textAlign?: TableTextAlign;
|
|
20
24
|
};
|
|
21
25
|
export type DataTableSort = {
|
|
22
26
|
id: string;
|
|
@@ -116,5 +120,7 @@ export type DataTableProps<T = unknown> = {
|
|
|
116
120
|
"aria-label"?: string;
|
|
117
121
|
/** ID of additional table instructions or summary. */
|
|
118
122
|
"aria-describedby"?: string;
|
|
123
|
+
/** Direct-card rails on the first and last display columns. @default "inset" */
|
|
124
|
+
edge?: DataTableEdge;
|
|
119
125
|
};
|
|
120
|
-
export declare function DataTable<T>({ data, columns, filter, loading, empty, selected, defaultSelected, onSelectedChange, multiple, page, defaultPage, pageSize, onPageChange, getRowId, className, maxHeight, rowNumbers, sort: controlledSort, defaultSort, onSortChange, manualSorting, manualPagination, manualFiltering, total, error, onRetry, retryLabel, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, }: DataTableProps<T>): import("react").JSX.Element;
|
|
126
|
+
export declare function DataTable<T>({ data, columns, filter, loading, empty, selected, defaultSelected, onSelectedChange, multiple, page, defaultPage, pageSize, onPageChange, getRowId, className, maxHeight, rowNumbers, sort: controlledSort, defaultSort, onSortChange, manualSorting, manualPagination, manualFiltering, total, error, onRetry, retryLabel, "aria-label": ariaLabel, "aria-describedby": ariaDescribedBy, edge, }: DataTableProps<T>): import("react").JSX.Element;
|