@primitiv-ui/web 0.1.54 → 0.1.56

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.
@@ -886,42 +886,779 @@
886
886
  }
887
887
  ]
888
888
  },
889
+ {
890
+ "kind": "javascript-module",
891
+ "path": "src/popover/elements.ts",
892
+ "declarations": [
893
+ {
894
+ "kind": "class",
895
+ "description": "`<primitiv-popover>` — the state owner of a non-modal popover: a trigger\nthat opens a floating panel, built on the native Popover API. The browser\nputs the panel in the top layer and light-dismisses it; the element adds the\nrest of the WAI-ARIA non-modal dialog pattern — focus moves into the panel\nas it opens, Escape closes it and hands focus back to the trigger, and the\ntrigger's `aria-expanded` follows it.\n\nThe panel is shown with its trigger (or the anchor) as its source, which\nmakes that element the panel's implicit anchor, so CSS anchor positioning\n(`position-area`) places it with no `anchor-name` to wire.\n\nThe root finds its own parts, so a popover nested in a panel keeps its own,\nand reconciles their ARIA from its reflected state whenever a part arrives,\nleaves, or changes an attribute the root reads (the lifecycle is\n`PrimitivRootElement`'s).",
896
+ "name": "PrimitivPopoverElement",
897
+ "members": [
898
+ {
899
+ "kind": "field",
900
+ "name": "#content",
901
+ "privacy": "private",
902
+ "type": {
903
+ "text": "HTMLElement | null"
904
+ },
905
+ "default": "null",
906
+ "description": "The panel the root currently decorates, and the controller over it."
907
+ },
908
+ {
909
+ "kind": "field",
910
+ "name": "#popover",
911
+ "privacy": "private",
912
+ "type": {
913
+ "text": "PopoverController | null"
914
+ },
915
+ "default": "null"
916
+ },
917
+ {
918
+ "kind": "field",
919
+ "name": "#trigger",
920
+ "privacy": "private",
921
+ "type": {
922
+ "text": "HTMLElement | null"
923
+ },
924
+ "default": "null",
925
+ "description": "The decorated trigger and close buttons, and the anchor, as of the last reconcile."
926
+ },
927
+ {
928
+ "kind": "field",
929
+ "name": "#anchor",
930
+ "privacy": "private",
931
+ "type": {
932
+ "text": "HTMLElement | null"
933
+ },
934
+ "default": "null"
935
+ },
936
+ {
937
+ "kind": "field",
938
+ "name": "#closers",
939
+ "privacy": "private",
940
+ "type": {
941
+ "text": "HTMLElement[]"
942
+ },
943
+ "default": "[]"
944
+ },
945
+ {
946
+ "kind": "field",
947
+ "name": "#listening",
948
+ "privacy": "private",
949
+ "type": {
950
+ "text": "AbortController | null"
951
+ },
952
+ "default": "null",
953
+ "description": "The root's own click listener, while connected."
954
+ },
955
+ {
956
+ "kind": "field",
957
+ "name": "controller",
958
+ "type": {
959
+ "text": "{ connect(): void; disconnect(): void }"
960
+ },
961
+ "privacy": "protected",
962
+ "readonly": true,
963
+ "default": "{ connect: (): void => this.#connect(), disconnect: (): void => this.#disconnect(), }"
964
+ },
965
+ {
966
+ "kind": "field",
967
+ "name": "reconcileOn",
968
+ "type": {
969
+ "text": "readonly string[]"
970
+ },
971
+ "privacy": "protected",
972
+ "readonly": true,
973
+ "default": "[\"open\"]"
974
+ },
975
+ {
976
+ "kind": "field",
977
+ "name": "open",
978
+ "type": {
979
+ "text": "boolean"
980
+ },
981
+ "description": "Whether the panel is open, reflected as the boolean `open` attribute."
982
+ },
983
+ {
984
+ "kind": "method",
985
+ "name": "#host",
986
+ "privacy": "private",
987
+ "return": {
988
+ "type": {
989
+ "text": "PopoverControllerHost"
990
+ }
991
+ },
992
+ "description": "The controller's view of this element: state lives in the reflected attribute."
993
+ },
994
+ {
995
+ "kind": "method",
996
+ "name": "#change",
997
+ "privacy": "private",
998
+ "return": {
999
+ "type": {
1000
+ "text": "void"
1001
+ }
1002
+ },
1003
+ "parameters": [
1004
+ {
1005
+ "name": "open",
1006
+ "type": {
1007
+ "text": "boolean"
1008
+ }
1009
+ }
1010
+ ],
1011
+ "description": "A change the user asked for: announced first, so a listener can veto it."
1012
+ },
1013
+ {
1014
+ "kind": "method",
1015
+ "name": "#connect",
1016
+ "privacy": "private",
1017
+ "return": {
1018
+ "type": {
1019
+ "text": "void"
1020
+ }
1021
+ }
1022
+ },
1023
+ {
1024
+ "kind": "method",
1025
+ "name": "#disconnect",
1026
+ "privacy": "private",
1027
+ "return": {
1028
+ "type": {
1029
+ "text": "void"
1030
+ }
1031
+ }
1032
+ },
1033
+ {
1034
+ "kind": "method",
1035
+ "name": "#click",
1036
+ "privacy": "private",
1037
+ "return": {
1038
+ "type": {
1039
+ "text": "void"
1040
+ }
1041
+ },
1042
+ "parameters": [
1043
+ {
1044
+ "name": "event",
1045
+ "type": {
1046
+ "text": "MouseEvent"
1047
+ }
1048
+ }
1049
+ ]
1050
+ },
1051
+ {
1052
+ "kind": "method",
1053
+ "name": "#use",
1054
+ "privacy": "private",
1055
+ "return": {
1056
+ "type": {
1057
+ "text": "void"
1058
+ }
1059
+ },
1060
+ "parameters": [
1061
+ {
1062
+ "name": "content",
1063
+ "type": {
1064
+ "text": "HTMLElement | null"
1065
+ }
1066
+ }
1067
+ ],
1068
+ "description": "Decorate `content` from now on: the controller follows it. Only a\nreconcile calls this, and a root reconciles only while connected, so the\nnew controller listens at once."
1069
+ },
1070
+ {
1071
+ "kind": "method",
1072
+ "name": "reconcile",
1073
+ "privacy": "protected",
1074
+ "return": {
1075
+ "type": {
1076
+ "text": "void"
1077
+ }
1078
+ }
1079
+ }
1080
+ ],
1081
+ "events": [
1082
+ {
1083
+ "type": {
1084
+ "text": "CustomEvent<{ open: boolean }>"
1085
+ },
1086
+ "description": "Bubbles, cancelable, fired before a user-driven change is applied — a trigger or close click, Escape, or a light dismiss — with the open state afterwards. Call `preventDefault()` to veto it.",
1087
+ "name": "primitiv-popover-change"
1088
+ }
1089
+ ],
1090
+ "attributes": [
1091
+ {
1092
+ "type": {
1093
+ "text": "boolean"
1094
+ },
1095
+ "description": "Whether the panel is open. Reflected: it changes as the user opens and dismisses it, so a server re-render or a history snapshot sees the live state. Set it (or the `open` property) to open or close the panel from script.",
1096
+ "name": "open"
1097
+ }
1098
+ ],
1099
+ "superclass": {
1100
+ "name": "PrimitivRootElement",
1101
+ "module": "/src/internal/RootElement.ts"
1102
+ },
1103
+ "tagName": "primitiv-popover",
1104
+ "customElement": true,
1105
+ "summary": "The state owner of a non-modal popover on the native Popover API."
1106
+ },
1107
+ {
1108
+ "kind": "class",
1109
+ "description": "`<primitiv-popover-trigger>` — an interactive part. It decorates exactly one\nchild the consumer writes, a `<button>`, which toggles the panel and receives\n`aria-haspopup=\"dialog\"`, `aria-expanded` and `aria-controls`, so the\nrendered DOM matches React's (RFC 0033 D24).",
1110
+ "name": "PrimitivPopoverTriggerElement",
1111
+ "superclass": {
1112
+ "name": "ElementBase",
1113
+ "module": "/src/internal/element.ts"
1114
+ },
1115
+ "tagName": "primitiv-popover-trigger",
1116
+ "customElement": true
1117
+ },
1118
+ {
1119
+ "kind": "class",
1120
+ "description": "`<primitiv-popover-anchor>` — optional. It decorates exactly one element the\nconsumer writes, which the panel is anchored to in place of the trigger: a\nfield, say, whose trigger is an icon inside it.",
1121
+ "name": "PrimitivPopoverAnchorElement",
1122
+ "superclass": {
1123
+ "name": "ElementBase",
1124
+ "module": "/src/internal/element.ts"
1125
+ },
1126
+ "tagName": "primitiv-popover-anchor",
1127
+ "customElement": true
1128
+ },
1129
+ {
1130
+ "kind": "class",
1131
+ "description": "`<primitiv-popover-content>` — the panel. Structural: the root gives it an\nid, `role=\"dialog\"`, `popover=\"auto\"` (write it in your markup too, so the\npanel is hidden before the script loads), `tabindex=\"-1\"`, `data-state`, and\n`aria-labelledby` / `aria-describedby` pointing at the title and description.",
1132
+ "name": "PrimitivPopoverContentElement",
1133
+ "superclass": {
1134
+ "name": "ElementBase",
1135
+ "module": "/src/internal/element.ts"
1136
+ },
1137
+ "tagName": "primitiv-popover-content",
1138
+ "customElement": true
1139
+ },
1140
+ {
1141
+ "kind": "class",
1142
+ "description": "`<primitiv-popover-title>` — decorates exactly one heading the consumer\nwrites, whose id becomes the panel's `aria-labelledby`.",
1143
+ "name": "PrimitivPopoverTitleElement",
1144
+ "superclass": {
1145
+ "name": "ElementBase",
1146
+ "module": "/src/internal/element.ts"
1147
+ },
1148
+ "tagName": "primitiv-popover-title",
1149
+ "customElement": true
1150
+ },
1151
+ {
1152
+ "kind": "class",
1153
+ "description": "`<primitiv-popover-description>` — decorates exactly one element the\nconsumer writes (a `<p>`, usually), whose id becomes the panel's\n`aria-describedby`.",
1154
+ "name": "PrimitivPopoverDescriptionElement",
1155
+ "superclass": {
1156
+ "name": "ElementBase",
1157
+ "module": "/src/internal/element.ts"
1158
+ },
1159
+ "tagName": "primitiv-popover-description",
1160
+ "customElement": true
1161
+ },
1162
+ {
1163
+ "kind": "class",
1164
+ "description": "`<primitiv-popover-close>` — an interactive part. It decorates exactly one\n`<button>` the consumer writes, which closes the panel. A popover may have\nseveral.",
1165
+ "name": "PrimitivPopoverCloseElement",
1166
+ "superclass": {
1167
+ "name": "ElementBase",
1168
+ "module": "/src/internal/element.ts"
1169
+ },
1170
+ "tagName": "primitiv-popover-close",
1171
+ "customElement": true
1172
+ },
1173
+ {
1174
+ "kind": "function",
1175
+ "name": "definePopover",
1176
+ "return": {
1177
+ "type": {
1178
+ "text": "void"
1179
+ }
1180
+ },
1181
+ "parameters": [
1182
+ {
1183
+ "name": "registry",
1184
+ "default": "globalThis.customElements",
1185
+ "type": {
1186
+ "text": "ElementRegistry | undefined"
1187
+ }
1188
+ }
1189
+ ],
1190
+ "description": "Define the seven Popover elements on `registry` (the global `customElements`\nby default). Safe to call more than once, and a no-op where there is no\nregistry (a server render)."
1191
+ }
1192
+ ],
1193
+ "exports": [
1194
+ {
1195
+ "kind": "js",
1196
+ "name": "ElementRegistry",
1197
+ "declaration": {
1198
+ "name": "ElementRegistry",
1199
+ "module": "src/popover/elements.ts"
1200
+ }
1201
+ },
1202
+ {
1203
+ "kind": "js",
1204
+ "name": "PrimitivPopoverElement",
1205
+ "declaration": {
1206
+ "name": "PrimitivPopoverElement",
1207
+ "module": "src/popover/elements.ts"
1208
+ }
1209
+ },
1210
+ {
1211
+ "kind": "js",
1212
+ "name": "PrimitivPopoverTriggerElement",
1213
+ "declaration": {
1214
+ "name": "PrimitivPopoverTriggerElement",
1215
+ "module": "src/popover/elements.ts"
1216
+ }
1217
+ },
1218
+ {
1219
+ "kind": "js",
1220
+ "name": "PrimitivPopoverAnchorElement",
1221
+ "declaration": {
1222
+ "name": "PrimitivPopoverAnchorElement",
1223
+ "module": "src/popover/elements.ts"
1224
+ }
1225
+ },
1226
+ {
1227
+ "kind": "js",
1228
+ "name": "PrimitivPopoverContentElement",
1229
+ "declaration": {
1230
+ "name": "PrimitivPopoverContentElement",
1231
+ "module": "src/popover/elements.ts"
1232
+ }
1233
+ },
1234
+ {
1235
+ "kind": "js",
1236
+ "name": "PrimitivPopoverTitleElement",
1237
+ "declaration": {
1238
+ "name": "PrimitivPopoverTitleElement",
1239
+ "module": "src/popover/elements.ts"
1240
+ }
1241
+ },
1242
+ {
1243
+ "kind": "js",
1244
+ "name": "PrimitivPopoverDescriptionElement",
1245
+ "declaration": {
1246
+ "name": "PrimitivPopoverDescriptionElement",
1247
+ "module": "src/popover/elements.ts"
1248
+ }
1249
+ },
1250
+ {
1251
+ "kind": "js",
1252
+ "name": "PrimitivPopoverCloseElement",
1253
+ "declaration": {
1254
+ "name": "PrimitivPopoverCloseElement",
1255
+ "module": "src/popover/elements.ts"
1256
+ }
1257
+ },
1258
+ {
1259
+ "kind": "js",
1260
+ "name": "definePopover",
1261
+ "declaration": {
1262
+ "name": "definePopover",
1263
+ "module": "src/popover/elements.ts"
1264
+ }
1265
+ }
1266
+ ]
1267
+ },
889
1268
  {
890
1269
  "kind": "javascript-module",
891
1270
  "path": "src/tabs/elements.ts",
892
1271
  "declarations": [
893
1272
  {
894
1273
  "kind": "class",
895
- "description": "`<primitiv-tabs>` — the state owner of a WAI-ARIA tab set.\n\nThe root finds its own parts, so a tab set nested in a panel keeps its own,\nand reconciles their ARIA from its reflected state whenever a part arrives,\nleaves, or changes an attribute the root reads (the lifecycle is\n`PrimitivRootElement`'s). `activation-mode` is read live at each key press,\nso a change to it needs no reconcile.",
896
- "name": "PrimitivTabsElement",
1274
+ "description": "`<primitiv-tabs>` — the state owner of a WAI-ARIA tab set.\n\nThe root finds its own parts, so a tab set nested in a panel keeps its own,\nand reconciles their ARIA from its reflected state whenever a part arrives,\nleaves, or changes an attribute the root reads (the lifecycle is\n`PrimitivRootElement`'s). `activation-mode` is read live at each key press,\nso a change to it needs no reconcile.",
1275
+ "name": "PrimitivTabsElement",
1276
+ "members": [
1277
+ {
1278
+ "kind": "field",
1279
+ "name": "#shown",
1280
+ "privacy": "private",
1281
+ "type": {
1282
+ "text": "string | undefined"
1283
+ },
1284
+ "description": "The value of the panel last shown, so a change fires primitiv-tabs-show."
1285
+ },
1286
+ {
1287
+ "kind": "field",
1288
+ "name": "#rendered",
1289
+ "privacy": "private",
1290
+ "type": {
1291
+ "text": "boolean"
1292
+ },
1293
+ "default": "false"
1294
+ },
1295
+ {
1296
+ "kind": "field",
1297
+ "name": "controller",
1298
+ "type": {
1299
+ "text": "TabsController"
1300
+ },
1301
+ "privacy": "protected",
1302
+ "readonly": true,
1303
+ "default": "new TabsController(this, this.#host())"
1304
+ },
1305
+ {
1306
+ "kind": "field",
1307
+ "name": "reconcileOn",
1308
+ "type": {
1309
+ "text": "readonly string[]"
1310
+ },
1311
+ "privacy": "protected",
1312
+ "readonly": true,
1313
+ "default": "[\"value\", \"disabled\", \"label\", \"orientation\"]"
1314
+ },
1315
+ {
1316
+ "kind": "field",
1317
+ "name": "value",
1318
+ "type": {
1319
+ "text": "string | undefined"
1320
+ },
1321
+ "description": "The active tab's value, reflected as the `value` attribute."
1322
+ },
1323
+ {
1324
+ "kind": "method",
1325
+ "name": "#host",
1326
+ "privacy": "private",
1327
+ "return": {
1328
+ "type": {
1329
+ "text": "TabsControllerHost"
1330
+ }
1331
+ },
1332
+ "description": "The controller's view of this element: state lives in reflected attributes."
1333
+ },
1334
+ {
1335
+ "kind": "method",
1336
+ "name": "#activationMode",
1337
+ "privacy": "private",
1338
+ "return": {
1339
+ "type": {
1340
+ "text": "TabsActivationMode"
1341
+ }
1342
+ }
1343
+ },
1344
+ {
1345
+ "kind": "method",
1346
+ "name": "#orientation",
1347
+ "privacy": "private",
1348
+ "return": {
1349
+ "type": {
1350
+ "text": "TabsOrientation"
1351
+ }
1352
+ }
1353
+ },
1354
+ {
1355
+ "kind": "method",
1356
+ "name": "reconcile",
1357
+ "privacy": "protected",
1358
+ "return": {
1359
+ "type": {
1360
+ "text": "void"
1361
+ }
1362
+ }
1363
+ }
1364
+ ],
1365
+ "events": [
1366
+ {
1367
+ "type": {
1368
+ "text": "CustomEvent<{ value: string; index: number }>"
1369
+ },
1370
+ "description": "Bubbles, cancelable, fired before a user-driven change is applied. Call `preventDefault()` to veto it.",
1371
+ "name": "primitiv-tabs-change"
1372
+ }
1373
+ ],
1374
+ "attributes": [
1375
+ {
1376
+ "type": {
1377
+ "text": "string"
1378
+ },
1379
+ "description": "The active tab's value. Reflected: it moves as the user switches tabs, so a server re-render or a history snapshot sees the live selection.",
1380
+ "name": "value"
1381
+ },
1382
+ {
1383
+ "type": {
1384
+ "text": "\"horizontal\" | \"vertical\""
1385
+ },
1386
+ "description": "Layout axis, which picks the arrow-key pair. Defaults to `horizontal`.",
1387
+ "name": "orientation"
1388
+ },
1389
+ {
1390
+ "type": {
1391
+ "text": "\"automatic\" | \"manual\""
1392
+ },
1393
+ "description": "`automatic` activates a tab as focus arrives; `manual` waits for Enter or Space. Defaults to `automatic`.",
1394
+ "name": "activation-mode"
1395
+ }
1396
+ ],
1397
+ "superclass": {
1398
+ "name": "PrimitivRootElement",
1399
+ "module": "/src/internal/RootElement.ts"
1400
+ },
1401
+ "tagName": "primitiv-tabs",
1402
+ "customElement": true,
1403
+ "summary": "The state owner of a WAI-ARIA tab set."
1404
+ },
1405
+ {
1406
+ "kind": "class",
1407
+ "description": "`<primitiv-tabs-list>` — the tablist. Structural: the root writes its ARIA.",
1408
+ "name": "PrimitivTabsListElement",
1409
+ "attributes": [
1410
+ {
1411
+ "type": {
1412
+ "text": "string"
1413
+ },
1414
+ "description": "The tablist's accessible name. Give this or `aria-labelledby`.",
1415
+ "name": "label"
1416
+ }
1417
+ ],
1418
+ "superclass": {
1419
+ "name": "ElementBase",
1420
+ "module": "/src/internal/element.ts"
1421
+ },
1422
+ "tagName": "primitiv-tabs-list",
1423
+ "customElement": true
1424
+ },
1425
+ {
1426
+ "kind": "class",
1427
+ "description": "`<primitiv-tabs-trigger>` — an interactive part. It decorates exactly one\nchild the consumer writes (a `<button>`, an `<a href>`, a router link), which\nreceives the tab role, so the rendered DOM matches React's `<button role=\"tab\">`\n(RFC 0033 D24).",
1428
+ "name": "PrimitivTabsTriggerElement",
1429
+ "attributes": [
1430
+ {
1431
+ "type": {
1432
+ "text": "string"
1433
+ },
1434
+ "description": "The tab's value, pairing it with the panel of the same value.",
1435
+ "name": "value"
1436
+ },
1437
+ {
1438
+ "type": {
1439
+ "text": "boolean"
1440
+ },
1441
+ "description": "Marks the tab disabled: arrow keys still land on it, but it never activates.",
1442
+ "name": "disabled"
1443
+ }
1444
+ ],
1445
+ "superclass": {
1446
+ "name": "ElementBase",
1447
+ "module": "/src/internal/element.ts"
1448
+ },
1449
+ "tagName": "primitiv-tabs-trigger",
1450
+ "customElement": true
1451
+ },
1452
+ {
1453
+ "kind": "class",
1454
+ "description": "`<primitiv-tabs-content>` — a tab panel. Structural: the root writes its ARIA.",
1455
+ "name": "PrimitivTabsContentElement",
1456
+ "events": [
1457
+ {
1458
+ "type": {
1459
+ "text": "CustomEvent"
1460
+ },
1461
+ "description": "Bubbles from the panel as it becomes active (not on first render), so a lazy panel can fetch its content.",
1462
+ "name": "primitiv-tabs-show"
1463
+ }
1464
+ ],
1465
+ "attributes": [
1466
+ {
1467
+ "type": {
1468
+ "text": "string"
1469
+ },
1470
+ "description": "The panel's value, pairing it with the tab of the same value.",
1471
+ "name": "value"
1472
+ }
1473
+ ],
1474
+ "superclass": {
1475
+ "name": "ElementBase",
1476
+ "module": "/src/internal/element.ts"
1477
+ },
1478
+ "tagName": "primitiv-tabs-content",
1479
+ "customElement": true
1480
+ },
1481
+ {
1482
+ "kind": "function",
1483
+ "name": "defineTabs",
1484
+ "return": {
1485
+ "type": {
1486
+ "text": "void"
1487
+ }
1488
+ },
1489
+ "parameters": [
1490
+ {
1491
+ "name": "registry",
1492
+ "default": "globalThis.customElements",
1493
+ "type": {
1494
+ "text": "ElementRegistry | undefined"
1495
+ }
1496
+ }
1497
+ ],
1498
+ "description": "Define the four Tabs elements on `registry` (the global `customElements` by\ndefault, so a scoped registry can be passed when browsers support one). Safe\nto call more than once, and a no-op where there is no registry (a server\nrender)."
1499
+ }
1500
+ ],
1501
+ "exports": [
1502
+ {
1503
+ "kind": "js",
1504
+ "name": "ElementRegistry",
1505
+ "declaration": {
1506
+ "name": "ElementRegistry",
1507
+ "module": "src/tabs/elements.ts"
1508
+ }
1509
+ },
1510
+ {
1511
+ "kind": "js",
1512
+ "name": "PrimitivTabsElement",
1513
+ "declaration": {
1514
+ "name": "PrimitivTabsElement",
1515
+ "module": "src/tabs/elements.ts"
1516
+ }
1517
+ },
1518
+ {
1519
+ "kind": "js",
1520
+ "name": "PrimitivTabsListElement",
1521
+ "declaration": {
1522
+ "name": "PrimitivTabsListElement",
1523
+ "module": "src/tabs/elements.ts"
1524
+ }
1525
+ },
1526
+ {
1527
+ "kind": "js",
1528
+ "name": "PrimitivTabsTriggerElement",
1529
+ "declaration": {
1530
+ "name": "PrimitivTabsTriggerElement",
1531
+ "module": "src/tabs/elements.ts"
1532
+ }
1533
+ },
1534
+ {
1535
+ "kind": "js",
1536
+ "name": "PrimitivTabsContentElement",
1537
+ "declaration": {
1538
+ "name": "PrimitivTabsContentElement",
1539
+ "module": "src/tabs/elements.ts"
1540
+ }
1541
+ },
1542
+ {
1543
+ "kind": "js",
1544
+ "name": "defineTabs",
1545
+ "declaration": {
1546
+ "name": "defineTabs",
1547
+ "module": "src/tabs/elements.ts"
1548
+ }
1549
+ }
1550
+ ]
1551
+ },
1552
+ {
1553
+ "kind": "javascript-module",
1554
+ "path": "src/tooltip/elements.ts",
1555
+ "declarations": [
1556
+ {
1557
+ "kind": "class",
1558
+ "description": "`<primitiv-tooltip-provider>` — optional. The tooltips inside it share one\nskip-delay window and its default delay, as inside React's\n`Tooltip.Provider`; tooltips outside any provider share a document-wide one.",
1559
+ "name": "PrimitivTooltipProviderElement",
1560
+ "members": [
1561
+ {
1562
+ "kind": "field",
1563
+ "name": "#group",
1564
+ "privacy": "private",
1565
+ "type": {
1566
+ "text": "TooltipGroup | undefined"
1567
+ }
1568
+ },
1569
+ {
1570
+ "kind": "field",
1571
+ "name": "group",
1572
+ "type": {
1573
+ "text": "TooltipGroup"
1574
+ },
1575
+ "description": "The skip-delay window this provider's tooltips share, created on first use.",
1576
+ "readonly": true
1577
+ }
1578
+ ],
1579
+ "attributes": [
1580
+ {
1581
+ "type": {
1582
+ "text": "number"
1583
+ },
1584
+ "description": "How long, in milliseconds, a pointer rests on a trigger before its tooltip opens. Default 700. A tooltip's own `delay-duration` overrides it.",
1585
+ "name": "delay-duration"
1586
+ },
1587
+ {
1588
+ "type": {
1589
+ "text": "number"
1590
+ },
1591
+ "description": "How long, in milliseconds, after one tooltip closes that hovering another opens it at once. Default 300.",
1592
+ "name": "skip-delay-duration"
1593
+ }
1594
+ ],
1595
+ "superclass": {
1596
+ "name": "ElementBase",
1597
+ "module": "/src/internal/element.ts"
1598
+ },
1599
+ "tagName": "primitiv-tooltip-provider",
1600
+ "customElement": true
1601
+ },
1602
+ {
1603
+ "kind": "class",
1604
+ "description": "`<primitiv-tooltip>` — the state owner of a tooltip: a short description of\nits trigger that appears on hover after a delay, and at once on focus. It\ncloses when the pointer leaves (after a moment, so it can be reached),\non blur, on Escape and on a press outside. Moving from one trigger to the\nnext opens each next tooltip at once (the skip delay). The tooltip is shown\nas a `popover=\"manual\"` in the top layer, with the trigger as its source,\nwhich makes the trigger its implicit anchor for CSS anchor positioning.\n\nThe root finds its own parts and reconciles their ARIA from its reflected\nstate whenever a part arrives, leaves, or changes an attribute the root\nreads (the lifecycle is `PrimitivRootElement`'s).",
1605
+ "name": "PrimitivTooltipElement",
897
1606
  "members": [
1607
+ {
1608
+ "kind": "field",
1609
+ "name": "#trigger",
1610
+ "privacy": "private",
1611
+ "type": {
1612
+ "text": "HTMLElement | null"
1613
+ },
1614
+ "default": "null",
1615
+ "description": "The decorated trigger button and the tooltip, as of the last reconcile."
1616
+ },
1617
+ {
1618
+ "kind": "field",
1619
+ "name": "#content",
1620
+ "privacy": "private",
1621
+ "type": {
1622
+ "text": "HTMLElement | null"
1623
+ },
1624
+ "default": "null"
1625
+ },
898
1626
  {
899
1627
  "kind": "field",
900
1628
  "name": "#shown",
901
1629
  "privacy": "private",
902
1630
  "type": {
903
- "text": "string | undefined"
1631
+ "text": "HTMLElement | null"
904
1632
  },
905
- "description": "The value of the panel last shown, so a change fires primitiv-tabs-show."
1633
+ "default": "null",
1634
+ "description": "The tooltip this root has shown, while it shows."
906
1635
  },
907
1636
  {
908
1637
  "kind": "field",
909
- "name": "#rendered",
1638
+ "name": "#bindings",
910
1639
  "privacy": "private",
911
1640
  "type": {
912
- "text": "boolean"
1641
+ "text": "AbortController | null"
913
1642
  },
914
- "default": "false"
1643
+ "default": "null",
1644
+ "description": "The listeners on the trigger and the tooltip, rebuilt when either changes."
1645
+ },
1646
+ {
1647
+ "kind": "field",
1648
+ "name": "#tooltip",
1649
+ "privacy": "private",
1650
+ "readonly": true,
1651
+ "default": "new TooltipController(this.#host())"
915
1652
  },
916
1653
  {
917
1654
  "kind": "field",
918
1655
  "name": "controller",
919
1656
  "type": {
920
- "text": "TabsController"
1657
+ "text": "{ connect(): void; disconnect(): void }"
921
1658
  },
922
1659
  "privacy": "protected",
923
1660
  "readonly": true,
924
- "default": "new TabsController(this, this.#host())"
1661
+ "default": "{ connect: (): void => {}, disconnect: (): void => this.#disconnect(), }"
925
1662
  },
926
1663
  {
927
1664
  "kind": "field",
@@ -931,15 +1668,15 @@
931
1668
  },
932
1669
  "privacy": "protected",
933
1670
  "readonly": true,
934
- "default": "[\"value\", \"disabled\", \"label\", \"orientation\"]"
1671
+ "default": "[\"open\"]"
935
1672
  },
936
1673
  {
937
1674
  "kind": "field",
938
- "name": "value",
1675
+ "name": "open",
939
1676
  "type": {
940
- "text": "string | undefined"
1677
+ "text": "boolean"
941
1678
  },
942
- "description": "The active tab's value, reflected as the `value` attribute."
1679
+ "description": "Whether the tooltip is showing, reflected as the boolean `open` attribute."
943
1680
  },
944
1681
  {
945
1682
  "kind": "method",
@@ -947,30 +1684,45 @@
947
1684
  "privacy": "private",
948
1685
  "return": {
949
1686
  "type": {
950
- "text": "TabsControllerHost"
1687
+ "text": "TooltipControllerHost"
951
1688
  }
952
1689
  },
953
- "description": "The controller's view of this element: state lives in reflected attributes."
1690
+ "description": "The controller's view of this element: state lives in the reflected attribute."
954
1691
  },
955
1692
  {
956
1693
  "kind": "method",
957
- "name": "#activationMode",
1694
+ "name": "#disconnect",
958
1695
  "privacy": "private",
959
1696
  "return": {
960
1697
  "type": {
961
- "text": "TabsActivationMode"
1698
+ "text": "void"
962
1699
  }
963
1700
  }
964
1701
  },
965
1702
  {
966
1703
  "kind": "method",
967
- "name": "#orientation",
1704
+ "name": "#bind",
968
1705
  "privacy": "private",
969
1706
  "return": {
970
1707
  "type": {
971
- "text": "TabsOrientation"
1708
+ "text": "void"
972
1709
  }
973
- }
1710
+ },
1711
+ "parameters": [
1712
+ {
1713
+ "name": "trigger",
1714
+ "type": {
1715
+ "text": "HTMLElement | null"
1716
+ }
1717
+ },
1718
+ {
1719
+ "name": "content",
1720
+ "type": {
1721
+ "text": "HTMLElement | null"
1722
+ }
1723
+ }
1724
+ ],
1725
+ "description": "Listen on `trigger` and `content`, rebinding only when either changed."
974
1726
  },
975
1727
  {
976
1728
  "kind": "method",
@@ -981,127 +1733,103 @@
981
1733
  "text": "void"
982
1734
  }
983
1735
  }
1736
+ },
1737
+ {
1738
+ "kind": "method",
1739
+ "name": "#show",
1740
+ "privacy": "private",
1741
+ "return": {
1742
+ "type": {
1743
+ "text": "void"
1744
+ }
1745
+ },
1746
+ "parameters": [
1747
+ {
1748
+ "name": "content",
1749
+ "type": {
1750
+ "text": "HTMLElement | null"
1751
+ }
1752
+ }
1753
+ ],
1754
+ "description": "Show `content` (anchored to the trigger), or hide what is showing when it is `null`."
984
1755
  }
