@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stokelp/styled-system",
3
- "version": "1.30.0",
3
+ "version": "1.32.0",
4
4
  "description": "Stokelp UI styled-system",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -142,6 +142,7 @@
142
142
  "drawer": [
143
143
  "variant]___[value:right]___[recipe:drawer"
144
144
  ],
145
+ "pagination": [],
145
146
  "popover": [],
146
147
  "radioButtonGroup": [],
147
148
  "radioGroup": [
@@ -29,4 +29,5 @@ export * from './tooltip';
29
29
  export * from './alert';
30
30
  export * from './table';
31
31
  export * from './breadcrumb';
32
- export * from './popover';
32
+ export * from './popover';
33
+ export * from './pagination';
package/recipes/index.mjs CHANGED
@@ -28,4 +28,5 @@ export * from './tooltip.mjs';
28
28
  export * from './alert.mjs';
29
29
  export * from './table.mjs';
30
30
  export * from './breadcrumb.mjs';
31
- export * from './popover.mjs';
31
+ export * from './popover.mjs';
32
+ export * from './pagination.mjs';
@@ -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
+ })