@okshaun/components 1.0.1 → 2.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 (128) hide show
  1. package/dist/.mcp.json +2 -5
  2. package/dist/icon-metadata.json +5173 -0
  3. package/dist/index.js +17088 -9273
  4. package/dist/index.js.map +1 -1
  5. package/dist/panda.buildinfo.json +693 -0
  6. package/dist/playroom-static.css +187432 -0
  7. package/dist/{preset-BzrKiUEH.js → preset-Coz-VwQR.js} +4051 -3217
  8. package/dist/preset-Coz-VwQR.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 -247
  13. package/dist/specs/semantic-tokens.json +330 -115
  14. package/dist/specs/text-styles.json +72 -0
  15. package/dist/specs/tokens.json +237 -27
  16. package/dist/sprite.svg +1 -1
  17. package/dist/sprite.symbol.html +6662 -320
  18. package/dist/styles.css +36938 -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 +834 -347
  35. package/package.json +49 -36
  36. package/src/recipes/avatar.ts +4 -4
  37. package/src/recipes/badge.ts +22 -48
  38. package/src/recipes/box.ts +1 -7
  39. package/src/recipes/breadcrumbs.ts +42 -25
  40. package/src/recipes/button.ts +151 -85
  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 +223 -0
  47. package/src/recipes/divider.ts +38 -31
  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 +51 -18
  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/{index.ts → recipes-slot.ts} +14 -23
  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 -19
  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/radii.ts +1 -1
  77. package/src/styles/primitives/shadows.ts +9 -9
  78. package/src/styles/primitives/sizes.ts +1 -0
  79. package/src/styles/primitives/zIndex.ts +17 -0
  80. package/src/styles/semantics/colors.ts +137 -82
  81. package/src/styles/semantics/index.ts +1 -0
  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 +71 -1
  86. package/src/utils/splitProps.ts +4 -4
  87. package/dist/preset-BzrKiUEH.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 -43
  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/radioinput.ts +0 -12
  125. package/src/recipes/textinput.ts +0 -100
  126. package/src/recipes/toggleinput.ts +0 -16
  127. package/src/utils/injectSprite.ts +0 -36
  128. package/src/utils/spriteContent.ts +0 -4
@@ -5,7 +5,7 @@ const modalBase = {
5
5
  position: 'fixed',
6
6
  inset: '0',
7
7
  bg: 'blanket',
8
- zIndex: 1100,
8
+ zIndex: '1100',
9
9
  // Initial state matches animation start
10
10
  opacity: '0',
11
11
  // Animation handled via data-state
@@ -20,15 +20,16 @@ const modalBase = {
20
20
  left: '50%',
21
21
  display: 'flex',
22
22
  flexDirection: 'column',
23
- maxHeight: '90vh',
23
+ width: 'full',
24
+ maxHeight: '[95vh]',
24
25
  bg: 'surface.overlay',
25
26
  borderRadius: '12',
26
27
  boxShadow: 'overlay',
27
28
  outline: 'none',
28
- zIndex: 1101,
29
+ zIndex: '1101',
29
30
  // Initial state matches animation start
30
31
  opacity: '0',
31
- transform: 'translate(-50%, -50%) scale(0.95) translateY(-10px)',
32
+ transform: '[translate(-50%, -50%) scale(0.95) translateY(-10px)]',
32
33
  // Animation handled via data-state
33
34
  animation: 'modalScaleIn 150ms ease-out forwards',
34
35
  '&[data-state="closing"]': {
@@ -54,11 +55,12 @@ const modalBase = {
54
55
  },
55
56
  body: {
56
57
  flex: 1,
58
+ display: 'flex',
59
+ flexDirection: 'column',
57
60
  overflowY: 'auto',
58
- gap: '16',
61
+ gap: '12',
59
62
  px: '20',
60
- py: '16',
61
- color: 'text',
63
+ py: '20',
62
64
  },
63
65
  footer: {
64
66
  display: 'flex',
@@ -75,26 +77,56 @@ const modalVariants = {
75
77
  size: {
76
78
  sm: {
77
79
  container: {
78
- maxWidth: '400',
79
- },
80
- title: {
81
- fontSize: 'md',
80
+ maxWidth: 'md',
82
81
  },
83
82
  },
84
83
  md: {
85
84
  container: {
86
- maxWidth: '560',
87
- },
88
- title: {
89
- fontSize: 'lg',
85
+ maxWidth: 'xl',
90
86
  },
91
87
  },
92
88
  lg: {
93
89
  container: {
94
- maxWidth: '720',
90
+ maxWidth: '3xl',
91
+ },
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
+ },
95
123
  },
96
- title: {
97
- fontSize: 'xl',
124
+ },
125
+ confirmation: {
126
+ container: {
127
+ height: 'fit',
128
+ width: 'md',
129
+ maxWidth: '[90vw]',
98
130
  },
99
131
  },
100
132
  },
@@ -115,6 +147,7 @@ export const modalRecipe = defineSlotRecipe({
115
147
  base: modalBase,
116
148
  variants: modalVariants,
117
149
  defaultVariants: {
150
+ variant: 'default',
118
151
  size: 'md',
119
152
  },
120
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';
@@ -1,28 +1,19 @@
1
- export { textareaRecipe } from './textarea';
2
- export { textRecipe, headingRecipe, linkRecipe, labelRecipe } from './text';
3
- export { checkboxInputRecipe } from './checkboxinput';
4
- export { radioInputRecipe } from './radioinput';
5
- export { toggleRecipe } from './toggle';
6
- export { toggleInputRecipe } from './toggleinput';
7
- export { spinnerRecipe } from './spinner';
8
- export { dividerRecipe } from './divider';
9
- export { preRecipe, codeRecipe } from './code';
10
- export { boxRecipe } from './box';
11
- export { textinputRecipe } from './textinput';
12
- export { cardRecipe } from './card';
1
+ export { avatarRecipe } from './avatar';
2
+ export { badgeRecipe } from './badge';
13
3
  export { breadcrumbsRecipe } from './breadcrumbs';
14
- export { tagRecipe } from './tag';
15
- export { themeSwitcherRecipe } from './themeSwitcher';
16
-
17
- // Slot Recipes
18
4
  export { buttonRecipe, iconButtonRecipe } from './button';
19
5
  export { checkboxRecipe } from './checkbox';
20
- export { radioRecipe } from './radio';
21
- export { tooltipRecipe } from './tooltip';
22
- export { menuRecipe } from './menu';
23
- export { selectRecipe } from './select';
24
6
  export { chipRecipe } from './chip';
25
- export { badgeRecipe } from './badge';
26
- export { avatarRecipe } from './avatar';
27
- export { modalRecipe } from './modal';
7
+ export { datePickerRecipe } from './datePicker';
28
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: {