985
1756
  ],
986
1757
  "events": [
987
1758
  {
988
1759
  "type": {
989
- "text": "CustomEvent<{ value: string; index: number }>"
1760
+ "text": "CustomEvent<{ open: boolean }>"
990
1761
  },
991
- "description": "Bubbles, cancelable, fired before a user-driven change is applied. Call `preventDefault()` to veto it.",
992
- "name": "primitiv-tabs-change"
1762
+ "description": "Bubbles, cancelable, fired before a user-driven change is applied — hover, focus, blur, Escape or a press outside — with the open state afterwards. Call `preventDefault()` to veto it.",
1763
+ "name": "primitiv-tooltip-change"
993
1764
  }
994
1765
  ],
995
1766
  "attributes": [
996
1767
  {
997
1768
  "type": {
998
- "text": "string"
1769
+ "text": "boolean"
999
1770
  },
1000
- "description": "The active tab's value. Reflected: it moves as the user switches tabs, so a server re-render or a history snapshot sees the live selection.",
1001
- "name": "value"
1771
+ "description": "Whether the tooltip is showing. Reflected: it changes as the user hovers, focuses and dismisses it. Set it (or the `open` property) to show or hide it from script.",
1772
+ "name": "open"
1002
1773
  },
1003
1774
  {
1004
1775
  "type": {
1005
- "text": "\"horizontal\" | \"vertical\""
1776
+ "text": "number"
1006
1777
  },
1007
- "description": "Layout axis, which picks the arrow-key pair. Defaults to `horizontal`.",
1008
- "name": "orientation"
1778
+ "description": "How long, in milliseconds, a pointer rests on the trigger before the tooltip opens. Defaults to the provider's, or 700. Focus always opens it at once.",
1779
+ "name": "delay-duration"
1009
1780
  },
1010
1781
  {
1011
1782
  "type": {
1012
- "text": "\"automatic\" | \"manual\""
1783
+ "text": "boolean"
1013
1784
  },
1014
- "description": "`automatic` activates a tab as focus arrives; `manual` waits for Enter or Space. Defaults to `automatic`.",
1015
- "name": "activation-mode"
1785
+ "description": "Close as soon as the pointer leaves the trigger, rather than giving it a moment to reach the tooltip.",
1786
+ "name": "disable-hoverable-content"
1016
1787
  }
1017
1788
  ],
