@cdx-ui/components 0.0.1-beta.70 → 0.0.1-beta.72
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/lib/commonjs/components/Alert/index.js +263 -0
- package/lib/commonjs/components/Alert/index.js.map +1 -0
- package/lib/commonjs/components/Alert/styles.js +87 -0
- package/lib/commonjs/components/Alert/styles.js.map +1 -0
- package/lib/commonjs/components/QuickActionButton/index.js +133 -0
- package/lib/commonjs/components/QuickActionButton/index.js.map +1 -0
- package/lib/commonjs/components/QuickActionButton/styles.js +17 -0
- package/lib/commonjs/components/QuickActionButton/styles.js.map +1 -0
- package/lib/commonjs/components/index.js +24 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/figma/Alert.Button.figma.js +31 -0
- package/lib/commonjs/figma/Alert.Button.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.Close.figma.js +24 -0
- package/lib/commonjs/figma/Alert.Close.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.Description.figma.js +20 -0
- package/lib/commonjs/figma/Alert.Description.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.Title.figma.js +20 -0
- package/lib/commonjs/figma/Alert.Title.figma.js.map +1 -0
- package/lib/commonjs/figma/Alert.figma.js +42 -0
- package/lib/commonjs/figma/Alert.figma.js.map +1 -0
- package/lib/commonjs/figma/QuickActionButton.figma.js +38 -0
- package/lib/commonjs/figma/QuickActionButton.figma.js.map +1 -0
- package/lib/module/components/Alert/index.js +259 -0
- package/lib/module/components/Alert/index.js.map +1 -0
- package/lib/module/components/Alert/styles.js +84 -0
- package/lib/module/components/Alert/styles.js.map +1 -0
- package/lib/module/components/QuickActionButton/index.js +129 -0
- package/lib/module/components/QuickActionButton/index.js.map +1 -0
- package/lib/module/components/QuickActionButton/styles.js +13 -0
- package/lib/module/components/QuickActionButton/styles.js.map +1 -0
- package/lib/module/components/index.js +2 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/figma/Alert.Button.figma.js +25 -0
- package/lib/module/figma/Alert.Button.figma.js.map +1 -0
- package/lib/module/figma/Alert.Close.figma.js +18 -0
- package/lib/module/figma/Alert.Close.figma.js.map +1 -0
- package/lib/module/figma/Alert.Description.figma.js +14 -0
- package/lib/module/figma/Alert.Description.figma.js.map +1 -0
- package/lib/module/figma/Alert.Title.figma.js +14 -0
- package/lib/module/figma/Alert.Title.figma.js.map +1 -0
- package/lib/module/figma/Alert.figma.js +36 -0
- package/lib/module/figma/Alert.figma.js.map +1 -0
- package/lib/module/figma/QuickActionButton.figma.js +32 -0
- package/lib/module/figma/QuickActionButton.figma.js.map +1 -0
- package/lib/typescript/components/Alert/index.d.ts +67 -0
- package/lib/typescript/components/Alert/index.d.ts.map +1 -0
- package/lib/typescript/components/Alert/styles.d.ts +19 -0
- package/lib/typescript/components/Alert/styles.d.ts.map +1 -0
- package/lib/typescript/components/Button/styles.d.ts +4 -4
- package/lib/typescript/components/Chip/styles.d.ts +3 -3
- package/lib/typescript/components/IconButton/styles.d.ts +2 -2
- package/lib/typescript/components/QuickActionButton/index.d.ts +41 -0
- package/lib/typescript/components/QuickActionButton/index.d.ts.map +1 -0
- package/lib/typescript/components/QuickActionButton/styles.d.ts +7 -0
- package/lib/typescript/components/QuickActionButton/styles.d.ts.map +1 -0
- package/lib/typescript/components/Tile/styles.d.ts +1 -1
- package/lib/typescript/components/index.d.ts +2 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/figma/Alert.Button.figma.d.ts +11 -0
- package/lib/typescript/figma/Alert.Button.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Close.figma.d.ts +11 -0
- package/lib/typescript/figma/Alert.Close.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Description.figma.d.ts +8 -0
- package/lib/typescript/figma/Alert.Description.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.Title.figma.d.ts +8 -0
- package/lib/typescript/figma/Alert.Title.figma.d.ts.map +1 -0
- package/lib/typescript/figma/Alert.figma.d.ts +8 -0
- package/lib/typescript/figma/Alert.figma.d.ts.map +1 -0
- package/lib/typescript/figma/QuickActionButton.figma.d.ts +8 -0
- package/lib/typescript/figma/QuickActionButton.figma.d.ts.map +1 -0
- package/package.json +4 -4
- package/src/components/Alert/index.tsx +318 -0
- package/src/components/Alert/styles.ts +88 -0
- package/src/components/QuickActionButton/index.tsx +161 -0
- package/src/components/QuickActionButton/styles.ts +42 -0
- package/src/components/index.ts +2 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Platform } from 'react-native';
|
|
2
|
+
import { cva, type VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { DISABLED_CURSOR, TRANSITION_COLORS } from '../../styles/primitives';
|
|
4
|
+
|
|
5
|
+
export const quickActionButtonRootVariants = cva([
|
|
6
|
+
'flex flex-col items-center gap-2',
|
|
7
|
+
'min-w-[60px] max-w-20',
|
|
8
|
+
'web:outline-none web:focus:outline-none web:focus-visible:outline-none',
|
|
9
|
+
DISABLED_CURSOR,
|
|
10
|
+
]);
|
|
11
|
+
|
|
12
|
+
export const quickActionButtonIndicatorVariants = cva([
|
|
13
|
+
'flex items-center justify-center shrink-0',
|
|
14
|
+
'h-[60px] w-[60px] min-h-[60px] min-w-[60px] p-2',
|
|
15
|
+
'rounded-[var(--border-radius-round)]',
|
|
16
|
+
'border border-stroke-secondary',
|
|
17
|
+
'bg-surface-primary',
|
|
18
|
+
'overflow-hidden',
|
|
19
|
+
TRANSITION_COLORS,
|
|
20
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
21
|
+
Platform.select({
|
|
22
|
+
default: 'data-[active=true]:bg-surface-primary-active',
|
|
23
|
+
web: [
|
|
24
|
+
'data-[hover=true]:bg-surface-primary-hover',
|
|
25
|
+
'data-[active=true]:data-[hover=true]:bg-surface-secondary-active',
|
|
26
|
+
'web:data-[focus-visible=true]:ring-2',
|
|
27
|
+
'web:data-[focus-visible=true]:ring-[var(--color-stroke-ring)]',
|
|
28
|
+
'web:data-[focus-visible=true]:ring-offset-2',
|
|
29
|
+
].join(' '),
|
|
30
|
+
}),
|
|
31
|
+
]);
|
|
32
|
+
|
|
33
|
+
export const quickActionButtonGlyphVariants = cva(['size-6', 'text-content-action']);
|
|
34
|
+
|
|
35
|
+
export const quickActionButtonLabelVariants = cva([
|
|
36
|
+
'body-sm font-medium',
|
|
37
|
+
'text-content-primary text-center',
|
|
38
|
+
'w-full min-w-0 max-w-20 self-center',
|
|
39
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
40
|
+
]);
|
|
41
|
+
|
|
42
|
+
export type QuickActionButtonVariantProps = VariantProps<typeof quickActionButtonRootVariants>;
|
package/src/components/index.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export * from './Alert';
|
|
1
2
|
export * from './AlertDialog';
|
|
2
3
|
export * from './Avatar';
|
|
3
4
|
export * from './BottomSheet';
|
|
@@ -28,3 +29,4 @@ export * from './Heading';
|
|
|
28
29
|
export * from './Text';
|
|
29
30
|
export * from './Icon';
|
|
30
31
|
export * from './IconButton';
|
|
32
|
+
export * from './QuickActionButton';
|