@serendie/ui 2.2.4 → 2.2.5-dev.202510160458
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/components/Accordion/Accordion.d.ts +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -1
- package/dist/components/Banner/Banner.d.ts +1 -1
- package/dist/components/BottomNavigation/BottomNavigationItem.d.ts +1 -1
- package/dist/components/Button/Button.d.ts +2 -2
- package/dist/components/DatePicker/DatePicker.d.ts +5 -5
- package/dist/components/DatePicker/DatePicker.js +79 -77
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +1 -1
- package/dist/components/IconButton/IconButton.d.ts +3 -3
- package/dist/components/List/ListItem.d.ts +1 -1
- package/dist/components/ModalDialog/ModalDialog.d.ts +1 -1
- package/dist/components/NotificationBadge/NotificationBadge.d.ts +1 -1
- package/dist/components/Pagination/Pagination.d.ts +1 -1
- package/dist/components/Search/Search.d.ts +1 -1
- package/dist/components/Select/Select.d.ts +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Tabs/Tabs.d.ts +1 -1
- package/dist/components/TextArea/TextArea.d.ts +1 -0
- package/dist/components/TextArea/TextArea.js +15 -8
- package/dist/components/TextField/TextField.d.ts +2 -0
- package/dist/components/TextField/TextField.js +4 -2
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/TopAppBar/TopAppBar.d.ts +1 -1
- package/dist/preset.d.ts +0 -3
- package/dist/preset.js +7 -9
- package/dist/recipes/textFieldRecipe.d.ts +9 -2
- package/dist/recipes/textFieldRecipe.js +13 -3
- package/dist/styled-system/css/cva.js +38 -43
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/dist/recipes/index.d.ts +0 -3
- package/dist/recipes/index.js +0 -7
- package/dist/styled-system/recipes/create-recipe.js +0 -37
- package/dist/styled-system/recipes/text-field-recipe.js +0 -61
- package/styled-system/recipes/create-recipe.js +0 -82
- package/styled-system/recipes/index.d.ts +0 -2
- package/styled-system/recipes/index.js +0 -1
- package/styled-system/recipes/text-field-recipe.d.ts +0 -28
- package/styled-system/recipes/text-field-recipe.js +0 -72
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import { finalizeConditions as _, sortConditions as f } from "../css/conditions.js";
|
|
2
|
-
import { css as u } from "../css/css.js";
|
|
3
|
-
import { getCompoundVariantCss as p, assertCompoundVariant as C } from "../css/cva.js";
|
|
4
|
-
import { cx as d } from "../css/cx.js";
|
|
5
|
-
import { compact as g, createCss as l, withoutSpace as y } from "../helpers.js";
|
|
6
|
-
const z = (e, a, s) => {
|
|
7
|
-
const i = (t) => ({
|
|
8
|
-
[e]: "__ignore__",
|
|
9
|
-
...a,
|
|
10
|
-
...g(t)
|
|
11
|
-
});
|
|
12
|
-
return {
|
|
13
|
-
recipeFn: (t, m = !0) => {
|
|
14
|
-
const c = l({
|
|
15
|
-
conditions: {
|
|
16
|
-
shift: f,
|
|
17
|
-
finalize: _,
|
|
18
|
-
breakpoints: { keys: ["base", "expanded"] }
|
|
19
|
-
},
|
|
20
|
-
utility: {
|
|
21
|
-
toHash: (r, o) => o(r.join(":")),
|
|
22
|
-
transform: (r, o) => (C(e, s, t, r), o === "__ignore__" ? { className: e } : (o = y(o), { className: `${e}--${r}_${o}` }))
|
|
23
|
-
}
|
|
24
|
-
}), n = i(t);
|
|
25
|
-
if (m) {
|
|
26
|
-
const r = p(s, n);
|
|
27
|
-
return d(c(n), u(r));
|
|
28
|
-
}
|
|
29
|
-
return c(n);
|
|
30
|
-
},
|
|
31
|
-
getVariantProps: i,
|
|
32
|
-
__getCompoundVariantCss__: (t) => p(s, i(t))
|
|
33
|
-
};
|
|
34
|
-
};
|
|
35
|
-
export {
|
|
36
|
-
z as createRecipe
|
|
37
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { memo as a, compact as r, splitProps as o, getSlotCompoundVariant as s } from "../helpers.js";
|
|
2
|
-
import { createRecipe as _ } from "./create-recipe.js";
|
|
3
|
-
const n = {}, c = [], l = [
|
|
4
|
-
[
|
|
5
|
-
"root",
|
|
6
|
-
"input__root"
|
|
7
|
-
],
|
|
8
|
-
[
|
|
9
|
-
"label",
|
|
10
|
-
"input__label"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"labelRequired",
|
|
14
|
-
"input__labelRequired"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"inputWrapper",
|
|
18
|
-
"input__inputWrapper"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"input",
|
|
22
|
-
"input__input"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"icon",
|
|
26
|
-
"input__icon"
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"leftContent",
|
|
30
|
-
"input__leftContent"
|
|
31
|
-
],
|
|
32
|
-
[
|
|
33
|
-
"rightContent",
|
|
34
|
-
"input__rightContent"
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"messageField",
|
|
38
|
-
"input__messageField"
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
"description",
|
|
42
|
-
"input__description"
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
"invalidMessage",
|
|
46
|
-
"input__invalidMessage"
|
|
47
|
-
]
|
|
48
|
-
], u = /* @__PURE__ */ l.map(([e, t]) => [e, _(t, n, s(c, e))]), d = a((e = {}) => Object.fromEntries(u.map(([t, p]) => [t, p.recipeFn(e)]))), i = [], m = (e) => ({ ...n, ...r(e) }), g = /* @__PURE__ */ Object.assign(d, {
|
|
49
|
-
__recipe__: !1,
|
|
50
|
-
__name__: "textFieldRecipe",
|
|
51
|
-
raw: (e) => e,
|
|
52
|
-
variantKeys: i,
|
|
53
|
-
variantMap: {},
|
|
54
|
-
splitVariantProps(e) {
|
|
55
|
-
return o(e, i);
|
|
56
|
-
},
|
|
57
|
-
getVariantProps: m
|
|
58
|
-
});
|
|
59
|
-
export {
|
|
60
|
-
g as textFieldRecipe
|
|
61
|
-
};
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { finalizeConditions, sortConditions } from '../css/conditions.js';
|
|
2
|
-
import { css } from '../css/css.js';
|
|
3
|
-
import { assertCompoundVariant, getCompoundVariantCss } from '../css/cva.js';
|
|
4
|
-
import { cx } from '../css/cx.js';
|
|
5
|
-
import { compact, createCss, splitProps, uniq, withoutSpace } from '../helpers.js';
|
|
6
|
-
|
|
7
|
-
export const createRecipe = (name, defaultVariants, compoundVariants) => {
|
|
8
|
-
const getVariantProps = (variants) => {
|
|
9
|
-
return {
|
|
10
|
-
[name]: '__ignore__',
|
|
11
|
-
...defaultVariants,
|
|
12
|
-
...compact(variants),
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
const recipeFn = (variants, withCompoundVariants = true) => {
|
|
17
|
-
const transform = (prop, value) => {
|
|
18
|
-
assertCompoundVariant(name, compoundVariants, variants, prop)
|
|
19
|
-
|
|
20
|
-
if (value === '__ignore__') {
|
|
21
|
-
return { className: name }
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
value = withoutSpace(value)
|
|
25
|
-
return { className: `${name}--${prop}_${value}` }
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
const recipeCss = createCss({
|
|
29
|
-
|
|
30
|
-
conditions: {
|
|
31
|
-
shift: sortConditions,
|
|
32
|
-
finalize: finalizeConditions,
|
|
33
|
-
breakpoints: { keys: ["base","expanded"] }
|
|
34
|
-
},
|
|
35
|
-
utility: {
|
|
36
|
-
|
|
37
|
-
toHash: (path, hashFn) => hashFn(path.join(":")),
|
|
38
|
-
transform,
|
|
39
|
-
}
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
const recipeStyles = getVariantProps(variants)
|
|
43
|
-
|
|
44
|
-
if (withCompoundVariants) {
|
|
45
|
-
const compoundVariantStyles = getCompoundVariantCss(compoundVariants, recipeStyles)
|
|
46
|
-
return cx(recipeCss(recipeStyles), css(compoundVariantStyles))
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return recipeCss(recipeStyles)
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return {
|
|
53
|
-
recipeFn,
|
|
54
|
-
getVariantProps,
|
|
55
|
-
__getCompoundVariantCss__: (variants) => {
|
|
56
|
-
return getCompoundVariantCss(compoundVariants, getVariantProps(variants));
|
|
57
|
-
},
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export const mergeRecipes = (recipeA, recipeB) => {
|
|
62
|
-
if (recipeA && !recipeB) return recipeA
|
|
63
|
-
if (!recipeA && recipeB) return recipeB
|
|
64
|
-
|
|
65
|
-
const recipeFn = (...args) => cx(recipeA(...args), recipeB(...args))
|
|
66
|
-
const variantKeys = uniq(recipeA.variantKeys, recipeB.variantKeys)
|
|
67
|
-
const variantMap = variantKeys.reduce((acc, key) => {
|
|
68
|
-
acc[key] = uniq(recipeA.variantMap[key], recipeB.variantMap[key])
|
|
69
|
-
return acc
|
|
70
|
-
}, {})
|
|
71
|
-
|
|
72
|
-
return Object.assign(recipeFn, {
|
|
73
|
-
__recipe__: true,
|
|
74
|
-
__name__: `${recipeA.__name__} ${recipeB.__name__}`,
|
|
75
|
-
raw: (props) => props,
|
|
76
|
-
variantKeys,
|
|
77
|
-
variantMap,
|
|
78
|
-
splitVariantProps(props) {
|
|
79
|
-
return splitProps(props, variantKeys)
|
|
80
|
-
},
|
|
81
|
-
})
|
|
82
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './text-field-recipe.js';
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
import type { ConditionalValue } from '../types/index';
|
|
3
|
-
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
-
|
|
5
|
-
interface TextFieldRecipeVariant {
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
type TextFieldRecipeVariantMap = {
|
|
10
|
-
[key in keyof TextFieldRecipeVariant]: Array<TextFieldRecipeVariant[key]>
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type TextFieldRecipeVariantProps = {
|
|
14
|
-
[key in keyof TextFieldRecipeVariant]?: ConditionalValue<TextFieldRecipeVariant[key]> | undefined
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
export interface TextFieldRecipeRecipe {
|
|
18
|
-
__type: TextFieldRecipeVariantProps
|
|
19
|
-
(props?: TextFieldRecipeVariantProps): Pretty<Record<"root" | "label" | "labelRequired" | "inputWrapper" | "input" | "icon" | "leftContent" | "rightContent" | "messageField" | "description" | "invalidMessage", string>>
|
|
20
|
-
raw: (props?: TextFieldRecipeVariantProps) => TextFieldRecipeVariantProps
|
|
21
|
-
variantMap: TextFieldRecipeVariantMap
|
|
22
|
-
variantKeys: Array<keyof TextFieldRecipeVariant>
|
|
23
|
-
splitVariantProps<Props extends TextFieldRecipeVariantProps>(props: Props): [TextFieldRecipeVariantProps, Pretty<DistributiveOmit<Props, keyof TextFieldRecipeVariantProps>>]
|
|
24
|
-
getVariantProps: (props?: TextFieldRecipeVariantProps) => TextFieldRecipeVariantProps
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
export declare const textFieldRecipe: TextFieldRecipeRecipe
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.js';
|
|
2
|
-
import { createRecipe } from './create-recipe.js';
|
|
3
|
-
|
|
4
|
-
const textFieldRecipeDefaultVariants = {}
|
|
5
|
-
const textFieldRecipeCompoundVariants = []
|
|
6
|
-
|
|
7
|
-
const textFieldRecipeSlotNames = [
|
|
8
|
-
[
|
|
9
|
-
"root",
|
|
10
|
-
"input__root"
|
|
11
|
-
],
|
|
12
|
-
[
|
|
13
|
-
"label",
|
|
14
|
-
"input__label"
|
|
15
|
-
],
|
|
16
|
-
[
|
|
17
|
-
"labelRequired",
|
|
18
|
-
"input__labelRequired"
|
|
19
|
-
],
|
|
20
|
-
[
|
|
21
|
-
"inputWrapper",
|
|
22
|
-
"input__inputWrapper"
|
|
23
|
-
],
|
|
24
|
-
[
|
|
25
|
-
"input",
|
|
26
|
-
"input__input"
|
|
27
|
-
],
|
|
28
|
-
[
|
|
29
|
-
"icon",
|
|
30
|
-
"input__icon"
|
|
31
|
-
],
|
|
32
|
-
[
|
|
33
|
-
"leftContent",
|
|
34
|
-
"input__leftContent"
|
|
35
|
-
],
|
|
36
|
-
[
|
|
37
|
-
"rightContent",
|
|
38
|
-
"input__rightContent"
|
|
39
|
-
],
|
|
40
|
-
[
|
|
41
|
-
"messageField",
|
|
42
|
-
"input__messageField"
|
|
43
|
-
],
|
|
44
|
-
[
|
|
45
|
-
"description",
|
|
46
|
-
"input__description"
|
|
47
|
-
],
|
|
48
|
-
[
|
|
49
|
-
"invalidMessage",
|
|
50
|
-
"input__invalidMessage"
|
|
51
|
-
]
|
|
52
|
-
]
|
|
53
|
-
const textFieldRecipeSlotFns = /* @__PURE__ */ textFieldRecipeSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, textFieldRecipeDefaultVariants, getSlotCompoundVariant(textFieldRecipeCompoundVariants, slotName))])
|
|
54
|
-
|
|
55
|
-
const textFieldRecipeFn = memo((props = {}) => {
|
|
56
|
-
return Object.fromEntries(textFieldRecipeSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const textFieldRecipeVariantKeys = []
|
|
60
|
-
const getVariantProps = (variants) => ({ ...textFieldRecipeDefaultVariants, ...compact(variants) })
|
|
61
|
-
|
|
62
|
-
export const textFieldRecipe = /* @__PURE__ */ Object.assign(textFieldRecipeFn, {
|
|
63
|
-
__recipe__: false,
|
|
64
|
-
__name__: 'textFieldRecipe',
|
|
65
|
-
raw: (props) => props,
|
|
66
|
-
variantKeys: textFieldRecipeVariantKeys,
|
|
67
|
-
variantMap: {},
|
|
68
|
-
splitVariantProps(props) {
|
|
69
|
-
return splitProps(props, textFieldRecipeVariantKeys)
|
|
70
|
-
},
|
|
71
|
-
getVariantProps
|
|
72
|
-
})
|