@close-by/clay 0.2.4 → 0.2.5

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/index.ts +59 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@close-by/clay",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "NiceGUI-like ui.* facade for Clay apps",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -27,10 +27,10 @@
27
27
  "access": "public"
28
28
  },
29
29
  "dependencies": {
30
- "@close-by/clay-compiler": "0.2.4",
31
- "@close-by/clay-core": "0.2.4",
32
- "@close-by/clay-components": "0.2.4",
33
- "@close-by/clay-server": "0.2.4",
30
+ "@close-by/clay-compiler": "0.2.5",
31
+ "@close-by/clay-core": "0.2.5",
32
+ "@close-by/clay-components": "0.2.5",
33
+ "@close-by/clay-server": "0.2.5",
34
34
  "@tailwindcss/cli": "^4.3.3",
35
35
  "tailwindcss": "^4.3.3"
36
36
  }
package/src/index.ts CHANGED
@@ -9,6 +9,9 @@ import {
9
9
  radioGroup as radioGroupFactory,
10
10
  combobox as comboboxFactory,
11
11
  date as dateFactory,
12
+ dateRange as dateRangeFactory,
13
+ timeline as timelineFactory,
14
+ stepper as stepperFactory,
12
15
  tooltip as tooltipFactory,
13
16
  avatar as avatarFactory,
14
17
  skeleton as skeletonFactory,
@@ -34,6 +37,7 @@ import {
34
37
  radialChart as radialChartFactory,
35
38
  scatterChart as scatterChartFactory,
36
39
  composedChart as composedChartFactory,
40
+ sparkline as sparklineFactory,
37
41
  row as rowFactory,
38
42
  column as columnFactory,
39
43
  container as containerFactory,
@@ -101,6 +105,14 @@ import {
101
105
  type RadioGroupProps,
102
106
  type ComboboxProps,
103
107
  type DateProps,
108
+ type DateRangeProps,
109
+ type DateRangePreset,
110
+ type TimelineProps,
111
+ type TimelineItem,
112
+ type TimelineItemStatus,
113
+ type StepperProps,
114
+ type StepperStepOptions,
115
+ type StepperStepStatus,
104
116
  type TooltipProps,
105
117
  type AvatarProps,
106
118
  type SkeletonProps,
@@ -152,6 +164,11 @@ import {
152
164
  type ComposedSeriesType,
153
165
  type CartesianChartProps,
154
166
  type ChartSeries,
167
+ type ChartHeadline,
168
+ type ChartPeriod,
169
+ type ChartReferenceLine,
170
+ type ChartReferenceArea,
171
+ type SparklineProps,
155
172
  type CardProps,
156
173
  type DialogProps,
157
174
  type DialogStackProps,
@@ -318,6 +335,7 @@ import {
318
335
  TableBuilder,
319
336
  DialogElement,
320
337
  DialogStackElement,
338
+ StepperElement,
321
339
  AlertDialogElement,
322
340
  DropdownMenuElement,
323
341
  ContextMenuElement,
@@ -446,6 +464,14 @@ export type {
446
464
  DialogProps,
447
465
  DialogStackProps,
448
466
  DialogStackStepOptions,
467
+ StepperProps,
468
+ StepperStepOptions,
469
+ StepperStepStatus,
470
+ TimelineProps,
471
+ TimelineItem,
472
+ TimelineItemStatus,
473
+ DateRangeProps,
474
+ DateRangePreset,
449
475
  AlertDialogProps,
450
476
  DropdownMenuProps,
451
477
  DropdownItemOptions,
@@ -600,6 +626,7 @@ export {
600
626
  TableBuilder,
601
627
  DialogElement,
602
628
  DialogStackElement,
629
+ StepperElement,
603
630
  AlertDialogElement,
604
631
  DropdownMenuElement,
605
632
  SheetElement,
@@ -680,6 +707,29 @@ export function date(props?: DateProps): Element {
680
707
  return dateFactory(props);
681
708
  }
682
709
 
710
+ /** Date range picker with presets. Prefer `ui.dateRange`. See {@link DateRangeProps}. */
711
+ export function dateRange(props?: DateRangeProps): Element {
712
+ return dateRangeFactory(props);
713
+ }
714
+
715
+ /** Chronological events for feeds and deploy logs. See {@link TimelineProps}. */
716
+ export function timeline(props: TimelineProps): Element {
717
+ return timelineFactory(props);
718
+ }
719
+
720
+ /** Inline multi-step flow with step panels. See {@link StepperProps}. */
721
+ export function stepper(
722
+ fn: (s: StepperElement) => void,
723
+ props?: StepperProps,
724
+ ): StepperElement;
725
+ export function stepper(
726
+ props: StepperProps,
727
+ fn: (s: StepperElement) => void,
728
+ ): StepperElement;
729
+ export function stepper(a: any, b?: any): StepperElement {
730
+ return stepperFactory(a, b);
731
+ }
732
+
683
733
  /** Tooltip around content (`fn` or props-first). Prefer `ui.tooltip`. See {@link TooltipProps}. */
684
734
  export function tooltip(fn: () => void, props: TooltipProps): Element;
685
735
  export function tooltip(props: TooltipProps, fn: () => void): Element;
@@ -970,6 +1020,11 @@ export function composedChart(props: ComposedChartProps): Element {
970
1020
  return composedChartFactory(props);
971
1021
  }
972
1022
 
1023
+ /** KPI card with inline sparkline. Prefer `ui.sparkline`. See {@link SparklineProps}. */
1024
+ export function sparkline(props: SparklineProps): Element {
1025
+ return sparklineFactory(props);
1026
+ }
1027
+
973
1028
  /** Horizontal flex row (`fn` or props-first). Prefer `ui.row`. */
974
1029
  export function row(fn: () => void, props?: Parameters<typeof rowFactory>[1]): Element;
975
1030
  export function row(props: Parameters<typeof rowFactory>[0], fn: () => void): Element;
@@ -1522,6 +1577,9 @@ export const ui = {
1522
1577
  radioGroup,
1523
1578
  combobox,
1524
1579
  date,
1580
+ dateRange,
1581
+ timeline,
1582
+ stepper,
1525
1583
  tooltip,
1526
1584
  avatar,
1527
1585
  skeleton,
@@ -1568,6 +1626,7 @@ export const ui = {
1568
1626
  radialChart,
1569
1627
  scatterChart,
1570
1628
  composedChart,
1629
+ sparkline,
1571
1630
  row,
1572
1631
  column,
1573
1632
  container,