@okshaun/components 4.1.5 → 5.0.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.
Files changed (59) hide show
  1. package/README.md +1 -1
  2. package/dist/icon-metadata.json +134 -0
  3. package/dist/index.js +16208 -10749
  4. package/dist/index.js.map +1 -1
  5. package/dist/panda.buildinfo.json +754 -530
  6. package/dist/{preset-jXQwQ5KL.js → preset-B6fsdoKY.js} +2338 -317
  7. package/dist/preset-B6fsdoKY.js.map +1 -0
  8. package/dist/preset.js +1 -1
  9. package/dist/specs/keyframes.json +66 -0
  10. package/dist/specs/recipes.json +394 -26
  11. package/dist/specs/tokens.json +15 -0
  12. package/dist/sprite.svg +1 -1
  13. package/dist/sprite.symbol.html +248 -2
  14. package/dist/styles.css +3971 -789
  15. package/dist/svgs/barcode-reader-off.svg +1 -0
  16. package/dist/svgs/circle-dashed.svg +1 -0
  17. package/dist/svgs/drawer-left-hide.svg +1 -0
  18. package/dist/svgs/drawer-left-show.svg +1 -0
  19. package/dist/svgs/drawer-right-hide.svg +1 -0
  20. package/dist/svgs/drawer-right-show.svg +1 -0
  21. package/dist/svgs/not-equal.svg +1 -0
  22. package/dist/svgs/square-dashed.svg +1 -0
  23. package/dist/types/index.d.ts +2989 -115
  24. package/package.json +9 -12
  25. package/src/recipes/alert.ts +80 -0
  26. package/src/recipes/autocomplete.ts +2 -2
  27. package/src/recipes/avatar.ts +13 -6
  28. package/src/recipes/button.ts +41 -30
  29. package/src/recipes/checkbox.ts +3 -0
  30. package/src/recipes/chip.ts +16 -0
  31. package/src/recipes/code.ts +40 -23
  32. package/src/recipes/codeBlock.ts +277 -0
  33. package/src/recipes/drawer.ts +150 -0
  34. package/src/recipes/filterField.ts +138 -0
  35. package/src/recipes/filterMenu.ts +71 -0
  36. package/src/recipes/filterToken.ts +189 -0
  37. package/src/recipes/inlineNote.ts +49 -0
  38. package/src/recipes/keyFact.ts +111 -0
  39. package/src/recipes/listItem.ts +25 -0
  40. package/src/recipes/menu.ts +41 -2
  41. package/src/recipes/pageBanner.ts +110 -0
  42. package/src/recipes/peekBar.ts +35 -0
  43. package/src/recipes/popover.ts +206 -0
  44. package/src/recipes/printPreview.ts +101 -0
  45. package/src/recipes/recipes-regular.ts +1 -1
  46. package/src/recipes/recipes-slot.ts +14 -0
  47. package/src/recipes/segmentedFields.ts +11 -5
  48. package/src/recipes/select.ts +204 -63
  49. package/src/recipes/spinner.ts +1 -1
  50. package/src/recipes/tabs.ts +161 -0
  51. package/src/recipes/tag.ts +13 -2
  52. package/src/recipes/timeMenus.ts +1 -1
  53. package/src/recipes/toast.ts +116 -0
  54. package/src/recipes/toggle.ts +3 -3
  55. package/src/styles/primitives/fontSizes.ts +1 -0
  56. package/src/styles/primitives/radii.ts +2 -0
  57. package/src/styles/utilities/keyframes.ts +38 -0
  58. package/src/utils/compoundComponent.ts +29 -0
  59. package/dist/preset-jXQwQ5KL.js.map +0 -1
