@okshaun/components 1.0.2 → 2.0.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 (129) hide show
  1. package/dist/.mcp.json +2 -5
  2. package/dist/icon-metadata.json +5173 -0
  3. package/dist/index.js +17118 -9339
  4. package/dist/index.js.map +1 -1
  5. package/dist/panda.buildinfo.json +696 -0
  6. package/dist/playroom-static.css +187432 -0
  7. package/dist/{preset-DCCViEDs.js → preset-Df8i1OIQ.js} +3651 -2776
  8. package/dist/preset-Df8i1OIQ.js.map +1 -0
  9. package/dist/preset.js +1 -1
  10. package/dist/specs/color-palette.json +22 -1
  11. package/dist/specs/patterns.json +0 -16
  12. package/dist/specs/recipes.json +411 -239
  13. package/dist/specs/semantic-tokens.json +347 -146
  14. package/dist/specs/text-styles.json +72 -0
  15. package/dist/specs/tokens.json +267 -67
  16. package/dist/sprite.svg +1 -1
  17. package/dist/sprite.symbol.html +6662 -320
  18. package/dist/styles.css +36925 -5
  19. package/dist/svgs/calendar-lock.svg +1 -0
  20. package/dist/svgs/computer.svg +1 -0
  21. package/dist/svgs/cookie.svg +1 -0
  22. package/dist/svgs/folder-check.svg +1 -0
  23. package/dist/svgs/folder-copy.svg +1 -0
  24. package/dist/svgs/folder-dashed.svg +1 -0
  25. package/dist/svgs/folder-open.svg +1 -0
  26. package/dist/svgs/folder-topic.svg +1 -0
  27. package/dist/svgs/folder.svg +1 -0
  28. package/dist/svgs/mobile.svg +1 -0
  29. package/dist/svgs/numpad.svg +1 -0
  30. package/dist/svgs/phone.svg +1 -0
  31. package/dist/svgs/qr-code.svg +1 -0
  32. package/dist/svgs/sparkle.svg +1 -0
  33. package/dist/svgs/trolley.svg +1 -0
  34. package/dist/types/index.d.ts +837 -337
  35. package/package.json +49 -24
  36. package/src/recipes/avatar.ts +98 -98
  37. package/src/recipes/badge.ts +22 -39
  38. package/src/recipes/box.ts +1 -7
  39. package/src/recipes/breadcrumbs.ts +42 -25
  40. package/src/recipes/button.ts +201 -105
  41. package/src/recipes/card.ts +5 -1
  42. package/src/recipes/checkbox.ts +23 -24
  43. package/src/recipes/checkboxInput.ts +25 -0
  44. package/src/recipes/chip.ts +35 -37
  45. package/src/recipes/code.ts +4 -4
  46. package/src/recipes/datePicker.ts +212 -0
  47. package/src/recipes/divider.ts +38 -32
  48. package/src/recipes/formField.ts +41 -23
  49. package/src/recipes/highlightText.ts +14 -0
  50. package/src/recipes/icon.ts +13 -0
  51. package/src/recipes/list.ts +14 -0
  52. package/src/recipes/listItem.ts +310 -0
  53. package/src/recipes/listItemGroup.ts +62 -0
  54. package/src/recipes/menu.ts +90 -163
  55. package/src/recipes/modal.ts +55 -25
  56. package/src/recipes/radio.ts +29 -20
  57. package/src/recipes/radioInput.ts +25 -0
  58. package/src/recipes/recipes-regular.ts +14 -0
  59. package/src/recipes/recipes-slot.ts +19 -0
  60. package/src/recipes/select.ts +1 -1
  61. package/src/recipes/spinner.ts +49 -23
  62. package/src/recipes/tag.ts +80 -84
  63. package/src/recipes/text.ts +18 -10
  64. package/src/recipes/textInput.ts +205 -0
  65. package/src/recipes/textarea.ts +65 -138
  66. package/src/recipes/themeSwitcher.ts +3 -3
  67. package/src/recipes/timePicker.ts +199 -0
  68. package/src/recipes/toggle.ts +72 -99
  69. package/src/recipes/toggleInput.ts +26 -0
  70. package/src/recipes/tooltip.ts +52 -343
  71. package/src/styles/index.css +1 -1
  72. package/src/styles/primitives/borders.ts +7 -1
  73. package/src/styles/primitives/colors.ts +51 -0
  74. package/src/styles/primitives/fontSizes.ts +1 -0
  75. package/src/styles/primitives/index.ts +2 -1
  76. package/src/styles/primitives/shadows.ts +28 -37
  77. package/src/styles/primitives/sizes.ts +1 -0
  78. package/src/styles/primitives/zIndex.ts +17 -0
  79. package/src/styles/semantics/colors.ts +137 -82
  80. package/src/styles/semantics/index.ts +1 -0
  81. package/src/styles/semantics/shadows.ts +27 -16
  82. package/src/styles/semantics/zIndex.ts +18 -0
  83. package/src/styles/utilities/breakpoints.ts +6 -6
  84. package/src/styles/utilities/index.ts +3 -0
  85. package/src/styles/utilities/textStyles.ts +70 -0
  86. package/src/utils/splitProps.ts +3 -3
  87. package/dist/preset-DCCViEDs.js.map +0 -1
  88. package/dist/styles/global.css +0 -148
  89. package/dist/styles/recipes/avatar.css +0 -185
  90. package/dist/styles/recipes/badge.css +0 -85
  91. package/dist/styles/recipes/breadcrumbs.css +0 -38
  92. package/dist/styles/recipes/button.css +0 -195
  93. package/dist/styles/recipes/card.css +0 -57
  94. package/dist/styles/recipes/checkbox-input.css +0 -12
  95. package/dist/styles/recipes/checkbox.css +0 -90
  96. package/dist/styles/recipes/chip.css +0 -137
  97. package/dist/styles/recipes/code.css +0 -12
  98. package/dist/styles/recipes/divider.css +0 -40
  99. package/dist/styles/recipes/form-field.css +0 -39
  100. package/dist/styles/recipes/heading.css +0 -40
  101. package/dist/styles/recipes/icon-button.css +0 -181
  102. package/dist/styles/recipes/label.css +0 -14
  103. package/dist/styles/recipes/link.css +0 -49
  104. package/dist/styles/recipes/menu.css +0 -141
  105. package/dist/styles/recipes/modal.css +0 -99
  106. package/dist/styles/recipes/pre.css +0 -16
  107. package/dist/styles/recipes/radio-input.css +0 -7
  108. package/dist/styles/recipes/radio.css +0 -82
  109. package/dist/styles/recipes/select.css +0 -103
  110. package/dist/styles/recipes/spinner.css +0 -36
  111. package/dist/styles/recipes/tag.css +0 -27
  112. package/dist/styles/recipes/text.css +0 -46
  113. package/dist/styles/recipes/textarea.css +0 -91
  114. package/dist/styles/recipes/textinput.css +0 -87
  115. package/dist/styles/recipes/theme-switcher.css +0 -53
  116. package/dist/styles/recipes/toggle-input.css +0 -12
  117. package/dist/styles/recipes/toggle.css +0 -125
  118. package/dist/styles/recipes/tooltip.css +0 -133
  119. package/dist/styles/recipes.css +0 -30
  120. package/dist/styles/reset.css +0 -1
  121. package/dist/styles/tokens.css +0 -1016
  122. package/dist/styles/utilities.css +0 -1694
  123. package/src/recipes/checkboxinput.ts +0 -15
  124. package/src/recipes/index.ts +0 -28
  125. package/src/recipes/radioinput.ts +0 -12
  126. package/src/recipes/textinput.ts +0 -100
  127. package/src/recipes/toggleinput.ts +0 -16
  128. package/src/utils/injectSprite.ts +0 -36
  129. package/src/utils/spriteContent.ts +0 -4