1018
1789
  "superclass": {
1019
1790
  "name": "PrimitivRootElement",
1020
1791
  "module": "/src/internal/RootElement.ts"
1021
1792
  },
1022
- "tagName": "primitiv-tabs",
1793
+ "tagName": "primitiv-tooltip",
1023
1794
  "customElement": true,
1024
- "summary": "The state owner of a WAI-ARIA tab set."
1795
+ "summary": "The state owner of a tooltip, shown on hover and focus."
1025
1796
  },
1026
1797
  {
1027
1798
  "kind": "class",
1028
- "description": "`<primitiv-tabs-list>` — the tablist. Structural: the root writes its ARIA.",
1029
- "name": "PrimitivTabsListElement",
1030
- "attributes": [
1031
- {
1032
- "type": {
1033
- "text": "string"
1034
- },
1035
- "description": "The tablist's accessible name. Give this or `aria-labelledby`.",
1036
- "name": "label"
1037
- }
1038
- ],
1799
+ "description": "`<primitiv-tooltip-trigger>` — an interactive part. It decorates exactly one\nchild the consumer writes, a `<button>`, which opens the tooltip on hover and\nfocus and is described by it (`aria-describedby`), so the rendered DOM\nmatches React's (RFC 0033 D24).",
1800
+ "name": "PrimitivTooltipTriggerElement",
1039
1801
  "superclass": {
1040
1802
  "name": "ElementBase",
1041
1803
  "module": "/src/internal/element.ts"
1042
1804
  },
1043
- "tagName": "primitiv-tabs-list",
1805
+ "tagName": "primitiv-tooltip-trigger",
1044
1806
  "customElement": true
1045
1807
  },