@@ -0,0 +1,206 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ import { globalBaseStyles } from '~/styles/utilities';
4
+
5
+ const popoverBase = {
6
+ content: {
7
+ ...globalBaseStyles,
8
+ display: 'flex',
9
+ flexDirection: 'column',
10
+ bg: 'surface.overlay',
11
+ color: 'text',
12
+ borderRadius: '8',
13
+ border: 'default',
14
+ boxShadow: 'overlay',
15
+ outline: 'none',
16
+ },
17
+ header: {
18
+ display: 'flex',
19
+ alignItems: 'flex-start',
20
+ justifyContent: 'space-between',
21
+ gap: '8',
22
+ px: '12',
23
+ pt: '12',
24
+ pb: '4',
25
+ },
26
+ title: {
27
+ display: 'flex',
28
+ alignItems: 'center',
29
+ gap: '6',
30
+ fontWeight: 'bold',
31
+ color: 'text',
32
+ lineHeight: 'tight',
33
+ minW: '0',
34
+ flex: '1',
35
+ },
36
+ titleIcon: {
37
+ display: 'flex',
38
+ alignItems: 'center',
39
+ flex: 'none',
40
+ },
41
+ description: {
42
+ color: 'text.subtle',
43
+ lineHeight: 'default',
44
+ px: '12',
45
+ pb: '4',
46
+ },
47
+ body: {
48
+ display: 'flex',
49
+ flexDirection: 'column',
50
+ gap: '8',
51
+ px: '12',
52
+ py: '8',
53
+ color: 'text',
54
+ lineHeight: 'default',
55
+ },
56
+ // Content can't clip overflow without clipping the arrow, so media rounds
57
+ // its own corners when it sits at the top or bottom edge of the panel.
58
+ media: {
59
+ display: 'block',
60
+ width: 'full',
61
+ overflow: 'hidden',
62
+ _first: { borderTopRadius: '8' },
63
+ _last: { borderBottomRadius: '8' },
64
+ '& img': {
65
+ display: 'block',
66
+ width: 'full',
67
+ height: 'auto',
68
+ },
69
+ },
70
+ footer: {
71
+ display: 'flex',
72
+ alignItems: 'center',
73
+ justifyContent: 'flex-end',
74
+ flexWrap: 'wrap',
75
+ gap: '8',
76
+ px: '12',
77
+ pt: '4',
78
+ pb: '12',
79
+ },
80
+ close: {
81
+ flex: 'none',
82
+ ms: 'auto',
83
+ },
84
+ // Applied only to the fallback element PopoverTrigger renders for plain
85
+ // content, never to a consumer's cloned child. Reads as an inline
86
+ // dashed-underline phrase whether it renders a button or a span.
87
+ trigger: {
88
+ appearance: 'none',
89
+ display: 'inline',
90
+ width: 'fit',
91
+ p: '0',
92
+ m: '0',
93
+ bg: 'transparent',
94
+ borderWidth: '0',
95
+ color: 'inherit',
96
+ font: 'inherit',
97
+ textAlign: 'inherit',
98
+ textDecoration: 'underline',
99
+ textDecorationStyle: 'dashed',
100
+ textDecorationThickness: '[0.0625em]',
101
+ textUnderlineOffset: '[0.15625em]',
102
+ textDecorationSkipInk: 'all',
103
+ cursor: 'pointer',
104
+ _focusVisible: {
105
+ borderRadius: '2',
106
+ outlineWidth: '2',
107
+ outlineStyle: 'solid',
108
+ outlineColor: 'border.focused',
109
+ },
110
+ },
111
+ };
112
+
113
+ const popoverVariants = {
114
+ interaction: {
115
+ definition: { trigger: { cursor: 'help' } },
116
+ rich: {},
117
+ },
118
+ /** z-index layer inherited from FloatingLayerContext (raised inside modals). */
119
+ layer: {
120
+ elevated: { content: { zIndex: 'elevated' } },
121
+ modalFloating: { content: { zIndex: 'modalFloating' } },
122
+ },
123
+ size: {
124
+ sm: {
125
+ content: { maxW: '280', fontSize: '12' },
126
+ title: { fontSize: '12' },
127
+ description: { fontSize: '12' },
128
+ body: { fontSize: '12' },
129
+ },
130
+ md: {
131
+ content: { maxW: 'xs', fontSize: '14' },
132
+ title: { fontSize: '14' },
133
+ description: { fontSize: '14' },
134
+ body: { fontSize: '14' },
135
+ },
136
+ lg: {
137
+ content: { maxW: 'sm', fontSize: '14' },
138
+ title: { fontSize: '16' },
139
+ description: { fontSize: '14' },
140
+ body: { fontSize: '14' },
141
+ },
142
+ },
143
+ /**
144
+ * Visual tone for handbook-style notes. Quiet chrome only: left accent bar +
145
+ * soft title tint. Surface stays neutral (surface.overlay). Never maps to
146
+ * role="alert".
147
+ */
148
+ tone: {
149
+ note: {
150
+ content: { borderLeft: 'default', borderLeftWidth: '4' },
151
+ title: { color: 'text.subtle' },
152
+ },
153
+ tip: {
154
+ content: { borderLeft: 'info', borderLeftWidth: '4' },
155
+ title: { color: 'text.subtle' },
156
+ },
157
+ warning: {
158
+ content: { borderLeft: 'warning', borderLeftWidth: '4' },
159
+ title: { color: 'text.warning' },
160
+ },
161
+ important: {
162
+ content: { borderLeft: 'danger', borderLeftWidth: '4' },
163
+ title: { color: 'text.danger' },
164
+ },
165
+ caution: {
166
+ content: { borderLeft: 'warning', borderLeftWidth: '4' },
167
+ title: { color: 'text.warning' },
168
+ },
169
+ },
170
+ };
171
+
172
+ export const popoverRecipe = defineSlotRecipe({
173
+ className: 'popover',
174
+ jsx: [
175
+ 'Popover',
176
+ 'PopoverTrigger',
177
+ 'PopoverContent',
178
+ 'PopoverHeader',
179
+ 'PopoverTitle',
180
+ 'PopoverDescription',
181
+ 'PopoverBody',
182
+ 'PopoverMedia',
183
+ 'PopoverFooter',
184
+ 'PopoverClose',
185
+ 'PopoverArrow',
186
+ ],
187
+ slots: [
188
+ 'content',
189
+ 'header',
190
+ 'title',
191
+ 'titleIcon',
192
+ 'description',
193
+ 'body',
194
+ 'media',
195
+ 'footer',
196
+ 'close',
197
+ 'trigger',
198
+ ],
199
+ base: popoverBase,
200
+ variants: popoverVariants,
201
+ defaultVariants: {
202
+ size: 'md',
203
+ interaction: 'rich',
204
+ layer: 'elevated',
205
+ },
206
+ });
@@ -0,0 +1,101 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ /**
4
+ * Print preview geometry comes from CSS variables that the components set:
5
+ * `--print-scale`, `--print-page-w`, `--print-page-h`, and
6
+ * `--print-margin-{top,right,bottom,left}`. Lengths are page-space pixels.
7
+ */
8
+ export const printPreviewRecipe = defineSlotRecipe({
9
+ className: 'printPreview',
10
+ jsx: ['PrintPreview', 'PrintPage'],
11
+ slots: ['root', 'stack', 'page', 'sheet', 'overlay', 'marginArea', 'margins'],
12
+ base: {
13
+ root: {
14
+ position: 'relative',
15
+ w: 'full',
16
+ h: 'full',
17
+ overflow: 'auto',
18
+ // A scrollbar that appears would change the width and the fit scale.
19
+ scrollbarGutter: 'stable',
20
+ bg: 'surface.sunken',
21
+ p: '24',
22
+ _focusVisible: {
23
+ outlineWidth: '2',
24
+ outlineStyle: 'solid',
25
+ outlineColor: 'border.focused',
26
+ outlineOffset: '-2',
27
+ },
28
+ },
29
+ stack: {
30
+ display: 'flex',
31
+ flexDirection: 'column',
32
+ alignItems: 'flex-start',
33
+ gap: '24',
34
+ w: 'max-content',
35
+ minW: 'full',
36
+ },
37
+ page: {
38
+ position: 'relative',
39
+ flexShrink: 0,
40
+ // Auto margins center the page without clipping it when it overflows.
41
+ mx: 'auto',
42
+ w: 'calc(var(--print-page-w) * var(--print-scale))',
43
+ h: 'calc(var(--print-page-h) * var(--print-scale))',
44
+ boxShadow: 'raised',
45
+ '&[data-measuring=true]': {
46
+ visibility: 'hidden',
47
+ },
48
+ },
49
+ sheet: {
50
+ position: 'absolute',
51
+ top: '0',
52
+ left: '0',
53
+ w: 'var(--print-page-w)',
54
+ h: 'var(--print-page-h)',
55
+ overflow: 'hidden',
56
+ // Paper is white in both themes. The token system has no light scope to
57
+ // reset semantic colors inside dark mode, so these are primitives.
58
+ bg: 'neutral.0',
59
+ color: 'neutral.110',
60
+ transform: 'scale(var(--print-scale))',
61
+ transformOrigin: 'top left',
62
+ },
63
+ overlay: {
64
+ position: 'absolute',
65
+ inset: '0',
66
+ pointerEvents: 'none',
67
+ },
68
+ // Stripes fill the margins. The padding is the margin, and the mask cuts
69
+ // out the content box. Drawn outside the scaled sheet, so stripe width and
70
+ // spacing stay the same at any zoom.
71
+ marginArea: {
72
+ position: 'absolute',
73
+ inset: '0',
74
+ pt: 'calc(var(--print-margin-top) * var(--print-scale))',
75
+ pr: 'calc(var(--print-margin-right) * var(--print-scale))',
76
+ pb: 'calc(var(--print-margin-bottom) * var(--print-scale))',
77
+ pl: 'calc(var(--print-margin-left) * var(--print-scale))',
78
+ bgImage:
79
+ 'repeating-linear-gradient(-45deg, token(colors.border.info) 0 token(sizes.1), transparent token(sizes.1) token(sizes.8))',
80
+ opacity: '0.3',
81
+ // validate-ignore: no-hardcoded-design-values-in-recipes — mask alpha only, never painted
82
+ mask: 'linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)',
83
+ maskComposite: 'exclude',
84
+ // biome-ignore lint/style/useNamingConvention: vendor-prefixed CSS property
85
+ WebkitMaskComposite: 'xor',
86
+ pointerEvents: 'none',
87
+ },
88
+ // Drawn outside the scaled sheet so the guide stays one pixel wide.
89
+ margins: {
90
+ position: 'absolute',
91
+ top: 'calc(var(--print-margin-top) * var(--print-scale))',
92
+ right: 'calc(var(--print-margin-right) * var(--print-scale))',
93
+ bottom: 'calc(var(--print-margin-bottom) * var(--print-scale))',
94
+ left: 'calc(var(--print-margin-left) * var(--print-scale))',
95
+ borderWidth: '1',
96
+ borderStyle: 'dashed',
97
+ borderColor: 'border.info',
98
+ pointerEvents: 'none',
99
+ },
100
+ },
101
+ });
@@ -2,7 +2,7 @@ export { boxRecipe } from './box';
2
2
  export { breakpointIndicatorRecipe } from './breakpointIndicator';
