@threadlabs/looma 0.37.3 → 0.37.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (125) hide show
  1. package/components/shared/active-item-reveal.js +74 -0
  2. package/components/shared/menu-navigation.js +3 -1
  3. package/components/ui-button/ui-button.html +13 -0
  4. package/components/ui-combobox/ui-combobox.js +3 -1
  5. package/components/ui-context-menu/ui-context-menu.js +4 -1
  6. package/components/ui-editor-link-form/ui-editor-link-form.js +3 -1
  7. package/components/ui-editor-mention-menu/ui-editor-mention-menu.js +12 -5
  8. package/components/ui-editor-slash-menu/ui-editor-slash-menu.js +12 -5
  9. package/components/ui-form-field/ui-form-field.js +7 -1
  10. package/components/ui-listbox/ui-listbox.js +3 -1
  11. package/components/ui-menu/ui-menu.js +5 -1
  12. package/components/ui-pagination/ui-pagination.html +74 -0
  13. package/components/ui-pagination/ui-pagination.js +19 -0
  14. package/components/ui-search-shell/ui-search-shell.js +7 -4
  15. package/dist/index.js +20 -19
  16. package/docs/catalog.json +323 -1
  17. package/docs/examples/ui-pagination/examples/01-numbered.behavior.js +11 -0
  18. package/package.json +1 -1
  19. package/styles/ui-button.css +12 -0
  20. package/styles/ui-pagination.css +1 -0
  21. package/vanilla/UiButton.d.ts +1 -0
  22. package/vanilla/UiButton.js +31 -31
  23. package/vanilla/UiPagination.d.ts +35 -0
  24. package/vanilla/UiPagination.js +202 -0
  25. package/vanilla/index.js +1 -0
  26. package/vue/UiButton.d.ts +6 -0
  27. package/vue/UiButton.vue +34 -0
  28. package/vue/UiPagination.d.ts +115 -0
  29. package/vue/UiPagination.js +2 -0
  30. package/vue/UiPagination.vue +598 -0
  31. package/vue/chunks/UiActionBar.js +1 -1
  32. package/vue/chunks/UiAffordanceScope.js +1 -1
  33. package/vue/chunks/UiAvatar.js +1 -1
  34. package/vue/chunks/UiAvatarGroup.js +1 -1
  35. package/vue/chunks/UiBadge.js +1 -1
  36. package/vue/chunks/UiBreadcrumbItem.js +1 -1
  37. package/vue/chunks/UiBreadcrumbs.js +1 -1
  38. package/vue/chunks/UiButton.js +30 -2
  39. package/vue/chunks/UiCallout.js +1 -1
  40. package/vue/chunks/UiCard.js +1 -1
  41. package/vue/chunks/UiCheckbox.js +1 -1
  42. package/vue/chunks/UiCluster.js +1 -1
  43. package/vue/chunks/UiColorPicker.js +1 -1
  44. package/vue/chunks/UiCombobox.js +1 -1
  45. package/vue/chunks/UiContainer.js +1 -1
  46. package/vue/chunks/UiContextMenu.js +1 -1
  47. package/vue/chunks/UiCover.js +1 -1
  48. package/vue/chunks/UiCurveEditor.js +1 -1
  49. package/vue/chunks/UiCycleButton.js +1 -1
  50. package/vue/chunks/UiDescriptionItem.js +1 -1
  51. package/vue/chunks/UiDescriptionList.js +1 -1
  52. package/vue/chunks/UiDialog.js +1 -1
  53. package/vue/chunks/UiDisclosure.js +1 -1
  54. package/vue/chunks/UiEditable.js +1 -1
  55. package/vue/chunks/UiEditorBlockActions.js +1 -1
  56. package/vue/chunks/UiEditorChipEditor.js +1 -1
  57. package/vue/chunks/UiEditorCodeLanguage.js +1 -1
  58. package/vue/chunks/UiEditorFootnoteEditor.js +1 -1
  59. package/vue/chunks/UiEditorImageToolbar.js +1 -1
  60. package/vue/chunks/UiEditorInsertTableGrid.js +1 -1
  61. package/vue/chunks/UiEditorLinkCard.js +1 -1
  62. package/vue/chunks/UiEditorLinkForm.js +1 -1
  63. package/vue/chunks/UiEditorMentionMenu.js +1 -1
  64. package/vue/chunks/UiEditorMentionMenuItem.js +1 -1
  65. package/vue/chunks/UiEditorSlashMenu.js +1 -1
  66. package/vue/chunks/UiEditorSlashMenuGroup.js +1 -1
  67. package/vue/chunks/UiEditorSlashMenuItem.js +1 -1
  68. package/vue/chunks/UiEditorSurface.js +1 -1
  69. package/vue/chunks/UiEditorTableContextMenu.js +1 -1
  70. package/vue/chunks/UiEditorTableOverlay.js +1 -1
  71. package/vue/chunks/UiEditorTableToolbar.js +1 -1
  72. package/vue/chunks/UiEditorToolbar.js +1 -1
  73. package/vue/chunks/UiFloatingActionButton.js +1 -1
  74. package/vue/chunks/UiFormField.js +1 -1
  75. package/vue/chunks/UiGrid.js +1 -1
  76. package/vue/chunks/UiIcon.js +1 -1
  77. package/vue/chunks/UiIconButton.js +1 -1
  78. package/vue/chunks/UiImage.js +1 -1
  79. package/vue/chunks/UiInput.js +1 -1
  80. package/vue/chunks/UiInputGroup.js +1 -1
  81. package/vue/chunks/UiLightEditor.js +1 -1
  82. package/vue/chunks/UiList.js +1 -1
  83. package/vue/chunks/UiListItem.js +1 -1
  84. package/vue/chunks/UiListbox.js +1 -1
  85. package/vue/chunks/UiMenu.js +1 -1
  86. package/vue/chunks/UiMenuGroup.js +1 -1
  87. package/vue/chunks/UiMenuItem.js +1 -1
  88. package/vue/chunks/UiMeter.js +1 -1
  89. package/vue/chunks/UiNavItem.js +1 -1
  90. package/vue/chunks/UiNumberInput.js +1 -1
  91. package/vue/chunks/UiPageHeader.js +1 -1
  92. package/vue/chunks/UiPagination.js +551 -0
  93. package/vue/chunks/UiPopover.js +1 -1
  94. package/vue/chunks/UiRadio.js +1 -1
  95. package/vue/chunks/UiRadioGroup.js +1 -1
  96. package/vue/chunks/UiReel.js +1 -1
  97. package/vue/chunks/UiScrollArea.js +1 -1
  98. package/vue/chunks/UiSearchResultRow.js +1 -1
  99. package/vue/chunks/UiSearchShell.js +1 -1
  100. package/vue/chunks/UiSection.js +1 -1
  101. package/vue/chunks/UiSelect.js +1 -1
  102. package/vue/chunks/UiSeparator.js +1 -1
  103. package/vue/chunks/UiSidebar.js +1 -1
  104. package/vue/chunks/UiSlider.js +1 -1
  105. package/vue/chunks/UiSpinner.js +1 -1
  106. package/vue/chunks/UiStack.js +1 -1
  107. package/vue/chunks/UiStatusMessage.js +1 -1
  108. package/vue/chunks/UiSwatch.js +1 -1
  109. package/vue/chunks/UiSwitch.js +1 -1
  110. package/vue/chunks/UiSwitcher.js +1 -1
  111. package/vue/chunks/UiTable.js +1 -1
  112. package/vue/chunks/UiTabs.js +1 -1
  113. package/vue/chunks/UiText.js +1 -1
  114. package/vue/chunks/UiTextarea.js +1 -1
  115. package/vue/chunks/UiToast.js +1 -1
  116. package/vue/chunks/UiToastRegion.js +1 -1
  117. package/vue/chunks/UiTooltip.js +1 -1
  118. package/vue/chunks/UiTopBar.js +1 -1
  119. package/vue/chunks/UiTree.js +1 -1
  120. package/vue/chunks/UiTreeItem.js +1 -1
  121. package/vue/chunks/_plugin-vue_export-helper.js +27 -2
  122. package/vue/components.css +22 -0
  123. package/vue/editor/index.js +145 -36
  124. package/vue/index.d.ts +1 -0
  125. package/vue/index.js +2 -1
