@stokelp/styled-system 1.21.0 → 1.22.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 +7 -0
- package/recipes/index.d.ts +5 -1
- package/recipes/index.mjs +5 -1
- package/recipes/table-container.d.ts +28 -0
- package/recipes/table-container.mjs +24 -0
- package/recipes/table-empty-row.d.ts +28 -0
- package/recipes/table-empty-row.mjs +24 -0
- package/recipes/table-group-title.d.ts +31 -0
- package/recipes/table-group-title.mjs +31 -0
- package/recipes/table.d.ts +28 -0
- package/recipes/table.mjs +52 -0
package/package.json
CHANGED
package/panda.buildinfo.json
CHANGED
|
@@ -138,6 +138,13 @@
|
|
|
138
138
|
"radioGroup": [
|
|
139
139
|
"size]___[value:md]___[recipe:radioGroup"
|
|
140
140
|
],
|
|
141
|
+
"table": [],
|
|
142
|
+
"tableGroupTitle": [
|
|
143
|
+
"variant]___[value:primary]___[recipe:tableGroupTitle",
|
|
144
|
+
"variant]___[value:secondary]___[recipe:tableGroupTitle"
|
|
145
|
+
],
|
|
146
|
+
"tableEmptyRow": [],
|
|
147
|
+
"tableContainer": [],
|
|
141
148
|
"tabs": [
|
|
142
149
|
"variant]___[value:line]___[recipe:tabs"
|
|
143
150
|
],
|
package/recipes/index.d.ts
CHANGED
|
@@ -10,6 +10,9 @@ export * from './form-helper-text';
|
|
|
10
10
|
export * from './input';
|
|
11
11
|
export * from './input-addon';
|
|
12
12
|
export * from './input-group';
|
|
13
|
+
export * from './table-group-title';
|
|
14
|
+
export * from './table-empty-row';
|
|
15
|
+
export * from './table-container';
|
|
13
16
|
export * from './drawer';
|
|
14
17
|
export * from './radio-button-group';
|
|
15
18
|
export * from './radio-group';
|
|
@@ -23,4 +26,5 @@ export * from './select';
|
|
|
23
26
|
export * from './chip';
|
|
24
27
|
export * from './action-card';
|
|
25
28
|
export * from './tooltip';
|
|
26
|
-
export * from './alert';
|
|
29
|
+
export * from './alert';
|
|
30
|
+
export * from './table';
|
package/recipes/index.mjs
CHANGED
|
@@ -9,6 +9,9 @@ export * from './form-helper-text.mjs';
|
|
|
9
9
|
export * from './input.mjs';
|
|
10
10
|
export * from './input-addon.mjs';
|
|
11
11
|
export * from './input-group.mjs';
|
|
12
|
+
export * from './table-group-title.mjs';
|
|
13
|
+
export * from './table-empty-row.mjs';
|
|
14
|
+
export * from './table-container.mjs';
|
|
12
15
|
export * from './drawer.mjs';
|
|
13
16
|
export * from './radio-button-group.mjs';
|
|
14
17
|
export * from './radio-group.mjs';
|
|
@@ -22,4 +25,5 @@ export * from './select.mjs';
|
|
|
22
25
|
export * from './chip.mjs';
|
|
23
26
|
export * from './action-card.mjs';
|
|
24
27
|
export * from './tooltip.mjs';
|
|
25
|
-
export * from './alert.mjs';
|
|
28
|
+
export * from './alert.mjs';
|
|
29
|
+
export * from './table.mjs';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface TableContainerVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type TableContainerVariantMap = {
|
|
10
|
+
[key in keyof TableContainerVariant]: Array<TableContainerVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type TableContainerVariantProps = {
|
|
14
|
+
[key in keyof TableContainerVariant]?: ConditionalValue<TableContainerVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface TableContainerRecipe {
|
|
18
|
+
__type: TableContainerVariantProps
|
|
19
|
+
(props?: TableContainerVariantProps): string
|
|
20
|
+
raw: (props?: TableContainerVariantProps) => TableContainerVariantProps
|
|
21
|
+
variantMap: TableContainerVariantMap
|
|
22
|
+
variantKeys: Array<keyof TableContainerVariant>
|
|
23
|
+
splitVariantProps<Props extends TableContainerVariantProps>(props: Props): [TableContainerVariantProps, Pretty<DistributiveOmit<Props, keyof TableContainerVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: TableContainerVariantProps) => TableContainerVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export declare const tableContainer: TableContainerRecipe
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const tableContainerFn = /* @__PURE__ */ createRecipe('table-container', {}, [])
|
|
5
|
+
|
|
6
|
+
const tableContainerVariantMap = {}
|
|
7
|
+
|
|
8
|
+
const tableContainerVariantKeys = Object.keys(tableContainerVariantMap)
|
|
9
|
+
|
|
10
|
+
export const tableContainer = /* @__PURE__ */ Object.assign(memo(tableContainerFn.recipeFn), {
|
|
11
|
+
__recipe__: true,
|
|
12
|
+
__name__: 'tableContainer',
|
|
13
|
+
__getCompoundVariantCss__: tableContainerFn.__getCompoundVariantCss__,
|
|
14
|
+
raw: (props) => props,
|
|
15
|
+
variantKeys: tableContainerVariantKeys,
|
|
16
|
+
variantMap: tableContainerVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
20
|
+
splitVariantProps(props) {
|
|
21
|
+
return splitProps(props, tableContainerVariantKeys)
|
|
22
|
+
},
|
|
23
|
+
getVariantProps: tableContainerFn.getVariantProps,
|
|
24
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface TableEmptyRowVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type TableEmptyRowVariantMap = {
|
|
10
|
+
[key in keyof TableEmptyRowVariant]: Array<TableEmptyRowVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type TableEmptyRowVariantProps = {
|
|
14
|
+
[key in keyof TableEmptyRowVariant]?: ConditionalValue<TableEmptyRowVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface TableEmptyRowRecipe {
|
|
18
|
+
__type: TableEmptyRowVariantProps
|
|
19
|
+
(props?: TableEmptyRowVariantProps): string
|
|
20
|
+
raw: (props?: TableEmptyRowVariantProps) => TableEmptyRowVariantProps
|
|
21
|
+
variantMap: TableEmptyRowVariantMap
|
|
22
|
+
variantKeys: Array<keyof TableEmptyRowVariant>
|
|
23
|
+
splitVariantProps<Props extends TableEmptyRowVariantProps>(props: Props): [TableEmptyRowVariantProps, Pretty<DistributiveOmit<Props, keyof TableEmptyRowVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: TableEmptyRowVariantProps) => TableEmptyRowVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export declare const tableEmptyRow: TableEmptyRowRecipe
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const tableEmptyRowFn = /* @__PURE__ */ createRecipe('table-empty-row', {}, [])
|
|
5
|
+
|
|
6
|
+
const tableEmptyRowVariantMap = {}
|
|
7
|
+
|
|
8
|
+
const tableEmptyRowVariantKeys = Object.keys(tableEmptyRowVariantMap)
|
|
9
|
+
|
|
10
|
+
export const tableEmptyRow = /* @__PURE__ */ Object.assign(memo(tableEmptyRowFn.recipeFn), {
|
|
11
|
+
__recipe__: true,
|
|
12
|
+
__name__: 'tableEmptyRow',
|
|
13
|
+
__getCompoundVariantCss__: tableEmptyRowFn.__getCompoundVariantCss__,
|
|
14
|
+
raw: (props) => props,
|
|
15
|
+
variantKeys: tableEmptyRowVariantKeys,
|
|
16
|
+
variantMap: tableEmptyRowVariantMap,
|
|
17
|
+
merge(recipe) {
|
|
18
|
+
return mergeRecipes(this, recipe)
|
|
19
|
+
},
|
|
20
|
+
splitVariantProps(props) {
|
|
21
|
+
return splitProps(props, tableEmptyRowVariantKeys)
|
|
22
|
+
},
|
|
23
|
+
getVariantProps: tableEmptyRowFn.getVariantProps,
|
|
24
|
+
})
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface TableGroupTitleVariant {
|
|
6
|
+
/**
|
|
7
|
+
* @default "primary"
|
|
8
|
+
*/
|
|
9
|
+
variant: "primary" | "secondary"
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
type TableGroupTitleVariantMap = {
|
|
13
|
+
[key in keyof TableGroupTitleVariant]: Array<TableGroupTitleVariant[key]>
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type TableGroupTitleVariantProps = {
|
|
17
|
+
[key in keyof TableGroupTitleVariant]?: ConditionalValue<TableGroupTitleVariant[key]> | undefined
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface TableGroupTitleRecipe {
|
|
21
|
+
__type: TableGroupTitleVariantProps
|
|
22
|
+
(props?: TableGroupTitleVariantProps): string
|
|
23
|
+
raw: (props?: TableGroupTitleVariantProps) => TableGroupTitleVariantProps
|
|
24
|
+
variantMap: TableGroupTitleVariantMap
|
|
25
|
+
variantKeys: Array<keyof TableGroupTitleVariant>
|
|
26
|
+
splitVariantProps<Props extends TableGroupTitleVariantProps>(props: Props): [TableGroupTitleVariantProps, Pretty<DistributiveOmit<Props, keyof TableGroupTitleVariantProps>>]
|
|
27
|
+
getVariantProps: (props?: TableGroupTitleVariantProps) => TableGroupTitleVariantProps
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
export declare const tableGroupTitle: TableGroupTitleRecipe
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe, mergeRecipes } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const tableGroupTitleFn = /* @__PURE__ */ createRecipe('table-group-title', {
|
|
5
|
+
"variant": "primary"
|
|
6
|
+
}, [])
|
|
7
|
+
|
|
8
|
+
const tableGroupTitleVariantMap = {
|
|
9
|
+
"variant": [
|
|
10
|
+
"primary",
|
|
11
|
+
"secondary"
|
|
12
|
+
]
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const tableGroupTitleVariantKeys = Object.keys(tableGroupTitleVariantMap)
|
|
16
|
+
|
|
17
|
+
export const tableGroupTitle = /* @__PURE__ */ Object.assign(memo(tableGroupTitleFn.recipeFn), {
|
|
18
|
+
__recipe__: true,
|
|
19
|
+
__name__: 'tableGroupTitle',
|
|
20
|
+
__getCompoundVariantCss__: tableGroupTitleFn.__getCompoundVariantCss__,
|
|
21
|
+
raw: (props) => props,
|
|
22
|
+
variantKeys: tableGroupTitleVariantKeys,
|
|
23
|
+
variantMap: tableGroupTitleVariantMap,
|
|
24
|
+
merge(recipe) {
|
|
25
|
+
return mergeRecipes(this, recipe)
|
|
26
|
+
},
|
|
27
|
+
splitVariantProps(props) {
|
|
28
|
+
return splitProps(props, tableGroupTitleVariantKeys)
|
|
29
|
+
},
|
|
30
|
+
getVariantProps: tableGroupTitleFn.getVariantProps,
|
|
31
|
+
})
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import type { ConditionalValue } from '../types/index';
|
|
3
|
+
import type { DistributiveOmit, Pretty } from '../types/system-types';
|
|
4
|
+
|
|
5
|
+
interface TableVariant {
|
|
6
|
+
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
type TableVariantMap = {
|
|
10
|
+
[key in keyof TableVariant]: Array<TableVariant[key]>
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export type TableVariantProps = {
|
|
14
|
+
[key in keyof TableVariant]?: ConditionalValue<TableVariant[key]> | undefined
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface TableRecipe {
|
|
18
|
+
__type: TableVariantProps
|
|
19
|
+
(props?: TableVariantProps): Pretty<Record<"root" | "thead" | "tbody" | "tr" | "th" | "td", string>>
|
|
20
|
+
raw: (props?: TableVariantProps) => TableVariantProps
|
|
21
|
+
variantMap: TableVariantMap
|
|
22
|
+
variantKeys: Array<keyof TableVariant>
|
|
23
|
+
splitVariantProps<Props extends TableVariantProps>(props: Props): [TableVariantProps, Pretty<DistributiveOmit<Props, keyof TableVariantProps>>]
|
|
24
|
+
getVariantProps: (props?: TableVariantProps) => TableVariantProps
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
export declare const table: TableRecipe
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { compact, getSlotCompoundVariant, memo, splitProps } from '../helpers.mjs';
|
|
2
|
+
import { createRecipe } from './create-recipe.mjs';
|
|
3
|
+
|
|
4
|
+
const tableDefaultVariants = {}
|
|
5
|
+
const tableCompoundVariants = []
|
|
6
|
+
|
|
7
|
+
const tableSlotNames = [
|
|
8
|
+
[
|
|
9
|
+
"root",
|
|
10
|
+
"table__root"
|
|
11
|
+
],
|
|
12
|
+
[
|
|
13
|
+
"thead",
|
|
14
|
+
"table__thead"
|
|
15
|
+
],
|
|
16
|
+
[
|
|
17
|
+
"tbody",
|
|
18
|
+
"table__tbody"
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"tr",
|
|
22
|
+
"table__tr"
|
|
23
|
+
],
|
|
24
|
+
[
|
|
25
|
+
"th",
|
|
26
|
+
"table__th"
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"td",
|
|
30
|
+
"table__td"
|
|
31
|
+
]
|
|
32
|
+
]
|
|
33
|
+
const tableSlotFns = /* @__PURE__ */ tableSlotNames.map(([slotName, slotKey]) => [slotName, createRecipe(slotKey, tableDefaultVariants, getSlotCompoundVariant(tableCompoundVariants, slotName))])
|
|
34
|
+
|
|
35
|
+
const tableFn = memo((props = {}) => {
|
|
36
|
+
return Object.fromEntries(tableSlotFns.map(([slotName, slotFn]) => [slotName, slotFn.recipeFn(props)]))
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
const tableVariantKeys = []
|
|
40
|
+
const getVariantProps = (variants) => ({ ...tableDefaultVariants, ...compact(variants) })
|
|
41
|
+
|
|
42
|
+
export const table = /* @__PURE__ */ Object.assign(tableFn, {
|
|
43
|
+
__recipe__: false,
|
|
44
|
+
__name__: 'table',
|
|
45
|
+
raw: (props) => props,
|
|
46
|
+
variantKeys: tableVariantKeys,
|
|
47
|
+
variantMap: {},
|
|
48
|
+
splitVariantProps(props) {
|
|
49
|
+
return splitProps(props, tableVariantKeys)
|
|
50
|
+
},
|
|
51
|
+
getVariantProps
|
|
52
|
+
})
|