@timeax/form-palette 0.0.13 → 0.0.15
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.
- package/dist/index.d.mts +54 -7
- package/dist/index.d.ts +54 -7
- package/dist/index.js +88 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -1940,6 +1940,7 @@ interface ShadcnRadioUiProps<TItem, TValue> {
|
|
|
1940
1940
|
* - `RadioItem<TValue>[]`, or
|
|
1941
1941
|
* - any custom TItem[] when used with mapping functions
|
|
1942
1942
|
* or optionValue/optionLabel keys.
|
|
1943
|
+
* - primitive arrays such as `string[]` or `number[]` (fallback).
|
|
1943
1944
|
*/
|
|
1944
1945
|
items: readonly TItem[];
|
|
1945
1946
|
/**
|
|
@@ -1996,6 +1997,11 @@ interface ShadcnRadioUiProps<TItem, TValue> {
|
|
|
1996
1997
|
* Default: "comfortable".
|
|
1997
1998
|
*/
|
|
1998
1999
|
density?: RadioDensity;
|
|
2000
|
+
/**
|
|
2001
|
+
* When true, capitalizes the **first letter** of the label
|
|
2002
|
+
* (only applied when the label is a string).
|
|
2003
|
+
*/
|
|
2004
|
+
autoCap?: boolean;
|
|
1999
2005
|
/**
|
|
2000
2006
|
* ARIA overrides for the group.
|
|
2001
2007
|
*/
|
|
@@ -2166,6 +2172,11 @@ interface ShadcnCheckboxUiProps<TItem, TValue> {
|
|
|
2166
2172
|
* Default: "comfortable".
|
|
2167
2173
|
*/
|
|
2168
2174
|
density?: CheckboxDensity;
|
|
2175
|
+
/**
|
|
2176
|
+
* When true, capitalizes the first letter of the label
|
|
2177
|
+
* (only applied when the label is a string).
|
|
2178
|
+
*/
|
|
2179
|
+
autoCap?: boolean;
|
|
2169
2180
|
/**
|
|
2170
2181
|
* ARIA attributes for the group wrapper.
|
|
2171
2182
|
*/
|
|
@@ -3241,20 +3252,56 @@ interface CoreRootProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
|
3241
3252
|
declare function CoreRoot(props: CoreRootProps): react_jsx_runtime.JSX.Element;
|
|
3242
3253
|
|
|
3243
3254
|
/**
|
|
3244
|
-
*
|
|
3245
|
-
*
|
|
3246
|
-
* Usage:
|
|
3247
|
-
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3248
|
-
* {...fields + buttons...}
|
|
3249
|
-
* </CoreShell>
|
|
3255
|
+
* Shared base props for CoreShell, independent of wrapping behaviour.
|
|
3250
3256
|
*/
|
|
3251
|
-
type
|
|
3257
|
+
type CoreShellBaseProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreProps<V, S, K> & {
|
|
3252
3258
|
/**
|
|
3253
3259
|
* Props passed directly to the underlying <form> element via CoreRoot.
|
|
3254
3260
|
*/
|
|
3255
3261
|
formProps?: CoreRootProps;
|
|
3256
3262
|
children?: React.ReactNode;
|
|
3257
3263
|
};
|
|
3264
|
+
/**
|
|
3265
|
+
* When `wrapped` is true, you can provide gap/contentClassName.
|
|
3266
|
+
*/
|
|
3267
|
+
type CoreShellWrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3268
|
+
wrapped: true;
|
|
3269
|
+
/**
|
|
3270
|
+
* Gap for the inner wrapper. You can still control layout
|
|
3271
|
+
* (flex/grid/etc.) via `contentClassName`.
|
|
3272
|
+
*/
|
|
3273
|
+
gap?: React.CSSProperties["gap"];
|
|
3274
|
+
/**
|
|
3275
|
+
* Class applied to the wrapper around children.
|
|
3276
|
+
*/
|
|
3277
|
+
contentClassName?: string;
|
|
3278
|
+
};
|
|
3279
|
+
/**
|
|
3280
|
+
* When `wrapped` is not true (false/undefined), gap/contentClassName
|
|
3281
|
+
* are not allowed.
|
|
3282
|
+
*/
|
|
3283
|
+
type CoreShellUnwrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3284
|
+
wrapped?: false | undefined;
|
|
3285
|
+
};
|
|
3286
|
+
type CoreShellProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellWrappedProps<V, S, K> | CoreShellUnwrappedProps<V, S, K>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Combined provider + form-root wrapper.
|
|
3289
|
+
*
|
|
3290
|
+
* Usage:
|
|
3291
|
+
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3292
|
+
* {...fields + buttons...}
|
|
3293
|
+
* </CoreShell>
|
|
3294
|
+
*
|
|
3295
|
+
* <CoreShell
|
|
3296
|
+
* adapter="local"
|
|
3297
|
+
* schema={schema}
|
|
3298
|
+
* wrapped
|
|
3299
|
+
* gap="1rem"
|
|
3300
|
+
* contentClassName="flex flex-col"
|
|
3301
|
+
* >
|
|
3302
|
+
* {...fields + buttons...}
|
|
3303
|
+
* </CoreShell>
|
|
3304
|
+
*/
|
|
3258
3305
|
declare function CoreShell<V extends Dict, S extends z.ZodType | undefined, K extends AdapterKey = "local">(props: CoreShellProps<V, S, K>): react_jsx_runtime.JSX.Element;
|
|
3259
3306
|
|
|
3260
3307
|
interface UseButtonOptions {
|
package/dist/index.d.ts
CHANGED
|
@@ -1940,6 +1940,7 @@ interface ShadcnRadioUiProps<TItem, TValue> {
|
|
|
1940
1940
|
* - `RadioItem<TValue>[]`, or
|
|
1941
1941
|
* - any custom TItem[] when used with mapping functions
|
|
1942
1942
|
* or optionValue/optionLabel keys.
|
|
1943
|
+
* - primitive arrays such as `string[]` or `number[]` (fallback).
|
|
1943
1944
|
*/
|
|
1944
1945
|
items: readonly TItem[];
|
|
1945
1946
|
/**
|
|
@@ -1996,6 +1997,11 @@ interface ShadcnRadioUiProps<TItem, TValue> {
|
|
|
1996
1997
|
* Default: "comfortable".
|
|
1997
1998
|
*/
|
|
1998
1999
|
density?: RadioDensity;
|
|
2000
|
+
/**
|
|
2001
|
+
* When true, capitalizes the **first letter** of the label
|
|
2002
|
+
* (only applied when the label is a string).
|
|
2003
|
+
*/
|
|
2004
|
+
autoCap?: boolean;
|
|
1999
2005
|
/**
|
|
2000
2006
|
* ARIA overrides for the group.
|
|
2001
2007
|
*/
|
|
@@ -2166,6 +2172,11 @@ interface ShadcnCheckboxUiProps<TItem, TValue> {
|
|
|
2166
2172
|
* Default: "comfortable".
|
|
2167
2173
|
*/
|
|
2168
2174
|
density?: CheckboxDensity;
|
|
2175
|
+
/**
|
|
2176
|
+
* When true, capitalizes the first letter of the label
|
|
2177
|
+
* (only applied when the label is a string).
|
|
2178
|
+
*/
|
|
2179
|
+
autoCap?: boolean;
|
|
2169
2180
|
/**
|
|
2170
2181
|
* ARIA attributes for the group wrapper.
|
|
2171
2182
|
*/
|
|
@@ -3241,20 +3252,56 @@ interface CoreRootProps extends React.FormHTMLAttributes<HTMLFormElement> {
|
|
|
3241
3252
|
declare function CoreRoot(props: CoreRootProps): react_jsx_runtime.JSX.Element;
|
|
3242
3253
|
|
|
3243
3254
|
/**
|
|
3244
|
-
*
|
|
3245
|
-
*
|
|
3246
|
-
* Usage:
|
|
3247
|
-
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3248
|
-
* {...fields + buttons...}
|
|
3249
|
-
* </CoreShell>
|
|
3255
|
+
* Shared base props for CoreShell, independent of wrapping behaviour.
|
|
3250
3256
|
*/
|
|
3251
|
-
type
|
|
3257
|
+
type CoreShellBaseProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreProps<V, S, K> & {
|
|
3252
3258
|
/**
|
|
3253
3259
|
* Props passed directly to the underlying <form> element via CoreRoot.
|
|
3254
3260
|
*/
|
|
3255
3261
|
formProps?: CoreRootProps;
|
|
3256
3262
|
children?: React.ReactNode;
|
|
3257
3263
|
};
|
|
3264
|
+
/**
|
|
3265
|
+
* When `wrapped` is true, you can provide gap/contentClassName.
|
|
3266
|
+
*/
|
|
3267
|
+
type CoreShellWrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3268
|
+
wrapped: true;
|
|
3269
|
+
/**
|
|
3270
|
+
* Gap for the inner wrapper. You can still control layout
|
|
3271
|
+
* (flex/grid/etc.) via `contentClassName`.
|
|
3272
|
+
*/
|
|
3273
|
+
gap?: React.CSSProperties["gap"];
|
|
3274
|
+
/**
|
|
3275
|
+
* Class applied to the wrapper around children.
|
|
3276
|
+
*/
|
|
3277
|
+
contentClassName?: string;
|
|
3278
|
+
};
|
|
3279
|
+
/**
|
|
3280
|
+
* When `wrapped` is not true (false/undefined), gap/contentClassName
|
|
3281
|
+
* are not allowed.
|
|
3282
|
+
*/
|
|
3283
|
+
type CoreShellUnwrappedProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellBaseProps<V, S, K> & {
|
|
3284
|
+
wrapped?: false | undefined;
|
|
3285
|
+
};
|
|
3286
|
+
type CoreShellProps<V extends Dict = Dict, S extends z.ZodType | undefined = z.ZodType | undefined, K extends AdapterKey = "local"> = CoreShellWrappedProps<V, S, K> | CoreShellUnwrappedProps<V, S, K>;
|
|
3287
|
+
/**
|
|
3288
|
+
* Combined provider + form-root wrapper.
|
|
3289
|
+
*
|
|
3290
|
+
* Usage:
|
|
3291
|
+
* <CoreShell adapter="local" schema={schema} formProps={{ className: "space-y-4" }}>
|
|
3292
|
+
* {...fields + buttons...}
|
|
3293
|
+
* </CoreShell>
|
|
3294
|
+
*
|
|
3295
|
+
* <CoreShell
|
|
3296
|
+
* adapter="local"
|
|
3297
|
+
* schema={schema}
|
|
3298
|
+
* wrapped
|
|
3299
|
+
* gap="1rem"
|
|
3300
|
+
* contentClassName="flex flex-col"
|
|
3301
|
+
* >
|
|
3302
|
+
* {...fields + buttons...}
|
|
3303
|
+
* </CoreShell>
|
|
3304
|
+
*/
|
|
3258
3305
|
declare function CoreShell<V extends Dict, S extends z.ZodType | undefined, K extends AdapterKey = "local">(props: CoreShellProps<V, S, K>): react_jsx_runtime.JSX.Element;
|
|
3259
3306
|
|
|
3260
3307
|
interface UseButtonOptions {
|
package/dist/index.js
CHANGED
|
@@ -14090,6 +14090,26 @@ function CoreRoot(props) {
|
|
|
14090
14090
|
] });
|
|
14091
14091
|
}
|
|
14092
14092
|
function CoreShell(props) {
|
|
14093
|
+
if (props.wrapped) {
|
|
14094
|
+
const {
|
|
14095
|
+
formProps: formProps2,
|
|
14096
|
+
children: children2,
|
|
14097
|
+
wrapped,
|
|
14098
|
+
// eslint-disable-line @typescript-eslint/no-unused-vars
|
|
14099
|
+
gap,
|
|
14100
|
+
contentClassName,
|
|
14101
|
+
...coreProps2
|
|
14102
|
+
} = props;
|
|
14103
|
+
const content = /* @__PURE__ */ jsxRuntime.jsx(
|
|
14104
|
+
"div",
|
|
14105
|
+
{
|
|
14106
|
+
className: contentClassName,
|
|
14107
|
+
style: gap !== void 0 ? { gap } : void 0,
|
|
14108
|
+
children: children2
|
|
14109
|
+
}
|
|
14110
|
+
);
|
|
14111
|
+
return /* @__PURE__ */ jsxRuntime.jsx(CoreProvider, { ...coreProps2, children: /* @__PURE__ */ jsxRuntime.jsx(CoreRoot, { ...formProps2 != null ? formProps2 : {}, children: content }) });
|
|
14112
|
+
}
|
|
14093
14113
|
const { formProps, children, ...coreProps } = props;
|
|
14094
14114
|
return /* @__PURE__ */ jsxRuntime.jsx(CoreProvider, { ...coreProps, children: /* @__PURE__ */ jsxRuntime.jsx(CoreRoot, { ...formProps != null ? formProps : {}, children }) });
|
|
14095
14115
|
}
|
|
@@ -35460,6 +35480,10 @@ function descriptionTextSize(size4) {
|
|
|
35460
35480
|
return "text-xs";
|
|
35461
35481
|
}
|
|
35462
35482
|
}
|
|
35483
|
+
function capitalizeFirst(label) {
|
|
35484
|
+
if (!label) return label;
|
|
35485
|
+
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
35486
|
+
}
|
|
35463
35487
|
function normalizeItems(items, mappers, optionValueKey, optionLabelKey) {
|
|
35464
35488
|
if (mappers) {
|
|
35465
35489
|
return items.map((item, index2) => ({
|
|
@@ -35489,7 +35513,19 @@ function normalizeItems(items, mappers, optionValueKey, optionLabelKey) {
|
|
|
35489
35513
|
};
|
|
35490
35514
|
});
|
|
35491
35515
|
}
|
|
35492
|
-
return items
|
|
35516
|
+
return items.map((item, index2) => {
|
|
35517
|
+
if (typeof item === "string" || typeof item === "number" || typeof item === "boolean") {
|
|
35518
|
+
const v = item;
|
|
35519
|
+
return {
|
|
35520
|
+
value: v,
|
|
35521
|
+
label: String(item),
|
|
35522
|
+
description: void 0,
|
|
35523
|
+
disabled: false,
|
|
35524
|
+
key: index2
|
|
35525
|
+
};
|
|
35526
|
+
}
|
|
35527
|
+
return item;
|
|
35528
|
+
});
|
|
35493
35529
|
}
|
|
35494
35530
|
function isEqualValue(a, b) {
|
|
35495
35531
|
return Object.is(a, b);
|
|
@@ -35513,6 +35549,7 @@ var InnerShadcnRadioVariant = (props, ref) => {
|
|
|
35513
35549
|
itemGapPx,
|
|
35514
35550
|
size: size4 = "md",
|
|
35515
35551
|
density = "comfortable",
|
|
35552
|
+
autoCap = false,
|
|
35516
35553
|
"aria-label": ariaLabel,
|
|
35517
35554
|
"aria-labelledby": ariaLabelledBy,
|
|
35518
35555
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -35632,6 +35669,13 @@ var InnerShadcnRadioVariant = (props, ref) => {
|
|
|
35632
35669
|
const optionDisabled = !!disabled || !!item.disabled;
|
|
35633
35670
|
const optionKey = (_a = item.key) != null ? _a : index2;
|
|
35634
35671
|
const optionId = id ? `${id}-option-${optionKey}` : void 0;
|
|
35672
|
+
let displayItem = item;
|
|
35673
|
+
if (autoCap && typeof item.label === "string") {
|
|
35674
|
+
displayItem = {
|
|
35675
|
+
...item,
|
|
35676
|
+
label: capitalizeFirst(item.label)
|
|
35677
|
+
};
|
|
35678
|
+
}
|
|
35635
35679
|
const radioNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
35636
35680
|
RadioGroupItem2,
|
|
35637
35681
|
{
|
|
@@ -35650,7 +35694,7 @@ var InnerShadcnRadioVariant = (props, ref) => {
|
|
|
35650
35694
|
"data-disabled": optionDisabled ? "true" : "false",
|
|
35651
35695
|
className: baseOptionClass,
|
|
35652
35696
|
children: renderOption({
|
|
35653
|
-
item,
|
|
35697
|
+
item: displayItem,
|
|
35654
35698
|
index: index2,
|
|
35655
35699
|
selected,
|
|
35656
35700
|
disabled: optionDisabled,
|
|
@@ -35678,8 +35722,8 @@ var InnerShadcnRadioVariant = (props, ref) => {
|
|
|
35678
35722
|
children: [
|
|
35679
35723
|
radioNode,
|
|
35680
35724
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col min-w-0", children: [
|
|
35681
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelClassesBase, children:
|
|
35682
|
-
|
|
35725
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelClassesBase, children: displayItem.label }),
|
|
35726
|
+
displayItem.description != null && /* @__PURE__ */ jsxRuntime.jsx("span", { className: descriptionClassesBase, children: displayItem.description })
|
|
35683
35727
|
] })
|
|
35684
35728
|
]
|
|
35685
35729
|
}
|
|
@@ -36175,6 +36219,10 @@ function descriptionTextSize2(size4) {
|
|
|
36175
36219
|
return "text-xs";
|
|
36176
36220
|
}
|
|
36177
36221
|
}
|
|
36222
|
+
function capitalizeFirst2(label) {
|
|
36223
|
+
if (!label) return label;
|
|
36224
|
+
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
36225
|
+
}
|
|
36178
36226
|
function normalizeItems2(items, mappers, optionValueKey, optionLabelKey) {
|
|
36179
36227
|
if (!items || !items.length) return [];
|
|
36180
36228
|
if (mappers) {
|
|
@@ -36208,7 +36256,20 @@ function normalizeItems2(items, mappers, optionValueKey, optionLabelKey) {
|
|
|
36208
36256
|
};
|
|
36209
36257
|
});
|
|
36210
36258
|
}
|
|
36211
|
-
return items
|
|
36259
|
+
return items.map((item, index2) => {
|
|
36260
|
+
if (typeof item === "string" || typeof item === "number" || typeof item === "boolean") {
|
|
36261
|
+
const v = item;
|
|
36262
|
+
return {
|
|
36263
|
+
value: v,
|
|
36264
|
+
label: String(item),
|
|
36265
|
+
description: void 0,
|
|
36266
|
+
disabled: false,
|
|
36267
|
+
key: index2,
|
|
36268
|
+
tristate: void 0
|
|
36269
|
+
};
|
|
36270
|
+
}
|
|
36271
|
+
return item;
|
|
36272
|
+
});
|
|
36212
36273
|
}
|
|
36213
36274
|
function isEqualValue2(a, b) {
|
|
36214
36275
|
return Object.is(a, b);
|
|
@@ -36244,6 +36305,7 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
|
|
|
36244
36305
|
itemGapPx,
|
|
36245
36306
|
size: size4 = "md",
|
|
36246
36307
|
density = "comfortable",
|
|
36308
|
+
autoCap = false,
|
|
36247
36309
|
"aria-label": ariaLabel,
|
|
36248
36310
|
"aria-labelledby": ariaLabelledBy,
|
|
36249
36311
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -36281,7 +36343,10 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
|
|
|
36281
36343
|
};
|
|
36282
36344
|
onValue(nextPublic, detail);
|
|
36283
36345
|
};
|
|
36284
|
-
|
|
36346
|
+
let labelText = singleLabel != null ? singleLabel : void 0;
|
|
36347
|
+
if (autoCap && typeof labelText === "string") {
|
|
36348
|
+
labelText = capitalizeFirst2(labelText);
|
|
36349
|
+
}
|
|
36285
36350
|
const descriptionText = singleDescription != null ? singleDescription : void 0;
|
|
36286
36351
|
const labelCls = cn(
|
|
36287
36352
|
"text-foreground",
|
|
@@ -36479,6 +36544,13 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
|
|
|
36479
36544
|
const optionDisabled = !!disabled || !!item.disabled;
|
|
36480
36545
|
const optionKey = (_c = item.key) != null ? _c : index2;
|
|
36481
36546
|
const checkboxId = id ? `${id}-option-${optionKey}` : void 0;
|
|
36547
|
+
let displayItem = item;
|
|
36548
|
+
if (autoCap && typeof item.label === "string") {
|
|
36549
|
+
displayItem = {
|
|
36550
|
+
...item,
|
|
36551
|
+
label: capitalizeFirst2(item.label)
|
|
36552
|
+
};
|
|
36553
|
+
}
|
|
36482
36554
|
const checkboxNode = /* @__PURE__ */ jsxRuntime.jsx(
|
|
36483
36555
|
Checkbox2,
|
|
36484
36556
|
{
|
|
@@ -36512,7 +36584,7 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
|
|
|
36512
36584
|
className: baseOptionClass,
|
|
36513
36585
|
children: [
|
|
36514
36586
|
renderOption({
|
|
36515
|
-
item,
|
|
36587
|
+
item: displayItem,
|
|
36516
36588
|
index: index2,
|
|
36517
36589
|
state: internalState,
|
|
36518
36590
|
effectiveTristate,
|
|
@@ -36543,12 +36615,12 @@ var InnerShadcnCheckboxVariant = (props, ref) => {
|
|
|
36543
36615
|
children: [
|
|
36544
36616
|
checkboxNode,
|
|
36545
36617
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex min-w-0 flex-col", children: [
|
|
36546
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelClassesBase, children:
|
|
36547
|
-
|
|
36618
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: labelClassesBase, children: displayItem.label }),
|
|
36619
|
+
displayItem.description != null && /* @__PURE__ */ jsxRuntime.jsx(
|
|
36548
36620
|
"span",
|
|
36549
36621
|
{
|
|
36550
36622
|
className: descriptionClassesBase,
|
|
36551
|
-
children:
|
|
36623
|
+
children: displayItem.description
|
|
36552
36624
|
}
|
|
36553
36625
|
)
|
|
36554
36626
|
] })
|
|
@@ -36585,7 +36657,7 @@ var checkboxModule = {
|
|
|
36585
36657
|
tags: ["checkbox", "group", "boolean", "tri-state"]
|
|
36586
36658
|
}
|
|
36587
36659
|
};
|
|
36588
|
-
function
|
|
36660
|
+
function capitalizeFirst3(label) {
|
|
36589
36661
|
if (!label) return label;
|
|
36590
36662
|
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
36591
36663
|
}
|
|
@@ -36597,7 +36669,7 @@ function normalizeOptions(opts, config3) {
|
|
|
36597
36669
|
const value = typeof config3.optionValue === "function" ? config3.optionValue(raw) : typeof config3.optionValue === "string" ? asObj[config3.optionValue] : (_c = (_b = (_a = asObj.value) != null ? _a : asObj.id) != null ? _b : asObj.key) != null ? _c : String(index2);
|
|
36598
36670
|
let labelNode = typeof config3.optionLabel === "function" ? config3.optionLabel(raw) : typeof config3.optionLabel === "string" ? (_e = (_d = asObj[config3.optionLabel]) != null ? _d : asObj.label) != null ? _e : String(value) : (_f = asObj.label) != null ? _f : String(value);
|
|
36599
36671
|
if (config3.autoCap && typeof labelNode === "string") {
|
|
36600
|
-
labelNode =
|
|
36672
|
+
labelNode = capitalizeFirst3(labelNode);
|
|
36601
36673
|
}
|
|
36602
36674
|
const labelText = typeof labelNode === "string" ? labelNode : typeof labelNode === "number" ? String(labelNode) : (_g = asObj.labelText) != null ? _g : String(value);
|
|
36603
36675
|
const description = typeof config3.optionDescription === "function" ? config3.optionDescription(raw) : typeof config3.optionDescription === "string" ? asObj[config3.optionDescription] : asObj.description;
|
|
@@ -37231,7 +37303,7 @@ function removeSelectValue(current, valueToRemove) {
|
|
|
37231
37303
|
const target = String(valueToRemove);
|
|
37232
37304
|
return current.filter((v) => String(v) !== target);
|
|
37233
37305
|
}
|
|
37234
|
-
function
|
|
37306
|
+
function capitalizeFirst4(label) {
|
|
37235
37307
|
if (!label) return label;
|
|
37236
37308
|
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
37237
37309
|
}
|
|
@@ -37243,7 +37315,7 @@ function normalizeOptions2(opts, config3) {
|
|
|
37243
37315
|
const value = typeof config3.optionValue === "function" ? config3.optionValue(raw) : typeof config3.optionValue === "string" ? asObj[config3.optionValue] : (_c = (_b = (_a = asObj.value) != null ? _a : asObj.id) != null ? _b : asObj.key) != null ? _c : String(index2);
|
|
37244
37316
|
let labelNode = typeof config3.optionLabel === "function" ? config3.optionLabel(raw) : typeof config3.optionLabel === "string" ? (_e = (_d = asObj[config3.optionLabel]) != null ? _d : asObj.label) != null ? _e : String(value) : (_f = asObj.label) != null ? _f : String(value);
|
|
37245
37317
|
if (config3.autoCap && typeof labelNode === "string") {
|
|
37246
|
-
labelNode =
|
|
37318
|
+
labelNode = capitalizeFirst4(labelNode);
|
|
37247
37319
|
}
|
|
37248
37320
|
const labelText = typeof labelNode === "string" ? labelNode : typeof labelNode === "number" ? String(labelNode) : (_g = asObj.labelText) != null ? _g : String(value);
|
|
37249
37321
|
const description = typeof config3.optionDescription === "function" ? config3.optionDescription(raw) : typeof config3.optionDescription === "string" ? asObj[config3.optionDescription] : asObj.description;
|
|
@@ -40004,7 +40076,7 @@ function Badge({
|
|
|
40004
40076
|
}
|
|
40005
40077
|
);
|
|
40006
40078
|
}
|
|
40007
|
-
function
|
|
40079
|
+
function capitalizeFirst5(label) {
|
|
40008
40080
|
if (!label) return label;
|
|
40009
40081
|
return label.charAt(0).toUpperCase() + label.slice(1);
|
|
40010
40082
|
}
|
|
@@ -40016,7 +40088,7 @@ function normalizeTree(opts, config3, level = 0, parentValue, path = []) {
|
|
|
40016
40088
|
const value = typeof config3.optionValue === "function" ? config3.optionValue(raw) : typeof config3.optionValue === "string" ? asObj[config3.optionValue] : (_c = (_b = (_a = asObj.value) != null ? _a : asObj.id) != null ? _b : asObj.key) != null ? _c : String(index2);
|
|
40017
40089
|
let labelNode = typeof config3.optionLabel === "function" ? config3.optionLabel(raw) : typeof config3.optionLabel === "string" ? (_e = (_d = asObj[config3.optionLabel]) != null ? _d : asObj.label) != null ? _e : String(value) : (_f = asObj.label) != null ? _f : String(value);
|
|
40018
40090
|
if (config3.autoCap && typeof labelNode === "string") {
|
|
40019
|
-
labelNode =
|
|
40091
|
+
labelNode = capitalizeFirst5(labelNode);
|
|
40020
40092
|
}
|
|
40021
40093
|
const labelText = typeof labelNode === "string" ? labelNode : typeof labelNode === "number" ? String(labelNode) : (_g = asObj.labelText) != null ? _g : String(value);
|
|
40022
40094
|
const description = typeof config3.optionDescription === "function" ? config3.optionDescription(raw) : typeof config3.optionDescription === "string" ? asObj[config3.optionDescription] : asObj.description;
|