@timeax/form-palette 0.1.27 → 0.1.29

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.
@@ -43,6 +43,13 @@ interface ChangeDetail<TMeta = unknown, TRaw = unknown> {
43
43
  * Example: original keyboard input or pasted string.
44
44
  */
45
45
  raw?: TRaw;
46
+ /**
47
+ * Raw selected option entries as provided by the variant input.
48
+ *
49
+ * For primitive options this contains primitives, for object options
50
+ * it contains the original objects.
51
+ */
52
+ selectedOptions?: unknown[];
46
53
  nativeEvent?: React__default.SyntheticEvent;
47
54
  /**
48
55
  * Variant-specific metadata (e.g. cursor position).
@@ -455,17 +462,13 @@ interface InputNumberValueChangeEvent {
455
462
  value: number | null;
456
463
  };
457
464
  }
458
- interface InputNumberProps extends Omit<ShadcnTextVariantProps, 'min' | 'max' | 'value'>, Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "onInput" | "onKeyDown" | "onKeyUp" | "size" | 'max' | 'min'> {
465
+ interface InputNumberProps extends Omit<ShadcnTextVariantProps, "min" | "max" | "value">, Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "onInput" | "onKeyDown" | "onKeyUp" | "size" | "max" | "min"> {
459
466
  onKeyUp?(event: React.KeyboardEvent<HTMLInputElement>): unknown;
460
467
  onKeyDown?(event: React.KeyboardEvent<HTMLInputElement>): unknown;
461
468
  value?: number | null;
462
- /**
463
- * Emitted when the numeric value changes (Prime-style).
464
- */
469
+ /** Emitted when the numeric value changes (Prime-style). */
465
470
  onValueChange?: (e: InputNumberValueChangeEvent) => void;
466
- /**
467
- * Optional simple change handler (numeric value).
468
- */
471
+ /** Optional simple change handler (numeric value). */
469
472
  onChange?: (e: {
470
473
  originalEvent: React.SyntheticEvent<any>;
471
474
  value: number | null;
@@ -483,15 +486,12 @@ interface InputNumberProps extends Omit<ShadcnTextVariantProps, 'min' | 'max' |
483
486
  max?: number | null;
484
487
  step?: number;
485
488
  allowEmpty?: boolean;
489
+ /** If false: show raw (no Intl formatting) even when blurred */
486
490
  format?: boolean;
487
491
  inputId?: string;
488
492
  inputClassName?: string;
489
493
  inputStyle?: React.CSSProperties;
490
494
  inputRef?: React.Ref<InputRef> | null;
491
- /**
492
- * String prefix/suffix (like Prime). They are part of formatting logic.
493
- * You can ALSO forward them to your text variant as visual adornments.
494
- */
495
495
  prefix?: string;
496
496
  suffix?: string;
497
497
  size?: FieldSize;
@@ -1256,6 +1256,7 @@ interface RadioItem<TValue> {
1256
1256
  description?: React.ReactNode;
1257
1257
  disabled?: boolean;
1258
1258
  key?: React.Key;
1259
+ raw?: unknown;
1259
1260
  /**
1260
1261
  * Option-level renderer (provided by the normaliser).
1261
1262
  * If present, it overrides the variant-level `renderOption` for this item.
@@ -1412,6 +1413,7 @@ type CheckboxTriStateValue = true | false;
1412
1413
  * "none" is used to represent "no stance yet".
1413
1414
  */
1414
1415
  type CheckboxInternalState = true | false | "none";
1416
+ type CheckboxGroupSelectedValue<TValue> = readonly TValue[] | undefined;
1415
1417
  type CheckboxGroupValueMain<TValue extends string | number | symbol> = Record<TValue, CheckboxTriStateValue>;
1416
1418
  /**
1417
1419
  * Single checkbox value.
@@ -1426,13 +1428,14 @@ type CheckboxSingleValue = boolean | undefined;
1426
1428
  *
1427
1429
  * At the type level this is a union; at runtime we branch using `single`.
1428
1430
  */
1429
- type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue>;
1431
+ type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue> | CheckboxGroupSelectedValue<TValue>;
1430
1432
  interface CheckboxItem<TValue> {
1431
1433
  value: TValue;
1432
1434
  label: React.ReactNode;
1433
1435
  description?: React.ReactNode;
1434
1436
  disabled?: boolean;
1435
1437
  key?: React.Key;
1438
+ raw?: unknown;
1436
1439
  /**
1437
1440
  * Option-level renderer (provided by the normaliser).
1438
1441
  * If present, it should override the variant-level `renderOption` for this item.
@@ -1612,7 +1615,8 @@ type DefaultCheckboxItemValue = string | number;
1612
1615
  * Public "value" type for the checkbox variant used by the registry:
1613
1616
  *
1614
1617
  * - Single mode: boolean | undefined
1615
- * - Group mode: CheckboxGroupEntry<DefaultCheckboxItemValue>[] | undefined
1618
+ * - Group mode (non-tristate): DefaultCheckboxItemValue[] | undefined
1619
+ * - Group mode (tristate): Record<DefaultCheckboxItemValue, true | false>
1616
1620
  *
1617
1621
  * In tri-state group mode, both `true` and `false` entries are present;
1618
1622
  * `"none"` never appears in this type.
@@ -43,6 +43,13 @@ interface ChangeDetail<TMeta = unknown, TRaw = unknown> {
43
43
  * Example: original keyboard input or pasted string.
44
44
  */
45
45
  raw?: TRaw;
46
+ /**
47
+ * Raw selected option entries as provided by the variant input.
48
+ *
49
+ * For primitive options this contains primitives, for object options
50
+ * it contains the original objects.
51
+ */
52
+ selectedOptions?: unknown[];
46
53
  nativeEvent?: React__default.SyntheticEvent;
47
54
  /**
48
55
  * Variant-specific metadata (e.g. cursor position).
@@ -455,17 +462,13 @@ interface InputNumberValueChangeEvent {
455
462
  value: number | null;
456
463
  };
457
464
  }
458
- interface InputNumberProps extends Omit<ShadcnTextVariantProps, 'min' | 'max' | 'value'>, Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "onInput" | "onKeyDown" | "onKeyUp" | "size" | 'max' | 'min'> {
465
+ interface InputNumberProps extends Omit<ShadcnTextVariantProps, "min" | "max" | "value">, Omit<React.InputHTMLAttributes<HTMLInputElement>, "value" | "defaultValue" | "onChange" | "onInput" | "onKeyDown" | "onKeyUp" | "size" | "max" | "min"> {
459
466
  onKeyUp?(event: React.KeyboardEvent<HTMLInputElement>): unknown;
460
467
  onKeyDown?(event: React.KeyboardEvent<HTMLInputElement>): unknown;
461
468
  value?: number | null;
462
- /**
463
- * Emitted when the numeric value changes (Prime-style).
464
- */
469
+ /** Emitted when the numeric value changes (Prime-style). */
465
470
  onValueChange?: (e: InputNumberValueChangeEvent) => void;
466
- /**
467
- * Optional simple change handler (numeric value).
468
- */
471
+ /** Optional simple change handler (numeric value). */
469
472
  onChange?: (e: {
470
473
  originalEvent: React.SyntheticEvent<any>;
471
474
  value: number | null;
@@ -483,15 +486,12 @@ interface InputNumberProps extends Omit<ShadcnTextVariantProps, 'min' | 'max' |
483
486
  max?: number | null;
484
487
  step?: number;
485
488
  allowEmpty?: boolean;
489
+ /** If false: show raw (no Intl formatting) even when blurred */
486
490
  format?: boolean;
487
491
  inputId?: string;
488
492
  inputClassName?: string;
489
493
  inputStyle?: React.CSSProperties;
490
494
  inputRef?: React.Ref<InputRef> | null;
491
- /**
492
- * String prefix/suffix (like Prime). They are part of formatting logic.
493
- * You can ALSO forward them to your text variant as visual adornments.
494
- */
495
495
  prefix?: string;
496
496
  suffix?: string;
497
497
  size?: FieldSize;
@@ -1256,6 +1256,7 @@ interface RadioItem<TValue> {
1256
1256
  description?: React.ReactNode;
1257
1257
  disabled?: boolean;
1258
1258
  key?: React.Key;
1259
+ raw?: unknown;
1259
1260
  /**
1260
1261
  * Option-level renderer (provided by the normaliser).
1261
1262
  * If present, it overrides the variant-level `renderOption` for this item.
@@ -1412,6 +1413,7 @@ type CheckboxTriStateValue = true | false;
1412
1413
  * "none" is used to represent "no stance yet".
1413
1414
  */
1414
1415
  type CheckboxInternalState = true | false | "none";
1416
+ type CheckboxGroupSelectedValue<TValue> = readonly TValue[] | undefined;
1415
1417
  type CheckboxGroupValueMain<TValue extends string | number | symbol> = Record<TValue, CheckboxTriStateValue>;
1416
1418
  /**
1417
1419
  * Single checkbox value.
@@ -1426,13 +1428,14 @@ type CheckboxSingleValue = boolean | undefined;
1426
1428
  *
1427
1429
  * At the type level this is a union; at runtime we branch using `single`.
1428
1430
  */
1429
- type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue>;
1431
+ type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue> | CheckboxGroupSelectedValue<TValue>;
1430
1432
  interface CheckboxItem<TValue> {
1431
1433
  value: TValue;
1432
1434
  label: React.ReactNode;
1433
1435
  description?: React.ReactNode;
1434
1436
  disabled?: boolean;
1435
1437
  key?: React.Key;
1438
+ raw?: unknown;
1436
1439
  /**
1437
1440
  * Option-level renderer (provided by the normaliser).
1438
1441
  * If present, it should override the variant-level `renderOption` for this item.
@@ -1612,7 +1615,8 @@ type DefaultCheckboxItemValue = string | number;
1612
1615
  * Public "value" type for the checkbox variant used by the registry:
1613
1616
  *
1614
1617
  * - Single mode: boolean | undefined
1615
- * - Group mode: CheckboxGroupEntry<DefaultCheckboxItemValue>[] | undefined
1618
+ * - Group mode (non-tristate): DefaultCheckboxItemValue[] | undefined
1619
+ * - Group mode (tristate): Record<DefaultCheckboxItemValue, true | false>
1616
1620
  *
1617
1621
  * In tri-state group mode, both `true` and `false` entries are present;
1618
1622
  * `"none"` never appears in this type.
package/dist/extra.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-BxK4PLut.mjs';
4
- export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-BxK4PLut.mjs';
3
+ import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-74nd0n1e.mjs';
4
+ export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-74nd0n1e.mjs';
5
5
  import 'zod';
6
6
  import './adapter-CvjXO9Gi.mjs';
7
7
  import '@inertiajs/core';
package/dist/extra.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-DDFFngF0.js';
4
- export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-DDFFngF0.js';
3
+ import { Q as ListerSearchPayload, U as ListerId, W as ListerDefinition, X as ListerOption, Y as PresetMap, Z as ListerApi, _ as ListerStoreState, $ as ListerSessionId, a0 as ListerSearchTarget, a1 as ListerSearchMode, a2 as ListerFilterCtx, a3 as ListerDetails, a4 as ListerProviderHost, a5 as ListerRuntimeState, a6 as ShadcnJsonEditorProps, a7 as JsonEditorIndexHandle } from './core-B8Htm7S-.js';
4
+ export { ad as ListerChangeEvent, am as ListerFilterApply, al as ListerFilterApplyMode, an as ListerFilterBindKey, ap as ListerFilterGroupOption, ao as ListerFilterInput, ar as ListerFilterInputOption, as as ListerFilterOption, at as ListerFilterSpec, aq as ListerFilterValueOption, af as ListerLogCode, ag as ListerLogEntry, ae as ListerLogLevel, ai as ListerMapping, a8 as ListerMode, ax as ListerOpenOptions, a9 as ListerOpenReason, ay as ListerOpenResult, aw as ListerOptionsForMode, ah as ListerPermissionCtx, av as ListerRawForMode, ak as ListerSearchSpec, aD as ListerSessionState, aj as ListerSource, au as ListerValueForMode, ac as OpenAnchor, aB as PresetFilters, aC as PresetMeta, az as PresetRaw, aA as PresetValue, ab as Resolver, aa as Selector } from './core-B8Htm7S-.js';
5
5
  import 'zod';
6
6
  import './adapter-CvjXO9Gi.js';
7
7
  import '@inertiajs/core';