@okshaun/components 3.0.0 → 4.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 (67) hide show
  1. package/dist/icon-metadata.json +359 -42
  2. package/dist/index.js +12890 -5844
  3. package/dist/index.js.map +1 -1
  4. package/dist/panda.buildinfo.json +523 -501
  5. package/dist/{preset-BAn5LBiW.js → preset-BOFHjPdQ.js} +1986 -2045
  6. package/dist/preset-BOFHjPdQ.js.map +1 -0
  7. package/dist/preset.js +1 -1
  8. package/dist/specs/conditions.json +75 -51
  9. package/dist/specs/keyframes.json +22 -0
  10. package/dist/specs/recipes.json +222 -106
  11. package/dist/specs/semantic-tokens.json +152 -44
  12. package/dist/specs/tokens.json +16 -36
  13. package/dist/sprite.svg +1 -1
  14. package/dist/sprite.symbol.html +445 -44
  15. package/dist/styles.css +11268 -13251
  16. package/dist/svgs/cheese.svg +1 -0
  17. package/dist/svgs/collapse-vertical.svg +1 -0
  18. package/dist/svgs/expand-vertical.svg +1 -0
  19. package/dist/svgs/magnet.svg +1 -0
  20. package/dist/svgs/to-date-backward.svg +1 -0
  21. package/dist/svgs/to-date-forward.svg +1 -0
  22. package/dist/types/index.d.ts +2815 -288
  23. package/package.json +4 -2
  24. package/src/recipes/autocomplete.ts +266 -0
  25. package/src/recipes/badge.ts +25 -54
  26. package/src/recipes/button.ts +155 -316
  27. package/src/recipes/calendar.ts +91 -0
  28. package/src/recipes/card.ts +4 -70
  29. package/src/recipes/chip.ts +212 -266
  30. package/src/recipes/dateMenus.ts +40 -0
  31. package/src/recipes/dateTimeMenus.ts +43 -0
  32. package/src/recipes/kbd.ts +42 -39
  33. package/src/recipes/list.ts +11 -85
  34. package/src/recipes/listDensity.ts +66 -0
  35. package/src/recipes/listItem.ts +27 -166
  36. package/src/recipes/listItemGroup.ts +16 -16
  37. package/src/recipes/menu.ts +17 -3
  38. package/src/recipes/modal.ts +65 -65
  39. package/src/recipes/radio.ts +6 -6
  40. package/src/recipes/recipes-slot.ts +7 -2
  41. package/src/recipes/segmentedFields.ts +192 -0
  42. package/src/recipes/segmentedInputs.ts +109 -0
  43. package/src/recipes/tag.ts +218 -210
  44. package/src/recipes/text.ts +37 -19
  45. package/src/recipes/textInput.ts +103 -155
  46. package/src/recipes/themeSwitcher.ts +3 -3
  47. package/src/recipes/timeMenus.ts +110 -0
  48. package/src/recipes/toggle.ts +3 -1
  49. package/src/styles/primitives/shadows.ts +26 -60
  50. package/src/styles/primitives/zIndex.ts +1 -0
  51. package/src/styles/semantics/colors.ts +43 -0
  52. package/src/styles/semantics/shadows.ts +4 -30
  53. package/src/styles/semantics/zIndex.ts +2 -0
  54. package/src/styles/utilities/conditions.ts +61 -51
  55. package/src/styles/utilities/dropShadows.ts +51 -0
  56. package/src/styles/utilities/filters.ts +22 -7
  57. package/src/styles/utilities/globalStyle.ts +5 -2
  58. package/src/styles/utilities/index.ts +3 -0
  59. package/src/styles/utilities/keyframes.ts +27 -4
  60. package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
  61. package/src/styles/utilities/shadowDefinitions.ts +112 -0
  62. package/src/utils/dsChain.ts +113 -0
  63. package/src/utils/dsComponent.ts +44 -0
  64. package/src/utils/dsPart.ts +41 -0
  65. package/dist/preset-BAn5LBiW.js.map +0 -1
  66. package/src/recipes/datePicker.ts +0 -234
  67. package/src/recipes/timePicker.ts +0 -216
