@cerberus-design/react 0.15.0-next-7669d47 → 0.15.0-next-e5dbdbd

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.
Files changed (98) hide show
  1. package/build/legacy/_tsup-dts-rollup.d.cts +123 -29
  2. package/build/legacy/components/Accordion.cjs.map +1 -1
  3. package/build/legacy/components/AccordionItemGroup.cjs.map +1 -1
  4. package/build/legacy/components/Select.cjs +101 -60
  5. package/build/legacy/components/Select.cjs.map +1 -1
  6. package/build/legacy/components/{Modal.cjs → deprecated/Modal.cjs} +1 -1
  7. package/build/legacy/components/deprecated/Modal.cjs.map +1 -0
  8. package/build/legacy/components/{ModalDescription.cjs → deprecated/ModalDescription.cjs} +1 -1
  9. package/build/legacy/components/deprecated/ModalDescription.cjs.map +1 -0
  10. package/build/legacy/components/{ModalHeader.cjs → deprecated/ModalHeader.cjs} +1 -1
  11. package/build/legacy/components/deprecated/ModalHeader.cjs.map +1 -0
  12. package/build/legacy/components/{ModalHeading.cjs → deprecated/ModalHeading.cjs} +1 -1
  13. package/build/legacy/components/deprecated/ModalHeading.cjs.map +1 -0
  14. package/build/legacy/components/{NavMenuLink.cjs → deprecated/NavMenuLink.cjs} +2 -2
  15. package/build/legacy/components/deprecated/NavMenuLink.cjs.map +1 -0
  16. package/build/legacy/components/{NavMenuList.cjs → deprecated/NavMenuList.cjs} +2 -2
  17. package/build/legacy/components/deprecated/NavMenuList.cjs.map +1 -0
  18. package/build/legacy/components/{NavMenuTrigger.cjs → deprecated/NavMenuTrigger.cjs} +2 -2
  19. package/build/legacy/components/deprecated/NavMenuTrigger.cjs.map +1 -0
  20. package/build/legacy/config/types.cjs.map +1 -1
  21. package/build/legacy/index.cjs +207 -189
  22. package/build/legacy/index.cjs.map +1 -1
  23. package/build/modern/_tsup-dts-rollup.d.ts +123 -29
  24. package/build/modern/{chunk-UZVQ4INR.js → chunk-AIJ75ENY.js} +2 -2
  25. package/build/modern/chunk-AIJ75ENY.js.map +1 -0
  26. package/build/modern/{chunk-NUMM4TNC.js → chunk-AUALRL3U.js} +2 -2
  27. package/build/modern/chunk-AUALRL3U.js.map +1 -0
  28. package/build/modern/{chunk-IGHMP4WA.js → chunk-AZRFYQO7.js} +1 -1
  29. package/build/modern/chunk-AZRFYQO7.js.map +1 -0
  30. package/build/modern/{chunk-PM7CWT3N.js → chunk-BRVZVAPT.js} +2 -2
  31. package/build/modern/chunk-BRVZVAPT.js.map +1 -0
  32. package/build/modern/{chunk-JIRW4XOJ.js → chunk-Q3I4H6EC.js} +2 -2
  33. package/build/modern/chunk-Q3I4H6EC.js.map +1 -0
  34. package/build/modern/{chunk-7NN3SJ7W.js → chunk-SWX5JWZR.js} +2 -2
  35. package/build/modern/chunk-SWX5JWZR.js.map +1 -0
  36. package/build/modern/{chunk-ZL6ZITLA.js → chunk-WECB67DC.js} +2 -2
  37. package/build/modern/chunk-WECB67DC.js.map +1 -0
  38. package/build/modern/{chunk-BAWZBF5Q.js → chunk-WN7TJX6J.js} +2 -2
  39. package/build/modern/chunk-X6WFDKKJ.js +90 -0
  40. package/build/modern/chunk-X6WFDKKJ.js.map +1 -0
  41. package/build/modern/{chunk-WPVDQRRF.js → chunk-YOTXFCCC.js} +2 -2
  42. package/build/modern/chunk-YOTXFCCC.js.map +1 -0
  43. package/build/modern/components/Accordion.js +1 -1
  44. package/build/modern/components/AccordionItemGroup.js +2 -2
  45. package/build/modern/components/Select.js +11 -4
  46. package/build/modern/components/deprecated/Modal.js +7 -0
  47. package/build/modern/components/deprecated/ModalDescription.js +7 -0
  48. package/build/modern/components/deprecated/ModalHeader.js +7 -0
  49. package/build/modern/components/deprecated/ModalHeading.js +7 -0
  50. package/build/modern/components/deprecated/NavMenuLink.js +8 -0
  51. package/build/modern/components/deprecated/NavMenuList.js +12 -0
  52. package/build/modern/components/deprecated/NavMenuTrigger.js +11 -0
  53. package/build/modern/index.js +52 -46
  54. package/build/modern/index.js.map +1 -1
  55. package/package.json +2 -2
  56. package/src/components/Accordion.tsx +1 -0
  57. package/src/components/Select.tsx +191 -74
  58. package/src/components/{NavMenuLink.tsx → deprecated/NavMenuLink.tsx} +1 -1
  59. package/src/components/{NavMenuList.tsx → deprecated/NavMenuList.tsx} +3 -3
  60. package/src/components/{NavMenuTrigger.tsx → deprecated/NavMenuTrigger.tsx} +4 -4
  61. package/src/config/types.ts +1 -0
  62. package/src/index.ts +8 -8
  63. package/build/legacy/components/Modal.cjs.map +0 -1
  64. package/build/legacy/components/ModalDescription.cjs.map +0 -1
  65. package/build/legacy/components/ModalHeader.cjs.map +0 -1
  66. package/build/legacy/components/ModalHeading.cjs.map +0 -1
  67. package/build/legacy/components/NavMenuLink.cjs.map +0 -1
  68. package/build/legacy/components/NavMenuList.cjs.map +0 -1
  69. package/build/legacy/components/NavMenuTrigger.cjs.map +0 -1
  70. package/build/modern/chunk-7NN3SJ7W.js.map +0 -1
  71. package/build/modern/chunk-IGHMP4WA.js.map +0 -1
  72. package/build/modern/chunk-JIRW4XOJ.js.map +0 -1
  73. package/build/modern/chunk-KKHL3ZO4.js +0 -69
  74. package/build/modern/chunk-KKHL3ZO4.js.map +0 -1
  75. package/build/modern/chunk-NUMM4TNC.js.map +0 -1
  76. package/build/modern/chunk-PM7CWT3N.js.map +0 -1
  77. package/build/modern/chunk-UZVQ4INR.js.map +0 -1
  78. package/build/modern/chunk-WPVDQRRF.js.map +0 -1
  79. package/build/modern/chunk-ZL6ZITLA.js.map +0 -1
  80. package/build/modern/components/Modal.js +0 -7
  81. package/build/modern/components/ModalDescription.js +0 -7
  82. package/build/modern/components/ModalHeader.js +0 -7
  83. package/build/modern/components/ModalHeading.js +0 -7
  84. package/build/modern/components/NavMenuLink.js +0 -8
  85. package/build/modern/components/NavMenuList.js +0 -12
  86. package/build/modern/components/NavMenuTrigger.js +0 -11
  87. /package/build/modern/{chunk-BAWZBF5Q.js.map → chunk-WN7TJX6J.js.map} +0 -0
  88. /package/build/modern/components/{Modal.js.map → deprecated/Modal.js.map} +0 -0
  89. /package/build/modern/components/{ModalDescription.js.map → deprecated/ModalDescription.js.map} +0 -0
  90. /package/build/modern/components/{ModalHeader.js.map → deprecated/ModalHeader.js.map} +0 -0
  91. /package/build/modern/components/{ModalHeading.js.map → deprecated/ModalHeading.js.map} +0 -0
  92. /package/build/modern/components/{NavMenuLink.js.map → deprecated/NavMenuLink.js.map} +0 -0
  93. /package/build/modern/components/{NavMenuList.js.map → deprecated/NavMenuList.js.map} +0 -0
  94. /package/build/modern/components/{NavMenuTrigger.js.map → deprecated/NavMenuTrigger.js.map} +0 -0
  95. /package/src/components/{Modal.tsx → deprecated/Modal.tsx} +0 -0
  96. /package/src/components/{ModalDescription.tsx → deprecated/ModalDescription.tsx} +0 -0
  97. /package/src/components/{ModalHeader.tsx → deprecated/ModalHeader.tsx} +0 -0
  98. /package/src/components/{ModalHeading.tsx → deprecated/ModalHeading.tsx} +0 -0