1046
1808
  {
1047
1809
  "kind": "class",
1048
- "description": "`<primitiv-tabs-trigger>` — an interactive part. It decorates exactly one\nchild the consumer writes (a `<button>`, an `<a href>`, a router link), which\nreceives the tab role, so the rendered DOM matches React's `<button role=\"tab\">`\n(RFC 0033 D24).",
1049
- "name": "PrimitivTabsTriggerElement",
1050
- "attributes": [
1051
- {
1052
- "type": {
1053
- "text": "string"
1054
- },
1055
- "description": "The tab's value, pairing it with the panel of the same value.",
1056
- "name": "value"
1057
- },
1058
- {
1059
- "type": {
1060
- "text": "boolean"
1061
- },
1062
- "description": "Marks the tab disabled: arrow keys still land on it, but it never activates.",
1063
- "name": "disabled"
1064
- }
1065
- ],
1810
+ "description": "`<primitiv-tooltip-content>` — the tooltip itself. Structural: the root\ngives it an id, `role=\"tooltip\"`, `popover=\"manual\"` (write it in your markup\ntoo, so it is hidden before the script loads) and `data-state`.",
1811
+ "name": "PrimitivTooltipContentElement",
1066
1812
  "superclass": {
1067
1813
  "name": "ElementBase",
1068
1814
  "module": "/src/internal/element.ts"
1069
1815
  },
1070
- "tagName": "primitiv-tabs-trigger",
1816
+ "tagName": "primitiv-tooltip-content",
1071
1817
  "customElement": true
1072
1818
  },
