@ark-ui/solid 0.8.0 → 0.9.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/CHANGELOG.md +16 -32
- package/accordion/accordion-context.d.ts +4 -21
- package/accordion/index.cjs +24 -0
- package/accordion/index.d.ts +2 -0
- package/accordion/index.mjs +7 -0
- package/accordion/use-accordion.d.ts +3 -11
- package/avatar/avatar-context.d.ts +4 -20
- package/avatar/index.cjs +20 -0
- package/avatar/index.d.ts +1 -0
- package/avatar/index.mjs +5 -0
- package/avatar/use-avatar.d.ts +3 -11
- package/carousel/carousel-context.d.ts +4 -59
- package/carousel/carousel-indicator-group.cjs +16 -0
- package/carousel/carousel-indicator-group.d.ts +4 -0
- package/carousel/carousel-indicator-group.mjs +12 -0
- package/carousel/carousel-indicator.cjs +18 -0
- package/carousel/carousel-indicator.d.ts +6 -0
- package/carousel/carousel-indicator.mjs +14 -0
- package/carousel/carousel-slide.d.ts +1 -1
- package/carousel/index.cjs +29 -0
- package/carousel/index.d.ts +3 -0
- package/carousel/index.mjs +11 -0
- package/carousel/use-carousel.d.ts +3 -31
- package/checkbox/checkbox-context.d.ts +4 -27
- package/checkbox/index.cjs +22 -0
- package/checkbox/index.d.ts +2 -1
- package/checkbox/index.mjs +6 -0
- package/checkbox/use-checkbox.d.ts +3 -15
- package/color-picker/color-picker-area-context.cjs +13 -0
- package/color-picker/color-picker-area-context.d.ts +3 -0
- package/color-picker/color-picker-area-context.mjs +8 -0
- package/color-picker/color-picker-area-gradient.cjs +18 -0
- package/color-picker/color-picker-area-gradient.d.ts +4 -0
- package/color-picker/color-picker-area-gradient.mjs +14 -0
- package/color-picker/color-picker-area-thumb.cjs +18 -0
- package/color-picker/color-picker-area-thumb.d.ts +4 -0
- package/color-picker/color-picker-area-thumb.mjs +14 -0
- package/color-picker/color-picker-area.cjs +24 -0
- package/color-picker/color-picker-area.d.ts +5 -0
- package/color-picker/color-picker-area.mjs +20 -0
- package/color-picker/color-picker-channel-input.cjs +18 -0
- package/color-picker/color-picker-channel-input.d.ts +6 -0
- package/color-picker/color-picker-channel-input.mjs +14 -0
- package/color-picker/color-picker-channel-slider-background.cjs +18 -0
- package/color-picker/color-picker-channel-slider-background.d.ts +4 -0
- package/color-picker/color-picker-channel-slider-background.mjs +14 -0
- package/color-picker/color-picker-channel-slider-context.cjs +13 -0
- package/color-picker/color-picker-channel-slider-context.d.ts +3 -0
- package/color-picker/color-picker-channel-slider-context.mjs +8 -0
- package/color-picker/color-picker-channel-slider-thumb.cjs +18 -0
- package/color-picker/color-picker-channel-slider-thumb.d.ts +4 -0
- package/color-picker/color-picker-channel-slider-thumb.mjs +14 -0
- package/color-picker/color-picker-channel-slider-track.cjs +24 -0
- package/color-picker/color-picker-channel-slider-track.d.ts +6 -0
- package/color-picker/color-picker-channel-slider-track.mjs +20 -0
- package/color-picker/color-picker-content.cjs +16 -0
- package/color-picker/color-picker-content.d.ts +4 -0
- package/color-picker/color-picker-content.mjs +12 -0
- package/color-picker/color-picker-context.cjs +13 -0
- package/color-picker/color-picker-context.d.ts +7 -0
- package/color-picker/color-picker-context.mjs +8 -0
- package/color-picker/color-picker-eye-dropper-trigger.cjs +16 -0
- package/color-picker/color-picker-eye-dropper-trigger.d.ts +4 -0
- package/color-picker/color-picker-eye-dropper-trigger.mjs +12 -0
- package/color-picker/color-picker-swatch-background.cjs +18 -0
- package/color-picker/color-picker-swatch-background.d.ts +4 -0
- package/color-picker/color-picker-swatch-background.mjs +14 -0
- package/color-picker/color-picker-swatch-context.cjs +13 -0
- package/color-picker/color-picker-swatch-context.d.ts +3 -0
- package/color-picker/color-picker-swatch-context.mjs +8 -0
- package/color-picker/color-picker-swatch-group.cjs +15 -0
- package/color-picker/color-picker-swatch-group.d.ts +4 -0
- package/color-picker/color-picker-swatch-group.mjs +11 -0
- package/color-picker/color-picker-swatch.cjs +28 -0
- package/color-picker/color-picker-swatch.d.ts +6 -0
- package/color-picker/color-picker-swatch.mjs +24 -0
- package/color-picker/color-picker.anatomy.cjs +11 -0
- package/color-picker/color-picker.anatomy.d.ts +3 -0
- package/color-picker/color-picker.anatomy.mjs +6 -0
- package/color-picker/color-picker.cjs +23 -0
- package/color-picker/color-picker.d.ts +8 -0
- package/color-picker/color-picker.mjs +19 -0
- package/color-picker/index.cjs +41 -0
- package/color-picker/index.d.ts +17 -0
- package/color-picker/index.mjs +17 -0
- package/color-picker/use-color-picker.cjs +36 -0
- package/color-picker/use-color-picker.d.ts +7 -0
- package/color-picker/use-color-picker.mjs +13 -0
- package/combobox/combobox-clear-trigger.cjs +16 -0
- package/combobox/combobox-clear-trigger.d.ts +4 -0
- package/combobox/combobox-clear-trigger.mjs +12 -0
- package/combobox/combobox-context.d.ts +4 -55
- package/combobox/combobox-option-group.cjs +16 -0
- package/combobox/combobox-option-group.d.ts +6 -0
- package/combobox/combobox-option-group.mjs +12 -0
- package/combobox/index.cjs +34 -0
- package/combobox/index.d.ts +3 -0
- package/combobox/index.mjs +12 -0
- package/combobox/use-combobox.d.ts +3 -28
- package/date-picker/date-picker-context.d.ts +4 -254
- package/date-picker/date-picker-grid.d.ts +1 -1
- package/date-picker/date-picker-view-trigger.d.ts +1 -1
- package/date-picker/index.cjs +59 -0
- package/date-picker/index.d.ts +3 -0
- package/date-picker/index.mjs +26 -0
- package/date-picker/use-date-picker.d.ts +3 -128
- package/dialog/dialog-context.d.ts +4 -24
- package/dialog/index.cjs +30 -0
- package/dialog/index.d.ts +1 -0
- package/dialog/index.mjs +10 -0
- package/dialog/use-dialog.d.ts +3 -13
- package/editable/editable-context.d.ts +4 -38
- package/editable/index.cjs +32 -0
- package/editable/index.d.ts +1 -0
- package/editable/index.mjs +11 -0
- package/editable/use-editable.d.ts +3 -20
- package/environment/environment-context.cjs +1 -0
- package/environment/environment-context.mjs +1 -0
- package/environment/index.cjs +11 -0
- package/environment/index.mjs +2 -0
- package/hover-card/hover-card-context.d.ts +4 -23
- package/hover-card/index.cjs +26 -0
- package/hover-card/index.d.ts +1 -0
- package/hover-card/index.mjs +8 -0
- package/hover-card/use-hover-card.d.ts +3 -12
- package/index.cjs +180 -108
- package/index.mjs +58 -22
- package/menu/index.cjs +40 -0
- package/menu/index.d.ts +1 -0
- package/menu/index.mjs +15 -0
- package/merge-style.cjs +2 -0
- package/merge-style.mjs +2 -0
- package/number-input/index.cjs +28 -0
- package/number-input/index.d.ts +1 -0
- package/number-input/index.mjs +9 -0
- package/number-input/number-input-context.d.ts +4 -44
- package/number-input/use-number-input.d.ts +3 -23
- package/package.json +50 -51
- package/pagination/index.cjs +25 -0
- package/pagination/index.d.ts +1 -0
- package/pagination/index.mjs +9 -0
- package/pagination/pagination-context.d.ts +4 -45
- package/pagination/pagination-ellipsis.d.ts +1 -1
- package/pagination/use-pagination.d.ts +3 -24
- package/pin-input/index.cjs +22 -0
- package/pin-input/index.d.ts +1 -0
- package/pin-input/index.mjs +6 -0
- package/pin-input/pin-input-context.d.ts +4 -32
- package/pin-input/use-pin-input.d.ts +3 -17
- package/popover/index.cjs +34 -0
- package/popover/index.d.ts +1 -0
- package/popover/index.mjs +12 -0
- package/popover/popover-context.d.ts +4 -33
- package/popover/use-popover.d.ts +3 -17
- package/pressable/index.cjs +11 -0
- package/pressable/index.mjs +2 -0
- package/pressable/use-pressable.d.ts +3 -5
- package/radio-group/index.cjs +28 -0
- package/radio-group/index.d.ts +2 -0
- package/radio-group/index.mjs +9 -0
- package/radio-group/radio-context.cjs +1 -0
- package/radio-group/radio-context.d.ts +11 -2
- package/radio-group/radio-context.mjs +1 -0
- package/radio-group/radio-group-context.d.ts +4 -49
- package/radio-group/use-radio-group.d.ts +3 -26
- package/range-slider/index.cjs +32 -0
- package/range-slider/index.d.ts +1 -0
- package/range-slider/index.mjs +11 -0
- package/range-slider/range-slider-context.d.ts +4 -58
- package/range-slider/use-range-slider.d.ts +3 -30
- package/rating-group/index.cjs +24 -0
- package/rating-group/index.d.ts +2 -0
- package/rating-group/index.mjs +7 -0
- package/rating-group/rating-context.cjs +1 -0
- package/rating-group/rating-context.mjs +1 -0
- package/rating-group/rating-group-context.d.ts +4 -31
- package/rating-group/use-rating-group.d.ts +3 -16
- package/segment-group/index.cjs +27 -0
- package/segment-group/index.d.ts +2 -0
- package/segment-group/index.mjs +10 -0
- package/segment-group/segment-context.cjs +1 -0
- package/segment-group/segment-context.d.ts +11 -2
- package/segment-group/segment-context.mjs +1 -0
- package/segment-group/segment-group-context.d.ts +4 -49
- package/segment-group/use-segment-group.d.ts +3 -26
- package/select/index.cjs +30 -0
- package/select/index.d.ts +1 -0
- package/select/index.mjs +10 -0
- package/select/select-context.d.ts +4 -50
- package/select/use-select.d.ts +3 -26
- package/slider/index.cjs +32 -0
- package/slider/index.d.ts +1 -0
- package/slider/index.mjs +11 -0
- package/slider/slider-context.d.ts +4 -48
- package/slider/use-slider.d.ts +3 -25
- package/splitter/index.cjs +20 -0
- package/splitter/index.d.ts +1 -0
- package/splitter/index.mjs +5 -0
- package/splitter/splitter-context.d.ts +4 -46
- package/splitter/use-splitter.d.ts +4 -25
- package/ssr-spread.cjs +1 -0
- package/ssr-spread.mjs +1 -0
- package/switch/index.cjs +24 -0
- package/switch/index.d.ts +1 -0
- package/switch/index.mjs +7 -0
- package/switch/switch-context.d.ts +4 -24
- package/switch/use-switch.d.ts +3 -13
- package/tabs/index.cjs +24 -0
- package/tabs/index.d.ts +1 -0
- package/tabs/index.mjs +7 -0
- package/tabs/tabs-context.d.ts +4 -29
- package/tabs/use-tabs.d.ts +3 -15
- package/tags-input/index.cjs +30 -0
- package/tags-input/index.d.ts +1 -0
- package/tags-input/index.mjs +10 -0
- package/tags-input/tags-input-context.d.ts +4 -49
- package/tags-input/use-tags-input.d.ts +3 -26
- package/toast/index.cjs +29 -0
- package/toast/index.d.ts +1 -0
- package/toast/index.mjs +9 -0
- package/toast/toast-item-context.d.ts +4 -35
- package/toast/toast.cjs +6 -1
- package/toast/toast.mjs +7 -2
- package/toast/use-toast-item.d.ts +3 -18
- package/tooltip/index.cjs +26 -0
- package/tooltip/index.d.ts +1 -0
- package/tooltip/index.mjs +8 -0
- package/tooltip/tooltip-context.d.ts +4 -33
- package/tooltip/use-tooltip.d.ts +3 -17
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerAreaContext = require('./color-picker-area-context.cjs');
|
|
9
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
10
|
+
|
|
11
|
+
const ColorPickerAreaGradient = props => {
|
|
12
|
+
const colorPicker = colorPickerContext.useColorPickerContext();
|
|
13
|
+
const area = colorPickerAreaContext.useColorPickerAreaContext();
|
|
14
|
+
const areaGradientProps = solid.mergeProps(() => colorPicker().getAreaGradientProps(area), props);
|
|
15
|
+
return web.createComponent(factory.ark.div, areaGradientProps);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ColorPickerAreaGradient = ColorPickerAreaGradient;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerAreaContext } from './color-picker-area-context.mjs';
|
|
5
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
6
|
+
|
|
7
|
+
const ColorPickerAreaGradient = props => {
|
|
8
|
+
const colorPicker = useColorPickerContext();
|
|
9
|
+
const area = useColorPickerAreaContext();
|
|
10
|
+
const areaGradientProps = mergeProps(() => colorPicker().getAreaGradientProps(area), props);
|
|
11
|
+
return createComponent(ark.div, areaGradientProps);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ColorPickerAreaGradient };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerAreaContext = require('./color-picker-area-context.cjs');
|
|
9
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
10
|
+
|
|
11
|
+
const ColorPickerAreaThumb = props => {
|
|
12
|
+
const colorPicker = colorPickerContext.useColorPickerContext();
|
|
13
|
+
const area = colorPickerAreaContext.useColorPickerAreaContext();
|
|
14
|
+
const areaThumbProps = solid.mergeProps(() => colorPicker().getAreaThumbProps(area), props);
|
|
15
|
+
return web.createComponent(factory.ark.div, areaThumbProps);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ColorPickerAreaThumb = ColorPickerAreaThumb;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerAreaContext } from './color-picker-area-context.mjs';
|
|
5
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
6
|
+
|
|
7
|
+
const ColorPickerAreaThumb = props => {
|
|
8
|
+
const colorPicker = useColorPickerContext();
|
|
9
|
+
const area = useColorPickerAreaContext();
|
|
10
|
+
const areaThumbProps = mergeProps(() => colorPicker().getAreaThumbProps(area), props);
|
|
11
|
+
return createComponent(ark.div, areaThumbProps);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ColorPickerAreaThumb };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const colorPickerAreaContext = require('./color-picker-area-context.cjs');
|
|
10
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
11
|
+
|
|
12
|
+
const ColorPickerArea = props => {
|
|
13
|
+
const [colorAreaProps, restProps] = createSplitProps.createSplitProps()(props, ['xChannel', 'yChannel']);
|
|
14
|
+
const colorPicker = colorPickerContext.useColorPickerContext();
|
|
15
|
+
const areaProps = solid.mergeProps(() => colorPicker().getAreaProps(colorAreaProps), restProps);
|
|
16
|
+
return web.createComponent(colorPickerAreaContext.ColorPickerAreaProvider, {
|
|
17
|
+
value: colorAreaProps,
|
|
18
|
+
get children() {
|
|
19
|
+
return web.createComponent(factory.ark.div, areaProps);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.ColorPickerArea = ColorPickerArea;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import type { ColorAreaProps } from '@zag-js/color-picker';
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
export type ColorPickerAreaProps = HTMLArkProps<'div'> & ColorAreaProps;
|
|
5
|
+
export declare const ColorPickerArea: (props: ColorPickerAreaProps) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
|
+
import { ark } from '../factory.mjs';
|
|
5
|
+
import { ColorPickerAreaProvider } from './color-picker-area-context.mjs';
|
|
6
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
7
|
+
|
|
8
|
+
const ColorPickerArea = props => {
|
|
9
|
+
const [colorAreaProps, restProps] = createSplitProps()(props, ['xChannel', 'yChannel']);
|
|
10
|
+
const colorPicker = useColorPickerContext();
|
|
11
|
+
const areaProps = mergeProps(() => colorPicker().getAreaProps(colorAreaProps), restProps);
|
|
12
|
+
return createComponent(ColorPickerAreaProvider, {
|
|
13
|
+
value: colorAreaProps,
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(ark.div, areaProps);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { ColorPickerArea };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
10
|
+
|
|
11
|
+
const ColorPickerChannelInput = props => {
|
|
12
|
+
const [channelProps, restProps] = createSplitProps.createSplitProps()(props, ['channel', 'orientation']);
|
|
13
|
+
const colorPicker = colorPickerContext.useColorPickerContext();
|
|
14
|
+
const channelInputProps = solid.mergeProps(() => colorPicker().getChannelInputProps(channelProps), restProps);
|
|
15
|
+
return web.createComponent(factory.ark.input, channelInputProps);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ColorPickerChannelInput = ColorPickerChannelInput;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import type { ColorChannelProps } from '@zag-js/color-picker';
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
import type { Assign } from '../types';
|
|
5
|
+
export type ColorPickerChannelInputProps = Assign<HTMLArkProps<'input'>, ColorChannelProps>;
|
|
6
|
+
export declare const ColorPickerChannelInput: (props: ColorPickerChannelInputProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
|
+
import { ark } from '../factory.mjs';
|
|
5
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
6
|
+
|
|
7
|
+
const ColorPickerChannelInput = props => {
|
|
8
|
+
const [channelProps, restProps] = createSplitProps()(props, ['channel', 'orientation']);
|
|
9
|
+
const colorPicker = useColorPickerContext();
|
|
10
|
+
const channelInputProps = mergeProps(() => colorPicker().getChannelInputProps(channelProps), restProps);
|
|
11
|
+
return createComponent(ark.input, channelInputProps);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ColorPickerChannelInput };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerChannelSliderContext = require('./color-picker-channel-slider-context.cjs');
|
|
9
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
10
|
+
|
|
11
|
+
const ColorPickerChannelSliderBackground = props => {
|
|
12
|
+
const api = colorPickerContext.useColorPickerContext();
|
|
13
|
+
const colorChannelProps = colorPickerChannelSliderContext.useColorPickerChannelSliderContext();
|
|
14
|
+
const mergedProps = solid.mergeProps(api().getChannelSliderBackgroundProps(colorChannelProps), props);
|
|
15
|
+
return web.createComponent(factory.ark.div, mergedProps);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ColorPickerChannelSliderBackground = ColorPickerChannelSliderBackground;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import { type HTMLArkProps } from '../factory';
|
|
3
|
+
export type ColorPickerChannelSliderBackgroundProps = HTMLArkProps<'div'>;
|
|
4
|
+
export declare const ColorPickerChannelSliderBackground: (props: ColorPickerChannelSliderBackgroundProps) => JSX.Element;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerChannelSliderContext } from './color-picker-channel-slider-context.mjs';
|
|
5
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
6
|
+
|
|
7
|
+
const ColorPickerChannelSliderBackground = props => {
|
|
8
|
+
const api = useColorPickerContext();
|
|
9
|
+
const colorChannelProps = useColorPickerChannelSliderContext();
|
|
10
|
+
const mergedProps = mergeProps(api().getChannelSliderBackgroundProps(colorChannelProps), props);
|
|
11
|
+
return createComponent(ark.div, mergedProps);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ColorPickerChannelSliderBackground };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const createContext = require('../create-context.cjs');
|
|
6
|
+
|
|
7
|
+
const [ColorPickerChannelSliderProvider, useColorPickerChannelSliderContext] = createContext.createContext({
|
|
8
|
+
hookName: "useColorPickerChannelSliderContext",
|
|
9
|
+
providerName: "<ColorPickerChannelSliderProvider />"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.ColorPickerChannelSliderProvider = ColorPickerChannelSliderProvider;
|
|
13
|
+
exports.useColorPickerChannelSliderContext = useColorPickerChannelSliderContext;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
2
|
+
import type { ColorChannelProps } from '@zag-js/color-picker';
|
|
3
|
+
export declare const ColorPickerChannelSliderProvider: ContextProviderComponent<ColorChannelProps>, useColorPickerChannelSliderContext: () => ColorChannelProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContext } from '../create-context.mjs';
|
|
2
|
+
|
|
3
|
+
const [ColorPickerChannelSliderProvider, useColorPickerChannelSliderContext] = createContext({
|
|
4
|
+
hookName: "useColorPickerChannelSliderContext",
|
|
5
|
+
providerName: "<ColorPickerChannelSliderProvider />"
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { ColorPickerChannelSliderProvider, useColorPickerChannelSliderContext };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerChannelSliderContext = require('./color-picker-channel-slider-context.cjs');
|
|
9
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
10
|
+
|
|
11
|
+
const ColorPickerChannelSliderThumb = props => {
|
|
12
|
+
const api = colorPickerContext.useColorPickerContext();
|
|
13
|
+
const sliderProps = colorPickerChannelSliderContext.useColorPickerChannelSliderContext();
|
|
14
|
+
const thumbProps = solid.mergeProps(() => api().getChannelSliderThumbProps(sliderProps), props);
|
|
15
|
+
return web.createComponent(factory.ark.div, thumbProps);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ColorPickerChannelSliderThumb = ColorPickerChannelSliderThumb;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerChannelSliderContext } from './color-picker-channel-slider-context.mjs';
|
|
5
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
6
|
+
|
|
7
|
+
const ColorPickerChannelSliderThumb = props => {
|
|
8
|
+
const api = useColorPickerContext();
|
|
9
|
+
const sliderProps = useColorPickerChannelSliderContext();
|
|
10
|
+
const thumbProps = mergeProps(() => api().getChannelSliderThumbProps(sliderProps), props);
|
|
11
|
+
return createComponent(ark.div, thumbProps);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ColorPickerChannelSliderThumb };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const colorPickerChannelSliderContext = require('./color-picker-channel-slider-context.cjs');
|
|
10
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
11
|
+
|
|
12
|
+
const ColorPickerChannelSliderTrack = props => {
|
|
13
|
+
const [colorChannelProps, localProps] = createSplitProps.createSplitProps()(props, ['channel', 'orientation']);
|
|
14
|
+
const api = colorPickerContext.useColorPickerContext();
|
|
15
|
+
const mergedProps = solid.mergeProps(() => api().getChannelSliderTrackProps(colorChannelProps), localProps);
|
|
16
|
+
return web.createComponent(colorPickerChannelSliderContext.ColorPickerChannelSliderProvider, {
|
|
17
|
+
value: colorChannelProps,
|
|
18
|
+
get children() {
|
|
19
|
+
return web.createComponent(factory.ark.div, mergedProps);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
exports.ColorPickerChannelSliderTrack = ColorPickerChannelSliderTrack;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import type { ColorChannelProps } from '@zag-js/color-picker';
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
import type { Assign } from '../types';
|
|
5
|
+
export type ColorPickerChannelSliderTrackProps = Assign<HTMLArkProps<'div'>, ColorChannelProps>;
|
|
6
|
+
export declare const ColorPickerChannelSliderTrack: (props: ColorPickerChannelSliderTrackProps) => JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
|
+
import { ark } from '../factory.mjs';
|
|
5
|
+
import { ColorPickerChannelSliderProvider } from './color-picker-channel-slider-context.mjs';
|
|
6
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
7
|
+
|
|
8
|
+
const ColorPickerChannelSliderTrack = props => {
|
|
9
|
+
const [colorChannelProps, localProps] = createSplitProps()(props, ['channel', 'orientation']);
|
|
10
|
+
const api = useColorPickerContext();
|
|
11
|
+
const mergedProps = mergeProps(() => api().getChannelSliderTrackProps(colorChannelProps), localProps);
|
|
12
|
+
return createComponent(ColorPickerChannelSliderProvider, {
|
|
13
|
+
value: colorChannelProps,
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(ark.div, mergedProps);
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export { ColorPickerChannelSliderTrack };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
9
|
+
|
|
10
|
+
const ColorPickerContent = props => {
|
|
11
|
+
const colorPicker = colorPickerContext.useColorPickerContext();
|
|
12
|
+
const contentProps = solid.mergeProps(() => colorPicker().contentProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.div, contentProps);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.ColorPickerContent = ColorPickerContent;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
5
|
+
|
|
6
|
+
const ColorPickerContent = props => {
|
|
7
|
+
const colorPicker = useColorPickerContext();
|
|
8
|
+
const contentProps = mergeProps(() => colorPicker().contentProps, props);
|
|
9
|
+
return createComponent(ark.div, contentProps);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ColorPickerContent };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const createContext = require('../create-context.cjs');
|
|
6
|
+
|
|
7
|
+
const [ColorPickerProvider, useColorPickerContext] = createContext.createContext({
|
|
8
|
+
hookName: "useColorPickerContext",
|
|
9
|
+
providerName: "<ColorPickerProvider />"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.ColorPickerProvider = ColorPickerProvider;
|
|
13
|
+
exports.useColorPickerContext = useColorPickerContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { PropTypes } from '@zag-js/solid';
|
|
2
|
+
import type { PublicApi } from '@zag-js/color-picker';
|
|
3
|
+
import type { Accessor } from 'solid-js';
|
|
4
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
5
|
+
import { type UseColorPickerReturn } from './use-color-picker';
|
|
6
|
+
export type ColorPickerContext = UseColorPickerReturn;
|
|
7
|
+
export declare const ColorPickerProvider: ContextProviderComponent<Accessor<PublicApi<PropTypes>>>, useColorPickerContext: () => Accessor<PublicApi<PropTypes>>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContext } from '../create-context.mjs';
|
|
2
|
+
|
|
3
|
+
const [ColorPickerProvider, useColorPickerContext] = createContext({
|
|
4
|
+
hookName: "useColorPickerContext",
|
|
5
|
+
providerName: "<ColorPickerProvider />"
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { ColorPickerProvider, useColorPickerContext };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
9
|
+
|
|
10
|
+
const ColorPickerEyeDropperTrigger = props => {
|
|
11
|
+
const colorPicker = colorPickerContext.useColorPickerContext();
|
|
12
|
+
const triggerProps = solid.mergeProps(() => colorPicker().eyeDropperTriggerProps, props);
|
|
13
|
+
return web.createComponent(factory.ark.button, triggerProps);
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
exports.ColorPickerEyeDropperTrigger = ColorPickerEyeDropperTrigger;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
5
|
+
|
|
6
|
+
const ColorPickerEyeDropperTrigger = props => {
|
|
7
|
+
const colorPicker = useColorPickerContext();
|
|
8
|
+
const triggerProps = mergeProps(() => colorPicker().eyeDropperTriggerProps, props);
|
|
9
|
+
return createComponent(ark.button, triggerProps);
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export { ColorPickerEyeDropperTrigger };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
9
|
+
const colorPickerSwatchContext = require('./color-picker-swatch-context.cjs');
|
|
10
|
+
|
|
11
|
+
const ColorPickerSwatchBackground = props => {
|
|
12
|
+
const api = colorPickerContext.useColorPickerContext();
|
|
13
|
+
const colorChannelProps = colorPickerSwatchContext.useColorPickerSwatchContext();
|
|
14
|
+
const mergedProps = solid.mergeProps(api().getSwatchBackgroundProps(colorChannelProps), props);
|
|
15
|
+
return web.createComponent(factory.ark.div, mergedProps);
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.ColorPickerSwatchBackground = ColorPickerSwatchBackground;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
5
|
+
import { useColorPickerSwatchContext } from './color-picker-swatch-context.mjs';
|
|
6
|
+
|
|
7
|
+
const ColorPickerSwatchBackground = props => {
|
|
8
|
+
const api = useColorPickerContext();
|
|
9
|
+
const colorChannelProps = useColorPickerSwatchContext();
|
|
10
|
+
const mergedProps = mergeProps(api().getSwatchBackgroundProps(colorChannelProps), props);
|
|
11
|
+
return createComponent(ark.div, mergedProps);
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
export { ColorPickerSwatchBackground };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const createContext = require('../create-context.cjs');
|
|
6
|
+
|
|
7
|
+
const [ColorPickerSwatchProvider, useColorPickerSwatchContext] = createContext.createContext({
|
|
8
|
+
hookName: "useColorPickerSwatchContext",
|
|
9
|
+
providerName: "<ColorPickerSwatchProvider />"
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
exports.ColorPickerSwatchProvider = ColorPickerSwatchProvider;
|
|
13
|
+
exports.useColorPickerSwatchContext = useColorPickerSwatchContext;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { ContextProviderComponent } from 'solid-js/types/reactive/signal';
|
|
2
|
+
import type { ColorSwatchProps } from '@zag-js/color-picker';
|
|
3
|
+
export declare const ColorPickerSwatchProvider: ContextProviderComponent<ColorSwatchProps>, useColorPickerSwatchContext: () => ColorSwatchProps;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createContext } from '../create-context.mjs';
|
|
2
|
+
|
|
3
|
+
const [ColorPickerSwatchProvider, useColorPickerSwatchContext] = createContext({
|
|
4
|
+
hookName: "useColorPickerSwatchContext",
|
|
5
|
+
providerName: "<ColorPickerSwatchProvider />"
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
export { ColorPickerSwatchProvider, useColorPickerSwatchContext };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const factory = require('../factory.cjs');
|
|
8
|
+
const colorPicker_anatomy = require('./color-picker.anatomy.cjs');
|
|
9
|
+
|
|
10
|
+
const ColorPickerSwatchGroup = props => {
|
|
11
|
+
const groupProps = solid.mergeProps(colorPicker_anatomy.parts.swatchGroup.attrs, props);
|
|
12
|
+
return web.createComponent(factory.ark.div, groupProps);
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
exports.ColorPickerSwatchGroup = ColorPickerSwatchGroup;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createComponent } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { ark } from '../factory.mjs';
|
|
4
|
+
import { parts } from './color-picker.anatomy.mjs';
|
|
5
|
+
|
|
6
|
+
const ColorPickerSwatchGroup = props => {
|
|
7
|
+
const groupProps = mergeProps(parts.swatchGroup.attrs, props);
|
|
8
|
+
return createComponent(ark.div, groupProps);
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export { ColorPickerSwatchGroup };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
4
|
+
|
|
5
|
+
const web = require('solid-js/web');
|
|
6
|
+
const solid = require('@zag-js/solid');
|
|
7
|
+
const createSplitProps = require('../create-split-props.cjs');
|
|
8
|
+
const factory = require('../factory.cjs');
|
|
9
|
+
const colorPickerContext = require('./color-picker-context.cjs');
|
|
10
|
+
const colorPickerSwatchContext = require('./color-picker-swatch-context.cjs');
|
|
11
|
+
|
|
12
|
+
const ColorPickerSwatch = props => {
|
|
13
|
+
const [colorSwatchProps, localProps] = createSplitProps.createSplitProps()(props, ['readOnly', 'value']);
|
|
14
|
+
const api = colorPickerContext.useColorPickerContext();
|
|
15
|
+
const mergedProps = solid.mergeProps(() => api().getSwatchProps(colorSwatchProps), localProps);
|
|
16
|
+
return web.createComponent(colorPickerSwatchContext.ColorPickerSwatchProvider, {
|
|
17
|
+
value: colorSwatchProps,
|
|
18
|
+
get children() {
|
|
19
|
+
return web.createComponent(factory.ark.button, web.mergeProps(mergedProps, {
|
|
20
|
+
get disabled() {
|
|
21
|
+
return colorSwatchProps.readOnly;
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
exports.ColorPickerSwatch = ColorPickerSwatch;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { JSX } from 'solid-js';
|
|
2
|
+
import type { ColorSwatchProps } from '@zag-js/color-picker';
|
|
3
|
+
import { type HTMLArkProps } from '../factory';
|
|
4
|
+
import type { Assign } from '../types';
|
|
5
|
+
export type ColorPickerSwatchProps = Assign<HTMLArkProps<'button'>, ColorSwatchProps>;
|
|
6
|
+
export declare const ColorPickerSwatch: (props: ColorPickerSwatchProps) => JSX.Element;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { createComponent, mergeProps as mergeProps$1 } from 'solid-js/web';
|
|
2
|
+
import { mergeProps } from '@zag-js/solid';
|
|
3
|
+
import { createSplitProps } from '../create-split-props.mjs';
|
|
4
|
+
import { ark } from '../factory.mjs';
|
|
5
|
+
import { useColorPickerContext } from './color-picker-context.mjs';
|
|
6
|
+
import { ColorPickerSwatchProvider } from './color-picker-swatch-context.mjs';
|
|
7
|
+
|
|
8
|
+
const ColorPickerSwatch = props => {
|
|
9
|
+
const [colorSwatchProps, localProps] = createSplitProps()(props, ['readOnly', 'value']);
|
|
10
|
+
const api = useColorPickerContext();
|
|
11
|
+
const mergedProps = mergeProps(() => api().getSwatchProps(colorSwatchProps), localProps);
|
|
12
|
+
return createComponent(ColorPickerSwatchProvider, {
|
|
13
|
+
value: colorSwatchProps,
|
|
14
|
+
get children() {
|
|
15
|
+
return createComponent(ark.button, mergeProps$1(mergedProps, {
|
|
16
|
+
get disabled() {
|
|
17
|
+
return colorSwatchProps.readOnly;
|
|
18
|
+
}
|
|
19
|
+
}));
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
export { ColorPickerSwatch };
|