@@ -96,6 +96,7 @@ import { KeyboardSensor } from '@dnd-kit/core';
96
96
  import { KeyboardSensorOptions } from '@dnd-kit/core';
97
97
  import { KeyboardSensorProps } from '@dnd-kit/core';
98
98
  import { LabelVariantProps } from '@cerberus/styled-system/recipes';
99
+ import { ListCollection } from '@ark-ui/react/select';
99
100
  import { MeasuringConfiguration } from '@dnd-kit/core';
100
101
  import { MeasuringFrequency } from '@dnd-kit/core';
101
102
  import { MeasuringStrategy } from '@dnd-kit/core';
@@ -107,7 +108,6 @@ import { MouseEventHandler } from 'react';
107
108
  import { MouseSensor } from '@dnd-kit/core';
108
109
  import { MouseSensorOptions } from '@dnd-kit/core';
109
110
  import { NotificationVariantProps } from '@cerberus/styled-system/recipes';
110
- import type { OptionHTMLAttributes } from 'react';
111
111
  import { Over } from '@dnd-kit/core';
112
112
  import { PointerActivationConstraint } from '@dnd-kit/core';
113
113
  import { PointerEventHandlers } from '@dnd-kit/core';
@@ -127,7 +127,11 @@ 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 type { SelectHTMLAttributes } from 'react';
130
+ import { SelectItemGroupLabelProps } from '@ark-ui/react/select';
131
+ import { SelectItemGroupProps } from '@ark-ui/react/select';
132
+ import { SelectItemProps } from '@ark-ui/react/select';
133
+ import { SelectRootProps } from '@ark-ui/react/select';
134
+ import { SelectValueChangeDetails } from '@ark-ui/react/select';
131
135
  import { SelectVariantProps } from '@cerberus/styled-system/recipes';
132
136
  import { Sensor } from '@dnd-kit/core';
133
137
  import { SensorContext } from '@dnd-kit/core';
@@ -520,6 +524,19 @@ declare type BaseNotificationHeadingProps = HTMLAttributes<HTMLParagraphElement>
520
524
  export { BaseNotificationHeadingProps }
521
525
  export { BaseNotificationHeadingProps as BaseNotificationHeadingProps_alias_1 }
522
526
 