1073
1819
  {
1074
1820
  "kind": "class",
1075
- "description": "`<primitiv-tabs-content>` — a tab panel. Structural: the root writes its ARIA.",
1076
- "name": "PrimitivTabsContentElement",
1077
- "events": [
1078
- {
1079
- "type": {
1080
- "text": "CustomEvent"
1081
- },
1082
- "description": "Bubbles from the panel as it becomes active (not on first render), so a lazy panel can fetch its content.",
1083
- "name": "primitiv-tabs-show"
1084
- }
1085
- ],
1086
- "attributes": [
1087
- {
1088
- "type": {
1089
- "text": "string"
1090
- },
1091
- "description": "The panel's value, pairing it with the tab of the same value.",
1092
- "name": "value"
1093
- }
1094
- ],
1821
+ "description": "`<primitiv-tooltip-arrow>` — an optional, decorative pointer, inside the\ncontent. The element writes nothing on it; style it as you like.",
1822
+ "name": "PrimitivTooltipArrowElement",
1095
1823
  "superclass": {
1096
1824
  "name": "ElementBase",
1097
1825
  "module": "/src/internal/element.ts"
1098
1826
  },
1099
- "tagName": "primitiv-tabs-content",
1827
+ "tagName": "primitiv-tooltip-arrow",
1100
1828
  "customElement": true
1101
1829
  },
