fluid-primitives 1.0.0-beta.4 → 1.0.0-beta.4-next.95.e1b6b07

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.
@@ -901,13 +901,18 @@ function prepareNestedRootComponents(stencilKey, root, value, newScopeKey) {
901
901
  function getByPath(item, path) {
902
902
  return path.split(".").reduce((value, key) => value?.[key], item);
903
903
  }
904
+ function asString(value) {
905
+ return value == null ? "" : String(value);
906
+ }
904
907
  function getListCollectionFromHydrationData(hydrationCollection) {
905
908
  if (hydrationCollection instanceof ListCollection) return hydrationCollection;
906
909
  const { itemToValueKey, itemToStringKey, isItemDisabledKey, groupByKey, groupSort } = hydrationCollection;
907
910
  return new ListCollection({
908
911
  items: hydrationCollection.items,
909
- itemToValue: itemToValueKey ? (item) => getByPath(item, itemToValueKey) : void 0,
910
- itemToString: itemToStringKey ? (item) => getByPath(item, itemToStringKey) : void 0,
912
+ itemToValue: (item) => asString(getByPath(item, itemToValueKey ?? "value")),
913
+ itemToString: (item) => {
914
+ return asString(getByPath(item, itemToStringKey ?? "label") ?? (itemToStringKey ? "" : getByPath(item, itemToValueKey ?? "value")));
915
+ },
911
916
  isItemDisabled: isItemDisabledKey ? (item) => getByPath(item, isItemDisabledKey) : void 0,
912
917
  groupBy: groupByKey ? (item) => getByPath(item, groupByKey) : void 0,
913
918
  groupSort: groupSort ?? void 0
package/dist/accordion.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as accordion from "@zag-js/accordion";
3
3
 
4
4
  //#region Resources/Private/Primitives/Accordion/Accordion.ts
package/dist/button.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, rt as devWarn, st as Machine$1 } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, rt as devWarn, st as Machine$1 } from "./Client-7veD_3-R.js";
2
2
  import { createSplitProps } from "@zag-js/utils";
3
3
  import { createAnatomy } from "@zag-js/anatomy";
4
4
  import { createMachine } from "@zag-js/core";
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine$1 } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine$1 } from "./Client-7veD_3-R.js";
2
2
  import { i as connect, n as registerCheckboxGroup, r as unregisterCheckboxGroup } from "./checkbox-group.registry-D8P8A4LY.js";
3
3
  import { createSplitProps } from "@zag-js/utils";
4
4
  import { createMachine } from "@zag-js/core";
package/dist/checkbox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import { i as connect, t as getCheckboxGroupMachineFor } from "./checkbox-group.registry-D8P8A4LY.js";
3
3
  import * as checkbox from "@zag-js/checkbox";
4
4
 
package/dist/client.js CHANGED
@@ -1,3 +1,3 @@
1
- import { G as applyClientPropConverters, H as ExtbaseValidationError, J as destroyComponentsWithin, K as registerClientPropConverters, Q as getHydrationData, U as extbase, W as DelayedIndicator, X as getGlobal, Y as getComponentInstance, Z as getGlobals, a as normalizeProps, at as Component, et as mount, i as spreadTextControlProps, it as isDebug, n as Template, nt as toKebabCase, o as mergeProps, ot as AsyncList, q as ComponentHydrator, r as spreadProps, rt as devWarn, s as FieldAwareComponent, st as Machine, t as uid, tt as mountAll } from "./Client-508fODzO.js";
1
+ import { G as applyClientPropConverters, H as ExtbaseValidationError, J as destroyComponentsWithin, K as registerClientPropConverters, Q as getHydrationData, U as extbase, W as DelayedIndicator, X as getGlobal, Y as getComponentInstance, Z as getGlobals, a as normalizeProps, at as Component, et as mount, i as spreadTextControlProps, it as isDebug, n as Template, nt as toKebabCase, o as mergeProps, ot as AsyncList, q as ComponentHydrator, r as spreadProps, rt as devWarn, s as FieldAwareComponent, st as Machine, t as uid, tt as mountAll } from "./Client-7veD_3-R.js";
2
2
 
3
3
  export { AsyncList, Component, ComponentHydrator, DelayedIndicator, ExtbaseValidationError, FieldAwareComponent, Machine, Template, applyClientPropConverters, destroyComponentsWithin, devWarn, extbase, getComponentInstance, getGlobal, getGlobals, getHydrationData, isDebug, mergeProps, mount, mountAll, normalizeProps, registerClientPropConverters, spreadProps, spreadTextControlProps, toKebabCase, uid };
package/dist/clipboard.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, o as mergeProps, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, o as mergeProps, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as clipboard from "@zag-js/clipboard";
3
3
 
4
4
  //#region Resources/Private/Primitives/Clipboard/Clipboard.ts
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as collapsible from "@zag-js/collapsible";
3
3
 
4
4
  //#region Resources/Private/Primitives/Collapsible/Collapsible.ts