527
+ declare interface BaseSelectProps {
528
+ /**
529
+ * The placeholder text when no option is selected.
530
+ */
531
+ placeholder?: string;
532
+ /**
533
+ * The label of the select.
534
+ */
535
+ label: string;
536
+ }
537
+ export { BaseSelectProps }
538
+ export { BaseSelectProps as BaseSelectProps_alias_1 }
539
+
523
540
  /**
524
541
  * A component that allows the user to perform actions
525
542
  * @see https://cerberus.digitalu.design/react/button
@@ -749,6 +766,18 @@ declare function createNavTriggerProps(values: NavTriggerAriaValues): NavTrigger
749
766
  export { createNavTriggerProps }
750
767
  export { createNavTriggerProps as createNavTriggerProps_alias_1 }
751
768
 
769
+ /**
770
+ * A helper function to create a SelectCollection object.
771
+ * @param collection - An array of SelectCollectionItem objects that matches
772
+ * the following shape:
773
+ * ```ts
774
+ * [{ label: 'Hades', value: 'hades', disabled?: true }]
775
+ * ```
776
+ */
777
+ declare function createSelectCollection(collection: SelectCollectionItem[]): ListCollection<SelectCollectionItem>;
778
+ export { createSelectCollection }
779
+ export { createSelectCollection as createSelectCollection_alias_1 }
780
+
752
781
  /**
753
782
  * Provides a CTA modal to the app.
754
783
  * @see https://cerberus.digitalu.design/react/cta-modal
@@ -1117,6 +1146,7 @@ declare interface DefinedIcons<T extends IconType = IconType> {
1117
1146
  invalidAlt: T;
1118
1147
  redo: T;
1119
1148
  selectArrow: T;
1149
+ selectChecked: T;
1120
1150
  toggleChecked: T;
1121
1151
  }
1122
1152
  export { DefinedIcons }
@@ -1989,6 +2019,9 @@ declare type LegendProps = HTMLAttributes<HTMLLegendElement> & LabelVariantProps
1989
2019
  export { LegendProps }
1990
2020
  export { LegendProps as LegendProps_alias_1 }
1991
2021
 
2022
+ export { ListCollection }
2023
+ export { ListCollection as ListCollection_alias_1 }
2024
+
1992
2025
  /**
1993
2026
  * Create a system configuration object to be used on the CerberusProvider.
1994
2027
  * @param options The system configuration options you want to customize.
@@ -2552,19 +2585,45 @@ declare interface NotifyOptions {
2552
2585
  export { NotifyOptions }
2553
2586
  export { NotifyOptions as NotifyOptions_alias_1 }
2554
2587
 
2588
+ declare function Option_2(props: OptionProps): JSX_2.Element;
2589
+ export { Option_2 as Option }
2590
+ export { Option_2 as Option_alias_1 }
2591
+
2555
2592
  /**
2556
- * Option component
2557
- * props: OptionHTMLAttributes<HTMLOptionElement>
2593
+ * The OptionGroup component is a group of options in the dropdown list.
2594
+ * @definition [Select docs](https://cerberus.digitalu.design/react/select)
2595
+ * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)
2558
2596
  * @example
2559
2597
  * ```tsx
2560
- * <Option value="one">Option 1</Option>
2598
+ * <OptionGroup>
2599
+ * <OptionGroupLabel>Greek gods</OptionGroupLabel>
2600
+ * ...
2601
+ * </OptionGroup>
2561
2602
  * ```
2562
2603
  */
2563
- declare function Option_2(props: OptionProps): JSX_2.Element;
2564
- export { Option_2 as Option }
2565
- export { Option_2 as Option_alias_1 }
2604
+ declare function OptionGroup(props: SelectItemGroupProps): JSX_2.Element;
2605
+ export { OptionGroup }
2606
+ export { OptionGroup as OptionGroup_alias_1 }
2607
+
2608
+ /**
2609
+ * The OptionGroupLabel component is the label of the OptionGroup.
2610
+ * @definition [Select docs](https://cerberus.digitalu.design/react/select)
2611
+ * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)
2612
+ * @example
2613
+ * ```tsx
2614
+ * <OptionGroupLabel>Greek gods</OptionGroupLabel>
2615
+ * ```
2616
+ */
2617
+ declare function OptionGroupLabel(props: SelectItemGroupLabelProps): JSX_2.Element;
2618
+ export { OptionGroupLabel }
2619
+ export { OptionGroupLabel as OptionGroupLabel_alias_1 }
2566
2620
 
2567
- declare type OptionProps = OptionHTMLAttributes<HTMLOptionElement>;
2621
+ declare interface OptionProps extends SelectItemProps {
2622
+ /**
2623
+ * The CollectionListItem to be displayed in the dropdown list.
2624
+ */
2625
+ item: SelectCollectionItem;
2626
+ }
2568
2627
  export { OptionProps }
2569
2628
  export { OptionProps as OptionProps_alias_1 }
2570
2629
 
@@ -2830,42 +2889,77 @@ export { RootColorsResult as RootColorsResult_alias_1 }
2830
2889
  export { ScreenReaderInstructions }
2831
2890
 
2832
2891
  /**
2833
- * Used to allow users to select a single option from a list of options.
2834
- * @see https://cerberus.digitalu.design/react/select
2835
- * @memberof module:Field
2892
+ * The Select component is a dropdown list that allows users to select an
2893
+ * option from a list.
2894
+ * @definition [Select docs](https://cerberus.digitalu.design/react/select)
2895
+ * @definition [ARK docs](https://ark-ui.com/react/docs/components/select)
2836
2896
  * @example
2837
2897
  * ```tsx
2838
- * <Field>
2839
- * <Select describedby="help:fruit" id="fruit">
2840
- * <Option value="">Choose option</Option>
2841
- * <Option value="one">Option 1</Option>
2842
- * <Option value="two">Option 2</Option>
2843
- * <Option value="three">Option 3</Option>
2844
- * </Select>
2845
- * </Field>
2846
- * ```
2898
+ * import { Select, Option, createListCollection } from '@cerberus-design/react'
2899
+ *
2900
+ * export function SelectBasicPreview() {
2901
+ * const collection = createListCollection({
2902
+ * items: [
2903
+ * { label: 'Hades', value: 'hades' },
2904
+ * { label: 'Persephone', value: 'persephone' },
2905
+ * { label: 'Zeus', value: 'zeus', disabled: true },
2906
+ * ]
2907
+ * })
2908
+ *
2909
+ * return (
2910
+ * <Select
2911
+ * collection={collection}
2912
+ * label="Select Relative"
2913
+ * placeholder="Choose option"
2914
+ * >
2915
+ * {collection.items.map((item) => (
2916
+ * <Option key={item.value} item={item} />
2917
+ * ))}
2918
+ * </Select>
2919
+ * )
2920
+ * }
2847
2921
  */
