@iress-oss/ids-theme-preset 6.0.0-alpha.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.
Files changed (54) hide show
  1. package/README.md +102 -0
  2. package/dist/chunk-6T7NHIQQ.js +2994 -0
  3. package/dist/chunk-OGLE65KO.js +149 -0
  4. package/dist/chunk-V3SF6JCX.js +75 -0
  5. package/dist/config.d.ts +13 -0
  6. package/dist/config.js +25 -0
  7. package/dist/constants.d.ts +150 -0
  8. package/dist/constants.js +22 -0
  9. package/dist/hooks/index.d.ts +23 -0
  10. package/dist/hooks/index.js +10 -0
  11. package/dist/index.d.ts +5 -0
  12. package/dist/index.js +9 -0
  13. package/dist/vite.d.ts +13 -0
  14. package/dist/vite.js +38 -0
  15. package/package.json +74 -0
  16. package/src/config-recipes/button.ts +739 -0
  17. package/src/config-recipes/table.ts +258 -0
  18. package/src/config-recipes/text.ts +237 -0
  19. package/src/constants.ts +193 -0
  20. package/src/createMinimalConfig.ts +29 -0
  21. package/src/globalCss.ts +8 -0
  22. package/src/hooks/codegenPrepareHook.test.ts +55 -0
  23. package/src/hooks/codegenPrepareHook.ts +57 -0
  24. package/src/hooks/cssgenDoneHook.test.ts +57 -0
  25. package/src/hooks/cssgenDoneHook.ts +31 -0
  26. package/src/hooks/index.ts +3 -0
  27. package/src/hooks/spacingAliasMap.test.ts +15 -0
  28. package/src/hooks/spacingAliasMap.ts +13 -0
  29. package/src/index.ts +133 -0
  30. package/src/staticCss.ts +103 -0
  31. package/src/tokens/animationStyles.ts +79 -0
  32. package/src/tokens/borders.ts +54 -0
  33. package/src/tokens/breakpoints.ts +9 -0
  34. package/src/tokens/colors.ts +286 -0
  35. package/src/tokens/keyframes.ts +74 -0
  36. package/src/tokens/layerStyles.ts +99 -0
  37. package/src/tokens/radii.ts +52 -0
  38. package/src/tokens/sizes.ts +184 -0
  39. package/src/tokens/spacing.ts +82 -0
  40. package/src/tokens/textStyles.ts +130 -0
  41. package/src/tokens/zIndex.ts +25 -0
  42. package/src/utilities/chevron.ts +33 -0
  43. package/src/utilities/focusable.ts +202 -0
  44. package/src/utilities/gutter.ts +20 -0
  45. package/src/utilities/horizontalAlign.ts +27 -0
  46. package/src/utilities/materialSymbols.ts +28 -0
  47. package/src/utilities/noGutter.ts +15 -0
  48. package/src/utilities/offset.ts +90 -0
  49. package/src/utilities/scrollable.ts +53 -0
  50. package/src/utilities/sliderThumb.ts +29 -0
  51. package/src/utilities/span.ts +136 -0
  52. package/src/utilities/stretch.ts +15 -0
  53. package/src/utilities/verticalAlign.ts +27 -0
  54. package/src/vite.ts +47 -0
