@okshaun/components 2.0.1 → 3.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 (42) hide show
  1. package/dist/icon-metadata.json +27 -0
  2. package/dist/index.js +2567 -1458
  3. package/dist/index.js.map +1 -1
  4. package/dist/panda.buildinfo.json +1008 -48
  5. package/dist/{preset-Df8i1OIQ.js → preset-BAn5LBiW.js} +740 -143
  6. package/dist/preset-BAn5LBiW.js.map +1 -0
  7. package/dist/preset.js +1 -1
  8. package/dist/specs/conditions.json +2 -2
  9. package/dist/specs/keyframes.json +11 -0
  10. package/dist/specs/recipes.json +153 -13
  11. package/dist/specs/tokens.json +5 -0
  12. package/dist/sprite.svg +1 -1
  13. package/dist/sprite.symbol.html +57 -2
  14. package/dist/styles.css +14966 -2322
  15. package/dist/svgs/barcode-off.svg +1 -0
  16. package/dist/svgs/spinner.svg +1 -0
  17. package/dist/types/index.d.ts +173 -192
  18. package/package.json +1 -1
  19. package/src/recipes/avatar.ts +1 -1
  20. package/src/recipes/badge.ts +17 -0
  21. package/src/recipes/breakpointIndicator.ts +11 -0
  22. package/src/recipes/button.ts +112 -2
  23. package/src/recipes/chip.ts +142 -17
  24. package/src/recipes/datePicker.ts +22 -0
  25. package/src/recipes/icon.ts +25 -6
  26. package/src/recipes/kbd.ts +53 -0
  27. package/src/recipes/list.ts +91 -1
  28. package/src/recipes/listItem.ts +43 -36
  29. package/src/recipes/listItemGroup.ts +8 -30
  30. package/src/recipes/modal.ts +36 -5
  31. package/src/recipes/recipes-regular.ts +2 -0
  32. package/src/recipes/recipes-slot.ts +1 -0
  33. package/src/recipes/select.ts +8 -1
  34. package/src/recipes/skeleton.ts +72 -0
  35. package/src/recipes/spinner.ts +27 -24
  36. package/src/recipes/textInput.ts +42 -1
  37. package/src/recipes/timePicker.ts +17 -0
  38. package/src/styles/primitives/animations.ts +3 -0
  39. package/src/styles/utilities/conditions.ts +2 -2
  40. package/src/styles/utilities/keyframes.ts +4 -0
  41. package/src/utils/mergeAriaDescribedBy.ts +7 -0
  42. package/dist/preset-Df8i1OIQ.js.map +0 -1
