@cerberus-design/react 0.15.0-next-e5dbdbd → 0.15.0-next-b2ad645

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.
@@ -127,6 +127,7 @@ import { rectIntersection } from '@dnd-kit/core';
127
127
  import { RefAttributes } from 'react';
128
128
  import { RefObject } from 'react';
129
129
  import { ScreenReaderInstructions } from '@dnd-kit/core';
130
+ import { Select as Select_2 } from '@ark-ui/react/select';
130
131
  import { SelectItemGroupLabelProps } from '@ark-ui/react/select';
131
132
  import { SelectItemGroupProps } from '@ark-ui/react/select';
132
133
  import { SelectItemProps } from '@ark-ui/react/select';
@@ -2923,6 +2924,13 @@ declare function Select(props: SelectProps): JSX_2.Element;
2923
2924
  export { Select }
2924
2925
  export { Select as Select_alias_1 }
2925
2926
 
2927
+ /**
2928
+ * Select Primitive: The trigger that clears the selected value
2929
+ */
2930
+ declare const SelectClearTrigger: ForwardRefExoticComponent<Select_2.ClearTriggerProps & RefAttributes<HTMLButtonElement>>;
2931
+ export { SelectClearTrigger }
2932
+ export { SelectClearTrigger as SelectClearTrigger_alias_1 }
2933
+
2926
2934
  declare interface SelectCollection {
2927
2935
  /**
2928
2936
  * The items to be displayed in the dropdown list.
@@ -2953,13 +2961,104 @@ declare interface SelectCollectionItem {
2953
2961
  export { SelectCollectionItem }
2954
2962
  export { SelectCollectionItem as SelectCollectionItem_alias_1 }
2955
2963
 
2964
+ /**
2965
+ * Select Primitive: The content of the dropdown (i.e. the container itself)
2966
+ */
2967
+ declare const SelectContent: ForwardRefExoticComponent<Select_2.ContentProps & RefAttributes<HTMLDivElement>>;
2968
+ export { SelectContent }
2969
+ export { SelectContent as SelectContent_alias_1 }
2970
+
2971
+ /**
2972
+ * Select Primitive: The wrapper to the select trigger that opens the dropdown
2973
+ */
2974
+ declare const SelectControl: ForwardRefExoticComponent<Select_2.ControlProps & RefAttributes<HTMLDivElement>>;
2975
+ export { SelectControl }
2976
+ export { SelectControl as SelectControl_alias_1 }
2977
+
2978
+ /**
2979
+ * Select Primitive: The indicator that appears in the trigger
2980
+ */
2981
+ declare const SelectIndicator: ForwardRefExoticComponent<Select_2.IndicatorProps & RefAttributes<HTMLDivElement>>;
2982
+ export { SelectIndicator }
2983
+ export { SelectIndicator as SelectIndicator_alias_1 }
2984
+
2985
+ /**
2986
+ * Select Primitive: The container for an item option
2987
+ */
2988
+ declare const SelectItem: ForwardRefExoticComponent<Select_2.ItemProps & RefAttributes<HTMLDivElement>>;
2989
+ export { SelectItem }
2990
+ export { SelectItem as SelectItem_alias_1 }
2991
+
2992
+ /**
2993
+ * Select Primitive: The container for a group of item options
2994
+ */
2995
+ declare const SelectItemGroup: ForwardRefExoticComponent<Select_2.ItemGroupProps & RefAttributes<HTMLDivElement>>;
2996
+ export { SelectItemGroup }
2997
+ export { SelectItemGroup as SelectItemGroup_alias_1 }
2998
+
2999
+ /**
3000
+ * Select Primitive: The label for a group of item options
3001
+ */
3002
+ declare const SelectItemGroupLabel: ForwardRefExoticComponent<Select_2.ItemGroupLabelProps & RefAttributes<HTMLDivElement>>;
3003
+ export { SelectItemGroupLabel }
3004
+ export { SelectItemGroupLabel as SelectItemGroupLabel_alias_1 }
3005
+
3006
+ /**
3007
+ * Select Primitive: The indicator for an item option
3008
+ */
3009
+ declare const SelectItemIndicator: ForwardRefExoticComponent<Select_2.ItemIndicatorProps & RefAttributes<HTMLDivElement>>;
3010
+ export { SelectItemIndicator }
3011
+ export { SelectItemIndicator as SelectItemIndicator_alias_1 }
3012
+
3013
+ /**
3014
+ * Select Primitive: The text for an item option
3015
+ */
3016
+ declare const SelectItemText: ForwardRefExoticComponent<Select_2.ItemTextProps & RefAttributes<HTMLDivElement>>;
3017
+ export { SelectItemText }
3018
+ export { SelectItemText as SelectItemText_alias_1 }
3019
+
3020
+ /**
3021
+ * Select Primitive: The label that appears above the select input
3022
+ */
3023
+ declare const SelectLabel: ForwardRefExoticComponent<Select_2.LabelProps & RefAttributes<HTMLLabelElement>>;
3024
+ export { SelectLabel }
3025
+ export { SelectLabel as SelectLabel_alias_1 }
3026
+
3027
+ /**
3028
+ * Select Primitive: The positioner that contains the dropdown
3029
+ */
3030
+ declare const SelectPositioner: ForwardRefExoticComponent<Select_2.PositionerProps & RefAttributes<HTMLDivElement>>;
3031
+ export { SelectPositioner }
3032
+ export { SelectPositioner as SelectPositioner_alias_1 }
3033
+
2956
3034
  declare type SelectProps = SelectRootProps<SelectCollectionItem> & BaseSelectProps & SelectVariantProps;
2957
3035
  export { SelectProps }
2958
3036
  export { SelectProps as SelectProps_alias_1 }
2959
3037
 
3038
+ /**
3039
+ * Select Primitive: The context provider for the Select family
3040
+ */
3041
+ declare function SelectRoot(props: SelectRootProps<SelectCollectionItem>): JSX_2.Element;
3042
+ export { SelectRoot }
3043
+ export { SelectRoot as SelectRoot_alias_1 }
3044
+
3045
+ /**
3046
+ * Select Primitive: The trigger that opens the dropdown
3047
+ */
3048
+ declare const SelectTrigger: ForwardRefExoticComponent<Select_2.TriggerProps & RefAttributes<HTMLButtonElement>>;
3049
+ export { SelectTrigger }
3050
+ export { SelectTrigger as SelectTrigger_alias_1 }
3051
+
2960
3052
  export { SelectValueChangeDetails }
2961
3053
  export { SelectValueChangeDetails as SelectValueChangeDetails_alias_1 }
2962
3054
 
3055
+ /**
3056
+ * Select Primitive: The text that appears in the trigger
3057
+ */
3058
+ declare const SelectValueText: ForwardRefExoticComponent<Select_2.ValueTextProps & RefAttributes<HTMLSpanElement>>;
3059
+ export { SelectValueText }
3060
+ export { SelectValueText as SelectValueText_alias_1 }
3061
+
2963
3062
  export { Sensor }
2964
3063
 
2965
3064
  export { SensorContext }
@@ -28,7 +28,7 @@ __export(Select_exports, {
28
28
  createSelectCollection: () => createSelectCollection
29
29
  });
30
30
  module.exports = __toCommonJS(Select_exports);
31
- var import_select = require("@ark-ui/react/select");
31
+ var import_select2 = require("@ark-ui/react/select");
32
32
  var import_recipes = require("@cerberus/styled-system/recipes");
33
33
  var import_css = require("@cerberus/styled-system/css");
34
34
  var import_jsx2 = require("@cerberus/styled-system/jsx");
@@ -91,54 +91,70 @@ function Text(props) {
91
91
  }
92
92
  }
