@fragment-build/ui 1.14.2 → 1.16.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/README.md +6 -6
- package/dist/components/base/Accordion.d.ts +2 -2
- package/dist/components/base/Accordion.js +3 -3
- package/dist/components/base/Accordion.js.map +1 -1
- package/dist/components/base/Alert.d.ts +1 -0
- package/dist/components/base/Alert.js +4 -0
- package/dist/components/base/Alert.js.map +1 -0
- package/dist/components/base/Autocomplete.d.ts +3 -3
- package/dist/components/base/Autocomplete.js +4 -4
- package/dist/components/base/Autocomplete.js.map +1 -1
- package/dist/components/base/Avatar.d.ts +2 -2
- package/dist/components/base/Avatar.js +3 -3
- package/dist/components/base/Avatar.js.map +1 -1
- package/dist/components/base/Badge.d.ts +1 -1
- package/dist/components/base/Badge.js +2 -2
- package/dist/components/base/Badge.js.map +1 -1
- package/dist/components/base/Breadcrumbs.d.ts +2 -2
- package/dist/components/base/Breadcrumbs.js +3 -3
- package/dist/components/base/Breadcrumbs.js.map +1 -1
- package/dist/components/base/Button.d.ts +2 -2
- package/dist/components/base/Button.js +3 -3
- package/dist/components/base/Button.js.map +1 -1
- package/dist/components/base/Calendar.d.ts +1 -0
- package/dist/components/base/Calendar.js +4 -0
- package/dist/components/base/Calendar.js.map +1 -0
- package/dist/components/base/Card.d.ts +2 -2
- package/dist/components/base/Card.js +3 -3
- package/dist/components/base/Card.js.map +1 -1
- package/dist/components/base/Checkbox.d.ts +2 -2
- package/dist/components/base/Checkbox.js +3 -3
- package/dist/components/base/Checkbox.js.map +1 -1
- package/dist/components/base/Chip.d.ts +1 -1
- package/dist/components/base/Chip.js +2 -2
- package/dist/components/base/Chip.js.map +1 -1
- package/dist/components/base/CircularProgress.d.ts +1 -1
- package/dist/components/base/CircularProgress.js +2 -2
- package/dist/components/base/CircularProgress.js.map +1 -1
- package/dist/components/base/Code.d.ts +1 -1
- package/dist/components/base/Code.js +2 -2
- package/dist/components/base/Code.js.map +1 -1
- package/dist/components/base/DateInput.d.ts +1 -0
- package/dist/components/base/DateInput.js +4 -0
- package/dist/components/base/DateInput.js.map +1 -0
- package/dist/components/base/DatePicker.d.ts +1 -0
- package/dist/components/base/DatePicker.js +4 -0
- package/dist/components/base/DatePicker.js.map +1 -0
- package/dist/components/base/DateRangePicker.d.ts +1 -0
- package/dist/components/base/DateRangePicker.js +4 -0
- package/dist/components/base/DateRangePicker.js.map +1 -0
- package/dist/components/base/Divider.d.ts +1 -1
- package/dist/components/base/Divider.js +2 -2
- package/dist/components/base/Divider.js.map +1 -1
- package/dist/components/base/Drawer.d.ts +8 -0
- package/dist/components/base/Drawer.js +8 -0
- package/dist/components/base/Drawer.js.map +1 -0
- package/dist/components/base/Dropdown.d.ts +8 -5
- package/dist/components/base/Dropdown.js +6 -6
- package/dist/components/base/Dropdown.js.map +1 -1
- package/dist/components/base/Form.d.ts +0 -0
- package/dist/components/base/Form.js +6 -0
- package/dist/components/base/Form.js.map +1 -0
- package/dist/components/base/Image.d.ts +1 -1
- package/dist/components/base/Image.js +2 -2
- package/dist/components/base/Image.js.map +1 -1
- package/dist/components/base/Input.d.ts +1 -1
- package/dist/components/base/Input.js +2 -2
- package/dist/components/base/Input.js.map +1 -1
- package/dist/components/base/InputOtp.d.ts +1 -0
- package/dist/components/base/InputOtp.js +4 -0
- package/dist/components/base/InputOtp.js.map +1 -0
- package/dist/components/base/Kbd.d.ts +1 -1
- package/dist/components/base/Kbd.js +2 -2
- package/dist/components/base/Kbd.js.map +1 -1
- package/dist/components/base/Link.d.ts +1 -1
- package/dist/components/base/Link.js +2 -2
- package/dist/components/base/Link.js.map +1 -1
- package/dist/components/base/Listbox.d.ts +3 -3
- package/dist/components/base/Listbox.js +4 -4
- package/dist/components/base/Listbox.js.map +1 -1
- package/dist/components/base/Modal.d.ts +8 -5
- package/dist/components/base/Modal.js +6 -6
- package/dist/components/base/Modal.js.map +1 -1
- package/dist/components/base/Navbar.d.ts +7 -7
- package/dist/components/base/Navbar.js +8 -8
- package/dist/components/base/Navbar.js.map +1 -1
- package/dist/components/base/NumberInput.d.ts +1 -0
- package/dist/components/base/NumberInput.js +4 -0
- package/dist/components/base/NumberInput.js.map +1 -0
- package/dist/components/base/Pagination.d.ts +3 -3
- package/dist/components/base/Pagination.js +4 -4
- package/dist/components/base/Pagination.js.map +1 -1
- package/dist/components/base/Popover.d.ts +234 -3
- package/dist/components/base/Popover.js +4 -4
- package/dist/components/base/Popover.js.map +1 -1
- package/dist/components/base/Progress.d.ts +1 -1
- package/dist/components/base/Progress.js +2 -2
- package/dist/components/base/Progress.js.map +1 -1
- package/dist/components/base/Radio.d.ts +2 -2
- package/dist/components/base/Radio.js +3 -3
- package/dist/components/base/Radio.js.map +1 -1
- package/dist/components/base/RangeCalendar.d.ts +1 -0
- package/dist/components/base/RangeCalendar.js +4 -0
- package/dist/components/base/RangeCalendar.js.map +1 -0
- package/dist/components/base/ScrollShadow.d.ts +1 -1
- package/dist/components/base/ScrollShadow.js +2 -2
- package/dist/components/base/ScrollShadow.js.map +1 -1
- package/dist/components/base/Select.d.ts +3 -3
- package/dist/components/base/Select.js +4 -4
- package/dist/components/base/Select.js.map +1 -1
- package/dist/components/base/Skeleton.d.ts +1 -1
- package/dist/components/base/Skeleton.js +2 -2
- package/dist/components/base/Skeleton.js.map +1 -1
- package/dist/components/base/Slider.d.ts +1 -1
- package/dist/components/base/Slider.js +2 -2
- package/dist/components/base/Slider.js.map +1 -1
- package/dist/components/base/Snippet.d.ts +1 -1
- package/dist/components/base/Snippet.js +2 -2
- package/dist/components/base/Snippet.js.map +1 -1
- package/dist/components/base/Spacer.d.ts +1 -1
- package/dist/components/base/Spacer.js +2 -2
- package/dist/components/base/Spacer.js.map +1 -1
- package/dist/components/base/Spinner.d.ts +1 -1
- package/dist/components/base/Spinner.js +2 -2
- package/dist/components/base/Spinner.js.map +1 -1
- package/dist/components/base/Switch.d.ts +1 -1
- package/dist/components/base/Switch.js +2 -2
- package/dist/components/base/Switch.js.map +1 -1
- package/dist/components/base/Table.d.ts +6 -6
- package/dist/components/base/Table.js +7 -7
- package/dist/components/base/Table.js.map +1 -1
- package/dist/components/base/Tabs.d.ts +2 -0
- package/dist/components/base/Tabs.js +5 -0
- package/dist/components/base/Tabs.js.map +1 -0
- package/dist/components/base/Textarea.d.ts +1 -1
- package/dist/components/base/Textarea.js +2 -2
- package/dist/components/base/Textarea.js.map +1 -1
- package/dist/components/base/TimeInput.d.ts +1 -0
- package/dist/components/base/TimeInput.js +4 -0
- package/dist/components/base/TimeInput.js.map +1 -0
- package/dist/components/base/Toast.d.ts +2 -0
- package/dist/components/base/Toast.js +5 -0
- package/dist/components/base/Toast.js.map +1 -0
- package/dist/components/base/Tooltip.d.ts +1 -1
- package/dist/components/base/Tooltip.js +2 -2
- package/dist/components/base/Tooltip.js.map +1 -1
- package/dist/components/base/User.d.ts +1 -1
- package/dist/components/base/User.js +2 -2
- package/dist/components/base/User.js.map +1 -1
- package/dist/components/base/index.d.ts +48 -37
- package/dist/components/base/index.js +48 -37
- package/dist/components/base/index.js.map +1 -1
- package/dist/components/chart/Chart.d.ts +2 -2
- package/dist/components/chart/Chart.js +4 -4
- package/dist/components/chart/Chart.stories.d.ts +2 -2
- package/dist/components/chart/Chart.stories.js +40 -40
- package/dist/components/color-input/ColorInput.d.ts +1 -1
- package/dist/components/color-input/ColorInput.js +1 -1
- package/dist/components/color-input/ColorInput.stories.d.ts +2 -2
- package/dist/components/color-input/ColorInput.stories.js +3 -3
- package/dist/components/color-selector/ColorSelector.d.ts +1 -1
- package/dist/components/color-selector/ColorSelector.js +1 -1
- package/dist/components/color-selector/ColorSelector.stories.d.ts +2 -2
- package/dist/components/color-selector/ColorSelector.stories.js +4 -4
- package/dist/components/grid/Grid.js +1 -1
- package/dist/components/grid/Grid.js.map +1 -1
- package/dist/components/grid/Grid.stories.d.ts +2 -2
- package/dist/components/grid/Grid.stories.js +3 -3
- package/dist/components/multi-switch/MultiSwitch.d.ts +1 -1
- package/dist/components/multi-switch/MultiSwitch.js +2 -2
- package/dist/components/multi-switch/MultiSwitch.js.map +1 -1
- package/dist/components/multi-switch/MultiSwitch.stories.d.ts +2 -2
- package/dist/components/multi-switch/MultiSwitch.stories.js +3 -3
- package/dist/components/theme-switch/ThemeSwitch.d.ts +1 -1
- package/dist/components/theme-switch/ThemeSwitch.js +1 -1
- package/dist/components/theme-switch/ThemeSwitch.stories.d.ts +2 -2
- package/dist/components/theme-switch/ThemeSwitch.stories.js +3 -3
- package/dist/context.d.ts +26 -8
- package/dist/context.js +48 -56
- package/dist/context.js.map +1 -1
- package/dist/fragments/form/Form.d.ts +2 -3
- package/dist/fragments/form/Form.js +7 -6
- package/dist/fragments/form/Form.js.map +1 -1
- package/dist/fragments/form/FormSection.d.ts +1 -1
- package/dist/fragments/form/FormSection.js +4 -3
- package/dist/fragments/form/FormSection.js.map +1 -1
- package/dist/fragments/form/FormSection.stories.d.ts +2 -2
- package/dist/fragments/form/FormSection.stories.js +3 -3
- package/dist/fragments/page/PageHeader.d.ts +1 -1
- package/dist/fragments/page/PageHeader.js +1 -1
- package/dist/fragments/page/PageHeader.js.map +1 -1
- package/dist/fragments/page/PageHeader.stories.d.ts +2 -2
- package/dist/fragments/page/PageHeader.stories.js +4 -4
- package/dist/fragments/shell/Shell.stories.d.ts +2 -2
- package/dist/fragments/shell/Shell.stories.js +90 -86
- package/dist/fragments/shell/Shell.stories.js.map +1 -1
- package/dist/fragments/sidebar/Sidebar.d.ts +1 -1
- package/dist/fragments/sidebar/Sidebar.js +7 -6
- package/dist/fragments/sidebar/Sidebar.js.map +1 -1
- package/dist/fragments/sidebar/Sidebar.stories.d.ts +2 -2
- package/dist/fragments/sidebar/Sidebar.stories.js +57 -53
- package/dist/fragments/sidebar/Sidebar.stories.js.map +1 -1
- package/dist/fragments/sidebar/Sidebar.styles.js +1 -4
- package/dist/fragments/sidebar/Sidebar.styles.js.map +1 -1
- package/dist/fragments/widget/Widget.js +121 -121
- package/dist/fragments/widget/Widget.js.map +1 -1
- package/dist/fragments/widget/Widget.stories.d.ts +2 -2
- package/dist/fragments/widget/Widget.stories.js +8 -8
- package/dist/fragments/widget/Widget.stories.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -2
- package/dist/index.js.map +1 -1
- package/dist/provider.d.ts +3 -3
- package/dist/provider.js +6 -6
- package/dist/provider.js.map +1 -1
- package/dist/tailwind.plugin.d.ts +3 -3
- package/dist/tailwind.plugin.js +4 -4
- package/dist/tailwind.plugin.js.map +1 -1
- package/dist/withFragment.d.ts +1 -1
- package/dist/withFragment.js +4 -4
- package/package.json +23 -29
- package/dist/components/base/Tab.d.ts +0 -2
- package/dist/components/base/Tab.js +0 -5
- package/dist/components/base/Tab.js.map +0 -1
|
@@ -3,7 +3,7 @@ import { useEffect, useMemo, useState } from 'react';
|
|
|
3
3
|
import { Avatar, Input } from '../base';
|
|
4
4
|
import { withFragment } from '../../withFragment';
|
|
5
5
|
;
|
|
6
|
-
export const ColorInput = withFragment(({ defaultValue, placeholderValue, label = 'Color', errorMessage =
|
|
6
|
+
export const ColorInput = withFragment(({ defaultValue, placeholderValue, label = 'Color', errorMessage = 'Please enter a valid color in hex format e.g. #f3f or #ff33ff', onValueChange, isInvalid, value: controlledValue, placeholder, ...rest }) => {
|
|
7
7
|
const [value, setValue] = useState(controlledValue || defaultValue);
|
|
8
8
|
useEffect(() => onValueChange && onValueChange(value || ''), [value, onValueChange]);
|
|
9
9
|
useEffect(() => setValue(controlledValue), [controlledValue]);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { ColorInput } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ColorInput } from './ColorInput';
|
|
3
3
|
declare const meta: Meta<typeof ColorInput>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ColorInput } from
|
|
1
|
+
import { ColorInput } from './ColorInput';
|
|
2
2
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
3
3
|
const meta = {
|
|
4
|
-
title:
|
|
4
|
+
title: 'components/ColorInput',
|
|
5
5
|
component: ColorInput,
|
|
6
|
-
tags: [
|
|
6
|
+
tags: ['autodocs'],
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
9
9
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
@@ -10,6 +10,6 @@ export const ColorSelector = withFragment(({ values, value: controlledValue, def
|
|
|
10
10
|
return;
|
|
11
11
|
setValue(controlledValue);
|
|
12
12
|
}, [controlledValue]);
|
|
13
|
-
return (_jsx("div", { className:
|
|
13
|
+
return (_jsx("div", { className: "flex gap-3", children: values.map((color) => (_jsx(Button, { radius: "full", size: rest.size, isIconOnly: true, disableRipple: true, className: "overflow-visible", children: _jsx(Avatar, { showFallback: true, fallback: value === color && icon ? icon : _jsx(_Fragment, {}), style: { backgroundColor: color }, classNames: { base: 'shrink-0' }, isBordered: value === color, onClick: () => setValue(color), ...rest }) }))) }));
|
|
14
14
|
}, 'colorSelector');
|
|
15
15
|
//# sourceMappingURL=ColorSelector.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { ColorSelector } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ColorSelector } from './ColorSelector';
|
|
3
3
|
declare const meta: Meta<typeof ColorSelector>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ColorSelector } from
|
|
3
|
-
import { IconCheck } from
|
|
2
|
+
import { ColorSelector } from './ColorSelector';
|
|
3
|
+
import { IconCheck } from '@tabler/icons-react';
|
|
4
4
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
5
5
|
const meta = {
|
|
6
|
-
title:
|
|
6
|
+
title: 'components/ColorSelector',
|
|
7
7
|
component: ColorSelector,
|
|
8
|
-
tags: [
|
|
8
|
+
tags: ['autodocs'],
|
|
9
9
|
};
|
|
10
10
|
export default meta;
|
|
11
11
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../src/components/grid/Grid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"Grid.js","sourceRoot":"","sources":["../../../src/components/grid/Grid.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,eAAe,CAAC;AAWnC,MAAM,IAAI,GAAG,EAAE,CAAC;IACd,KAAK,EAAE;QACL,IAAI,EAAE,gCAAgC;KACvC;IACD,QAAQ,EAAE;QACR,IAAI,EAAE;YACJ,EAAE,EAAE;gBACF,IAAI,EAAE,aAAa;aACpB;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,4BAA4B;aACnC;YACD,EAAE,EAAE;gBACF,IAAI,EAAE,4CAA4C;aACnD;SACF;KACF;IACD,eAAe,EAAE;QACf,IAAI,EAAE,IAAI;KACX;CACF,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,IAAI,GAAwB,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,EAAE;IAClE,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC;IAE7B,OAAO,cAAK,SAAS,EAAE,IAAI,EAAE,YAAG,QAAQ,GAAO,CAAC;AAClD,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { Grid } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Grid } from './Grid';
|
|
3
3
|
declare const meta: Meta<typeof Grid>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Grid } from
|
|
2
|
+
import { Grid } from './Grid';
|
|
3
3
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
4
4
|
const meta = {
|
|
5
|
-
title:
|
|
5
|
+
title: 'components/Grid',
|
|
6
6
|
component: Grid,
|
|
7
|
-
tags: [
|
|
7
|
+
tags: ['autodocs'],
|
|
8
8
|
};
|
|
9
9
|
export default meta;
|
|
10
10
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
@@ -3,7 +3,7 @@ import { forwardRef, useEffect, useState } from 'react';
|
|
|
3
3
|
import { Button, ButtonGroup } from '../base';
|
|
4
4
|
import { withFragment } from '../../withFragment';
|
|
5
5
|
import { IconCheck, IconSlash, IconX } from '@tabler/icons-react';
|
|
6
|
-
import { tv } from '@
|
|
6
|
+
import { tv } from '@heroui/react';
|
|
7
7
|
const multiSwitch = tv({
|
|
8
8
|
slots: {
|
|
9
9
|
button: 'min-w-0',
|
|
@@ -26,6 +26,6 @@ export const MultiSwitch = withFragment(forwardRef(({ defaultValue, onValueChang
|
|
|
26
26
|
const [value, setValue] = useState(defaultValue ?? 0);
|
|
27
27
|
const { button } = multiSwitch({ size });
|
|
28
28
|
useEffect(() => onValueChange && onValueChange(value), [value, onValueChange]);
|
|
29
|
-
return (_jsxs(_Fragment, { children: [_jsx("input", { ref: ref, value: value, type: "number", className: "hidden", min: 0, max: 2, required: true }), _jsxs(ButtonGroup, { size: size, ...props, children: [_jsx(Button, { className: button(),
|
|
29
|
+
return (_jsxs(_Fragment, { children: [_jsx("input", { ref: ref, value: value, type: "number", className: "hidden", min: 0, max: 2, required: true }), _jsxs(ButtonGroup, { size: size, ...props, children: [_jsx(Button, { className: button(), onPress: () => setValue(0), ...value === 0 ? { color: 'danger' } : {}, children: _jsx(IconX, { size: 20 }) }), _jsx(Button, { className: button(), onPress: () => setValue(1), ...value === 1 ? { color: 'default', variant: 'solid' } : {}, children: _jsx(IconSlash, { size: 20 }) }), _jsx(Button, { className: button(), onPress: () => setValue(2), ...value === 2 ? { color: 'success' } : {}, children: _jsx(IconCheck, { size: 20 }) })] })] }));
|
|
30
30
|
}), 'multiSwitch');
|
|
31
31
|
//# sourceMappingURL=MultiSwitch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MultiSwitch.js","sourceRoot":"","sources":["../../../src/components/multi-switch/MultiSwitch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAoB,EAAE,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"MultiSwitch.js","sourceRoot":"","sources":["../../../src/components/multi-switch/MultiSwitch.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAClE,OAAO,EAAoB,EAAE,EAAE,MAAM,eAAe,CAAC;AAWrD,MAAM,WAAW,GAAG,EAAE,CAAC;IACrB,KAAK,EAA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EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAM,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,YAAE,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,GAAS,EACxJ,KAAC,MAAM,IAAC,SAAS,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAM,KAAK,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,YAAE,KAAC,SAAS,IAAC,IAAI,EAAE,EAAE,GAAI,GAAS,IAC1H,IACb,CACJ,CAAC;AACJ,CAAC,CAAC,EAAE,aAAa,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { MultiSwitch } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { MultiSwitch } from './MultiSwitch';
|
|
3
3
|
declare const meta: Meta<typeof MultiSwitch>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { MultiSwitch } from
|
|
1
|
+
import { MultiSwitch } from './MultiSwitch';
|
|
2
2
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
3
3
|
const meta = {
|
|
4
|
-
title:
|
|
4
|
+
title: 'components/MultiSwitch',
|
|
5
5
|
component: MultiSwitch,
|
|
6
|
-
tags: [
|
|
6
|
+
tags: ['autodocs'],
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
9
9
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
|
@@ -11,6 +11,6 @@ export const ThemeSwitch = (props) => {
|
|
|
11
11
|
}, []);
|
|
12
12
|
if (!mounted)
|
|
13
13
|
return null;
|
|
14
|
-
return (_jsx(Button, { isIconOnly: true, size: "sm",
|
|
14
|
+
return (_jsx(Button, { isIconOnly: true, size: "sm", onPress: () => setTheme(theme === 'light' ? 'dark' : 'light'), ...props, children: theme === 'light' ? _jsx(IconSun, { size: 18 }) : _jsx(IconMoon, { size: 18 }) }));
|
|
15
15
|
};
|
|
16
16
|
//# sourceMappingURL=ThemeSwitch.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Meta, StoryObj } from
|
|
2
|
-
import { ThemeSwitch } from
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ThemeSwitch } from './ThemeSwitch';
|
|
3
3
|
declare const meta: Meta<typeof ThemeSwitch>;
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ThemeSwitch } from
|
|
1
|
+
import { ThemeSwitch } from './ThemeSwitch';
|
|
2
2
|
// More on how to set up stories at: https://storybook.js.org/docs/react/writing-stories/introduction
|
|
3
3
|
const meta = {
|
|
4
|
-
title:
|
|
4
|
+
title: 'components/ThemeSwitch',
|
|
5
5
|
component: ThemeSwitch,
|
|
6
|
-
tags: [
|
|
6
|
+
tags: ['autodocs'],
|
|
7
7
|
};
|
|
8
8
|
export default meta;
|
|
9
9
|
// More on writing stories with args: https://storybook.js.org/docs/react/writing-stories/args
|
package/dist/context.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
|
-
import { AccordionItemProps, AccordionProps, AutocompleteItemProps, AutocompleteProps, AutocompleteSectionProps, AvatarGroupProps, AvatarProps, BadgeProps, BreadcrumbsProps, ButtonGroupProps, ButtonProps, CardProps, CheckboxGroupProps, CheckboxProps, ChipProps, CircularProgressProps, CodeProps, DividerProps, DropdownItemProps, DropdownMenuProps, DropdownProps, DropdownSectionProps, DropdownTriggerProps, ImageProps, InputProps, KbdProps, LinkProps, ListboxItemProps, ListboxProps, ListboxSectionProps, ModalBodyProps, ModalContentProps, ModalFooterProps, ModalHeaderProps, ModalProps, NavbarBrandProps, NavbarContentProps, NavbarItemProps, NavbarMenuItemProps, NavbarMenuToggleProps, NavbarProps, PaginationCursorProps, PaginationItemProps, PaginationProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, ProgressProps, RadioGroupProps, RadioProps, ScrollShadowProps, SelectItemProps, SelectProps, SelectSectionProps, SkeletonProps, SliderProps, SnippetProps, SpacerProps, SpinnerProps, SwitchProps, TabItemProps, TableBodyProps, TableCellProps, TableColumnProps, TableHeaderProps, TableProps, TableRowProps, TabsProps, TextAreaProps, TooltipProps, UserProps } from
|
|
2
|
-
import type { Props as ApexChartProps } from
|
|
3
|
-
import { ChartProps, ColorInputProps, ColorSelectorProps, MultiSwitchProps } from
|
|
1
|
+
import { AccordionItemProps, AccordionProps, AlertProps, AutocompleteItemProps, AutocompleteProps, AutocompleteSectionProps, AvatarGroupProps, AvatarProps, BadgeProps, BreadcrumbsProps, ButtonGroupProps, ButtonProps, CalendarProps, CardProps, CheckboxGroupProps, CheckboxProps, ChipProps, CircularProgressProps, CodeProps, DateInputProps, DatePickerProps, DateRangePickerProps, DividerProps, DrawerBodyProps, DrawerContentProps, DrawerFooterProps, DrawerHeaderProps, DrawerProps, DropdownItemProps, DropdownMenuProps, DropdownProps, DropdownSectionProps, DropdownTriggerProps, ImageProps, InputOtpProps, InputProps, KbdProps, LinkProps, ListboxItemProps, ListboxProps, ListboxSectionProps, ModalBodyProps, ModalContentProps, ModalFooterProps, ModalHeaderProps, ModalProps, NavbarBrandProps, NavbarContentProps, NavbarItemProps, NavbarMenuItemProps, NavbarMenuToggleProps, NavbarProps, NumberInputProps, PaginationCursorProps, PaginationItemProps, PaginationProps, PopoverContentProps, PopoverProps, PopoverTriggerProps, ProgressProps, RadioGroupProps, RadioProps, RangeCalendarProps, ScrollShadowProps, SelectItemProps, SelectProps, SelectSectionProps, SkeletonProps, SliderProps, SnippetProps, SpacerProps, SpinnerProps, SwitchProps, TabItemProps, TableBodyProps, TableCellProps, TableColumnProps, TableHeaderProps, TableProps, TableRowProps, TabsProps, TextAreaProps, TimeInputProps, ToastProps, TooltipProps, UserProps } from '@heroui/react';
|
|
2
|
+
import type { Props as ApexChartProps } from 'react-apexcharts';
|
|
3
|
+
import { ChartProps, ColorInputProps, ColorSelectorProps, MultiSwitchProps } from './components';
|
|
4
|
+
import { FormProps, FormSectionProps } from './fragments';
|
|
4
5
|
export interface FragmentUIContext {
|
|
5
6
|
defaults: {
|
|
6
|
-
avatar?: Partial<AvatarProps>;
|
|
7
|
-
avatarGroup?: Partial<AvatarGroupProps>;
|
|
8
7
|
accordion?: Partial<AccordionProps>;
|
|
9
8
|
accordionItem?: Partial<AccordionItemProps>;
|
|
9
|
+
alert?: Partial<AlertProps>;
|
|
10
10
|
autocomplete?: Partial<AutocompleteProps>;
|
|
11
11
|
autocompleteItem?: Partial<AutocompleteItemProps>;
|
|
12
12
|
autocompleteSection?: Partial<AutocompleteSectionProps>;
|
|
13
|
+
avatar?: Partial<AvatarProps>;
|
|
14
|
+
avatarGroup?: Partial<AvatarGroupProps>;
|
|
13
15
|
badge?: Partial<BadgeProps>;
|
|
16
|
+
breadcrumbs?: Partial<BreadcrumbsProps>;
|
|
14
17
|
button?: Partial<ButtonProps>;
|
|
15
18
|
buttonGroup?: Partial<ButtonGroupProps>;
|
|
16
|
-
|
|
19
|
+
calendar?: Partial<CalendarProps>;
|
|
17
20
|
card?: Partial<CardProps>;
|
|
18
21
|
chart?: Partial<Record<ChartProps['type'], Partial<Pick<ApexChartProps, 'options' | 'series'>>>>;
|
|
19
22
|
checkbox?: Partial<CheckboxProps>;
|
|
@@ -23,14 +26,25 @@ export interface FragmentUIContext {
|
|
|
23
26
|
code?: Partial<CodeProps>;
|
|
24
27
|
colorInput?: Partial<ColorInputProps>;
|
|
25
28
|
colorSelector?: Partial<ColorSelectorProps>;
|
|
29
|
+
dateInput?: Partial<DateInputProps>;
|
|
30
|
+
datePicker?: Partial<DatePickerProps>;
|
|
31
|
+
dateRangePicker?: Partial<DateRangePickerProps>;
|
|
26
32
|
divider?: Partial<DividerProps>;
|
|
33
|
+
drawer?: Partial<DrawerProps>;
|
|
34
|
+
drawerBody?: Partial<DrawerBodyProps>;
|
|
35
|
+
drawerContent?: Partial<DrawerContentProps>;
|
|
36
|
+
drawerFooter?: Partial<DrawerFooterProps>;
|
|
37
|
+
drawerHeader?: Partial<DrawerHeaderProps>;
|
|
27
38
|
dropdown?: Partial<DropdownProps>;
|
|
28
39
|
dropdownItem?: Partial<DropdownItemProps>;
|
|
29
40
|
dropdownMenu?: Partial<DropdownMenuProps>;
|
|
30
41
|
dropdownSection?: Partial<DropdownSectionProps>;
|
|
31
42
|
dropdownTrigger?: Partial<DropdownTriggerProps>;
|
|
43
|
+
form?: Partial<FormProps>;
|
|
44
|
+
formSection?: Partial<FormSectionProps>;
|
|
32
45
|
image?: Partial<ImageProps>;
|
|
33
46
|
input?: Partial<InputProps>;
|
|
47
|
+
inputOtp?: Partial<InputOtpProps>;
|
|
34
48
|
kbd?: Partial<KbdProps>;
|
|
35
49
|
link?: Partial<LinkProps>;
|
|
36
50
|
listbox?: Partial<ListboxProps>;
|
|
@@ -48,6 +62,7 @@ export interface FragmentUIContext {
|
|
|
48
62
|
navbarItem?: Partial<NavbarItemProps>;
|
|
49
63
|
navbarMenuItem?: Partial<NavbarMenuItemProps>;
|
|
50
64
|
navbarMenuToggle?: Partial<NavbarMenuToggleProps>;
|
|
65
|
+
numberInput?: Partial<NumberInputProps>;
|
|
51
66
|
pagination?: Partial<PaginationProps>;
|
|
52
67
|
paginationItem?: Partial<PaginationItemProps>;
|
|
53
68
|
paginationCursor?: Partial<PaginationCursorProps>;
|
|
@@ -57,16 +72,17 @@ export interface FragmentUIContext {
|
|
|
57
72
|
progress?: Partial<ProgressProps>;
|
|
58
73
|
radio?: Partial<RadioProps>;
|
|
59
74
|
radioGroup?: Partial<RadioGroupProps>;
|
|
75
|
+
rangeCalendar?: Partial<RangeCalendarProps>;
|
|
76
|
+
scrollShadow?: Partial<ScrollShadowProps>;
|
|
60
77
|
select?: Partial<SelectProps>;
|
|
61
78
|
selectItem?: Partial<SelectItemProps>;
|
|
62
79
|
selectSection?: Partial<SelectSectionProps>;
|
|
63
80
|
skeleton?: Partial<SkeletonProps>;
|
|
81
|
+
slider?: Partial<SliderProps>;
|
|
64
82
|
snippet?: Partial<SnippetProps>;
|
|
65
|
-
scrollShadow?: Partial<ScrollShadowProps>;
|
|
66
83
|
spacer?: Partial<SpacerProps>;
|
|
67
84
|
spinner?: Partial<SpinnerProps>;
|
|
68
85
|
switch?: Partial<SwitchProps>;
|
|
69
|
-
slider?: Partial<SliderProps>;
|
|
70
86
|
table?: Partial<TableProps>;
|
|
71
87
|
tableBody?: Partial<TableBodyProps<unknown>>;
|
|
72
88
|
tableCell?: Partial<TableCellProps>;
|
|
@@ -76,6 +92,8 @@ export interface FragmentUIContext {
|
|
|
76
92
|
tab?: Partial<TabItemProps>;
|
|
77
93
|
tabs?: Partial<TabsProps>;
|
|
78
94
|
textArea?: Partial<TextAreaProps>;
|
|
95
|
+
timeInput?: Partial<TimeInputProps>;
|
|
96
|
+
toast?: Partial<ToastProps>;
|
|
79
97
|
tooltip?: Partial<TooltipProps>;
|
|
80
98
|
user?: Partial<UserProps>;
|
|
81
99
|
};
|
package/dist/context.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { createContext } from
|
|
1
|
+
import { createContext } from 'react';
|
|
2
2
|
export const defaultContext = {
|
|
3
3
|
defaults: {
|
|
4
4
|
avatar: {
|
|
@@ -12,7 +12,7 @@ export const defaultContext = {
|
|
|
12
12
|
tabList: 'p-0',
|
|
13
13
|
panel: 'border-t-[1px] border-default-200 pt-6',
|
|
14
14
|
},
|
|
15
|
-
variant:
|
|
15
|
+
variant: 'underlined',
|
|
16
16
|
},
|
|
17
17
|
user: {
|
|
18
18
|
avatarProps: {
|
|
@@ -30,10 +30,10 @@ export const defaultContext = {
|
|
|
30
30
|
area: {
|
|
31
31
|
options: {
|
|
32
32
|
chart: {
|
|
33
|
-
height:
|
|
34
|
-
width:
|
|
35
|
-
type:
|
|
36
|
-
fontFamily:
|
|
33
|
+
height: '100%',
|
|
34
|
+
width: '100%',
|
|
35
|
+
type: 'area',
|
|
36
|
+
fontFamily: 'Inter, sans-serif',
|
|
37
37
|
dropShadow: {
|
|
38
38
|
enabled: false,
|
|
39
39
|
},
|
|
@@ -52,12 +52,12 @@ export const defaultContext = {
|
|
|
52
52
|
},
|
|
53
53
|
},
|
|
54
54
|
fill: {
|
|
55
|
-
type:
|
|
55
|
+
type: 'gradient',
|
|
56
56
|
gradient: {
|
|
57
57
|
opacityFrom: 0.55,
|
|
58
58
|
opacityTo: 0,
|
|
59
|
-
shade:
|
|
60
|
-
gradientToColors: [
|
|
59
|
+
shade: '#1C64F2',
|
|
60
|
+
gradientToColors: ['#1C64F2'],
|
|
61
61
|
},
|
|
62
62
|
},
|
|
63
63
|
dataLabels: {
|
|
@@ -97,7 +97,7 @@ export const defaultContext = {
|
|
|
97
97
|
type: 'line',
|
|
98
98
|
width: '100%',
|
|
99
99
|
height: '100%',
|
|
100
|
-
fontFamily:
|
|
100
|
+
fontFamily: 'Inter, sans-serif',
|
|
101
101
|
dropShadow: {
|
|
102
102
|
enabled: false,
|
|
103
103
|
},
|
|
@@ -143,7 +143,7 @@ export const defaultContext = {
|
|
|
143
143
|
labels: {
|
|
144
144
|
show: true,
|
|
145
145
|
style: {
|
|
146
|
-
fontFamily:
|
|
146
|
+
fontFamily: 'Inter, sans-serif',
|
|
147
147
|
cssClass: 'text-xs font-normal fill-gray-500 dark:fill-gray-400'
|
|
148
148
|
}
|
|
149
149
|
},
|
|
@@ -162,8 +162,8 @@ export const defaultContext = {
|
|
|
162
162
|
column: {
|
|
163
163
|
options: {
|
|
164
164
|
chart: {
|
|
165
|
-
type:
|
|
166
|
-
fontFamily:
|
|
165
|
+
type: 'bar',
|
|
166
|
+
fontFamily: 'Inter, sans-serif',
|
|
167
167
|
toolbar: {
|
|
168
168
|
show: false,
|
|
169
169
|
},
|
|
@@ -171,8 +171,8 @@ export const defaultContext = {
|
|
|
171
171
|
plotOptions: {
|
|
172
172
|
bar: {
|
|
173
173
|
horizontal: false,
|
|
174
|
-
columnWidth:
|
|
175
|
-
borderRadiusApplication:
|
|
174
|
+
columnWidth: '70%',
|
|
175
|
+
borderRadiusApplication: 'end',
|
|
176
176
|
borderRadius: 8,
|
|
177
177
|
},
|
|
178
178
|
},
|
|
@@ -181,15 +181,7 @@ export const defaultContext = {
|
|
|
181
181
|
shared: true,
|
|
182
182
|
intersect: false,
|
|
183
183
|
style: {
|
|
184
|
-
fontFamily:
|
|
185
|
-
},
|
|
186
|
-
},
|
|
187
|
-
states: {
|
|
188
|
-
hover: {
|
|
189
|
-
filter: {
|
|
190
|
-
type: "darken",
|
|
191
|
-
value: 1,
|
|
192
|
-
},
|
|
184
|
+
fontFamily: 'Inter, sans-serif',
|
|
193
185
|
},
|
|
194
186
|
},
|
|
195
187
|
grid: {
|
|
@@ -212,7 +204,7 @@ export const defaultContext = {
|
|
|
212
204
|
labels: {
|
|
213
205
|
show: true,
|
|
214
206
|
style: {
|
|
215
|
-
fontFamily:
|
|
207
|
+
fontFamily: 'Inter, sans-serif',
|
|
216
208
|
cssClass: 'text-xs font-normal fill-gray-500 dark:fill-gray-400'
|
|
217
209
|
}
|
|
218
210
|
},
|
|
@@ -237,8 +229,8 @@ export const defaultContext = {
|
|
|
237
229
|
sparkline: {
|
|
238
230
|
enabled: false,
|
|
239
231
|
},
|
|
240
|
-
type:
|
|
241
|
-
width:
|
|
232
|
+
type: 'bar',
|
|
233
|
+
width: '100%',
|
|
242
234
|
height: 400,
|
|
243
235
|
toolbar: {
|
|
244
236
|
show: false,
|
|
@@ -250,17 +242,17 @@ export const defaultContext = {
|
|
|
250
242
|
plotOptions: {
|
|
251
243
|
bar: {
|
|
252
244
|
horizontal: true,
|
|
253
|
-
columnWidth:
|
|
254
|
-
borderRadiusApplication:
|
|
245
|
+
columnWidth: '100%',
|
|
246
|
+
borderRadiusApplication: 'end',
|
|
255
247
|
borderRadius: 6,
|
|
256
248
|
dataLabels: {
|
|
257
|
-
position:
|
|
249
|
+
position: 'top',
|
|
258
250
|
},
|
|
259
251
|
},
|
|
260
252
|
},
|
|
261
253
|
legend: {
|
|
262
254
|
show: true,
|
|
263
|
-
position:
|
|
255
|
+
position: 'bottom',
|
|
264
256
|
},
|
|
265
257
|
dataLabels: {
|
|
266
258
|
enabled: false,
|
|
@@ -274,13 +266,13 @@ export const defaultContext = {
|
|
|
274
266
|
labels: {
|
|
275
267
|
show: true,
|
|
276
268
|
style: {
|
|
277
|
-
fontFamily:
|
|
269
|
+
fontFamily: 'Inter, sans-serif',
|
|
278
270
|
},
|
|
279
271
|
formatter: function (value) {
|
|
280
|
-
return
|
|
272
|
+
return '$' + value;
|
|
281
273
|
}
|
|
282
274
|
},
|
|
283
|
-
categories: [
|
|
275
|
+
categories: ['Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
|
284
276
|
axisTicks: {
|
|
285
277
|
show: false,
|
|
286
278
|
},
|
|
@@ -292,7 +284,7 @@ export const defaultContext = {
|
|
|
292
284
|
labels: {
|
|
293
285
|
show: true,
|
|
294
286
|
style: {
|
|
295
|
-
fontFamily:
|
|
287
|
+
fontFamily: 'Inter, sans-serif',
|
|
296
288
|
}
|
|
297
289
|
}
|
|
298
290
|
},
|
|
@@ -310,9 +302,9 @@ export const defaultContext = {
|
|
|
310
302
|
pie: {
|
|
311
303
|
options: {
|
|
312
304
|
chart: {
|
|
313
|
-
height:
|
|
314
|
-
width:
|
|
315
|
-
type:
|
|
305
|
+
height: '100%',
|
|
306
|
+
width: '100%',
|
|
307
|
+
type: 'pie',
|
|
316
308
|
},
|
|
317
309
|
stroke: {
|
|
318
310
|
width: 5,
|
|
@@ -328,7 +320,7 @@ export const defaultContext = {
|
|
|
328
320
|
dataLabels: {
|
|
329
321
|
enabled: true,
|
|
330
322
|
style: {
|
|
331
|
-
fontFamily:
|
|
323
|
+
fontFamily: 'Inter, sans-serif',
|
|
332
324
|
},
|
|
333
325
|
background: {
|
|
334
326
|
enabled: true,
|
|
@@ -344,8 +336,8 @@ export const defaultContext = {
|
|
|
344
336
|
}
|
|
345
337
|
},
|
|
346
338
|
legend: {
|
|
347
|
-
position:
|
|
348
|
-
fontFamily:
|
|
339
|
+
position: 'bottom',
|
|
340
|
+
fontFamily: 'Inter, sans-serif',
|
|
349
341
|
},
|
|
350
342
|
xaxis: {
|
|
351
343
|
axisTicks: {
|
|
@@ -360,9 +352,9 @@ export const defaultContext = {
|
|
|
360
352
|
donut: {
|
|
361
353
|
options: {
|
|
362
354
|
chart: {
|
|
363
|
-
height:
|
|
364
|
-
width:
|
|
365
|
-
type:
|
|
355
|
+
height: '100%',
|
|
356
|
+
width: '100%',
|
|
357
|
+
type: 'donut',
|
|
366
358
|
},
|
|
367
359
|
stroke: {
|
|
368
360
|
width: 5,
|
|
@@ -374,21 +366,21 @@ export const defaultContext = {
|
|
|
374
366
|
show: true,
|
|
375
367
|
name: {
|
|
376
368
|
show: true,
|
|
377
|
-
fontFamily:
|
|
369
|
+
fontFamily: 'Inter, sans-serif',
|
|
378
370
|
offsetY: 20,
|
|
379
371
|
},
|
|
380
372
|
total: {
|
|
381
373
|
showAlways: true,
|
|
382
374
|
show: true,
|
|
383
|
-
fontFamily:
|
|
375
|
+
fontFamily: 'Inter, sans-serif',
|
|
384
376
|
},
|
|
385
377
|
value: {
|
|
386
378
|
show: true,
|
|
387
|
-
fontFamily:
|
|
379
|
+
fontFamily: 'Inter, sans-serif',
|
|
388
380
|
offsetY: -20,
|
|
389
381
|
},
|
|
390
382
|
},
|
|
391
|
-
size:
|
|
383
|
+
size: '80%',
|
|
392
384
|
},
|
|
393
385
|
},
|
|
394
386
|
},
|
|
@@ -401,8 +393,8 @@ export const defaultContext = {
|
|
|
401
393
|
enabled: false,
|
|
402
394
|
},
|
|
403
395
|
legend: {
|
|
404
|
-
position:
|
|
405
|
-
fontFamily:
|
|
396
|
+
position: 'bottom',
|
|
397
|
+
fontFamily: 'Inter, sans-serif',
|
|
406
398
|
},
|
|
407
399
|
xaxis: {
|
|
408
400
|
axisTicks: {
|
|
@@ -417,9 +409,9 @@ export const defaultContext = {
|
|
|
417
409
|
radial: {
|
|
418
410
|
options: {
|
|
419
411
|
chart: {
|
|
420
|
-
height:
|
|
421
|
-
width:
|
|
422
|
-
type:
|
|
412
|
+
height: '100%',
|
|
413
|
+
width: '100%',
|
|
414
|
+
type: 'radialBar',
|
|
423
415
|
sparkline: {
|
|
424
416
|
enabled: true,
|
|
425
417
|
},
|
|
@@ -434,7 +426,7 @@ export const defaultContext = {
|
|
|
434
426
|
},
|
|
435
427
|
hollow: {
|
|
436
428
|
margin: 0,
|
|
437
|
-
size:
|
|
429
|
+
size: '32%',
|
|
438
430
|
}
|
|
439
431
|
},
|
|
440
432
|
},
|
|
@@ -450,8 +442,8 @@ export const defaultContext = {
|
|
|
450
442
|
},
|
|
451
443
|
legend: {
|
|
452
444
|
show: true,
|
|
453
|
-
position:
|
|
454
|
-
fontFamily:
|
|
445
|
+
position: 'bottom',
|
|
446
|
+
fontFamily: 'Inter, sans-serif',
|
|
455
447
|
},
|
|
456
448
|
tooltip: {
|
|
457
449
|
theme: 'dark',
|
package/dist/context.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAsGtC,MAAM,CAAC,MAAM,cAAc,GAAsB;IAC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