1102
1830
  {
1103
1831
  "kind": "function",
1104
- "name": "defineTabs",
1832
+ "name": "defineTooltip",
1105
1833
  "return": {
1106
1834
  "type": {
1107
1835
  "text": "void"
@@ -1116,7 +1844,7 @@
1116
1844
  }
1117
1845
  }
1118
1846
  ],
1119
- "description": "Define the four Tabs elements on `registry` (the global `customElements` by\ndefault, so a scoped registry can be passed when browsers support one). Safe\nto call more than once, and a no-op where there is no registry (a server\nrender)."
1847
+ "description": "Define the five Tooltip elements on `registry` (the global `customElements`\nby default). Safe to call more than once, and a no-op where there is no\nregistry (a server render)."
1120
1848
  }
1121
1849
  ],
1122
1850
  "exports": [
@@ -1125,47 +1853,55 @@
1125
1853
  "name": "ElementRegistry",
1126
1854
  "declaration": {
1127
1855
  "name": "ElementRegistry",
1128
- "module": "src/tabs/elements.ts"
1856
+ "module": "src/tooltip/elements.ts"
1129
1857
  }
1130
1858
  },
1131
1859
  {
1132
1860
  "kind": "js",
1133
- "name": "PrimitivTabsElement",
1861
+ "name": "PrimitivTooltipProviderElement",
1134
1862
  "declaration": {
1135
- "name": "PrimitivTabsElement",
1136
- "module": "src/tabs/elements.ts"
1863
+ "name": "PrimitivTooltipProviderElement",
1864
+ "module": "src/tooltip/elements.ts"
1137
1865
  }
1138
1866
  },