93
93
 
94
- // src/components/Select.tsx
94
+ // src/components/Select.server.tsx
95
+ var import_select = require("@ark-ui/react/select");
95
96
  var import_jsx_runtime3 = require("react/jsx-runtime");
97
+ function SelectRoot(props) {
98
+ const { children, ...rootProps } = props;
99
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_select.Select.Root, { ...rootProps, children: [
100
+ children,
101
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.HiddenSelect, {})
102
+ ] });
103
+ }
104
+ var SelectLabel = import_select.Select.Label;
105
+ var SelectControl = import_select.Select.Control;
106
+ var SelectTrigger = import_select.Select.Trigger;
107
+ var SelectValueText = import_select.Select.ValueText;
108
+ var SelectIndicator = import_select.Select.Indicator;
109
+ var SelectClearTrigger = import_select.Select.ClearTrigger;
110
+ var SelectPositioner = import_select.Select.Positioner;
111
+ var SelectContent = import_select.Select.Content;
112
+ var SelectItemGroup = import_select.Select.ItemGroup;
113
+ var SelectItemGroupLabel = import_select.Select.ItemGroupLabel;
114
+ var SelectItem = import_select.Select.Item;
115
+ var SelectItemText = import_select.Select.ItemText;
116
+ var SelectItemIndicator = import_select.Select.ItemIndicator;
117
+
118
+ // src/components/Select.tsx
119
+ var import_jsx_runtime4 = require("react/jsx-runtime");
96
120
  function Select(props) {
97
121
  const { collection, label, placeholder, size, ...rootProps } = props;
98
122
  const { icons } = useCerberusContext();
99
123
  const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
100
124
  const styles = (0, import_recipes.select)({ size });
101
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
102
- import_select.Select.Root,
103
- {
104
- className: styles.root,
105
- collection,
106
- ...rootProps,
107
- children: [
108
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_select.Select.Label, { className: styles.label, children: [
109
- label,
110
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Show, { when: props.required, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { as: "span", color: "page.text.100", children: "(required)" }) })
111
- ] }),
112
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.Control, { className: styles.control, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_select.Select.Trigger, { className: styles.trigger, children: [
113
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.ValueText, { placeholder }),
114
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx2.HStack, { children: [
115
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Show, { when: props.invalid, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InvalidIcon, { "data-part": "invalid-icon" }) }),
116
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.Indicator, { className: styles.indicator, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectArrow, {}) })
117
- ] })
118
- ] }) }),
119
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.Positioner, { className: styles.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.Content, { className: styles.content, children: props.children }) }) }),
120
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.HiddenSelect, {})
121
- ]
122
- }
123
- );
125
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(SelectRoot, { className: styles.root, collection, ...rootProps, children: [
126
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(SelectLabel, { className: styles.label, children: [
127
+ label,
128
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: props.required, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { as: "span", color: "page.text.100", children: "(required)" }) })
129
+ ] }),
130
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectControl, { className: styles.control, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(SelectTrigger, { className: styles.trigger, children: [
131
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectValueText, { placeholder }),
132
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx2.HStack, { children: [
133
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Show, { when: props.invalid, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(InvalidIcon, { "data-part": "invalid-icon" }) }),
134
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectIndicator, { className: styles.indicator, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectArrow, {}) })
135
+ ] })
136
+ ] }) }),
137
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectPositioner, { className: styles.positioner, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectContent, { className: styles.content, children: props.children }) }) }),
138
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_select2.Select.HiddenSelect, {})
139
+ ] });
124
140
  }