2848
2922
  declare function Select(props: SelectProps): JSX_2.Element;
2849
2923
  export { Select }
2850
2924
  export { Select as Select_alias_1 }
2851
2925
 
2926
+ declare interface SelectCollection {
2927
+ /**
2928
+ * The items to be displayed in the dropdown list.
2929
+ */
2930
+ items: SelectCollectionItem[];
2931
+ }
2932
+ export { SelectCollection }
2933
+ export { SelectCollection as SelectCollection_alias_1 }
2934
+
2852
2935
  /**
2853
- * This module contains the select components.
2854
- * @module
2936
+ * This module contains the Select components.
2937
+ * @module 'react/select'
2855
2938
  */
2856
- declare type SelectProps = Omit<SelectHTMLAttributes<HTMLSelectElement>, 'size'> & SelectVariantProps & {
2939
+ declare interface SelectCollectionItem {
2857
2940
  /**
2858
- * The unique id of the select element. Required for accessibility.
2941
+ * What is displayed in the dropdown list.
2859
2942
  */
2860
- id: string;
2943
+ label: string;
2861
2944
  /**
2862
- * The id of the FieldMessage that describes the select element.
2945
+ * The value of the selected item used in the form.
2863
2946
  */
2864
- describedBy?: string;
2865
- };
2947
+ value: string;
2948
+ /**
2949
+ * If the item is disabled.
2950
+ */
2951
+ disabled?: boolean;
2952
+ }
2953
+ export { SelectCollectionItem }
2954
+ export { SelectCollectionItem as SelectCollectionItem_alias_1 }
2955
+
2956
+ declare type SelectProps = SelectRootProps<SelectCollectionItem> & BaseSelectProps & SelectVariantProps;
2866
2957
  export { SelectProps }
2867
2958
  export { SelectProps as SelectProps_alias_1 }
2868
2959
 
2960
+ export { SelectValueChangeDetails }
2961
+ export { SelectValueChangeDetails as SelectValueChangeDetails_alias_1 }
2962
+
2869
2963
  export { Sensor }
2870
2964
 
2871
2965
  export { SensorContext }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAC1C,iBAAmB;AACnB,qBAGO;AAoBH;AAJG,SAAS,UAAU,OAAuB;AAC/C,QAAM,EAAE,MAAM,WAAW,GAAG,UAAU,IAAI;AAC1C,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACC,aAAW;AAAA,MACX,eAAW,eAAG,WAAW,OAAO,IAAI;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAqBO,SAAS,cAAc,OAA2B;AACvD,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,UAAU,WAAW,OAAO,IAAI;AAAA;AAAA,EAChD;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;","names":["ArkAccordion"]}
