@funstack/ui 0.1.0-alpha.0 → 0.1.0-alpha.2
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/README.md +1 -1
- package/dist/checkbox-group/checkbox-group-context.mjs +24 -0
- package/dist/checkbox-group/checkbox-group-context.mjs.map +1 -0
- package/dist/checkbox-group/checkbox-group-item.d.mts +55 -0
- package/dist/checkbox-group/checkbox-group-item.d.mts.map +1 -0
- package/dist/checkbox-group/checkbox-group-item.mjs +90 -0
- package/dist/checkbox-group/checkbox-group-item.mjs.map +1 -0
- package/dist/checkbox-group/checkbox-group-label.d.mts +21 -0
- package/dist/checkbox-group/checkbox-group-label.d.mts.map +1 -0
- package/dist/checkbox-group/checkbox-group-label.mjs +30 -0
- package/dist/checkbox-group/checkbox-group-label.mjs.map +1 -0
- package/dist/checkbox-group/checkbox-group-parent.d.mts +68 -0
- package/dist/checkbox-group/checkbox-group-parent.d.mts.map +1 -0
- package/dist/checkbox-group/checkbox-group-parent.mjs +145 -0
- package/dist/checkbox-group/checkbox-group-parent.mjs.map +1 -0
- package/dist/checkbox-group/checkbox-group-root.d.mts +100 -0
- package/dist/checkbox-group/checkbox-group-root.d.mts.map +1 -0
- package/dist/checkbox-group/checkbox-group-root.mjs +291 -0
- package/dist/checkbox-group/checkbox-group-root.mjs.map +1 -0
- package/dist/checkbox-group/index.d.mts +23 -0
- package/dist/checkbox-group/index.d.mts.map +1 -0
- package/dist/checkbox-group/index.mjs +23 -0
- package/dist/checkbox-group/index.mjs.map +1 -0
- package/dist/combobox/combobox-clear.d.mts +34 -0
- package/dist/combobox/combobox-clear.d.mts.map +1 -0
- package/dist/combobox/combobox-clear.mjs +58 -0
- package/dist/combobox/combobox-clear.mjs.map +1 -0
- package/dist/combobox/combobox-context.mjs +23 -0
- package/dist/combobox/combobox-context.mjs.map +1 -0
- package/dist/combobox/combobox-group.d.mts +72 -0
- package/dist/combobox/combobox-group.d.mts.map +1 -0
- package/dist/combobox/combobox-group.mjs +104 -0
- package/dist/combobox/combobox-group.mjs.map +1 -0
- package/dist/combobox/combobox-input.d.mts +40 -0
- package/dist/combobox/combobox-input.d.mts.map +1 -0
- package/dist/combobox/combobox-input.mjs +88 -0
- package/dist/combobox/combobox-input.mjs.map +1 -0
- package/dist/combobox/combobox-label.d.mts +22 -0
- package/dist/combobox/combobox-label.d.mts.map +1 -0
- package/dist/combobox/combobox-label.mjs +32 -0
- package/dist/combobox/combobox-label.mjs.map +1 -0
- package/dist/combobox/combobox-list.d.mts +37 -0
- package/dist/combobox/combobox-list.d.mts.map +1 -0
- package/dist/combobox/combobox-list.mjs +70 -0
- package/dist/combobox/combobox-list.mjs.map +1 -0
- package/dist/combobox/combobox-option.d.mts +45 -0
- package/dist/combobox/combobox-option.d.mts.map +1 -0
- package/dist/combobox/combobox-option.mjs +88 -0
- package/dist/combobox/combobox-option.mjs.map +1 -0
- package/dist/combobox/combobox-popup.d.mts +49 -0
- package/dist/combobox/combobox-popup.d.mts.map +1 -0
- package/dist/combobox/combobox-popup.mjs +86 -0
- package/dist/combobox/combobox-popup.mjs.map +1 -0
- package/dist/combobox/combobox-root.d.mts +135 -0
- package/dist/combobox/combobox-root.d.mts.map +1 -0
- package/dist/combobox/combobox-root.mjs +508 -0
- package/dist/combobox/combobox-root.mjs.map +1 -0
- package/dist/combobox/combobox-trigger.d.mts +36 -0
- package/dist/combobox/combobox-trigger.d.mts.map +1 -0
- package/dist/combobox/combobox-trigger.mjs +92 -0
- package/dist/combobox/combobox-trigger.mjs.map +1 -0
- package/dist/combobox/index.d.mts +36 -0
- package/dist/combobox/index.d.mts.map +1 -0
- package/dist/combobox/index.mjs +36 -0
- package/dist/combobox/index.mjs.map +1 -0
- package/dist/dialog/dialog-close.d.mts.map +1 -1
- package/dist/dialog/dialog-close.mjs +4 -4
- package/dist/dialog/dialog-close.mjs.map +1 -1
- package/dist/dialog/dialog-context.mjs.map +1 -1
- package/dist/dialog/dialog-popup.mjs +1 -0
- package/dist/dialog/dialog-popup.mjs.map +1 -1
- package/dist/dialog/dialog-root.mjs +9 -1
- package/dist/dialog/dialog-root.mjs.map +1 -1
- package/dist/index.d.mts +42 -2
- package/dist/index.mjs +6 -1
- package/dist/internal/anchor-position.d.mts +7 -0
- package/dist/internal/anchor-position.d.mts.map +1 -0
- package/dist/internal/anchor-position.mjs +16 -0
- package/dist/internal/anchor-position.mjs.map +1 -0
- package/dist/internal/platform-attributes.d.mts +18 -1
- package/dist/internal/platform-attributes.d.mts.map +1 -1
- package/dist/internal/sync-presence.mjs +19 -0
- package/dist/internal/sync-presence.mjs.map +1 -0
- package/dist/internal/types.d.mts +8 -0
- package/dist/internal/types.d.mts.map +1 -1
- package/dist/internal/use-action-trigger.mjs +58 -0
- package/dist/internal/use-action-trigger.mjs.map +1 -0
- package/dist/internal/use-controllable-action.mjs +5 -1
- package/dist/internal/use-controllable-action.mjs.map +1 -1
- package/dist/internal/use-delayed-pair.mjs +40 -0
- package/dist/internal/use-delayed-pair.mjs.map +1 -0
- package/dist/internal/use-exit-animation.mjs +55 -0
- package/dist/internal/use-exit-animation.mjs.map +1 -0
- package/dist/internal/use-form-reset.mjs +5 -1
- package/dist/internal/use-form-reset.mjs.map +1 -1
- package/dist/internal/use-hydrated-mount.mjs +21 -0
- package/dist/internal/use-hydrated-mount.mjs.map +1 -0
- package/dist/internal/use-native-group-reconciliation.mjs +2 -2
- package/dist/internal/use-native-group-reconciliation.mjs.map +1 -1
- package/dist/internal/use-native-select-value.mjs +182 -0
- package/dist/internal/use-native-select-value.mjs.map +1 -0
- package/dist/internal/use-popover-popup.mjs +274 -0
- package/dist/internal/use-popover-popup.mjs.map +1 -0
- package/dist/internal/use-popover-root.d.mts +2 -0
- package/dist/internal/use-popover-root.mjs +112 -0
- package/dist/internal/use-popover-root.mjs.map +1 -0
- package/dist/internal/use-popover-trigger.mjs +86 -0
- package/dist/internal/use-popover-trigger.mjs.map +1 -0
- package/dist/menu/index.d.mts +34 -0
- package/dist/menu/index.d.mts.map +1 -0
- package/dist/menu/index.mjs +34 -0
- package/dist/menu/index.mjs.map +1 -0
- package/dist/menu/menu-checkbox-item.d.mts +42 -0
- package/dist/menu/menu-checkbox-item.d.mts.map +1 -0
- package/dist/menu/menu-checkbox-item.mjs +71 -0
- package/dist/menu/menu-checkbox-item.mjs.map +1 -0
- package/dist/menu/menu-context.d.mts +1 -0
- package/dist/menu/menu-context.mjs +28 -0
- package/dist/menu/menu-context.mjs.map +1 -0
- package/dist/menu/menu-dom.mjs +37 -0
- package/dist/menu/menu-dom.mjs.map +1 -0
- package/dist/menu/menu-group.d.mts +48 -0
- package/dist/menu/menu-group.d.mts.map +1 -0
- package/dist/menu/menu-group.mjs +69 -0
- package/dist/menu/menu-group.mjs.map +1 -0
- package/dist/menu/menu-hover.mjs +29 -0
- package/dist/menu/menu-hover.mjs.map +1 -0
- package/dist/menu/menu-item.d.mts +45 -0
- package/dist/menu/menu-item.d.mts.map +1 -0
- package/dist/menu/menu-item.mjs +54 -0
- package/dist/menu/menu-item.mjs.map +1 -0
- package/dist/menu/menu-popup.d.mts +69 -0
- package/dist/menu/menu-popup.d.mts.map +1 -0
- package/dist/menu/menu-popup.mjs +207 -0
- package/dist/menu/menu-popup.mjs.map +1 -0
- package/dist/menu/menu-radio-group.d.mts +37 -0
- package/dist/menu/menu-radio-group.d.mts.map +1 -0
- package/dist/menu/menu-radio-group.mjs +72 -0
- package/dist/menu/menu-radio-group.mjs.map +1 -0
- package/dist/menu/menu-radio-item.d.mts +33 -0
- package/dist/menu/menu-radio-item.d.mts.map +1 -0
- package/dist/menu/menu-radio-item.mjs +62 -0
- package/dist/menu/menu-radio-item.mjs.map +1 -0
- package/dist/menu/menu-root.d.mts +54 -0
- package/dist/menu/menu-root.d.mts.map +1 -0
- package/dist/menu/menu-root.mjs +102 -0
- package/dist/menu/menu-root.mjs.map +1 -0
- package/dist/menu/menu-submenu-trigger.d.mts +31 -0
- package/dist/menu/menu-submenu-trigger.d.mts.map +1 -0
- package/dist/menu/menu-submenu-trigger.mjs +92 -0
- package/dist/menu/menu-submenu-trigger.mjs.map +1 -0
- package/dist/menu/menu-trigger.d.mts +36 -0
- package/dist/menu/menu-trigger.d.mts.map +1 -0
- package/dist/menu/menu-trigger.mjs +81 -0
- package/dist/menu/menu-trigger.mjs.map +1 -0
- package/dist/menu/use-menu-item.mjs +54 -0
- package/dist/menu/use-menu-item.mjs.map +1 -0
- package/dist/popover/index.d.mts +28 -0
- package/dist/popover/index.d.mts.map +1 -0
- package/dist/popover/index.mjs +28 -0
- package/dist/popover/index.mjs.map +1 -0
- package/dist/popover/popover-close.d.mts +41 -0
- package/dist/popover/popover-close.d.mts.map +1 -0
- package/dist/popover/popover-close.mjs +90 -0
- package/dist/popover/popover-close.mjs.map +1 -0
- package/dist/popover/popover-context.mjs +26 -0
- package/dist/popover/popover-context.mjs.map +1 -0
- package/dist/popover/popover-description.d.mts +22 -0
- package/dist/popover/popover-description.d.mts.map +1 -0
- package/dist/popover/popover-description.mjs +28 -0
- package/dist/popover/popover-description.mjs.map +1 -0
- package/dist/popover/popover-popup.d.mts +82 -0
- package/dist/popover/popover-popup.d.mts.map +1 -0
- package/dist/popover/popover-popup.mjs +93 -0
- package/dist/popover/popover-popup.mjs.map +1 -0
- package/dist/popover/popover-root.d.mts +64 -0
- package/dist/popover/popover-root.d.mts.map +1 -0
- package/dist/popover/popover-root.mjs +39 -0
- package/dist/popover/popover-root.mjs.map +1 -0
- package/dist/popover/popover-title.d.mts +23 -0
- package/dist/popover/popover-title.d.mts.map +1 -0
- package/dist/popover/popover-title.mjs +28 -0
- package/dist/popover/popover-title.mjs.map +1 -0
- package/dist/popover/popover-trigger.d.mts +37 -0
- package/dist/popover/popover-trigger.d.mts.map +1 -0
- package/dist/popover/popover-trigger.mjs +40 -0
- package/dist/popover/popover-trigger.mjs.map +1 -0
- package/dist/radio-group/radio-group-item.d.mts.map +1 -1
- package/dist/radio-group/radio-group-item.mjs +1 -6
- package/dist/radio-group/radio-group-item.mjs.map +1 -1
- package/dist/select/index.d.mts +30 -0
- package/dist/select/index.d.mts.map +1 -0
- package/dist/select/index.mjs +30 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/select/select-context.mjs +13 -0
- package/dist/select/select-context.mjs.map +1 -0
- package/dist/select/select-dom.mjs +44 -0
- package/dist/select/select-dom.mjs.map +1 -0
- package/dist/select/select-group-label.d.mts +22 -0
- package/dist/select/select-group-label.d.mts.map +1 -0
- package/dist/select/select-group-label.mjs +39 -0
- package/dist/select/select-group-label.mjs.map +1 -0
- package/dist/select/select-group.d.mts +28 -0
- package/dist/select/select-group.d.mts.map +1 -0
- package/dist/select/select-group.mjs +45 -0
- package/dist/select/select-group.mjs.map +1 -0
- package/dist/select/select-option.d.mts +42 -0
- package/dist/select/select-option.d.mts.map +1 -0
- package/dist/select/select-option.mjs +65 -0
- package/dist/select/select-option.mjs.map +1 -0
- package/dist/select/select-root.d.mts +66 -0
- package/dist/select/select-root.d.mts.map +1 -0
- package/dist/select/select-root.mjs +94 -0
- package/dist/select/select-root.mjs.map +1 -0
- package/dist/select/select-separator.d.mts +20 -0
- package/dist/select/select-separator.d.mts.map +1 -0
- package/dist/select/select-separator.mjs +30 -0
- package/dist/select/select-separator.mjs.map +1 -0
- package/dist/select/select-trigger.d.mts +29 -0
- package/dist/select/select-trigger.d.mts.map +1 -0
- package/dist/select/select-trigger.mjs +48 -0
- package/dist/select/select-trigger.mjs.map +1 -0
- package/dist/select/select-value.d.mts +31 -0
- package/dist/select/select-value.d.mts.map +1 -0
- package/dist/select/select-value.mjs +101 -0
- package/dist/select/select-value.mjs.map +1 -0
- package/dist/tabs/tabs-context.mjs +2 -1
- package/dist/tabs/tabs-context.mjs.map +1 -1
- package/dist/tabs/tabs-list.d.mts +1 -1
- package/dist/tabs/tabs-list.d.mts.map +1 -1
- package/dist/tabs/tabs-list.mjs +17 -9
- package/dist/tabs/tabs-list.mjs.map +1 -1
- package/dist/tabs/tabs-tab.d.mts +1 -1
- package/dist/tabs/tabs-tab.d.mts.map +1 -1
- package/dist/tabs/tabs-tab.mjs +6 -3
- package/dist/tabs/tabs-tab.mjs.map +1 -1
- package/dist/tooltip/tooltip-popup.d.mts.map +1 -1
- package/dist/tooltip/tooltip-popup.mjs +2 -7
- package/dist/tooltip/tooltip-popup.mjs.map +1 -1
- package/dist/tooltip/use-tooltip-interaction.mjs +5 -17
- package/dist/tooltip/use-tooltip-interaction.mjs.map +1 -1
- package/package.json +6 -1
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
3
|
+
import { SelectContext, useSelectContext } from "./select-context.mjs";
|
|
4
|
+
import { useSelectPartRef } from "./select-dom.mjs";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/select/select-group.tsx
|
|
7
|
+
/**
|
|
8
|
+
* An `<optgroup>` of options. Its state is the Root's state. Owned key: `label`. Its `disabled`
|
|
9
|
+
* reaches the Options' `state.disabled` / `data-disabled` through context, as `:disabled` does.
|
|
10
|
+
*/
|
|
11
|
+
function SelectGroup({ label, disabled = false, className, style, children, render, ...rest }) {
|
|
12
|
+
const ctx = useSelectContext("Select.Group");
|
|
13
|
+
const state = {
|
|
14
|
+
value: ctx.optimistic,
|
|
15
|
+
pending: ctx.pending,
|
|
16
|
+
disabled: ctx.disabled
|
|
17
|
+
};
|
|
18
|
+
const { ref } = useSelectPartRef("Select.Group", "optgroup");
|
|
19
|
+
const element = useRender({
|
|
20
|
+
defaultElement: "optgroup",
|
|
21
|
+
render,
|
|
22
|
+
state,
|
|
23
|
+
className,
|
|
24
|
+
style,
|
|
25
|
+
children,
|
|
26
|
+
props: {
|
|
27
|
+
...rest,
|
|
28
|
+
disabled
|
|
29
|
+
},
|
|
30
|
+
libraryProps: { label },
|
|
31
|
+
ref
|
|
32
|
+
});
|
|
33
|
+
return /* @__PURE__ */ jsx(SelectContext, {
|
|
34
|
+
value: {
|
|
35
|
+
...ctx,
|
|
36
|
+
groupDisabled: disabled
|
|
37
|
+
},
|
|
38
|
+
children: element
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
SelectGroup.displayName = "SelectGroup";
|
|
42
|
+
//#endregion
|
|
43
|
+
export { SelectGroup };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=select-group.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-group.mjs","names":[],"sources":["../../src/select/select-group.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { SelectContext, useSelectContext } from \"./select-context.js\";\nimport { useSelectPartRef } from \"./select-dom.js\";\nimport type { SelectRootState } from \"./select-root.js\";\n\nexport interface SelectGroupProps extends Omit<\n ComponentPropsWithRef<\"optgroup\">,\n \"label\" | \"className\" | \"style\" | \"children\"\n> {\n /**\n * The `<optgroup label>`: shown by native pickers (Firefox today) and read by assistive\n * technology. Required. Keep it equal to the text of a `Select.GroupLabel`, if any.\n */\n label: string;\n /** Native `disabled`: every option in the group is disabled. */\n disabled?: boolean;\n className?: StateValue<string | undefined, SelectRootState>;\n style?: StateValue<CSSProperties | undefined, SelectRootState>;\n children?: StateValue<ReactNode, SelectRootState>;\n /** Replace the rendered element. Must keep an `<optgroup>`. */\n render?: RenderProp<ComponentPropsWithRef<\"optgroup\">, SelectRootState>;\n}\n\n/**\n * An `<optgroup>` of options. Its state is the Root's state. Owned key: `label`. Its `disabled`\n * reaches the Options' `state.disabled` / `data-disabled` through context, as `:disabled` does.\n */\nexport function SelectGroup({\n label,\n disabled = false,\n className,\n style,\n children,\n render,\n ...rest\n}: SelectGroupProps) {\n const ctx = useSelectContext(\"Select.Group\");\n const state: SelectRootState = {\n value: ctx.optimistic,\n pending: ctx.pending,\n disabled: ctx.disabled,\n };\n const { ref } = useSelectPartRef<HTMLOptGroupElement>(\"Select.Group\", \"optgroup\");\n const element = useRender<ComponentPropsWithRef<\"optgroup\">, SelectRootState>({\n defaultElement: \"optgroup\",\n render,\n state,\n className,\n style,\n children,\n props: { ...rest, disabled },\n libraryProps: { label },\n ref,\n });\n // Nested groups are not valid HTML, so this only ever turns `false` into the group's value.\n return <SelectContext value={{ ...ctx, groupDisabled: disabled }}>{element}</SelectContext>;\n}\n\nSelectGroup.displayName = \"SelectGroup\";\n"],"mappings":";;;;;;;;;;AA8BA,SAAgB,YAAY,EAC1B,OACA,WAAW,OACX,WACA,OACA,UACA,QACA,GAAG,QACgB;CACnB,MAAM,MAAM,iBAAiB,cAAc;CAC3C,MAAM,QAAyB;EAC7B,OAAO,IAAI;EACX,SAAS,IAAI;EACb,UAAU,IAAI;CAChB;CACA,MAAM,EAAE,QAAQ,iBAAsC,gBAAgB,UAAU;CAChF,MAAM,UAAU,UAA8D;EAC5E,gBAAgB;EAChB;EACA;EACA;EACA;EACA;EACA,OAAO;GAAE,GAAG;GAAM;EAAS;EAC3B,cAAc,EAAE,MAAM;EACtB;CACF,CAAC;CAED,OAAO,oBAAC,eAAD;EAAe,OAAO;GAAE,GAAG;GAAK,eAAe;EAAS;EAAI,UAAA;CAAuB,CAAA;AAC5F;AAEA,YAAY,cAAc"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
//#region src/select/select-option.d.ts
|
|
4
|
+
export interface SelectOptionState {
|
|
5
|
+
readonly value: string;
|
|
6
|
+
/** Optimistic: true as soon as the user picks this option, before the action settles. */
|
|
7
|
+
readonly selected: boolean;
|
|
8
|
+
/** The Root is pending and this option is the optimistic target. */
|
|
9
|
+
readonly pending: boolean;
|
|
10
|
+
/** Disabled by its own prop, a disabled `Select.Group`, or `Root disabled` (as `:disabled`). */
|
|
11
|
+
readonly disabled: boolean;
|
|
12
|
+
}
|
|
13
|
+
export interface SelectOptionProps extends Omit<ComponentPropsWithRef<"option">, "value" | "selected" | "className" | "style" | "children"> {
|
|
14
|
+
/** The option's value. Required: React cannot infer a value from rich children. */
|
|
15
|
+
value: string;
|
|
16
|
+
/** Native `disabled`: not pickable, skipped by keyboard navigation. */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
className?: StateValue<string | undefined, SelectOptionState>;
|
|
19
|
+
style?: StateValue<CSSProperties | undefined, SelectOptionState>;
|
|
20
|
+
/**
|
|
21
|
+
* The option's content. Keep it readable as plain text: engines without customizable select
|
|
22
|
+
* (Firefox today) show only the text. Give icons `aria-hidden` and no text. Avoid the `label`
|
|
23
|
+
* attribute (Chromium names the option from it but shows the content).
|
|
24
|
+
*/
|
|
25
|
+
children?: StateValue<ReactNode, SelectOptionState>;
|
|
26
|
+
/** Replace the rendered element. Must keep an `<option>`. */
|
|
27
|
+
render?: RenderProp<ComponentPropsWithRef<"option">, SelectOptionState>;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* One `<option>`. It never renders `selected`: the selection is the Root's `value={optimistic}`
|
|
31
|
+
* plus the Root's re-apply for options that mount after the select's own commit (a Suspense
|
|
32
|
+
* boundary or `use()` inside the select), which the Option reports from its mount layout effect.
|
|
33
|
+
*
|
|
34
|
+
* Owned keys: `value`, `selected` (never rendered), `disabled`, `data-selected`, `data-pending`,
|
|
35
|
+
* `data-disabled`.
|
|
36
|
+
*/
|
|
37
|
+
export declare function SelectOption({ value, disabled: disabledProp, className, style, children, render, ...rest }: SelectOptionProps): ReactNode;
|
|
38
|
+
export declare namespace SelectOption {
|
|
39
|
+
var displayName: string;
|
|
40
|
+
}
|
|
41
|
+
//#endregion
|
|
42
|
+
//# sourceMappingURL=select-option.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-option.d.mts","names":[],"sources":["../../src/select/select-option.tsx"],"mappings":";;;iBAWiB;WACN;;WAEA;;WAEA;;WAEA;;iBAGM,0BAA0B,KACzC;;EAIA;;EAEA;EACA,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;;;;;;EAM9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;wBAWvC,eACd,OACA,UAAU,cACV,WACA,OACA,UACA,WACG,QACF,oBAAiB;yBARJ"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { dataAttr } from "../internal/data-attr.mjs";
|
|
3
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
4
|
+
import { syncPresence } from "../internal/sync-presence.mjs";
|
|
5
|
+
import { useSelectContext } from "./select-context.mjs";
|
|
6
|
+
import { useSelectPartRef } from "./select-dom.mjs";
|
|
7
|
+
import { useHydratedMount } from "../internal/use-hydrated-mount.mjs";
|
|
8
|
+
import { useEffectEvent, useLayoutEffect } from "react";
|
|
9
|
+
//#region src/select/select-option.tsx
|
|
10
|
+
/**
|
|
11
|
+
* One `<option>`. It never renders `selected`: the selection is the Root's `value={optimistic}`
|
|
12
|
+
* plus the Root's re-apply for options that mount after the select's own commit (a Suspense
|
|
13
|
+
* boundary or `use()` inside the select), which the Option reports from its mount layout effect.
|
|
14
|
+
*
|
|
15
|
+
* Owned keys: `value`, `selected` (never rendered), `disabled`, `data-selected`, `data-pending`,
|
|
16
|
+
* `data-disabled`.
|
|
17
|
+
*/
|
|
18
|
+
function SelectOption({ value, disabled: disabledProp = false, className, style, children, render, ...rest }) {
|
|
19
|
+
const ctx = useSelectContext("Select.Option");
|
|
20
|
+
const selected = ctx.optimistic === value;
|
|
21
|
+
const pending = ctx.pending && selected;
|
|
22
|
+
const disabled = ctx.disabled || ctx.groupDisabled || disabledProp;
|
|
23
|
+
const hydrated = useHydratedMount();
|
|
24
|
+
const { ref, node } = useSelectPartRef("Select.Option", "option");
|
|
25
|
+
const reportMount = useEffectEvent(() => {
|
|
26
|
+
const el = node.current;
|
|
27
|
+
if (el !== null) {
|
|
28
|
+
syncPresence(el, "data-selected", selected);
|
|
29
|
+
syncPresence(el, "data-pending", pending);
|
|
30
|
+
syncPresence(el, "data-disabled", disabled);
|
|
31
|
+
}
|
|
32
|
+
ctx.optionMounted(el, hydrated);
|
|
33
|
+
});
|
|
34
|
+
useLayoutEffect(() => {
|
|
35
|
+
reportMount();
|
|
36
|
+
}, []);
|
|
37
|
+
return useRender({
|
|
38
|
+
defaultElement: "option",
|
|
39
|
+
render,
|
|
40
|
+
state: {
|
|
41
|
+
value,
|
|
42
|
+
selected,
|
|
43
|
+
pending,
|
|
44
|
+
disabled
|
|
45
|
+
},
|
|
46
|
+
className,
|
|
47
|
+
style,
|
|
48
|
+
children,
|
|
49
|
+
props: rest,
|
|
50
|
+
libraryProps: {
|
|
51
|
+
value,
|
|
52
|
+
selected: void 0,
|
|
53
|
+
disabled: disabledProp,
|
|
54
|
+
"data-selected": dataAttr(selected),
|
|
55
|
+
"data-pending": dataAttr(pending),
|
|
56
|
+
"data-disabled": dataAttr(disabled)
|
|
57
|
+
},
|
|
58
|
+
ref
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
SelectOption.displayName = "SelectOption";
|
|
62
|
+
//#endregion
|
|
63
|
+
export { SelectOption };
|
|
64
|
+
|
|
65
|
+
//# sourceMappingURL=select-option.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-option.mjs","names":[],"sources":["../../src/select/select-option.tsx"],"sourcesContent":["\"use client\";\nimport { useEffectEvent, useLayoutEffect } from \"react\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport { syncPresence } from \"../internal/sync-presence.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useHydratedMount } from \"../internal/use-hydrated-mount.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { useSelectContext } from \"./select-context.js\";\nimport { useSelectPartRef } from \"./select-dom.js\";\n\nexport interface SelectOptionState {\n readonly value: string;\n /** Optimistic: true as soon as the user picks this option, before the action settles. */\n readonly selected: boolean;\n /** The Root is pending and this option is the optimistic target. */\n readonly pending: boolean;\n /** Disabled by its own prop, a disabled `Select.Group`, or `Root disabled` (as `:disabled`). */\n readonly disabled: boolean;\n}\n\nexport interface SelectOptionProps extends Omit<\n ComponentPropsWithRef<\"option\">,\n \"value\" | \"selected\" | \"className\" | \"style\" | \"children\"\n> {\n /** The option's value. Required: React cannot infer a value from rich children. */\n value: string;\n /** Native `disabled`: not pickable, skipped by keyboard navigation. */\n disabled?: boolean;\n className?: StateValue<string | undefined, SelectOptionState>;\n style?: StateValue<CSSProperties | undefined, SelectOptionState>;\n /**\n * The option's content. Keep it readable as plain text: engines without customizable select\n * (Firefox today) show only the text. Give icons `aria-hidden` and no text. Avoid the `label`\n * attribute (Chromium names the option from it but shows the content).\n */\n children?: StateValue<ReactNode, SelectOptionState>;\n /** Replace the rendered element. Must keep an `<option>`. */\n render?: RenderProp<ComponentPropsWithRef<\"option\">, SelectOptionState>;\n}\n\n/**\n * One `<option>`. It never renders `selected`: the selection is the Root's `value={optimistic}`\n * plus the Root's re-apply for options that mount after the select's own commit (a Suspense\n * boundary or `use()` inside the select), which the Option reports from its mount layout effect.\n *\n * Owned keys: `value`, `selected` (never rendered), `disabled`, `data-selected`, `data-pending`,\n * `data-disabled`.\n */\nexport function SelectOption({\n value,\n disabled: disabledProp = false,\n className,\n style,\n children,\n render,\n ...rest\n}: SelectOptionProps) {\n const ctx = useSelectContext(\"Select.Option\");\n const selected = ctx.optimistic === value;\n const pending = ctx.pending && selected;\n const disabled = ctx.disabled || ctx.groupDisabled || disabledProp;\n const hydrated = useHydratedMount();\n const { ref, node } = useSelectPartRef<HTMLOptionElement>(\"Select.Option\", \"option\");\n\n // Reads the mount render's values: for a hydrated option that is the hydration render, which\n // used the server snapshot (`hydrated === true`).\n const reportMount = useEffectEvent(() => {\n const el = node.current;\n if (el !== null) {\n // Hydration keeps server attributes that differ from the client render (React only warns);\n // an option hydrating after its Root can render a different state than the server did.\n syncPresence(el, \"data-selected\", selected);\n syncPresence(el, \"data-pending\", pending);\n syncPresence(el, \"data-disabled\", disabled);\n }\n ctx.optionMounted(el, hydrated);\n });\n useLayoutEffect(() => {\n reportMount();\n }, []);\n\n const state: SelectOptionState = { value, selected, pending, disabled };\n\n return useRender<ComponentPropsWithRef<\"option\">, SelectOptionState>({\n defaultElement: \"option\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps: {\n value,\n selected: undefined,\n // Only the Option's own prop: `Root disabled` and the Group disable natively themselves.\n disabled: disabledProp,\n \"data-selected\": dataAttr(selected),\n \"data-pending\": dataAttr(pending),\n \"data-disabled\": dataAttr(disabled),\n },\n ref,\n });\n}\n\nSelectOption.displayName = \"SelectOption\";\n"],"mappings":";;;;;;;;;;;;;;;;;AAiDA,SAAgB,aAAa,EAC3B,OACA,UAAU,eAAe,OACzB,WACA,OACA,UACA,QACA,GAAG,QACiB;CACpB,MAAM,MAAM,iBAAiB,eAAe;CAC5C,MAAM,WAAW,IAAI,eAAe;CACpC,MAAM,UAAU,IAAI,WAAW;CAC/B,MAAM,WAAW,IAAI,YAAY,IAAI,iBAAiB;CACtD,MAAM,WAAW,iBAAiB;CAClC,MAAM,EAAE,KAAK,SAAS,iBAAoC,iBAAiB,QAAQ;CAInF,MAAM,cAAc,qBAAqB;EACvC,MAAM,KAAK,KAAK;EAChB,IAAI,OAAO,MAAM;GAGf,aAAa,IAAI,iBAAiB,QAAQ;GAC1C,aAAa,IAAI,gBAAgB,OAAO;GACxC,aAAa,IAAI,iBAAiB,QAAQ;EAC5C;EACA,IAAI,cAAc,IAAI,QAAQ;CAChC,CAAC;CACD,sBAAsB;EACpB,YAAY;CACd,GAAG,CAAC,CAAC;CAIL,OAAO,UAA8D;EACnE,gBAAgB;EAChB;EACA,OAAA;GALiC;GAAO;GAAU;GAAS;EAKvD;EACJ;EACA;EACA;EACA,OAAO;EACP,cAAc;GACZ;GACA,UAAU,KAAA;GAEV,UAAU;GACV,iBAAiB,SAAS,QAAQ;GAClC,gBAAgB,SAAS,OAAO;GAChC,iBAAiB,SAAS,QAAQ;EACpC;EACA;CACF,CAAC;AACH;AAEA,aAAa,cAAc"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ActionDetails, ChangeAction, ChangeReason, RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
3
|
+
//#region src/select/select-root.d.ts
|
|
4
|
+
/** Details passed as the second argument of `valueChangeAction`. */
|
|
5
|
+
export interface SelectValueChangeDetails extends ActionDetails {
|
|
6
|
+
/**
|
|
7
|
+
* `"activate"`: the user picked an option (pointer, keyboard, typeahead, or browser autofill,
|
|
8
|
+
* which the library cannot tell from a pick); `details.event` is the native `change` event.
|
|
9
|
+
* `"platform"`: the browser changed the value without a pick the library saw: a form reset
|
|
10
|
+
* (`details.event` is the `reset` event), or a pick before hydration / Firefox form-state
|
|
11
|
+
* restoration reconciled at mount (`details.event` is `undefined`).
|
|
12
|
+
*/
|
|
13
|
+
readonly reason: ChangeReason;
|
|
14
|
+
}
|
|
15
|
+
export interface SelectRootState {
|
|
16
|
+
/** Optimistic value. Content rendered from it must not suspend. */
|
|
17
|
+
readonly value: string;
|
|
18
|
+
/** An action dispatched through this Select is in flight. */
|
|
19
|
+
readonly pending: boolean;
|
|
20
|
+
/** The `disabled` prop. */
|
|
21
|
+
readonly disabled: boolean;
|
|
22
|
+
}
|
|
23
|
+
export interface SelectRootProps extends Omit<ComponentPropsWithRef<"select">, "value" | "defaultValue" | "onChange" | "multiple" | "size" | "disabled" | "className" | "style" | "children"> {
|
|
24
|
+
/** Controlled value. `undefined` means uncontrolled. Use `""` for the placeholder option. */
|
|
25
|
+
value?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Initial value in uncontrolled mode, and the value a form reset returns to (the latest prop is
|
|
28
|
+
* mirrored into the options' `defaultSelected`). When omitted, the browser's choice (an option
|
|
29
|
+
* whose value is `""`, else the first enabled option) is adopted at mount, without a dispatch,
|
|
30
|
+
* and is what a form reset returns to. Until a pick (or a platform change) sets the value,
|
|
31
|
+
* options that mount later without the adopted one (a Suspense fallback) adopt again.
|
|
32
|
+
*/
|
|
33
|
+
defaultValue?: string;
|
|
34
|
+
/**
|
|
35
|
+
* Runs inside the Root's transition whenever the selected option changes. May be sync or async
|
|
36
|
+
* (also a Server Function); rejections reach the nearest Error Boundary and roll the selection
|
|
37
|
+
* back.
|
|
38
|
+
*
|
|
39
|
+
* In engines whose closed select changes the value on every arrow press (Firefox, Safari with
|
|
40
|
+
* native appearance), every press dispatches; the latest dispatch wins. A `setState` placed
|
|
41
|
+
* after your own `await` is not a Transition update; wrap it in `startTransition` (React
|
|
42
|
+
* limitation). Controlled mode is the way to veto a change.
|
|
43
|
+
*/
|
|
44
|
+
valueChangeAction?: ChangeAction<string, SelectValueChangeDetails>;
|
|
45
|
+
/** Native `disabled`. Never set by the library while pending. */
|
|
46
|
+
disabled?: boolean;
|
|
47
|
+
className?: StateValue<string | undefined, SelectRootState>;
|
|
48
|
+
style?: StateValue<CSSProperties | undefined, SelectRootState>;
|
|
49
|
+
children?: StateValue<ReactNode, SelectRootState>;
|
|
50
|
+
/** Replace the rendered element. Must keep a `<select>`. */
|
|
51
|
+
render?: RenderProp<ComponentPropsWithRef<"select">, SelectRootState>;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The `<select>` itself: owns the value, the transition, the form-reset listener, the mount
|
|
55
|
+
* reconciliation and the re-apply of late options (design/components/select.md 15.2). Renders
|
|
56
|
+
* `value={optimistic}`: react-dom restores a controlled select to its props after every event,
|
|
57
|
+
* and only the sync-lane optimistic value survives that restore.
|
|
58
|
+
*
|
|
59
|
+
* Owned keys (conventions 1.2): `value`, `disabled`, `data-pending`, `data-disabled`, `onChange`.
|
|
60
|
+
*/
|
|
61
|
+
export declare function SelectRoot({ value, defaultValue, valueChangeAction, disabled, className, style, children, render, ...rest }: SelectRootProps): import("react").JSX.Element;
|
|
62
|
+
export declare namespace SelectRoot {
|
|
63
|
+
var displayName: string;
|
|
64
|
+
}
|
|
65
|
+
//#endregion
|
|
66
|
+
//# sourceMappingURL=select-root.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-root.d.mts","names":[],"sources":["../../src/select/select-root.tsx"],"mappings":";;;;iBAqBiB,iCAAiC;;;;;;;;WAQvC,QAAQ;;iBAGF;;WAEN;;WAEA;;WAEA;;iBAGM,wBAAwB,KACvC;;EAYA;;;;;;;;EAQA;;;;;;;;;;;EAWA,oBAAoB,qBAAqB;;EAEzC;EACA,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;EAC9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;wBAWvC,aACd,OACA,cACA,mBACA,UACA,WACA,OACA,UACA,WACG,QACF,kCAAe,IAAA;yBAVF"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { createActionDetails } from "../internal/action-details.mjs";
|
|
3
|
+
import { dataAttr } from "../internal/data-attr.mjs";
|
|
4
|
+
import { transitionTypes } from "../internal/transition-types.mjs";
|
|
5
|
+
import { useControllableAction } from "../internal/use-controllable-action.mjs";
|
|
6
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
7
|
+
import { SelectContext } from "./select-context.mjs";
|
|
8
|
+
import { useSelectPartRef } from "./select-dom.mjs";
|
|
9
|
+
import { useNativeSelectValue } from "../internal/use-native-select-value.mjs";
|
|
10
|
+
import { useRef, useState } from "react";
|
|
11
|
+
import { jsx } from "react/jsx-runtime";
|
|
12
|
+
//#region src/select/select-root.tsx
|
|
13
|
+
/**
|
|
14
|
+
* The `<select>` itself: owns the value, the transition, the form-reset listener, the mount
|
|
15
|
+
* reconciliation and the re-apply of late options (design/components/select.md 15.2). Renders
|
|
16
|
+
* `value={optimistic}`: react-dom restores a controlled select to its props after every event,
|
|
17
|
+
* and only the sync-lane optimistic value survives that restore.
|
|
18
|
+
*
|
|
19
|
+
* Owned keys (conventions 1.2): `value`, `disabled`, `data-pending`, `data-disabled`, `onChange`.
|
|
20
|
+
*/
|
|
21
|
+
function SelectRoot({ value, defaultValue, valueChangeAction, disabled = false, className, style, children, render, ...rest }) {
|
|
22
|
+
const { ref: libraryRef, node: selectRef } = useSelectPartRef("Select.Root", "select");
|
|
23
|
+
const { optimistic, pending, dispatch, latestInFlight, adopt } = useControllableAction({
|
|
24
|
+
controlled: value,
|
|
25
|
+
defaultValue,
|
|
26
|
+
initialValue: "",
|
|
27
|
+
action: valueChangeAction,
|
|
28
|
+
transitionTypes: () => transitionTypes("select"),
|
|
29
|
+
warn: {
|
|
30
|
+
component: "Select.Root",
|
|
31
|
+
prop: "value"
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
const [mountValue] = useState(value);
|
|
35
|
+
const resetTarget = value === void 0 ? defaultValue : mountValue ?? value;
|
|
36
|
+
const established = useRef(false);
|
|
37
|
+
const dispatchChange = (next, details) => {
|
|
38
|
+
established.current = true;
|
|
39
|
+
dispatch(next, details);
|
|
40
|
+
};
|
|
41
|
+
const { optionMounted } = useNativeSelectValue({
|
|
42
|
+
ref: selectRef,
|
|
43
|
+
optimistic,
|
|
44
|
+
latestInFlight,
|
|
45
|
+
resetTarget,
|
|
46
|
+
adoptDefault: value === void 0 && defaultValue === void 0 ? {
|
|
47
|
+
adopt,
|
|
48
|
+
established: () => established.current
|
|
49
|
+
} : void 0,
|
|
50
|
+
onPlatformChange: (next, event) => dispatchChange(next, createActionDetails(event, { reason: "platform" }))
|
|
51
|
+
});
|
|
52
|
+
const context = {
|
|
53
|
+
optimistic,
|
|
54
|
+
pending,
|
|
55
|
+
disabled,
|
|
56
|
+
groupDisabled: false,
|
|
57
|
+
optionMounted
|
|
58
|
+
};
|
|
59
|
+
const element = useRender({
|
|
60
|
+
defaultElement: "select",
|
|
61
|
+
render,
|
|
62
|
+
state: {
|
|
63
|
+
value: optimistic,
|
|
64
|
+
pending,
|
|
65
|
+
disabled
|
|
66
|
+
},
|
|
67
|
+
className,
|
|
68
|
+
style,
|
|
69
|
+
children,
|
|
70
|
+
props: rest,
|
|
71
|
+
libraryProps: {
|
|
72
|
+
value: optimistic,
|
|
73
|
+
disabled,
|
|
74
|
+
"data-pending": dataAttr(pending),
|
|
75
|
+
"data-disabled": dataAttr(disabled),
|
|
76
|
+
onChange: (event) => {
|
|
77
|
+
if (disabled) return;
|
|
78
|
+
const next = event.currentTarget.value;
|
|
79
|
+
if (next === optimistic) return;
|
|
80
|
+
dispatchChange(next, createActionDetails(event.nativeEvent, { reason: "activate" }));
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
ref: libraryRef
|
|
84
|
+
});
|
|
85
|
+
return /* @__PURE__ */ jsx(SelectContext, {
|
|
86
|
+
value: context,
|
|
87
|
+
children: element
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
SelectRoot.displayName = "SelectRoot";
|
|
91
|
+
//#endregion
|
|
92
|
+
export { SelectRoot };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=select-root.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-root.mjs","names":[],"sources":["../../src/select/select-root.tsx"],"sourcesContent":["\"use client\";\nimport { useRef, useState } from \"react\";\nimport type { ChangeEvent, ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { createActionDetails } from \"../internal/action-details.js\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport { transitionTypes } from \"../internal/transition-types.js\";\nimport type {\n ActionDetails,\n ChangeAction,\n ChangeReason,\n RenderProp,\n StateValue,\n} from \"../internal/types.js\";\nimport { useControllableAction } from \"../internal/use-controllable-action.js\";\nimport { useNativeSelectValue } from \"../internal/use-native-select-value.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { SelectContext } from \"./select-context.js\";\nimport type { SelectContextValue } from \"./select-context.js\";\nimport { useSelectPartRef } from \"./select-dom.js\";\n\n/** Details passed as the second argument of `valueChangeAction`. */\nexport interface SelectValueChangeDetails extends ActionDetails {\n /**\n * `\"activate\"`: the user picked an option (pointer, keyboard, typeahead, or browser autofill,\n * which the library cannot tell from a pick); `details.event` is the native `change` event.\n * `\"platform\"`: the browser changed the value without a pick the library saw: a form reset\n * (`details.event` is the `reset` event), or a pick before hydration / Firefox form-state\n * restoration reconciled at mount (`details.event` is `undefined`).\n */\n readonly reason: ChangeReason;\n}\n\nexport interface SelectRootState {\n /** Optimistic value. Content rendered from it must not suspend. */\n readonly value: string;\n /** An action dispatched through this Select is in flight. */\n readonly pending: boolean;\n /** The `disabled` prop. */\n readonly disabled: boolean;\n}\n\nexport interface SelectRootProps extends Omit<\n ComponentPropsWithRef<\"select\">,\n | \"value\"\n | \"defaultValue\"\n | \"onChange\"\n | \"multiple\"\n | \"size\"\n | \"disabled\"\n | \"className\"\n | \"style\"\n | \"children\"\n> {\n /** Controlled value. `undefined` means uncontrolled. Use `\"\"` for the placeholder option. */\n value?: string;\n /**\n * Initial value in uncontrolled mode, and the value a form reset returns to (the latest prop is\n * mirrored into the options' `defaultSelected`). When omitted, the browser's choice (an option\n * whose value is `\"\"`, else the first enabled option) is adopted at mount, without a dispatch,\n * and is what a form reset returns to. Until a pick (or a platform change) sets the value,\n * options that mount later without the adopted one (a Suspense fallback) adopt again.\n */\n defaultValue?: string;\n /**\n * Runs inside the Root's transition whenever the selected option changes. May be sync or async\n * (also a Server Function); rejections reach the nearest Error Boundary and roll the selection\n * back.\n *\n * In engines whose closed select changes the value on every arrow press (Firefox, Safari with\n * native appearance), every press dispatches; the latest dispatch wins. A `setState` placed\n * after your own `await` is not a Transition update; wrap it in `startTransition` (React\n * limitation). Controlled mode is the way to veto a change.\n */\n valueChangeAction?: ChangeAction<string, SelectValueChangeDetails>;\n /** Native `disabled`. Never set by the library while pending. */\n disabled?: boolean;\n className?: StateValue<string | undefined, SelectRootState>;\n style?: StateValue<CSSProperties | undefined, SelectRootState>;\n children?: StateValue<ReactNode, SelectRootState>;\n /** Replace the rendered element. Must keep a `<select>`. */\n render?: RenderProp<ComponentPropsWithRef<\"select\">, SelectRootState>;\n}\n\n/**\n * The `<select>` itself: owns the value, the transition, the form-reset listener, the mount\n * reconciliation and the re-apply of late options (design/components/select.md 15.2). Renders\n * `value={optimistic}`: react-dom restores a controlled select to its props after every event,\n * and only the sync-lane optimistic value survives that restore.\n *\n * Owned keys (conventions 1.2): `value`, `disabled`, `data-pending`, `data-disabled`, `onChange`.\n */\nexport function SelectRoot({\n value,\n defaultValue,\n valueChangeAction,\n disabled = false,\n className,\n style,\n children,\n render,\n ...rest\n}: SelectRootProps) {\n const { ref: libraryRef, node: selectRef } = useSelectPartRef<HTMLSelectElement>(\n \"Select.Root\",\n \"select\",\n );\n\n const { optimistic, pending, dispatch, latestInFlight, adopt } = useControllableAction<\n string,\n SelectValueChangeDetails\n >({\n controlled: value,\n defaultValue,\n initialValue: \"\",\n action: valueChangeAction,\n transitionTypes: () => transitionTypes(\"select\"),\n warn: { component: \"Select.Root\", prop: \"value\" },\n });\n // Deliberately no warning when neither `value` nor `defaultValue` is given: the browser's\n // first-option default is adopted (design decision 3, product-owner decision 4).\n\n // Controlled: the mount-time value is the reset target (conventions 3.8 rule 6). Neither\n // `value` nor `defaultValue`: the value adopted at mount, chosen inside the hook.\n const [mountValue] = useState(value);\n const resetTarget = value === undefined ? defaultValue : (mountValue ?? value);\n\n // Any dispatch, a pick or a platform change, ends the adoption of the browser's default.\n const established = useRef(false);\n const dispatchChange = (next: string, details: SelectValueChangeDetails) => {\n established.current = true;\n dispatch(next, details);\n };\n\n const { optionMounted } = useNativeSelectValue({\n ref: selectRef,\n optimistic,\n latestInFlight,\n resetTarget,\n adoptDefault:\n value === undefined && defaultValue === undefined\n ? { adopt, established: () => established.current }\n : undefined,\n onPlatformChange: (next, event) =>\n dispatchChange(next, createActionDetails(event, { reason: \"platform\" })),\n });\n\n const context: SelectContextValue = {\n optimistic,\n pending,\n disabled,\n groupDisabled: false,\n optionMounted,\n };\n const state: SelectRootState = { value: optimistic, pending, disabled };\n\n const element = useRender<ComponentPropsWithRef<\"select\">, SelectRootState>({\n defaultElement: \"select\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps: {\n value: optimistic,\n disabled,\n \"data-pending\": dataAttr(pending),\n \"data-disabled\": dataAttr(disabled),\n onChange: (event: ChangeEvent<HTMLSelectElement>) => {\n // A natively disabled select fires no change; this covers `render` elements.\n if (disabled) return;\n const next = event.currentTarget.value;\n // No-op rule against the optimistic value (conventions 2.3, design 4.2).\n if (next === optimistic) return;\n dispatchChange(next, createActionDetails(event.nativeEvent, { reason: \"activate\" }));\n },\n },\n ref: libraryRef,\n });\n\n return <SelectContext value={context}>{element}</SelectContext>;\n}\n\nSelectRoot.displayName = \"SelectRoot\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AA2FA,SAAgB,WAAW,EACzB,OACA,cACA,mBACA,WAAW,OACX,WACA,OACA,UACA,QACA,GAAG,QACe;CAClB,MAAM,EAAE,KAAK,YAAY,MAAM,cAAc,iBAC3C,eACA,QACF;CAEA,MAAM,EAAE,YAAY,SAAS,UAAU,gBAAgB,UAAU,sBAG/D;EACA,YAAY;EACZ;EACA,cAAc;EACd,QAAQ;EACR,uBAAuB,gBAAgB,QAAQ;EAC/C,MAAM;GAAE,WAAW;GAAe,MAAM;EAAQ;CAClD,CAAC;CAMD,MAAM,CAAC,cAAc,SAAS,KAAK;CACnC,MAAM,cAAc,UAAU,KAAA,IAAY,eAAgB,cAAc;CAGxE,MAAM,cAAc,OAAO,KAAK;CAChC,MAAM,kBAAkB,MAAc,YAAsC;EAC1E,YAAY,UAAU;EACtB,SAAS,MAAM,OAAO;CACxB;CAEA,MAAM,EAAE,kBAAkB,qBAAqB;EAC7C,KAAK;EACL;EACA;EACA;EACA,cACE,UAAU,KAAA,KAAa,iBAAiB,KAAA,IACpC;GAAE;GAAO,mBAAmB,YAAY;EAAQ,IAChD,KAAA;EACN,mBAAmB,MAAM,UACvB,eAAe,MAAM,oBAAoB,OAAO,EAAE,QAAQ,WAAW,CAAC,CAAC;CAC3E,CAAC;CAED,MAAM,UAA8B;EAClC;EACA;EACA;EACA,eAAe;EACf;CACF;CAGA,MAAM,UAAU,UAA4D;EAC1E,gBAAgB;EAChB;EACA,OAAA;GAL+B,OAAO;GAAY;GAAS;EAKvD;EACJ;EACA;EACA;EACA,OAAO;EACP,cAAc;GACZ,OAAO;GACP;GACA,gBAAgB,SAAS,OAAO;GAChC,iBAAiB,SAAS,QAAQ;GAClC,WAAW,UAA0C;IAEnD,IAAI,UAAU;IACd,MAAM,OAAO,MAAM,cAAc;IAEjC,IAAI,SAAS,YAAY;IACzB,eAAe,MAAM,oBAAoB,MAAM,aAAa,EAAE,QAAQ,WAAW,CAAC,CAAC;GACrF;EACF;EACA,KAAK;CACP,CAAC;CAED,OAAO,oBAAC,eAAD;EAAe,OAAO;EAAU,UAAA;CAAuB,CAAA;AAChE;AAEA,WAAW,cAAc"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
+
import { SelectRootState } from "./select-root.mjs";
|
|
3
|
+
import { CSSProperties, ComponentPropsWithRef } from "react";
|
|
4
|
+
//#region src/select/select-separator.d.ts
|
|
5
|
+
export interface SelectSeparatorProps extends Omit<ComponentPropsWithRef<"hr">, "className" | "style" | "children"> {
|
|
6
|
+
className?: StateValue<string | undefined, SelectRootState>;
|
|
7
|
+
style?: StateValue<CSSProperties | undefined, SelectRootState>;
|
|
8
|
+
/** Replace the rendered element. */
|
|
9
|
+
render?: RenderProp<ComponentPropsWithRef<"hr">, SelectRootState>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* A decorative `<hr>` between options or groups (exposed as `separator` by Chromium's
|
|
13
|
+
* customizable select; a line in native pickers). Owns no keys.
|
|
14
|
+
*/
|
|
15
|
+
export declare function SelectSeparator({ className, style, render, ...rest }: SelectSeparatorProps): import("react").ReactNode;
|
|
16
|
+
export declare namespace SelectSeparator {
|
|
17
|
+
var displayName: string;
|
|
18
|
+
}
|
|
19
|
+
//#endregion
|
|
20
|
+
//# sourceMappingURL=select-separator.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-separator.d.mts","names":[],"sources":["../../src/select/select-separator.tsx"],"mappings":";;;;iBAOiB,6BAA6B,KAC5C;EAGA,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;;EAE9C,SAAS,WAAW,6BAA6B;;;;;;wBAOnC,kBAAkB,WAAW,OAAO,WAAW,QAAQ,uCAAoB;yBAA3E"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
3
|
+
import { useSelectContext } from "./select-context.mjs";
|
|
4
|
+
//#region src/select/select-separator.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A decorative `<hr>` between options or groups (exposed as `separator` by Chromium's
|
|
7
|
+
* customizable select; a line in native pickers). Owns no keys.
|
|
8
|
+
*/
|
|
9
|
+
function SelectSeparator({ className, style, render, ...rest }) {
|
|
10
|
+
const ctx = useSelectContext("Select.Separator");
|
|
11
|
+
const state = {
|
|
12
|
+
value: ctx.optimistic,
|
|
13
|
+
pending: ctx.pending,
|
|
14
|
+
disabled: ctx.disabled
|
|
15
|
+
};
|
|
16
|
+
return useRender({
|
|
17
|
+
defaultElement: "hr",
|
|
18
|
+
render,
|
|
19
|
+
state,
|
|
20
|
+
className,
|
|
21
|
+
style,
|
|
22
|
+
children: void 0,
|
|
23
|
+
props: rest
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
SelectSeparator.displayName = "SelectSeparator";
|
|
27
|
+
//#endregion
|
|
28
|
+
export { SelectSeparator };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=select-separator.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-separator.mjs","names":[],"sources":["../../src/select/select-separator.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef, CSSProperties } from \"react\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { useSelectContext } from \"./select-context.js\";\nimport type { SelectRootState } from \"./select-root.js\";\n\nexport interface SelectSeparatorProps extends Omit<\n ComponentPropsWithRef<\"hr\">,\n \"className\" | \"style\" | \"children\"\n> {\n className?: StateValue<string | undefined, SelectRootState>;\n style?: StateValue<CSSProperties | undefined, SelectRootState>;\n /** Replace the rendered element. */\n render?: RenderProp<ComponentPropsWithRef<\"hr\">, SelectRootState>;\n}\n\n/**\n * A decorative `<hr>` between options or groups (exposed as `separator` by Chromium's\n * customizable select; a line in native pickers). Owns no keys.\n */\nexport function SelectSeparator({ className, style, render, ...rest }: SelectSeparatorProps) {\n const ctx = useSelectContext(\"Select.Separator\");\n const state: SelectRootState = {\n value: ctx.optimistic,\n pending: ctx.pending,\n disabled: ctx.disabled,\n };\n return useRender<ComponentPropsWithRef<\"hr\">, SelectRootState>({\n defaultElement: \"hr\",\n render,\n state,\n className,\n style,\n children: undefined,\n props: rest,\n });\n}\n\nSelectSeparator.displayName = \"SelectSeparator\";\n"],"mappings":";;;;;;;;AAqBA,SAAgB,gBAAgB,EAAE,WAAW,OAAO,QAAQ,GAAG,QAA8B;CAC3F,MAAM,MAAM,iBAAiB,kBAAkB;CAC/C,MAAM,QAAyB;EAC7B,OAAO,IAAI;EACX,SAAS,IAAI;EACb,UAAU,IAAI;CAChB;CACA,OAAO,UAAwD;EAC7D,gBAAgB;EAChB;EACA;EACA;EACA;EACA,UAAU,KAAA;EACV,OAAO;CACT,CAAC;AACH;AAEA,gBAAgB,cAAc"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
+
import { SelectRootState } from "./select-root.mjs";
|
|
3
|
+
import { CSSProperties, ComponentPropsWithRef, ReactNode } from "react";
|
|
4
|
+
//#region src/select/select-trigger.d.ts
|
|
5
|
+
export interface SelectTriggerProps extends Omit<ComponentPropsWithRef<"button">, "type" | "className" | "style" | "children"> {
|
|
6
|
+
className?: StateValue<string | undefined, SelectRootState>;
|
|
7
|
+
style?: StateValue<CSSProperties | undefined, SelectRootState>;
|
|
8
|
+
/**
|
|
9
|
+
* Non-interactive content only (HTML content model of a select's button), usually
|
|
10
|
+
* `<Select.Value />`. Not rendered by engines without customizable select (Firefox today).
|
|
11
|
+
*/
|
|
12
|
+
children?: StateValue<ReactNode, SelectRootState>;
|
|
13
|
+
/** Replace the rendered element. Must keep a `<button>`. */
|
|
14
|
+
render?: RenderProp<ComponentPropsWithRef<"button">, SelectRootState>;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The select's own `<button>` (customizable select): replaces the UA button in engines with
|
|
18
|
+
* `appearance: base-select`. Optional; **must be the first child** of `Select.Root`. Its state is
|
|
19
|
+
* the Root's state, so a pending indicator next to `<Select.Value />` goes in its function
|
|
20
|
+
* `children`.
|
|
21
|
+
*
|
|
22
|
+
* Owned keys: `type` (always `"button"`), `data-pending`, `data-disabled`.
|
|
23
|
+
*/
|
|
24
|
+
export declare function SelectTrigger({ className, style, children, render, ...rest }: SelectTriggerProps): ReactNode;
|
|
25
|
+
export declare namespace SelectTrigger {
|
|
26
|
+
var displayName: string;
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
//# sourceMappingURL=select-trigger.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-trigger.d.mts","names":[],"sources":["../../src/select/select-trigger.tsx"],"mappings":";;;;iBASiB,2BAA2B,KAC1C;EAGA,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;;;;;EAK9C,WAAW,WAAW,WAAW;;EAEjC,SAAS,WAAW,iCAAiC;;;;;;;;;;wBAoBvC,gBAAgB,WAAW,OAAO,UAAU,WAAW,QAAQ,qBAAkB;yBAAjF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { dataAttr } from "../internal/data-attr.mjs";
|
|
3
|
+
import { useRender } from "../internal/use-render.mjs";
|
|
4
|
+
import { useSelectContext } from "./select-context.mjs";
|
|
5
|
+
import { useSelectPartRef } from "./select-dom.mjs";
|
|
6
|
+
//#region src/select/select-trigger.tsx
|
|
7
|
+
function firstChildOfSelect(el) {
|
|
8
|
+
const parent = el.parentElement;
|
|
9
|
+
if (parent?.tagName === "SELECT" && parent.firstElementChild === el) return null;
|
|
10
|
+
return "must be the first child of Select.Root's <select> (HTML content model); elsewhere the browser does not use it as the select's button.";
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* The select's own `<button>` (customizable select): replaces the UA button in engines with
|
|
14
|
+
* `appearance: base-select`. Optional; **must be the first child** of `Select.Root`. Its state is
|
|
15
|
+
* the Root's state, so a pending indicator next to `<Select.Value />` goes in its function
|
|
16
|
+
* `children`.
|
|
17
|
+
*
|
|
18
|
+
* Owned keys: `type` (always `"button"`), `data-pending`, `data-disabled`.
|
|
19
|
+
*/
|
|
20
|
+
function SelectTrigger({ className, style, children, render, ...rest }) {
|
|
21
|
+
const ctx = useSelectContext("Select.Trigger");
|
|
22
|
+
const state = {
|
|
23
|
+
value: ctx.optimistic,
|
|
24
|
+
pending: ctx.pending,
|
|
25
|
+
disabled: ctx.disabled
|
|
26
|
+
};
|
|
27
|
+
const { ref } = useSelectPartRef("Select.Trigger", "button", firstChildOfSelect);
|
|
28
|
+
return useRender({
|
|
29
|
+
defaultElement: "button",
|
|
30
|
+
render,
|
|
31
|
+
state,
|
|
32
|
+
className,
|
|
33
|
+
style,
|
|
34
|
+
children,
|
|
35
|
+
props: rest,
|
|
36
|
+
libraryProps: {
|
|
37
|
+
type: "button",
|
|
38
|
+
"data-pending": dataAttr(ctx.pending),
|
|
39
|
+
"data-disabled": dataAttr(ctx.disabled)
|
|
40
|
+
},
|
|
41
|
+
ref
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
SelectTrigger.displayName = "SelectTrigger";
|
|
45
|
+
//#endregion
|
|
46
|
+
export { SelectTrigger };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=select-trigger.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-trigger.mjs","names":[],"sources":["../../src/select/select-trigger.tsx"],"sourcesContent":["\"use client\";\nimport type { ComponentPropsWithRef, CSSProperties, ReactNode } from \"react\";\nimport { dataAttr } from \"../internal/data-attr.js\";\nimport type { RenderProp, StateValue } from \"../internal/types.js\";\nimport { useRender } from \"../internal/use-render.js\";\nimport { useSelectContext } from \"./select-context.js\";\nimport { useSelectPartRef } from \"./select-dom.js\";\nimport type { SelectRootState } from \"./select-root.js\";\n\nexport interface SelectTriggerProps extends Omit<\n ComponentPropsWithRef<\"button\">,\n \"type\" | \"className\" | \"style\" | \"children\"\n> {\n className?: StateValue<string | undefined, SelectRootState>;\n style?: StateValue<CSSProperties | undefined, SelectRootState>;\n /**\n * Non-interactive content only (HTML content model of a select's button), usually\n * `<Select.Value />`. Not rendered by engines without customizable select (Firefox today).\n */\n children?: StateValue<ReactNode, SelectRootState>;\n /** Replace the rendered element. Must keep a `<button>`. */\n render?: RenderProp<ComponentPropsWithRef<\"button\">, SelectRootState>;\n}\n\nfunction firstChildOfSelect(el: HTMLButtonElement): string | null {\n const parent = el.parentElement;\n if (parent?.tagName === \"SELECT\" && parent.firstElementChild === el) return null;\n return (\n \"must be the first child of Select.Root's <select> (HTML content model); elsewhere the \" +\n \"browser does not use it as the select's button.\"\n );\n}\n\n/**\n * The select's own `<button>` (customizable select): replaces the UA button in engines with\n * `appearance: base-select`. Optional; **must be the first child** of `Select.Root`. Its state is\n * the Root's state, so a pending indicator next to `<Select.Value />` goes in its function\n * `children`.\n *\n * Owned keys: `type` (always `\"button\"`), `data-pending`, `data-disabled`.\n */\nexport function SelectTrigger({ className, style, children, render, ...rest }: SelectTriggerProps) {\n const ctx = useSelectContext(\"Select.Trigger\");\n const state: SelectRootState = {\n value: ctx.optimistic,\n pending: ctx.pending,\n disabled: ctx.disabled,\n };\n const { ref } = useSelectPartRef<HTMLButtonElement>(\n \"Select.Trigger\",\n \"button\",\n firstChildOfSelect,\n );\n return useRender<ComponentPropsWithRef<\"button\">, SelectRootState>({\n defaultElement: \"button\",\n render,\n state,\n className,\n style,\n children,\n props: rest,\n libraryProps: {\n // Explicit: Chromium 156 reports `.type === \"submit\"` for a select's button.\n type: \"button\",\n \"data-pending\": dataAttr(ctx.pending),\n \"data-disabled\": dataAttr(ctx.disabled),\n },\n ref,\n });\n}\n\nSelectTrigger.displayName = \"SelectTrigger\";\n"],"mappings":";;;;;;AAwBA,SAAS,mBAAmB,IAAsC;CAChE,MAAM,SAAS,GAAG;CAClB,IAAI,QAAQ,YAAY,YAAY,OAAO,sBAAsB,IAAI,OAAO;CAC5E,OACE;AAGJ;;;;;;;;;AAUA,SAAgB,cAAc,EAAE,WAAW,OAAO,UAAU,QAAQ,GAAG,QAA4B;CACjG,MAAM,MAAM,iBAAiB,gBAAgB;CAC7C,MAAM,QAAyB;EAC7B,OAAO,IAAI;EACX,SAAS,IAAI;EACb,UAAU,IAAI;CAChB;CACA,MAAM,EAAE,QAAQ,iBACd,kBACA,UACA,kBACF;CACA,OAAO,UAA4D;EACjE,gBAAgB;EAChB;EACA;EACA;EACA;EACA;EACA,OAAO;EACP,cAAc;GAEZ,MAAM;GACN,gBAAgB,SAAS,IAAI,OAAO;GACpC,iBAAiB,SAAS,IAAI,QAAQ;EACxC;EACA;CACF,CAAC;AACH;AAEA,cAAc,cAAc"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { RenderProp, StateValue } from "../internal/types.mjs";
|
|
2
|
+
import { SelectRootState } from "./select-root.mjs";
|
|
3
|
+
import { CSSProperties, ComponentPropsWithRef } from "react";
|
|
4
|
+
//#region src/select/select-value.d.ts
|
|
5
|
+
export interface SelectValueProps extends Omit<ComponentPropsWithRef<"selectedcontent">, "children" | "dangerouslySetInnerHTML" | "className" | "style"> {
|
|
6
|
+
className?: StateValue<string | undefined, SelectRootState>;
|
|
7
|
+
style?: StateValue<CSSProperties | undefined, SelectRootState>;
|
|
8
|
+
/** Replace the rendered element. Must keep a `<selectedcontent>`. */
|
|
9
|
+
render?: RenderProp<ComponentPropsWithRef<"selectedcontent">, SelectRootState>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* `<selectedcontent>`: the browser clones the selected option's content into it (inside
|
|
13
|
+
* `Select.Trigger`). It has no `children`. Rendered with `suppressHydrationWarning` and an empty
|
|
14
|
+
* `dangerouslySetInnerHTML` so that hydration accepts the content the parser cloned before React
|
|
15
|
+
* ran (design/components/select.md 3.3).
|
|
16
|
+
*
|
|
17
|
+
* Also keeps it fresh: the platform re-clones only on selection changes, so when React changes
|
|
18
|
+
* the selected option's content (a label, a state function, a Suspense boundary resolving inside
|
|
19
|
+
* it), a `MutationObserver` re-assigns `select.value = select.value`, which re-clones without
|
|
20
|
+
* events and without touching the selection or an open picker (6.3). The same refresh follows a
|
|
21
|
+
* form reset, which Chromium does not re-clone for. Not installed where
|
|
22
|
+
* `HTMLSelectedContentElement` is undefined (Firefox today, jsdom): nothing is cloned there.
|
|
23
|
+
*
|
|
24
|
+
* Owned keys: `dangerouslySetInnerHTML`, `suppressHydrationWarning`, `children`.
|
|
25
|
+
*/
|
|
26
|
+
export declare function SelectValue({ className, style, render, ...rest }: SelectValueProps): import("react").ReactNode;
|
|
27
|
+
export declare namespace SelectValue {
|
|
28
|
+
var displayName: string;
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
//# sourceMappingURL=select-value.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"select-value.d.mts","names":[],"sources":["../../src/select/select-value.tsx"],"mappings":";;;;iBAYiB,yBAAyB,KACxC;EAGA,YAAY,+BAA+B;EAC3C,QAAQ,WAAW,2BAA2B;;EAE9C,SAAS,WAAW,0CAA0C;;;;;;;;;;;;;;;;;wBA2ChD,cAAc,WAAW,OAAO,WAAW,QAAQ,mCAAgB;yBAAnE"}
|