3
3
  export { cardRecipe } from './card';
4
4
  export { checkboxInputRecipe } from './checkboxInput';
5
- export { codeRecipe, preRecipe } from './code';
5
+ export { codeRecipe } from './code';
6
6
  export { dividerRecipe } from './divider';
7
7
  export { highlightTextRecipe } from './highlightText';
8
8
  export { iconRecipe } from './icon';
@@ -1,3 +1,4 @@
1
+ export { alertRecipe } from './alert';
1
2
  export { autocompleteRecipe } from './autocomplete';
2
3
  export { avatarRecipe } from './avatar';
3
4
  export { badgeRecipe } from './badge';
@@ -6,20 +7,33 @@ export { buttonRecipe, iconButtonRecipe } from './button';
6
7
  export { calendarRecipe } from './calendar';
7
8
  export { checkboxRecipe } from './checkbox';
8
9
  export { chipRecipe } from './chip';
10
+ export { codeBlockRecipe } from './codeBlock';
9
11
  export { dateMenusRecipe } from './dateMenus';
10
12
  export { dateTimeMenusRecipe } from './dateTimeMenus';
13
+ export { drawerRecipe } from './drawer';
14
+ export { filterFieldRecipe } from './filterField';
15
+ export { filterMenuRecipe } from './filterMenu';
16
+ export { filterTokenRecipe } from './filterToken';
11
17
  export { formFieldRecipe } from './formField';
