@okshaun/components 4.1.5 → 5.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.
- package/README.md +1 -1
- package/dist/icon-metadata.json +134 -0
- package/dist/index.js +16208 -10749
- package/dist/index.js.map +1 -1
- package/dist/panda.buildinfo.json +754 -530
- package/dist/{preset-jXQwQ5KL.js → preset-B6fsdoKY.js} +2338 -317
- package/dist/preset-B6fsdoKY.js.map +1 -0
- package/dist/preset.js +1 -1
- package/dist/specs/keyframes.json +66 -0
- package/dist/specs/recipes.json +394 -26
- package/dist/specs/tokens.json +15 -0
- package/dist/sprite.svg +1 -1
- package/dist/sprite.symbol.html +248 -2
- package/dist/styles.css +3971 -789
- package/dist/svgs/barcode-reader-off.svg +1 -0
- package/dist/svgs/circle-dashed.svg +1 -0
- package/dist/svgs/drawer-left-hide.svg +1 -0
- package/dist/svgs/drawer-left-show.svg +1 -0
- package/dist/svgs/drawer-right-hide.svg +1 -0
- package/dist/svgs/drawer-right-show.svg +1 -0
- package/dist/svgs/not-equal.svg +1 -0
- package/dist/svgs/square-dashed.svg +1 -0
- package/dist/types/index.d.ts +2989 -115
- package/package.json +9 -12
- package/src/recipes/alert.ts +80 -0
- package/src/recipes/autocomplete.ts +2 -2
- package/src/recipes/avatar.ts +13 -6
- package/src/recipes/button.ts +41 -30
- package/src/recipes/checkbox.ts +3 -0
- package/src/recipes/chip.ts +16 -0
- package/src/recipes/code.ts +40 -23
- package/src/recipes/codeBlock.ts +277 -0
- package/src/recipes/drawer.ts +150 -0
- package/src/recipes/filterField.ts +138 -0
- package/src/recipes/filterMenu.ts +71 -0
- package/src/recipes/filterToken.ts +189 -0
- package/src/recipes/inlineNote.ts +49 -0
- package/src/recipes/keyFact.ts +111 -0
- package/src/recipes/listItem.ts +25 -0
- package/src/recipes/menu.ts +41 -2
- package/src/recipes/pageBanner.ts +110 -0
- package/src/recipes/peekBar.ts +35 -0
- package/src/recipes/popover.ts +206 -0
- package/src/recipes/printPreview.ts +101 -0
- package/src/recipes/recipes-regular.ts +1 -1
- package/src/recipes/recipes-slot.ts +14 -0
- package/src/recipes/segmentedFields.ts +11 -5
- package/src/recipes/select.ts +204 -63
- package/src/recipes/spinner.ts +1 -1
- package/src/recipes/tabs.ts +161 -0
- package/src/recipes/tag.ts +13 -2
- package/src/recipes/timeMenus.ts +1 -1
- package/src/recipes/toast.ts +116 -0
- package/src/recipes/toggle.ts +3 -3
- package/src/styles/primitives/fontSizes.ts +1 -0
- package/src/styles/primitives/radii.ts +2 -0
- package/src/styles/utilities/keyframes.ts +38 -0
- package/src/utils/compoundComponent.ts +29 -0
- package/dist/preset-jXQwQ5KL.js.map +0 -1
|
@@ -10,6 +10,7 @@ export const fontSizes = defineTokens.fontSizes({
|
|
|
10
10
|
'32': { value: '{sizes.32}' },
|
|
11
11
|
'40': { value: '{sizes.40}' },
|
|
12
12
|
'48': { value: '{sizes.48}' },
|
|
13
|
+
'56': { value: '{sizes.56}' },
|
|
13
14
|
'64': { value: '{sizes.64}' },
|
|
14
15
|
'72': { value: '{sizes.72}' },
|
|
15
16
|
'80': { value: '{sizes.80}' },
|
|
@@ -7,7 +7,9 @@ export const radii = defineTokens.radii({
|
|
|
7
7
|
'2': { value: '{sizes.2}' },
|
|
8
8
|
'3': { value: '{sizes.3}' },
|
|
9
9
|
'4': { value: '{sizes.4}' },
|
|
10
|
+
'6': { value: '{sizes.6}' },
|
|
10
11
|
'8': { value: '{sizes.8}' },
|
|
12
|
+
'12': { value: '{sizes.12}' },
|
|
11
13
|
'16': { value: '{sizes.16}' },
|
|
12
14
|
'100': { value: utilitySizes.full.value },
|
|
13
15
|
'999': { value: '999px' },
|
|
@@ -113,4 +113,42 @@ export const keyframes = defineKeyframes({
|
|
|
113
113
|
transform: 'scale(0.97) translateY(-40px)',
|
|
114
114
|
},
|
|
115
115
|
},
|
|
116
|
+
// Drawer animations
|
|
117
|
+
drawerSlideInRight: {
|
|
118
|
+
'0%': { transform: 'translateX(100%)' },
|
|
119
|
+
'100%': { transform: 'translateX(0)' },
|
|
120
|
+
},
|
|
121
|
+
drawerSlideOutRight: {
|
|
122
|
+
'0%': { transform: 'translateX(0)' },
|
|
123
|
+
'100%': { transform: 'translateX(100%)' },
|
|
124
|
+
},
|
|
125
|
+
drawerSlideInLeft: {
|
|
126
|
+
'0%': { transform: 'translateX(-100%)' },
|
|
127
|
+
'100%': { transform: 'translateX(0)' },
|
|
128
|
+
},
|
|
129
|
+
drawerSlideOutLeft: {
|
|
130
|
+
'0%': { transform: 'translateX(0)' },
|
|
131
|
+
'100%': { transform: 'translateX(-100%)' },
|
|
132
|
+
},
|
|
133
|
+
// Toast animations
|
|
134
|
+
toastSlideIn: {
|
|
135
|
+
'0%': {
|
|
136
|
+
opacity: '0',
|
|
137
|
+
transform: 'translateX(16px)',
|
|
138
|
+
},
|
|
139
|
+
'100%': {
|
|
140
|
+
opacity: '1',
|
|
141
|
+
transform: 'translateX(0)',
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
toastSlideOut: {
|
|
145
|
+
'0%': {
|
|
146
|
+
opacity: '1',
|
|
147
|
+
transform: 'translateX(0)',
|
|
148
|
+
},
|
|
149
|
+
'100%': {
|
|
150
|
+
opacity: '0',
|
|
151
|
+
transform: 'translateX(16px)',
|
|
152
|
+
},
|
|
153
|
+
},
|
|
116
154
|
});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** Reads a string marker from a React element's component type. */
|
|
2
|
+
export const getCompoundComponentType = (
|
|
3
|
+
node: unknown,
|
|
4
|
+
markerKey: string,
|
|
5
|
+
): string | null => {
|
|
6
|
+
if (!node || typeof node !== 'object' || !('type' in node)) {
|
|
7
|
+
return null;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const component = (node as { type?: unknown }).type;
|
|
11
|
+
if (
|
|
12
|
+
(typeof component !== 'function' && typeof component !== 'object') ||
|
|
13
|
+
component === null
|
|
14
|
+
) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
const marker = (component as Record<string, unknown>)[markerKey];
|
|
19
|
+
return typeof marker === 'string' ? marker : null;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** Marks a component so a compound parent can recognize its child elements. */
|
|
23
|
+
export const setCompoundComponentType = (
|
|
24
|
+
component: object,
|
|
25
|
+
markerKey: string,
|
|
26
|
+
componentType: string,
|
|
27
|
+
) => {
|
|
28
|
+
Object.assign(component, { [markerKey]: componentType });
|
|
29
|
+
};
|