@timeax/form-palette 0.1.13 → 0.1.14

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.
@@ -1412,11 +1412,7 @@ type CheckboxTriStateValue = true | false;
1412
1412
  * "none" is used to represent "no stance yet".
1413
1413
  */
1414
1414
  type CheckboxInternalState = true | false | "none";
1415
- interface CheckboxGroupEntry<TValue> {
1416
- value: TValue;
1417
- state: CheckboxTriStateValue;
1418
- }
1419
- type CheckboxGroupValue<TValue> = readonly CheckboxGroupEntry<TValue>[] | undefined;
1415
+ type CheckboxGroupValueMain<TValue extends string | number | symbol> = Record<TValue, CheckboxTriStateValue>;
1420
1416
  /**
1421
1417
  * Single checkbox value.
1422
1418
  * undefined → "none"
@@ -1430,7 +1426,7 @@ type CheckboxSingleValue = boolean | undefined;
1430
1426
  *
1431
1427
  * At the type level this is a union; at runtime we branch using `single`.
1432
1428
  */
1433
- type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValue<TValue>;
1429
+ type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue>;
1434
1430
  interface CheckboxItem<TValue> {
1435
1431
  value: TValue;
1436
1432
  label: React.ReactNode;
@@ -1412,11 +1412,7 @@ type CheckboxTriStateValue = true | false;
1412
1412
  * "none" is used to represent "no stance yet".
1413
1413
  */
1414
1414
  type CheckboxInternalState = true | false | "none";
1415
- interface CheckboxGroupEntry<TValue> {
1416
- value: TValue;
1417
- state: CheckboxTriStateValue;
1418
- }
1419
- type CheckboxGroupValue<TValue> = readonly CheckboxGroupEntry<TValue>[] | undefined;
1415
+ type CheckboxGroupValueMain<TValue extends string | number | symbol> = Record<TValue, CheckboxTriStateValue>;
1420
1416
  /**
1421
1417
  * Single checkbox value.
1422
1418
  * undefined → "none"
@@ -1430,7 +1426,7 @@ type CheckboxSingleValue = boolean | undefined;
1430
1426
  *
1431
1427
  * At the type level this is a union; at runtime we branch using `single`.
1432
1428
  */
1433
- type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValue<TValue>;
1429
+ type CheckboxVariantValue<TValue> = CheckboxSingleValue | CheckboxGroupValueMain<TValue>;
1434
1430
  interface CheckboxItem<TValue> {
1435
1431
  value: TValue;
1436
1432
  label: React.ReactNode;
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-DwDTiD7w.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-DwDTiD7w.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-B0VZEMYY.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-B0VZEMYY.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-ya4_MUaP.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-ya4_MUaP.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-BFcyKS5S.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-BFcyKS5S.js';
5
5
  import 'zod';
6
6
  import './adapter-CvjXO9Gi.js';
7
7
  import '@inertiajs/core';
package/dist/extra.js CHANGED
@@ -14400,7 +14400,7 @@ var ShadcnChipsVariant = React72__namespace.forwardRef(function ShadcnChipsVaria
14400
14400
  {
14401
14401
  "data-slot": "chips-upper",
14402
14402
  className: cn(
14403
- "flex items-center gap-1 text-xs",
14403
+ "flex items-center gap-1 text-xs flex-wrap",
14404
14404
  chipsClassName
14405
14405
  ),
14406
14406
  children: [
@@ -15686,7 +15686,9 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
15686
15686
  nativeEvent: void 0,
15687
15687
  meta: void 0
15688
15688
  };
15689
- onValue(nextList, detail);
15689
+ const value2 = {};
15690
+ nextList.forEach((item) => value2[item.value] = item.state);
15691
+ onValue(value2, detail);
15690
15692
  },
15691
15693
  [onValue, disabled, groupValue]
15692
15694
  );