1
+ {"version":3,"sources":["../../../src/components/Accordion.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAA0C;AAC1C,iBAAmB;AACnB,qBAGO;AAqBH;AALG,SAAS,UAAU,OAAuB;AAC/C,QAAM,EAAE,MAAM,WAAW,GAAG,UAAU,IAAI;AAC1C,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AAEjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACC,aAAW;AAAA,MACX,eAAW,eAAG,WAAW,OAAO,IAAI;AAAA,MACnC,GAAG;AAAA;AAAA,EACN;AAEJ;AAqBO,SAAS,cAAc,OAA2B;AACvD,QAAM,EAAE,MAAM,GAAG,UAAU,IAAI;AAC/B,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,UAAU,WAAW,OAAO,IAAI;AAAA;AAAA,EAChD;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;AAsBO,SAAS,qBAAqB,OAAkC;AACrE,QAAM,EAAE,MAAM,GAAG,aAAa,IAAI;AAClC,QAAM,aAAS,0BAAU,EAAE,KAAK,CAAC;AACjC,SACE;AAAA,IAAC,aAAAA,UAAa;AAAA,IAAb;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,aAAa,WAAW,OAAO,WAAW;AAAA;AAAA,EAC1D;AAEJ;","names":["ArkAccordion"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/AccordionItemGroup.tsx","../../../src/components/Show.tsx","../../../src/components/Accordion.tsx","../../../src/components/Accordion.client.tsx","../../../src/context/cerberus.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { type AccordionVariantProps } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren } from 'react'\nimport { Show } from './Show'\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemTrigger,\n} from './Accordion'\nimport { css } from '@cerberus/styled-system/css'\nimport { AccordionItemIndicator } from './Accordion.client'\n\n/**\n * This module contains an abstraction of the AccordionItem components.\n * @module\n */\n\nexport interface AccordionItemGroupBaseProps extends ArkAccordion.ItemProps {\n /**\n * The heading of the accordion item to open and close the content.\n */\n heading: string\n /**\n * The position of the arrow indicator.\n */\n indicatorPosition?: 'start' | 'end'\n}\nexport type AccordionItemGroupProps = AccordionItemGroupBaseProps &\n AccordionVariantProps\n\n/**\n * A grouped item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Accordion Item 1\" value=\"one\">\n * Accordion Item 1 content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function AccordionItemGroup(\n props: PropsWithChildren<AccordionItemGroupProps>,\n) {\n const {\n size,\n heading,\n children,\n indicatorPosition = 'end',\n ...itemProps\n } = props\n const triggerStyles =\n indicatorPosition === 'start'\n ? {\n gap: 'md',\n justifyContent: 'flex-start',\n }\n : undefined\n\n return (\n <AccordionItem {...itemProps}>\n <AccordionItemTrigger className={css(triggerStyles)} size={size}>\n <Show when={indicatorPosition === 'start'}>\n <AccordionItemIndicator size={size} />\n </Show>\n\n {heading}\n\n <Show when={indicatorPosition === 'end'}>\n <AccordionItemIndicator size={size} />\n </Show>\n </AccordionItemTrigger>\n\n <AccordionItemContent size={size}>{children}</AccordionItemContent>\n </AccordionItem>\n )\n}\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 { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n","'use client'\n\nimport { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n const { icons } = useCerberusContext()\n const ChevronDown = icons.accordionIndicator\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\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"],"mappings":"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","names":["import_react","ArkAccordion","import_css","import_react","import_css","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime","ArkAccordion","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../../src/components/AccordionItemGroup.tsx","../../../src/components/Show.tsx","../../../src/components/Accordion.tsx","../../../src/components/Accordion.client.tsx","../../../src/context/cerberus.tsx"],"sourcesContent":["import { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { type AccordionVariantProps } from '@cerberus/styled-system/recipes'\nimport type { PropsWithChildren } from 'react'\nimport { Show } from './Show'\nimport {\n AccordionItem,\n AccordionItemContent,\n AccordionItemTrigger,\n} from './Accordion'\nimport { css } from '@cerberus/styled-system/css'\nimport { AccordionItemIndicator } from './Accordion.client'\n\n/**\n * This module contains an abstraction of the AccordionItem components.\n * @module\n */\n\nexport interface AccordionItemGroupBaseProps extends ArkAccordion.ItemProps {\n /**\n * The heading of the accordion item to open and close the content.\n */\n heading: string\n /**\n * The position of the arrow indicator.\n */\n indicatorPosition?: 'start' | 'end'\n}\nexport type AccordionItemGroupProps = AccordionItemGroupBaseProps &\n AccordionVariantProps\n\n/**\n * A grouped item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Accordion Item 1\" value=\"one\">\n * Accordion Item 1 content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function AccordionItemGroup(\n props: PropsWithChildren<AccordionItemGroupProps>,\n) {\n const {\n size,\n heading,\n children,\n indicatorPosition = 'end',\n ...itemProps\n } = props\n const triggerStyles =\n indicatorPosition === 'start'\n ? {\n gap: 'md',\n justifyContent: 'flex-start',\n }\n : undefined\n\n return (\n <AccordionItem {...itemProps}>\n <AccordionItemTrigger className={css(triggerStyles)} size={size}>\n <Show when={indicatorPosition === 'start'}>\n <AccordionItemIndicator size={size} />\n </Show>\n\n {heading}\n\n <Show when={indicatorPosition === 'end'}>\n <AccordionItemIndicator size={size} />\n </Show>\n </AccordionItemTrigger>\n\n <AccordionItemContent size={size}>{children}</AccordionItemContent>\n </AccordionItem>\n )\n}\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 { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\n\nexport type AccordionProps = ArkAccordion.RootProps & AccordionVariantProps\n\n/**\n * The context provider for the Accordion family.\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItemGroup heading=\"Item 1 heading\" value=\"one\">\n * This is the content\n * </AccordionItemGroup>\n * </Accordion>\n * ```\n */\nexport function Accordion(props: AccordionProps) {\n const { size, className, ...rootProps } = props\n const styles = accordion({ size })\n\n return (\n <ArkAccordion.Root\n collapsible\n className={cx(className, styles.root)}\n {...rootProps}\n />\n )\n}\n\ntype AccordionItemProps = ArkAccordion.ItemProps & AccordionVariantProps\n\n/**\n * The item for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItem(props: AccordionItemProps) {\n const { size, ...itemProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.Item\n {...itemProps}\n className={cx(itemProps.className, styles.item)}\n />\n )\n}\n\nexport type AccordionItemTriggerProps = ArkAccordion.ItemTriggerProps &\n AccordionVariantProps\n\n/**\n * The trigger for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n */\nexport function AccordionItemTrigger(props: AccordionItemTriggerProps) {\n const { size, ...triggerProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemTrigger\n {...triggerProps}\n className={cx(triggerProps.className, styles.itemTrigger)}\n />\n )\n}\n\nexport type AccordionItemContentProps = ArkAccordion.ItemContentProps &\n AccordionVariantProps\n\n/**\n * The content for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemContent(props: AccordionItemContentProps) {\n const { size, ...contentProps } = props\n const styles = accordion({ size })\n return (\n <ArkAccordion.ItemContent\n {...contentProps}\n className={cx(contentProps.className, styles.itemContent)}\n />\n )\n}\n","'use client'\n\nimport { Accordion as ArkAccordion } from '@ark-ui/react'\nimport { cx } from '@cerberus/styled-system/css'\nimport {\n accordion,\n type AccordionVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport { useCerberusContext } from '../context/cerberus'\n\nexport type AccordionItemIndicatorProps = ArkAccordion.ItemIndicatorProps &\n AccordionVariantProps\n\n/**\n * The indicator for the Accordion component.\n * @definition [ARK docs](https://ark-ui.com/react/docs/components/accordion)\n * @definition [Accordion docs](https://cerberus.digitalu.design/react/accordion)\n * @example\n * ```tsx\n * <Accordion>\n * <AccordionItem value=\"one\">\n * <AccordionTrigger>\n * Accordion Item 1\n * <AccordionIndicator />\n * </AccordionTrigger>\n * <AccordionContent>Accordion Item 1 content</AccordionContent>\n * </AccordionItem>\n * </Accordion>\n * ```\n * */\nexport function AccordionItemIndicator(props: AccordionItemIndicatorProps) {\n const { size, ...indicatorProps } = props\n const styles = accordion({ size })\n const iconSize = size === 'sm' ? 16 : '24'\n const { icons } = useCerberusContext()\n const ChevronDown = icons.accordionIndicator\n\n return (\n <ArkAccordion.ItemIndicator\n {...indicatorProps}\n className={cx(indicatorProps.className, styles.itemIndicator)}\n >\n <ChevronDown size={iconSize} />\n </ArkAccordion.ItemIndicator>\n )\n}\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"],"mappings":"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","names":["import_react","ArkAccordion","import_css","import_react","import_css","import_recipes","import_react","import_jsx_runtime","import_jsx_runtime","ArkAccordion","import_jsx_runtime"]}
@@ -22,37 +22,33 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
22
  var Select_exports = {};
23
23
  __export(Select_exports, {
24
24
  Option: () => Option,
25
- Select: () => Select
25
+ OptionGroup: () => OptionGroup,
26
+ OptionGroupLabel: () => OptionGroupLabel,
27
+ Select: () => Select,
28
+ createSelectCollection: () => createSelectCollection
26
29
  });
27
30
  module.exports = __toCommonJS(Select_exports);
28
- var import_css = require("@cerberus/styled-system/css");
29
- var import_patterns = require("@cerberus/styled-system/patterns");
31
+ var import_select = require("@ark-ui/react/select");
30
32
  var import_recipes = require("@cerberus/styled-system/recipes");
33
+ var import_css = require("@cerberus/styled-system/css");
34
+ var import_jsx2 = require("@cerberus/styled-system/jsx");
31
35
 
32
- // src/context/field.tsx
36
+ // src/context/cerberus.tsx
33
37
  var import_react = require("react");
34
38
  var import_jsx_runtime = require("react/jsx-runtime");
35
- var FieldContext = (0, import_react.createContext)(null);
36
- function useFieldContext() {
37
- const context = (0, import_react.useContext)(FieldContext);
38
- if (!context) {
39
- throw new Error("useFieldContext must be used within a Field Provider.");
40
- }
41
- return context;
42
- }
43
-
44
- // src/context/cerberus.tsx
45
- var import_react2 = require("react");
46
- var import_jsx_runtime2 = require("react/jsx-runtime");
47
- var CerberusContext = (0, import_react2.createContext)(null);
39
+ var CerberusContext = (0, import_react.createContext)(null);
48
40
  function useCerberusContext() {
49
- const context = (0, import_react2.useContext)(CerberusContext);
41
+ const context = (0, import_react.useContext)(CerberusContext);
50
42
  if (!context) {
51
43
  throw new Error("useCerberus must be used within a CerberusProvider");
52
44
  }
53
45
  return context;
54
46
  }
55
47
 
48
+ // src/components/Portal.tsx
49
+ var import_react2 = require("@ark-ui/react");
50
+ var Portal = import_react2.Portal;
51
+
56
52
  // src/components/Show.tsx
57
53
  var import_react3 = require("react");
58
54
  function Show(props) {
@@ -64,57 +60,102 @@ function Show(props) {
64
60
  }, [condition, children, fallback]);
65
61
  }
