@timeax/form-palette 0.1.15 → 0.1.17

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.
@@ -2116,7 +2116,7 @@ type NormalizedTreeItem = {
2116
2116
  raw: TreeSelectOption;
2117
2117
  };
2118
2118
 
2119
- type BadgeVariant$1 = "default" | "secondary" | "destructive" | "outline";
2119
+ type BadgeVariant$2 = "default" | "secondary" | "destructive" | "outline";
2120
2120
  type TreeSelectBaseProps = Pick<VariantBaseProps<TreeValue>, "value" | "onValue" | "error" | "disabled" | "readOnly" | "size" | "density"> & {
2121
2121
  options?: TreeSelectOption[];
2122
2122
  /**
@@ -2196,7 +2196,7 @@ type TreeSelectButtonModeProps = {
2196
2196
  */
2197
2197
  selectedBadge?: boolean;
2198
2198
  selectedBadgeHiddenWhenZero?: boolean;
2199
- selectedBadgeVariant?: BadgeVariant$1;
2199
+ selectedBadgeVariant?: BadgeVariant$2;
2200
2200
  selectedBadgeClassName?: string;
2201
2201
  selectedBadgePlacement?: "end" | "corner";
2202
2202
  leadingIcons?: never;
@@ -2260,7 +2260,7 @@ type CustomFileLoader = (ctx: {
2260
2260
  current: FileItem[];
2261
2261
  allowedTypes?: string[];
2262
2262
  }) => Promise<CustomFileLoaderResult> | CustomFileLoaderResult;
2263
- type BadgeVariant = React.ComponentProps<typeof Badge>["variant"];
2263
+ type BadgeVariant$1 = React.ComponentProps<typeof Badge>["variant"];
2264
2264
  type FileVariantExtras = {
2265
2265
  accept?: string | string[];
2266
2266
  maxFiles?: number;
@@ -2347,7 +2347,7 @@ type FileButtonModeProps = {
2347
2347
  /** Selected-count badge (mode="button" only) */
2348
2348
  selectedBadge?: boolean;
2349
2349
  selectedBadgeHiddenWhenZero?: boolean;
2350
- selectedBadgeVariant?: BadgeVariant;
2350
+ selectedBadgeVariant?: BadgeVariant$1;
2351
2351
  selectedBadgeClassName?: string;
2352
2352
  selectedBadgePlacement?: "end" | "corner";
2353
2353
  leadingIcons?: never;
@@ -3557,6 +3557,77 @@ type ListerVariantProps<TMode extends ListerMode, P extends PresetMap = PresetMa
3557
3557
  contentClassName?: string;
3558
3558
  };
3559
3559
 
3560
+ type IconGroup = {
3561
+ id: string;
3562
+ label: string;
3563
+ prefixes: string[];
3564
+ };
3565
+ type BadgeVariant = React.ComponentProps<typeof Badge>["variant"];
3566
+ type IconValue = string | string[] | null | undefined;
3567
+ type IconVariantBaseProps = Pick<VariantBaseProps<IconValue>, "value" | "onValue" | "error" | "disabled" | "readOnly" | "size" | "density"> & {
3568
+ /** When true, form value becomes string[]; else string */
3569
+ multiple?: boolean;
3570
+ /** Iconify API base url. Defaults to registry.iconPicker.url then Iconify default */
3571
+ url?: string;
3572
+ /** Groups available. Defaults to registry.iconPicker.groups then built-in defaults */
3573
+ groups?: IconGroup[];
3574
+ /** Restrict selectable groups by group id */
3575
+ allowedGroupIds?: string[];
3576
+ /** Search/group panel grid limit */
3577
+ maxRender?: number;
3578
+ placeholder?: string;
3579
+ className?: string;
3580
+ triggerClassName?: string;
3581
+ popoverClassName?: string;
3582
+ };
3583
+ type IconDefaultModeProps = {
3584
+ mode?: "default";
3585
+ leadingIcons?: React.ReactNode[];
3586
+ trailingIcons?: React.ReactNode[];
3587
+ icon?: React.ReactNode;
3588
+ leadingControl?: React.ReactNode;
3589
+ trailingControl?: React.ReactNode;
3590
+ leadingControlClassName?: string;
3591
+ trailingControlClassName?: string;
3592
+ joinControls?: boolean;
3593
+ extendBoxToControls?: boolean;
3594
+ button?: never;
3595
+ children?: never;
3596
+ selectedBadge?: never;
3597
+ selectedBadgeHiddenWhenZero?: never;
3598
+ selectedBadgeVariant?: never;
3599
+ selectedBadgeClassName?: never;
3600
+ selectedBadgePlacement?: never;
3601
+ };
3602
+ type IconButtonTrigger = React.ReactNode | ((ctx: {
3603
+ open: boolean;
3604
+ items: string[];
3605
+ selectedCount: number;
3606
+ disabled: boolean;
3607
+ }) => React.ReactNode);
3608
+ type IconButtonModeProps = {
3609
+ mode: "button";
3610
+ /** Used when mode="button". If provided, this is the trigger. If not, `children` is used. */
3611
+ button?: IconButtonTrigger;
3612
+ children?: IconButtonTrigger;
3613
+ /** Selected-count badge (mode="button" only) */
3614
+ selectedBadge?: boolean;
3615
+ selectedBadgeHiddenWhenZero?: boolean;
3616
+ selectedBadgeVariant?: BadgeVariant;
3617
+ selectedBadgeClassName?: string;
3618
+ selectedBadgePlacement?: "end" | "corner";
3619
+ leadingIcons?: never;
3620
+ trailingIcons?: never;
3621
+ icon?: never;
3622
+ leadingControl?: never;
3623
+ trailingControl?: never;
3624
+ leadingControlClassName?: never;
3625
+ trailingControlClassName?: never;
3626
+ joinControls?: never;
3627
+ extendBoxToControls?: never;
3628
+ };
3629
+ type ShadcnIconVariantProps = IconVariantBaseProps & (IconDefaultModeProps | IconButtonModeProps);
3630
+
3560
3631
  /**
3561
3632
  * Helper type for a single variant registry entry.
3562
3633
  *
@@ -3614,6 +3685,8 @@ interface Variants<H = unknown> {
3614
3685
  editor: VariantEntry<string | undefined, ShadcnEditorVariantProps>;
3615
3686
  'json-editor': VariantEntry<JsonObject | undefined, ShadcnJsonEditorProps>;
3616
3687
  lister: VariantEntry<any | undefined, ListerVariantProps<any>>;
3688
+ icon: VariantEntry<any, ShadcnIconVariantProps>;
3689
+ 'image-icon': VariantEntry<any, ShadcnIconVariantProps>;
3617
3690
  }
3618
3691
  /**
3619
3692
  * Union of all variant keys.
@@ -2116,7 +2116,7 @@ type NormalizedTreeItem = {
2116
2116
  raw: TreeSelectOption;
2117
2117
  };
2118
2118
 
2119
- type BadgeVariant$1 = "default" | "secondary" | "destructive" | "outline";
2119
+ type BadgeVariant$2 = "default" | "secondary" | "destructive" | "outline";
2120
2120
  type TreeSelectBaseProps = Pick<VariantBaseProps<TreeValue>, "value" | "onValue" | "error" | "disabled" | "readOnly" | "size" | "density"> & {
2121
2121
  options?: TreeSelectOption[];
2122
2122
  /**
@@ -2196,7 +2196,7 @@ type TreeSelectButtonModeProps = {
2196
2196
  */
2197
2197
  selectedBadge?: boolean;
2198
2198
  selectedBadgeHiddenWhenZero?: boolean;
2199
- selectedBadgeVariant?: BadgeVariant$1;
2199
+ selectedBadgeVariant?: BadgeVariant$2;
2200
2200
  selectedBadgeClassName?: string;
2201
2201
  selectedBadgePlacement?: "end" | "corner";
2202
2202
  leadingIcons?: never;
@@ -2260,7 +2260,7 @@ type CustomFileLoader = (ctx: {
2260
2260
  current: FileItem[];
2261
2261
  allowedTypes?: string[];
2262
2262
  }) => Promise<CustomFileLoaderResult> | CustomFileLoaderResult;
2263
- type BadgeVariant = React.ComponentProps<typeof Badge>["variant"];
2263
+ type BadgeVariant$1 = React.ComponentProps<typeof Badge>["variant"];
2264
2264
  type FileVariantExtras = {
2265
2265
  accept?: string | string[];
2266
2266
  maxFiles?: number;
@@ -2347,7 +2347,7 @@ type FileButtonModeProps = {
2347
2347
  /** Selected-count badge (mode="button" only) */
2348
2348
  selectedBadge?: boolean;
2349
2349
  selectedBadgeHiddenWhenZero?: boolean;
2350
- selectedBadgeVariant?: BadgeVariant;
2350
+ selectedBadgeVariant?: BadgeVariant$1;
2351
2351
  selectedBadgeClassName?: string;
2352
2352
  selectedBadgePlacement?: "end" | "corner";
2353
2353
  leadingIcons?: never;
@@ -3557,6 +3557,77 @@ type ListerVariantProps<TMode extends ListerMode, P extends PresetMap = PresetMa
3557
3557
  contentClassName?: string;
3558
3558
  };
3559
3559
 
3560
+ type IconGroup = {
3561
+ id: string;
3562
+ label: string;
3563
+ prefixes: string[];
3564
+ };
3565
+ type BadgeVariant = React.ComponentProps<typeof Badge>["variant"];
3566
+ type IconValue = string | string[] | null | undefined;
3567
+ type IconVariantBaseProps = Pick<VariantBaseProps<IconValue>, "value" | "onValue" | "error" | "disabled" | "readOnly" | "size" | "density"> & {
3568
+ /** When true, form value becomes string[]; else string */
3569
+ multiple?: boolean;
3570
+ /** Iconify API base url. Defaults to registry.iconPicker.url then Iconify default */
3571
+ url?: string;
3572
+ /** Groups available. Defaults to registry.iconPicker.groups then built-in defaults */
3573
+ groups?: IconGroup[];
3574
+ /** Restrict selectable groups by group id */
3575
+ allowedGroupIds?: string[];
3576
+ /** Search/group panel grid limit */
3577
+ maxRender?: number;
3578
+ placeholder?: string;
3579
+ className?: string;
3580
+ triggerClassName?: string;
3581
+ popoverClassName?: string;
3582
+ };
3583
+ type IconDefaultModeProps = {
3584
+ mode?: "default";
3585
+ leadingIcons?: React.ReactNode[];
3586
+ trailingIcons?: React.ReactNode[];
3587
+ icon?: React.ReactNode;
3588
+ leadingControl?: React.ReactNode;
3589
+ trailingControl?: React.ReactNode;
3590
+ leadingControlClassName?: string;
3591
+ trailingControlClassName?: string;
3592
+ joinControls?: boolean;
3593
+ extendBoxToControls?: boolean;
3594
+ button?: never;
3595
+ children?: never;
3596
+ selectedBadge?: never;
3597
+ selectedBadgeHiddenWhenZero?: never;
3598
+ selectedBadgeVariant?: never;
3599
+ selectedBadgeClassName?: never;
3600
+ selectedBadgePlacement?: never;
3601
+ };
3602
+ type IconButtonTrigger = React.ReactNode | ((ctx: {
3603
+ open: boolean;
3604
+ items: string[];
3605
+ selectedCount: number;
3606
+ disabled: boolean;
3607
+ }) => React.ReactNode);
3608
+ type IconButtonModeProps = {
3609
+ mode: "button";
3610
+ /** Used when mode="button". If provided, this is the trigger. If not, `children` is used. */
3611
+ button?: IconButtonTrigger;
3612
+ children?: IconButtonTrigger;
3613
+ /** Selected-count badge (mode="button" only) */
3614
+ selectedBadge?: boolean;
3615
+ selectedBadgeHiddenWhenZero?: boolean;
3616
+ selectedBadgeVariant?: BadgeVariant;
3617
+ selectedBadgeClassName?: string;
3618
+ selectedBadgePlacement?: "end" | "corner";
3619
+ leadingIcons?: never;
3620
+ trailingIcons?: never;
3621
+ icon?: never;
3622
+ leadingControl?: never;
3623
+ trailingControl?: never;
3624
+ leadingControlClassName?: never;
3625
+ trailingControlClassName?: never;
3626
+ joinControls?: never;
3627
+ extendBoxToControls?: never;
3628
+ };
3629
+ type ShadcnIconVariantProps = IconVariantBaseProps & (IconDefaultModeProps | IconButtonModeProps);
3630
+
3560
3631
  /**
3561
3632
  * Helper type for a single variant registry entry.
3562
3633
  *
@@ -3614,6 +3685,8 @@ interface Variants<H = unknown> {
3614
3685
  editor: VariantEntry<string | undefined, ShadcnEditorVariantProps>;
3615
3686
  'json-editor': VariantEntry<JsonObject | undefined, ShadcnJsonEditorProps>;
3616
3687
  lister: VariantEntry<any | undefined, ListerVariantProps<any>>;
3688
+ icon: VariantEntry<any, ShadcnIconVariantProps>;
3689
+ 'image-icon': VariantEntry<any, ShadcnIconVariantProps>;
3617
3690
  }
3618
3691
  /**
3619
3692
  * Union of all variant keys.
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-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';
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-BgfUlhu0.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-BgfUlhu0.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-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';
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-1lO-bk72.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-1lO-bk72.js';
5
5
  import 'zod';
6
6
  import './adapter-CvjXO9Gi.js';
7
7
  import '@inertiajs/core';