@@ -3,6 +3,8 @@ import { defineSlotRecipe } from '@pandacss/dev';
3
3
  const textInputBase = {
4
4
  container: {
5
5
  position: 'relative',
6
+ display: 'flex',
7
+ alignItems: 'center',
6
8
  width: 'full',
7
9
  bg: 'surface',
8
10
  borderWidth: '{sizes.1}',
@@ -37,6 +39,25 @@ const textInputBase = {
37
39
  opacity: 1, // let FormField handle disabled state opacity
38
40
  },
39
41
  },
42
+ slot: {
43
+ display: 'inline-flex',
44
+ alignItems: 'center',
45
+ transitionDuration: 'fast',
46
+ transitionProperty: 'all',
47
+ transitionTimingFunction: 'default',
48
+ flex: '0 0 auto',
49
+ fill: 'icon.decorative.subtle',
50
+ pointerEvents: 'none',
51
+ zIndex: 1,
52
+ },
53
+ buttonSlot: {
54
+ display: 'inline-flex',
55
+ alignItems: 'center',
56
+ flex: '0 0 auto',
57
+ px: '0',
58
+ zIndex: 1,
59
+ m: '-1',
60
+ },
40
61
  input: {
41
62
  width: 'full',
42
63
  bg: 'surface',
@@ -68,6 +89,11 @@ const textInputVariants = {
68
89
  px: '{sizes.8}',
69
90
  fontSize: '{sizes.14}',
70
91
  },
92
+ slot: {
93
+ w: '16',
94
+ h: '16',
95
+ px: '4',
96
+ },
71
97
  icon: {
72
98
  mx: '2',
73
99
  w: '{sizes.22}',
@@ -79,6 +105,11 @@ const textInputVariants = {
79
105
  px: '{sizes.10}',
80
106
  fontSize: '{sizes.16}',
81
107
  },
108
+ slot: {
109
+ w: '20',
110
+ h: '20',
111
+ px: '6',
112
+ },
82
113
  icon: {
83
114
  mx: '3',
84
115
  w: '{sizes.24}',
@@ -90,6 +121,11 @@ const textInputVariants = {
90
121
  px: '{sizes.12}',
91
122
  fontSize: '{sizes.16}',
92
123
  },
124
+ slot: {
125
+ w: '24',
126
+ h: '24',
127
+ px: '8',
128
+ },
93
129
  icon: {
94
130
  mx: '5',
95
131
  w: '{sizes.24}',
@@ -101,6 +137,11 @@ const textInputVariants = {
101
137
  px: '{sizes.16}',
102
138
  fontSize: '{sizes.20}',
103
139
  },
140
+ slot: {
141
+ w: '28',
142
+ h: '28',
143
+ px: '10',
144
+ },
104
145
  icon: {
105
146
  mx: '7',
106
147
  w: '{sizes.28}',
@@ -195,7 +236,7 @@ const textInputCompoundVariants: NonNullable<
195
236
  export const textInputRecipe = defineSlotRecipe({
196
237
  className: 'textInput',
197
238
  jsx: ['TextInput', 'Textinput'],
198
- slots: ['container', 'input', 'icon'],
239
+ slots: ['container', 'input', 'slot', 'buttonSlot', 'icon'],
199
240
  base: textInputBase,
200
241
  variants: textInputVariants,
201
242
  compoundVariants: textInputCompoundVariants,
@@ -61,6 +61,20 @@ const timePickerBase = {
61
61
  outlineColor: 'border.danger',
62
62
  },
63
63
  },
64
+ _invalid: {
65
+ borderColor: 'border.danger',
66
+ _hover: {
67
+ borderColor: 'border.danger',
68
+ },
69
+ _focusWithin: {
70
+ borderColor: 'border.danger',
71
+ outlineColor: 'border.danger',
72
+ },
73
+ _open: {
74
+ borderColor: 'border.danger',
75
+ outlineColor: 'border.danger',
76
+ },
77
+ },
64
78
  },
65
79
 
66
80
  // Individual focusable segment span (HH, MM, AM/PM)
@@ -84,6 +98,9 @@ const timePickerBase = {
84
98
  _groupDisabled: {
85
99
  color: 'text.disabled',
86
100
  },
101
+ _invalid: {
102
+ color: 'text.danger',
103
+ },
87
104
  },
88
105
 
89
106
  // The ":" separator between time segments
@@ -10,6 +10,9 @@ export const animations = defineTokens.animations({
10
10
  pulse: {
11
11
  value: 'pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
12
12
  },
13
+ skeletonWave: {
14
+ value: 'skeletonWave 1.6s linear infinite',
15
+ },
13
16
  bounce: {
14
17
  value: 'bounce 1s infinite',
15
18
  },
@@ -75,8 +75,8 @@ export const conditions = {
75
75
  '&:is(:indeterminate, [data-indeterminate], [aria-checked=mixed], [data-state="indeterminate"])',
76
76
  required: '&:is(:required, [data-required], [aria-required=true])',
77
77
  valid: '&:is(:valid, [data-valid])',
78
- invalid: '&:is(:invalid, [data-invalid], [aria-invalid=true])',
79
- error: '&:is([data-error], [data-error=true])',
78
+ invalid: '&:is(:invalid, [data-invalid=true], [aria-invalid=true])',
79
+ error: '&:is([data-error=true])',
80
80
  autofill: '&:autofill',
81
81
  inRange: '&:is(:in-range, [data-in-range])',
82
82
  outOfRange: '&:is(:out-of-range, [data-outside-range])',
@@ -57,6 +57,10 @@ export const keyframes = defineKeyframes({
57
57
  '0%': { transform: 'translateX(-100%)', opacity: '0' },
58
58
  '100%': { transform: 'translateX(0)', opacity: '1' },
59
59
  },
60
+ skeletonWave: {
61
+ '0%': { transform: 'translateX(-100%)' },
62
+ '100%': { transform: 'translateX(100%)' },
63
+ },
60
64
  // Modal animations
61
65
  modalFadeIn: {
62
66
  '0%': { opacity: '0' },
@@ -0,0 +1,7 @@
1
+ export const mergeAriaDescribedBy = (...values: Array<string | undefined>) => {
2
+ const merged = values
3
+ .flatMap((value) => value?.split(/\s+/) ?? [])
4
+ .filter(Boolean);
5
+
6
+ return merged.length > 0 ? Array.from(new Set(merged)).join(' ') : undefined;
7
+ };