@okshaun/components 3.0.0 → 4.1.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 (69) 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/playroom-static.css +2 -2
  6. package/dist/{preset-BAn5LBiW.js → preset-CLoY9s9i.js} +2031 -2086
  7. package/dist/preset-CLoY9s9i.js.map +1 -0
  8. package/dist/preset.js +1 -1
  9. package/dist/specs/conditions.json +75 -51
  10. package/dist/specs/keyframes.json +22 -0
  11. package/dist/specs/recipes.json +222 -106
  12. package/dist/specs/semantic-tokens.json +194 -86
  13. package/dist/specs/tokens.json +16 -36
  14. package/dist/sprite.svg +1 -1
  15. package/dist/sprite.symbol.html +445 -44
  16. package/dist/styles.css +11441 -13424
  17. package/dist/svgs/cheese.svg +1 -0
  18. package/dist/svgs/collapse-vertical.svg +1 -0
  19. package/dist/svgs/expand-vertical.svg +1 -0
  20. package/dist/svgs/magnet.svg +1 -0
  21. package/dist/svgs/to-date-backward.svg +1 -0
  22. package/dist/svgs/to-date-forward.svg +1 -0
  23. package/dist/types/index.d.ts +2815 -288
  24. package/package.json +4 -2
  25. package/src/recipes/autocomplete.ts +266 -0
  26. package/src/recipes/badge.ts +25 -54
  27. package/src/recipes/button.ts +155 -316
  28. package/src/recipes/calendar.ts +91 -0
  29. package/src/recipes/card.ts +4 -70
  30. package/src/recipes/chip.ts +212 -266
  31. package/src/recipes/dateMenus.ts +40 -0
  32. package/src/recipes/dateTimeMenus.ts +43 -0
  33. package/src/recipes/formField.ts +1 -1
  34. package/src/recipes/kbd.ts +42 -39
  35. package/src/recipes/list.ts +11 -85
  36. package/src/recipes/listDensity.ts +66 -0
  37. package/src/recipes/listItem.ts +27 -166
  38. package/src/recipes/listItemGroup.ts +16 -16
  39. package/src/recipes/menu.ts +17 -3
  40. package/src/recipes/modal.ts +65 -65
  41. package/src/recipes/radio.ts +6 -6
  42. package/src/recipes/recipes-slot.ts +7 -2
  43. package/src/recipes/segmentedFields.ts +192 -0
  44. package/src/recipes/segmentedInputs.ts +109 -0
  45. package/src/recipes/tag.ts +218 -210
  46. package/src/recipes/text.ts +37 -19
  47. package/src/recipes/textInput.ts +103 -155
  48. package/src/recipes/themeSwitcher.ts +3 -3
  49. package/src/recipes/timeMenus.ts +110 -0
  50. package/src/recipes/toggle.ts +3 -1
  51. package/src/styles/primitives/shadows.ts +26 -60
  52. package/src/styles/primitives/zIndex.ts +1 -0
  53. package/src/styles/semantics/colors.ts +84 -37
  54. package/src/styles/semantics/shadows.ts +4 -30
  55. package/src/styles/semantics/zIndex.ts +2 -0
  56. package/src/styles/utilities/conditions.ts +61 -51
  57. package/src/styles/utilities/dropShadows.ts +51 -0
  58. package/src/styles/utilities/filters.ts +22 -7
  59. package/src/styles/utilities/globalStyle.ts +5 -2
  60. package/src/styles/utilities/index.ts +3 -0
  61. package/src/styles/utilities/keyframes.ts +27 -4
  62. package/src/styles/utilities/recipeGlobalStyles.ts +22 -0
  63. package/src/styles/utilities/shadowDefinitions.ts +112 -0
  64. package/src/utils/dsChain.ts +113 -0
  65. package/src/utils/dsComponent.ts +44 -0
  66. package/src/utils/dsPart.ts +41 -0
  67. package/dist/preset-BAn5LBiW.js.map +0 -1
  68. package/src/recipes/datePicker.ts +0 -234
  69. 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
  },