@@ -542,84 +542,6 @@ describe('generate recipes', () => {
542
542
})",
543
543
"name": "badge",
544
544
},
545
- {
546
- "dts": "import type { ConditionalValue } from '../types/index';
547
- import type { DistributiveOmit, Pretty } from '../types/system-types';
548
-
549
- interface PopoverVariant {
550
- size: "sm" | "md" | "lg"
551
- }
552
-
553
- type PopoverVariantMap = {
554
- [key in keyof PopoverVariant]: Array<PopoverVariant[key]>
555
- }
556
-
557
- type PopoverSlot = "root" | "content"
558
-
559
- export type PopoverVariantProps = {
560
- [key in keyof PopoverVariant]?: ConditionalValue<PopoverVariant[key]> | undefined
561
- }
562
-
563
- export interface PopoverRecipe {
564
- __slot: PopoverSlot
565
- __type: PopoverVariantProps
566
- (props?: PopoverVariantProps): Pretty<Record<PopoverSlot, string>>
567
- raw: (props?: PopoverVariantProps) => PopoverVariantProps
568
- variantMap: PopoverVariantMap
569
- variantKeys: Array<keyof PopoverVariant>
570
- splitVariantProps<Props extends PopoverVariantProps>(props: Props): [PopoverVariantProps, Pretty<DistributiveOmit<Props, keyof PopoverVariantProps>>]
571
- getVariantProps: (props?: PopoverVariantProps) => PopoverVariantProps
572
- }
573
-
574
-
575
- export declare const popover: PopoverRecipe",
576
- "js": "import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
577
- import { createRecipe } from './create-recipe.mjs';
578
-
579
- const popoverDefaultVariants = {}
580
- const popoverCompoundVariants = []
581
-
582
- const popoverSlotNames = [
583
- [
584
- "root",
585
- "popover__root"
586
- ],
587
- [
588
- "content",
589
- "popover__content"
590
- ]
591
- ]
592
- const popoverSlotFns = /* @__PURE__ */ popoverSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, popoverDefaultVariants, getSlotCompoundVariant(popoverCompoundVariants, slotName))])
593
-
594
- const popoverFn = memo((props = {}) => {
595
- return Object.fromEntries(popoverSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
596
- })
597
-
598
- const popoverVariantKeys = [
599
- "size"
600
- ]
601
- const getVariantProps = (variants) => ({ ...popoverDefaultVariants, ...compact(variants) })
602
-
603
- export const popover = /* @__PURE__ */ Object.assign(popoverFn, {
604
- __recipe__: false,
605
- __name__: 'popover',
606
- raw: (props) => props,
607
- classNameMap: {},
608
- variantKeys: popoverVariantKeys,
609
- variantMap: {
610
- "size": [
611
- "sm",
612
- "md",
613
- "lg"
614
- ]
615
- },
616
- splitVariantProps(props) {
617
- return splitProps(props, popoverVariantKeys)
618
- },
619
- getVariantProps
620
- })",
621
- "name": "popover",
622
- },
623
545
]
624
546
` )
625
547
} )
0 commit comments