@stokelp/styled-system 1.30.0 → 1.32.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/package.json +1 -1
- package/panda.buildinfo.json +1 -0
- package/recipes/index.d.ts +2 -1
- package/recipes/index.mjs +2 -1
- package/recipes/pagination.d.ts +32 -0
- package/recipes/pagination.mjs +40 -0
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
package/recipes/index.d.ts
CHANGED
package/recipes/index.mjs
CHANGED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface PaginationVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type PaginationVariantMap = {
|
|
10
|
+
[key in keyof PaginationVariant]: Array<PaginationVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type PaginationVariantProps = {
|
|
14
|
+
[key in keyof PaginationVariant]?: ConditionalValue<PaginationVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface PaginationRecipe {
|
|
18
|
+
__type: PaginationVariantProps
|
|
19
|
+
(props?: PaginationVariantProps): Pretty<Record<"root" | "item" | "dots", string>>
|
|
20
|
+
raw: (props?: PaginationVariantProps) => PaginationVariantProps
|
|
21
|
+
variantMap: PaginationVariantMap
|
|
22
|
+
variantKeys: Array<keyof PaginationVariant>
|
|
23
|
+
splitVariantProps<Props extends PaginationVariantProps>(props: Props): [PaginationVariantProps, Pretty<DistributiveOmit<Props, keyof PaginationVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: PaginationVariantProps) => PaginationVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* The styles for the pagination component
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
*/
|
|
32
|
+
export declare const pagination: PaginationRecipe
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const paginationDefaultVariants = {}
|
|
5
|
+
const paginationCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const paginationSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"pagination__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"item",
|
|
14
|
+
"pagination__item"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"dots",
|
|
18
|
+
"pagination__dots"
|
|
19
|
+
]
|
|
20
|
+
]
|
|
21
|
+
const paginationSlotFns = /* @__PURE__ */ paginationSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, paginationDefaultVariants, getSlotCompoundVariant(paginationCompoundVariants, slotName))])
|
|
22
|
+
|
|
23
|
+
const paginationFn = memo((props = {}) => {
|
|
24
|
+
return Object.fromEntries(paginationSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
const paginationVariantKeys = []
|
|
28
|
+
const getVariantProps = (variants) => ({ ...paginationDefaultVariants, ...compact(variants) })
|
|
29
|
+
|
|
30
|
+
export const pagination = /* @__PURE__ */ Object.assign(paginationFn, {
|
|
31
|
+
__recipe__: false,
|
|
32
|
+
__name__: 'pagination',
|
|
33
|
+
raw: (props) => props,
|
|
34
|
+
variantKeys: paginationVariantKeys,
|
|
35
|
+
variantMap: {},
|
|
36
|
+
splitVariantProps(props) {
|
|
37
|
+
return splitProps(props, paginationVariantKeys)
|
|
38
|
+
},
|
|
39
|
+
getVariantProps
|
|
40
|
+
})
|