18
+ export { inlineNoteRecipe } from './inlineNote';
12
19
  export { kbdRecipe } from './kbd';
20
+ export { keyFactRecipe } from './keyFact';
13
21
  export { listItemRecipe } from './listItem';
14
22
  export { listItemGroupRecipe } from './listItemGroup';
15
23
  export { menuRecipe } from './menu';
16
24
  export { modalRecipe } from './modal';
25
+ export { pageBannerRecipe } from './pageBanner';
26
+ export { peekBarRecipe } from './peekBar';
27
+ export { popoverRecipe } from './popover';
28
+ export { printPreviewRecipe } from './printPreview';
17
29
  export { radioRecipe } from './radio';
18
30
  export { segmentedFieldsRecipe } from './segmentedFields';
19
31
  export { segmentedInputsRecipe } from './segmentedInputs';
20
32
  export { selectRecipe } from './select';
21
33
  export { spinnerRecipe } from './spinner';
34
+ export { tabsRecipe } from './tabs';
22
35
  export { textInputRecipe } from './textInput';
23
36
  export { timeMenusRecipe } from './timeMenus';
37
+ export { toastRecipe } from './toast';
24
38
  export { toggleRecipe } from './toggle';
25
39
  export { tooltipRecipe } from './tooltip';
@@ -13,8 +13,6 @@ const segmentedFieldsBase = {
13
13
  display: 'flex',
14
14
  alignItems: 'center',
15
15
  width: 'full',
16
- py: 'var(--input-py)',
17
- px: 'var(--input-px)',
18
16
  bg: 'bg.input',
19
17
  borderWidth: '1',
20
18
  borderStyle: 'solid',
@@ -58,6 +56,14 @@ const segmentedFieldsBase = {
58
56
  },
59
57
  },