@@ -0,0 +1,91 @@
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
+
3
+ import { globalBaseStyles } from '~/styles/utilities';
4
+
5
+ export const calendarRecipe = defineSlotRecipe({
6
+ className: 'calendar',
7
+ jsx: ['Calendar'],
8
+ slots: ['root', 'header', 'grid', 'weekdayLabel', 'day', 'monthYearGrid'],
9
+ base: {
10
+ root: {
11
+ ...globalBaseStyles,
12
+ display: 'flex',
13
+ flexDirection: 'column',
14
+ alignItems: 'flex-start',
15
+ bg: 'surface',
16
+ width: '278',
17
+ },
18
+ header: {
19
+ display: 'flex',
20
+ alignItems: 'center',
21
+ justifyContent: 'space-between',
22
+ gap: '4',
23
+ width: 'full',
24
+ p: '8',
25
+ borderBottom: 'default',
26
+ fontFamily: 'mono',
27
+ },
28
+ grid: {
29
+ display: 'grid',
30
+ gridTemplateColumns: 'repeat(7, minmax(0, 1fr))',
31
+ gap: '4',
32
+ width: 'fit',
33
+ p: '8',
34
+ mx: 'auto',
35
+ },
36
+ weekdayLabel: {
37
+ display: 'flex',
38
+ alignItems: 'center',
39
+ justifyContent: 'center',
40
+ userSelect: 'none',
41
+ },
42
+ day: {
43
+ position: 'relative',
44
+ alignItems: 'center',
45
+ justifyContent: 'center',
46
+ fontFamily: 'mono',
47
+ width: '32',
48
+ height: '32',
49
+ minWidth: '32',
50
+ _today: {
51
+ outline: '1px solid {colors.border.focused}',
52
+ outlineOffset: '1',
53
+ },
54
+ _unavailable: {
55
+ color: 'text.disabled',
56
+ cursor: 'not-allowed',
57
+ pointerEvents: 'none',
58
+ _hover: {
59
+ bg: 'transparent',
60
+ },
61
+ },
62
+ },
63
+ monthYearGrid: {
64
+ display: 'grid',
65
+ gridTemplateColumns: 'repeat(3, minmax(0, 1fr))',
66
+ gap: '4',
67
+ width: 'full',
68
+ p: '8',
69
+ },
70
+ },
71
+ variants: {
72
+ type: {
73
+ days: {},
74
+ months: {
75
+ day: {
76
+ width: 'auto',
77
+ px: '8',
78
+ },
79
+ },
80
+ years: {
81
+ day: {
82
+ width: 'auto',
83
+ px: '8',
84
+ },
85
+ },
86
+ },
87
+ },
88
+ defaultVariants: {
89
+ type: 'days',
90
+ },
91
+ });
@@ -3,6 +3,7 @@ import { defineRecipe } from '@pandacss/dev';
3
3
  const interactiveHoverStyles = {
4
4
  cursor: 'pointer',
5
5
  transition: 'all',
6
+ textDecoration: 'none',
6
7
  _hover: {
7
8
  bg: 'surface',
8
9
  boxShadow: 'elevated',
@@ -14,10 +15,6 @@ const interactiveHoverStyles = {
14
15
  outlineColor: 'border.focused',
15
16
  borderColor: 'border.focused',
16
17
  },
17
- _disabled: {
18
- opacity: '0.4',
19
- cursor: 'not-allowed',
20
- },
21
18
  };
22
19
 
23
20
  export const cardRecipe = defineRecipe({
@@ -73,79 +70,16 @@ export const cardRecipe = defineRecipe({
73
70
  },
74
71
  interactive: {
75
72
  true: {
76
- cursor: 'pointer',
77
- },
78
- false: {
79
- cursor: 'default',
80
- },
81
- },
82
- },
83
- compoundVariants: [
84
- // Default + interactive
85
- {
86
- variant: 'default',
87
- interactive: true,
88
- css: {
89
- ...interactiveHoverStyles,
90
- _disabled: {
91
- _hover: {
92
- boxShadow: 'raised',
93
- },
94
- },
95
- },
96
- },
97
- // Flat + interactive
98
- {
99
- variant: 'flat',
100
- interactive: true,
101
- css: {
102
73
  ...interactiveHoverStyles,
74
+ cursor: 'pointer',
103
75
  _disabled: {
104
76
  _hover: {
105
- boxShadow: 'none',
106
- },
107
- },
108
- },
109
- },
110
- // Sunken + interactive
111
- {
112
- variant: 'sunken',
113
- interactive: true,
114
- css: {
115
- ...interactiveHoverStyles,
116
- _disabled: {
117
- _hover: {
118
- boxShadow: 'none',
119
- },
120
- },
121
- },
122
- },
123
- // Ghost + interactive
124
- {
125
- variant: 'ghost',
126
- interactive: true,
127
- css: {
128
- ...interactiveHoverStyles,
129
- _disabled: {
130
- _hover: {
131
- boxShadow: 'none',
132
- },
133
- },
134
- },
135
- },
136
- // Overlay + interactive
137
- {
138
- variant: 'overlay',
139
- interactive: true,
140
- css: {
141
- _disabled: {
142
- _hover: {
143
- boxShadow: 'raised',
77
+ boxShadow: 'initial',
144
78
  },
145
79
  },
146
80
  },
147
81
  },
148
- ],
82
+ },
149
83
  defaultVariants: {
150
84
  variant: 'default',
151
85
  },