package/docs/catalog.json CHANGED
@@ -305,6 +305,11 @@
305
305
  "package": "@threadlabs/looma",
306
306
  "resource": "@threadlabs/looma/components/ui-page-header/ui-page-header.html"
307
307
  },
308
+ {
309
+ "tag": "ui-pagination",
310
+ "package": "@threadlabs/looma",
311
+ "resource": "@threadlabs/looma/components/ui-pagination/ui-pagination.html"
312
+ },
308
313
  {
309
314
  "tag": "ui-popover",
310
315
  "package": "@threadlabs/looma",
@@ -448,7 +453,7 @@
448
453
  ],
449
454
  "schemaVersion": 1,
450
455
  "package": "@threadlabs/looma",
451
- "version": "0.37.3",
456
+ "version": "0.37.5",
452
457
  "groups": [
453
458
  {
454
459
  "id": "layout",
@@ -2544,6 +2549,13 @@
2544
2549
  "lg"
2545
2550
  ]
2546
2551
  },
2552
+ {
2553
+ "name": "square",
2554
+ "property": "square",
2555
+ "description": "Gives short labels and icons the same square minimum footprint at each size. Longer labels grow naturally. Applies to boxed actions; link and card variants keep their normal layout.",
2556
+ "type": "boolean",
2557
+ "default": false
2558
+ },
2547
2559
  {
2548
2560
  "name": "stretch",
2549
2561
  "property": "stretch",
@@ -2685,6 +2697,12 @@
2685
2697
  "lg"
2686
2698
  ]