package/dist/combobox.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as getListCollectionFromHydrationData, K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { $ as getListCollectionFromHydrationData, K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import { visuallyHiddenStyle } from "@zag-js/dom-query";
3
3
  import * as combobox from "@zag-js/combobox";
4
4
 
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import { toZoned } from "@internationalized/date";
3
3
  import * as datePicker from "@zag-js/date-picker";
4
4
 
package/dist/dialog.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as dialog from "@zag-js/dialog";
3
3
 
4
4
  //#region Resources/Private/Primitives/Dialog/Dialog.ts
@@ -1,4 +1,4 @@
1
- import { F as renameFieldMachineForForm, J as destroyComponentsWithin, R as parseFieldPath, a as normalizeProps, at as Component, g as getFieldValueFromContainer, n as Template, st as Machine$1, z as stringifyFieldPathAsBrackets } from "./Client-508fODzO.js";
1
+ import { F as renameFieldMachineForForm, J as destroyComponentsWithin, R as parseFieldPath, a as normalizeProps, at as Component, g as getFieldValueFromContainer, n as Template, st as Machine$1, z as stringifyFieldPathAsBrackets } from "./Client-7veD_3-R.js";
2
2
  import { nextTick } from "@zag-js/dom-query";
3
3
  import { createSplitProps } from "@zag-js/utils";
4
4
  import { createAnatomy } from "@zag-js/anatomy";
package/dist/field.js CHANGED
@@ -1,5 +1,5 @@
1
- import { A as queryRootEl, C as toErrorArray, D as getVisibleErrorTextIds, E as getControlEl, I as unregisterFieldMachineForForm, M as getFormMachineFor, N as registerFieldMachineForForm, O as hasHelperText, S as suppressValueMissing, T as FIELD_VALUE_CHANGE_EVENT, V as trimArraySuffix, at as Component, b as resolveValidation, c as registerFieldMachine, d as connectField, j as getFieldMachinesFor, k as isInsideField, l as unregisterFieldMachine, m as getCurrentFieldValue, p as getComparableFieldValue, st as Machine$1, u as FIELD_DEPENDENCY_CHANGE_EVENT, v as VALID_SNAPSHOT, w as withValueMissing, x as shouldCommit, y as getValiditySnapshot } from "./Client-508fODzO.js";
2
- import { _ as createFormValues, n as getFieldMessages } from "./form.fields-7xytBh9r.js";
1
+ import { A as queryRootEl, C as toErrorArray, D as getVisibleErrorTextIds, E as getControlEl, I as unregisterFieldMachineForForm, M as getFormMachineFor, N as registerFieldMachineForForm, O as hasHelperText, S as suppressValueMissing, T as FIELD_VALUE_CHANGE_EVENT, V as trimArraySuffix, at as Component, b as resolveValidation, c as registerFieldMachine, d as connectField, j as getFieldMachinesFor, k as isInsideField, l as unregisterFieldMachine, m as getCurrentFieldValue, p as getComparableFieldValue, st as Machine$1, u as FIELD_DEPENDENCY_CHANGE_EVENT, v as VALID_SNAPSHOT, w as withValueMissing, x as shouldCommit, y as getValiditySnapshot } from "./Client-7veD_3-R.js";
2
+ import { _ as createFormValues, n as getFieldMessages } from "./form.fields-OCaU9cSM.js";
3
3
  import { observeChildren, trackFormControl } from "@zag-js/dom-query";
4
4
  import { createSplitProps, isEqual } from "@zag-js/utils";
5
5
  import { setup } from "@zag-js/core";
package/dist/fieldset.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as fieldset from "@zag-js/fieldset";
3
3
 
4
4
  //#region Resources/Private/Primitives/Fieldset/Fieldset.ts
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, n as Template, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, n as Template, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as fileUpload from "@zag-js/file-upload";
3
3
  import { isValidFileType } from "@zag-js/file-utils";
4
4
 
@@ -1,4 +1,4 @@
1
- import { B as toRegisteredFieldName, F as renameFieldMachineForForm, L as appendFieldPathSegment, R as parseFieldPath, V as trimArraySuffix, _ as serializeFieldValue, h as getFieldElement, j as getFieldMachinesFor, k as isInsideField, z as stringifyFieldPathAsBrackets } from "./Client-508fODzO.js";
1
+ import { B as toRegisteredFieldName, F as renameFieldMachineForForm, L as appendFieldPathSegment, R as parseFieldPath, V as trimArraySuffix, _ as serializeFieldValue, h as getFieldElement, j as getFieldMachinesFor, k as isInsideField, z as stringifyFieldPathAsBrackets } from "./Client-7veD_3-R.js";
2
2
  import { createAnatomy } from "@zag-js/anatomy";
3
3
  import { MachineStatus } from "@zag-js/core";
4
4
 
package/dist/form.js CHANGED
@@ -1,5 +1,5 @@
1
- import { H as ExtbaseValidationError, P as registerFormMachine, V as trimArraySuffix, a as normalizeProps, at as Component, f as createFieldHandle, j as getFieldMachinesFor, rt as devWarn, st as Machine$1 } from "./Client-508fODzO.js";
2
- import { _ as createFormValues, a as getRegisteredFieldMachines, c as pruneStaleFieldMachines, d as settleFieldMachines, f as attachErrorValues, g as validateWithValidation, h as mapServerErrors, i as getFormData, l as renameFieldMachine, m as getFormErrorMessages, o as hasInvalidFieldMachines, p as filterErrorsForCurrentValues, r as getFirstInvalidField, s as hasUnownedErrors, t as focusField, u as sendToFieldMachines, v as getFormEl, y as parts } from "./form.fields-7xytBh9r.js";
1
+ import { H as ExtbaseValidationError, P as registerFormMachine, V as trimArraySuffix, a as normalizeProps, at as Component, f as createFieldHandle, j as getFieldMachinesFor, rt as devWarn, st as Machine$1 } from "./Client-7veD_3-R.js";
2
+ import { _ as createFormValues, a as getRegisteredFieldMachines, c as pruneStaleFieldMachines, d as settleFieldMachines, f as attachErrorValues, g as validateWithValidation, h as mapServerErrors, i as getFormData, l as renameFieldMachine, m as getFormErrorMessages, o as hasInvalidFieldMachines, p as filterErrorsForCurrentValues, r as getFirstInvalidField, s as hasUnownedErrors, t as focusField, u as sendToFieldMachines, v as getFormEl, y as parts } from "./form.fields-OCaU9cSM.js";
3
3
  import { nextTick } from "@zag-js/dom-query";
4
4
  import { createSplitProps } from "@zag-js/utils";
5
5
  import { createMachine } from "@zag-js/core";
package/dist/input.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine$1 } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine$1 } from "./Client-7veD_3-R.js";
2
2
  import { createSplitProps, debounce } from "@zag-js/utils";
