@luxonis/depthai-pipeline-lib 1.4.13 → 1.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/panda.css +670 -809
- package/dist/src/styled-system/chunks/src__components__Node.css +1 -0
- package/dist/src/styled-system/chunks/src__components__PipelineCanvas.css +1 -0
- package/dist/src/styled-system/css/conditions.mjs +4 -2
- package/dist/src/styled-system/css/css.d.mts +15 -2
- package/dist/src/styled-system/css/css.mjs +2 -1
- package/dist/src/styled-system/css/cva.d.mts +1 -1
- package/dist/src/styled-system/css/cva.mjs +28 -4
- package/dist/src/styled-system/css/sva.mjs +9 -3
- package/dist/src/styled-system/helpers.mjs +109 -64
- package/dist/src/styled-system/patterns/aspect-ratio.d.mts +1 -1
- package/dist/src/styled-system/patterns/aspect-ratio.mjs +5 -2
- package/dist/src/styled-system/patterns/bleed.d.mts +3 -3
- package/dist/src/styled-system/patterns/bleed.mjs +12 -7
- package/dist/src/styled-system/patterns/box.d.mts +1 -1
- package/dist/src/styled-system/patterns/box.mjs +5 -2
- package/dist/src/styled-system/patterns/center.d.mts +1 -1
- package/dist/src/styled-system/patterns/center.mjs +5 -2
- package/dist/src/styled-system/patterns/circle.d.mts +2 -2
- package/dist/src/styled-system/patterns/circle.mjs +5 -2
- package/dist/src/styled-system/patterns/container.d.mts +1 -1
- package/dist/src/styled-system/patterns/container.mjs +5 -2
- package/dist/src/styled-system/patterns/cq.d.mts +22 -0
- package/dist/src/styled-system/patterns/cq.mjs +21 -0
- package/dist/src/styled-system/patterns/divider.d.mts +1 -1
- package/dist/src/styled-system/patterns/divider.mjs +8 -4
- package/dist/src/styled-system/patterns/flex.d.mts +8 -8
- package/dist/src/styled-system/patterns/flex.mjs +5 -2
- package/dist/src/styled-system/patterns/float.d.mts +1 -1
- package/dist/src/styled-system/patterns/float.mjs +10 -3
- package/dist/src/styled-system/patterns/grid-item.d.mts +1 -1
- package/dist/src/styled-system/patterns/grid-item.mjs +5 -2
- package/dist/src/styled-system/patterns/grid.d.mts +4 -4
- package/dist/src/styled-system/patterns/grid.mjs +12 -5
- package/dist/src/styled-system/patterns/hstack.d.mts +3 -3
- package/dist/src/styled-system/patterns/hstack.mjs +8 -4
- package/dist/src/styled-system/patterns/index.d.mts +2 -2
- package/dist/src/styled-system/patterns/index.mjs +2 -2
- package/dist/src/styled-system/patterns/link-overlay.d.mts +1 -1
- package/dist/src/styled-system/patterns/link-overlay.mjs +5 -5
- package/dist/src/styled-system/patterns/spacer.d.mts +1 -1
- package/dist/src/styled-system/patterns/spacer.mjs +5 -2
- package/dist/src/styled-system/patterns/square.d.mts +2 -2
- package/dist/src/styled-system/patterns/square.mjs +5 -2
- package/dist/src/styled-system/patterns/stack.d.mts +5 -5
- package/dist/src/styled-system/patterns/stack.mjs +8 -4
- package/dist/src/styled-system/patterns/visually-hidden.d.mts +1 -1
- package/dist/src/styled-system/patterns/visually-hidden.mjs +5 -2
- package/dist/src/styled-system/patterns/vstack.d.mts +3 -3
- package/dist/src/styled-system/patterns/vstack.mjs +8 -4
- package/dist/src/styled-system/patterns/wrap.d.mts +6 -6
- package/dist/src/styled-system/patterns/wrap.mjs +5 -2
- package/dist/src/styled-system/recipes/accordion.d.mts +8 -4
- package/dist/src/styled-system/recipes/accordion.mjs +6 -4
- package/dist/src/styled-system/recipes/alert-description.d.mts +8 -4
- package/dist/src/styled-system/recipes/alert-description.mjs +8 -3
- package/dist/src/styled-system/recipes/alert-dialog.d.mts +8 -4
- package/dist/src/styled-system/recipes/alert-dialog.mjs +6 -4
- package/dist/src/styled-system/recipes/alert-title.d.mts +8 -4
- package/dist/src/styled-system/recipes/alert-title.mjs +8 -3
- package/dist/src/styled-system/recipes/alert.d.mts +12 -5
- package/dist/src/styled-system/recipes/alert.mjs +8 -3
- package/dist/src/styled-system/recipes/avatar.d.mts +8 -4
- package/dist/src/styled-system/recipes/avatar.mjs +6 -4
- package/dist/src/styled-system/recipes/badge.d.mts +12 -5
- package/dist/src/styled-system/recipes/badge.mjs +8 -3
- package/dist/src/styled-system/recipes/blockquote.d.mts +8 -4
- package/dist/src/styled-system/recipes/blockquote.mjs +8 -3
- package/dist/src/styled-system/recipes/button.d.mts +15 -5
- package/dist/src/styled-system/recipes/button.mjs +8 -3
- package/dist/src/styled-system/recipes/calendar.d.mts +8 -4
- package/dist/src/styled-system/recipes/calendar.mjs +6 -4
- package/dist/src/styled-system/recipes/card-content.d.mts +8 -4
- package/dist/src/styled-system/recipes/card-content.mjs +8 -3
- package/dist/src/styled-system/recipes/card-description.d.mts +8 -4
- package/dist/src/styled-system/recipes/card-description.mjs +8 -3
- package/dist/src/styled-system/recipes/card-footer.d.mts +8 -4
- package/dist/src/styled-system/recipes/card-footer.mjs +8 -3
- package/dist/src/styled-system/recipes/card-header.d.mts +8 -4
- package/dist/src/styled-system/recipes/card-header.mjs +8 -3
- package/dist/src/styled-system/recipes/card-title.d.mts +8 -4
- package/dist/src/styled-system/recipes/card-title.mjs +8 -3
- package/dist/src/styled-system/recipes/card.d.mts +8 -4
- package/dist/src/styled-system/recipes/card.mjs +8 -3
- package/dist/src/styled-system/recipes/checkbox.d.mts +8 -4
- package/dist/src/styled-system/recipes/checkbox.mjs +6 -4
- package/dist/src/styled-system/recipes/collapsible.d.mts +8 -4
- package/dist/src/styled-system/recipes/collapsible.mjs +6 -4
- package/dist/src/styled-system/recipes/command-dialog.d.mts +8 -4
- package/dist/src/styled-system/recipes/command-dialog.mjs +6 -4
- package/dist/src/styled-system/recipes/command.d.mts +8 -4
- package/dist/src/styled-system/recipes/command.mjs +6 -4
- package/dist/src/styled-system/recipes/context-menu.d.mts +12 -5
- package/dist/src/styled-system/recipes/context-menu.mjs +6 -4
- package/dist/src/styled-system/recipes/create-recipe.mjs +39 -7
- package/dist/src/styled-system/recipes/dialog.d.mts +8 -4
- package/dist/src/styled-system/recipes/dialog.mjs +6 -4
- package/dist/src/styled-system/recipes/dropdown-menu.d.mts +8 -4
- package/dist/src/styled-system/recipes/dropdown-menu.mjs +6 -4
- package/dist/src/styled-system/recipes/form-control.d.mts +8 -4
- package/dist/src/styled-system/recipes/form-control.mjs +8 -3
- package/dist/src/styled-system/recipes/form-description.d.mts +8 -4
- package/dist/src/styled-system/recipes/form-description.mjs +8 -3
- package/dist/src/styled-system/recipes/form-item.d.mts +8 -4
- package/dist/src/styled-system/recipes/form-item.mjs +8 -3
- package/dist/src/styled-system/recipes/form-label.d.mts +8 -4
- package/dist/src/styled-system/recipes/form-label.mjs +8 -3
- package/dist/src/styled-system/recipes/form-message.d.mts +8 -4
- package/dist/src/styled-system/recipes/form-message.mjs +8 -3
- package/dist/src/styled-system/recipes/h1.d.mts +8 -4
- package/dist/src/styled-system/recipes/h1.mjs +8 -3
- package/dist/src/styled-system/recipes/h2.d.mts +8 -4
- package/dist/src/styled-system/recipes/h2.mjs +8 -3
- package/dist/src/styled-system/recipes/h3.d.mts +8 -4
- package/dist/src/styled-system/recipes/h3.mjs +8 -3
- package/dist/src/styled-system/recipes/h4.d.mts +8 -4
- package/dist/src/styled-system/recipes/h4.mjs +8 -3
- package/dist/src/styled-system/recipes/hover-card.d.mts +8 -4
- package/dist/src/styled-system/recipes/hover-card.mjs +6 -4
- package/dist/src/styled-system/recipes/icon.d.mts +24 -5
- package/dist/src/styled-system/recipes/icon.mjs +8 -3
- package/dist/src/styled-system/recipes/inline-code.d.mts +8 -4
- package/dist/src/styled-system/recipes/inline-code.mjs +8 -3
- package/dist/src/styled-system/recipes/input.d.mts +8 -4
- package/dist/src/styled-system/recipes/input.mjs +8 -3
- package/dist/src/styled-system/recipes/label.d.mts +8 -4
- package/dist/src/styled-system/recipes/label.mjs +8 -3
- package/dist/src/styled-system/recipes/large.d.mts +8 -4
- package/dist/src/styled-system/recipes/large.mjs +8 -3
- package/dist/src/styled-system/recipes/lead.d.mts +8 -4
- package/dist/src/styled-system/recipes/lead.mjs +8 -3
- package/dist/src/styled-system/recipes/link.d.mts +8 -4
- package/dist/src/styled-system/recipes/link.mjs +8 -3
- package/dist/src/styled-system/recipes/list.d.mts +8 -4
- package/dist/src/styled-system/recipes/list.mjs +8 -3
- package/dist/src/styled-system/recipes/menubar.d.mts +8 -4
- package/dist/src/styled-system/recipes/menubar.mjs +6 -4
- package/dist/src/styled-system/recipes/muted.d.mts +8 -4
- package/dist/src/styled-system/recipes/muted.mjs +8 -3
- package/dist/src/styled-system/recipes/navigation-menu.d.mts +8 -4
- package/dist/src/styled-system/recipes/navigation-menu.mjs +6 -4
- package/dist/src/styled-system/recipes/p.d.mts +8 -4
- package/dist/src/styled-system/recipes/p.mjs +8 -3
- package/dist/src/styled-system/recipes/popover.d.mts +8 -4
- package/dist/src/styled-system/recipes/popover.mjs +6 -4
- package/dist/src/styled-system/recipes/progress.d.mts +8 -4
- package/dist/src/styled-system/recipes/progress.mjs +6 -4
- package/dist/src/styled-system/recipes/radio-group.d.mts +8 -4
- package/dist/src/styled-system/recipes/radio-group.mjs +6 -4
- package/dist/src/styled-system/recipes/scroll-area.d.mts +8 -4
- package/dist/src/styled-system/recipes/scroll-area.mjs +6 -4
- package/dist/src/styled-system/recipes/select.d.mts +8 -4
- package/dist/src/styled-system/recipes/select.mjs +6 -4
- package/dist/src/styled-system/recipes/separator.d.mts +12 -5
- package/dist/src/styled-system/recipes/separator.mjs +8 -3
- package/dist/src/styled-system/recipes/sheet.d.mts +12 -5
- package/dist/src/styled-system/recipes/sheet.mjs +6 -4
- package/dist/src/styled-system/recipes/skeleton.d.mts +8 -4
- package/dist/src/styled-system/recipes/skeleton.mjs +8 -3
- package/dist/src/styled-system/recipes/slider.d.mts +8 -4
- package/dist/src/styled-system/recipes/slider.mjs +6 -4
- package/dist/src/styled-system/recipes/small.d.mts +8 -4
- package/dist/src/styled-system/recipes/small.mjs +8 -3
- package/dist/src/styled-system/recipes/switch-recipe.d.mts +8 -4
- package/dist/src/styled-system/recipes/switch-recipe.mjs +6 -4
- package/dist/src/styled-system/recipes/table-body.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-body.mjs +8 -3
- package/dist/src/styled-system/recipes/table-caption.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-caption.mjs +8 -3
- package/dist/src/styled-system/recipes/table-cell.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-cell.mjs +8 -3
- package/dist/src/styled-system/recipes/table-container.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-container.mjs +8 -3
- package/dist/src/styled-system/recipes/table-footer.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-footer.mjs +8 -3
- package/dist/src/styled-system/recipes/table-head.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-head.mjs +8 -3
- package/dist/src/styled-system/recipes/table-header.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-header.mjs +8 -3
- package/dist/src/styled-system/recipes/table-row.d.mts +8 -4
- package/dist/src/styled-system/recipes/table-row.mjs +8 -3
- package/dist/src/styled-system/recipes/table.d.mts +8 -4
- package/dist/src/styled-system/recipes/table.mjs +8 -3
- package/dist/src/styled-system/recipes/tabs.d.mts +8 -4
- package/dist/src/styled-system/recipes/tabs.mjs +6 -4
- package/dist/src/styled-system/recipes/textarea.d.mts +8 -4
- package/dist/src/styled-system/recipes/textarea.mjs +8 -3
- package/dist/src/styled-system/recipes/toast-viewport.d.mts +8 -4
- package/dist/src/styled-system/recipes/toast-viewport.mjs +8 -3
- package/dist/src/styled-system/recipes/toast.d.mts +12 -5
- package/dist/src/styled-system/recipes/toast.mjs +6 -4
- package/dist/src/styled-system/recipes/toggle.d.mts +15 -5
- package/dist/src/styled-system/recipes/toggle.mjs +8 -3
- package/dist/src/styled-system/recipes/tooltip.d.mts +8 -4
- package/dist/src/styled-system/recipes/tooltip.mjs +6 -4
- package/dist/src/styled-system/recipes/typography-table-container.d.mts +8 -4
- package/dist/src/styled-system/recipes/typography-table-container.mjs +8 -3
- package/dist/src/styled-system/recipes/typography-table.d.mts +8 -4
- package/dist/src/styled-system/recipes/typography-table.mjs +8 -3
- package/dist/src/styled-system/tokens/index.mjs +271 -219
- package/dist/src/styled-system/tokens/tokens.d.mts +18 -18
- package/dist/src/styled-system/types/composition.d.mts +70 -17
- package/dist/src/styled-system/types/conditions.d.mts +105 -49
- package/dist/src/styled-system/types/csstype.d.mts +1270 -721
- package/dist/src/styled-system/types/global.d.mts +1 -0
- package/dist/src/styled-system/types/index.d.mts +1 -2
- package/dist/src/styled-system/types/parts.d.mts +3 -1
- package/dist/src/styled-system/types/pattern.d.mts +20 -3
- package/dist/src/styled-system/types/prop-type.d.mts +59 -135
- package/dist/src/styled-system/types/recipe.d.mts +42 -9
- package/dist/src/styled-system/types/selectors.d.mts +1 -1
- package/dist/src/styled-system/types/static-css.d.mts +56 -0
- package/dist/src/styled-system/types/style-props.d.mts +7540 -678
- package/dist/src/styled-system/types/system-types.d.mts +128 -20
- package/package.json +8 -8
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const calendarDefaultVariants = {}
|
|
@@ -100,11 +100,12 @@ const calendarSlotNames = [
|
|
|
100
100
|
]
|
|
101
101
|
const calendarSlotFns = /* @__PURE__ */ calendarSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, calendarDefaultVariants, getSlotCompoundVariant(calendarCompoundVariants, slotName))])
|
|
102
102
|
|
|
103
|
-
const calendarFn = (props = {}) => {
|
|
104
|
-
return Object.fromEntries(calendarSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
105
|
-
}
|
|
103
|
+
const calendarFn = memo((props = {}) => {
|
|
104
|
+
return Object.fromEntries(calendarSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
105
|
+
})
|
|
106
106
|
|
|
107
107
|
const calendarVariantKeys = []
|
|
108
|
+
const getVariantProps = (variants) => ({ ...calendarDefaultVariants, ...compact(variants) })
|
|
108
109
|
|
|
109
110
|
export const calendar = /* @__PURE__ */ Object.assign(calendarFn, {
|
|
110
111
|
__recipe__: false,
|
|
@@ -115,4 +116,5 @@ export const calendar = /* @__PURE__ */ Object.assign(calendarFn, {
|
|
|
115
116
|
splitVariantProps(props) {
|
|
116
117
|
return splitProps(props, calendarVariantKeys)
|
|
117
118
|
},
|
|
119
|
+
getVariantProps
|
|
118
120
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CardContentVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CardContentVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CardContentVariantProps = {
|
|
15
|
-
[key in keyof CardContentVariant]?: ConditionalValue<CardContentVariant[key]>
|
|
14
|
+
[key in keyof CardContentVariant]?: ConditionalValue<CardContentVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CardContentRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CardContentRecipe {
|
|
|
22
21
|
variantMap: CardContentVariantMap
|
|
23
22
|
variantKeys: Array<keyof CardContentVariant>
|
|
24
23
|
splitVariantProps<Props extends CardContentVariantProps>(props: Props): [CardContentVariantProps, Pretty<DistributiveOmit<Props, keyof CardContentVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CardContentVariantProps) => CardContentVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the CardContent component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const cardContent: CardContentRecipe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const cardContentFn = /* @__PURE__ */ createRecipe('cardContent', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const cardContentVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const cardContentVariantKeys = Object.keys(cardContentVariantMap)
|
|
9
9
|
|
|
10
|
-
export const cardContent = /* @__PURE__ */ Object.assign(cardContentFn, {
|
|
10
|
+
export const cardContent = /* @__PURE__ */ Object.assign(memo(cardContentFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'cardContent',
|
|
13
|
+
__getCompoundVariantCss__: cardContentFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: cardContentVariantKeys,
|
|
15
16
|
variantMap: cardContentVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, cardContentVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: cardContentFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CardDescriptionVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CardDescriptionVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CardDescriptionVariantProps = {
|
|
15
|
-
[key in keyof CardDescriptionVariant]?: ConditionalValue<CardDescriptionVariant[key]>
|
|
14
|
+
[key in keyof CardDescriptionVariant]?: ConditionalValue<CardDescriptionVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CardDescriptionRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CardDescriptionRecipe {
|
|
|
22
21
|
variantMap: CardDescriptionVariantMap
|
|
23
22
|
variantKeys: Array<keyof CardDescriptionVariant>
|
|
24
23
|
splitVariantProps<Props extends CardDescriptionVariantProps>(props: Props): [CardDescriptionVariantProps, Pretty<DistributiveOmit<Props, keyof CardDescriptionVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CardDescriptionVariantProps) => CardDescriptionVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the CardDescription component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const cardDescription: CardDescriptionRecipe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const cardDescriptionFn = /* @__PURE__ */ createRecipe('cardDescription', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const cardDescriptionVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const cardDescriptionVariantKeys = Object.keys(cardDescriptionVariantMap)
|
|
9
9
|
|
|
10
|
-
export const cardDescription = /* @__PURE__ */ Object.assign(cardDescriptionFn, {
|
|
10
|
+
export const cardDescription = /* @__PURE__ */ Object.assign(memo(cardDescriptionFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'cardDescription',
|
|
13
|
+
__getCompoundVariantCss__: cardDescriptionFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: cardDescriptionVariantKeys,
|
|
15
16
|
variantMap: cardDescriptionVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, cardDescriptionVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: cardDescriptionFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CardFooterVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CardFooterVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CardFooterVariantProps = {
|
|
15
|
-
[key in keyof CardFooterVariant]?: ConditionalValue<CardFooterVariant[key]>
|
|
14
|
+
[key in keyof CardFooterVariant]?: ConditionalValue<CardFooterVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CardFooterRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CardFooterRecipe {
|
|
|
22
21
|
variantMap: CardFooterVariantMap
|
|
23
22
|
variantKeys: Array<keyof CardFooterVariant>
|
|
24
23
|
splitVariantProps<Props extends CardFooterVariantProps>(props: Props): [CardFooterVariantProps, Pretty<DistributiveOmit<Props, keyof CardFooterVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CardFooterVariantProps) => CardFooterVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the CardFooter component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const cardFooter: CardFooterRecipe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const cardFooterFn = /* @__PURE__ */ createRecipe('cardFooter', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const cardFooterVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const cardFooterVariantKeys = Object.keys(cardFooterVariantMap)
|
|
9
9
|
|
|
10
|
-
export const cardFooter = /* @__PURE__ */ Object.assign(cardFooterFn, {
|
|
10
|
+
export const cardFooter = /* @__PURE__ */ Object.assign(memo(cardFooterFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'cardFooter',
|
|
13
|
+
__getCompoundVariantCss__: cardFooterFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: cardFooterVariantKeys,
|
|
15
16
|
variantMap: cardFooterVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, cardFooterVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: cardFooterFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CardHeaderVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CardHeaderVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CardHeaderVariantProps = {
|
|
15
|
-
[key in keyof CardHeaderVariant]?: ConditionalValue<CardHeaderVariant[key]>
|
|
14
|
+
[key in keyof CardHeaderVariant]?: ConditionalValue<CardHeaderVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CardHeaderRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CardHeaderRecipe {
|
|
|
22
21
|
variantMap: CardHeaderVariantMap
|
|
23
22
|
variantKeys: Array<keyof CardHeaderVariant>
|
|
24
23
|
splitVariantProps<Props extends CardHeaderVariantProps>(props: Props): [CardHeaderVariantProps, Pretty<DistributiveOmit<Props, keyof CardHeaderVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CardHeaderVariantProps) => CardHeaderVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the CardHeader component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const cardHeader: CardHeaderRecipe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const cardHeaderFn = /* @__PURE__ */ createRecipe('cardHeader', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const cardHeaderVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const cardHeaderVariantKeys = Object.keys(cardHeaderVariantMap)
|
|
9
9
|
|
|
10
|
-
export const cardHeader = /* @__PURE__ */ Object.assign(cardHeaderFn, {
|
|
10
|
+
export const cardHeader = /* @__PURE__ */ Object.assign(memo(cardHeaderFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'cardHeader',
|
|
13
|
+
__getCompoundVariantCss__: cardHeaderFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: cardHeaderVariantKeys,
|
|
15
16
|
variantMap: cardHeaderVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, cardHeaderVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: cardHeaderFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CardTitleVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CardTitleVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CardTitleVariantProps = {
|
|
15
|
-
[key in keyof CardTitleVariant]?: ConditionalValue<CardTitleVariant[key]>
|
|
14
|
+
[key in keyof CardTitleVariant]?: ConditionalValue<CardTitleVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CardTitleRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CardTitleRecipe {
|
|
|
22
21
|
variantMap: CardTitleVariantMap
|
|
23
22
|
variantKeys: Array<keyof CardTitleVariant>
|
|
24
23
|
splitVariantProps<Props extends CardTitleVariantProps>(props: Props): [CardTitleVariantProps, Pretty<DistributiveOmit<Props, keyof CardTitleVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CardTitleVariantProps) => CardTitleVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the CardTitle component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const cardTitle: CardTitleRecipe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const cardTitleFn = /* @__PURE__ */ createRecipe('cardTitle', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const cardTitleVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const cardTitleVariantKeys = Object.keys(cardTitleVariantMap)
|
|
9
9
|
|
|
10
|
-
export const cardTitle = /* @__PURE__ */ Object.assign(cardTitleFn, {
|
|
10
|
+
export const cardTitle = /* @__PURE__ */ Object.assign(memo(cardTitleFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'cardTitle',
|
|
13
|
+
__getCompoundVariantCss__: cardTitleFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: cardTitleVariantKeys,
|
|
15
16
|
variantMap: cardTitleVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, cardTitleVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: cardTitleFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CardVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CardVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CardVariantProps = {
|
|
15
|
-
[key in keyof CardVariant]?: ConditionalValue<CardVariant[key]>
|
|
14
|
+
[key in keyof CardVariant]?: ConditionalValue<CardVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CardRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CardRecipe {
|
|
|
22
21
|
variantMap: CardVariantMap
|
|
23
22
|
variantKeys: Array<keyof CardVariant>
|
|
24
23
|
splitVariantProps<Props extends CardVariantProps>(props: Props): [CardVariantProps, Pretty<DistributiveOmit<Props, keyof CardVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CardVariantProps) => CardVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Card component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const card: CardRecipe
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { splitProps } from '../helpers.mjs';
|
|
2
|
-
import { createRecipe } from './create-recipe.mjs';
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const cardFn = /* @__PURE__ */ createRecipe('card', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const cardVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const cardVariantKeys = Object.keys(cardVariantMap)
|
|
9
9
|
|
|
10
|
-
export const card = /* @__PURE__ */ Object.assign(cardFn, {
|
|
10
|
+
export const card = /* @__PURE__ */ Object.assign(memo(cardFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'card',
|
|
13
|
+
__getCompoundVariantCss__: cardFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: cardVariantKeys,
|
|
15
16
|
variantMap: cardVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, cardVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: cardFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CheckboxVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CheckboxVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CheckboxVariantProps = {
|
|
15
|
-
[key in keyof CheckboxVariant]?: ConditionalValue<CheckboxVariant[key]>
|
|
14
|
+
[key in keyof CheckboxVariant]?: ConditionalValue<CheckboxVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CheckboxRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CheckboxRecipe {
|
|
|
22
21
|
variantMap: CheckboxVariantMap
|
|
23
22
|
variantKeys: Array<keyof CheckboxVariant>
|
|
24
23
|
splitVariantProps<Props extends CheckboxVariantProps>(props: Props): [CheckboxVariantProps, Pretty<DistributiveOmit<Props, keyof CheckboxVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CheckboxVariantProps) => CheckboxVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Checkbox component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const checkbox: CheckboxRecipe
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const checkboxDefaultVariants = {}
|
|
@@ -16,11 +16,12 @@ const checkboxSlotNames = [
|
|
|
16
16
|
]
|
|
17
17
|
const checkboxSlotFns = /* @__PURE__ */ checkboxSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, checkboxDefaultVariants, getSlotCompoundVariant(checkboxCompoundVariants, slotName))])
|
|
18
18
|
|
|
19
|
-
const checkboxFn = (props = {}) => {
|
|
20
|
-
return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
21
|
-
}
|
|
19
|
+
const checkboxFn = memo((props = {}) => {
|
|
20
|
+
return Object.fromEntries(checkboxSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
21
|
+
})
|
|
22
22
|
|
|
23
23
|
const checkboxVariantKeys = []
|
|
24
|
+
const getVariantProps = (variants) => ({ ...checkboxDefaultVariants, ...compact(variants) })
|
|
24
25
|
|
|
25
26
|
export const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
|
|
26
27
|
__recipe__: false,
|
|
@@ -31,4 +32,5 @@ export const checkbox = /* @__PURE__ */ Object.assign(checkboxFn, {
|
|
|
31
32
|
splitVariantProps(props) {
|
|
32
33
|
return splitProps(props, checkboxVariantKeys)
|
|
33
34
|
},
|
|
35
|
+
getVariantProps
|
|
34
36
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CollapsibleVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CollapsibleVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CollapsibleVariantProps = {
|
|
15
|
-
[key in keyof CollapsibleVariant]?: ConditionalValue<CollapsibleVariant[key]>
|
|
14
|
+
[key in keyof CollapsibleVariant]?: ConditionalValue<CollapsibleVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CollapsibleRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CollapsibleRecipe {
|
|
|
22
21
|
variantMap: CollapsibleVariantMap
|
|
23
22
|
variantKeys: Array<keyof CollapsibleVariant>
|
|
24
23
|
splitVariantProps<Props extends CollapsibleVariantProps>(props: Props): [CollapsibleVariantProps, Pretty<DistributiveOmit<Props, keyof CollapsibleVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CollapsibleVariantProps) => CollapsibleVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Collapsible component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const collapsible: CollapsibleRecipe
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const collapsibleDefaultVariants = {}
|
|
@@ -20,11 +20,12 @@ const collapsibleSlotNames = [
|
|
|
20
20
|
]
|
|
21
21
|
const collapsibleSlotFns = /* @__PURE__ */ collapsibleSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, collapsibleDefaultVariants, getSlotCompoundVariant(collapsibleCompoundVariants, slotName))])
|
|
22
22
|
|
|
23
|
-
const collapsibleFn = (props = {}) => {
|
|
24
|
-
return Object.fromEntries(collapsibleSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
25
|
-
}
|
|
23
|
+
const collapsibleFn = memo((props = {}) => {
|
|
24
|
+
return Object.fromEntries(collapsibleSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
|
+
})
|
|
26
26
|
|
|
27
27
|
const collapsibleVariantKeys = []
|
|
28
|
+
const getVariantProps = (variants) => ({ ...collapsibleDefaultVariants, ...compact(variants) })
|
|
28
29
|
|
|
29
30
|
export const collapsible = /* @__PURE__ */ Object.assign(collapsibleFn, {
|
|
30
31
|
__recipe__: false,
|
|
@@ -35,4 +36,5 @@ export const collapsible = /* @__PURE__ */ Object.assign(collapsibleFn, {
|
|
|
35
36
|
splitVariantProps(props) {
|
|
36
37
|
return splitProps(props, collapsibleVariantKeys)
|
|
37
38
|
},
|
|
39
|
+
getVariantProps
|
|
38
40
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CommandDialogVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CommandDialogVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CommandDialogVariantProps = {
|
|
15
|
-
[key in keyof CommandDialogVariant]?: ConditionalValue<CommandDialogVariant[key]>
|
|
14
|
+
[key in keyof CommandDialogVariant]?: ConditionalValue<CommandDialogVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CommandDialogRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CommandDialogRecipe {
|
|
|
22
21
|
variantMap: CommandDialogVariantMap
|
|
23
22
|
variantKeys: Array<keyof CommandDialogVariant>
|
|
24
23
|
splitVariantProps<Props extends CommandDialogVariantProps>(props: Props): [CommandDialogVariantProps, Pretty<DistributiveOmit<Props, keyof CommandDialogVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CommandDialogVariantProps) => CommandDialogVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the CommandDialog component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const commandDialog: CommandDialogRecipe
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const commandDialogDefaultVariants = {}
|
|
@@ -16,11 +16,12 @@ const commandDialogSlotNames = [
|
|
|
16
16
|
]
|
|
17
17
|
const commandDialogSlotFns = /* @__PURE__ */ commandDialogSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, commandDialogDefaultVariants, getSlotCompoundVariant(commandDialogCompoundVariants, slotName))])
|
|
18
18
|
|
|
19
|
-
const commandDialogFn = (props = {}) => {
|
|
20
|
-
return Object.fromEntries(commandDialogSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
21
|
-
}
|
|
19
|
+
const commandDialogFn = memo((props = {}) => {
|
|
20
|
+
return Object.fromEntries(commandDialogSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
21
|
+
})
|
|
22
22
|
|
|
23
23
|
const commandDialogVariantKeys = []
|
|
24
|
+
const getVariantProps = (variants) => ({ ...commandDialogDefaultVariants, ...compact(variants) })
|
|
24
25
|
|
|
25
26
|
export const commandDialog = /* @__PURE__ */ Object.assign(commandDialogFn, {
|
|
26
27
|
__recipe__: false,
|
|
@@ -31,4 +32,5 @@ export const commandDialog = /* @__PURE__ */ Object.assign(commandDialogFn, {
|
|
|
31
32
|
splitVariantProps(props) {
|
|
32
33
|
return splitProps(props, commandDialogVariantKeys)
|
|
33
34
|
},
|
|
35
|
+
getVariantProps
|
|
34
36
|
})
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { ConditionalValue } from '../types/index.d.mts';
|
|
3
|
-
import type { Pretty } from '../types/
|
|
4
|
-
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types.d.mts';
|
|
5
4
|
|
|
6
5
|
interface CommandVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CommandVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CommandVariantProps = {
|
|
15
|
-
[key in keyof CommandVariant]?: ConditionalValue<CommandVariant[key]>
|
|
14
|
+
[key in keyof CommandVariant]?: ConditionalValue<CommandVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CommandRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CommandRecipe {
|
|
|
22
21
|
variantMap: CommandVariantMap
|
|
23
22
|
variantKeys: Array<keyof CommandVariant>
|
|
24
23
|
splitVariantProps<Props extends CommandVariantProps>(props: Props): [CommandVariantProps, Pretty<DistributiveOmit<Props, keyof CommandVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CommandVariantProps) => CommandVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Command component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const command: CommandRecipe
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
2
|
import { createRecipe } from './create-recipe.mjs';
|
|
3
3
|
|
|
4
4
|
const commandDefaultVariants = {}
|
|
@@ -48,11 +48,12 @@ const commandSlotNames = [
|
|
|
48
48
|
]
|
|
49
49
|
const commandSlotFns = /* @__PURE__ */ commandSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, commandDefaultVariants, getSlotCompoundVariant(commandCompoundVariants, slotName))])
|
|
50
50
|
|
|
51
|
-
const commandFn = (props = {}) => {
|
|
52
|
-
return Object.fromEntries(commandSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
53
|
-
}
|
|
51
|
+
const commandFn = memo((props = {}) => {
|
|
52
|
+
return Object.fromEntries(commandSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
53
|
+
})
|
|
54
54
|
|
|
55
55
|
const commandVariantKeys = []
|
|
56
|
+
const getVariantProps = (variants) => ({ ...commandDefaultVariants, ...compact(variants) })
|
|
56
57
|
|
|
57
58
|
export const command = /* @__PURE__ */ Object.assign(commandFn, {
|
|
58
59
|
__recipe__: false,
|
|
@@ -63,4 +64,5 @@ export const command = /* @__PURE__ */ Object.assign(commandFn, {
|
|
|
63
64
|
splitVariantProps(props) {
|
|
64
65
|
return splitProps(props, commandVariantKeys)
|
|
65
66
|
},
|
|
67
|
+
getVariantProps
|
|
66
68
|
})
|