125
141
  function Option(props) {
126
142
  const { item, ...itemProps } = props;
127
143
  const { icons } = useCerberusContext();
128
144
  const { selectChecked: CheckedIcon } = icons;
129
145
  const styles = (0, import_recipes.select)();
130
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_select.Select.Item, { ...itemProps, item, className: styles.item, children: [
131
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.ItemText, { className: styles.itemText, children: item == null ? void 0 : item.label }),
132
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.ItemIndicator, { className: styles.itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(CheckedIcon, {}) })
146
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(SelectItem, { ...itemProps, item, className: styles.item, children: [
147
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectItemText, { className: styles.itemText, children: item == null ? void 0 : item.label }),
148
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectItemIndicator, { className: styles.itemIndicator, children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(CheckedIcon, {}) })
133
149
  ] });
134
150
  }
135
151
  function OptionGroup(props) {
136
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.ItemGroup, { ...props });
152
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(SelectItemGroup, { ...props });
137
153
  }
138
154
  function OptionGroupLabel(props) {
139
155
  const styles = (0, import_recipes.select)();
140
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
141
- import_select.Select.ItemGroupLabel,
156
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
157
+ SelectItemGroupLabel,
142
158
  {
143
159
  ...props,
144
160
  className: (0, import_css.cx)(props.className, styles.itemGroupLabel)
@@ -146,7 +162,7 @@ function OptionGroupLabel(props) {
146
162
  );
147
163
  }
148
164
  function createSelectCollection(collection) {
149
- return (0, import_select.createListCollection)({
165
+ return (0, import_select2.createListCollection)({
150
166
  items: collection
151
167
  });
152
168
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Select.tsx","../../../src/context/cerberus.tsx","../../../src/components/Portal.tsx","../../../src/components/Show.tsx","../../../src/components/Text.tsx"],"sourcesContent":["'use client'\n\nimport {\n Select as ArkSelect,\n createListCollection,\n type SelectRootProps,\n type SelectItemProps,\n type SelectItemGroupProps,\n type SelectItemGroupLabelProps,\n type ListCollection,\n type SelectValueChangeDetails,\n} from '@ark-ui/react/select'\nimport {\n select,\n type SelectVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Portal } from './Portal'\nimport { Show } from './Show'\nimport { Text } from './Text'\n\n/**\n * This module contains the Select components.\n * @module 'react/select'\n */\n\nexport interface SelectCollectionItem {\n /**\n * What is displayed in the dropdown list.\n */\n label: string\n /**\n * The value of the selected item used in the form.\n */\n value: string\n /**\n * If the item is disabled.\n */\n disabled?: boolean\n}\n\nexport interface SelectCollection {\n /**\n * The items to be displayed in the dropdown list.\n */\n items: SelectCollectionItem[]\n}\n\nexport interface BaseSelectProps {\n /**\n * The placeholder text when no option is selected.\n */\n placeholder?: string\n /**\n * The label of the select.\n */\n label: string\n}\n\nexport type SelectProps = SelectRootProps<SelectCollectionItem> &\n BaseSelectProps &\n SelectVariantProps\n\n/**\n * The Select component is a dropdown list that allows users to select an\n * option from a list.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * import { Select, Option, createListCollection } from '@cerberus-design/react'\n *\n * export function SelectBasicPreview() {\n * const collection = createListCollection({\n * items: [\n * { label: 'Hades', value: 'hades' },\n * { label: 'Persephone', value: 'persephone' },\n * { label: 'Zeus', value: 'zeus', disabled: true },\n * ]\n * })\n *\n * return (\n * <Select\n * collection={collection}\n * label=\"Select Relative\"\n * placeholder=\"Choose option\"\n * >\n * {collection.items.map((item) => (\n * <Option key={item.value} item={item} />\n * ))}\n * </Select>\n * )\n * }\n */\nexport function Select(props: SelectProps) {\n const { collection, label, placeholder, size, ...rootProps } = props\n const { icons } = useCerberusContext()\n const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons\n\n const styles = select({ size })\n\n return (\n <ArkSelect.Root\n className={styles.root}\n collection={collection}\n {...rootProps}\n >\n <ArkSelect.Label className={styles.label}>\n {label}\n <Show when={props.required}>\n <Text as=\"span\" color=\"page.text.100\">\n (required)\n </Text>\n </Show>\n </ArkSelect.Label>\n\n <ArkSelect.Control className={styles.control}>\n <ArkSelect.Trigger className={styles.trigger}>\n <ArkSelect.ValueText placeholder={placeholder} />\n\n <HStack>\n <Show when={props.invalid}>\n <InvalidIcon data-part=\"invalid-icon\" />\n </Show>\n <ArkSelect.Indicator className={styles.indicator}>\n <SelectArrow />\n </ArkSelect.Indicator>\n </HStack>\n </ArkSelect.Trigger>\n </ArkSelect.Control>\n\n <Portal>\n <ArkSelect.Positioner className={styles.positioner}>\n <ArkSelect.Content className={styles.content}>\n {props.children}\n </ArkSelect.Content>\n </ArkSelect.Positioner>\n </Portal>\n\n <ArkSelect.HiddenSelect />\n </ArkSelect.Root>\n )\n}\n\nexport interface OptionProps extends SelectItemProps {\n /**\n * The CollectionListItem to be displayed in the dropdown list.\n */\n item: SelectCollectionItem\n}\n\nexport function Option(props: OptionProps) {\n const { item, ...itemProps } = props\n\n const { icons } = useCerberusContext()\n const { selectChecked: CheckedIcon } = icons\n\n const styles = select()\n\n return (\n <ArkSelect.Item {...itemProps} item={item} className={styles.item}>\n <ArkSelect.ItemText className={styles.itemText}>\n {item?.label}\n </ArkSelect.ItemText>\n <ArkSelect.ItemIndicator className={styles.itemIndicator}>\n <CheckedIcon />\n </ArkSelect.ItemIndicator>\n </ArkSelect.Item>\n )\n}\n\n/**\n * The OptionGroup component is a group of options in the dropdown list.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * <OptionGroup>\n * <OptionGroupLabel>Greek gods</OptionGroupLabel>\n * ...\n * </OptionGroup>\n * ```\n */\nexport function OptionGroup(props: SelectItemGroupProps) {\n return <ArkSelect.ItemGroup {...props} />\n}\n\n/**\n * The OptionGroupLabel component is the label of the OptionGroup.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * <OptionGroupLabel>Greek gods</OptionGroupLabel>\n * ```\n */\nexport function OptionGroupLabel(props: SelectItemGroupLabelProps) {\n const styles = select()\n return (\n <ArkSelect.ItemGroupLabel\n {...props}\n className={cx(props.className, styles.itemGroupLabel)}\n />\n )\n}\n\n/**\n * A helper function to create a SelectCollection object.\n * @param collection - An array of SelectCollectionItem objects that matches\n * the following shape:\n * ```ts\n * [{ label: 'Hades', value: 'hades', disabled?: true }]\n * ```\n */\nexport function createSelectCollection(\n collection: SelectCollectionItem[],\n): ListCollection<SelectCollectionItem> {\n return createListCollection({\n items: collection,\n })\n}\n\nexport type { SelectValueChangeDetails, ListCollection }\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import {\n Portal as ArkPortal,\n type PortalProps as ArkPortalProps,\n} from '@ark-ui/react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type PortalProps = ArkPortalProps\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport const Portal = ArkPortal\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","import {\n Em,\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n P,\n Small,\n Span,\n Strong,\n type PProps,\n} from '@cerberus/styled-system/jsx'\nimport { type HTMLAttributes, type PropsWithChildren } from 'react'\n\n/**\n * This module exports a component for rendering text utilizing the styled-system JSX utility.\n * @module @cerberus/react/Text\n */\n\nexport type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TextElements = 'p' | 'strong' | 'em' | 'small' | 'span'\n\n// For some reason we have to use the HTMLParagraphElement type here\n// or else TS will fail for non-style props like 'id' or 'className'\nexport interface TextProps\n extends PProps,\n HTMLAttributes<HTMLParagraphElement> {\n /**\n * The element to render as. Defaults to 'p'.\n */\n as?: TextElements | Headings\n}\n\n/**\n * A component for rendering text utilizing the styled-system JSX utility.\n * @definition [Text docs](https://cerberus.digitalu.design/react/text)\n * @example\n * ```tsx\n * <Text as=\"h1\" color=\"page.text.100\" textStyle={{\n * base: 'heading-md',\n * md: 'heading-lg',\n * }}>\n * Hello, world!\n * </Text>\n */\nexport function Text(props: PropsWithChildren<TextProps>) {\n const { as = 'p', ...pandaJSXProps } = props\n switch (as) {\n case 'h1':\n return <H1 {...pandaJSXProps} />\n case 'h2':\n return <H2 {...pandaJSXProps} />\n case 'h3':\n return <H3 {...pandaJSXProps} />\n case 'h4':\n return <H4 {...pandaJSXProps} />\n case 'h5':\n return <H5 {...pandaJSXProps} />\n case 'h6':\n return <H6 {...pandaJSXProps} />\n case 'strong':\n return <Strong {...pandaJSXProps} />\n case 'em':\n return <Em {...pandaJSXProps} />\n case 'small':\n return <Small {...pandaJSXProps} />\n case 'span':\n return <Span {...pandaJSXProps} />\n default:\n return <P {...pandaJSXProps} />\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,oBASO;AACP,qBAGO;AACP,iBAAmB;AACnB,IAAAA,cAAuB;;;ACfvB,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,IAAAC,gBAGO;AA2BA,IAAM,SAAS,cAAAC;;;AC5BtB,IAAAC,gBAAgE;AA4BzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY,uBAAQ,MAAM,QAAQ,OAAO,CAAC,IAAI,CAAC;AAErD,aAAO,uBAAQ,MAAM;AACnB,QAAI,UAAW,QAAO;AACtB,WAAO,YAAY;AAAA,EACrB,GAAG,CAAC,WAAW,UAAU,QAAQ,CAAC;AACpC;;;ACtCA,iBAaO;AAsCM,IAAAC,sBAAA;AAJN,SAAS,KAAK,OAAqC;AACxD,QAAM,EAAE,KAAK,KAAK,GAAG,cAAc,IAAI;AACvC,UAAQ,IAAI;AAAA,IACV,KAAK;AACH,aAAO,6CAAC,iBAAI,GAAG,eAAe;AAAA,IAChC,KAAK;AACH,aAAO,6CAAC,iBAAI,GAAG,eAAe;AAAA,IAChC,KAAK;AACH,aAAO,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,uDAAC,eAAY,aAAU,gBAAe,GACxC;AAAA,YACA,6CAAC,cAAAA,OAAU,WAAV,EAAoB,WAAW,OAAO,WACrC,uDAAC,eAAY,GACf;AAAA,aACF;AAAA,WACF,GACF;AAAA,QAEA,6CAAC,UACC,uDAAC,cAAAA,OAAU,YAAV,EAAqB,WAAW,OAAO,YACtC,uDAAC,cAAAA,OAAU,SAAV,EAAkB,WAAW,OAAO,SAClC,gBAAM,UACT,GACF,GACF;AAAA,QAEA,6CAAC,cAAAA,OAAU,cAAV,EAAuB;AAAA;AAAA;AAAA,EAC1B;AAEJ;AASO,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAE/B,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,eAAe,YAAY,IAAI;AAEvC,QAAM,aAAS,uBAAO;AAEtB,SACE,8CAAC,cAAAA,OAAU,MAAV,EAAgB,GAAG,WAAW,MAAY,WAAW,OAAO,MAC3D;AAAA,iDAAC,cAAAA,OAAU,UAAV,EAAmB,WAAW,OAAO,UACnC,uCAAM,OACT;AAAA,IACA,6CAAC,cAAAA,OAAU,eAAV,EAAwB,WAAW,OAAO,eACzC,uDAAC,eAAY,GACf;AAAA,KACF;AAEJ;AAcO,SAAS,YAAY,OAA6B;AACvD,SAAO,6CAAC,cAAAA,OAAU,WAAV,EAAqB,GAAG,OAAO;AACzC;AAWO,SAAS,iBAAiB,OAAkC;AACjE,QAAM,aAAS,uBAAO;AACtB,SACE;AAAA,IAAC,cAAAA,OAAU;AAAA,IAAV;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,WAAW,OAAO,cAAc;AAAA;AAAA,EACtD;AAEJ;AAUO,SAAS,uBACd,YACsC;AACtC,aAAO,oCAAqB;AAAA,IAC1B,OAAO;AAAA,EACT,CAAC;AACH;","names":["import_jsx","import_react","ArkPortal","import_react","import_jsx_runtime","import_jsx_runtime","ArkSelect"]}
1
+ {"version":3,"sources":["../../../src/components/Select.tsx","../../../src/context/cerberus.tsx","../../../src/components/Portal.tsx","../../../src/components/Show.tsx","../../../src/components/Text.tsx","../../../src/components/Select.server.tsx"],"sourcesContent":["'use client'\n\nimport {\n Select as ArkSelect,\n createListCollection,\n type SelectRootProps,\n type SelectItemProps,\n type SelectItemGroupProps,\n type SelectItemGroupLabelProps,\n type ListCollection,\n type SelectValueChangeDetails,\n} from '@ark-ui/react/select'\nimport {\n select,\n type SelectVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { cx } from '@cerberus/styled-system/css'\nimport { HStack } from '@cerberus/styled-system/jsx'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Portal } from './Portal'\nimport { Show } from './Show'\nimport { Text } from './Text'\nimport {\n SelectContent,\n SelectControl,\n SelectIndicator,\n SelectItem,\n SelectItemGroup,\n SelectItemGroupLabel,\n SelectItemIndicator,\n SelectItemText,\n SelectLabel,\n SelectPositioner,\n SelectRoot,\n SelectTrigger,\n SelectValueText,\n} from './Select.server'\n\n/**\n * This module contains the Select components.\n * @module 'react/select'\n */\n\nexport interface SelectCollectionItem {\n /**\n * What is displayed in the dropdown list.\n */\n label: string\n /**\n * The value of the selected item used in the form.\n */\n value: string\n /**\n * If the item is disabled.\n */\n disabled?: boolean\n}\n\nexport interface SelectCollection {\n /**\n * The items to be displayed in the dropdown list.\n */\n items: SelectCollectionItem[]\n}\n\nexport interface BaseSelectProps {\n /**\n * The placeholder text when no option is selected.\n */\n placeholder?: string\n /**\n * The label of the select.\n */\n label: string\n}\n\nexport type SelectProps = SelectRootProps<SelectCollectionItem> &\n BaseSelectProps &\n SelectVariantProps\n\n/**\n * The Select component is a dropdown list that allows users to select an\n * option from a list.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * import { Select, Option, createListCollection } from '@cerberus-design/react'\n *\n * export function SelectBasicPreview() {\n * const collection = createListCollection({\n * items: [\n * { label: 'Hades', value: 'hades' },\n * { label: 'Persephone', value: 'persephone' },\n * { label: 'Zeus', value: 'zeus', disabled: true },\n * ]\n * })\n *\n * return (\n * <Select\n * collection={collection}\n * label=\"Select Relative\"\n * placeholder=\"Choose option\"\n * >\n * {collection.items.map((item) => (\n * <Option key={item.value} item={item} />\n * ))}\n * </Select>\n * )\n * }\n */\nexport function Select(props: SelectProps) {\n const { collection, label, placeholder, size, ...rootProps } = props\n const { icons } = useCerberusContext()\n const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons\n\n const styles = select({ size })\n\n return (\n <SelectRoot className={styles.root} collection={collection} {...rootProps}>\n <SelectLabel className={styles.label}>\n {label}\n <Show when={props.required}>\n <Text as=\"span\" color=\"page.text.100\">\n (required)\n </Text>\n </Show>\n </SelectLabel>\n\n <SelectControl className={styles.control}>\n <SelectTrigger className={styles.trigger}>\n <SelectValueText placeholder={placeholder} />\n\n <HStack>\n <Show when={props.invalid}>\n <InvalidIcon data-part=\"invalid-icon\" />\n </Show>\n <SelectIndicator className={styles.indicator}>\n <SelectArrow />\n </SelectIndicator>\n </HStack>\n </SelectTrigger>\n </SelectControl>\n\n <Portal>\n <SelectPositioner className={styles.positioner}>\n <SelectContent className={styles.content}>\n {props.children}\n </SelectContent>\n </SelectPositioner>\n </Portal>\n\n <ArkSelect.HiddenSelect />\n </SelectRoot>\n )\n}\n\nexport interface OptionProps extends SelectItemProps {\n /**\n * The CollectionListItem to be displayed in the dropdown list.\n */\n item: SelectCollectionItem\n}\n\nexport function Option(props: OptionProps) {\n const { item, ...itemProps } = props\n\n const { icons } = useCerberusContext()\n const { selectChecked: CheckedIcon } = icons\n\n const styles = select()\n\n return (\n <SelectItem {...itemProps} item={item} className={styles.item}>\n <SelectItemText className={styles.itemText}>{item?.label}</SelectItemText>\n <SelectItemIndicator className={styles.itemIndicator}>\n <CheckedIcon />\n </SelectItemIndicator>\n </SelectItem>\n )\n}\n\n/**\n * The OptionGroup component is a group of options in the dropdown list.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * <OptionGroup>\n * <OptionGroupLabel>Greek gods</OptionGroupLabel>\n * ...\n * </OptionGroup>\n * ```\n */\nexport function OptionGroup(props: SelectItemGroupProps) {\n return <SelectItemGroup {...props} />\n}\n\n/**\n * The OptionGroupLabel component is the label of the OptionGroup.\n * @definition [Select docs](https://cerberus.digitalu.design/react/select)\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)\n * @example\n * ```tsx\n * <OptionGroupLabel>Greek gods</OptionGroupLabel>\n * ```\n */\nexport function OptionGroupLabel(props: SelectItemGroupLabelProps) {\n const styles = select()\n return (\n <SelectItemGroupLabel\n {...props}\n className={cx(props.className, styles.itemGroupLabel)}\n />\n )\n}\n\n/**\n * A helper function to create a SelectCollection object.\n * @param collection - An array of SelectCollectionItem objects that matches\n * the following shape:\n * ```ts\n * [{ label: 'Hades', value: 'hades', disabled?: true }]\n * ```\n */\nexport function createSelectCollection(\n collection: SelectCollectionItem[],\n): ListCollection<SelectCollectionItem> {\n return createListCollection({\n items: collection,\n })\n}\n\nexport type { SelectValueChangeDetails, ListCollection }\n","'use client'\n\nimport { createContext, useContext, type PropsWithChildren } from 'react'\nimport type { SystemConfig } from '../config'\n\n/**\n * This module contains the Cerberus configuration context and helpers.\n * @module context/cerberus\n */\n\ntype CerberusContextValue = SystemConfig\n\nconst CerberusContext = createContext<CerberusContextValue | null>(null)\n\ninterface CerberusProviderProps {\n config: SystemConfig\n}\n\n/**\n * Cerberus configuration provider.\n * @param props.config The Cerberus configuration created with\n * `makeSystemConfig` helper.\n */\nexport function CerberusProvider(\n props: PropsWithChildren<CerberusProviderProps>,\n) {\n return (\n <CerberusContext.Provider value={props.config}>\n {props.children}\n </CerberusContext.Provider>\n )\n}\n\n/**\n * Returns the Cerberus configuration context.\n * @returns The Cerberus configuration context.\n */\nexport function useCerberusContext() {\n const context = useContext(CerberusContext)\n if (!context) {\n throw new Error('useCerberus must be used within a CerberusProvider')\n }\n return context\n}\n","import {\n Portal as ArkPortal,\n type PortalProps as ArkPortalProps,\n} from '@ark-ui/react'\n\n/**\n * This module is the Portal component.\n * @module\n */\n\nexport type PortalProps = ArkPortalProps\n\n/**\n * The Portal component is used to render children into a DOM node that exists outside the DOM hierarchy of the parent component.\n * @see https://cerberus.digitalu.design/react/portal\n * @definition [React Portal Docs](https://react.dev/reference/react-dom/createPortal)\n * @example\n * ```tsx\n * 'use client'\n *\n * import { Portal } from '@cerberus/react'\n *\n * function SomeFeatureWithinSSRPage() {\n * return (\n * <Portal>\n * <div>Portal Content outside of the React VDom tree</div>\n * </Portal>\n * )\n * }\n */\nexport const Portal = ArkPortal\n","'use client'\n\nimport { useMemo, type PropsWithChildren, type ReactNode } from 'react'\n\n/**\n * This module contains the Show component.\n * @module\n */\n\nexport interface ShowProps {\n /**\n * The condition to render memoized children or the fallback content.\n */\n when: boolean | null | undefined\n /**\n * The children to render when the condition is false.\n */\n fallback?: ReactNode\n}\n\n/**\n * Conditionally render a memoized version of the children or optional fallback\n * content.\n * @see https://cerberus.digitalu.design/react/show\n * @example\n * ```tsx\n * <Show when={isLoggedIn} fallback={<Navigate to=\"/login\" />}>\n * <Dashboard />\n * </Show>\n */\nexport function Show(props: PropsWithChildren<ShowProps>): ReactNode {\n const { when, children, fallback } = props\n const condition = useMemo(() => when ?? false, [when])\n\n return useMemo(() => {\n if (condition) return children\n return fallback ?? null\n }, [condition, children, fallback])\n}\n","import {\n Em,\n H1,\n H2,\n H3,\n H4,\n H5,\n H6,\n P,\n Small,\n Span,\n Strong,\n type PProps,\n} from '@cerberus/styled-system/jsx'\nimport { type HTMLAttributes, type PropsWithChildren } from 'react'\n\n/**\n * This module exports a component for rendering text utilizing the styled-system JSX utility.\n * @module @cerberus/react/Text\n */\n\nexport type Headings = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6'\nexport type TextElements = 'p' | 'strong' | 'em' | 'small' | 'span'\n\n// For some reason we have to use the HTMLParagraphElement type here\n// or else TS will fail for non-style props like 'id' or 'className'\nexport interface TextProps\n extends PProps,\n HTMLAttributes<HTMLParagraphElement> {\n /**\n * The element to render as. Defaults to 'p'.\n */\n as?: TextElements | Headings\n}\n\n/**\n * A component for rendering text utilizing the styled-system JSX utility.\n * @definition [Text docs](https://cerberus.digitalu.design/react/text)\n * @example\n * ```tsx\n * <Text as=\"h1\" color=\"page.text.100\" textStyle={{\n * base: 'heading-md',\n * md: 'heading-lg',\n * }}>\n * Hello, world!\n * </Text>\n */\nexport function Text(props: PropsWithChildren<TextProps>) {\n const { as = 'p', ...pandaJSXProps } = props\n switch (as) {\n case 'h1':\n return <H1 {...pandaJSXProps} />\n case 'h2':\n return <H2 {...pandaJSXProps} />\n case 'h3':\n return <H3 {...pandaJSXProps} />\n case 'h4':\n return <H4 {...pandaJSXProps} />\n case 'h5':\n return <H5 {...pandaJSXProps} />\n case 'h6':\n return <H6 {...pandaJSXProps} />\n case 'strong':\n return <Strong {...pandaJSXProps} />\n case 'em':\n return <Em {...pandaJSXProps} />\n case 'small':\n return <Small {...pandaJSXProps} />\n case 'span':\n return <Span {...pandaJSXProps} />\n default:\n return <P {...pandaJSXProps} />\n }\n}\n","import { Select as ArkSelect, type SelectRootProps } from '@ark-ui/react/select'\nimport type { SelectCollectionItem } from './Select'\n\n/**\n * Select Primitive: The context provider for the Select family\n */\nexport function SelectRoot(props: SelectRootProps<SelectCollectionItem>) {\n const { children, ...rootProps } = props\n return (\n <ArkSelect.Root {...rootProps}>\n {children}\n <ArkSelect.HiddenSelect />\n </ArkSelect.Root>\n )\n}\n\n/**\n * Select Primitive: The label that appears above the select input\n */\nexport const SelectLabel = ArkSelect.Label\n\n/**\n * Select Primitive: The wrapper to the select trigger that opens the dropdown\n */\nexport const SelectControl = ArkSelect.Control\n\n/**\n * Select Primitive: The trigger that opens the dropdown\n */\nexport const SelectTrigger = ArkSelect.Trigger\n\n/**\n * Select Primitive: The text that appears in the trigger\n */\nexport const SelectValueText = ArkSelect.ValueText\n\n/**\n * Select Primitive: The indicator that appears in the trigger\n */\nexport const SelectIndicator = ArkSelect.Indicator\n\n/**\n * Select Primitive: The trigger that clears the selected value\n */\nexport const SelectClearTrigger = ArkSelect.ClearTrigger\n\n/**\n * Select Primitive: The positioner that contains the dropdown\n */\nexport const SelectPositioner = ArkSelect.Positioner\n\n/**\n * Select Primitive: The content of the dropdown (i.e. the container itself)\n */\nexport const SelectContent = ArkSelect.Content\n\n/**\n * Select Primitive: The container for a group of item options\n */\nexport const SelectItemGroup = ArkSelect.ItemGroup\n\n/**\n * Select Primitive: The label for a group of item options\n */\nexport const SelectItemGroupLabel = ArkSelect.ItemGroupLabel\n\n/**\n * Select Primitive: The container for an item option\n */\nexport const SelectItem = ArkSelect.Item\n\n/**\n * Select Primitive: The text for an item option\n */\nexport const SelectItemText = ArkSelect.ItemText\n\n/**\n * Select Primitive: The indicator for an item option\n */\nexport const SelectItemIndicator = ArkSelect.ItemIndicator\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,IAAAA,iBASO;AACP,qBAGO;AACP,iBAAmB;AACnB,IAAAC,cAAuB;;;ACfvB,mBAAkE;AAyB9D;AAfJ,IAAM,sBAAkB,4BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,yBAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;AC3CA,IAAAC,gBAGO;AA2BA,IAAM,SAAS,cAAAC;;;AC5BtB,IAAAC,gBAAgE;AA4BzD,SAAS,KAAK,OAAgD;AACnE,QAAM,EAAE,MAAM,UAAU,SAAS,IAAI;AACrC,QAAM,gBAAY,uBAAQ,MAAM,QAAQ,OAAO,CAAC,IAAI,CAAC;AAErD,aAAO,uBAAQ,MAAM;AACnB,Q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AO,OAAoB;AACzC,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAE/B,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,eAAe,YAAY,IAAI;AAEvC,QAAM,aAAS,uBAAO;AAEtB,SACE,8CAAC,cAAY,GAAG,WAAW,MAAY,WAAW,OAAO,MACvD;AAAA,iDAAC,kBAAe,WAAW,OAAO,UAAW,uCAAM,OAAM;AAAA,IACzD,6CAAC,uBAAoB,WAAW,OAAO,eACrC,uDAAC,eAAY,GACf;AAAA,KACF;AAEJ;AAcO,SAAS,YAAY,OAA6B;AACvD,SAAO,6CAAC,mBAAiB,GAAG,OAAO;AACrC;AAWO,SAAS,iBAAiB,OAAkC;AACjE,QAAM,aAAS,uBAAO;AACtB,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,WAAW,OAAO,cAAc;AAAA;AAAA,EACtD;AAEJ;AAUO,SAAS,uBACd,YACsC;AACtC,aAAO,qCAAqB;AAAA,IAC1B,OAAO;AAAA,EACT,CAAC;AACH;","names":["import_select","import_jsx","import_react","ArkPortal","import_react","import_jsx_runtime","import_jsx_runtime","ArkSelect","import_jsx_runtime","ArkSelect"]}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/components/Select.server.tsx
21
+ var Select_server_exports = {};
22
+ __export(Select_server_exports, {
23
+ SelectClearTrigger: () => SelectClearTrigger,
24
+ SelectContent: () => SelectContent,
25
+ SelectControl: () => SelectControl,
26
+ SelectIndicator: () => SelectIndicator,
27
+ SelectItem: () => SelectItem,
28
+ SelectItemGroup: () => SelectItemGroup,
29
+ SelectItemGroupLabel: () => SelectItemGroupLabel,
30
+ SelectItemIndicator: () => SelectItemIndicator,
31
+ SelectItemText: () => SelectItemText,
32
+ SelectLabel: () => SelectLabel,
33
+ SelectPositioner: () => SelectPositioner,
34
+ SelectRoot: () => SelectRoot,
35
+ SelectTrigger: () => SelectTrigger,
36
+ SelectValueText: () => SelectValueText
37
+ });
38
+ module.exports = __toCommonJS(Select_server_exports);
39
+ var import_select = require("@ark-ui/react/select");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ function SelectRoot(props) {
42
+ const { children, ...rootProps } = props;
43
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_select.Select.Root, { ...rootProps, children: [
44
+ children,
45
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_select.Select.HiddenSelect, {})
46
+ ] });
47
+ }
48
+ var SelectLabel = import_select.Select.Label;
49
+ var SelectControl = import_select.Select.Control;
50
+ var SelectTrigger = import_select.Select.Trigger;
51
+ var SelectValueText = import_select.Select.ValueText;
52
+ var SelectIndicator = import_select.Select.Indicator;
53
+ var SelectClearTrigger = import_select.Select.ClearTrigger;
54
+ var SelectPositioner = import_select.Select.Positioner;
55
+ var SelectContent = import_select.Select.Content;
56
+ var SelectItemGroup = import_select.Select.ItemGroup;
57
+ var SelectItemGroupLabel = import_select.Select.ItemGroupLabel;
58
+ var SelectItem = import_select.Select.Item;
59
+ var SelectItemText = import_select.Select.ItemText;
60
+ var SelectItemIndicator = import_select.Select.ItemIndicator;
61
+ // Annotate the CommonJS export names for ESM import in node:
62
+ 0 && (module.exports = {
63
+ SelectClearTrigger,
64
+ SelectContent,
65
+ SelectControl,
66
+ SelectIndicator,
67
+ SelectItem,
68
+ SelectItemGroup,
69
+ SelectItemGroupLabel,
70
+ SelectItemIndicator,
71
+ SelectItemText,
72
+ SelectLabel,
73
+ SelectPositioner,
74
+ SelectRoot,
75
+ SelectTrigger,
76
+ SelectValueText
77
+ });
78
+ //# sourceMappingURL=Select.server.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/Select.server.tsx"],"sourcesContent":["import { Select as ArkSelect, type SelectRootProps } from '@ark-ui/react/select'\nimport type { SelectCollectionItem } from './Select'\n\n/**\n * Select Primitive: The context provider for the Select family\n */\nexport function SelectRoot(props: SelectRootProps<SelectCollectionItem>) {\n const { children, ...rootProps } = props\n return (\n <ArkSelect.Root {...rootProps}>\n {children}\n <ArkSelect.HiddenSelect />\n </ArkSelect.Root>\n )\n}\n\n/**\n * Select Primitive: The label that appears above the select input\n */\nexport const SelectLabel = ArkSelect.Label\n\n/**\n * Select Primitive: The wrapper to the select trigger that opens the dropdown\n */\nexport const SelectControl = ArkSelect.Control\n\n/**\n * Select Primitive: The trigger that opens the dropdown\n */\nexport const SelectTrigger = ArkSelect.Trigger\n\n/**\n * Select Primitive: The text that appears in the trigger\n */\nexport const SelectValueText = ArkSelect.ValueText\n\n/**\n * Select Primitive: The indicator that appears in the trigger\n */\nexport const SelectIndicator = ArkSelect.Indicator\n\n/**\n * Select Primitive: The trigger that clears the selected value\n */\nexport const SelectClearTrigger = ArkSelect.ClearTrigger\n\n/**\n * Select Primitive: The positioner that contains the dropdown\n */\nexport const SelectPositioner = ArkSelect.Positioner\n\n/**\n * Select Primitive: The content of the dropdown (i.e. the container itself)\n */\nexport const SelectContent = ArkSelect.Content\n\n/**\n * Select Primitive: The container for a group of item options\n */\nexport const SelectItemGroup = ArkSelect.ItemGroup\n\n/**\n * Select Primitive: The label for a group of item options\n */\nexport const SelectItemGroupLabel = ArkSelect.ItemGroupLabel\n\n/**\n * Select Primitive: The container for an item option\n */\nexport const SelectItem = ArkSelect.Item\n\n/**\n * Select Primitive: The text for an item option\n */\nexport const SelectItemText = ArkSelect.ItemText\n\n/**\n * Select Primitive: The indicator for an item option\n */\nexport const SelectItemIndicator = ArkSelect.ItemIndicator\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA0D;AAStD;AAHG,SAAS,WAAW,OAA8C;AACvE,QAAM,EAAE,UAAU,GAAG,UAAU,IAAI;AACnC,SACE,6CAAC,cAAAA,OAAU,MAAV,EAAgB,GAAG,WACjB;AAAA;AAAA,IACD,4CAAC,cAAAA,OAAU,cAAV,EAAuB;AAAA,KAC1B;AAEJ;AAKO,IAAM,cAAc,cAAAA,OAAU;AAK9B,IAAM,gBAAgB,cAAAA,OAAU;AAKhC,IAAM,gBAAgB,cAAAA,OAAU;AAKhC,IAAM,kBAAkB,cAAAA,OAAU;AAKlC,IAAM,kBAAkB,cAAAA,OAAU;AAKlC,IAAM,qBAAqB,cAAAA,OAAU;AAKrC,IAAM,mBAAmB,cAAAA,OAAU;AAKnC,IAAM,gBAAgB,cAAAA,OAAU;AAKhC,IAAM,kBAAkB,cAAAA,OAAU;AAKlC,IAAM,uBAAuB,cAAAA,OAAU;AAKvC,IAAM,aAAa,cAAAA,OAAU;AAK7B,IAAM,iBAAiB,cAAAA,OAAU;AAKjC,IAAM,sBAAsB,cAAAA,OAAU;","names":["ArkSelect"]}