3
3
  import { createAnatomy } from "@zag-js/anatomy";
4
4
  import { createMachine } from "@zag-js/core";
package/dist/menu.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as menu from "@zag-js/menu";
3
3
 
4
4
  //#region Resources/Private/Primitives/Menu/Menu.ts
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as navigationMenu from "@zag-js/navigation-menu";
3
3
 
4
4
  //#region Resources/Private/Primitives/NavigationMenu/NavigationMenu.ts
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as numberInput from "@zag-js/number-input";
3
3
 
4
4
  //#region Resources/Private/Primitives/NumberInput/NumberInput.ts
package/dist/popover.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as popover from "@zag-js/popover";
3
3
 
4
4
  //#region Resources/Private/Primitives/Popover/Popover.ts
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as radioGroup from "@zag-js/radio-group";
3
3
 
4
4
  //#region Resources/Private/Primitives/RadioGroup/RadioGroup.ts
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as scrollArea from "@zag-js/scroll-area";
3
3
 
4
4
  //#region Resources/Private/Primitives/ScrollArea/ScrollArea.ts
package/dist/select.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $ as getListCollectionFromHydrationData, K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { $ as getListCollectionFromHydrationData, K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as select from "@zag-js/select";
3
3
 
4
4
  //#region Resources/Private/Primitives/Select/Select.ts
package/dist/slider.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as slider from "@zag-js/slider";
3
3
 
4
4
  //#region Resources/Private/Primitives/Slider/Slider.ts
package/dist/switch.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as zagSwitch from "@zag-js/switch";
3
3
 
4
4
  //#region Resources/Private/Primitives/Switch/Switch.ts
package/dist/tabs.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as tabs from "@zag-js/tabs";
3
3
 
4
4
  //#region Resources/Private/Primitives/Tabs/Tabs.ts
package/dist/textarea.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine$1 } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, o as mergeProps, s as FieldAwareComponent, st as Machine$1 } from "./Client-7veD_3-R.js";
2
2
  import { createSplitProps, debounce } from "@zag-js/utils";
3
3
  import { createAnatomy } from "@zag-js/anatomy";
4
4
  import { createMachine } from "@zag-js/core";
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as toggleGroup from "@zag-js/toggle-group";
3
3
 
4
4
  //#region Resources/Private/Primitives/ToggleGroup/ToggleGroup.ts
package/dist/toggle.js CHANGED
@@ -1,4 +1,4 @@
1
- import { a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as toggle from "@zag-js/toggle";
3
3
 
4
4
  //#region Resources/Private/Primitives/Toggle/Toggle.ts
package/dist/tooltip.js CHANGED
@@ -1,4 +1,4 @@
1
- import { K as registerClientPropConverters, a as normalizeProps, at as Component, st as Machine } from "./Client-508fODzO.js";
1
+ import { K as registerClientPropConverters, a as normalizeProps, at as Component, st as Machine } from "./Client-7veD_3-R.js";
2
2
  import * as tooltip from "@zag-js/tooltip";
3
3
 
4
4
  //#region Resources/Private/Primitives/Tooltip/Tooltip.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluid-primitives",
3
- "version": "1.0.0-beta.4",
3
+ "version": "1.0.0-beta.4-next.95.e1b6b07",
4
4
  "description": "Client-side library for Fluid Primitives.",
5
5
  "type": "module",
6
6
  "license": "MIT",