@@ -1,20 +1,17 @@
1
1
  import { defineSlotRecipe } from '@pandacss/dev';
2
2
 
3
- /** Shared animation duration (ms) — used in both CSS animations and JS unmount timeout */
4
- export const MODAL_ANIMATION_DURATION = 150;
5
-
6
3
  const modalBase = {
7
4
  overlay: {
8
5
  position: 'fixed',
9
6
  inset: '0',
10
7
  bg: 'blanket',
11
- zIndex: 1100,
8
+ zIndex: '1100',
12
9
  // Initial state matches animation start
13
10
  opacity: '0',
14
11
  // Animation handled via data-state
15
- animation: `modalFadeIn ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
12
+ animation: 'modalFadeIn 150ms ease-out forwards',
16
13
  '&[data-state="closing"]': {
17
- animation: `modalFadeOut ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
14
+ animation: 'modalFadeOut 150ms ease-out forwards',
18
15
  },
19
16
  },
20
17
  container: {
@@ -23,19 +20,20 @@ const modalBase = {
23
20
  left: '50%',
24
21
  display: 'flex',
25
22
  flexDirection: 'column',
26
- maxHeight: '90vh',
23
+ width: 'full',
24
+ maxHeight: '[95vh]',
27
25
  bg: 'surface.overlay',
28
26
  borderRadius: '12',
29
27
  boxShadow: 'overlay',
30
28
  outline: 'none',
31
- zIndex: 1101,
29
+ zIndex: '1101',
32
30
  // Initial state matches animation start
33
31
  opacity: '0',
34
- transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
32
+ transform: '[translate(-50%, -50%) scale(0.95) translateY(-10px)]',
35
33
  // Animation handled via data-state
36
- animation: `modalScaleIn ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
34
+ animation: 'modalScaleIn 150ms ease-out forwards',
37
35
  '&[data-state="closing"]': {
38
- animation: `modalScaleOut ${MODAL_ANIMATION_DURATION}ms ease-out forwards`,
36
+ animation: 'modalScaleOut 150ms ease-out forwards',
39
37
  },
40
38
  },
41
39
  header: {
@@ -57,11 +55,12 @@ const modalBase = {
57
55
  },
58
56
  body: {
59
57
  flex: 1,
58
+ display: 'flex',
59
+ flexDirection: 'column',
60
60
  overflowY: 'auto',
61
- gap: '16',
61
+ gap: '12',
62
62
  px: '20',
63
- py: '16',
64
- color: 'text',
63
+ py: '20',
65
64
  },
66
65
  footer: {
67
66
  display: 'flex',
@@ -78,26 +77,56 @@ const modalVariants = {
78
77
  size: {
79
78
  sm: {
80
79
  container: {
81
- maxWidth: '400',
82
- },
83
- title: {
84
- fontSize: 'md',
80
+ maxWidth: 'md',
85
81
  },
86
82
  },
87
83
  md: {
88
84
  container: {
89
- maxWidth: '560',
90
- },
91
- title: {
92
- fontSize: 'lg',
85
+ maxWidth: 'xl',
93
86
  },
94
87
  },
95
88
  lg: {
96
89
  container: {
97
- maxWidth: '720',
90
+ maxWidth: '3xl',
98
91
  },
99
- title: {
100
- fontSize: 'xl',
92
+ },
93
+ xl: {
94
+ container: {
95
+ maxWidth: '5xl',
96
+ },
97
+ },
98
+ full: {
99
+ container: {
100
+ maxWidth: '[95vw]',
101
+ },
102
+ },
103
+ mobile: {
104
+ container: {
105
+ width: 'full',
106
+ height: 'full',
107
+ maxWidth: '[100vw]',
108
+ maxHeight: '[100vh]',
109
+ borderRadius: '0',
110
+ },
111
+ },
112
+ },
113
+ variant: {
114
+ default: {
115
+ container: {
116
+ xsDown: {
117
+ width: 'full',
118
+ height: 'full',
119
+ maxWidth: '[100vw]',
120
+ maxHeight: '[100vh]',
121
+ borderRadius: '0',
122
+ },
123
+ },
124
+ },
125
+ confirmation: {
126
+ container: {
127
+ height: 'fit',
128
+ width: 'md',
129
+ maxWidth: '[90vw]',
101
130
  },
102
131
  },
103
132
  },
@@ -118,6 +147,7 @@ export const modalRecipe = defineSlotRecipe({
118
147
  base: modalBase,
119
148
  variants: modalVariants,
120
149
  defaultVariants: {
150
+ variant: 'default',
121
151
  size: 'md',
122
152
  },
123
153
  });
@@ -3,69 +3,78 @@ import { defineSlotRecipe } from '@pandacss/dev';
3
3
  export const radioRecipe = defineSlotRecipe({
4
4
  className: 'radio',
5
5
  jsx: ['Radio'],
6
- slots: ['container', 'input', 'indicator'],
6
+ slots: ['container', 'input', 'indicator', 'radioBg'],
7
7
  base: {
8
8
  container: {
9
9
  position: 'relative',
10
+ w: '24',
11
+ h: '24',
10
12
  display: 'inline-grid',
13
+ placeContent: 'center',
11
14
  gridTemplateColumns: 'auto 1fr',
12
- gap: 4,
13
15
  alignItems: 'start',
14
16
  cursor: 'pointer',
15
17
  userSelect: 'none',
16
18
  },
17
19
  input: {
18
20
  position: 'absolute',
19
- opacity: 0,
21
+ opacity: '0',
20
22
  width: 'full',
21
23
  height: 'full',
22
24
  margin: '0',
23
25
  padding: '0',
24
- zIndex: 1,
26
+ zIndex: 'raised',
25
27
  cursor: 'inherit',
26
28
  "& ~ [name='radio']": {
27
29
  display: 'inline-grid',
30
+ zIndex: 'zIndex.3',
28
31
  },
29
32
  _checked: {
30
33
  "& ~ [name='radio-checked']": {
31
34
  display: 'inline-grid',
32
- fill: { base: 'gray.90', _dark: 'gray.10' },
35
+ fill: 'icon',
36
+ zIndex: 'zIndex.2',
33
37
  },
34
38
  "& ~ [name='radio']": {
35
39
  display: 'none',
36
40
  },
37
41
  },
38
- _disabled: {
39
- '& ~ svg': {
40
- opacity: 0.4,
41
- pointerEvents: 'none',
42
- cursor: 'none',
43
- },
44
- display: 'inline-grid',
45
- },
46
42
  _error: {
47
43
  display: 'inline-grid',
48
- '& ~ svg': {
44
+ '& ~ svg:not([name="circle"])': {
49
45
  fill: 'red.50',
46
+ zIndex: 'zIndex.3',
50
47
  },
51
48
  },
52
49
  _focusVisible: {
53
50
  "& ~ [name='radio-focus']": {
54
51
  display: 'inline-grid',
55
52
  position: 'absolute',
56
- fill: { base: 'gray.90', _dark: 'gray.1' },
53
+ fill: 'border.focused',
54
+ zIndex: 'zIndex.2',
57
55
  },
58
56
  },
59
57
  },
60
58
  indicator: {
61
- placeContent: 'center',
62
59
  display: 'none',
63
- width: 24,
64
- height: 24,
60
+ position: 'absolute',
61
+ inset: '0',
62
+ width: '24',
63
+ height: '24',
64
+ zIndex: 'zIndex.3',
65
65
  "&:is([name='radio'])": {
66
- display: 'inline-grid',
67
- fill: 'gray.20',
66
+ fill: 'icon.subtlest',
67
+ zIndex: 'zIndex.3',
68
68
  },
69
69
  },
70
+ radioBg: {
71
+ position: 'absolute',
72
+ top: '0',
73
+ left: '0',
74
+ width: '24',
75
+ height: '24',
76
+ fill: 'surface',
77
+ zIndex: 'base',
78
+ },
70
79
  },
71
80
  });
@@ -0,0 +1,25 @@
1
+ import { defineRecipe } from '@pandacss/dev';
2
+
3
+ const radioInputBase = {
4
+ display: 'flex',
5
+ alignItems: 'flex-start',
6
+ gap: '4',
7
+ '&[class*="-label"]': {
8
+ fontSize: '{sizes.16}',
9
+ lineHeight: 'default',
10
+ },
11
+ _disabled: {
12
+ opacity: '40%',
13
+ cursor: 'not-allowed',
14
+ },
15
+ _groupDisabled: {
16
+ opacity: 1, // let FormField handle disabled state opacity
17
+ },
18
+ };
19
+
20
+ export const radioInputRecipe = defineRecipe({
21
+ className: 'radioInput',
22
+ jsx: ['RadioInput', 'Radioinput'],
23
+ base: radioInputBase,
24
+ variants: {},
25
+ });
@@ -0,0 +1,14 @@
1
+ export { boxRecipe } from './box';
2
+ export { cardRecipe } from './card';
3
+ export { checkboxInputRecipe } from './checkboxInput';
4
+ export { codeRecipe, preRecipe } from './code';
5
+ export { dividerRecipe } from './divider';
6
+ export { highlightTextRecipe } from './highlightText';
7
+ export { iconRecipe } from './icon';
8
+ export { listRecipe } from './list';
9
+ export { radioInputRecipe } from './radioInput';
10
+ export { tagRecipe } from './tag';
11
+ export { headingRecipe, labelRecipe, linkRecipe, textRecipe } from './text';
12
+ export { textareaRecipe } from './textarea';
13
+ export { themeSwitcherRecipe } from './themeSwitcher';
14
+ export { toggleInputRecipe } from './toggleInput';
@@ -0,0 +1,19 @@
1
+ export { avatarRecipe } from './avatar';
2
+ export { badgeRecipe } from './badge';
3
+ export { breadcrumbsRecipe } from './breadcrumbs';
4
+ export { buttonRecipe, iconButtonRecipe } from './button';
5
+ export { checkboxRecipe } from './checkbox';
6
+ export { chipRecipe } from './chip';
7
+ export { datePickerRecipe } from './datePicker';
8
+ export { formFieldRecipe } from './formField';
9
+ export { listItemRecipe } from './listItem';
10
+ export { listItemGroupRecipe } from './listItemGroup';
11
+ export { menuRecipe } from './menu';
12
+ export { modalRecipe } from './modal';
13
+ export { radioRecipe } from './radio';
14
+ export { selectRecipe } from './select';
15
+ export { spinnerRecipe } from './spinner';
16
+ export { textInputRecipe } from './textInput';
17
+ export { timePickerRecipe } from './timePicker';
18
+ export { toggleRecipe } from './toggle';
19
+ export { tooltipRecipe } from './tooltip';
@@ -35,7 +35,7 @@ const selectBase = {
35
35
  borderColor: 'border.disabled',
36
36
  color: 'text.disabled',
37
37
  cursor: 'not-allowed',
38
- opacity: 0.5,
38
+ opacity: '[0.5]',
39
39
  },
40
40
  _error: {
41
41
  bg: 'bg.danger',
@@ -1,49 +1,75 @@
1
- import { defineRecipe } from '@pandacss/dev';
1
+ import { defineSlotRecipe } from '@pandacss/dev';
2
2
 
3
3
  const spinnerBase = {
4
- aspectRatio: 'square',
5
- rounded: '100',
6
- borderWidth: '3',
7
- borderStyle: 'solid',
8
- borderColor: 'transparent',
9
- borderTopColor: 'icon',
10
- borderBottomColor: 'icon',
11
- animation: 'spin',
12
- isolation: 'isolate',
4
+ spinnerDiv: {
5
+ aspectRatio: 'square',
6
+ rounded: '100',
7
+ borderWidth: '3',
8
+ borderStyle: 'solid',
9
+ borderColor: 'transparent',
10
+ borderTopColor: 'icon',
11
+ borderBottomColor: 'icon',
12
+ animation: 'spin',
13
+ isolation: 'isolate',
14
+ },
13
15
  };
14
16
 
15
17
  const spinnerVariants = {
16
18
  size: {
17
19
  xs: {
18
- height: '16',
19
- minHeight: '16',
20
- borderWidth: '2',
20
+ spinnerDiv: {
21
+ height: '16',
22
+ minHeight: '16',
23
+ borderWidth: '2',
24
+ },
21
25
  },
22
26
  sm: {
23
- height: '20',
24
- minHeight: '20',
25
- borderWidth: '2',
27
+ spinnerDiv: {
28
+ height: '20',
29
+ minHeight: '20',
30
+ borderWidth: '2',
31
+ },
26
32
  },
27
33
  md: {
28
- height: '24',
29
- minHeight: '24',
34
+ spinnerDiv: {
35
+ height: '24',
36
+ minHeight: '24',
37
+ },
30
38
  },
31
39
  lg: {
32
- height: '32',
33
- minHeight: '32',
40
+ spinnerDiv: {
41
+ height: '32',
42
+ minHeight: '32',
43
+ },
34
44
  },
35
45
  },
36
46
  inverse: {
37
47
  true: {
38
- borderTopColor: 'icon.inverse',
39
- borderBottomColor: 'icon.inverse',
48
+ spinnerDiv: {
49
+ borderTopColor: 'icon.inverse',
50
+ borderBottomColor: 'icon.inverse',
51
+ },
52
+ },
53
+ },
54
+ centered: {
55
+ true: {
56
+ container: {
57
+ position: 'absolute',
58
+ inset: '0',
59
+ display: 'grid',
60
+ placeContent: 'center',
61
+ width: 'full',
62
+ height: 'full',
63
+ zIndex: '100',
64
+ },
40
65
  },
41
66
  },
42
67
  };
43
68
 
44
- export const spinnerRecipe = defineRecipe({
69
+ export const spinnerRecipe = defineSlotRecipe({
45
70
  className: 'spinner',
46
71
  jsx: ['Spinner'],
72
+ slots: ['container', 'spinnerDiv'],
47
73
  base: spinnerBase,
48
74
  variants: spinnerVariants,
49
75
  defaultVariants: {