1139
1867
  {
1140
1868
  "kind": "js",
1141
- "name": "PrimitivTabsListElement",
1869
+ "name": "PrimitivTooltipElement",
1142
1870
  "declaration": {
1143
- "name": "PrimitivTabsListElement",
1144
- "module": "src/tabs/elements.ts"
1871
+ "name": "PrimitivTooltipElement",
1872
+ "module": "src/tooltip/elements.ts"
1145
1873
  }
1146
1874
  },
1147
1875
  {
1148
1876
  "kind": "js",
1149
- "name": "PrimitivTabsTriggerElement",
1877
+ "name": "PrimitivTooltipTriggerElement",
1150
1878
  "declaration": {
1151
- "name": "PrimitivTabsTriggerElement",
1152
- "module": "src/tabs/elements.ts"
1879
+ "name": "PrimitivTooltipTriggerElement",
1880
+ "module": "src/tooltip/elements.ts"
1153
1881
  }
1154
1882
  },
1155
1883
  {
1156
1884
  "kind": "js",
1157
- "name": "PrimitivTabsContentElement",
1885
+ "name": "PrimitivTooltipContentElement",
1158
1886
  "declaration": {
1159
- "name": "PrimitivTabsContentElement",
1160
- "module": "src/tabs/elements.ts"
1887
+ "name": "PrimitivTooltipContentElement",
1888
+ "module": "src/tooltip/elements.ts"
1161
1889
  }
1162
1890
  },
1163
1891
  {
1164
1892
  "kind": "js",
1165
- "name": "defineTabs",
1893
+ "name": "PrimitivTooltipArrowElement",
1166
1894
  "declaration": {
1167
- "name": "defineTabs",
1168
- "module": "src/tabs/elements.ts"
1895
+ "name": "PrimitivTooltipArrowElement",
1896
+ "module": "src/tooltip/elements.ts"
1897
+ }
1898
+ },
1899
+ {
1900
+ "kind": "js",
1901
+ "name": "defineTooltip",
1902
+ "declaration": {
1903
+ "name": "defineTooltip",
1904
+ "module": "src/tooltip/elements.ts"
1169
1905
  }
1170
1906
  }
1171
1907
  ]