@tangible/ui 0.2.43 → 0.2.44

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.
@@ -213,10 +213,13 @@ export function Pager({ currentPage, totalPages, onPageChange, pageSize, pageSiz
213
213
  next: labels.nextText,
214
214
  last: labels.lastText,
215
215
  }[it.kind];
216
+ // Boundary buttons are aria-disabled, not native disabled: Next
217
+ // becomes disabled by the very press that reaches the last page,
218
+ // and disabling the focused button would drop focus to <body>.
216
219
  if (navStyle === 'icon') {
217
- return (_jsx(IconButton, { icon: NAV_ICONS[it.kind], label: label, showTooltip: true, size: size, theme: "secondary", variant: navVariant, disabled: it.disabled, onClick: () => go(it.page), className: "tui-pager__item" }, it.kind));
220
+ return (_jsx(IconButton, { icon: NAV_ICONS[it.kind], label: label, showTooltip: true, size: size, theme: "secondary", variant: navVariant, "aria-disabled": it.disabled || undefined, onClick: () => !it.disabled && go(it.page), className: "tui-pager__item" }, it.kind));
218
221
  }
219
- return (_jsx(Button, { size: size, theme: "secondary", variant: navVariant, disabled: it.disabled, onClick: () => go(it.page), "aria-label": label, className: "tui-pager__item", children: text }, it.kind));
222
+ return (_jsx(Button, { size: size, theme: "secondary", variant: navVariant, "aria-disabled": it.disabled || undefined, onClick: () => !it.disabled && go(it.page), "aria-label": label, className: "tui-pager__item", children: text }, it.kind));
220
223
  }
221
224
  // Page number
