@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,16 +1,16 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import type { SystemStyleObject, ConditionalValue } from '../types/index.d.mts';
|
|
3
3
|
import type { Properties } from '../types/csstype.d.mts';
|
|
4
|
-
import type {
|
|
4
|
+
import type { SystemProperties } from '../types/style-props.d.mts';
|
|
5
5
|
import type { DistributiveOmit } from '../types/system-types.d.mts';
|
|
6
6
|
import type { Tokens } from '../tokens/index.d.mts';
|
|
7
7
|
|
|
8
8
|
export interface WrapProperties {
|
|
9
|
-
gap?:
|
|
10
|
-
rowGap?:
|
|
11
|
-
columnGap?:
|
|
12
|
-
align?:
|
|
13
|
-
justify?:
|
|
9
|
+
gap?: SystemProperties["gap"]
|
|
10
|
+
rowGap?: SystemProperties["gap"]
|
|
11
|
+
columnGap?: SystemProperties["gap"]
|
|
12
|
+
align?: SystemProperties["alignItems"]
|
|
13
|
+
justify?: SystemProperties["justifyContent"]
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { getPatternStyles, patternFns } from '../helpers.mjs';
|
|
2
2
|
import { css } from '../css/index.mjs';
|
|
3
3
|
|
|
4
4
|
const wrapConfig = {
|
|
@@ -16,7 +16,10 @@ transform(props) {
|
|
|
16
16
|
};
|
|
17
17
|
}}
|
|
18
18
|
|
|
19
|
-
export const getWrapStyle = (styles = {}) =>
|
|
19
|
+
export const getWrapStyle = (styles = {}) => {
|
|
20
|
+
const _styles = getPatternStyles(wrapConfig, styles)
|
|
21
|
+
return wrapConfig.transform(_styles, patternFns)
|
|
22
|
+
}
|
|
20
23
|
|
|
21
24
|
export const wrap = (styles) => css(getWrapStyle(styles))
|
|
22
25
|
wrap.raw = getWrapStyle
|
|
@@ -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 AccordionVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type AccordionVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type AccordionVariantProps = {
|
|
15
|
-
[key in keyof AccordionVariant]?: ConditionalValue<AccordionVariant[key]>
|
|
14
|
+
[key in keyof AccordionVariant]?: ConditionalValue<AccordionVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface AccordionRecipe {
|
|
@@ -22,7 +21,12 @@ export interface AccordionRecipe {
|
|
|
22
21
|
variantMap: AccordionVariantMap
|
|
23
22
|
variantKeys: Array<keyof AccordionVariant>
|
|
24
23
|
splitVariantProps<Props extends AccordionVariantProps>(props: Props): [AccordionVariantProps, Pretty<DistributiveOmit<Props, keyof AccordionVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: AccordionVariantProps) => AccordionVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Accordion component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const accordion: AccordionRecipe
|
|
@@ -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 accordionDefaultVariants = {}
|
|
@@ -28,11 +28,12 @@ const accordionSlotNames = [
|
|
|
28
28
|
]
|
|
29
29
|
const accordionSlotFns = /* @__PURE__ */ accordionSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, accordionDefaultVariants, getSlotCompoundVariant(accordionCompoundVariants, slotName))])
|
|
30
30
|
|
|
31
|
-
const accordionFn = (props = {}) => {
|
|
32
|
-
return Object.fromEntries(accordionSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
33
|
-
}
|
|
31
|
+
const accordionFn = memo((props = {}) => {
|
|
32
|
+
return Object.fromEntries(accordionSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
33
|
+
})
|
|
34
34
|
|
|
35
35
|
const accordionVariantKeys = []
|
|
36
|
+
const getVariantProps = (variants) => ({ ...accordionDefaultVariants, ...compact(variants) })
|
|
36
37
|
|
|
37
38
|
export const accordion = /* @__PURE__ */ Object.assign(accordionFn, {
|
|
38
39
|
__recipe__: false,
|
|
@@ -43,4 +44,5 @@ export const accordion = /* @__PURE__ */ Object.assign(accordionFn, {
|
|
|
43
44
|
splitVariantProps(props) {
|
|
44
45
|
return splitProps(props, accordionVariantKeys)
|
|
45
46
|
},
|
|
47
|
+
getVariantProps
|
|
46
48
|
})
|
|
@@ -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 AlertDescriptionVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type AlertDescriptionVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type AlertDescriptionVariantProps = {
|
|
15
|
-
[key in keyof AlertDescriptionVariant]?: ConditionalValue<AlertDescriptionVariant[key]>
|
|
14
|
+
[key in keyof AlertDescriptionVariant]?: ConditionalValue<AlertDescriptionVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface AlertDescriptionRecipe {
|
|
@@ -22,7 +21,12 @@ export interface AlertDescriptionRecipe {
|
|
|
22
21
|
variantMap: AlertDescriptionVariantMap
|
|
23
22
|
variantKeys: Array<keyof AlertDescriptionVariant>
|
|
24
23
|
splitVariantProps<Props extends AlertDescriptionVariantProps>(props: Props): [AlertDescriptionVariantProps, Pretty<DistributiveOmit<Props, keyof AlertDescriptionVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: AlertDescriptionVariantProps) => AlertDescriptionVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the AlertDescription component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const alertDescription: AlertDescriptionRecipe
|
|
@@ -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 alertDescriptionFn = /* @__PURE__ */ createRecipe('alertDescription', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const alertDescriptionVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const alertDescriptionVariantKeys = Object.keys(alertDescriptionVariantMap)
|
|
9
9
|
|
|
10
|
-
export const alertDescription = /* @__PURE__ */ Object.assign(alertDescriptionFn, {
|
|
10
|
+
export const alertDescription = /* @__PURE__ */ Object.assign(memo(alertDescriptionFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'alertDescription',
|
|
13
|
+
__getCompoundVariantCss__: alertDescriptionFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: alertDescriptionVariantKeys,
|
|
15
16
|
variantMap: alertDescriptionVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, alertDescriptionVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: alertDescriptionFn.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 AlertDialogVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type AlertDialogVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type AlertDialogVariantProps = {
|
|
15
|
-
[key in keyof AlertDialogVariant]?: ConditionalValue<AlertDialogVariant[key]>
|
|
14
|
+
[key in keyof AlertDialogVariant]?: ConditionalValue<AlertDialogVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface AlertDialogRecipe {
|
|
@@ -22,7 +21,12 @@ export interface AlertDialogRecipe {
|
|
|
22
21
|
variantMap: AlertDialogVariantMap
|
|
23
22
|
variantKeys: Array<keyof AlertDialogVariant>
|
|
24
23
|
splitVariantProps<Props extends AlertDialogVariantProps>(props: Props): [AlertDialogVariantProps, Pretty<DistributiveOmit<Props, keyof AlertDialogVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: AlertDialogVariantProps) => AlertDialogVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the AlertDialog component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const alertDialog: AlertDialogRecipe
|
|
@@ -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 alertDialogDefaultVariants = {}
|
|
@@ -52,11 +52,12 @@ const alertDialogSlotNames = [
|
|
|
52
52
|
]
|
|
53
53
|
const alertDialogSlotFns = /* @__PURE__ */ alertDialogSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, alertDialogDefaultVariants, getSlotCompoundVariant(alertDialogCompoundVariants, slotName))])
|
|
54
54
|
|
|
55
|
-
const alertDialogFn = (props = {}) => {
|
|
56
|
-
return Object.fromEntries(alertDialogSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
57
|
-
}
|
|
55
|
+
const alertDialogFn = memo((props = {}) => {
|
|
56
|
+
return Object.fromEntries(alertDialogSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
57
|
+
})
|
|
58
58
|
|
|
59
59
|
const alertDialogVariantKeys = []
|
|
60
|
+
const getVariantProps = (variants) => ({ ...alertDialogDefaultVariants, ...compact(variants) })
|
|
60
61
|
|
|
61
62
|
export const alertDialog = /* @__PURE__ */ Object.assign(alertDialogFn, {
|
|
62
63
|
__recipe__: false,
|
|
@@ -67,4 +68,5 @@ export const alertDialog = /* @__PURE__ */ Object.assign(alertDialogFn, {
|
|
|
67
68
|
splitVariantProps(props) {
|
|
68
69
|
return splitProps(props, alertDialogVariantKeys)
|
|
69
70
|
},
|
|
71
|
+
getVariantProps
|
|
70
72
|
})
|
|
@@ -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 AlertTitleVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type AlertTitleVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type AlertTitleVariantProps = {
|
|
15
|
-
[key in keyof AlertTitleVariant]?: ConditionalValue<AlertTitleVariant[key]>
|
|
14
|
+
[key in keyof AlertTitleVariant]?: ConditionalValue<AlertTitleVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface AlertTitleRecipe {
|
|
@@ -22,7 +21,12 @@ export interface AlertTitleRecipe {
|
|
|
22
21
|
variantMap: AlertTitleVariantMap
|
|
23
22
|
variantKeys: Array<keyof AlertTitleVariant>
|
|
24
23
|
splitVariantProps<Props extends AlertTitleVariantProps>(props: Props): [AlertTitleVariantProps, Pretty<DistributiveOmit<Props, keyof AlertTitleVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: AlertTitleVariantProps) => AlertTitleVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the AlertTitle component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const alertTitle: AlertTitleRecipe
|
|
@@ -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 alertTitleFn = /* @__PURE__ */ createRecipe('alertTitle', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const alertTitleVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const alertTitleVariantKeys = Object.keys(alertTitleVariantMap)
|
|
9
9
|
|
|
10
|
-
export const alertTitle = /* @__PURE__ */ Object.assign(alertTitleFn, {
|
|
10
|
+
export const alertTitle = /* @__PURE__ */ Object.assign(memo(alertTitleFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'alertTitle',
|
|
13
|
+
__getCompoundVariantCss__: alertTitleFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: alertTitleVariantKeys,
|
|
15
16
|
variantMap: alertTitleVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, alertTitleVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: alertTitleFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,10 +1,12 @@
|
|
|
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 AlertVariant {
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
variant: "default" | "destructive"
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
type AlertVariantMap = {
|
|
@@ -12,7 +14,7 @@ type AlertVariantMap = {
|
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export type AlertVariantProps = {
|
|
15
|
-
[key in keyof AlertVariant]?: ConditionalValue<AlertVariant[key]>
|
|
17
|
+
[key in keyof AlertVariant]?: ConditionalValue<AlertVariant[key]> | undefined
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export interface AlertRecipe {
|
|
@@ -22,7 +24,12 @@ export interface AlertRecipe {
|
|
|
22
24
|
variantMap: AlertVariantMap
|
|
23
25
|
variantKeys: Array<keyof AlertVariant>
|
|
24
26
|
splitVariantProps<Props extends AlertVariantProps>(props: Props): [AlertVariantProps, Pretty<DistributiveOmit<Props, keyof AlertVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: AlertVariantProps) => AlertVariantProps
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Styles for the Alert component
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
*/
|
|
28
35
|
export declare const alert: AlertRecipe
|
|
@@ -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 alertFn = /* @__PURE__ */ createRecipe('alert', {
|
|
5
5
|
"variant": "default"
|
|
@@ -14,13 +14,18 @@ const alertVariantMap = {
|
|
|
14
14
|
|
|
15
15
|
const alertVariantKeys = Object.keys(alertVariantMap)
|
|
16
16
|
|
|
17
|
-
export const alert = /* @__PURE__ */ Object.assign(alertFn, {
|
|
17
|
+
export const alert = /* @__PURE__ */ Object.assign(memo(alertFn.recipeFn), {
|
|
18
18
|
__recipe__: true,
|
|
19
19
|
__name__: 'alert',
|
|
20
|
+
__getCompoundVariantCss__: alertFn.__getCompoundVariantCss__,
|
|
20
21
|
raw: (props) => props,
|
|
21
22
|
variantKeys: alertVariantKeys,
|
|
22
23
|
variantMap: alertVariantMap,
|
|
24
|
+
merge(recipe) {
|
|
25
|
+
return mergeRecipes(this, recipe)
|
|
26
|
+
},
|
|
23
27
|
splitVariantProps(props) {
|
|
24
28
|
return splitProps(props, alertVariantKeys)
|
|
25
29
|
},
|
|
30
|
+
getVariantProps: alertFn.getVariantProps,
|
|
26
31
|
})
|
|
@@ -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 AvatarVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type AvatarVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type AvatarVariantProps = {
|
|
15
|
-
[key in keyof AvatarVariant]?: ConditionalValue<AvatarVariant[key]>
|
|
14
|
+
[key in keyof AvatarVariant]?: ConditionalValue<AvatarVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface AvatarRecipe {
|
|
@@ -22,7 +21,12 @@ export interface AvatarRecipe {
|
|
|
22
21
|
variantMap: AvatarVariantMap
|
|
23
22
|
variantKeys: Array<keyof AvatarVariant>
|
|
24
23
|
splitVariantProps<Props extends AvatarVariantProps>(props: Props): [AvatarVariantProps, Pretty<DistributiveOmit<Props, keyof AvatarVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: AvatarVariantProps) => AvatarVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Avatar component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const avatar: AvatarRecipe
|
|
@@ -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 avatarDefaultVariants = {}
|
|
@@ -20,11 +20,12 @@ const avatarSlotNames = [
|
|
|
20
20
|
]
|
|
21
21
|
const avatarSlotFns = /* @__PURE__ */ avatarSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, avatarDefaultVariants, getSlotCompoundVariant(avatarCompoundVariants, slotName))])
|
|
22
22
|
|
|
23
|
-
const avatarFn = (props = {}) => {
|
|
24
|
-
return Object.fromEntries(avatarSlotFns.map(([slotName, slotFn]) => [slotName, slotFn(props)]))
|
|
25
|
-
}
|
|
23
|
+
const avatarFn = memo((props = {}) => {
|
|
24
|
+
return Object.fromEntries(avatarSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
|
+
})
|
|
26
26
|
|
|
27
27
|
const avatarVariantKeys = []
|
|
28
|
+
const getVariantProps = (variants) => ({ ...avatarDefaultVariants, ...compact(variants) })
|
|
28
29
|
|
|
29
30
|
export const avatar = /* @__PURE__ */ Object.assign(avatarFn, {
|
|
30
31
|
__recipe__: false,
|
|
@@ -35,4 +36,5 @@ export const avatar = /* @__PURE__ */ Object.assign(avatarFn, {
|
|
|
35
36
|
splitVariantProps(props) {
|
|
36
37
|
return splitProps(props, avatarVariantKeys)
|
|
37
38
|
},
|
|
39
|
+
getVariantProps
|
|
38
40
|
})
|
|
@@ -1,10 +1,12 @@
|
|
|
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 BadgeVariant {
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
variant: "default" | "secondary" | "destructive" | "outline"
|
|
8
10
|
}
|
|
9
11
|
|
|
10
12
|
type BadgeVariantMap = {
|
|
@@ -12,7 +14,7 @@ type BadgeVariantMap = {
|
|
|
12
14
|
}
|
|
13
15
|
|
|
14
16
|
export type BadgeVariantProps = {
|
|
15
|
-
[key in keyof BadgeVariant]?: ConditionalValue<BadgeVariant[key]>
|
|
17
|
+
[key in keyof BadgeVariant]?: ConditionalValue<BadgeVariant[key]> | undefined
|
|
16
18
|
}
|
|
17
19
|
|
|
18
20
|
export interface BadgeRecipe {
|
|
@@ -22,7 +24,12 @@ export interface BadgeRecipe {
|
|
|
22
24
|
variantMap: BadgeVariantMap
|
|
23
25
|
variantKeys: Array<keyof BadgeVariant>
|
|
24
26
|
splitVariantProps<Props extends BadgeVariantProps>(props: Props): [BadgeVariantProps, Pretty<DistributiveOmit<Props, keyof BadgeVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: BadgeVariantProps) => BadgeVariantProps
|
|
25
28
|
}
|
|
26
29
|
|
|
27
|
-
/**
|
|
30
|
+
/**
|
|
31
|
+
* Styles for the Badge component
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
*/
|
|
28
35
|
export declare const badge: BadgeRecipe
|
|
@@ -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 badgeFn = /* @__PURE__ */ createRecipe('badge', {
|
|
5
5
|
"variant": "default"
|
|
@@ -16,13 +16,18 @@ const badgeVariantMap = {
|
|
|
16
16
|
|
|
17
17
|
const badgeVariantKeys = Object.keys(badgeVariantMap)
|
|
18
18
|
|
|
19
|
-
export const badge = /* @__PURE__ */ Object.assign(badgeFn, {
|
|
19
|
+
export const badge = /* @__PURE__ */ Object.assign(memo(badgeFn.recipeFn), {
|
|
20
20
|
__recipe__: true,
|
|
21
21
|
__name__: 'badge',
|
|
22
|
+
__getCompoundVariantCss__: badgeFn.__getCompoundVariantCss__,
|
|
22
23
|
raw: (props) => props,
|
|
23
24
|
variantKeys: badgeVariantKeys,
|
|
24
25
|
variantMap: badgeVariantMap,
|
|
26
|
+
merge(recipe) {
|
|
27
|
+
return mergeRecipes(this, recipe)
|
|
28
|
+
},
|
|
25
29
|
splitVariantProps(props) {
|
|
26
30
|
return splitProps(props, badgeVariantKeys)
|
|
27
31
|
},
|
|
32
|
+
getVariantProps: badgeFn.getVariantProps,
|
|
28
33
|
})
|
|
@@ -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 BlockquoteVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type BlockquoteVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type BlockquoteVariantProps = {
|
|
15
|
-
[key in keyof BlockquoteVariant]?: ConditionalValue<BlockquoteVariant[key]>
|
|
14
|
+
[key in keyof BlockquoteVariant]?: ConditionalValue<BlockquoteVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface BlockquoteRecipe {
|
|
@@ -22,7 +21,12 @@ export interface BlockquoteRecipe {
|
|
|
22
21
|
variantMap: BlockquoteVariantMap
|
|
23
22
|
variantKeys: Array<keyof BlockquoteVariant>
|
|
24
23
|
splitVariantProps<Props extends BlockquoteVariantProps>(props: Props): [BlockquoteVariantProps, Pretty<DistributiveOmit<Props, keyof BlockquoteVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: BlockquoteVariantProps) => BlockquoteVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Typography - blockquote style
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const blockquote: BlockquoteRecipe
|
|
@@ -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 blockquoteFn = /* @__PURE__ */ createRecipe('blockquote', {}, [])
|
|
5
5
|
|
|
@@ -7,13 +7,18 @@ const blockquoteVariantMap = {}
|
|
|
7
7
|
|
|
8
8
|
const blockquoteVariantKeys = Object.keys(blockquoteVariantMap)
|
|
9
9
|
|
|
10
|
-
export const blockquote = /* @__PURE__ */ Object.assign(blockquoteFn, {
|
|
10
|
+
export const blockquote = /* @__PURE__ */ Object.assign(memo(blockquoteFn.recipeFn), {
|
|
11
11
|
__recipe__: true,
|
|
12
12
|
__name__: 'blockquote',
|
|
13
|
+
__getCompoundVariantCss__: blockquoteFn.__getCompoundVariantCss__,
|
|
13
14
|
raw: (props) => props,
|
|
14
15
|
variantKeys: blockquoteVariantKeys,
|
|
15
16
|
variantMap: blockquoteVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
16
20
|
splitVariantProps(props) {
|
|
17
21
|
return splitProps(props, blockquoteVariantKeys)
|
|
18
22
|
},
|
|
23
|
+
getVariantProps: blockquoteFn.getVariantProps,
|
|
19
24
|
})
|
|
@@ -1,10 +1,15 @@
|
|
|
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 ButtonVariant {
|
|
7
|
-
|
|
6
|
+
/**
|
|
7
|
+
* @default "default"
|
|
8
|
+
*/
|
|
9
|
+
variant: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link"
|
|
10
|
+
/**
|
|
11
|
+
* @default "default"
|
|
12
|
+
*/
|
|
8
13
|
size: "default" | "sm" | "lg" | "icon"
|
|
9
14
|
}
|
|
10
15
|
|
|
@@ -13,7 +18,7 @@ type ButtonVariantMap = {
|
|
|
13
18
|
}
|
|
14
19
|
|
|
15
20
|
export type ButtonVariantProps = {
|
|
16
|
-
[key in keyof ButtonVariant]?: ConditionalValue<ButtonVariant[key]>
|
|
21
|
+
[key in keyof ButtonVariant]?: ConditionalValue<ButtonVariant[key]> | undefined
|
|
17
22
|
}
|
|
18
23
|
|
|
19
24
|
export interface ButtonRecipe {
|
|
@@ -23,7 +28,12 @@ export interface ButtonRecipe {
|
|
|
23
28
|
variantMap: ButtonVariantMap
|
|
24
29
|
variantKeys: Array<keyof ButtonVariant>
|
|
25
30
|
splitVariantProps<Props extends ButtonVariantProps>(props: Props): [ButtonVariantProps, Pretty<DistributiveOmit<Props, keyof ButtonVariantProps>>]
|
|
31
|
+
getVariantProps: (props?: ButtonVariantProps) => ButtonVariantProps
|
|
26
32
|
}
|
|
27
33
|
|
|
28
|
-
/**
|
|
34
|
+
/**
|
|
35
|
+
* Styles for the Button component
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
*/
|
|
29
39
|
export declare const button: ButtonRecipe
|
|
@@ -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 buttonFn = /* @__PURE__ */ createRecipe('button', {
|
|
5
5
|
"variant": "default",
|
|
@@ -25,13 +25,18 @@ const buttonVariantMap = {
|
|
|
25
25
|
|
|
26
26
|
const buttonVariantKeys = Object.keys(buttonVariantMap)
|
|
27
27
|
|
|
28
|
-
export const button = /* @__PURE__ */ Object.assign(buttonFn, {
|
|
28
|
+
export const button = /* @__PURE__ */ Object.assign(memo(buttonFn.recipeFn), {
|
|
29
29
|
__recipe__: true,
|
|
30
30
|
__name__: 'button',
|
|
31
|
+
__getCompoundVariantCss__: buttonFn.__getCompoundVariantCss__,
|
|
31
32
|
raw: (props) => props,
|
|
32
33
|
variantKeys: buttonVariantKeys,
|
|
33
34
|
variantMap: buttonVariantMap,
|
|
35
|
+
merge(recipe) {
|
|
36
|
+
return mergeRecipes(this, recipe)
|
|
37
|
+
},
|
|
34
38
|
splitVariantProps(props) {
|
|
35
39
|
return splitProps(props, buttonVariantKeys)
|
|
36
40
|
},
|
|
41
|
+
getVariantProps: buttonFn.getVariantProps,
|
|
37
42
|
})
|
|
@@ -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 CalendarVariant {
|
|
7
6
|
|
|
@@ -12,7 +11,7 @@ type CalendarVariantMap = {
|
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export type CalendarVariantProps = {
|
|
15
|
-
[key in keyof CalendarVariant]?: ConditionalValue<CalendarVariant[key]>
|
|
14
|
+
[key in keyof CalendarVariant]?: ConditionalValue<CalendarVariant[key]> | undefined
|
|
16
15
|
}
|
|
17
16
|
|
|
18
17
|
export interface CalendarRecipe {
|
|
@@ -22,7 +21,12 @@ export interface CalendarRecipe {
|
|
|
22
21
|
variantMap: CalendarVariantMap
|
|
23
22
|
variantKeys: Array<keyof CalendarVariant>
|
|
24
23
|
splitVariantProps<Props extends CalendarVariantProps>(props: Props): [CalendarVariantProps, Pretty<DistributiveOmit<Props, keyof CalendarVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: CalendarVariantProps) => CalendarVariantProps
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* Styles for the Calendar component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
28
32
|
export declare const calendar: CalendarRecipe
|