66
62
 
63
+ // src/components/Text.tsx
64
+ var import_jsx = require("@cerberus/styled-system/jsx");
65
+ var import_jsx_runtime2 = require("react/jsx-runtime");
66
+ function Text(props) {
67
+ const { as = "p", ...pandaJSXProps } = props;
68
+ switch (as) {
69
+ case "h1":
70
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.H1, { ...pandaJSXProps });
71
+ case "h2":
72
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.H2, { ...pandaJSXProps });
73
+ case "h3":
74
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.H3, { ...pandaJSXProps });
75
+ case "h4":
76
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.H4, { ...pandaJSXProps });
77
+ case "h5":
78
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.H5, { ...pandaJSXProps });
79
+ case "h6":
80
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.H6, { ...pandaJSXProps });
81
+ case "strong":
82
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.Strong, { ...pandaJSXProps });
83
+ case "em":
84
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.Em, { ...pandaJSXProps });
85
+ case "small":
86
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.Small, { ...pandaJSXProps });
87
+ case "span":
88
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.Span, { ...pandaJSXProps });
89
+ default:
90
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx.P, { ...pandaJSXProps });
91
+ }
92
+ }
93
+
67
94
  // src/components/Select.tsx
68
95
  var import_jsx_runtime3 = require("react/jsx-runtime");
69
96
  function Select(props) {
70
- const { describedBy, size, ...nativeProps } = props;
71
- const { invalid, ...fieldStates } = useFieldContext();
97
+ const { collection, label, placeholder, size, ...rootProps } = props;
72
98
  const { icons } = useCerberusContext();
73
- const { invalid: InvalidIcon, selectArrow: SelectArrow } = icons;
74
- const styles = (0, import_recipes.select)({
75
- size
76
- });
77
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: styles.root, children: [
78
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
79
- "select",
80
- {
81
- ...nativeProps,
82
- ...fieldStates,
83
- ...describedBy && { "aria-describedby": describedBy },
84
- ...invalid && { "aria-invalid": true },
85
- className: styles.input
86
- }
87
- ),
88
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
89
- "span",
90
- {
91
- className: (0, import_css.cx)(
92
- styles.iconStack,
93
- (0, import_patterns.hstack)({
94
- gap: "2"
95
- })
96
- ),
97
- children: [
98
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Show, { when: invalid, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
99
- "span",
100
- {
101
- ...invalid && { "data-invalid": true },
102
- className: styles.stateIcon,
103
- children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(InvalidIcon, {})
104
- }
105
- ) }),
106
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: styles.arrowIcon, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(SelectArrow, {}) })
107
- ]
108
- }
109
- )
110
- ] });
99
+ const { selectArrow: SelectArrow, invalid: InvalidIcon } = icons;
100
+ 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
+ );
111
124
  }
112
125
  function Option(props) {
113
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("option", { ...props });
126
+ const { item, ...itemProps } = props;
127
+ const { icons } = useCerberusContext();
128
+ const { selectChecked: CheckedIcon } = icons;
129
+ 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, {}) })
133
+ ] });
134
+ }
135
+ function OptionGroup(props) {
136
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_select.Select.ItemGroup, { ...props });
137
+ }
138
+ function OptionGroupLabel(props) {
139
+ const styles = (0, import_recipes.select)();
140
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
141
+ import_select.Select.ItemGroupLabel,
142
+ {
143
+ ...props,
144
+ className: (0, import_css.cx)(props.className, styles.itemGroupLabel)
145
+ }
146
+ );
147
+ }
148
+ function createSelectCollection(collection) {
149
+ return (0, import_select.createListCollection)({
150
+ items: collection
151
+ });
114
152
  }
