@cdx-ui/components 0.1.7 → 0.2.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.
- package/coverage.svg +1 -1
- package/lib/commonjs/components/Calendar/flashCalendarAdapter.js +18 -0
- package/lib/commonjs/components/Calendar/flashCalendarAdapter.js.map +1 -1
- package/lib/commonjs/components/Calendar/index.js +32 -3
- package/lib/commonjs/components/Calendar/index.js.map +1 -1
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.js +78 -0
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.js.map +1 -0
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.web.js +31 -0
- package/lib/commonjs/components/ColorArea/ColorAreaPaint.web.js.map +1 -0
- package/lib/commonjs/components/ColorArea/index.js +57 -0
- package/lib/commonjs/components/ColorArea/index.js.map +1 -0
- package/lib/commonjs/components/ColorArea/styles.js +12 -0
- package/lib/commonjs/components/ColorArea/styles.js.map +1 -0
- package/lib/commonjs/components/ColorField/index.js +138 -0
- package/lib/commonjs/components/ColorField/index.js.map +1 -0
- package/lib/commonjs/components/ColorField/styles.js +14 -0
- package/lib/commonjs/components/ColorField/styles.js.map +1 -0
- package/lib/commonjs/components/ColorPicker/index.js +88 -0
- package/lib/commonjs/components/ColorPicker/index.js.map +1 -0
- package/lib/commonjs/components/ColorPicker/styles.js +22 -0
- package/lib/commonjs/components/ColorPicker/styles.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.js +68 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.web.js +41 -0
- package/lib/commonjs/components/ColorSlider/ColorSliderRailPaint.web.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/index.js +123 -0
- package/lib/commonjs/components/ColorSlider/index.js.map +1 -0
- package/lib/commonjs/components/ColorSlider/styles.js +50 -0
- package/lib/commonjs/components/ColorSlider/styles.js.map +1 -0
- package/lib/commonjs/components/ColorSwatch/index.js +54 -0
- package/lib/commonjs/components/ColorSwatch/index.js.map +1 -0
- package/lib/commonjs/components/ColorSwatch/styles.js +25 -0
- package/lib/commonjs/components/ColorSwatch/styles.js.map +1 -0
- package/lib/commonjs/components/ColorSwatchPicker/index.js +110 -0
- package/lib/commonjs/components/ColorSwatchPicker/index.js.map +1 -0
- package/lib/commonjs/components/ColorSwatchPicker/styles.js +17 -0
- package/lib/commonjs/components/ColorSwatchPicker/styles.js.map +1 -0
- package/lib/commonjs/components/DatePicker/index.js +2 -0
- package/lib/commonjs/components/DatePicker/index.js.map +1 -1
- package/lib/commonjs/components/Field/index.js +4 -2
- package/lib/commonjs/components/Field/index.js.map +1 -1
- package/lib/commonjs/components/Heading/styles.js +3 -0
- package/lib/commonjs/components/Heading/styles.js.map +1 -1
- package/lib/commonjs/components/Icon/index.js +27 -3
- package/lib/commonjs/components/Icon/index.js.map +1 -1
- package/lib/commonjs/components/Icon/styles.js +19 -0
- package/lib/commonjs/components/Icon/styles.js.map +1 -0
- package/lib/commonjs/components/Text/index.js +13 -4
- package/lib/commonjs/components/Text/index.js.map +1 -1
- package/lib/commonjs/components/Text/styles.js +39 -3
- package/lib/commonjs/components/Text/styles.js.map +1 -1
- package/lib/commonjs/components/Toast/hooks.js +0 -1
- package/lib/commonjs/components/Toast/hooks.js.map +1 -1
- package/lib/commonjs/components/Toast/index.js +9 -6
- package/lib/commonjs/components/Toast/index.js.map +1 -1
- package/lib/commonjs/components/Toast/styles.js +36 -19
- package/lib/commonjs/components/Toast/styles.js.map +1 -1
- package/lib/commonjs/components/ToggleButton/index.js +5 -4
- package/lib/commonjs/components/ToggleButton/index.js.map +1 -1
- package/lib/commonjs/components/index.js +68 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/components/picker/surfaces.js +9 -2
- package/lib/commonjs/components/picker/surfaces.js.map +1 -1
- package/lib/commonjs/figma/Icon.figma.js +30 -3
- package/lib/commonjs/figma/Icon.figma.js.map +1 -1
- package/lib/commonjs/figma/Text.figma.js +15 -1
- package/lib/commonjs/figma/Text.figma.js.map +1 -1
- package/lib/commonjs/providers/toast/insets-container.js +15 -3
- package/lib/commonjs/providers/toast/insets-container.js.map +1 -1
- package/lib/commonjs/providers/toast/provider.js +1 -0
- package/lib/commonjs/providers/toast/provider.js.map +1 -1
- package/lib/commonjs/styles/constants.js +14 -1
- package/lib/commonjs/styles/constants.js.map +1 -1
- package/lib/module/components/Calendar/flashCalendarAdapter.js +17 -0
- package/lib/module/components/Calendar/flashCalendarAdapter.js.map +1 -1
- package/lib/module/components/Calendar/index.js +34 -5
- package/lib/module/components/Calendar/index.js.map +1 -1
- package/lib/module/components/ColorArea/ColorAreaPaint.js +74 -0
- package/lib/module/components/ColorArea/ColorAreaPaint.js.map +1 -0
- package/lib/module/components/ColorArea/ColorAreaPaint.web.js +27 -0
- package/lib/module/components/ColorArea/ColorAreaPaint.web.js.map +1 -0
- package/lib/module/components/ColorArea/index.js +53 -0
- package/lib/module/components/ColorArea/index.js.map +1 -0
- package/lib/module/components/ColorArea/styles.js +8 -0
- package/lib/module/components/ColorArea/styles.js.map +1 -0
- package/lib/module/components/ColorField/index.js +134 -0
- package/lib/module/components/ColorField/index.js.map +1 -0
- package/lib/module/components/ColorField/styles.js +10 -0
- package/lib/module/components/ColorField/styles.js.map +1 -0
- package/lib/module/components/ColorPicker/index.js +79 -0
- package/lib/module/components/ColorPicker/index.js.map +1 -0
- package/lib/module/components/ColorPicker/styles.js +18 -0
- package/lib/module/components/ColorPicker/styles.js.map +1 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.js +64 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.js.map +1 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.web.js +37 -0
- package/lib/module/components/ColorSlider/ColorSliderRailPaint.web.js.map +1 -0
- package/lib/module/components/ColorSlider/index.js +119 -0
- package/lib/module/components/ColorSlider/index.js.map +1 -0
- package/lib/module/components/ColorSlider/styles.js +46 -0
- package/lib/module/components/ColorSlider/styles.js.map +1 -0
- package/lib/module/components/ColorSwatch/index.js +50 -0
- package/lib/module/components/ColorSwatch/index.js.map +1 -0
- package/lib/module/components/ColorSwatch/styles.js +21 -0
- package/lib/module/components/ColorSwatch/styles.js.map +1 -0
- package/lib/module/components/ColorSwatchPicker/index.js +106 -0
- package/lib/module/components/ColorSwatchPicker/index.js.map +1 -0
- package/lib/module/components/ColorSwatchPicker/styles.js +13 -0
- package/lib/module/components/ColorSwatchPicker/styles.js.map +1 -0
- package/lib/module/components/DatePicker/index.js +2 -0
- package/lib/module/components/DatePicker/index.js.map +1 -1
- package/lib/module/components/Field/index.js +4 -2
- package/lib/module/components/Field/index.js.map +1 -1
- package/lib/module/components/Heading/styles.js +3 -0
- package/lib/module/components/Heading/styles.js.map +1 -1
- package/lib/module/components/Icon/index.js +27 -3
- package/lib/module/components/Icon/index.js.map +1 -1
- package/lib/module/components/Icon/styles.js +16 -0
- package/lib/module/components/Icon/styles.js.map +1 -0
- package/lib/module/components/Text/index.js +14 -5
- package/lib/module/components/Text/index.js.map +1 -1
- package/lib/module/components/Text/styles.js +38 -2
- package/lib/module/components/Text/styles.js.map +1 -1
- package/lib/module/components/Toast/hooks.js +0 -1
- package/lib/module/components/Toast/hooks.js.map +1 -1
- package/lib/module/components/Toast/index.js +10 -7
- package/lib/module/components/Toast/index.js.map +1 -1
- package/lib/module/components/Toast/styles.js +35 -19
- package/lib/module/components/Toast/styles.js.map +1 -1
- package/lib/module/components/ToggleButton/index.js +3 -3
- package/lib/module/components/ToggleButton/index.js.map +1 -1
- package/lib/module/components/index.js +6 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/components/picker/surfaces.js +10 -3
- package/lib/module/components/picker/surfaces.js.map +1 -1
- package/lib/module/figma/Icon.figma.js +30 -3
- package/lib/module/figma/Icon.figma.js.map +1 -1
- package/lib/module/figma/Text.figma.js +15 -1
- package/lib/module/figma/Text.figma.js.map +1 -1
- package/lib/module/providers/toast/insets-container.js +15 -4
- package/lib/module/providers/toast/insets-container.js.map +1 -1
- package/lib/module/providers/toast/provider.js +2 -1
- package/lib/module/providers/toast/provider.js.map +1 -1
- package/lib/module/styles/constants.js +13 -0
- package/lib/module/styles/constants.js.map +1 -1
- package/lib/typescript/components/Alert/index.d.ts +1 -1
- package/lib/typescript/components/Alert/index.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/index.d.ts +1 -1
- package/lib/typescript/components/Avatar/index.d.ts.map +1 -1
- package/lib/typescript/components/Badge/styles.d.ts +3 -3
- package/lib/typescript/components/Breadcrumbs/styles.d.ts +1 -1
- package/lib/typescript/components/Button/index.d.ts +1 -1
- package/lib/typescript/components/Button/index.d.ts.map +1 -1
- package/lib/typescript/components/Button/styles.d.ts +4 -4
- package/lib/typescript/components/Calendar/flashCalendarAdapter.d.ts +3 -1
- package/lib/typescript/components/Calendar/flashCalendarAdapter.d.ts.map +1 -1
- package/lib/typescript/components/Calendar/index.d.ts.map +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts +1 -1
- package/lib/typescript/components/Checkbox/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/index.d.ts +1 -1
- package/lib/typescript/components/Chip/index.d.ts.map +1 -1
- package/lib/typescript/components/Chip/styles.d.ts +3 -3
- package/lib/typescript/components/ColorArea/ColorAreaPaint.d.ts +5 -0
- package/lib/typescript/components/ColorArea/ColorAreaPaint.d.ts.map +1 -0
- package/lib/typescript/components/ColorArea/ColorAreaPaint.web.d.ts +5 -0
- package/lib/typescript/components/ColorArea/ColorAreaPaint.web.d.ts.map +1 -0
- package/lib/typescript/components/ColorArea/index.d.ts +20 -0
- package/lib/typescript/components/ColorArea/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorArea/styles.d.ts +4 -0
- package/lib/typescript/components/ColorArea/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorField/index.d.ts +41 -0
- package/lib/typescript/components/ColorField/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorField/styles.d.ts +13 -0
- package/lib/typescript/components/ColorField/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorPicker/index.d.ts +28 -0
- package/lib/typescript/components/ColorPicker/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorPicker/styles.d.ts +9 -0
- package/lib/typescript/components/ColorPicker/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.d.ts +5 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.web.d.ts +5 -0
- package/lib/typescript/components/ColorSlider/ColorSliderRailPaint.web.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/index.d.ts +33 -0
- package/lib/typescript/components/ColorSlider/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorSlider/styles.d.ts +14 -0
- package/lib/typescript/components/ColorSlider/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatch/index.d.ts +19 -0
- package/lib/typescript/components/ColorSwatch/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatch/styles.d.ts +7 -0
- package/lib/typescript/components/ColorSwatch/styles.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatchPicker/index.d.ts +37 -0
- package/lib/typescript/components/ColorSwatchPicker/index.d.ts.map +1 -0
- package/lib/typescript/components/ColorSwatchPicker/styles.d.ts +5 -0
- package/lib/typescript/components/ColorSwatchPicker/styles.d.ts.map +1 -0
- package/lib/typescript/components/DatePicker/index.d.ts +1 -1
- package/lib/typescript/components/DatePicker/index.d.ts.map +1 -1
- package/lib/typescript/components/Divider/index.d.ts +1 -1
- package/lib/typescript/components/Divider/index.d.ts.map +1 -1
- package/lib/typescript/components/Field/index.d.ts +5 -0
- package/lib/typescript/components/Field/index.d.ts.map +1 -1
- package/lib/typescript/components/Heading/styles.d.ts.map +1 -1
- package/lib/typescript/components/Icon/index.d.ts +14 -22
- package/lib/typescript/components/Icon/index.d.ts.map +1 -1
- package/lib/typescript/components/Icon/styles.d.ts +6 -0
- package/lib/typescript/components/Icon/styles.d.ts.map +1 -0
- package/lib/typescript/components/IconButton/styles.d.ts +2 -2
- package/lib/typescript/components/Input/index.d.ts +1 -1
- package/lib/typescript/components/Input/index.d.ts.map +1 -1
- package/lib/typescript/components/Link/index.d.ts +1 -1
- package/lib/typescript/components/Link/index.d.ts.map +1 -1
- package/lib/typescript/components/Menu/index.d.ts +2 -2
- package/lib/typescript/components/Menu/index.d.ts.map +1 -1
- package/lib/typescript/components/Select/index.d.ts +1 -1
- package/lib/typescript/components/Select/index.d.ts.map +1 -1
- package/lib/typescript/components/Slider/styles.d.ts +3 -3
- package/lib/typescript/components/Text/index.d.ts +40 -3
- package/lib/typescript/components/Text/index.d.ts.map +1 -1
- package/lib/typescript/components/Text/styles.d.ts +9 -0
- package/lib/typescript/components/Text/styles.d.ts.map +1 -1
- package/lib/typescript/components/Toast/hooks.d.ts +1 -1
- package/lib/typescript/components/Toast/hooks.d.ts.map +1 -1
- package/lib/typescript/components/Toast/index.d.ts.map +1 -1
- package/lib/typescript/components/Toast/styles.d.ts +4 -0
- package/lib/typescript/components/Toast/styles.d.ts.map +1 -1
- package/lib/typescript/components/Toast/types.d.ts +1 -1
- package/lib/typescript/components/Toast/types.d.ts.map +1 -1
- package/lib/typescript/components/ToggleButton/index.d.ts +5 -3
- package/lib/typescript/components/ToggleButton/index.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/components/picker/surfaces.d.ts +5 -1
- package/lib/typescript/components/picker/surfaces.d.ts.map +1 -1
- package/lib/typescript/figma/Icon.figma.d.ts.map +1 -1
- package/lib/typescript/figma/Text.figma.d.ts.map +1 -1
- package/lib/typescript/providers/toast/insets-container.d.ts +12 -0
- package/lib/typescript/providers/toast/insets-container.d.ts.map +1 -1
- package/lib/typescript/providers/toast/types.d.ts +5 -0
- package/lib/typescript/providers/toast/types.d.ts.map +1 -1
- package/lib/typescript/styles/constants.d.ts +10 -0
- package/lib/typescript/styles/constants.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/Alert/index.tsx +1 -1
- package/src/components/Avatar/index.tsx +1 -1
- package/src/components/Button/index.tsx +1 -1
- package/src/components/Calendar/flashCalendarAdapter.ts +13 -1
- package/src/components/Calendar/index.tsx +43 -5
- package/src/components/Checkbox/index.tsx +1 -1
- package/src/components/Chip/index.tsx +1 -1
- package/src/components/ColorArea/ColorAreaPaint.tsx +51 -0
- package/src/components/ColorArea/ColorAreaPaint.web.tsx +31 -0
- package/src/components/ColorArea/index.tsx +71 -0
- package/src/components/ColorArea/styles.ts +18 -0
- package/src/components/ColorField/index.tsx +181 -0
- package/src/components/ColorField/styles.ts +20 -0
- package/src/components/ColorPicker/index.tsx +110 -0
- package/src/components/ColorPicker/styles.ts +33 -0
- package/src/components/ColorSlider/ColorSliderRailPaint.tsx +60 -0
- package/src/components/ColorSlider/ColorSliderRailPaint.web.tsx +33 -0
- package/src/components/ColorSlider/index.tsx +147 -0
- package/src/components/ColorSlider/styles.ts +72 -0
- package/src/components/ColorSwatch/index.tsx +56 -0
- package/src/components/ColorSwatch/styles.ts +24 -0
- package/src/components/ColorSwatchPicker/index.tsx +150 -0
- package/src/components/ColorSwatchPicker/styles.ts +32 -0
- package/src/components/DatePicker/index.tsx +13 -3
- package/src/components/Divider/index.tsx +1 -1
- package/src/components/Field/index.tsx +9 -3
- package/src/components/Heading/styles.ts +3 -0
- package/src/components/Icon/index.tsx +46 -6
- package/src/components/Icon/styles.ts +15 -0
- package/src/components/Input/index.tsx +1 -1
- package/src/components/Link/index.tsx +1 -1
- package/src/components/Menu/index.tsx +2 -2
- package/src/components/Select/index.tsx +1 -1
- package/src/components/Text/index.tsx +32 -5
- package/src/components/Text/styles.ts +39 -1
- package/src/components/Toast/hooks.ts +0 -1
- package/src/components/Toast/index.tsx +14 -8
- package/src/components/Toast/styles.ts +47 -19
- package/src/components/Toast/types.ts +1 -1
- package/src/components/ToggleButton/index.tsx +9 -7
- package/src/components/index.ts +6 -0
- package/src/components/picker/surfaces.tsx +15 -2
- package/src/providers/toast/insets-container.tsx +23 -9
- package/src/providers/toast/provider.tsx +2 -2
- package/src/providers/toast/types.ts +5 -0
- package/src/styles/constants.ts +13 -0
|
@@ -10,6 +10,12 @@ export * from './Card';
|
|
|
10
10
|
export * from './Carousel';
|
|
11
11
|
export * from './Checkbox';
|
|
12
12
|
export * from './Chip';
|
|
13
|
+
export * from './ColorArea';
|
|
14
|
+
export * from './ColorField';
|
|
15
|
+
export * from './ColorPicker';
|
|
16
|
+
export * from './ColorSlider';
|
|
17
|
+
export { ColorSwatch, type ColorSwatchProps, type ColorSwatchVariantProps } from './ColorSwatch';
|
|
18
|
+
export * from './ColorSwatchPicker';
|
|
13
19
|
export * from './CurrencyInput';
|
|
14
20
|
export * from './DateField';
|
|
15
21
|
export * from './Calendar';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,iBAAiB,CAAC;AAChC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,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,CAAC;AAC9B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,UAAU,CAAC;AACzB,cAAc,UAAU,CAAC;AACzB,cAAc,mBAAmB,CAAC;AAClC,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,SAAS,CAAC;AACxB,cAAc,WAAW,CAAC;AAC1B,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AACzC,cAAc,WAAW,CAAC;AAC1B,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type ReactNode, type RefObject } from 'react';
|
|
2
2
|
import { View } from 'react-native';
|
|
3
|
+
import { type OverlayWidthPolicy } from '@cdx-ui/primitives';
|
|
3
4
|
import { type BottomSheetModalProps } from '../BottomSheet';
|
|
4
5
|
export declare function PickerDialogSurface({ open, setOpen, registerSurface, children, }: {
|
|
5
6
|
open: boolean;
|
|
@@ -22,7 +23,10 @@ interface PickerPopoverSurfaceProps {
|
|
|
22
23
|
triggerRef?: RefObject<View | null>;
|
|
23
24
|
children: ReactNode;
|
|
24
25
|
className?: string;
|
|
26
|
+
contentClassName?: string;
|
|
27
|
+
dataSlot?: string;
|
|
28
|
+
width?: OverlayWidthPolicy;
|
|
25
29
|
}
|
|
26
|
-
export declare function PickerPopoverSurface({ open, setOpen, registerSurface, anchorRef, triggerRef, children, className, }: PickerPopoverSurfaceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
30
|
+
export declare function PickerPopoverSurface({ open, setOpen, registerSurface, anchorRef, triggerRef, children, className, contentClassName, dataSlot, width, }: PickerPopoverSurfaceProps): import("react/jsx-runtime").JSX.Element | null;
|
|
27
31
|
export {};
|
|
28
32
|
//# sourceMappingURL=surfaces.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../src/components/picker/surfaces.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjG,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"surfaces.d.ts","sourceRoot":"","sources":["../../../../src/components/picker/surfaces.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA4C,KAAK,SAAS,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACjG,OAAO,EAAc,IAAI,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,EAML,KAAK,kBAAkB,EACxB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAA+B,KAAK,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAKzF,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,OAAO,EACP,eAAe,EACf,QAAQ,GACT,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,CAAC;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB,2CAUA;AAED,KAAK,6BAA6B,GAAG;IACnC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,aAAa,KAAK,IAAI,CAAC;IAC/C,QAAQ,EAAE,SAAS,CAAC;CACrB,GAAG,IAAI,CAAC,qBAAqB,EAAE,YAAY,GAAG,qBAAqB,CAAC,CAAC;AAEtE,wBAAgB,wBAAwB,CAAC,EACvC,IAAI,EACJ,OAAO,EACP,eAAe,EACf,QAAQ,EACR,UAA2B,EAC3B,mBAA2B,GAC5B,EAAE,6BAA6B,2CA+C/B;AAED,UAAU,yBAAyB;IACjC,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACjC,eAAe,EAAE,CAAC,IAAI,EAAE,SAAS,KAAK,IAAI,CAAC;IAC3C,SAAS,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACpC,QAAQ,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,kBAAkB,CAAC;CAC5B;AAED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,OAAO,EACP,eAAe,EACf,SAAS,EACT,UAAU,EACV,QAAQ,EACR,SAAS,EACT,gBAAgB,EAChB,QAAQ,EACR,KAAgB,GACjB,EAAE,yBAAyB,kDA+D3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Icon.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Icon.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"Icon.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Icon.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;AAsC1B,wBASE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Text.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"Text.figma.d.ts","sourceRoot":"","sources":["../../../src/figma/Text.figma.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;;;;;;;;;AAgC1B,wBAKE"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ToastInsets } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* The viewport spans the whole window, so every full-size layer in it must let
|
|
5
|
+
* pointer events through to the page. React Native Web only expands `box-none`
|
|
6
|
+
* for `StyleSheet.create` styles, not inline style objects.
|
|
7
|
+
*/
|
|
8
|
+
export declare const passThroughStyles: {
|
|
9
|
+
boxNone: {
|
|
10
|
+
pointerEvents: "box-none";
|
|
11
|
+
};
|
|
12
|
+
};
|
|
3
13
|
interface InsetsContainerProps {
|
|
4
14
|
/**
|
|
5
15
|
* When true, uses a regular View instead of FullWindowOverlay on iOS.
|
|
@@ -34,6 +44,8 @@ interface InsetsContainerProps {
|
|
|
34
44
|
* Custom wrapper function to wrap the toast content
|
|
35
45
|
* Receives children and should return a component that wraps them
|
|
36
46
|
* The wrapper should apply flex: 1 (via className or style) to ensure proper layout
|
|
47
|
+
* and `pointerEvents: 'box-none'` (from a `StyleSheet.create` style) so it does not block
|
|
48
|
+
* interaction with the page behind
|
|
37
49
|
* Can be any component wrapper - KeyboardAvoidingView, View, or any custom component
|
|
38
50
|
*/
|
|
39
51
|
contentWrapper?: (children: ReactNode) => React.ReactElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"insets-container.d.ts","sourceRoot":"","sources":["../../../../src/providers/toast/insets-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C,UAAU,oBAAoB;IAC5B;;;;OAIG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAClC;;;;;;;;OAQG;IACH,0CAA0C,CAAC,EAAE,OAAO,CAAC;IACrD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB
|
|
1
|
+
{"version":3,"file":"insets-container.d.ts","sourceRoot":"","sources":["../../../../src/providers/toast/insets-container.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAI3C;;;;GAIG;AACH,eAAO,MAAM,iBAAiB;;;;CAE5B,CAAC;AAEH,UAAU,oBAAoB;IAC5B;;;;OAIG;IACH,wBAAwB,EAAE,OAAO,CAAC;IAClC;;;;;;;;OAQG;IACH,0CAA0C,CAAC,EAAE,OAAO,CAAC;IACrD;;;;;OAKG;IACH,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,KAAK,CAAC,YAAY,CAAC;IAC7D;;OAEG;IACH,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB;;OAEG;IACH,IAAI,EAAE,MAAM,IAAI,CAAC;IACjB;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,aAA+B,EAC/B,cAAc,EACd,QAAQ,EACR,wBAAwB,EACxB,0CAA0C,EAC1C,QAAQ,EACR,SAAS,EACT,IAAI,GACL,EAAE,QAAQ,CAAC,oBAAoB,CAAC,2CAoJhC"}
|
|
@@ -74,16 +74,21 @@ export interface ToastProviderProps {
|
|
|
74
74
|
* Custom wrapper function to wrap the toast content
|
|
75
75
|
* Receives children and should return a component that wraps them
|
|
76
76
|
* The wrapper should apply flex: 1 (via className or style) to ensure proper layout
|
|
77
|
+
* and `pointerEvents: 'box-none'` so it does not block interaction with the page behind.
|
|
78
|
+
* On web, `box-none` only takes effect from a `StyleSheet.create` style, not an inline object.
|
|
77
79
|
* Can be any component wrapper - KeyboardAvoidingView, View, or any custom component
|
|
78
80
|
*
|
|
79
81
|
* @example
|
|
80
82
|
* ```tsx
|
|
83
|
+
* const styles = StyleSheet.create({ passThrough: { pointerEvents: 'box-none' } });
|
|
84
|
+
*
|
|
81
85
|
* <ToastProvider
|
|
82
86
|
* contentWrapper={(children) => (
|
|
83
87
|
* <KeyboardAvoidingView
|
|
84
88
|
* behavior="padding"
|
|
85
89
|
* keyboardVerticalOffset={24}
|
|
86
90
|
* className="flex-1"
|
|
91
|
+
* style={styles.passThrough}
|
|
87
92
|
* >
|
|
88
93
|
* {children}
|
|
89
94
|
* </KeyboardAvoidingView>
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/providers/toast/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AAE/E;;;GAGG;AACH,MAAM,WAAW,iBAAkB,SAAQ,IAAI,CAC7C,UAAU,EACV,WAAW,GAAG,OAAO,GAAG,WAAW,GAAG,aAAa,CACpD;CAAG;AAEJ;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,wBAAwB,C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BAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,GAAG,gBAAgB,KAAK,MAAM,CAAC;IACrD;;;;;;OAMG;IACH,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,MAAM,EAAE,GAAG,KAAK,KAAK,IAAI,CAAC;CACxD;AAED;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,YAAY,CAAC;IACpB;;OAEG;IACH,cAAc,EAAE,OAAO,CAAC;CACzB"}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
export declare const TRANSITION_COLORS = "transition-colors duration-150";
|
|
2
2
|
export declare const DISABLED_OPACITY = "data-[disabled=true]:opacity-50";
|
|
3
3
|
export declare const DISABLED_CURSOR = "data-[disabled=true]:cursor-not-allowed data-[disabled=true]:pointer-events-none";
|
|
4
|
+
export declare const CONTENT_COLOR: {
|
|
5
|
+
readonly primary: "text-content-primary";
|
|
6
|
+
readonly secondary: "text-content-secondary";
|
|
7
|
+
readonly tertiary: "text-content-tertiary";
|
|
8
|
+
readonly action: "text-content-action";
|
|
9
|
+
readonly danger: "text-content-danger";
|
|
10
|
+
readonly warning: "text-content-warning";
|
|
11
|
+
readonly success: "text-content-success";
|
|
12
|
+
readonly info: "text-content-info";
|
|
13
|
+
};
|
|
4
14
|
export declare const WEB_NARROW_FIELD_TEXT = "web:max-[600px]:text-base web:max-[600px]:leading-normal";
|
|
5
15
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/styles/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,mCAAmC,CAAC;AAGlE,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,eAAe,qFACwD,CAAC;AAIrF,eAAO,MAAM,qBAAqB,6DAA6D,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/styles/constants.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,iBAAiB,mCAAmC,CAAC;AAGlE,eAAO,MAAM,gBAAgB,oCAAoC,CAAC;AAClE,eAAO,MAAM,eAAe,qFACwD,CAAC;AAIrF,eAAO,MAAM,aAAa;;;;;;;;;CAShB,CAAC;AAIX,eAAO,MAAM,qBAAqB,6DAA6D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cdx-ui/components",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -81,10 +81,10 @@
|
|
|
81
81
|
"@marceloterreiro/flash-calendar": "2.0.0",
|
|
82
82
|
"react-native-reanimated-carousel": "5.0.0-beta.5",
|
|
83
83
|
"uniwind": "1.10.0",
|
|
84
|
-
"@cdx-ui/
|
|
85
|
-
"@cdx-ui/
|
|
86
|
-
"@cdx-ui/
|
|
87
|
-
"@cdx-ui/
|
|
84
|
+
"@cdx-ui/formatters": "0.2.1",
|
|
85
|
+
"@cdx-ui/icons": "0.2.1",
|
|
86
|
+
"@cdx-ui/utils": "0.2.1",
|
|
87
|
+
"@cdx-ui/primitives": "0.2.1"
|
|
88
88
|
},
|
|
89
89
|
"devDependencies": {
|
|
90
90
|
"@react-navigation/bottom-tabs": "*",
|
|
@@ -149,7 +149,7 @@ AlertRoot.displayName = 'Alert';
|
|
|
149
149
|
// ICON
|
|
150
150
|
// =============================================================================
|
|
151
151
|
|
|
152
|
-
export interface AlertIconProps extends Omit<IconProps, 'as'> {
|
|
152
|
+
export interface AlertIconProps extends Omit<IconProps, 'as' | 'color'> {
|
|
153
153
|
asChild?: boolean;
|
|
154
154
|
/**
|
|
155
155
|
* Override the auto-rendered severity icon. Omit to use the default icon for
|
|
@@ -215,7 +215,7 @@ AvatarText.displayName = 'Avatar.Text';
|
|
|
215
215
|
// AVATAR ICON
|
|
216
216
|
// =============================================================================
|
|
217
217
|
|
|
218
|
-
export interface AvatarIconProps extends Omit<IconProps, 'children'> {
|
|
218
|
+
export interface AvatarIconProps extends Omit<IconProps, 'children' | 'color'> {
|
|
219
219
|
asChild?: boolean;
|
|
220
220
|
className?: string;
|
|
221
221
|
}
|
|
@@ -277,7 +277,7 @@ ButtonGroup.displayName = 'Button.Group';
|
|
|
277
277
|
// STYLED ICON COMPONENT
|
|
278
278
|
// =============================================================================
|
|
279
279
|
|
|
280
|
-
export interface ButtonIconProps extends Omit<IconProps, 'children' | 'as'> {
|
|
280
|
+
export interface ButtonIconProps extends Omit<IconProps, 'children' | 'as' | 'color'> {
|
|
281
281
|
/** Render the consumer's child element in place of the default icon host. */
|
|
282
282
|
asChild?: boolean;
|
|
283
283
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { useMemo } from 'react';
|
|
2
2
|
import { useCSSVariable } from 'uniwind';
|
|
3
3
|
import type { CalendarTheme } from '@marceloterreiro/flash-calendar';
|
|
4
|
-
import type
|
|
4
|
+
import { formatDateId, parseMonthId, type DateId, type MonthId } from '@cdx-ui/formatters';
|
|
5
5
|
|
|
6
6
|
const DAY_SIZE = 36;
|
|
7
7
|
const DAY_RADIUS = DAY_SIZE / 2;
|
|
@@ -352,6 +352,18 @@ export function formatFlashCalendarWeekdayShort(date: Date, locale: string): str
|
|
|
352
352
|
return new Intl.DateTimeFormat(locale, { weekday: 'short' }).format(date);
|
|
353
353
|
}
|
|
354
354
|
|
|
355
|
+
/** Every day of the month Flash Calendar renders; days of adjacent months render as blanks. */
|
|
356
|
+
export function getMonthDateIds(monthId: MonthId): DateId[] {
|
|
357
|
+
const parts = parseMonthId(monthId);
|
|
358
|
+
if (!parts) {
|
|
359
|
+
return [];
|
|
360
|
+
}
|
|
361
|
+
const daysInMonth = new Date(parts.year, parts.month, 0).getDate();
|
|
362
|
+
return Array.from({ length: daysInMonth }, (_, index) =>
|
|
363
|
+
formatDateId({ year: parts.year, month: parts.month, day: index + 1 }),
|
|
364
|
+
);
|
|
365
|
+
}
|
|
366
|
+
|
|
355
367
|
/**
|
|
356
368
|
* Brands a raw Flash Calendar day id as a wire {@link DateId}. Flash Calendar
|
|
357
369
|
* always hands back `YYYY-MM-DD`, so this is the trusted third-party boundary
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { forwardRef, useCallback, useId, useMemo, type ReactNode } from 'react';
|
|
1
|
+
import { forwardRef, useCallback, useId, useMemo, useRef, type ReactNode } from 'react';
|
|
2
2
|
import { View, type ViewProps } from 'react-native';
|
|
3
3
|
import { Calendar as FlashCalendar } from '@marceloterreiro/flash-calendar';
|
|
4
|
+
import { getDateValidationReason, type DateId } from '@cdx-ui/formatters';
|
|
4
5
|
import {
|
|
5
6
|
CalendarGrid as CalendarGridPrimitive,
|
|
6
7
|
CalendarRoot as CalendarRootPrimitive,
|
|
@@ -15,6 +16,7 @@ import { CalendarYearPickerGrid } from './CalendarYearPickerGrid';
|
|
|
15
16
|
import {
|
|
16
17
|
FLASH_CALENDAR_DAY_HEIGHT,
|
|
17
18
|
formatFlashCalendarWeekdayShort,
|
|
19
|
+
getMonthDateIds,
|
|
18
20
|
toCalendarDateId,
|
|
19
21
|
useFlashCalendarTheme,
|
|
20
22
|
} from './flashCalendarAdapter';
|
|
@@ -73,8 +75,26 @@ const CalendarHeader = forwardRef<View, ViewProps>(({ className, style, ...props
|
|
|
73
75
|
|
|
74
76
|
CalendarHeader.displayName = 'Calendar.Header';
|
|
75
77
|
|
|
78
|
+
/**
|
|
79
|
+
* Keeps the previous array while its contents are unchanged, so an inline `isDateUnavailable`
|
|
80
|
+
* (a new function every render) does not hand Flash Calendar a new array and re-layout the month.
|
|
81
|
+
*/
|
|
82
|
+
function useStableDateIds(ids: DateId[] | undefined): DateId[] | undefined {
|
|
83
|
+
const ref = useRef(ids);
|
|
84
|
+
const prev = ref.current;
|
|
85
|
+
const unchanged =
|
|
86
|
+
prev === ids ||
|
|
87
|
+
(ids !== undefined &&
|
|
88
|
+
prev?.length === ids.length &&
|
|
89
|
+
prev.every((id, index) => id === ids[index]));
|
|
90
|
+
if (!unchanged) {
|
|
91
|
+
ref.current = ids;
|
|
92
|
+
}
|
|
93
|
+
return ref.current;
|
|
94
|
+
}
|
|
95
|
+
|
|
76
96
|
const CalendarGrid = forwardRef<View, ViewProps>(({ className, style, ...props }, ref) => {
|
|
77
|
-
const { value, onValueChange, monthId, minValue, maxValue, disabled, locale } =
|
|
97
|
+
const { value, onValueChange, monthId, minValue, maxValue, isDateUnavailable, disabled, locale } =
|
|
78
98
|
useCalendarContext();
|
|
79
99
|
const instanceId = useId();
|
|
80
100
|
const theme = useFlashCalendarTheme(value);
|
|
@@ -86,13 +106,30 @@ const CalendarGrid = forwardRef<View, ViewProps>(({ className, style, ...props }
|
|
|
86
106
|
|
|
87
107
|
const activeRanges = useMemo(() => (value ? [{ startId: value, endId: value }] : []), [value]);
|
|
88
108
|
|
|
109
|
+
// Bounds are disabled by Flash Calendar via calendarMinDateId / calendarMaxDateId.
|
|
110
|
+
const unavailableDateIds = useStableDateIds(
|
|
111
|
+
useMemo(
|
|
112
|
+
() =>
|
|
113
|
+
isDateUnavailable
|
|
114
|
+
? getMonthDateIds(monthId).filter((id) => isDateUnavailable(id))
|
|
115
|
+
: undefined,
|
|
116
|
+
[isDateUnavailable, monthId],
|
|
117
|
+
),
|
|
118
|
+
);
|
|
119
|
+
|
|
120
|
+
const isDateUnavailableRef = useRef(isDateUnavailable);
|
|
121
|
+
isDateUnavailableRef.current = isDateUnavailable;
|
|
122
|
+
|
|
89
123
|
const handleDayPress = useCallback(
|
|
90
124
|
(dateId: string) => {
|
|
91
|
-
|
|
92
|
-
|
|
125
|
+
const id = toCalendarDateId(dateId);
|
|
126
|
+
const rules = { minValue, maxValue, isDateUnavailable: isDateUnavailableRef.current };
|
|
127
|
+
if (disabled || getDateValidationReason(id, rules)) {
|
|
128
|
+
return;
|
|
93
129
|
}
|
|
130
|
+
onValueChange?.(id);
|
|
94
131
|
},
|
|
95
|
-
[disabled, onValueChange],
|
|
132
|
+
[disabled, maxValue, minValue, onValueChange],
|
|
96
133
|
);
|
|
97
134
|
|
|
98
135
|
return (
|
|
@@ -103,6 +140,7 @@ const CalendarGrid = forwardRef<View, ViewProps>(({ className, style, ...props }
|
|
|
103
140
|
calendarActiveDateRanges={activeRanges}
|
|
104
141
|
calendarMinDateId={minValue}
|
|
105
142
|
calendarMaxDateId={maxValue}
|
|
143
|
+
calendarDisabledDateIds={unavailableDateIds}
|
|
106
144
|
calendarMonthHeaderHeight={0}
|
|
107
145
|
calendarDayHeight={FLASH_CALENDAR_DAY_HEIGHT}
|
|
108
146
|
calendarWeekHeaderHeight={28}
|
|
@@ -138,7 +138,7 @@ CheckboxIndicator.displayName = 'Checkbox.Indicator';
|
|
|
138
138
|
// CHECKBOX ICON (styled-only, reads context for conditional mount)
|
|
139
139
|
// =============================================================================
|
|
140
140
|
|
|
141
|
-
export interface CheckboxIconProps extends Omit<IconProps, 'children'> {}
|
|
141
|
+
export interface CheckboxIconProps extends Omit<IconProps, 'children' | 'color'> {}
|
|
142
142
|
|
|
143
143
|
const CheckboxIcon = ({ className, style, ...props }: CheckboxIconProps) => {
|
|
144
144
|
const { isReadOnly } = useCheckboxContext();
|
|
@@ -157,7 +157,7 @@ ChipLabel.displayName = 'Chip.Label';
|
|
|
157
157
|
// ICON
|
|
158
158
|
// =============================================================================
|
|
159
159
|
|
|
160
|
-
export interface ChipIconProps extends Omit<IconProps, 'children' | 'as'> {
|
|
160
|
+
export interface ChipIconProps extends Omit<IconProps, 'children' | 'as' | 'color'> {
|
|
161
161
|
asChild?: boolean;
|
|
162
162
|
/**
|
|
163
163
|
* Forge icon component to render. Required unless `asChild` is set, in which
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { useId } from 'react';
|
|
2
|
+
import { StyleSheet, View } from 'react-native';
|
|
3
|
+
import { Defs, LinearGradient, Rect, Stop, Svg } from 'react-native-svg';
|
|
4
|
+
import { useColorAreaContext } from '@cdx-ui/primitives';
|
|
5
|
+
import { colorAreaPaintVariants } from './styles';
|
|
6
|
+
|
|
7
|
+
export function ColorAreaPaint() {
|
|
8
|
+
const { value, isRTL } = useColorAreaContext();
|
|
9
|
+
const horizontalGradientId = useId();
|
|
10
|
+
const verticalGradientId = useId();
|
|
11
|
+
const hue = value.withChannel('hsb', 'saturation', 100).withChannel('hsb', 'brightness', 100);
|
|
12
|
+
|
|
13
|
+
return (
|
|
14
|
+
<View
|
|
15
|
+
className={colorAreaPaintVariants()}
|
|
16
|
+
style={styles.paint}
|
|
17
|
+
accessible={false}
|
|
18
|
+
accessibilityElementsHidden
|
|
19
|
+
importantForAccessibility="no-hide-descendants"
|
|
20
|
+
>
|
|
21
|
+
<Svg width="100%" height="100%">
|
|
22
|
+
<Defs>
|
|
23
|
+
<LinearGradient
|
|
24
|
+
id={horizontalGradientId}
|
|
25
|
+
x1={isRTL ? '100%' : '0%'}
|
|
26
|
+
y1="0%"
|
|
27
|
+
x2={isRTL ? '0%' : '100%'}
|
|
28
|
+
y2="0%"
|
|
29
|
+
>
|
|
30
|
+
<Stop offset="0%" stopColor="#FFFFFF" />
|
|
31
|
+
<Stop offset="100%" stopColor={hue.toString('hex')} />
|
|
32
|
+
</LinearGradient>
|
|
33
|
+
<LinearGradient id={verticalGradientId} x1="0%" y1="0%" x2="0%" y2="100%">
|
|
34
|
+
<Stop offset="0%" stopColor="#000000" stopOpacity={0} />
|
|
35
|
+
<Stop offset="100%" stopColor="#000000" stopOpacity={1} />
|
|
36
|
+
</LinearGradient>
|
|
37
|
+
</Defs>
|
|
38
|
+
<Rect width="100%" height="100%" fill={`url(#${horizontalGradientId})`} />
|
|
39
|
+
<Rect width="100%" height="100%" fill={`url(#${verticalGradientId})`} />
|
|
40
|
+
</Svg>
|
|
41
|
+
</View>
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
ColorAreaPaint.displayName = 'ColorAreaPaint';
|
|
46
|
+
|
|
47
|
+
const styles = StyleSheet.create({
|
|
48
|
+
paint: {
|
|
49
|
+
pointerEvents: 'none',
|
|
50
|
+
},
|
|
51
|
+
});
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { View, type ViewStyle } from 'react-native';
|
|
2
|
+
import { useColorAreaContext } from '@cdx-ui/primitives';
|
|
3
|
+
import { colorAreaPaintVariants } from './styles';
|
|
4
|
+
|
|
5
|
+
export function ColorAreaPaint() {
|
|
6
|
+
const { value, isRTL } = useColorAreaContext();
|
|
7
|
+
const hue = value
|
|
8
|
+
.withChannel('hsb', 'saturation', 100)
|
|
9
|
+
.withChannel('hsb', 'brightness', 100)
|
|
10
|
+
.toString('hex');
|
|
11
|
+
const direction = isRTL ? 'to left' : 'to right';
|
|
12
|
+
const paintStyle = {
|
|
13
|
+
backgroundImage: [
|
|
14
|
+
'linear-gradient(to bottom, transparent, #000000)',
|
|
15
|
+
`linear-gradient(${direction}, #FFFFFF, ${hue})`,
|
|
16
|
+
].join(', '),
|
|
17
|
+
pointerEvents: 'none',
|
|
18
|
+
} as unknown as ViewStyle;
|
|
19
|
+
|
|
20
|
+
return (
|
|
21
|
+
<View
|
|
22
|
+
className={colorAreaPaintVariants()}
|
|
23
|
+
style={paintStyle}
|
|
24
|
+
accessible={false}
|
|
25
|
+
accessibilityElementsHidden
|
|
26
|
+
importantForAccessibility="no-hide-descendants"
|
|
27
|
+
/>
|
|
28
|
+
);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
ColorAreaPaint.displayName = 'ColorAreaPaint';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { forwardRef, type ReactNode } from 'react';
|
|
2
|
+
import { View } from 'react-native';
|
|
3
|
+
import {
|
|
4
|
+
ColorAreaRoot as ColorAreaRootPrimitive,
|
|
5
|
+
ColorAreaThumb as ColorAreaThumbPrimitive,
|
|
6
|
+
dataAttributes,
|
|
7
|
+
mergeDataAttributes,
|
|
8
|
+
useColorAreaContext,
|
|
9
|
+
type IColorAreaProps,
|
|
10
|
+
type IColorAreaThumbProps,
|
|
11
|
+
} from '@cdx-ui/primitives';
|
|
12
|
+
import { cn } from '@cdx-ui/utils';
|
|
13
|
+
import { ColorAreaPaint } from './ColorAreaPaint';
|
|
14
|
+
import { colorAreaThumbVariants, colorAreaVariants } from './styles';
|
|
15
|
+
|
|
16
|
+
export interface ColorAreaProps extends IColorAreaProps {
|
|
17
|
+
readonly asChild?: boolean;
|
|
18
|
+
readonly className?: string;
|
|
19
|
+
readonly children?: ReactNode;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const ColorAreaRoot = forwardRef<View, ColorAreaProps>(
|
|
23
|
+
({ asChild, className, style, children, ...props }, ref) => (
|
|
24
|
+
<ColorAreaRootPrimitive
|
|
25
|
+
ref={ref}
|
|
26
|
+
asChild={asChild}
|
|
27
|
+
className={cn(colorAreaVariants(), className)}
|
|
28
|
+
style={style}
|
|
29
|
+
{...props}
|
|
30
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'color-area' }))}
|
|
31
|
+
>
|
|
32
|
+
<ColorAreaPaint />
|
|
33
|
+
{children}
|
|
34
|
+
</ColorAreaRootPrimitive>
|
|
35
|
+
),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
ColorAreaRoot.displayName = 'ColorArea';
|
|
39
|
+
|
|
40
|
+
export interface ColorAreaThumbProps extends IColorAreaThumbProps {
|
|
41
|
+
readonly className?: string;
|
|
42
|
+
readonly children?: ReactNode;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const ColorAreaThumb = forwardRef<View, ColorAreaThumbProps>(
|
|
46
|
+
({ className, style, children, ...props }, ref) => {
|
|
47
|
+
const { value } = useColorAreaContext();
|
|
48
|
+
|
|
49
|
+
return (
|
|
50
|
+
<ColorAreaThumbPrimitive
|
|
51
|
+
ref={ref}
|
|
52
|
+
className={cn(colorAreaThumbVariants(), className)}
|
|
53
|
+
style={[{ backgroundColor: value.toString('hex') }, style]}
|
|
54
|
+
{...props}
|
|
55
|
+
{...mergeDataAttributes(props, dataAttributes({ slot: 'color-area-thumb' }))}
|
|
56
|
+
>
|
|
57
|
+
{children}
|
|
58
|
+
</ColorAreaThumbPrimitive>
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
ColorAreaThumb.displayName = 'ColorArea.Thumb';
|
|
64
|
+
|
|
65
|
+
type ColorAreaCompoundComponent = typeof ColorAreaRoot & {
|
|
66
|
+
Thumb: typeof ColorAreaThumb;
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export const ColorArea = Object.assign(ColorAreaRoot, {
|
|
70
|
+
Thumb: ColorAreaThumb,
|
|
71
|
+
}) as ColorAreaCompoundComponent;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cva } from '@cdx-ui/utils';
|
|
2
|
+
import { DISABLED_CURSOR } from '../../styles/constants';
|
|
3
|
+
|
|
4
|
+
export const colorAreaVariants = cva([
|
|
5
|
+
'relative aspect-square w-full touch-none select-none',
|
|
6
|
+
'data-[disabled=true]:opacity-[var(--opacity-disabled)]',
|
|
7
|
+
DISABLED_CURSOR,
|
|
8
|
+
]);
|
|
9
|
+
|
|
10
|
+
export const colorAreaPaintVariants = cva([
|
|
11
|
+
'absolute inset-0 overflow-hidden rounded-[var(--border-radius-default)]',
|
|
12
|
+
]);
|
|
13
|
+
|
|
14
|
+
export const colorAreaThumbVariants = cva([
|
|
15
|
+
'z-2 size-5 rounded-[var(--border-radius-round)]',
|
|
16
|
+
'border-2 border-surface-primary shadow-md',
|
|
17
|
+
'transition-none',
|
|
18
|
+
]);
|