@tangible/ui 0.2.53 → 0.2.54

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.
@@ -9,21 +9,24 @@ import { isDev } from '../../utils/is-dev.js';
9
9
  // Checkbox Component
10
10
  // =============================================================================
11
11
  //
12
- // Custom <input type="checkbox"> with appearance: none, SVG checkmark/indeterminate
13
- // icons via background-image, and token-driven colors.
12
+ // Custom <input type="checkbox"> with appearance: none, a tick/dash drawn as a
13
+ // masked ::before in the fill's on-base colour, and token-driven colors.
14
14
  //
15
15
  // Bare (no label): returns <input> directly for Field.Control cloneElement.
16
16
  // With label: wraps in <label class="tui-inline-choice">.
17
17
  //
18
18
  // CSS token API (component layer, read via fallback):
19
19
  // --tui-checkbox-accent Accent color → --tui-input-accent → --tui-theme-primary-base
20
+ // --tui-checkbox-icon Tick/dash colour → --tui-theme-primary-on-base
20
21
  // --tui-checkbox-border Border color → --tui-input-border → --tui-color-border-control
22
+ // --tui-checkbox-border-hover Hover border (opt-in; default: no change)
21
23
  // --tui-checkbox-border-invalid Invalid border → --tui-theme-danger-base
22
24
  // --tui-checkbox-radius Border radius → --tui-radius-sm
23
25
  // --tui-checkbox-bg Background → --tui-color-bg
24
26
  // --tui-checkbox-size Font-size (controls box size via em units)
25
27
  // --tui-checkbox-gap Gap between checkbox and label (labeled mode)
26
28
  // --tui-checkbox-label-color Label text colour (labeled mode)
29
+ // --tui-checkbox-fg-disabled Label colour when disabled → --tui-color-fg-muted
27
30
  //
28
31
  // =============================================================================
29
32
  // Props that should route to the <input>, not the wrapper label
@@ -12,6 +12,7 @@ import { clampDay, daysInMonth, formatDay, formatDayTime, getMonthNames, withDay
12
12
  import { PickerTrigger, PickerTriggerProvider } from './PickerTrigger.js';
13
13
  import { defaultDatePickerLabels } from './types.js';
14
14
  import { Close as CloseIcon } from '../../icons/system/index.js';
15
+ import { isDev } from '../../utils/is-dev.js';
15
16
  // =============================================================================
16
17
  // DatePicker
17
18
  // =============================================================================
@@ -119,7 +120,7 @@ const DatePickerRoot = React.forwardRef(function DatePicker({ value: valueProp,
119
120
  triggerRendered.current = true;
120
121
  }, []);
121
122
  React.useEffect(() => {
122
- if (process.env.NODE_ENV === 'production')
123
+ if (!isDev())
123
124
  return;
124
125
  if (children != null && !triggerRendered.current) {
125
126
  console.warn('[tui] DatePicker: children were provided but no <DatePicker.Trigger> ' +
@@ -9,6 +9,7 @@ import { addMonths, formatDay, formatDayTime, formatNumeric, isBeforeDay, isSame
9
9
  import { defaultDateRangePresets } from './presets.js';
10
10
  import { PickerTrigger, PickerTriggerProvider } from './PickerTrigger.js';
11
11
  import { defaultDateRangePickerLabels } from './types.js';
12
+ import { isDev } from '../../utils/is-dev.js';
12
13
  // =============================================================================
13
14
  // DateRangePicker
14
15
  // =============================================================================
@@ -108,7 +109,7 @@ const DateRangePickerRoot = React.forwardRef(function DateRangePicker({ value: v
108
109
  triggerRendered.current = true;
109
110
  }, []);
110
111
  React.useEffect(() => {
111
- if (process.env.NODE_ENV === 'production')
112
+ if (!isDev())
112
113
  return;
113
114
  if (children != null && !triggerRendered.current) {
114
115
  console.warn('[tui] DateRangePicker: children were provided but no ' +
@@ -5,6 +5,7 @@ import { composeRefs, getElementRef } from '../../utils/compose-refs.js';
5
5
  import { Icon } from '../Icon/index.js';
6
6
  import { PopoverTrigger } from '../Popover/index.js';
7
7
  import { Calendar as CalendarIcon } from '../../icons/system/index.js';
8
+ import { isDev } from '../../utils/is-dev.js';
8
9
  const PickerTriggerContext = React.createContext(null);
9
10
  export const PickerTriggerProvider = PickerTriggerContext.Provider;
10
11
  export function PickerTrigger({ asChild = false, children, className }) {
@@ -22,7 +23,7 @@ export function PickerTrigger({ asChild = false, children, className }) {
22
23
  const composedRef = React.useMemo(() => composeRefs(ctx.forwardedRef, childRef), [ctx.forwardedRef, childRef]);
23
24
  if (asChild) {
24
25
  if (!React.isValidElement(children)) {
25
- if (process.env.NODE_ENV !== 'production') {
26
+ if (isDev()) {
26
27
  console.warn('[tui] Trigger: `asChild` needs a single React element child. ' +
27
28
  'Falling back to the built-in trigger.');
28
29
  }
package/figma-tokens.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.2.53",
2
+ "version": "0.2.54",
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.53" 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.54" 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.53';
1
+ export const SPRITE_VERSION = '0.2.54';
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.53';
24
+ $GLOBALS['tangible_ui_icon_sprite_copies'][__DIR__] = '0.2.54';
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.53",
3
+ "version": "0.2.54",
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",