cx 26.0.6 → 26.0.8
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/build/charts/Bar.scss +29 -0
- package/build/charts/BarGraph.scss +29 -0
- package/build/charts/BubbleGraph.scss +32 -0
- package/build/charts/Column.scss +29 -0
- package/build/charts/ColumnGraph.scss +30 -0
- package/build/charts/Gridlines.scss +25 -0
- package/build/charts/Legend.scss +50 -0
- package/build/charts/LegendEntry.scss +29 -0
- package/build/charts/LineGraph.d.ts +11 -0
- package/build/charts/LineGraph.js +1 -0
- package/build/charts/LineGraph.scss +25 -0
- package/build/charts/Marker.scss +44 -0
- package/build/charts/MarkerLine.scss +20 -0
- package/build/charts/PieChart.scss +29 -0
- package/build/charts/Range.scss +20 -0
- package/build/charts/RangeMarker.scss +17 -0
- package/build/charts/ScatterGraph.scss +24 -0
- package/build/charts/Swimlane.scss +16 -0
- package/build/charts/Swimlanes.scss +16 -0
- package/build/charts/axis/Axis.scss +23 -0
- package/build/charts/axis/CategoryAxis.scss +35 -0
- package/build/charts/axis/NumericAxis.scss +35 -0
- package/build/charts/axis/TimeAxis.scss +34 -0
- package/build/charts/axis/index.scss +5 -0
- package/build/charts/axis/variables.scss +3 -0
- package/build/charts/index.scss +22 -0
- package/build/charts/palette.scss +97 -0
- package/build/charts/variables.scss +22 -0
- package/build/global.scss +14 -0
- package/build/index.scss +6 -0
- package/build/jsx-runtime.d.ts +3 -2
- package/build/svg/Svg.scss +28 -0
- package/build/svg/index.scss +9 -0
- package/build/ui/index.scss +2 -0
- package/build/ui/layout/LabelsLeftLayout.scss +47 -0
- package/build/ui/layout/LabelsTopLayout.scss +65 -0
- package/build/ui/layout/index.scss +3 -0
- package/build/ui/layout/variables.scss +2 -0
- package/build/ui/variables.scss +2 -0
- package/build/util/addEventListenerWithOptions.d.ts +2 -2
- package/build/util/call-once.scss +7 -0
- package/build/util/index.scss +11 -0
- package/build/util/scss/add-rules.scss +40 -0
- package/build/util/scss/calc.scss +45 -0
- package/build/util/scss/call-once.scss +13 -0
- package/build/util/scss/clockwise.scss +49 -0
- package/build/util/scss/colors.scss +10 -0
- package/build/util/scss/deep-get.scss +12 -0
- package/build/util/scss/deep-merge.scss +21 -0
- package/build/util/scss/divide.scss +3 -0
- package/build/util/scss/include.scss +48 -0
- package/build/util/scss/index.scss +9 -0
- package/build/variables.scss +217 -0
- package/build/widgets/Button.scss +119 -0
- package/build/widgets/Button.variables.scss +117 -0
- package/build/widgets/CxCredit.scss +39 -0
- package/build/widgets/FlexBox.scss +148 -0
- package/build/widgets/Heading.scss +40 -0
- package/build/widgets/HighlightedSearchText.scss +20 -0
- package/build/widgets/Icon.scss +22 -0
- package/build/widgets/List.scss +93 -0
- package/build/widgets/ProgressBar.scss +51 -0
- package/build/widgets/Resizer.scss +44 -0
- package/build/widgets/Section.scss +56 -0
- package/build/widgets/animations.scss +11 -0
- package/build/widgets/drag-drop/DragClone.scss +36 -0
- package/build/widgets/drag-drop/DragHandle.scss +19 -0
- package/build/widgets/drag-drop/DragSource.scss +27 -0
- package/build/widgets/drag-drop/DropZone.scss +77 -0
- package/build/widgets/drag-drop/index.scss +4 -0
- package/build/widgets/drag-drop/variables.scss +15 -0
- package/build/widgets/form/Calendar.scss +199 -0
- package/build/widgets/form/Calendar.variables.scss +64 -0
- package/build/widgets/form/Checkbox.scss +129 -0
- package/build/widgets/form/Checkbox.variables.scss +40 -0
- package/build/widgets/form/ColorField.scss +98 -0
- package/build/widgets/form/ColorPicker.scss +285 -0
- package/build/widgets/form/ColorPicker.variables.scss +22 -0
- package/build/widgets/form/DateTimeField.scss +92 -0
- package/build/widgets/form/DateTimePicker.scss +47 -0
- package/build/widgets/form/Field.scss +164 -0
- package/build/widgets/form/HelpText.scss +24 -0
- package/build/widgets/form/Label.scss +38 -0
- package/build/widgets/form/LookupField.scss +221 -0
- package/build/widgets/form/MonthField.scss +100 -0
- package/build/widgets/form/MonthPicker.scss +125 -0
- package/build/widgets/form/NumberField.scss +63 -0
- package/build/widgets/form/Radio.scss +123 -0
- package/build/widgets/form/Radio.variables.scss +46 -0
- package/build/widgets/form/Select.scss +101 -0
- package/build/widgets/form/Slider.scss +121 -0
- package/build/widgets/form/Switch.scss +142 -0
- package/build/widgets/form/TextArea.scss +45 -0
- package/build/widgets/form/TextField.scss +57 -0
- package/build/widgets/form/UploadButton.scss +49 -0
- package/build/widgets/form/ValidationError.scss +23 -0
- package/build/widgets/form/Wheel.scss +152 -0
- package/build/widgets/form/index.scss +24 -0
- package/build/widgets/form/variables.scss +355 -0
- package/build/widgets/grid/Grid.scss +640 -0
- package/build/widgets/grid/Pagination.scss +115 -0
- package/build/widgets/grid/TreeNode.scss +90 -0
- package/build/widgets/grid/index.scss +4 -0
- package/build/widgets/grid/variables.scss +137 -0
- package/build/widgets/index.scss +16 -0
- package/build/widgets/nav/Link.scss +20 -0
- package/build/widgets/nav/Menu.scss +76 -0
- package/build/widgets/nav/Menu.variables.scss +25 -0
- package/build/widgets/nav/MenuItem.d.ts +1 -0
- package/build/widgets/nav/MenuItem.scss +130 -0
- package/build/widgets/nav/Scroller.scss +148 -0
- package/build/widgets/nav/Tab.scss +82 -0
- package/build/widgets/nav/Tab.variables.scss +84 -0
- package/build/widgets/nav/cover.scss +22 -0
- package/build/widgets/nav/index.scss +6 -0
- package/build/widgets/nav/variables.scss +27 -0
- package/build/widgets/overlay/Dropdown.scss +186 -0
- package/build/widgets/overlay/Overlay.scss +68 -0
- package/build/widgets/overlay/Toast.scss +164 -0
- package/build/widgets/overlay/Tooltip.scss +177 -0
- package/build/widgets/overlay/Window.scss +129 -0
- package/build/widgets/overlay/Window.variables.scss +62 -0
- package/build/widgets/overlay/captureMouse.scss +13 -0
- package/build/widgets/overlay/index.scss +15 -0
- package/build/widgets/overlay/variables.scss +85 -0
- package/build/widgets/variables.scss +146 -0
- package/build.js +4 -0
- package/dist/charts.js +1 -0
- package/dist/manifest.js +876 -770
- package/package.json +3 -1
- package/src/charts/LineGraph.tsx +14 -0
- package/src/jsx-runtime.ts +8 -5
- package/src/util/addEventListenerWithOptions.ts +41 -41
- package/src/widgets/nav/MenuItem.tsx +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cx",
|
|
3
|
-
"version": "26.0.
|
|
3
|
+
"version": "26.0.8",
|
|
4
4
|
"description": "Advanced JavaScript UI framework for admin and dashboard applications with ready to use grid, form and chart components.",
|
|
5
5
|
"exports": {
|
|
6
6
|
"./data/": "./build/data/",
|
|
@@ -19,6 +19,8 @@
|
|
|
19
19
|
"./charts": "./build/charts/index.js",
|
|
20
20
|
"./jsx-runtime": "./build/jsx-runtime.js",
|
|
21
21
|
"./jsx-runtime.js": "./build/jsx-runtime.js",
|
|
22
|
+
"./jsx-dev-runtime": "./build/jsx-runtime.js",
|
|
23
|
+
"./jsx-dev-runtime.js": "./build/jsx-runtime.js",
|
|
22
24
|
"./src/": "./src/",
|
|
23
25
|
"./sass/": "./src/",
|
|
24
26
|
"./build/": "./build/",
|
package/src/charts/LineGraph.tsx
CHANGED
|
@@ -7,6 +7,7 @@ import { Instance } from "../ui/Instance";
|
|
|
7
7
|
import { RenderingContext } from "../ui/RenderingContext";
|
|
8
8
|
import { NumberProp, BooleanProp, StringProp, RecordsProp, StyleProp } from "../ui/Prop";
|
|
9
9
|
import type { ChartRenderingContext } from "./Chart";
|
|
10
|
+
import { ClassProp } from "../ui/Prop";
|
|
10
11
|
|
|
11
12
|
interface LinePoint {
|
|
12
13
|
x: number;
|
|
@@ -88,6 +89,18 @@ export interface LineGraphConfig extends WidgetConfig {
|
|
|
88
89
|
|
|
89
90
|
/** Shape to use in legend. */
|
|
90
91
|
legendShape?: string;
|
|
92
|
+
|
|
93
|
+
/**
|
|
94
|
+
* Additional CSS classes to be applied to the field.
|
|
95
|
+
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
|
|
96
|
+
*/
|
|
97
|
+
class?: ClassProp;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Additional CSS classes to be applied to the field.
|
|
101
|
+
* If an object is provided, all keys with a "truthy" value will be added to the CSS class list.
|
|
102
|
+
*/
|
|
103
|
+
className?: ClassProp;
|
|
91
104
|
}
|
|
92
105
|
|
|
93
106
|
export interface LineGraphInstance extends Instance {
|
|
@@ -437,5 +450,6 @@ LineGraph.prototype.hiddenBase = false;
|
|
|
437
450
|
|
|
438
451
|
LineGraph.prototype.smooth = false;
|
|
439
452
|
LineGraph.prototype.smoothingRatio = 0.05;
|
|
453
|
+
LineGraph.prototype.styled = true;
|
|
440
454
|
|
|
441
455
|
Widget.alias("line-graph", LineGraph);
|
package/src/jsx-runtime.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { JSX as ReactJSX } from "react";
|
|
2
2
|
import { Instance } from "./ui/Instance";
|
|
3
|
-
import type { Prop } from "./ui/Prop";
|
|
3
|
+
import type { ClassProp, Prop } from "./ui/Prop";
|
|
4
4
|
import { Widget } from "./ui/Widget";
|
|
5
5
|
import { isArray } from "./util/isArray";
|
|
6
6
|
import { isString } from "./util/isString";
|
|
7
7
|
import { HtmlElement, HtmlElementConfig } from "./widgets/HtmlElement";
|
|
8
|
+
import { ChildNode } from "./ui/Container";
|
|
8
9
|
|
|
9
10
|
export function jsx(typeName: any, props: any, key?: string): any {
|
|
10
11
|
if (isArray(typeName)) return typeName;
|
|
@@ -45,10 +46,12 @@ type CxEventHandler<T> = T extends (event: infer E) => any
|
|
|
45
46
|
|
|
46
47
|
type CxIntrinsicElement<T> = {
|
|
47
48
|
[K in keyof T]: K extends "children"
|
|
48
|
-
?
|
|
49
|
-
:
|
|
50
|
-
?
|
|
51
|
-
:
|
|
49
|
+
? ChildNode | ChildNode[]
|
|
50
|
+
: K extends "className" | "class"
|
|
51
|
+
? ClassProp
|
|
52
|
+
: IsEventHandler<K, T[K]> extends true
|
|
53
|
+
? CxEventHandler<T[K]>
|
|
54
|
+
: Prop<T[K]>;
|
|
52
55
|
} & HtmlElementConfig;
|
|
53
56
|
|
|
54
57
|
type CxIntrinsicElements = {
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
import { browserSupportsPassiveEventHandlers } from "./browserSupportsPassiveEventHandlers";
|
|
2
|
-
|
|
3
|
-
interface EventMap {
|
|
4
|
-
wheel: WheelEvent;
|
|
5
|
-
scroll: Event;
|
|
6
|
-
click: MouseEvent;
|
|
7
|
-
mousedown: MouseEvent;
|
|
8
|
-
mouseup: MouseEvent;
|
|
9
|
-
mousemove: MouseEvent;
|
|
10
|
-
touchstart: TouchEvent;
|
|
11
|
-
touchmove: TouchEvent;
|
|
12
|
-
touchend: TouchEvent;
|
|
13
|
-
keydown: KeyboardEvent;
|
|
14
|
-
keyup: KeyboardEvent;
|
|
15
|
-
keypress: KeyboardEvent;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export function addEventListenerWithOptions<K extends keyof EventMap>(
|
|
19
|
-
element: Element,
|
|
20
|
-
event: K,
|
|
21
|
-
callback: (event: EventMap[K]) => void,
|
|
22
|
-
options: AddEventListenerOptions
|
|
23
|
-
): () => void;
|
|
24
|
-
export function addEventListenerWithOptions(
|
|
25
|
-
element: Element,
|
|
26
|
-
event: string,
|
|
27
|
-
callback: (event: Event) => void,
|
|
28
|
-
options: AddEventListenerOptions
|
|
29
|
-
): () => void;
|
|
30
|
-
export function addEventListenerWithOptions(
|
|
31
|
-
element: Element,
|
|
32
|
-
event: string,
|
|
33
|
-
callback: (event: Event) => void,
|
|
34
|
-
options: AddEventListenerOptions
|
|
35
|
-
): () => void {
|
|
36
|
-
let thirdParam = browserSupportsPassiveEventHandlers() ? options : options.capture === true;
|
|
37
|
-
element.addEventListener(event, callback as any, thirdParam);
|
|
38
|
-
return () => {
|
|
39
|
-
element.removeEventListener(event, callback as any, thirdParam);
|
|
40
|
-
};
|
|
41
|
-
}
|
|
1
|
+
import { browserSupportsPassiveEventHandlers } from "./browserSupportsPassiveEventHandlers";
|
|
2
|
+
|
|
3
|
+
interface EventMap {
|
|
4
|
+
wheel: WheelEvent;
|
|
5
|
+
scroll: Event;
|
|
6
|
+
click: MouseEvent;
|
|
7
|
+
mousedown: MouseEvent;
|
|
8
|
+
mouseup: MouseEvent;
|
|
9
|
+
mousemove: MouseEvent;
|
|
10
|
+
touchstart: TouchEvent;
|
|
11
|
+
touchmove: TouchEvent;
|
|
12
|
+
touchend: TouchEvent;
|
|
13
|
+
keydown: KeyboardEvent;
|
|
14
|
+
keyup: KeyboardEvent;
|
|
15
|
+
keypress: KeyboardEvent;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export function addEventListenerWithOptions<K extends keyof EventMap>(
|
|
19
|
+
element: Element | Document,
|
|
20
|
+
event: K,
|
|
21
|
+
callback: (event: EventMap[K]) => void,
|
|
22
|
+
options: AddEventListenerOptions,
|
|
23
|
+
): () => void;
|
|
24
|
+
export function addEventListenerWithOptions(
|
|
25
|
+
element: Element | Document,
|
|
26
|
+
event: string,
|
|
27
|
+
callback: (event: Event) => void,
|
|
28
|
+
options: AddEventListenerOptions,
|
|
29
|
+
): () => void;
|
|
30
|
+
export function addEventListenerWithOptions(
|
|
31
|
+
element: Element | Document,
|
|
32
|
+
event: string,
|
|
33
|
+
callback: (event: Event) => void,
|
|
34
|
+
options: AddEventListenerOptions,
|
|
35
|
+
): () => void {
|
|
36
|
+
let thirdParam = browserSupportsPassiveEventHandlers() ? options : options.capture === true;
|
|
37
|
+
element.addEventListener(event, callback as any, thirdParam);
|
|
38
|
+
return () => {
|
|
39
|
+
element.removeEventListener(event, callback as any, thirdParam);
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -61,6 +61,7 @@ export interface MenuItemConfig extends HtmlElementConfig {
|
|
|
61
61
|
padding?: string;
|
|
62
62
|
hideCursor?: boolean;
|
|
63
63
|
dropdown?: any;
|
|
64
|
+
onClick?: string | ((e: React.MouseEvent | null, instance: HtmlElementInstance<MenuItem>) => void);
|
|
64
65
|
}
|
|
65
66
|
|
|
66
67
|
export class MenuItemInstance extends HtmlElementInstance<MenuItem> {
|