222
225
  if (it.kind === 'page') {
@@ -1,6 +1,7 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
3
  import { cx } from '../../utils/cx.js';
4
+ import { Button } from '../Button/index.js';
4
5
  import { defaultBulkActionsBarLabels } from './types.js';
5
6
  export function BulkActionsBar({ count, onClear, clearLabel = 'Clear', children, className, 'aria-controls': ariaControls, labels: labelsProp, }) {
6
7
  const labels = { ...defaultBulkActionsBarLabels, ...labelsProp };
@@ -9,5 +10,5 @@ export function BulkActionsBar({ count, onClear, clearLabel = 'Clear', children,
9
10
  return (
10
11
  // role="group", not "toolbar" — toolbar implies roving arrow-key
11
12
  // navigation these independently-focusable controls don't implement.
12
- _jsxs("div", { role: "group", "aria-label": labels.actions(count), "aria-controls": ariaControls, className: cx('tui-table__bulkActions', className), children: [_jsx("span", { className: "tui-table__bulkActions__count", children: labels.selected(count) }), _jsxs("div", { className: "tui-table__bulkActions__actions", children: [children, onClear && (_jsx("button", { type: "button", onClick: onClear, className: "tui-table__bulkActions__clear tui-button is-style-outline is-size-xs", children: clearLabel }))] })] }));
13
+ _jsxs("div", { role: "group", "aria-label": labels.actions(count), "aria-controls": ariaControls, className: cx('tui-table__bulkActions', className), children: [_jsx("span", { className: "tui-table__bulkActions__count", children: labels.selected(count) }), _jsxs("div", { className: "tui-table__bulkActions__actions", children: [children, onClear && (_jsx(Button, { size: "sm", variant: "ghost", theme: "secondary", onClick: onClear, className: "tui-table__bulkActions__clear", children: clearLabel }))] })] }));
13
14
  }
package/figma-tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.43",
2
+ "version": "0.2.44",
3
3
  "source": "publish/styles/all.expanded.css",
4
4
  "prefix": "tui-",
5
5
  "note": "Layer 1 primitives only. Component API tokens (--tui-{component}-*) are never defined in CSS — they exist only as fallback reads — so they have no Figma representation. CONTRACT: consumers read TUI defaults from this file at build time (variables[].cssVar, the \"Light\"/\"Dark\" mode names, and alias chains into TUI/Primitives). Renaming a cssVar or a mode is a breaking change to those consumers even when the CSS value is unchanged — a rename silently becomes an undefined default downstream — so treat it as at least a minor bump and call it out in the CHANGELOG.",
package/icons/icons.svg CHANGED
@@ -1,4 +1,4 @@
1
- <svg xmlns="http://www.w3.org/2000/svg" data-tui-icon-sprite="all" data-tui-icon-sprite-version="0.2.43" aria-hidden="true" focusable="false" style="position:absolute;width:0;height:0;overflow:hidden">
1
+ <svg xmlns="http://www.w3.org/2000/svg" data-tui-icon-sprite="all" data-tui-icon-sprite-version="0.2.44" aria-hidden="true" focusable="false" style="position:absolute;width:0;height:0;overflow:hidden">
2
2
  <symbol id="tui-cred-badge-check" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M10.893 4.558a1.377 1.377 0 0 1 2.214 0c.381.515 1.068.7 1.656.444a1.377 1.377 0 0 1 1.917 1.106c.072.637.575 1.14 1.212 1.213a1.377 1.377 0 0 1 1.106 1.916 1.38 1.38 0 0 0 .444 1.656c.744.55.744 1.663 0 2.214a1.38 1.38 0 0 0-.444 1.656 1.377 1.377 0 0 1-1.106 1.917 1.38 1.38 0 0 0-1.212 1.212 1.377 1.377 0 0 1-1.917 1.106 1.38 1.38 0 0 0-1.656.444 1.377 1.377 0 0 1-2.214 0 1.38 1.38 0 0 0-1.656-.444 1.377 1.377 0 0 1-1.916-1.106 1.38 1.38 0 0 0-1.213-1.212 1.377 1.377 0 0 1-1.106-1.917 1.38 1.38 0 0 0-.444-1.656 1.377 1.377 0 0 1 0-2.214c.515-.381.7-1.068.444-1.656a1.377 1.377 0 0 1 1.106-1.916 1.38 1.38 0 0 0 1.213-1.213 1.377 1.377 0 0 1 1.916-1.106 1.38 1.38 0 0 0 1.656-.444m5.193 5.91a.75.75 0 0 0-1.172-.936l-3.531 4.414-1.914-1.532a.75.75 0 1 0-.937 1.172l3.085 2.468z" clip-rule="evenodd"/></symbol>
3
3
  <symbol id="tui-cred-badge-ribbon" viewBox="0 0 24 24"><path d="M11.032 3.488a1.205 1.205 0 0 1 1.936 0c.334.451.935.612 1.45.388a1.205 1.205 0 0 1 1.677.969c.063.557.503.997 1.06 1.06.805.092 1.291.935.969 1.678a1.204 1.204 0 0 0 .388 1.449c.65.481.65 1.455 0 1.936a1.205 1.205 0 0 0-.388 1.45 1.205 1.205 0 0 1-.969 1.677 1.204 1.204 0 0 0-1.06 1.06 1.205 1.205 0 0 1-1.678.969 1.205 1.205 0 0 0-1.449.388c-.481.65-1.455.65-1.936 0a1.204 1.204 0 0 0-1.45-.388 1.205 1.205 0 0 1-1.677-.969 1.205 1.205 0 0 0-1.06-1.06 1.205 1.205 0 0 1-.969-1.678 1.205 1.205 0 0 0-.388-1.449 1.205 1.205 0 0 1 0-1.936c.451-.334.612-.935.388-1.45a1.205 1.205 0 0 1 .969-1.677 1.205 1.205 0 0 0 1.06-1.06 1.205 1.205 0 0 1 1.678-.969 1.205 1.205 0 0 0 1.449-.388M8 17.482c.442.175.953.185 1.437-.025a.88.88 0 0 1 1.054.282 1.877 1.877 0 0 0 3.018 0 .88.88 0 0 1 1.054-.282c.484.21.995.2 1.437.025V21l-4-2.286L8 21z"/></symbol>
4
4
  <symbol id="tui-cred-badge" viewBox="0 0 24 24"><path d="M13.107 4.558a1.377 1.377 0 0 0-2.214 0c-.381.515-1.068.7-1.656.444a1.377 1.377 0 0 0-1.916 1.106 1.38 1.38 0 0 1-1.213 1.213 1.377 1.377 0 0 0-1.106 1.916 1.38 1.38 0 0 1-.444 1.656 1.377 1.377 0 0 0 0 2.214c.515.381.7 1.068.444 1.656a1.377 1.377 0 0 0 1.106 1.917c.637.072 1.14.575 1.213 1.212a1.377 1.377 0 0 0 1.916 1.106 1.38 1.38 0 0 1 1.656.444c.55.744 1.663.744 2.214 0a1.38 1.38 0 0 1 1.656-.444 1.377 1.377 0 0 0 1.917-1.106 1.38 1.38 0 0 1 1.212-1.212 1.377 1.377 0 0 0 1.106-1.917 1.38 1.38 0 0 1 .444-1.656 1.377 1.377 0 0 0 0-2.214 1.38 1.38 0 0 1-.444-1.656 1.377 1.377 0 0 0-1.106-1.916 1.38 1.38 0 0 1-1.212-1.213 1.377 1.377 0 0 0-1.917-1.106 1.38 1.38 0 0 1-1.656-.444"/></symbol>
@@ -1 +1 @@
1
- export const SPRITE_VERSION = '0.2.43';
1
+ export const SPRITE_VERSION = '0.2.44';
package/icons/sprite.php CHANGED
@@ -21,7 +21,7 @@
21
21
  */
22
22
 
23
23
  // Replaced with the package version at build time.
24
- $GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.43';
24
+ $GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.44';
25
25
 
26
26
  if (!function_exists('tangible_ui_print_icon_sprite')) {
27
27
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tangible/ui",
3
- "version": "0.2.43",
3
+ "version": "0.2.44",
4
4
  "description": "React design system for Tangible's products: standalone React apps and WordPress plugins. Components, CSS custom property tokens, cascade layers.",
5
5
  "type": "module",
6
6
  "main": "./components/index.js",
@@ -816,6 +816,18 @@ track and a bare `1fr` track alike. Use `grid-template-columns: minmax(0, 1fr)`,
816
816
  `min-width: 0` on the item. A DataTable placed directly in the track is fine: its root is the
817
817
  scroll container.
818
818
 
819
+ ### Fixed bars while a dialog is open
820
+
821
+ A Modal (CommandPalette, the vanilla modal) locks page scroll. With classic scrollbars that frees
822
+ the scrollbar's width, and TUI pads `<body>` by it so the page doesn't shift. `position: fixed`
823
+ elements ignore body padding, so an end-anchored bar of yours (an admin bar, a fixed header's
824
+ actions) would still move. While locked, `<body>` carries the width as
825
+ `--tui-scroll-lock-gutter-right` (or `-left` on a right-to-left page); shift by it:
826
+
827
+ ```css
828
+ .my-fixed-header { right: var(--tui-scroll-lock-gutter-right, 0px); }
829
+ ```
830
+
819
831
  ## Vanilla modal (no React)
820
832
 
821
833
  For templates and plugin PHP with no React build (Tangible Blocks, L&L): `@tangible/ui` ships a framework-free modal on the native `<dialog>`. It replaces MicroModal; there is no compat layer, so the markup differs.