115
153
  // Annotate the CommonJS export names for ESM import in node:
116
154
  0 && (module.exports = {
117
155
  Option,
118
- Select
156
+ OptionGroup,
157
+ OptionGroupLabel,
158
+ Select,
159
+ createSelectCollection
119
160
  });
120
161
  //# sourceMappingURL=Select.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/Select.tsx","../../../src/context/field.tsx","../../../src/context/cerberus.tsx","../../../src/components/Show.tsx"],"sourcesContent":["'use client'\n\nimport { cx } from '@cerberus/styled-system/css'\nimport { hstack } from '@cerberus/styled-system/patterns'\nimport {\n select,\n type SelectVariantProps,\n} from '@cerberus/styled-system/recipes'\nimport type { OptionHTMLAttributes, SelectHTMLAttributes } from 'react'\nimport { useFieldContext } from '../context/field'\nimport { useCerberusContext } from '../context/cerberus'\nimport { Show } from './Show'\n\n/**\n * This module contains the select components.\n * @module\n */\n\nexport type SelectProps = Omit<\n SelectHTMLAttributes<HTMLSelectElement>,\n 'size'\n> &\n SelectVariantProps & {\n /**\n * The unique id of the select element. Required for accessibility.\n */\n id: string\n /**\n * The id of the FieldMessage that describes the select element.\n */\n describedBy?: string\n }\n\n/**\n * Used to allow users to select a single option from a list of options.\n * @see https://cerberus.digitalu.design/react/select\n * @memberof module:Field\n * @example\n * ```tsx\n * <Field>\n * <Select describedby=\"help:fruit\" id=\"fruit\">\n * <Option value=\"\">Choose option</Option>\n * <Option value=\"one\">Option 1</Option>\n * <Option value=\"two\">Option 2</Option>\n * <Option value=\"three\">Option 3</Option>\n * </Select>\n * </Field>\n * ```\n */\nexport function Select(props: SelectProps) {\n const { describedBy, size, ...nativeProps } = props\n const { invalid, ...fieldStates } = useFieldContext()\n\n const { icons } = useCerberusContext()\n const { invalid: InvalidIcon, selectArrow: SelectArrow } = icons\n\n const styles = select({\n size,\n })\n\n return (\n <div className={styles.root}>\n <select\n {...nativeProps}\n {...fieldStates}\n {...(describedBy && { 'aria-describedby': describedBy })}\n {...(invalid && { 'aria-invalid': true })}\n className={styles.input}\n />\n <span\n className={cx(\n styles.iconStack,\n hstack({\n gap: '2',\n }),\n )}\n >\n <Show when={invalid}>\n <span\n {...(invalid && { 'data-invalid': true })}\n className={styles.stateIcon}\n >\n <InvalidIcon />\n </span>\n </Show>\n <span className={styles.arrowIcon}>\n <SelectArrow />\n </span>\n </span>\n </div>\n )\n}\n\n// We only export this component for consistency with the other components\n\nexport type OptionProps = OptionHTMLAttributes<HTMLOptionElement>\n\n/**\n * Option component\n * props: OptionHTMLAttributes<HTMLOptionElement>\n * @example\n * ```tsx\n * <Option value=\"one\">Option 1</Option>\n * ```\n */\nexport function Option(props: OptionProps) {\n return <option {...props} />\n}\n","'use client'\n\nimport {\n createContext,\n useContext,\n useMemo,\n type PropsWithChildren,\n} from 'react'\n\n/**\n * This module provides a context and hook for the field.\n * @module Field\n */\n\nexport interface FieldContextValue {\n /**\n * Whether the field is disabled.\n * @description [Moz Input Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attributes)\n */\n disabled?: boolean\n /**\n * Whether the field is read-only.\n */\n readOnly?: boolean\n /**\n * Whether the field is required.\n */\n required?: boolean\n /**\n * Whether the field is invalid.\n */\n invalid?: boolean\n}\n\nconst FieldContext = createContext<FieldContextValue | null>(null)\n\n/**\n * Provides the field state for a all related components used within a group.\n * @see https://cerberus.digitalu.design/react/input\n */\nexport function Field(\n props: PropsWithChildren<FieldContextValue>,\n): JSX.Element {\n const value = useMemo(\n () => ({\n disabled: props.disabled,\n readOnly: props.readOnly,\n required: props.required,\n invalid: props.invalid,\n }),\n [props.disabled, props.readOnly, props.required, props.invalid],\n )\n\n return (\n <FieldContext.Provider value={value}>\n {props.children}\n </FieldContext.Provider>\n )\n}\n\n/**\n * Used to access the field context.\n * @returns The field context.\n */\nexport function useFieldContext(): FieldContextValue {\n const context = useContext(FieldContext)\n if (!context) {\n throw new Error('useFieldContext must be used within a Field Provider.')\n }\n return context\n}\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","'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"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,iBAAmB;AACnB,sBAAuB;AACvB,qBAGO;;;ACLP,mBAKO;AA+CH;AApBJ,IAAM,mBAAe,4BAAwC,IAAI;AA8B1D,SAAS,kBAAqC;AACnD,QAAM,cAAU,yBAAW,YAAY;AACvC,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,uDAAuD;AAAA,EACzE;AACA,SAAO;AACT;;;ACpEA,IAAAA,gBAAkE;AAyB9D,IAAAC,sBAAA;AAfJ,IAAM,sBAAkB,6BAA2C,IAAI;AAyBhE,SAAS,qBAAqB;AACnC,QAAM,cAAU,0BAAW,eAAe;AAC1C,MAAI,CAAC,SAAS;AACZ,UAAM,IAAI,MAAM,oDAAoD;AAAA,EACtE;AACA,SAAO;AACT;;;ACzCA,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;;;AHwBM,IAAAC,sBAAA;AAbC,SAAS,OAAO,OAAoB;AACzC,QAAM,EAAE,aAAa,MAAM,GAAG,YAAY,IAAI;AAC9C,QAAM,EAAE,SAAS,GAAG,YAAY,IAAI,gBAAgB;AAEpD,QAAM,EAAE,MAAM,IAAI,mBAAmB;AACrC,QAAM,EAAE,SAAS,aAAa,aAAa,YAAY,IAAI;AAE3D,QAAM,aAAS,uBAAO;AAAA,IACpB;AAAA,EACF,CAAC;AAED,SACE,8CAAC,SAAI,WAAW,OAAO,MACrB;AAAA;AAAA,MAAC;AAAA;AAAA,QACE,GAAG;AAAA,QACH,GAAG;AAAA,QACH,GAAI,eAAe,EAAE,oBAAoB,YAAY;AAAA,QACrD,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,QACvC,WAAW,OAAO;AAAA;AAAA,IACpB;AAAA,IACA;AAAA,MAAC;AAAA;AAAA,QACC,eAAW;AAAA,UACT,OAAO;AAAA,cACP,wBAAO;AAAA,YACL,KAAK;AAAA,UACP,CAAC;AAAA,QACH;AAAA,QAEA;AAAA,uDAAC,QAAK,MAAM,SACV;AAAA,YAAC;AAAA;AAAA,cACE,GAAI,WAAW,EAAE,gBAAgB,KAAK;AAAA,cACvC,WAAW,OAAO;AAAA,cAElB,uDAAC,eAAY;AAAA;AAAA,UACf,GACF;AAAA,UACA,6CAAC,UAAK,WAAW,OAAO,WACtB,uDAAC,eAAY,GACf;AAAA;AAAA;AAAA,IACF;AAAA,KACF;AAEJ;AAcO,SAAS,OAAO,OAAoB;AACzC,SAAO,6CAAC,YAAQ,GAAG,OAAO;AAC5B;","names":["import_react","import_jsx_runtime","import_react","import_jsx_runtime"]}
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":"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","names":["import_jsx","import_react","ArkPortal","import_react","import_jsx_runtime","import_jsx_runtime","ArkSelect"]}
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/components/Modal.tsx
20
+ // src/components/deprecated/Modal.tsx
21
21
  var Modal_exports = {};
