@stokelp/styled-system 2.127.0 → 3.0.1
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/css/conditions.d.ts +7 -0
- package/css/conditions.js +32 -0
- package/css/css.d.ts +6 -6
- package/css/css.js +63 -0
- package/css/cva.d.ts +3 -4
- package/css/cva.js +51 -0
- package/css/cx.d.ts +5 -4
- package/css/{cx.mjs → cx.js} +5 -4
- package/css/first-that-works.d.ts +22 -0
- package/css/first-that-works.js +1 -0
- package/css/index.d.ts +8 -5
- package/css/index.js +8 -0
- package/css/keyframes.d.ts +5 -0
- package/css/keyframes.js +8 -0
- package/css/position-try.d.ts +5 -0
- package/css/position-try.js +11 -0
- package/css/sva.d.ts +2 -3
- package/css/sva.js +49 -0
- package/css/view-transition.d.ts +7 -0
- package/css/view-transition.js +18 -0
- package/dist/panda/buildinfo.json +20580 -0
- package/dist/panda/lib.json +15 -0
- package/dist/panda/preset.mjs +9505 -0
- package/helpers.d.ts +67 -0
- package/helpers.js +624 -0
- package/jsx/aspect-ratio.d.ts +5 -8
- package/jsx/aspect-ratio.js +11 -0
- package/jsx/bleed.d.ts +6 -9
- package/jsx/bleed.js +11 -0
- package/jsx/box.d.ts +6 -9
- package/jsx/box.js +11 -0
- package/jsx/center.d.ts +6 -9
- package/jsx/center.js +11 -0
- package/jsx/circle.d.ts +6 -9
- package/jsx/circle.js +11 -0
- package/jsx/container.d.ts +6 -9
- package/jsx/container.js +11 -0
- package/jsx/cq.d.ts +6 -9
- package/jsx/cq.js +11 -0
- package/jsx/create-recipe-context.d.ts +31 -0
- package/jsx/create-recipe-context.js +38 -0
- package/jsx/create-slot-recipe-context.d.ts +49 -0
- package/jsx/create-slot-recipe-context.js +124 -0
- package/jsx/divider.d.ts +6 -9
- package/jsx/divider.js +11 -0
- package/jsx/factory.d.ts +3 -3
- package/jsx/factory.js +91 -0
- package/jsx/flex.d.ts +6 -9
- package/jsx/flex.js +11 -0
- package/jsx/float.d.ts +6 -9
- package/jsx/float.js +11 -0
- package/jsx/grid-item.d.ts +6 -9
- package/jsx/grid-item.js +11 -0
- package/jsx/grid.d.ts +6 -9
- package/jsx/grid.js +11 -0
- package/jsx/helper.d.ts +34 -0
- package/jsx/helper.js +92 -0
- package/jsx/hstack.d.ts +6 -9
- package/jsx/hstack.js +11 -0
- package/jsx/index.d.ts +25 -25
- package/jsx/index.js +24 -0
- package/jsx/is-valid-prop.d.ts +5 -10
- package/jsx/is-valid-prop.js +12 -0
- package/jsx/link-overlay.d.ts +6 -9
- package/jsx/link-overlay.js +11 -0
- package/jsx/spacer.d.ts +6 -9
- package/jsx/spacer.js +11 -0
- package/jsx/square.d.ts +6 -9
- package/jsx/square.js +11 -0
- package/jsx/stack.d.ts +6 -9
- package/jsx/stack.js +11 -0
- package/jsx/visually-hidden.d.ts +6 -9
- package/jsx/visually-hidden.js +11 -0
- package/jsx/vstack.d.ts +6 -9
- package/jsx/vstack.js +11 -0
- package/jsx/wrap.d.ts +6 -9
- package/jsx/wrap.js +11 -0
- package/package.json +32 -18
- package/patterns/aspect-ratio.d.ts +8 -9
- package/patterns/aspect-ratio.js +37 -0
- package/patterns/bleed.d.ts +9 -10
- package/patterns/bleed.js +30 -0
- package/patterns/box.d.ts +8 -11
- package/patterns/box.js +16 -0
- package/patterns/center.d.ts +8 -9
- package/patterns/center.js +22 -0
- package/patterns/circle.d.ts +8 -9
- package/patterns/circle.js +26 -0
- package/patterns/container.d.ts +8 -11
- package/patterns/container.js +26 -0
- package/patterns/cq.d.ts +10 -10
- package/patterns/cq.js +24 -0
- package/patterns/divider.d.ts +11 -11
- package/patterns/divider.js +31 -0
- package/patterns/flex.d.ts +14 -15
- package/patterns/flex.js +27 -0
- package/patterns/float.d.ts +12 -12
- package/patterns/float.js +78 -0
- package/patterns/grid-item.d.ts +13 -14
- package/patterns/grid-item.js +26 -0
- package/patterns/grid.d.ts +13 -13
- package/patterns/grid.js +30 -0
- package/patterns/hstack.d.ts +9 -10
- package/patterns/hstack.js +27 -0
- package/patterns/index.d.ts +20 -21
- package/patterns/index.js +20 -0
- package/patterns/link-overlay.d.ts +8 -11
- package/patterns/link-overlay.js +25 -0
- package/patterns/runtime.js +25 -0
- package/patterns/spacer.d.ts +9 -9
- package/patterns/spacer.js +25 -0
- package/patterns/square.d.ts +8 -9
- package/patterns/square.js +25 -0
- package/patterns/stack.d.ts +11 -12
- package/patterns/stack.js +30 -0
- package/patterns/visually-hidden.d.ts +8 -11
- package/patterns/visually-hidden.js +19 -0
- package/patterns/vstack.d.ts +9 -10
- package/patterns/vstack.js +27 -0
- package/patterns/wrap.d.ts +12 -13
- package/patterns/wrap.js +26 -0
- package/recipes/accordion.d.ts +10 -26
- package/recipes/accordion.js +5 -0
- package/recipes/action-card.d.ts +9 -26
- package/recipes/action-card.js +5 -0
- package/recipes/alert.d.ts +10 -28
- package/recipes/alert.js +5 -0
- package/recipes/app-navigation-language-select.d.ts +12 -34
- package/recipes/app-navigation-language-select.js +5 -0
- package/recipes/app-navigation.d.ts +10 -28
- package/recipes/app-navigation.js +5 -0
- package/recipes/avatar-group.d.ts +8 -26
- package/recipes/avatar-group.js +5 -0
- package/recipes/avatar.d.ts +11 -30
- package/recipes/avatar.js +5 -0
- package/recipes/breadcrumb.d.ts +9 -24
- package/recipes/breadcrumb.js +5 -0
- package/recipes/button-filter.d.ts +8 -27
- package/recipes/button-filter.js +5 -0
- package/recipes/button.d.ts +10 -37
- package/recipes/button.js +5 -0
- package/recipes/chat-document-message.d.ts +8 -27
- package/recipes/chat-document-message.js +5 -0
- package/recipes/chat-message.d.ts +10 -33
- package/recipes/chat-message.js +5 -0
- package/recipes/chat-profile-avatar.d.ts +9 -29
- package/recipes/chat-profile-avatar.js +5 -0
- package/recipes/chat-text-input.d.ts +8 -27
- package/recipes/chat-text-input.js +5 -0
- package/recipes/chat.d.ts +9 -26
- package/recipes/chat.js +5 -0
- package/recipes/checkbox-card.d.ts +10 -26
- package/recipes/checkbox-card.js +5 -0
- package/recipes/checkbox-group.d.ts +7 -24
- package/recipes/checkbox-group.js +5 -0
- package/recipes/checkbox.d.ts +10 -26
- package/recipes/checkbox.js +5 -0
- package/recipes/chip.d.ts +11 -32
- package/recipes/chip.js +5 -0
- package/recipes/collapsible.d.ts +9 -24
- package/recipes/collapsible.js +5 -0
- package/recipes/combobox.d.ts +11 -27
- package/recipes/combobox.js +5 -0
- package/recipes/datepicker.d.ts +9 -24
- package/recipes/datepicker.js +5 -0
- package/recipes/dialog.d.ts +9 -24
- package/recipes/dialog.js +5 -0
- package/recipes/drawer.d.ts +10 -26
- package/recipes/drawer.js +5 -0
- package/recipes/flag.d.ts +8 -26
- package/recipes/flag.js +5 -0
- package/recipes/form-control.d.ts +8 -27
- package/recipes/form-control.js +5 -0
- package/recipes/form-helper-text.d.ts +8 -27
- package/recipes/form-helper-text.js +5 -0
- package/recipes/form-label.d.ts +10 -28
- package/recipes/form-label.js +5 -0
- package/recipes/heading.d.ts +10 -28
- package/recipes/heading.js +5 -0
- package/recipes/highlighted-input.d.ts +9 -26
- package/recipes/highlighted-input.js +5 -0
- package/recipes/icon-button.d.ts +10 -37
- package/recipes/icon-button.js +5 -0
- package/recipes/icon.d.ts +8 -26
- package/recipes/icon.js +5 -0
- package/recipes/illustration.d.ts +9 -29
- package/recipes/illustration.js +5 -0
- package/recipes/index.d.ts +62 -63
- package/recipes/index.js +62 -0
- package/recipes/input-addon.d.ts +8 -27
- package/recipes/input-addon.js +5 -0
- package/recipes/input-group.d.ts +8 -27
- package/recipes/input-group.js +5 -0
- package/recipes/input.d.ts +9 -29
- package/recipes/input.js +5 -0
- package/recipes/menu.d.ts +10 -26
- package/recipes/menu.js +5 -0
- package/recipes/mobile-navigation.d.ts +10 -28
- package/recipes/mobile-navigation.js +5 -0
- package/recipes/pagination.d.ts +9 -26
- package/recipes/pagination.js +5 -0
- package/recipes/phone-number-input.d.ts +9 -29
- package/recipes/phone-number-input.js +5 -0
- package/recipes/popover.d.ts +9 -24
- package/recipes/popover.js +5 -0
- package/recipes/price-tag.d.ts +10 -26
- package/recipes/price-tag.js +5 -0
- package/recipes/product-card-catalog.d.ts +9 -26
- package/recipes/product-card-catalog.js +5 -0
- package/recipes/radio-button-group.d.ts +10 -26
- package/recipes/radio-button-group.js +5 -0
- package/recipes/radio-card-group.d.ts +10 -26
- package/recipes/radio-card-group.js +5 -0
- package/recipes/radio-group.d.ts +10 -26
- package/recipes/radio-group.js +5 -0
- package/recipes/runtime.js +133 -0
- package/recipes/select-language.d.ts +10 -26
- package/recipes/select-language.js +5 -0
- package/recipes/select.d.ts +11 -27
- package/recipes/select.js +5 -0
- package/recipes/status-tag-select.d.ts +11 -30
- package/recipes/status-tag-select.js +5 -0
- package/recipes/steps.d.ts +9 -24
- package/recipes/steps.js +5 -0
- package/recipes/switch-card.d.ts +10 -26
- package/recipes/switch-card.js +5 -0
- package/recipes/switch-recipe.d.ts +10 -26
- package/recipes/switch-recipe.js +5 -0
- package/recipes/table-container.d.ts +7 -24
- package/recipes/table-container.js +5 -0
- package/recipes/table-empty-row.d.ts +7 -24
- package/recipes/table-empty-row.js +5 -0
- package/recipes/table-group-title.d.ts +8 -26
- package/recipes/table-group-title.js +5 -0
- package/recipes/table.d.ts +9 -24
- package/recipes/table.js +5 -0
- package/recipes/tabs-chip.d.ts +9 -29
- package/recipes/tabs-chip.js +5 -0
- package/recipes/tabs.d.ts +11 -30
- package/recipes/tabs.js +5 -0
- package/recipes/tag.d.ts +11 -32
- package/recipes/tag.js +5 -0
- package/recipes/text.d.ts +12 -30
- package/recipes/text.js +5 -0
- package/recipes/textarea.d.ts +7 -24
- package/recipes/textarea.js +5 -0
- package/recipes/tooltip.d.ts +9 -24
- package/recipes/tooltip.js +5 -0
- package/tokens/index.d.ts +4 -5
- package/tokens/index.js +18 -0
- package/types/index.d.ts +6 -8
- package/types/jsx.d.ts +37 -28
- package/types/pattern.d.ts +18 -70
- package/types/recipe.d.ts +58 -150
- package/types/register.d.ts +40 -0
- package/types/system.d.ts +1816 -0
- package/types/tokens.d.ts +72 -0
- package/css/conditions.mjs +0 -36
- package/css/css.mjs +0 -45
- package/css/cva.mjs +0 -87
- package/css/index.mjs +0 -4
- package/css/sva.mjs +0 -46
- package/helpers.mjs +0 -328
- package/jsx/aspect-ratio.mjs +0 -14
- package/jsx/bleed.mjs +0 -14
- package/jsx/box.mjs +0 -14
- package/jsx/center.mjs +0 -14
- package/jsx/circle.mjs +0 -14
- package/jsx/container.mjs +0 -14
- package/jsx/cq.mjs +0 -14
- package/jsx/create-style-context.d.ts +0 -54
- package/jsx/create-style-context.mjs +0 -118
- package/jsx/divider.mjs +0 -14
- package/jsx/factory-helper.mjs +0 -22
- package/jsx/factory.mjs +0 -89
- package/jsx/flex.mjs +0 -14
- package/jsx/float.mjs +0 -14
- package/jsx/grid-item.mjs +0 -14
- package/jsx/grid.mjs +0 -14
- package/jsx/hstack.mjs +0 -14
- package/jsx/index.mjs +0 -23
- package/jsx/is-valid-prop.mjs +0 -17
- package/jsx/link-overlay.mjs +0 -14
- package/jsx/spacer.mjs +0 -14
- package/jsx/square.mjs +0 -14
- package/jsx/stack.mjs +0 -14
- package/jsx/visually-hidden.mjs +0 -14
- package/jsx/vstack.mjs +0 -14
- package/jsx/wrap.mjs +0 -14
- package/panda.buildinfo.json +0 -471
- package/patterns/aspect-ratio.mjs +0 -38
- package/patterns/bleed.mjs +0 -24
- package/patterns/box.mjs +0 -15
- package/patterns/center.mjs +0 -21
- package/patterns/circle.mjs +0 -25
- package/patterns/container.mjs +0 -21
- package/patterns/cq.mjs +0 -21
- package/patterns/divider.mjs +0 -25
- package/patterns/flex.mjs +0 -26
- package/patterns/float.mjs +0 -52
- package/patterns/grid-item.mjs +0 -25
- package/patterns/grid.mjs +0 -27
- package/patterns/hstack.mjs +0 -24
- package/patterns/index.mjs +0 -20
- package/patterns/link-overlay.mjs +0 -24
- package/patterns/spacer.mjs +0 -25
- package/patterns/square.mjs +0 -24
- package/patterns/stack.mjs +0 -24
- package/patterns/visually-hidden.mjs +0 -18
- package/patterns/vstack.mjs +0 -24
- package/patterns/wrap.mjs +0 -25
- package/recipes/accordion.mjs +0 -57
- package/recipes/action-card.mjs +0 -45
- package/recipes/alert.mjs +0 -57
- package/recipes/app-navigation-language-select.mjs +0 -109
- package/recipes/app-navigation.mjs +0 -84
- package/recipes/avatar-group.mjs +0 -32
- package/recipes/avatar.mjs +0 -57
- package/recipes/breadcrumb.mjs +0 -45
- package/recipes/button-filter.mjs +0 -24
- package/recipes/button.mjs +0 -212
- package/recipes/chat-document-message.mjs +0 -24
- package/recipes/chat-message.mjs +0 -36
- package/recipes/chat-profile-avatar.mjs +0 -31
- package/recipes/chat-text-input.mjs +0 -24
- package/recipes/chat.mjs +0 -45
- package/recipes/checkbox-card.mjs +0 -73
- package/recipes/checkbox-group.mjs +0 -24
- package/recipes/checkbox.mjs +0 -57
- package/recipes/chip.mjs +0 -76
- package/recipes/collapsible.mjs +0 -45
- package/recipes/combobox.mjs +0 -101
- package/recipes/create-recipe.mjs +0 -82
- package/recipes/datepicker.mjs +0 -133
- package/recipes/dialog.mjs +0 -69
- package/recipes/drawer.mjs +0 -78
- package/recipes/flag.mjs +0 -33
- package/recipes/form-control.mjs +0 -24
- package/recipes/form-helper-text.mjs +0 -24
- package/recipes/form-label.mjs +0 -50
- package/recipes/heading.mjs +0 -41
- package/recipes/highlighted-input.mjs +0 -45
- package/recipes/icon-button.mjs +0 -233
- package/recipes/icon.mjs +0 -34
- package/recipes/illustration.mjs +0 -37
- package/recipes/index.mjs +0 -62
- package/recipes/input-addon.mjs +0 -24
- package/recipes/input-group.mjs +0 -24
- package/recipes/input.mjs +0 -30
- package/recipes/menu.mjs +0 -93
- package/recipes/mobile-navigation.mjs +0 -56
- package/recipes/pagination.mjs +0 -41
- package/recipes/phone-number-input.mjs +0 -30
- package/recipes/popover.mjs +0 -69
- package/recipes/price-tag.mjs +0 -51
- package/recipes/product-card-catalog.mjs +0 -73
- package/recipes/radio-button-group.mjs +0 -62
- package/recipes/radio-card-group.mjs +0 -77
- package/recipes/radio-group.mjs +0 -61
- package/recipes/select-language.mjs +0 -98
- package/recipes/select.mjs +0 -101
- package/recipes/status-tag-select.mjs +0 -108
- package/recipes/steps.mjs +0 -69
- package/recipes/switch-card.mjs +0 -69
- package/recipes/switch-recipe.mjs +0 -53
- package/recipes/table-container.mjs +0 -24
- package/recipes/table-empty-row.mjs +0 -24
- package/recipes/table-group-title.mjs +0 -32
- package/recipes/table.mjs +0 -61
- package/recipes/tabs-chip.mjs +0 -35
- package/recipes/tabs.mjs +0 -63
- package/recipes/tag.mjs +0 -61
- package/recipes/text.mjs +0 -41
- package/recipes/textarea.mjs +0 -24
- package/recipes/tooltip.mjs +0 -49
- package/tokens/index.mjs +0 -1728
- package/tokens/tokens.d.ts +0 -63
- package/types/composition.d.ts +0 -227
- package/types/conditions.d.ts +0 -300
- package/types/csstype.d.ts +0 -22570
- package/types/global.d.ts +0 -20
- package/types/parts.d.ts +0 -8
- package/types/prop-type.d.ts +0 -251
- package/types/selectors.d.ts +0 -59
- package/types/static-css.d.ts +0 -56
- package/types/style-props.d.ts +0 -8089
- package/types/system-types.d.ts +0 -151
package/recipes/popover.d.ts
CHANGED
|
@@ -1,31 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type PopoverVariantMap = {
|
|
10
|
-
[key in keyof PopoverVariant]: Array<PopoverVariant[key]>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
type PopoverSlot = "arrow" | "arrowTip" | "anchor" | "trigger" | "indicator" | "positioner" | "content" | "title" | "description" | "closeTrigger"
|
|
4
|
+
export type PopoverVariant = {}
|
|
14
5
|
|
|
15
6
|
export type PopoverVariantProps = {
|
|
16
|
-
[
|
|
7
|
+
[K in keyof PopoverVariant]?: ConditionalValue<PopoverVariant[K]>
|
|
17
8
|
}
|
|
18
9
|
|
|
19
|
-
export
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
(props?: PopoverVariantProps): Pretty<Record<PopoverSlot, string>>
|
|
23
|
-
raw: (props?: PopoverVariantProps) => PopoverVariantProps
|
|
24
|
-
variantMap: PopoverVariantMap
|
|
25
|
-
variantKeys: Array<keyof PopoverVariant>
|
|
26
|
-
splitVariantProps<Props extends PopoverVariantProps>(props: Props): [PopoverVariantProps, Pretty<DistributiveOmit<Props, keyof PopoverVariantProps>>]
|
|
27
|
-
getVariantProps: (props?: PopoverVariantProps) => PopoverVariantProps
|
|
28
|
-
}
|
|
10
|
+
export type PopoverVariantMap = RecipeVariantMap<PopoverVariant>
|
|
11
|
+
|
|
12
|
+
export type PopoverSlot = "arrow" | "arrowTip" | "anchor" | "trigger" | "indicator" | "positioner" | "content" | "title" | "description" | "closeTrigger"
|
|
29
13
|
|
|
14
|
+
export type PopoverRecipe = ConfigSlotRecipeRuntimeFn<PopoverSlot, PopoverVariantProps, PopoverVariantMap>
|
|
30
15
|
|
|
31
|
-
export declare const popover: PopoverRecipe
|
|
16
|
+
export declare const popover: PopoverRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const popoverConfig = {"name":"popover","slots":["arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"]}
|
|
4
|
+
|
|
5
|
+
export const popover = /* @__PURE__ */ createSlotRecipe(popoverConfig)
|
package/recipes/price-tag.d.ts
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @default "md"
|
|
8
|
-
*/
|
|
9
|
-
size: "lg" | "md" | "sm"
|
|
4
|
+
export type PriceTagVariant = {
|
|
5
|
+
size?: "lg" | "md" | "sm"
|
|
10
6
|
}
|
|
11
7
|
|
|
12
|
-
type PriceTagVariantMap = {
|
|
13
|
-
[key in keyof PriceTagVariant]: Array<PriceTagVariant[key]>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type PriceTagSlot = "root" | "price" | "unit"
|
|
17
|
-
|
|
18
8
|
export type PriceTagVariantProps = {
|
|
19
|
-
[
|
|
9
|
+
[K in keyof PriceTagVariant]?: ConditionalValue<PriceTagVariant[K]>
|
|
20
10
|
}
|
|
21
11
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(props?: PriceTagVariantProps): Pretty<Record<PriceTagSlot, string>>
|
|
26
|
-
raw: (props?: PriceTagVariantProps) => PriceTagVariantProps
|
|
27
|
-
variantMap: PriceTagVariantMap
|
|
28
|
-
variantKeys: Array<keyof PriceTagVariant>
|
|
29
|
-
splitVariantProps<Props extends PriceTagVariantProps>(props: Props): [PriceTagVariantProps, Pretty<DistributiveOmit<Props, keyof PriceTagVariantProps>>]
|
|
30
|
-
getVariantProps: (props?: PriceTagVariantProps) => PriceTagVariantProps
|
|
31
|
-
}
|
|
12
|
+
export type PriceTagVariantMap = RecipeVariantMap<PriceTagVariant>
|
|
13
|
+
|
|
14
|
+
export type PriceTagSlot = "root" | "price" | "unit"
|
|
32
15
|
|
|
16
|
+
export type PriceTagRecipe = ConfigSlotRecipeRuntimeFn<PriceTagSlot, PriceTagVariantProps, PriceTagVariantMap>
|
|
33
17
|
|
|
34
|
-
export declare const priceTag: PriceTagRecipe
|
|
18
|
+
export declare const priceTag: PriceTagRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const priceTagConfig = {"name":"priceTag","className":"price-tag","slots":["root","price","unit"],"defaultVariants":{"size":"md"},"variantMap":{"size":["lg","md","sm"]}}
|
|
4
|
+
|
|
5
|
+
export const priceTag = /* @__PURE__ */ createSlotRecipe(priceTagConfig)
|
|
@@ -1,33 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
4
|
+
export type ProductCardCatalogVariant = {}
|
|
8
5
|
|
|
9
|
-
type
|
|
10
|
-
[
|
|
6
|
+
export type ProductCardCatalogVariantProps = {
|
|
7
|
+
[K in keyof ProductCardCatalogVariant]?: ConditionalValue<ProductCardCatalogVariant[K]>
|
|
11
8
|
}
|
|
12
9
|
|
|
13
|
-
type
|
|
10
|
+
export type ProductCardCatalogVariantMap = RecipeVariantMap<ProductCardCatalogVariant>
|
|
14
11
|
|
|
15
|
-
export type
|
|
16
|
-
[key in keyof ProductCardCatalogVariant]?: ConditionalValue<ProductCardCatalogVariant[key]> | undefined
|
|
17
|
-
}
|
|
12
|
+
export type ProductCardCatalogSlot = "root" | "title" | "image" | "imageContainer" | "content" | "description" | "highlight" | "tag" | "badgeList" | "badge" | "shortLivedTag"
|
|
18
13
|
|
|
19
|
-
export
|
|
20
|
-
__slot: ProductCardCatalogSlot
|
|
21
|
-
__type: ProductCardCatalogVariantProps
|
|
22
|
-
(props?: ProductCardCatalogVariantProps): Pretty<Record<ProductCardCatalogSlot, string>>
|
|
23
|
-
raw: (props?: ProductCardCatalogVariantProps) => ProductCardCatalogVariantProps
|
|
24
|
-
variantMap: ProductCardCatalogVariantMap
|
|
25
|
-
variantKeys: Array<keyof ProductCardCatalogVariant>
|
|
26
|
-
splitVariantProps<Props extends ProductCardCatalogVariantProps>(props: Props): [ProductCardCatalogVariantProps, Pretty<DistributiveOmit<Props, keyof ProductCardCatalogVariantProps>>]
|
|
27
|
-
getVariantProps: (props?: ProductCardCatalogVariantProps) => ProductCardCatalogVariantProps
|
|
28
|
-
}
|
|
14
|
+
export type ProductCardCatalogRecipe = ConfigSlotRecipeRuntimeFn<ProductCardCatalogSlot, ProductCardCatalogVariantProps, ProductCardCatalogVariantMap>
|
|
29
15
|
|
|
30
|
-
|
|
31
|
-
* The styles for the ProductCardCatalog component
|
|
32
|
-
*/
|
|
33
|
-
export declare const productCardCatalog: ProductCardCatalogRecipe
|
|
16
|
+
export declare const productCardCatalog: ProductCardCatalogRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const productCardCatalogConfig = {"name":"productCardCatalog","className":"product-card-catalog","slots":["root","title","image","imageContainer","content","description","highlight","tag","badgeList","badge","shortLivedTag"]}
|
|
4
|
+
|
|
5
|
+
export const productCardCatalog = /* @__PURE__ */ createSlotRecipe(productCardCatalogConfig)
|
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @default "md"
|
|
8
|
-
*/
|
|
9
|
-
size: "sm" | "md"
|
|
4
|
+
export type RadioButtonGroupVariant = {
|
|
5
|
+
size?: "sm" | "md"
|
|
10
6
|
}
|
|
11
7
|
|
|
12
|
-
type RadioButtonGroupVariantMap = {
|
|
13
|
-
[key in keyof RadioButtonGroupVariant]: Array<RadioButtonGroupVariant[key]>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type RadioButtonGroupSlot = "root" | "label" | "item" | "itemText" | "itemControl" | "indicator"
|
|
17
|
-
|
|
18
8
|
export type RadioButtonGroupVariantProps = {
|
|
19
|
-
[
|
|
9
|
+
[K in keyof RadioButtonGroupVariant]?: ConditionalValue<RadioButtonGroupVariant[K]>
|
|
20
10
|
}
|
|
21
11
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(props?: RadioButtonGroupVariantProps): Pretty<Record<RadioButtonGroupSlot, string>>
|
|
26
|
-
raw: (props?: RadioButtonGroupVariantProps) => RadioButtonGroupVariantProps
|
|
27
|
-
variantMap: RadioButtonGroupVariantMap
|
|
28
|
-
variantKeys: Array<keyof RadioButtonGroupVariant>
|
|
29
|
-
splitVariantProps<Props extends RadioButtonGroupVariantProps>(props: Props): [RadioButtonGroupVariantProps, Pretty<DistributiveOmit<Props, keyof RadioButtonGroupVariantProps>>]
|
|
30
|
-
getVariantProps: (props?: RadioButtonGroupVariantProps) => RadioButtonGroupVariantProps
|
|
31
|
-
}
|
|
12
|
+
export type RadioButtonGroupVariantMap = RecipeVariantMap<RadioButtonGroupVariant>
|
|
13
|
+
|
|
14
|
+
export type RadioButtonGroupSlot = "root" | "label" | "item" | "itemText" | "itemControl" | "indicator"
|
|
32
15
|
|
|
16
|
+
export type RadioButtonGroupRecipe = ConfigSlotRecipeRuntimeFn<RadioButtonGroupSlot, RadioButtonGroupVariantProps, RadioButtonGroupVariantMap>
|
|
33
17
|
|
|
34
|
-
export declare const radioButtonGroup: RadioButtonGroupRecipe
|
|
18
|
+
export declare const radioButtonGroup: RadioButtonGroupRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const radioButtonGroupConfig = {"name":"radioButtonGroup","className":"radio-button-group","slots":["root","label","item","itemText","itemControl","indicator"],"defaultVariants":{"size":"md"},"variantMap":{"size":["sm","md"]}}
|
|
4
|
+
|
|
5
|
+
export const radioButtonGroup = /* @__PURE__ */ createSlotRecipe(radioButtonGroupConfig)
|
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @default "md"
|
|
8
|
-
*/
|
|
9
|
-
size: "md"
|
|
4
|
+
export type RadioCardGroupVariant = {
|
|
5
|
+
size?: "md"
|
|
10
6
|
}
|
|
11
7
|
|
|
12
|
-
type RadioCardGroupVariantMap = {
|
|
13
|
-
[key in keyof RadioCardGroupVariant]: Array<RadioCardGroupVariant[key]>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type RadioCardGroupSlot = "root" | "label" | "item" | "itemText" | "itemControl" | "indicator" | "itemImage" | "itemContent" | "itemTitle" | "itemDescription"
|
|
17
|
-
|
|
18
8
|
export type RadioCardGroupVariantProps = {
|
|
19
|
-
[
|
|
9
|
+
[K in keyof RadioCardGroupVariant]?: ConditionalValue<RadioCardGroupVariant[K]>
|
|
20
10
|
}
|
|
21
11
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(props?: RadioCardGroupVariantProps): Pretty<Record<RadioCardGroupSlot, string>>
|
|
26
|
-
raw: (props?: RadioCardGroupVariantProps) => RadioCardGroupVariantProps
|
|
27
|
-
variantMap: RadioCardGroupVariantMap
|
|
28
|
-
variantKeys: Array<keyof RadioCardGroupVariant>
|
|
29
|
-
splitVariantProps<Props extends RadioCardGroupVariantProps>(props: Props): [RadioCardGroupVariantProps, Pretty<DistributiveOmit<Props, keyof RadioCardGroupVariantProps>>]
|
|
30
|
-
getVariantProps: (props?: RadioCardGroupVariantProps) => RadioCardGroupVariantProps
|
|
31
|
-
}
|
|
12
|
+
export type RadioCardGroupVariantMap = RecipeVariantMap<RadioCardGroupVariant>
|
|
13
|
+
|
|
14
|
+
export type RadioCardGroupSlot = "root" | "label" | "item" | "itemText" | "itemControl" | "indicator" | "itemImage" | "itemContent" | "itemTitle" | "itemDescription"
|
|
32
15
|
|
|
16
|
+
export type RadioCardGroupRecipe = ConfigSlotRecipeRuntimeFn<RadioCardGroupSlot, RadioCardGroupVariantProps, RadioCardGroupVariantMap>
|
|
33
17
|
|
|
34
|
-
export declare const radioCardGroup: RadioCardGroupRecipe
|
|
18
|
+
export declare const radioCardGroup: RadioCardGroupRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const radioCardGroupConfig = {"name":"radioCardGroup","className":"radio-card-group","slots":["root","label","item","itemText","itemControl","indicator","itemImage","itemContent","itemTitle","itemDescription"],"defaultVariants":{"size":"md"},"variantMap":{"size":["md"]}}
|
|
4
|
+
|
|
5
|
+
export const radioCardGroup = /* @__PURE__ */ createSlotRecipe(radioCardGroupConfig)
|
package/recipes/radio-group.d.ts
CHANGED
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @default "md"
|
|
8
|
-
*/
|
|
9
|
-
size: "md"
|
|
4
|
+
export type RadioGroupVariant = {
|
|
5
|
+
size?: "md"
|
|
10
6
|
}
|
|
11
7
|
|
|
12
|
-
type RadioGroupVariantMap = {
|
|
13
|
-
[key in keyof RadioGroupVariant]: Array<RadioGroupVariant[key]>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type RadioGroupSlot = "root" | "label" | "item" | "itemText" | "itemControl" | "indicator"
|
|
17
|
-
|
|
18
8
|
export type RadioGroupVariantProps = {
|
|
19
|
-
[
|
|
9
|
+
[K in keyof RadioGroupVariant]?: ConditionalValue<RadioGroupVariant[K]>
|
|
20
10
|
}
|
|
21
11
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(props?: RadioGroupVariantProps): Pretty<Record<RadioGroupSlot, string>>
|
|
26
|
-
raw: (props?: RadioGroupVariantProps) => RadioGroupVariantProps
|
|
27
|
-
variantMap: RadioGroupVariantMap
|
|
28
|
-
variantKeys: Array<keyof RadioGroupVariant>
|
|
29
|
-
splitVariantProps<Props extends RadioGroupVariantProps>(props: Props): [RadioGroupVariantProps, Pretty<DistributiveOmit<Props, keyof RadioGroupVariantProps>>]
|
|
30
|
-
getVariantProps: (props?: RadioGroupVariantProps) => RadioGroupVariantProps
|
|
31
|
-
}
|
|
12
|
+
export type RadioGroupVariantMap = RecipeVariantMap<RadioGroupVariant>
|
|
13
|
+
|
|
14
|
+
export type RadioGroupSlot = "root" | "label" | "item" | "itemText" | "itemControl" | "indicator"
|
|
32
15
|
|
|
16
|
+
export type RadioGroupRecipe = ConfigSlotRecipeRuntimeFn<RadioGroupSlot, RadioGroupVariantProps, RadioGroupVariantMap>
|
|
33
17
|
|
|
34
|
-
export declare const radioGroup: RadioGroupRecipe
|
|
18
|
+
export declare const radioGroup: RadioGroupRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const radioGroupConfig = {"name":"radioGroup","className":"radio-group","slots":["root","label","item","itemText","itemControl","indicator"],"defaultVariants":{"size":"md"},"variantMap":{"size":["md"]}}
|
|
4
|
+
|
|
5
|
+
export const radioGroup = /* @__PURE__ */ createSlotRecipe(radioGroupConfig)
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { createSerializeCss, getCompoundVariantClassNames, getSlotCompoundVariant, memo, splitProps, toHash, uniq, withDefaults, withoutSpace } from '../helpers.js';
|
|
2
|
+
import { breakpointKeys, finalizeConditions, sortConditions } from '../css/conditions.js';
|
|
3
|
+
import { cx } from '../css/cx.js';
|
|
4
|
+
|
|
5
|
+
function normalize(config) {
|
|
6
|
+
const variantMap = config.variantMap ?? {}
|
|
7
|
+
return {
|
|
8
|
+
name: config.name,
|
|
9
|
+
className: config.className ?? config.name,
|
|
10
|
+
slots: config.slots ?? [],
|
|
11
|
+
variantMap,
|
|
12
|
+
variantKeys: Object.keys(variantMap),
|
|
13
|
+
defaults: config.defaultVariants ?? {},
|
|
14
|
+
compounds: config.compoundVariants ?? [],
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function createRecipe(config) {
|
|
19
|
+
const { name, className, variantMap, variantKeys, defaults, compounds } = normalize(config)
|
|
20
|
+
const classPrefix = null
|
|
21
|
+
|
|
22
|
+
const recipeCss = /* @__PURE__ */ createSerializeCss({
|
|
23
|
+
hash: false,
|
|
24
|
+
conditions: {
|
|
25
|
+
shift: sortConditions,
|
|
26
|
+
finalize: finalizeConditions,
|
|
27
|
+
breakpoints: { keys: breakpointKeys },
|
|
28
|
+
},
|
|
29
|
+
utility: {
|
|
30
|
+
prefix: classPrefix,
|
|
31
|
+
toHash(path, hashFn) {
|
|
32
|
+
return hashFn(path.join(":"))
|
|
33
|
+
},
|
|
34
|
+
transform(prop, value) {
|
|
35
|
+
return { className: value === "__ignore__" ? className : `${className}--${prop}_${withoutSpace(value)}` }
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
})
|
|
39
|
+
const formatClassName = (name) => {
|
|
40
|
+
const next = false ? toHash(name) : name
|
|
41
|
+
return classPrefix ? `${classPrefix}-${next}` : next
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function resolve(props = {}) {
|
|
45
|
+
return { [className]: "__ignore__", ...withDefaults(defaults, props) }
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function assertNoConditions(props) {
|
|
49
|
+
if (compounds.length === 0) return
|
|
50
|
+
for (const key of variantKeys) {
|
|
51
|
+
const value = props[key]
|
|
52
|
+
if (value != null && typeof value === "object") {
|
|
53
|
+
throw new Error(`[recipe:${className}:${key}] Conditions are not supported when using compound variants.`)
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
function compoundClasses(props) {
|
|
59
|
+
return getCompoundVariantClassNames(compounds, resolve(props), formatClassName)
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
const recipe = attach(memo(function recipeFn(props = {}, withCompoundVariants = true) {
|
|
63
|
+
assertNoConditions(props)
|
|
64
|
+
const recipeClass = recipeCss(resolve(props))
|
|
65
|
+
if (!withCompoundVariants) return recipeClass
|
|
66
|
+
const compoundsClass = compoundClasses(props)
|
|
67
|
+
return cx(recipeClass, compoundsClass)
|
|
68
|
+
}), name, variantKeys, variantMap, resolve)
|
|
69
|
+
recipe.__recipe__ = true
|
|
70
|
+
recipe.__getCompoundVariantClasses__ = compoundClasses
|
|
71
|
+
recipe.merge = function merge(other) {
|
|
72
|
+
return mergeRecipes(recipe, other)
|
|
73
|
+
}
|
|
74
|
+
return recipe
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function createSlotRecipe(config) {
|
|
78
|
+
const { name, className, slots, variantMap, variantKeys, defaults, compounds } = normalize(config)
|
|
79
|
+
|
|
80
|
+
const slotFns = slots.map(function toSlotRecipe(slot) {
|
|
81
|
+
return [slot, createRecipe({
|
|
82
|
+
name,
|
|
83
|
+
className: `${className}__${slot}`,
|
|
84
|
+
variantMap,
|
|
85
|
+
defaultVariants: defaults,
|
|
86
|
+
compoundVariants: getSlotCompoundVariant(compounds, slot),
|
|
87
|
+
})]
|
|
88
|
+
})
|
|
89
|
+
|
|
90
|
+
const recipe = memo(function slotRecipeFn(props = {}) {
|
|
91
|
+
const result = {}
|
|
92
|
+
for (const [slot, slotFn] of slotFns) result[slot] = slotFn(props)
|
|
93
|
+
return result
|
|
94
|
+
})
|
|
95
|
+
attach(recipe, name, variantKeys, variantMap, function getVariantProps(props = {}) {
|
|
96
|
+
return withDefaults(defaults, props)
|
|
97
|
+
})
|
|
98
|
+
recipe.__recipe__ = false
|
|
99
|
+
recipe.classNameMap = {}
|
|
100
|
+
return recipe
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
function mergeRecipes(recipeA, recipeB) {
|
|
104
|
+
if (recipeA && !recipeB) return recipeA
|
|
105
|
+
if (!recipeA && recipeB) return recipeB
|
|
106
|
+
function merged(...args) {
|
|
107
|
+
const classA = recipeA(...args)
|
|
108
|
+
const classB = recipeB(...args)
|
|
109
|
+
return classA && classB ? `${classA} ${classB}` : classA || classB
|
|
110
|
+
}
|
|
111
|
+
const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
|
|
112
|
+
const variantMap = {}
|
|
113
|
+
for (const key of variantKeys) variantMap[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
|
|
114
|
+
attach(merged, `${recipeA.__name__} ${recipeB.__name__}`, variantKeys, variantMap, function getVariantProps(props) {
|
|
115
|
+
return props
|
|
116
|
+
})
|
|
117
|
+
merged.__recipe__ = true
|
|
118
|
+
return merged
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function attach(recipe, name, variantKeys, variantMap, getVariantProps) {
|
|
122
|
+
recipe.__name__ = name
|
|
123
|
+
recipe.raw = function raw(props) {
|
|
124
|
+
return props
|
|
125
|
+
}
|
|
126
|
+
recipe.variantKeys = variantKeys
|
|
127
|
+
recipe.variantMap = variantMap
|
|
128
|
+
recipe.splitVariantProps = function splitVariantProps(props) {
|
|
129
|
+
return splitProps(props, variantKeys)
|
|
130
|
+
}
|
|
131
|
+
recipe.getVariantProps = getVariantProps
|
|
132
|
+
return recipe
|
|
133
|
+
}
|
|
@@ -1,34 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
* @default "default"
|
|
8
|
-
*/
|
|
9
|
-
variant: "default" | "compact"
|
|
4
|
+
export type SelectLanguageVariant = {
|
|
5
|
+
variant?: "default" | "compact"
|
|
10
6
|
}
|
|
11
7
|
|
|
12
|
-
type SelectLanguageVariantMap = {
|
|
13
|
-
[key in keyof SelectLanguageVariant]: Array<SelectLanguageVariant[key]>
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
type SelectLanguageSlot = "label" | "positioner" | "trigger" | "indicator" | "clearTrigger" | "item" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "list" | "content" | "root" | "control" | "valueText"
|
|
17
|
-
|
|
18
8
|
export type SelectLanguageVariantProps = {
|
|
19
|
-
[
|
|
9
|
+
[K in keyof SelectLanguageVariant]?: ConditionalValue<SelectLanguageVariant[K]>
|
|
20
10
|
}
|
|
21
11
|
|
|
22
|
-
export
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
(props?: SelectLanguageVariantProps): Pretty<Record<SelectLanguageSlot, string>>
|
|
26
|
-
raw: (props?: SelectLanguageVariantProps) => SelectLanguageVariantProps
|
|
27
|
-
variantMap: SelectLanguageVariantMap
|
|
28
|
-
variantKeys: Array<keyof SelectLanguageVariant>
|
|
29
|
-
splitVariantProps<Props extends SelectLanguageVariantProps>(props: Props): [SelectLanguageVariantProps, Pretty<DistributiveOmit<Props, keyof SelectLanguageVariantProps>>]
|
|
30
|
-
getVariantProps: (props?: SelectLanguageVariantProps) => SelectLanguageVariantProps
|
|
31
|
-
}
|
|
12
|
+
export type SelectLanguageVariantMap = RecipeVariantMap<SelectLanguageVariant>
|
|
13
|
+
|
|
14
|
+
export type SelectLanguageSlot = "label" | "positioner" | "trigger" | "indicator" | "clearTrigger" | "item" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "list" | "content" | "root" | "control" | "valueText"
|
|
32
15
|
|
|
16
|
+
export type SelectLanguageRecipe = ConfigSlotRecipeRuntimeFn<SelectLanguageSlot, SelectLanguageVariantProps, SelectLanguageVariantMap>
|
|
33
17
|
|
|
34
|
-
export declare const selectLanguage: SelectLanguageRecipe
|
|
18
|
+
export declare const selectLanguage: SelectLanguageRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const selectLanguageConfig = {"name":"selectLanguage","className":"select-language","slots":["label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"],"defaultVariants":{"variant":"default"},"variantMap":{"variant":["default","compact"]}}
|
|
4
|
+
|
|
5
|
+
export const selectLanguage = /* @__PURE__ */ createSlotRecipe(selectLanguageConfig)
|
package/recipes/select.d.ts
CHANGED
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
hideClearTrigger
|
|
7
|
-
|
|
8
|
-
* @default "md"
|
|
9
|
-
*/
|
|
10
|
-
size: "md"
|
|
4
|
+
export type SelectVariant = {
|
|
5
|
+
hideClearTrigger?: boolean
|
|
6
|
+
size?: "md"
|
|
11
7
|
}
|
|
12
8
|
|
|
13
|
-
type SelectVariantMap = {
|
|
14
|
-
[key in keyof SelectVariant]: Array<SelectVariant[key]>
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
type SelectSlot = "label" | "positioner" | "trigger" | "indicator" | "clearTrigger" | "item" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "list" | "content" | "root" | "control" | "valueText"
|
|
18
|
-
|
|
19
9
|
export type SelectVariantProps = {
|
|
20
|
-
[
|
|
10
|
+
[K in keyof SelectVariant]?: ConditionalValue<SelectVariant[K]>
|
|
21
11
|
}
|
|
22
12
|
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
(props?: SelectVariantProps): Pretty<Record<SelectSlot, string>>
|
|
27
|
-
raw: (props?: SelectVariantProps) => SelectVariantProps
|
|
28
|
-
variantMap: SelectVariantMap
|
|
29
|
-
variantKeys: Array<keyof SelectVariant>
|
|
30
|
-
splitVariantProps<Props extends SelectVariantProps>(props: Props): [SelectVariantProps, Pretty<DistributiveOmit<Props, keyof SelectVariantProps>>]
|
|
31
|
-
getVariantProps: (props?: SelectVariantProps) => SelectVariantProps
|
|
32
|
-
}
|
|
13
|
+
export type SelectVariantMap = RecipeVariantMap<SelectVariant>
|
|
14
|
+
|
|
15
|
+
export type SelectSlot = "label" | "positioner" | "trigger" | "indicator" | "clearTrigger" | "item" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "list" | "content" | "root" | "control" | "valueText"
|
|
33
16
|
|
|
17
|
+
export type SelectRecipe = ConfigSlotRecipeRuntimeFn<SelectSlot, SelectVariantProps, SelectVariantMap>
|
|
34
18
|
|
|
35
|
-
export declare const select: SelectRecipe
|
|
19
|
+
export declare const select: SelectRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const selectConfig = {"name":"select","slots":["label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"],"defaultVariants":{"size":"md"},"variantMap":{"hideClearTrigger":["true"],"size":["md"]}}
|
|
4
|
+
|
|
5
|
+
export const select = /* @__PURE__ */ createSlotRecipe(selectConfig)
|
|
@@ -1,38 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
import type {
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
1
|
+
import type { ConditionalValue } from '../types/system.js';
|
|
2
|
+
import type { ConfigSlotRecipeRuntimeFn, RecipeVariantMap } from '../types/recipe.js';
|
|
4
3
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
*/
|
|
9
|
-
size: "lg" | "md" | "sm"
|
|
10
|
-
/**
|
|
11
|
-
* @default "neutral"
|
|
12
|
-
*/
|
|
13
|
-
severity: "success" | "warning" | "error" | "info" | "neutral"
|
|
4
|
+
export type StatusTagSelectVariant = {
|
|
5
|
+
size?: "lg" | "md" | "sm"
|
|
6
|
+
severity?: "success" | "warning" | "error" | "info" | "neutral"
|
|
14
7
|
}
|
|
15
8
|
|
|
16
|
-
type StatusTagSelectVariantMap = {
|
|
17
|
-
[key in keyof StatusTagSelectVariant]: Array<StatusTagSelectVariant[key]>
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
type StatusTagSelectSlot = "label" | "positioner" | "trigger" | "indicator" | "clearTrigger" | "item" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "list" | "content" | "root" | "control" | "valueText"
|
|
21
|
-
|
|
22
9
|
export type StatusTagSelectVariantProps = {
|
|
23
|
-
[
|
|
10
|
+
[K in keyof StatusTagSelectVariant]?: ConditionalValue<StatusTagSelectVariant[K]>
|
|
24
11
|
}
|
|
25
12
|
|
|
26
|
-
export
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
(props?: StatusTagSelectVariantProps): Pretty<Record<StatusTagSelectSlot, string>>
|
|
30
|
-
raw: (props?: StatusTagSelectVariantProps) => StatusTagSelectVariantProps
|
|
31
|
-
variantMap: StatusTagSelectVariantMap
|
|
32
|
-
variantKeys: Array<keyof StatusTagSelectVariant>
|
|
33
|
-
splitVariantProps<Props extends StatusTagSelectVariantProps>(props: Props): [StatusTagSelectVariantProps, Pretty<DistributiveOmit<Props, keyof StatusTagSelectVariantProps>>]
|
|
34
|
-
getVariantProps: (props?: StatusTagSelectVariantProps) => StatusTagSelectVariantProps
|
|
35
|
-
}
|
|
13
|
+
export type StatusTagSelectVariantMap = RecipeVariantMap<StatusTagSelectVariant>
|
|
14
|
+
|
|
15
|
+
export type StatusTagSelectSlot = "label" | "positioner" | "trigger" | "indicator" | "clearTrigger" | "item" | "itemText" | "itemIndicator" | "itemGroup" | "itemGroupLabel" | "list" | "content" | "root" | "control" | "valueText"
|
|
36
16
|
|
|
17
|
+
export type StatusTagSelectRecipe = ConfigSlotRecipeRuntimeFn<StatusTagSelectSlot, StatusTagSelectVariantProps, StatusTagSelectVariantMap>
|
|
37
18
|
|
|
38
|
-
export declare const statusTagSelect: StatusTagSelectRecipe
|
|
19
|
+
export declare const statusTagSelect: StatusTagSelectRecipe;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createSlotRecipe } from './runtime.js';
|
|
2
|
+
|
|
3
|
+
const statusTagSelectConfig = {"name":"statusTagSelect","className":"status-tag-select","slots":["label","positioner","trigger","indicator","clearTrigger","item","itemText","itemIndicator","itemGroup","itemGroupLabel","list","content","root","control","valueText"],"defaultVariants":{"severity":"neutral","size":"md"},"variantMap":{"size":["lg","md","sm"],"severity":["success","warning","error","info","neutral"]}}
|
|
4
|
+
|
|
5
|
+
export const statusTagSelect = /* @__PURE__ */ createSlotRecipe(statusTagSelectConfig)
|