2687
2699
  },
2700
+ {
2701
+ "name": "square",
2702
+ "description": "Gives short labels and icons the same square minimum footprint at each size. Longer labels grow naturally. Applies to boxed actions; link and card variants keep their normal layout.",
2703
+ "type": "boolean",
2704
+ "default": false
2705
+ },
2688
2706
  {
2689
2707
  "name": "stretch",
2690
2708
  "description": "Fills the inline size of its container.",
@@ -2865,6 +2883,16 @@
2865
2883
  "bindings": "",
2866
2884
  "frameworks": {}
2867
2885
  },
2886
+ {
2887
+ "id": "@threadlabs/looma/ui-button/09-square",
2888
+ "name": "09-square",
2889
+ "title": "Square minimum size",
2890
+ "description": "Short numeric and icon actions share the control's minimum height and width. Longer labels grow naturally; the ordinary Button default stays content-sized.",
2891
+ "markup": "<ui-cluster gap=\"xs\"><ui-button square size=\"sm\" variant=\"ghost\" tone=\"neutral\" aria-label=\"Previous\"><ui-icon\n name=\"chevron-left\"\n ></ui-icon></ui-button><ui-button square size=\"sm\" variant=\"ghost\" tone=\"neutral\">1</ui-button><ui-button square size=\"sm\" variant=\"solid\"\n >2</ui-button><ui-button square size=\"sm\" variant=\"ghost\" tone=\"neutral\">10</ui-button><ui-button\n square\n size=\"sm\"\n variant=\"ghost\"\n tone=\"neutral\"\n aria-label=\"Next\"\n ><ui-icon name=\"chevron-right\"></ui-icon></ui-button></ui-cluster>",
2892
+ "resizable": false,
2893
+ "bindings": "",
2894
+ "frameworks": {}
2895
+ },
2868
2896
  {
2869
2897
  "id": "@threadlabs/looma/ui-button/10-card",
2870
2898
  "name": "10-card",
@@ -17186,6 +17214,300 @@
17186
17214
  }
17187
17215
  ]
17188
17216
  },