60
58
  },
59
+ content: {
60
+ display: 'flex',
61
+ alignItems: 'center',
62
+ flex: '1 1 auto',
63
+ minW: '0',
64
+ py: 'var(--input-py)',
65
+ px: 'var(--input-px)',
66
+ },
61
67
  slot: {
62
68
  display: 'inline-flex',
63
69
  alignItems: 'center',
@@ -146,7 +152,7 @@ const segmentedFieldsVariants = {
146
152
  },
147
153
  before: {
148
154
  true: {
149
- container: {
155
+ content: {
150
156
  ps: '0',
151
157
  },
152
158
  buttonSlot: {
@@ -159,7 +165,7 @@ const segmentedFieldsVariants = {
159
165
  },
160
166
  after: {
161
167
  true: {
162
- container: {
168
+ content: {
163
169
  pe: '0',
164
170
  },
165
171
  buttonSlot: {
@@ -183,7 +189,7 @@ export const segmentedFieldsRecipe = defineSlotRecipe({
183
189
  'TimeRangeInput',
184
190
  'DateTimeInput',
185
191
  ],
186
- slots: ['container', 'slot', 'buttonSlot'],
192
+ slots: ['container', 'content', 'slot', 'buttonSlot'],
187
193
  base: segmentedFieldsBase,
188
194
  variants: segmentedFieldsVariants,
189
195
  defaultVariants: {