@@ -0,0 +1,258 @@
1
+ import { cssVars } from '@iress-oss/ids-tokens';
2
+ import { defineSlotRecipe } from '@pandacss/dev';
3
+
4
+ export const tableRecipe = defineSlotRecipe({
5
+ className: 'table',
6
+ slots: [
7
+ 'root',
8
+ 'table',
9
+ 'caption',
10
+ 'sortHeader',
11
+ 'sortIcon',
12
+ 'sortIconInactive',
13
+ 'activator',
14
+ 'rowGroupHeader',
15
+ 'headerContent',
16
+ 'filterButton',
17
+ 'filterIndicator',
18
+ ],
19
+ base: {
20
+ root: {
21
+ display: 'block',
22
+ scrollable: 'true',
23
+ },
24
+ table: {
25
+ textStyle: 'typography.body.md',
26
+ bg: 'colour.neutral.10',
27
+ color: 'colour.neutral.90',
28
+ borderRadius: 'radius.system.layout',
29
+ borderSpacing: 'spacing.0',
30
+ minWidth: '12/12',
31
+ borderCollapse: 'collapse',
32
+ margin: 'spacing.0',
33
+
34
+ '& th, & td': {
35
+ paddingBlock: 'spacing.4',
36
+ paddingInline: 'spacing.4',
37
+ border: 'table',
38
+ borderLeftWidth: '0px',
39
+ borderRightWidth: '0px',
40
+ },
41
+
42
+ '& th': {
43
+ textAlign: 'start',
44
+ textStyle: 'typography.body.md.strong',
45
+ },
46
+
47
+ '& thead th': {
48
+ textStyle: 'typography.heading.5',
49
+ paddingBlock: 'spacing.2',
50
+ focusable: 'within:inset',
51
+ },
52
+
53
+ '& thead tr:first-child th, & thead tr:first-child td, &:not(:has(thead)) tbody tr:first-child th, &:not(:has(thead)) tbody tr:first-child td':
54
+ {
55
+ borderTopWidth: '0px',
56
+ },
57
+
58
+ '& tfoot tr:last-child th, & tfoot tr:last-child td, &:not(:has(tfoot)) tbody tr:last-child th:not([scope="rowgroup"]), &:not(:has(tfoot)) tbody tr:last-child td':
59
+ {
60
+ borderBottomWidth: '0px',
61
+ },
62
+ },
63
+ caption: {
64
+ textAlign: 'center',
65
+ textStyle: 'typography.heading.3',
66
+ paddingBlockEnd: 'spacing.2',
67
+ },
68
+ sortHeader: {
69
+ all: 'unset',
70
+ fontFamily: 'inherit',
71
+ fontWeight: 'inherit',
72
+ fontSize: 'inherit',
73
+ cursor: 'pointer',
74
+ },
75
+ sortIcon: {
76
+ fill: 'colour.neutral.90',
77
+ width: '[1.31em]',
78
+ height: '[1.31em]',
79
+ display: 'inline-block',
80
+ ml: 'spacing.1',
81
+
82
+ '& path': {
83
+ transition: 'fill 0.2s',
84
+ },
85
+ },
86
+ sortIconInactive: {
87
+ fill: 'colour.neutral.60',
88
+ },
89
+ activator: {
90
+ display: 'flex',
91
+ alignItems: 'center',
92
+ justifyContent: 'space-between',
93
+ position: 'relative',
94
+ width: '12/12',
95
+ cursor: 'pointer',
96
+ transition: 'all',
97
+ _hover: {
98
+ color: 'colour.primary.text',
99
+ },
100
+ },
101
+ headerContent: {
102
+ display: 'flex',
103
+ alignItems: 'center',
104
+ gap: 'spacing.1',
105
+ },
106
+ filterIndicator: {
107
+ position: 'absolute',
108
+ top: '[0px]',
109
+ right: '[.05em]',
110
+ width: '[8px]',
111
+ height: '[8px]',
112
+ borderRadius: '50%',
113
+ bg: 'colour.accent.fill',
114
+ border:
115
+ '[1.5px solid var(--iress-filter-button-bg, {colors.colour.primary.surfaceHover})]',
116
+ animationName: 'filterIndicatorBounceIn',
117
+ animationDuration: '0.4s',
118
+ animationTimingFunction: 'ease-out',
119
+ animationFillMode: 'both',
120
+ },
121
+ rowGroupHeader: {
122
+ textStyle: 'typography.heading.4',
123
+ cursor: 'pointer',
124
+ borderBlockEnd: 'divider',
125
+ transition: 'all',
126
+
127
+ _hover: {
128
+ borderBlockEnd: 'hover',
129
+ },
130
+ },
131
+ },
132
+ variants: {
133
+ alternate: {
134
+ true: {
135
+ table: {
136
+ '& tbody tr': {
137
+ _odd: {
138
+ bg: 'colour.neutral.20',
139
+ },
140
+ _even: {
141
+ bg: 'colour.neutral.10',
142
+ },
143
+ },
144
+ },
145
+ },
146
+ },
147
+ compact: {
148
+ true: {
149
+ table: {
150
+ border: 'table',
151
+ borderRadius: 'radius.system.layout',
152
+ borderCollapse: 'separate',
153
+
154
+ '& th, & td': {
155
+ padding: 'spacing.2',
156
+ borderTopWidth: '0px',
157
+ },
158
+ '& thead th, & thead td': {
159
+ bg: 'colour.primary.surface',
160
+ },
161
+ '& th, & thead th': {
162
+ textStyle: 'typography.body.md.medium',
163
+ },
164
+ '& > thead:first-of-type > :first-child > :first-child': {
165
+ borderTopLeftRadius: cssVars.radius.system._layout.topLeft,
166
+ },
167
+ '& > thead:first-of-type > :first-child > :last-child': {
168
+ borderTopRightRadius: cssVars.radius.system._layout.topRight,
169
+ },
170
+ '& > tbody:last-of-type > :last-child > :first-child': {
171
+ borderBottomLeftRadius: cssVars.radius.system._layout.bottomLeft,
172
+ },
173
+ '& > tbody:last-of-type > :last-child > :last-child': {
174
+ borderBottomRightRadius: cssVars.radius.system._layout.bottomRight,
175
+ },
176
+ },
177
+ caption: {
178
+ paddingBlock: 'spacing.5',
179
+ textAlign: 'left',
180
+ },
181
+ },
182
+ },
183
+ hover: {
184
+ true: {
185
+ table: {
186
+ '& tbody tr': {
187
+ _hover: {
188
+ bg: 'colour.primary.surfaceHover',
189
+ },
190
+ },
191
+ },
192
+ },
193
+ },
194
+ removeRowBorders: {
195
+ true: {
196
+ table: {
197
+ '& tbody th, & tbody td': {
198
+ borderBlockWidth: '0px',
199
+ },
200
+ },
201
+ },
202
+ },
203
+ sortButtonNoWrap: {
204
+ true: {
205
+ sortHeader: {
206
+ whiteSpace: 'nowrap',
207
+ },
208
+ },
209
+ },
210
+ tableBodyOpen: {
211
+ true: {},
212
+ },
213
+ hiddenCaption: {
214
+ true: {
215
+ caption: {
216
+ srOnly: true,
217
+ },
218
+ },
219
+ },
220
+ hasFilterButton: {
221
+ true: {
222
+ filterButton: {
223
+ color: 'colour.neutral.60',
224
+ textStyle: 'typography.body.sm.medium',
225
+ p: 'spacing.1',
226
+ aspectRatio: '1',
227
+ minWidth: '[0]',
228
+ minHeight: '[0]',
229
+ position: 'relative',
230
+ mr: 'spacing.1',
231
+
232
+ '&:hover:not([aria-expanded="true"])': {
233
+ '--iress-filter-button-bg': '{colors.colour.neutral.20}',
234
+ },
235
+ },
236
+ },
237
+ },
238
+ hasActiveFilter: {
239
+ true: {
240
+ filterButton: {
241
+ color: 'colour.primary.fill',
242
+ bg: 'colour.primary.surfaceHover',
243
+
244
+ '&[aria-expanded="true"]': {
245
+ '--iress-filter-button-bg': '{colors.colour.primary.surface}',
246
+ },
247
+ },
248
+ },
249
+ },
250
+ },
251
+ defaultVariants: {
252
+ compact: false,
253
+ hover: false,
254
+ sortButtonNoWrap: false,
255
+ tableBodyOpen: false,
256
+ },
257
+ staticCss: ['*'],
258
+ });
@@ -0,0 +1,237 @@
1
+ import { cssVars } from '@iress-oss/ids-tokens';
2
+ import { defineRecipe, type SystemStyleObject } from '@pandacss/dev';
3
+
4
+ const inlineStyles = {
5
+ '& code': {
6
+ textStyle: 'typography.code',
7
+ paddingBlock: 'spacing.0',
8
+ paddingInline: 'spacing.1',
9
+ background: 'colour.neutral.20',
10
+ color: 'colour.neutral.80',
11
+ borderWidth: '0.5px',
12
+ borderColor: 'colour.neutral.30',
13
+ borderRadius: 'radius.system.form',
14
+ alignSelf: 'flex-start',
15
+ },
16
+ '& small': {
17
+ textStyle: 'typography.body.sm',
18
+ },
19
+ '& cite': {
20
+ textStyle: 'typography.body.sm',
21
+ },
22
+ '& caption:not(table[class] *)': {
23
+ textStyle: 'typography.body.sm',
24
+ display: 'block',
25
+ },
26
+ '& a:not([class])': {
27
+ color: 'colour.primary.text',
28
+ fontWeight: cssVars.typography.body.md._medium.fontWeight,
29
+ textDecoration: 'underline',
30
+ _hover: {
31
+ textDecoration: 'none',
32
+ },
33
+ },
34
+ } satisfies SystemStyleObject;
35
+
36
+ const blockStyles = {
37
+ '& h1': {
38
+ textStyle: 'typography.heading.1',
39
+ },
40
+ '& h2': {
41
+ textStyle: 'typography.heading.2',
42
+ },
43
+ '& h3': {
44
+ textStyle: 'typography.heading.3',
45
+ },
46
+ '& h4': {
47
+ textStyle: 'typography.heading.4',
48
+ },
49
+ '& h5': {
50
+ textStyle: 'typography.heading.5',
51
+ },
52
+ '& h6': {
53
+ textStyle: 'typography.body.sm.strong',
54
+ },
55
+ _nestedHeadings: {
56
+ marginBlockStart: 'spacing.4',
57
+ marginBlockEnd: 'spacing.2',
58
+ '&:first-child': {
59
+ marginBlockStart: 'spacing.0',
60
+ },
61
+ '&:has(+ p)': {
62
+ marginBlockEnd: 'spacing.1',
63
+ },
64
+ '& + p': {
65
+ marginBlockStart: 'spacing.1',
66
+ },
67
+ '& *': {
68
+ fontSize: 'inherit',
69
+ },
70
+ '& code': {
71
+ fontSize: '0.9em !important', // TODO: Remove this when we have a better solution for code in headings
72
+ },
73
+ },
74
+ '& p': {
75
+ marginBlock: 'spacing.4',
76
+ _siblingHeadings: {
77
+ marginBlockStart: 'spacing.8',
78
+ },
79
+ '&:first-child': {
80
+ marginBlockStart: 'spacing.0',
81
+ },
82
+ '&:last-child': {
83
+ marginBlockEnd: 'spacing.0',
84
+ },
85
+ },
86
+ '& blockquote': {
87
+ fontStyle: 'italic',
88
+ marginBlockStart: '[0px]',
89
+ marginInlineStart: '[0px]',
90
+ position: 'relative',
91
+ paddingInlineStart: 'spacing.7',
92
+ _after: {
93
+ content: `''`,
94
+ backgroundColor: 'colour.neutral.30',
95
+ width:
96
+ 'var(--iress-blockquote-border-width, var(--iress-text-blockquote-border-width, var(--iress-default-border-width--lg, 5px)))',
97
+ insetBlockStart: '[0px]',
98
+ insetInlineStart: '[0px]',
99
+ position: 'absolute',
100
+ height: '[100%]',
101
+ },
102
+ },
103
+ '& hr': {
104
+ border: 0,
105
+ borderBlockStart: 'divider',
106
+ marginBlock: 'spacing.6',
107
+ },
108
+ '& ul': {
109
+ listStyleType: 'disc',
110
+ marginBlockEnd: 'spacing.4',
111
+ paddingInlineStart: 'spacing.4',
112
+ '& > li': {
113
+ marginBlockEnd: 'spacing.1',
114
+ },
115
+ _siblingHeadings: {
116
+ marginBlockStart: 'spacing.8',
117
+ },
118
+ },
119
+ '& ol': {
120
+ listStyleType: 'decimal',
121
+ marginBlockEnd: 'spacing.4',
122
+ paddingInlineStart: 'spacing.6',
123
+ '& > li': {
124
+ marginBlockEnd: 'spacing.1',
125
+ },
126
+ _siblingHeadings: {
127
+ marginBlockStart: 'spacing.8',
128
+ },
129
+ },
130
+ '& table:not([class])': {
131
+ border: 'none',
132
+ borderCollapse: 'collapse',
133
+ borderSpacing: 0,
134
+ minWidth: '100%',
135
+ mb: 'xl',
136
+
137
+ '& th, & td': {
138
+ paddingInline: 'spacing.1',
139
+ paddingBlock: 'spacing.4',
140
+ border: 'table',
141
+ borderLeftWidth: '0px',
142
+ borderRightWidth: '0px',
143
+ },
144
+
145
+ '& th:first-child, & td:first-child': {
146
+ paddingInlineStart: 'spacing.0',
147
+ },
148
+
149
+ '& th:last-child, & td:last-child': {
150
+ paddingInlineEnd: 'spacing.0',
151
+ },
152
+
153
+ '& th': {
154
+ textAlign: 'start',
155
+ textStyle: 'typography.regular.md.strong',
156
+ },
157
+
158
+ '& thead th': {
159
+ textStyle: 'typography.heading.5',
160
+ },
161
+
162
+ '& thead tr:first-child th, & thead tr:first-child td, &:not(:has(thead)) tbody tr:first-child th, &:not(:has(thead)) tbody tr:first-child td':
163
+ {
164
+ borderTopWidth: '0px',
165
+ },
166
+
167
+ '& tfoot tr:last-child th, & tfoot tr:last-child td, &:not(:has(tfoot)) tbody tr:last-child th, &:not(:has(tfoot)) tbody tr:last-child td':
168
+ {
169
+ borderBottomWidth: '0px',
170
+ },
171
+ },
172
+ '& pre:not(:has(.docblock-source:only-child), [class], .sbdocs-diff-viewer *)':
173
+ {
174
+ textStyle: 'typography.code',
175
+ paddingBlock: 'spacing.2',
176
+ paddingInline: 'spacing.2',
177
+ background: 'colour.neutral.20',
178
+ color: 'colour.neutral.80',
179
+ borderWidth: '0.5px',
180
+ borderColor: 'colour.neutral.30',
181
+ borderRadius: 'radius.system.form',
182
+ overflow: 'auto',
183
+ },
184
+ } satisfies SystemStyleObject;
185
+
186
+ export const textRecipe = defineRecipe({
187
+ className: 'text',
188
+ description:
189
+ 'The styles for an element that displays text based on the design system guidelines.',
190
+ base: {
191
+ color: 'colour.neutral.80',
192
+ textStyle: 'typography.body.md',
193
+ },
194
+ variants: {
195
+ /**
196
+ * The HTML element that should be rendered.
197
+ */
198
+ element: {
199
+ p: {
200
+ marginBlockEnd: 'spacing.2',
201
+ },
202
+ div: blockStyles,
203
+ span: {},
204
+ h1: blockStyles['& h1'],
205
+ h2: blockStyles['& h2'],
206
+ h3: blockStyles['& h3'],
207
+ h4: blockStyles['& h4'],
208
+ h5: blockStyles['& h5'],
209
+ h6: blockStyles['& h6'],
210
+ code: inlineStyles['& code'],
211
+ small: inlineStyles['& small'],
212
+ cite: inlineStyles['& cite'],
213
+ caption: inlineStyles['& caption:not(table[class] *)'],
214
+ strong: {
215
+ textStyle: 'typography.body.md.strong',
216
+ },
217
+ em: {
218
+ textStyle: 'typography.body.md.em',
219
+ },
220
+ a: inlineStyles['& a:not([class])'],
221
+ blockquote: blockStyles['& blockquote'],
222
+ pre: blockStyles[
223
+ '& pre:not(:has(.docblock-source:only-child), [class], .sbdocs-diff-viewer *)'
224
+ ],
225
+ },
226
+ },
227
+ compoundVariants: [
228
+ {
229
+ element: ['p', 'div', 'span'],
230
+ css: inlineStyles,
231
+ },
232
+ ],
233
+ defaultVariants: {
234
+ element: 'div',
235
+ },
236
+ staticCss: ['*'],
237
+ });
@@ -0,0 +1,193 @@
1
+ /**
2
+ * Details about a specific breakpoint in the design system.
3
+ */
4
+ export interface BreakpointDetail {
5
+ /** The maximum width of the container at this breakpoint. */
6
+ containerMaxWidth: string;
7
+ /** The margin on the left and right of the container at this breakpoint. */
8
+ margin?: string;
9
+ /** The maximum number of columns to display in a grid layout at this breakpoint. */
10
+ maxColumns?: number;
11
+ /** The maximum screen width for the breakpoint. */
12
+ maxScreenWidth?: string;
13
+ /** The media query string for the breakpoint. Must be valid CSS media query syntax. */
14
+ mediaQuery: string;
15
+ /** The minimum screen width for the breakpoint. */
16
+ minScreenWidth: string;
17
+ /** The name of the screen width range for the breakpoint. */
18
+ screenWidthRange: string;
19
+ /** The viewport width in pixels for the breakpoint. */
20
+ viewportWidth: number;
21
+ }
22
+
23
+ /**
24
+ * Breakpoints are the points at which the layout of a page will change in response to the size of the viewport.
25
+ */
26
+ export const BREAKPOINT_DETAILS = {
27
+ /**
28
+ * Extra small breakpoint, for mobile devices
29
+ */
30
+ xs: {
31
+ mediaQuery: '(min-width: 0) and (max-width: 575px)',
32
+ screenWidthRange: '0 - 575px',
33
+ margin: 'spacing.4',
34
+ maxColumns: 4,
35
+ minScreenWidth: '0px',
36
+ maxScreenWidth: '575px',
37
+ containerMaxWidth: '100%',
38
+ viewportWidth: 360,
39
+ },
40
+ /**
41
+ * Small breakpoint, for larger mobile devices and tablets
42
+ */
43
+ sm: {
44
+ mediaQuery: '(min-width: 576px) and (max-width: 767px)',
45
+ screenWidthRange: '576px - 767px',
46
+ margin: 'spacing.4',
47
+ minScreenWidth: '576px',
48
+ maxScreenWidth: '767px',
49
+ containerMaxWidth: '100%',
50
+ viewportWidth: 767,
51
+ },
52
+ /**
53
+ * Medium breakpoint for tablets and small desktops
54
+ */
55
+ md: {
56
+ mediaQuery: '(min-width: 768px) and (max-width: 1023px)',
57
+ screenWidthRange: '768px - 1023px',
58
+ margin: 'spacing.6',
59
+ maxColumns: 4,
60
+ minScreenWidth: '768px',
61
+ maxScreenWidth: '1023px',
62
+ containerMaxWidth: '100%',
63
+ viewportWidth: 1022,
64
+ },
65
+ /**
66
+ * Large breakpoint for desktops
67
+ */
68
+ lg: {
69
+ mediaQuery: '(min-width: 1024px) and (max-width: 1279px)',
70
+ screenWidthRange: '1024px - 1279px',
71
+ margin: 'spacing.6',
72
+ maxColumns: 6,
73
+ minScreenWidth: '1024px',
74
+ maxScreenWidth: '1279px',
75
+ containerMaxWidth: '100%',
76
+ viewportWidth: 1278,
77
+ },
78
+ /**
79
+ * Extra large breakpoint for large desktops
80
+ */
81
+ xl: {
82
+ mediaQuery: '(min-width: 1280px) and (max-width: 1599px)',
83
+ screenWidthRange: '1280px - 1599px',
84
+ margin: 'spacing.8',
85
+ minScreenWidth: '1280px',
86
+ maxScreenWidth: '1599px',
87
+ containerMaxWidth: '1440px',
88
+ viewportWidth: 1440 + 64,
89
+ },
90
+ /**
91
+ * Extra extra large breakpoint for extra large desktops (32inch)
92
+ */
93
+ xxl: {
94
+ mediaQuery: '(min-width: 1600px)',
95
+ margin: 'spacing.8',
96
+ screenWidthRange: '1600px and above',
97
+ minScreenWidth: '1600px',
98
+ containerMaxWidth: '1690px',
99
+ viewportWidth: 1690 + 64,
100
+ },
101
+ } as const satisfies Record<string, BreakpointDetail>;
102
+
103
+ /**
104
+ * The breakpoints used in the design system.
105
+ */
106
+ export const BREAKPOINTS = Object.keys(
107
+ BREAKPOINT_DETAILS,
108
+ ) as (keyof typeof BREAKPOINT_DETAILS)[];
109
+
110
+ /**
111
+ * The widths available for form elements.
112
+ */
113
+ export const FORM_ELEMENT_WIDTHS = [
114
+ '2',
115
+ '4',
116
+ '6',
117
+ '8',
118
+ '10',
119
+ '12',
120
+ '16',
121
+ '25%',
122
+ '50%',
123
+ '75%',
124
+ '100%',
125
+ ] as const;
126
+
127
+ /**
128
+ * The grid size is the base unit of the grid system.
129
+ */
130
+ export const GRID_SIZE = 12;
131
+
132
+ /**
133
+ * The z-index determines the stacking order of elements.
134
+ */
135
+ export const Z_INDEX = {
136
+ DEFAULT: 0,
137
+ NAVBAR: 100,
138
+ POPOVER: 200,
139
+ SLIDEOUT: 300,
140
+ MODAL: 400,
141
+ TOAST: 500,
142
+ TOOLTIP: 600,
143
+ };
144
+
145
+ /**
146
+ * Material Symbols icon configuration.
147
+ */
148
+ export const MATERIAL_SYMBOLS = {
149
+ family: 'Material Symbols Rounded',
150
+ className: 'material-symbols-rounded',
151
+ figmaGrade: 'Emphasis',
152
+ figmaOpticalSize: '24dp',
153
+ grade: 0,
154
+ opticalSize: 36,
155
+ weight: 300,
156
+ } as const;
157
+
158
+ /**
159
+ * The horizontal alignment options.
160
+ */
161
+ export const HORIZONTAL_ALIGNS = [
162
+ 'around',
163
+ 'between',
164
+ 'center',
165
+ 'evenly',
166
+ 'left',
167
+ 'right',
168
+ 'stretch',
169
+ ] as const;
170
+
171
+ /**
172
+ * The text alignment options.
173
+ */
174
+ export const TEXT_ALIGNS = [
175
+ 'inherit',
176
+ 'left',
177
+ 'center',
178
+ 'right',
179
+ 'justify',
180
+ ] as const;
181
+
182
+ /**
183
+ * The vertical alignment options.
184
+ */
185
+ export const VERTICAL_ALIGNS = [
186
+ 'top',
187
+ 'middle',
188
+ 'bottom',
189
+ 'between',
190
+ 'around',
191
+ 'evenly',
192
+ 'stretch',
193
+ ] as const;
@@ -0,0 +1,29 @@
1
+ import type { Config } from '@pandacss/dev';
2
+ import idsThemePreset from './index';
3
+ import { codegenPrepareHook } from './hooks/codegenPrepareHook';
4
+ import { cssgenDoneHook } from './hooks/cssgenDoneHook';
5
+
6
+ /**
7
+ * Returns Panda CSS config overrides for packages that already include
8
+ * `@iress-oss/ids-components` style.css.
9
+ *
10
+ * Includes the IDS theme preset and disables preflight, globalCss, and
11
+ * staticCss to avoid duplicating CSS already shipped by IDS components.
12
+ * Panda will still generate CSS for utilities your code actually uses.
13
+ */
14
+ export function createMinimalConfig(): Pick<
15
+ Config,
16
+ 'presets' | 'preflight' | 'staticCss' | 'globalCss' | 'hooks'
17
+ > {
18
+ return {
19
+ presets: [idsThemePreset],
20
+ preflight: false,
21
+ staticCss: { css: [] },
22
+ globalCss: {},
23
+ hooks: {
24
+ 'codegen:prepare': ({ artifacts }) => codegenPrepareHook(artifacts),
25
+ 'cssgen:done': ({ artifact, content }) =>
26
+ cssgenDoneHook(artifact, content),
27
+ },
28
+ };
29
+ }