17217
+ {
17218
+ "tag": "ui-pagination",
17219
+ "package": "@threadlabs/looma",
17220
+ "root": "nav",
17221
+ "description": "Controlled page navigation for result lists, cards and tables. Supply the visible numbered pages and previous/next availability; Looma owns the native controls, current-page semantics and navigate requests. Optional hrefs preserve ordinary link navigation. Applications own routes, data fetching and page windows.",
17222
+ "designTokens": {
17223
+ "sources": [
17224
+ "packages/looma/src/components/ui-pagination/ui-pagination.html"
17225
+ ],
17226
+ "component": [],
17227
+ "shared": []
17228
+ },
17229
+ "attributes": [
17230
+ {
17231
+ "name": "disabled",
17232
+ "property": "disabled",
17233
+ "description": "Makes all page controls unavailable while keeping the current page visible.",
17234
+ "type": "boolean",
17235
+ "default": false
17236
+ },
17237
+ {
17238
+ "name": "has-next",
17239
+ "property": "hasNext",
17240
+ "description": "Whether another page is available. The component does not infer a total.",
17241
+ "type": "boolean",
17242
+ "default": false
17243
+ },
17244
+ {
17245
+ "name": "has-previous",
17246
+ "property": "hasPrevious",
17247
+ "description": "Whether a preceding page is available. Previous is always unavailable on page one.",
17248
+ "type": "boolean",
17249
+ "default": false
17250
+ },
17251
+ {
17252
+ "name": "label",
17253
+ "property": "label",
17254
+ "description": "Accessible name for the navigation landmark.",
17255
+ "type": "string",
17256
+ "default": "Results pages"
17257
+ },
17258
+ {
17259
+ "name": "next-href",
17260
+ "property": "nextHref",
17261
+ "description": "Optional native destination for Next. Empty renders a request button.",
17262
+ "type": "string",
17263
+ "default": ""
17264
+ },
17265
+ {
17266
+ "name": "next-label",
17267
+ "property": "nextLabel",
17268
+ "description": "Accessible label for the following page action.",
17269
+ "type": "string",
17270
+ "default": "Next"
17271
+ },
17272
+ {
17273
+ "name": "page",
17274
+ "property": "page",
17275
+ "description": "Current one-based page. The consumer updates it after a navigate request; activation never changes it internally.",
17276
+ "type": "number",
17277
+ "default": 1
17278
+ },
17279
+ {
17280
+ "name": "page-label",
17281
+ "property": "pageLabel",
17282
+ "description": "Prefix for each numbered page's accessible name, followed by its localized number.",
17283
+ "type": "string",
17284
+ "default": "Page"
17285
+ },
17286
+ {
17287
+ "name": "pages",
17288
+ "property": "pages",
17289
+ "description": "Visible numbered pages in ascending order. Omit for previous/next navigation without a known total. Gaps between numbers show an ellipsis. Supply href to keep a numbered page usable as a native link before JavaScript.",
17290
+ "type": "list(object)",
17291
+ "fields": [
17292
+ {
17293
+ "path": "[].value",
17294
+ "type": "number",
17295
+ "required": true
17296
+ },
17297
+ {
17298
+ "path": "[].href",
17299
+ "type": "string",
17300
+ "required": false
17301
+ }
17302
+ ],
17303
+ "default": "[]"
17304
+ },
17305
+ {
17306
+ "name": "previous-href",
17307
+ "property": "previousHref",
17308
+ "description": "Optional native destination for Previous. Empty renders a request button.",
17309
+ "type": "string",
17310
+ "default": ""
17311
+ },
17312
+ {
17313
+ "name": "previous-label",
17314
+ "property": "previousLabel",
17315
+ "description": "Accessible label for the preceding page action.",
17316
+ "type": "string",
17317
+ "default": "Previous"
17318
+ },
17319
+ {
17320
+ "name": "size",
17321
+ "property": "size",
17322
+ "description": "Uses Button's shared size scale. Narrow groups wrap without enlarging compact controls.",
17323
+ "type": "keyword",
17324
+ "default": "sm",
17325
+ "options": [
17326
+ "sm",
17327
+ "md",
17328
+ "lg"
17329
+ ]
17330
+ }
17331
+ ],
17332
+ "properties": [
17333
+ {
17334
+ "name": "disabled",
17335
+ "description": "Makes all page controls unavailable while keeping the current page visible.",
17336
+ "type": "boolean",
17337
+ "default": false
17338
+ },
17339
+ {
17340
+ "name": "hasNext",
17341
+ "description": "Whether another page is available. The component does not infer a total.",
17342
+ "type": "boolean",
17343
+ "default": false
17344
+ },
17345
+ {
17346
+ "name": "hasPrevious",
17347
+ "description": "Whether a preceding page is available. Previous is always unavailable on page one.",
17348
+ "type": "boolean",
17349
+ "default": false
17350
+ },
17351
+ {
17352
+ "name": "label",
17353
+ "description": "Accessible name for the navigation landmark.",
17354
+ "type": "string",
17355
+ "default": "Results pages"
17356
+ },
17357
+ {
17358
+ "name": "nextHref",
17359
+ "description": "Optional native destination for Next. Empty renders a request button.",
17360
+ "type": "string",
17361
+ "default": ""
17362
+ },
17363
+ {
17364
+ "name": "nextLabel",
17365
+ "description": "Accessible label for the following page action.",
17366
+ "type": "string",
17367
+ "default": "Next"
17368
+ },
17369
+ {
17370
+ "name": "page",
17371
+ "description": "Current one-based page. The consumer updates it after a navigate request; activation never changes it internally.",
17372
+ "type": "number",
17373
+ "default": 1
17374
+ },
17375
+ {
17376
+ "name": "pageLabel",
17377
+ "description": "Prefix for each numbered page's accessible name, followed by its localized number.",
17378
+ "type": "string",
17379
+ "default": "Page"
17380
+ },
17381
+ {
17382
+ "name": "pages",
17383
+ "description": "Visible numbered pages in ascending order. Omit for previous/next navigation without a known total. Gaps between numbers show an ellipsis. Supply href to keep a numbered page usable as a native link before JavaScript.",
17384
+ "type": "readonly ({ readonly value: number; readonly href?: string | null })[]",
17385
+ "fields": [
17386
+ {
17387
+ "path": "[].value",
17388
+ "type": "number",
17389
+ "required": true
17390
+ },
17391
+ {
17392
+ "path": "[].href",
17393
+ "type": "string",
17394
+ "required": false
17395
+ }
17396
+ ],
17397
+ "default": "[]"
17398
+ },
17399
+ {
17400
+ "name": "previousHref",
17401
+ "description": "Optional native destination for Previous. Empty renders a request button.",
17402
+ "type": "string",
17403
+ "default": ""
17404
+ },
17405
+ {
17406
+ "name": "previousLabel",
17407
+ "description": "Accessible label for the preceding page action.",
17408
+ "type": "string",
17409
+ "default": "Previous"
17410
+ },
17411
+ {
17412
+ "name": "size",
17413
+ "description": "Uses Button's shared size scale. Narrow groups wrap without enlarging compact controls.",
17414
+ "type": "\"sm\" | \"md\" | \"lg\"",
17415
+ "default": "sm",
17416
+ "options": [
17417
+ "sm",
17418
+ "md",
17419
+ "lg"
17420
+ ]
17421
+ }
17422
+ ],
17423
+ "events": [
17424
+ {
17425
+ "name": "navigate",
17426
+ "detailType": "{ readonly page: number; readonly previousPage: number; readonly trigger: \"keyboard\" | \"pointer\" | \"programmatic\" }",
17427
+ "detailSchema": "object",
17428
+ "fields": [
17429
+ {
17430
+ "path": "page",
17431
+ "type": "number",
17432
+ "required": true
17433
+ },
17434
+ {
17435
+ "path": "previousPage",
17436
+ "type": "number",
17437
+ "required": true
17438
+ },
17439
+ {
17440
+ "path": "trigger",
17441
+ "type": "keyword",
17442
+ "required": true,
17443
+ "values": [
17444
+ "keyboard",
17445
+ "pointer",
17446
+ "programmatic"
17447
+ ]
17448
+ }
17449
+ ],
17450
+ "detailDocs": "Emitted with the declared detail payload."
17451
+ }
17452
+ ],
17453
+ "slots": [
17454
+ {
17455
+ "name": "default",
17456
+ "description": "Default child content."
17457
+ }
17458
+ ],
17459
+ "group": "display",
17460
+ "id": "@threadlabs/looma/ui-pagination",
17461
+ "title": "Pagination",
17462
+ "resource": "@threadlabs/looma/components/ui-pagination/ui-pagination.html",
17463
+ "targets": [
17464
+ "html-next",
17465
+ "vue"
17466
+ ],
17467
+ "examples": [
17468
+ {
17469
+ "id": "@threadlabs/looma/ui-pagination/01-numbered",
17470
+ "name": "01-numbered",
17471
+ "title": "Numbered pages",
17472
+ "description": "The consumer supplies a bounded page window. Omitted page numbers produce a quiet ellipsis; the current page remains consumer controlled.",
17473
+ "markup": "<ui-pagination page=\"3\" has-previous has-next pages='[{\"value\":1},{\"value\":2},{\"value\":3},{\"value\":4},{\"value\":10}]'></ui-pagination>",
17474
+ "resizable": false,
17475
+ "bindings": "",
17476
+ "frameworks": {},
17477
+ "behavior": "@threadlabs/looma/docs/examples/ui-pagination/examples/01-numbered.behavior.js"
17478
+ },
17479
+ {
17480
+ "id": "@threadlabs/looma/ui-pagination/02-native-links",
17481
+ "name": "02-native-links",
17482
+ "title": "Native links",
17483
+ "description": "Supplied hrefs stay ordinary links before upgrade and retain modified-click and open-in-new-tab behavior. Replace these example query destinations with your own routes.",
17484
+ "markup": "<ui-pagination\n page=\"2\"\n label=\"Catalog pages\"\n has-previous\n has-next\n previous-href=\"?page=1\"\n next-href=\"?page=3\"\n pages='[{\"value\":1,\"href\":\"?page=1\"},{\"value\":2,\"href\":\"?page=2\"},{\"value\":3,\"href\":\"?page=3\"}]'\n></ui-pagination>",
17485
+ "resizable": false,
17486
+ "bindings": "",
17487
+ "frameworks": {}
17488
+ },
17489
+ {
17490
+ "id": "@threadlabs/looma/ui-pagination/03-unknown-total",
17491
+ "name": "03-unknown-total",
17492
+ "title": "Unknown total",
17493
+ "description": "Previous and Next work without an invented page count. The application decides availability from its result or cursor data.",
17494
+ "markup": "<ui-pagination page=\"3\" has-previous has-next><ui-text size=\"sm\" tone=\"secondary\">Page 3</ui-text></ui-pagination>",
17495
+ "resizable": false,
17496
+ "bindings": "",
17497
+ "frameworks": {}
17498
+ },
17499
+ {
17500
+ "id": "@threadlabs/looma/ui-pagination/04-table",
17501
+ "name": "04-table",
17502
+ "title": "Beside a results table",
17503
+ "description": "Table owns its rows, Pagination owns page controls, and Stack owns their spacing. Data retrieval and sorting stay with the application.",
17504
+ "markup": "<ui-stack gap=\"m\">\n <ui-table density=\"compact\"><table>\n <caption>Catalog results</caption>\n <thead>\n <tr>\n <th scope=\"col\">Item</th>\n <th scope=\"col\">Status</th>\n </tr>\n </thead>\n <tbody>\n <tr>\n <th scope=\"row\">Field guide</th>\n <td>Available</td>\n </tr>\n <tr>\n <th scope=\"row\">Trail notes</th>\n <td>Available</td>\n </tr>\n </tbody>\n </table></ui-table>\n <ui-pagination page=\"1\" has-next pages='[{\"value\":1},{\"value\":2},{\"value\":3}]'></ui-pagination>\n</ui-stack>",
17505
+ "resizable": false,
17506
+ "bindings": "",
17507
+ "frameworks": {}
17508
+ }
17509
+ ]
17510
+ },
17189
17511
  {
17190
17512
  "tag": "ui-popover",
17191
17513
  "package": "@threadlabs/looma",
@@ -0,0 +1,11 @@
1
+ import { componentRegistry } from "@nextwebwg/html-next/runtime";
2
+ /** Reflect navigation requests into this example's bounded, consumer-owned page window. */
3
+ export default function setup(root) {
4
+ const navigate = (event) => {
5
+ const page = event.detail.page;
6
+ const values = [...new Set([1, page - 1, page, page + 1, 10])].filter(value => value >= 1 && value <= 10).sort((a, b) => a - b);
7
+ componentRegistry.update(event.target, { page, pages: values.map(value => ({ value })), hasPrevious: page > 1, hasNext: page < 10 });
8
+ };
9
+ root.addEventListener("navigate", navigate);
10
+ return () => root.removeEventListener("navigate", navigate);
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@threadlabs/looma",
3
- "version": "0.37.3",
3
+ "version": "0.37.5",
4
4
  "type": "module",
5
5
  "description": "Looma components as HTML, Vue, and plain DOM, with design tokens.",
6
6
  "license": "MIT",
@@ -129,6 +129,7 @@
129
129
  }
130
130
 
131
131
  :scope:where([data-component~="ui-button"]) {
132
+ --_button-square-size: var(--ui-button-min-block-size, var(--ui-control-size-md));
132
133
  appearance: none;
133
134
  min-block-size: var(--ui-button-min-block-size, var(--ui-control-size-md));
134
135
  border-style: solid;
@@ -193,6 +194,7 @@
193
194
  }
194
195
 
195
196
  :scope:where([data-component~="ui-button"])[data-ui-button-state~="size=xs"] {
197
+ --_button-square-size: 1.5rem;
196
198
  min-block-size: 1.5rem;
197
199
  padding: calc(var(--ui-space-0-5) * 1.5) calc(var(--ui-space-1) * 1.25) !important;
198
200
  font-size: var(--ui-font-size-xs);
@@ -203,17 +205,25 @@
203
205
  }
204
206
 
205
207
  :scope:where([data-component~="ui-button"])[data-ui-button-state~="size=sm"] {
208
+ --_button-square-size: var(--ui-control-size-sm);
206
209
  min-block-size: var(--ui-control-size-sm);
207
210
  padding: var(--ui-control-inset-block-sm, var(--ui-space-1)) var(--ui-action-inset-sm, var(--ui-space-2)) !important;
208
211
  font-size: var(--ui-font-size-sm);
209
212
  }
210
213
 
211
214
  :scope:where([data-component~="ui-button"])[data-ui-button-state~="size=lg"] {
215
+ --_button-square-size: var(--ui-control-size-lg);
212
216
  min-block-size: var(--ui-control-size-lg);
213
217
  padding: var(--ui-control-inset-block-lg, var(--ui-space-3)) var(--ui-action-inset-lg, var(--ui-space-4)) !important;
214
218
  font-size: var(--ui-font-size-md);
215
219
  }
216
220
 
221
+ /* Short numeric and icon actions share a minimum box; large values remain readable. */
222
+ :scope:where([data-component~="ui-button"])[data-ui-button-state~="square"]:not([data-appearance="link"], [data-appearance="card"]) {
223
+ min-inline-size: var(--_button-square-size);
224
+ padding-inline: var(--ui-space-1) !important;
225
+ }
226
+
217
227
  /* Card actions inherit Button's palette and behavior; only their shared layout changes.
218
228
  The icon may contain any decorative composition. Empty icons remove their column. */
219
229
  :scope:where([data-component~="ui-button"])[data-appearance="card"] {
@@ -530,6 +540,8 @@
530
540
  @supports (text-box-trim: trim-both) {
531
541
  }
532
542
 
543
+ /* Short numeric and icon actions share a minimum box; large values remain readable. */
544
+
533
545
  /* Card actions inherit Button's palette and behavior; only their shared layout changes.
534
546
  The icon may contain any decorative composition. Empty icons remove their column. */
535
547
 
@@ -0,0 +1 @@
1
+ /* Generated by HTML Next 1.0.0-alpha.69. Do not edit. */
@@ -20,6 +20,7 @@ export interface UiButtonProps {
20
20
  rel?: string | null;
21
21
  shape?: "rounded" | "pill" | null;
22
22
  size?: "xs" | "sm" | "md" | "lg" | null;
23
+ square?: boolean | null;
23
24
  stretch?: boolean | null;
24
25
  target?: string | null;
25
26
  tone?: "accent" | "neutral" | "danger" | "success" | "warning" | "info" | null;