22
22
  __export(Modal_exports, {
23
23
  Modal: () => Modal
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/deprecated/Modal.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport { forwardRef, type ForwardedRef, type HTMLAttributes } from 'react'\n\n/**\n * This module contains the Modal root component for a customizable modal.\n * @module\n */\n\n// Modal\n\nexport type ModalProps = HTMLAttributes<HTMLDialogElement>\n\nfunction ModalEl(props: ModalProps, ref: ForwardedRef<HTMLDialogElement>) {\n return (\n <dialog\n {...props}\n className={cx(props.className, modal().dialog)}\n ref={ref}\n />\n )\n}\n\n/**\n * @deprecated use `Dialog` instead\n */\nexport const Modal = forwardRef(ModalEl)\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAmB;AACnB,qBAAsB;AACtB,mBAAmE;AAa/D;AAFJ,SAAS,QAAQ,OAAmB,KAAsC;AACxE,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW,eAAG,MAAM,eAAW,sBAAM,EAAE,MAAM;AAAA,MAC7C;AAAA;AAAA,EACF;AAEJ;AAKO,IAAM,YAAQ,yBAAW,OAAO;","names":[]}
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/components/ModalDescription.tsx
20
+ // src/components/deprecated/ModalDescription.tsx
21
21
  var ModalDescription_exports = {};
22
22
  __export(ModalDescription_exports, {
23
23
  ModalDescription: () => ModalDescription
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/deprecated/ModalDescription.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { modal } from '@cerberus/styled-system/recipes'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalDescription component for a customizable modal.\n * @module\n */\n\nexport type ModalDescriptionProps = HTMLAttributes<HTMLParagraphElement>\n\n/**\n * @deprecated use `DialogDescription` instead\n */\nexport function ModalDescription(props: ModalDescriptionProps) {\n return <p {...props} className={cx(props.className, modal().description)} />\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAmB;AACnB,qBAAsB;AAcb;AADF,SAAS,iBAAiB,OAA8B;AAC7D,SAAO,4CAAC,OAAG,GAAG,OAAO,eAAW,eAAG,MAAM,eAAW,sBAAM,EAAE,WAAW,GAAG;AAC5E;","names":[]}
@@ -17,7 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  };
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
 
20
- // src/components/ModalHeader.tsx
20
+ // src/components/deprecated/ModalHeader.tsx
21
21
  var ModalHeader_exports = {};
22
22
  __export(ModalHeader_exports, {
23
23
  ModalHeader: () => ModalHeader
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../../src/components/deprecated/ModalHeader.tsx"],"sourcesContent":["import { cx } from '@cerberus/styled-system/css'\nimport { vstack } from '@cerberus/styled-system/patterns'\nimport type { HTMLAttributes } from 'react'\n\n/**\n * This module contains the ModalHeader component for a customizable modal.\n * @module\n */\n\nexport type ModalHeaderProps = HTMLAttributes<HTMLDivElement>\n\n/**\n * @deprecated there is no replacement for this component\n */\nexport function ModalHeader(props: ModalHeaderProps) {\n return (\n <div\n {...props}\n className={cx(\n props.className,\n vstack({\n alignItems: 'flex-start',\n gap: 'md',\n position: 'relative',\n }),\n )}\n />\n )\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAmB;AACnB,sBAAuB;AAenB;AAFG,SAAS,YAAY,OAAyB;AACnD,SACE;AAAA,IAAC;AAAA;AAAA,MACE,GAAG;AAAA,MACJ,eAAW;AAAA,QACT,MAAM;AAAA,YACN,wBAAO;AAAA,UACL,YAAY;AAAA,UACZ,KAAK;AAAA,UACL,UAAU;AAAA,QACZ,CAAC;AAAA,MACH;AAAA;AAAA,EACF;AAEJ;","names":[]}