iryx-ui 0.9.0 → 0.10.2
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 +178 -3
- package/dist/component-names.d.ts +1 -1
- package/dist/component-names.js +4 -0
- package/dist/{packages/iryx-ui/src/components → components}/Alert.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Banner.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/BarChart.vue.d.ts +61 -2
- package/dist/components/BarChart.vue_vue_type_script_setup_true_lang.js +258 -0
- package/dist/{packages/iryx-ui/src/components → components}/Breadcrumb.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Button.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/ChartLegend.js +5 -0
- package/dist/components/ChartLegend.vue.d.ts +12 -0
- package/dist/components/ChartLegend.vue_vue_type_script_setup_true_lang.js +31 -0
- package/dist/{packages/iryx-ui/src/components → components}/Checkbox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Combobox.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/DatePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/DateRangePicker.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/Dialog.vue_vue_type_script_setup_true_lang.js +99 -0
- package/dist/{packages/iryx-ui/src/components → components}/DropdownMenuItems.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/FileUpload.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Icon.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Input.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/LineChart.js +5 -0
- package/dist/components/LineChart.vue.d.ts +100 -0
- package/dist/components/LineChart.vue_vue_type_script_setup_true_lang.js +265 -0
- package/dist/{packages/iryx-ui/src/components → components}/NumberInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Pagination.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/PasswordInput.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Select.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Stat.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Stepper.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Table.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/{packages/iryx-ui/src/components → components}/Toaster.vue_vue_type_script_setup_true_lang.js +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +88 -0
- package/dist/composables/cartesian.d.ts +105 -0
- package/dist/composables/cartesian.js +43 -0
- package/dist/{packages/iryx-ui/src/composables → composables}/date.js +4 -4
- package/dist/index.d.ts +3 -0
- package/dist/index.js +94 -89
- package/dist/nuxt.js +1 -1
- package/dist/theme/bar-chart.d.ts +21 -0
- package/dist/{packages/iryx-ui/src/theme → theme}/bar-chart.js +2 -1
- package/dist/theme/breadcrumb.d.ts +3 -3
- package/dist/theme/chart-legend.d.ts +55 -0
- package/dist/theme/chart-legend.js +10 -0
- package/dist/theme/index.d.ts +2 -0
- package/dist/theme/line-chart.d.ts +143 -0
- package/dist/theme/line-chart.js +22 -0
- package/package.json +8 -8
- package/theme.css +42 -0
- package/dist/packages/iryx-ui/src/component-names.js +0 -4
- package/dist/packages/iryx-ui/src/components/BarChart.vue_vue_type_script_setup_true_lang.js +0 -178
- package/dist/packages/iryx-ui/src/components/Dialog.vue_vue_type_script_setup_true_lang.js +0 -99
- package/dist/packages/iryx-ui/src/components/index.js +0 -84
- /package/dist/{packages/iryx-ui/src/components → components}/Alert.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/App.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/App.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Badge.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Badge.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Banner.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/BarChart.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Breadcrumb.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Button.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/ButtonGroup.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/ButtonGroup.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Card.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Card.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Checkbox.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Combobox.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/ConfirmDialog.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/ConfirmDialog.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/DatePicker.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/DateRangePicker.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Dialog.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/DropdownMenu.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/DropdownMenu.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/DropdownMenuItems.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/EmptyState.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/EmptyState.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/FileUpload.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Form.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Form.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/FormField.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/FormField.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Icon.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Input.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Label.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Label.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/NumberInput.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Pagination.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/PasswordInput.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Progress.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Progress.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/RadioGroup.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/RadioGroup.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Select.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Separator.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Separator.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Skeleton.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Skeleton.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Sparkline.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Sparkline.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Stat.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Stepper.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Switch.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Switch.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Table.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Tabs.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Tabs.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Textarea.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Textarea.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Toaster.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Tooltip.js +0 -0
- /package/dist/{packages/iryx-ui/src/components → components}/Tooltip.vue_vue_type_script_setup_true_lang.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/appearance.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/button-group.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/confirm.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/data-table.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/decimal.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/dropdown-menu.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/element-size.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/form.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/icon.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/scale.js +0 -0
- /package/dist/{packages/iryx-ui/src/composables → composables}/toast.js +0 -0
- /package/dist/{packages/iryx-ui/src/config.js → config.js} +0 -0
- /package/dist/{packages/iryx-ui/src/plugin.js → plugin.js} +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/alert.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/badge.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/banner.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/breadcrumb.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/button-group.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/button.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/card.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/checkbox.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/combobox.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/date-picker.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/dialog.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/dropdown-menu.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/empty-state.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/file-upload.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/form.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/input.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/label.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/number-input.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/pagination.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/password-input.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/presets.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/progress.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/radio-group.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/select.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/separator.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/skeleton.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/sparkline.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/stat.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/stepper.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/switch.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/table.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/tabs.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/toast.js +0 -0
- /package/dist/{packages/iryx-ui/src/theme → theme}/tooltip.js +0 -0
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared by every multi-series chart. A legend is mandatory from two series
|
|
3
|
+
* up: colour alone is not a dependable identity channel, and the swatch beside
|
|
4
|
+
* the name is what makes it one.
|
|
5
|
+
*/
|
|
6
|
+
export declare const chartLegendTheme: import("tailwind-variants").TVReturnType<{
|
|
7
|
+
[key: string]: {
|
|
8
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
9
|
+
root?: import("tailwind-variants").ClassValue;
|
|
10
|
+
item?: import("tailwind-variants").ClassValue;
|
|
11
|
+
swatch?: import("tailwind-variants").ClassValue;
|
|
12
|
+
name?: import("tailwind-variants").ClassValue;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
} | {
|
|
16
|
+
[x: string]: {
|
|
17
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
18
|
+
root?: import("tailwind-variants").ClassValue;
|
|
19
|
+
item?: import("tailwind-variants").ClassValue;
|
|
20
|
+
swatch?: import("tailwind-variants").ClassValue;
|
|
21
|
+
name?: import("tailwind-variants").ClassValue;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
} | {}, {
|
|
25
|
+
root: string;
|
|
26
|
+
item: string;
|
|
27
|
+
/** The mark carries the series colour. */
|
|
28
|
+
swatch: string;
|
|
29
|
+
/** The text never does — a light hue is illegible as type on the surface. */
|
|
30
|
+
name: string;
|
|
31
|
+
}, undefined, {
|
|
32
|
+
[key: string]: {
|
|
33
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
34
|
+
root?: import("tailwind-variants").ClassValue;
|
|
35
|
+
item?: import("tailwind-variants").ClassValue;
|
|
36
|
+
swatch?: import("tailwind-variants").ClassValue;
|
|
37
|
+
name?: import("tailwind-variants").ClassValue;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
} | {}, {
|
|
41
|
+
root: string;
|
|
42
|
+
item: string;
|
|
43
|
+
/** The mark carries the series colour. */
|
|
44
|
+
swatch: string;
|
|
45
|
+
/** The text never does — a light hue is illegible as type on the surface. */
|
|
46
|
+
name: string;
|
|
47
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
48
|
+
root: string;
|
|
49
|
+
item: string;
|
|
50
|
+
/** The mark carries the series colour. */
|
|
51
|
+
swatch: string;
|
|
52
|
+
/** The text never does — a light hue is illegible as type on the surface. */
|
|
53
|
+
name: string;
|
|
54
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
55
|
+
export type ChartLegendSlots = keyof ReturnType<typeof chartLegendTheme>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/chart-legend.ts
|
|
3
|
+
var t = e({ slots: {
|
|
4
|
+
root: "flex flex-wrap items-center gap-x-4 gap-y-1.5 pb-4",
|
|
5
|
+
item: "flex items-center gap-1.5 text-xs",
|
|
6
|
+
swatch: "size-2.5 shrink-0 rounded-full",
|
|
7
|
+
name: "text-muted-foreground"
|
|
8
|
+
} });
|
|
9
|
+
//#endregion
|
|
10
|
+
export { t as chartLegendTheme };
|
package/dist/theme/index.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ export * from './breadcrumb';
|
|
|
6
6
|
export * from './button';
|
|
7
7
|
export * from './button-group';
|
|
8
8
|
export * from './card';
|
|
9
|
+
export * from './chart-legend';
|
|
9
10
|
export * from './checkbox';
|
|
10
11
|
export * from './combobox';
|
|
11
12
|
export * from './date-picker';
|
|
@@ -15,6 +16,7 @@ export * from './empty-state';
|
|
|
15
16
|
export * from './file-upload';
|
|
16
17
|
export * from './input';
|
|
17
18
|
export * from './label';
|
|
19
|
+
export * from './line-chart';
|
|
18
20
|
export * from './number-input';
|
|
19
21
|
export * from './pagination';
|
|
20
22
|
export * from './password-input';
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
export declare const lineChartTheme: import("tailwind-variants").TVReturnType<{
|
|
2
|
+
[key: string]: {
|
|
3
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
4
|
+
root?: import("tailwind-variants").ClassValue;
|
|
5
|
+
svg?: import("tailwind-variants").ClassValue;
|
|
6
|
+
area?: import("tailwind-variants").ClassValue;
|
|
7
|
+
table?: import("tailwind-variants").ClassValue;
|
|
8
|
+
line?: import("tailwind-variants").ClassValue;
|
|
9
|
+
marker?: import("tailwind-variants").ClassValue;
|
|
10
|
+
plot?: import("tailwind-variants").ClassValue;
|
|
11
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
12
|
+
tick?: import("tailwind-variants").ClassValue;
|
|
13
|
+
category?: import("tailwind-variants").ClassValue;
|
|
14
|
+
hit?: import("tailwind-variants").ClassValue;
|
|
15
|
+
tooltip?: import("tailwind-variants").ClassValue;
|
|
16
|
+
tooltipLabel?: import("tailwind-variants").ClassValue;
|
|
17
|
+
tooltipValue?: import("tailwind-variants").ClassValue;
|
|
18
|
+
crosshair?: import("tailwind-variants").ClassValue;
|
|
19
|
+
markerRing?: import("tailwind-variants").ClassValue;
|
|
20
|
+
};
|
|
21
|
+
};
|
|
22
|
+
} | {
|
|
23
|
+
[x: string]: {
|
|
24
|
+
[x: string]: import("tailwind-variants").ClassValue | {
|
|
25
|
+
root?: import("tailwind-variants").ClassValue;
|
|
26
|
+
svg?: import("tailwind-variants").ClassValue;
|
|
27
|
+
area?: import("tailwind-variants").ClassValue;
|
|
28
|
+
table?: import("tailwind-variants").ClassValue;
|
|
29
|
+
line?: import("tailwind-variants").ClassValue;
|
|
30
|
+
marker?: import("tailwind-variants").ClassValue;
|
|
31
|
+
plot?: import("tailwind-variants").ClassValue;
|
|
32
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
33
|
+
tick?: import("tailwind-variants").ClassValue;
|
|
34
|
+
category?: import("tailwind-variants").ClassValue;
|
|
35
|
+
hit?: import("tailwind-variants").ClassValue;
|
|
36
|
+
tooltip?: import("tailwind-variants").ClassValue;
|
|
37
|
+
tooltipLabel?: import("tailwind-variants").ClassValue;
|
|
38
|
+
tooltipValue?: import("tailwind-variants").ClassValue;
|
|
39
|
+
crosshair?: import("tailwind-variants").ClassValue;
|
|
40
|
+
markerRing?: import("tailwind-variants").ClassValue;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
} | {}, {
|
|
44
|
+
root: string;
|
|
45
|
+
/**
|
|
46
|
+
* The tooltip's coordinates come from the SVG, so the SVG has to be its
|
|
47
|
+
* positioning context. Anchoring to the root instead shifts it up by the
|
|
48
|
+
* height of anything above the plot — the legend, most obviously.
|
|
49
|
+
*/
|
|
50
|
+
plot: string;
|
|
51
|
+
svg: string;
|
|
52
|
+
grid: string;
|
|
53
|
+
tick: string;
|
|
54
|
+
category: string;
|
|
55
|
+
/** 2px, round join and cap, per the shared line-mark spec. */
|
|
56
|
+
line: string;
|
|
57
|
+
/** A wash at ~10%, never a saturated block competing with the line. */
|
|
58
|
+
area: string;
|
|
59
|
+
/** Recessive: it locates the reading, it is not a reading itself. */
|
|
60
|
+
crosshair: string;
|
|
61
|
+
marker: string;
|
|
62
|
+
/** Keeps the marker legible where it sits on top of the line. */
|
|
63
|
+
markerRing: string;
|
|
64
|
+
hit: string;
|
|
65
|
+
tooltip: string;
|
|
66
|
+
tooltipLabel: string;
|
|
67
|
+
tooltipValue: string;
|
|
68
|
+
table: string;
|
|
69
|
+
}, undefined, {
|
|
70
|
+
[key: string]: {
|
|
71
|
+
[key: string]: import("tailwind-variants").ClassValue | {
|
|
72
|
+
root?: import("tailwind-variants").ClassValue;
|
|
73
|
+
svg?: import("tailwind-variants").ClassValue;
|
|
74
|
+
area?: import("tailwind-variants").ClassValue;
|
|
75
|
+
table?: import("tailwind-variants").ClassValue;
|
|
76
|
+
line?: import("tailwind-variants").ClassValue;
|
|
77
|
+
marker?: import("tailwind-variants").ClassValue;
|
|
78
|
+
plot?: import("tailwind-variants").ClassValue;
|
|
79
|
+
grid?: import("tailwind-variants").ClassValue;
|
|
80
|
+
tick?: import("tailwind-variants").ClassValue;
|
|
81
|
+
category?: import("tailwind-variants").ClassValue;
|
|
82
|
+
hit?: import("tailwind-variants").ClassValue;
|
|
83
|
+
tooltip?: import("tailwind-variants").ClassValue;
|
|
84
|
+
tooltipLabel?: import("tailwind-variants").ClassValue;
|
|
85
|
+
tooltipValue?: import("tailwind-variants").ClassValue;
|
|
86
|
+
crosshair?: import("tailwind-variants").ClassValue;
|
|
87
|
+
markerRing?: import("tailwind-variants").ClassValue;
|
|
88
|
+
};
|
|
89
|
+
};
|
|
90
|
+
} | {}, {
|
|
91
|
+
root: string;
|
|
92
|
+
/**
|
|
93
|
+
* The tooltip's coordinates come from the SVG, so the SVG has to be its
|
|
94
|
+
* positioning context. Anchoring to the root instead shifts it up by the
|
|
95
|
+
* height of anything above the plot — the legend, most obviously.
|
|
96
|
+
*/
|
|
97
|
+
plot: string;
|
|
98
|
+
svg: string;
|
|
99
|
+
grid: string;
|
|
100
|
+
tick: string;
|
|
101
|
+
category: string;
|
|
102
|
+
/** 2px, round join and cap, per the shared line-mark spec. */
|
|
103
|
+
line: string;
|
|
104
|
+
/** A wash at ~10%, never a saturated block competing with the line. */
|
|
105
|
+
area: string;
|
|
106
|
+
/** Recessive: it locates the reading, it is not a reading itself. */
|
|
107
|
+
crosshair: string;
|
|
108
|
+
marker: string;
|
|
109
|
+
/** Keeps the marker legible where it sits on top of the line. */
|
|
110
|
+
markerRing: string;
|
|
111
|
+
hit: string;
|
|
112
|
+
tooltip: string;
|
|
113
|
+
tooltipLabel: string;
|
|
114
|
+
tooltipValue: string;
|
|
115
|
+
table: string;
|
|
116
|
+
}, import("tailwind-variants").TVReturnType<unknown, {
|
|
117
|
+
root: string;
|
|
118
|
+
/**
|
|
119
|
+
* The tooltip's coordinates come from the SVG, so the SVG has to be its
|
|
120
|
+
* positioning context. Anchoring to the root instead shifts it up by the
|
|
121
|
+
* height of anything above the plot — the legend, most obviously.
|
|
122
|
+
*/
|
|
123
|
+
plot: string;
|
|
124
|
+
svg: string;
|
|
125
|
+
grid: string;
|
|
126
|
+
tick: string;
|
|
127
|
+
category: string;
|
|
128
|
+
/** 2px, round join and cap, per the shared line-mark spec. */
|
|
129
|
+
line: string;
|
|
130
|
+
/** A wash at ~10%, never a saturated block competing with the line. */
|
|
131
|
+
area: string;
|
|
132
|
+
/** Recessive: it locates the reading, it is not a reading itself. */
|
|
133
|
+
crosshair: string;
|
|
134
|
+
marker: string;
|
|
135
|
+
/** Keeps the marker legible where it sits on top of the line. */
|
|
136
|
+
markerRing: string;
|
|
137
|
+
hit: string;
|
|
138
|
+
tooltip: string;
|
|
139
|
+
tooltipLabel: string;
|
|
140
|
+
tooltipValue: string;
|
|
141
|
+
table: string;
|
|
142
|
+
}, undefined, unknown, unknown, undefined>>;
|
|
143
|
+
export type LineChartSlots = keyof ReturnType<typeof lineChartTheme>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { tv as e } from "tailwind-variants";
|
|
2
|
+
//#region src/theme/line-chart.ts
|
|
3
|
+
var t = e({ slots: {
|
|
4
|
+
root: "w-full text-primary",
|
|
5
|
+
plot: "relative",
|
|
6
|
+
svg: "block w-full overflow-visible",
|
|
7
|
+
grid: "stroke-border",
|
|
8
|
+
tick: "fill-muted-foreground text-xs [font-variant-numeric:tabular-nums]",
|
|
9
|
+
category: "fill-muted-foreground text-xs",
|
|
10
|
+
line: "fill-none stroke-current stroke-2 [stroke-linecap:round] [stroke-linejoin:round]",
|
|
11
|
+
area: "fill-current stroke-none opacity-10",
|
|
12
|
+
crosshair: "stroke-border",
|
|
13
|
+
marker: "fill-current",
|
|
14
|
+
markerRing: "fill-background",
|
|
15
|
+
hit: "fill-transparent",
|
|
16
|
+
tooltip: "pointer-events-none absolute z-10 flex items-baseline gap-1.5 rounded-lg border border-border bg-background px-2 py-1 text-xs whitespace-nowrap text-foreground shadow-md",
|
|
17
|
+
tooltipLabel: "text-muted-foreground",
|
|
18
|
+
tooltipValue: "font-medium [font-variant-numeric:tabular-nums]",
|
|
19
|
+
table: "sr-only"
|
|
20
|
+
} });
|
|
21
|
+
//#endregion
|
|
22
|
+
export { t as lineChartTheme };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "iryx-ui",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.10.2",
|
|
5
5
|
"description": "A Vue 3 component library built on Reka UI and Tailwind CSS v4.",
|
|
6
6
|
"author": "therok1",
|
|
7
7
|
"license": "MIT",
|
|
@@ -41,6 +41,12 @@
|
|
|
41
41
|
"engines": {
|
|
42
42
|
"node": ">=20"
|
|
43
43
|
},
|
|
44
|
+
"scripts": {
|
|
45
|
+
"build": "vite build && vue-tsc -p tsconfig.build.json",
|
|
46
|
+
"test": "vitest run",
|
|
47
|
+
"test:watch": "vitest",
|
|
48
|
+
"typecheck": "vue-tsc --noEmit"
|
|
49
|
+
},
|
|
44
50
|
"peerDependencies": {
|
|
45
51
|
"vue": "^3.5.0"
|
|
46
52
|
},
|
|
@@ -62,11 +68,5 @@
|
|
|
62
68
|
"vitest": "^4.1.8",
|
|
63
69
|
"vue": "^3.5.35",
|
|
64
70
|
"vue-tsc": "^3.3.4"
|
|
65
|
-
},
|
|
66
|
-
"scripts": {
|
|
67
|
-
"build": "vite build && vue-tsc -p tsconfig.build.json",
|
|
68
|
-
"test": "vitest run",
|
|
69
|
-
"test:watch": "vitest",
|
|
70
|
-
"typecheck": "vue-tsc --noEmit"
|
|
71
71
|
}
|
|
72
|
-
}
|
|
72
|
+
}
|
package/theme.css
CHANGED
|
@@ -77,6 +77,30 @@
|
|
|
77
77
|
--iryx-info-muted: oklch(0.97 0.014 254.604);
|
|
78
78
|
--iryx-info-muted-foreground: oklch(0.488 0.243 264.376);
|
|
79
79
|
--iryx-info-border: oklch(0.882 0.059 254.128);
|
|
80
|
+
|
|
81
|
+
/*
|
|
82
|
+
* Categorical chart series. Identity only — which series a mark belongs to,
|
|
83
|
+
* never how large it is. Assign in order and never cycle: a ninth series
|
|
84
|
+
* folds into "Other" or becomes small multiples, because a generated ninth
|
|
85
|
+
* hue cannot be checked for the separation the first eight were chosen for.
|
|
86
|
+
*
|
|
87
|
+
* Status colours are deliberately NOT reused here. A series that happens to
|
|
88
|
+
* be slot 4 must never be mistaken for a warning.
|
|
89
|
+
*
|
|
90
|
+
* These steps are not eyeballed. They clear the lightness band, a chroma
|
|
91
|
+
* floor of 0.10, protanopia/deuteranopia separation and contrast against the
|
|
92
|
+
* surface, verified with the dataviz validator. Dark has its own steps,
|
|
93
|
+
* validated against the dark surface — not an automatic flip. Re-run the
|
|
94
|
+
* validator before changing any of them.
|
|
95
|
+
*/
|
|
96
|
+
--iryx-chart-1: oklch(0.59 0.2 277);
|
|
97
|
+
--iryx-chart-2: oklch(0.68 0.17 50);
|
|
98
|
+
--iryx-chart-3: oklch(0.62 0.13 175);
|
|
99
|
+
--iryx-chart-4: oklch(0.75 0.16 90);
|
|
100
|
+
--iryx-chart-5: oklch(0.68 0.15 350);
|
|
101
|
+
--iryx-chart-6: oklch(0.52 0.14 145);
|
|
102
|
+
--iryx-chart-7: oklch(0.55 0.17 240);
|
|
103
|
+
--iryx-chart-8: oklch(0.58 0.21 25);
|
|
80
104
|
}
|
|
81
105
|
|
|
82
106
|
.dark {
|
|
@@ -116,6 +140,16 @@
|
|
|
116
140
|
--iryx-info-muted: oklch(0.282 0.091 267.935);
|
|
117
141
|
--iryx-info-muted-foreground: oklch(0.809 0.105 251.813);
|
|
118
142
|
--iryx-info-border: oklch(0.379 0.146 265.522);
|
|
143
|
+
|
|
144
|
+
/* Chart series — their own steps, validated against the dark surface. */
|
|
145
|
+
--iryx-chart-1: oklch(0.62 0.19 277);
|
|
146
|
+
--iryx-chart-2: oklch(0.66 0.16 50);
|
|
147
|
+
--iryx-chart-3: oklch(0.62 0.13 175);
|
|
148
|
+
--iryx-chart-4: oklch(0.65 0.15 90);
|
|
149
|
+
--iryx-chart-5: oklch(0.65 0.15 350);
|
|
150
|
+
--iryx-chart-6: oklch(0.58 0.14 145);
|
|
151
|
+
--iryx-chart-7: oklch(0.6 0.16 240);
|
|
152
|
+
--iryx-chart-8: oklch(0.6 0.19 25);
|
|
119
153
|
}
|
|
120
154
|
|
|
121
155
|
@theme inline {
|
|
@@ -152,6 +186,14 @@
|
|
|
152
186
|
--color-info-muted: var(--iryx-info-muted);
|
|
153
187
|
--color-info-muted-foreground: var(--iryx-info-muted-foreground);
|
|
154
188
|
--color-info-border: var(--iryx-info-border);
|
|
189
|
+
--color-chart-1: var(--iryx-chart-1);
|
|
190
|
+
--color-chart-2: var(--iryx-chart-2);
|
|
191
|
+
--color-chart-3: var(--iryx-chart-3);
|
|
192
|
+
--color-chart-4: var(--iryx-chart-4);
|
|
193
|
+
--color-chart-5: var(--iryx-chart-5);
|
|
194
|
+
--color-chart-6: var(--iryx-chart-6);
|
|
195
|
+
--color-chart-7: var(--iryx-chart-7);
|
|
196
|
+
--color-chart-8: var(--iryx-chart-8);
|
|
155
197
|
--animate-progress-indeterminate: progress-indeterminate 1.5s ease-in-out infinite;
|
|
156
198
|
--animate-fade-in: fade-in 150ms ease-out;
|
|
157
199
|
--animate-fade-out: fade-out 150ms ease-in;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
//#region src/component-names.ts
|
|
2
|
-
var e = /* @__PURE__ */ "Alert.App.Badge.BarChart.Banner.Breadcrumb.Button.ButtonGroup.Card.Checkbox.Combobox.ConfirmDialog.DatePicker.DateRangePicker.Dialog.DropdownMenu.EmptyState.FileUpload.Form.FormField.Input.Label.NumberInput.Pagination.PasswordInput.Progress.RadioGroup.Select.Separator.Skeleton.Sparkline.Stat.Stepper.Switch.Table.Tabs.Textarea.Toaster.Tooltip".split(".");
|
|
3
|
-
//#endregion
|
|
4
|
-
export { e as componentNames };
|
package/dist/packages/iryx-ui/src/components/BarChart.vue_vue_type_script_setup_true_lang.js
DELETED
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
import { useIryxUiConfig as e } from "../config.js";
|
|
2
|
-
import { useElementSize as t } from "../composables/element-size.js";
|
|
3
|
-
import { extent as n, linearScale as r, niceTicks as i } from "../composables/scale.js";
|
|
4
|
-
import { barChartTheme as a } from "../theme/bar-chart.js";
|
|
5
|
-
import { Fragment as o, computed as s, createCommentVNode as c, createElementBlock as l, createElementVNode as u, defineComponent as d, normalizeClass as f, normalizeStyle as p, openBlock as m, ref as h, renderList as g, toDisplayString as _, unref as v } from "vue";
|
|
6
|
-
//#region src/components/BarChart.vue?vue&type=script&setup=true&lang.ts
|
|
7
|
-
var y = ["role", "aria-label"], b = [
|
|
8
|
-
"width",
|
|
9
|
-
"height",
|
|
10
|
-
"viewBox"
|
|
11
|
-
], x = [
|
|
12
|
-
"x1",
|
|
13
|
-
"y1",
|
|
14
|
-
"x2",
|
|
15
|
-
"y2"
|
|
16
|
-
], S = ["x", "y"], C = ["d"], w = ["x", "y"], T = [
|
|
17
|
-
"x",
|
|
18
|
-
"y",
|
|
19
|
-
"width",
|
|
20
|
-
"height",
|
|
21
|
-
"onPointerenter"
|
|
22
|
-
], E = { scope: "row" }, D = 6.5, O = 8, k = 20, A = 8, j = .7, M = /*@__PURE__*/ d({
|
|
23
|
-
__name: "BarChart",
|
|
24
|
-
props: {
|
|
25
|
-
data: { default: () => [] },
|
|
26
|
-
height: { default: 240 },
|
|
27
|
-
ticks: { default: 5 },
|
|
28
|
-
axis: {
|
|
29
|
-
type: Boolean,
|
|
30
|
-
default: !0
|
|
31
|
-
},
|
|
32
|
-
locale: {},
|
|
33
|
-
format: {},
|
|
34
|
-
label: {},
|
|
35
|
-
unstyled: {
|
|
36
|
-
type: Boolean,
|
|
37
|
-
default: void 0
|
|
38
|
-
},
|
|
39
|
-
class: {},
|
|
40
|
-
ui: {}
|
|
41
|
-
},
|
|
42
|
-
setup(d) {
|
|
43
|
-
let M = d, N = e(), P = s(() => M.unstyled ?? N.unstyled), F = h(), { width: I } = t(F), L = s(() => new Intl.NumberFormat(M.locale, M.format));
|
|
44
|
-
function R(e) {
|
|
45
|
-
return L.value.format(e);
|
|
46
|
-
}
|
|
47
|
-
let z = s(() => {
|
|
48
|
-
let e = n(M.data.map((e) => e.value));
|
|
49
|
-
return e ? i(Math.min(0, e[0]), Math.max(0, e[1]), M.ticks) : i(0, 1, M.ticks);
|
|
50
|
-
}), B = s(() => {
|
|
51
|
-
if (!M.axis) return 0;
|
|
52
|
-
let e = Math.max(...z.value.ticks.map((e) => R(e).length), 1);
|
|
53
|
-
return Math.ceil(e * D) + O;
|
|
54
|
-
}), V = s(() => ({
|
|
55
|
-
left: B.value,
|
|
56
|
-
top: A,
|
|
57
|
-
width: Math.max(I.value - B.value, 0),
|
|
58
|
-
height: Math.max(M.height - A - k, 0)
|
|
59
|
-
})), H = s(() => r([z.value.min, z.value.max], [V.value.top + V.value.height, V.value.top])), U = s(() => M.data.length ? V.value.width / M.data.length : 0), W = s(() => Math.max(2, Math.min(24, U.value * j))), G = s(() => {
|
|
60
|
-
if (!I.value || !M.data.length) return [];
|
|
61
|
-
let e = H.value(0);
|
|
62
|
-
return M.data.flatMap((t, n) => {
|
|
63
|
-
let r = t.value;
|
|
64
|
-
if (typeof r != "number" || !Number.isFinite(r)) return [];
|
|
65
|
-
let i = H.value(r);
|
|
66
|
-
return [{
|
|
67
|
-
x: V.value.left + U.value * (n + .5) - W.value / 2,
|
|
68
|
-
y: Math.min(i, e),
|
|
69
|
-
width: W.value,
|
|
70
|
-
height: Math.abs(e - i),
|
|
71
|
-
up: r >= 0,
|
|
72
|
-
datum: t
|
|
73
|
-
}];
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
function K(e) {
|
|
77
|
-
let t = Math.min(4, e.width / 2, e.height), { x: n, width: r } = e, i = n + r;
|
|
78
|
-
if (e.up) {
|
|
79
|
-
let r = e.y, a = e.y + e.height;
|
|
80
|
-
return `M${n} ${a} L${n} ${r + t} Q${n} ${r} ${n + t} ${r} L${i - t} ${r} Q${i} ${r} ${i} ${r + t} L${i} ${a} Z`;
|
|
81
|
-
}
|
|
82
|
-
let a = e.y, o = e.y + e.height;
|
|
83
|
-
return `M${n} ${a} L${n} ${o - t} Q${n} ${o} ${n + t} ${o} L${i - t} ${o} Q${i} ${o} ${i} ${o - t} L${i} ${a} Z`;
|
|
84
|
-
}
|
|
85
|
-
let q = s(() => {
|
|
86
|
-
if (!U.value || !M.data.length) return 1;
|
|
87
|
-
let e = Math.max(...M.data.map((e) => e.label.length), 1);
|
|
88
|
-
return Math.max(1, Math.ceil((e * D + 8) / U.value));
|
|
89
|
-
}), J = h(), Y = s(() => {
|
|
90
|
-
if (J.value == null) return;
|
|
91
|
-
let e = M.data[J.value];
|
|
92
|
-
if (!e || typeof e.value != "number") return;
|
|
93
|
-
let t = e.label, n = R(e.value), r = ((t.length + n.length) * D + 28) / 2, i = V.value.left + U.value * (J.value + .5);
|
|
94
|
-
return {
|
|
95
|
-
label: t,
|
|
96
|
-
value: n,
|
|
97
|
-
x: Math.min(Math.max(i, r), Math.max(I.value - r, r)),
|
|
98
|
-
y: Math.min(H.value(e.value), H.value(0))
|
|
99
|
-
};
|
|
100
|
-
}), X = s(() => a());
|
|
101
|
-
function Z(e, t) {
|
|
102
|
-
let n = M.ui?.[e];
|
|
103
|
-
return P.value ? [n, t] : X.value[e]({ class: [n, t] });
|
|
104
|
-
}
|
|
105
|
-
function Q(e) {
|
|
106
|
-
let t = J.value != null && J.value !== e;
|
|
107
|
-
return P.value ? [M.ui?.bar] : X.value.bar({ class: [M.ui?.bar, t ? X.value.faded() : void 0] });
|
|
108
|
-
}
|
|
109
|
-
return (e, t) => (m(), l("div", {
|
|
110
|
-
ref_key: "root",
|
|
111
|
-
ref: F,
|
|
112
|
-
role: M.label ? "figure" : void 0,
|
|
113
|
-
"aria-label": M.label,
|
|
114
|
-
class: f(Z("root", M.class))
|
|
115
|
-
}, [
|
|
116
|
-
(m(), l("svg", {
|
|
117
|
-
width: v(I),
|
|
118
|
-
height: M.height,
|
|
119
|
-
viewBox: `0 0 ${v(I)} ${M.height}`,
|
|
120
|
-
"aria-hidden": "true",
|
|
121
|
-
class: f(Z("svg"))
|
|
122
|
-
}, [
|
|
123
|
-
M.axis ? (m(!0), l(o, { key: 0 }, g(z.value.ticks, (e) => (m(), l("g", { key: `tick-${e}` }, [u("line", {
|
|
124
|
-
x1: V.value.left,
|
|
125
|
-
y1: H.value(e),
|
|
126
|
-
x2: V.value.left + V.value.width,
|
|
127
|
-
y2: H.value(e),
|
|
128
|
-
"stroke-width": "1",
|
|
129
|
-
class: f(Z("grid"))
|
|
130
|
-
}, null, 10, x), u("text", {
|
|
131
|
-
x: V.value.left - O,
|
|
132
|
-
y: H.value(e),
|
|
133
|
-
"text-anchor": "end",
|
|
134
|
-
"dominant-baseline": "middle",
|
|
135
|
-
class: f(Z("tick"))
|
|
136
|
-
}, _(R(e)), 11, S)]))), 128)) : c("", !0),
|
|
137
|
-
(m(!0), l(o, null, g(G.value, (e, t) => (m(), l("path", {
|
|
138
|
-
key: `bar-${e.datum.label}-${t}`,
|
|
139
|
-
d: K(e),
|
|
140
|
-
class: f(Q(t))
|
|
141
|
-
}, null, 10, C))), 128)),
|
|
142
|
-
(m(!0), l(o, null, g(M.data, (e, t) => (m(), l(o, { key: `label-${e.label}-${t}` }, [t % q.value === 0 ? (m(), l("text", {
|
|
143
|
-
key: 0,
|
|
144
|
-
x: V.value.left + U.value * (t + .5),
|
|
145
|
-
y: V.value.top + V.value.height + 14,
|
|
146
|
-
"text-anchor": "middle",
|
|
147
|
-
class: f(Z("category"))
|
|
148
|
-
}, _(e.label), 11, w)) : c("", !0)], 64))), 128)),
|
|
149
|
-
(m(!0), l(o, null, g(M.data, (e, n) => (m(), l("rect", {
|
|
150
|
-
key: `hit-${e.label}-${n}`,
|
|
151
|
-
x: V.value.left + U.value * n,
|
|
152
|
-
y: V.value.top,
|
|
153
|
-
width: U.value,
|
|
154
|
-
height: V.value.height,
|
|
155
|
-
class: f(P.value ? void 0 : X.value.hit()),
|
|
156
|
-
onPointerenter: (e) => J.value = n,
|
|
157
|
-
onPointerleave: t[0] ||= (e) => J.value = void 0
|
|
158
|
-
}, null, 42, T))), 128))
|
|
159
|
-
], 10, b)),
|
|
160
|
-
Y.value ? (m(), l("div", {
|
|
161
|
-
key: 0,
|
|
162
|
-
class: f(Z("tooltip")),
|
|
163
|
-
style: p({
|
|
164
|
-
left: `${Y.value.x}px`,
|
|
165
|
-
top: `${Y.value.y}px`,
|
|
166
|
-
transform: "translate(-50%, -100%) translateY(-8px)"
|
|
167
|
-
})
|
|
168
|
-
}, [u("span", { class: f(Z("tooltipLabel")) }, _(Y.value.label), 3), u("span", { class: f(Z("tooltipValue")) }, _(Y.value.value), 3)], 6)) : c("", !0),
|
|
169
|
-
u("table", { class: f(Z("table")) }, [
|
|
170
|
-
u("caption", null, _(M.label), 1),
|
|
171
|
-
t[1] ||= u("thead", null, [u("tr", null, [u("th", { scope: "col" }, " Category "), u("th", { scope: "col" }, " Value ")])], -1),
|
|
172
|
-
u("tbody", null, [(m(!0), l(o, null, g(M.data, (e, t) => (m(), l("tr", { key: `row-${e.label}-${t}` }, [u("th", E, _(e.label), 1), u("td", null, _(typeof e.value == "number" ? R(e.value) : "—"), 1)]))), 128))])
|
|
173
|
-
], 2)
|
|
174
|
-
], 10, y));
|
|
175
|
-
}
|
|
176
|
-
});
|
|
177
|
-
//#endregion
|
|
178
|
-
export { M as default };
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
import { Cancel01Icon as e } from "../../../../node_modules/.pnpm/@hugeicons_core-free-icons@4.2.3/node_modules/@hugeicons/core-free-icons/dist/esm/index.js";
|
|
2
|
-
import { useIryxUiConfig as t } from "../config.js";
|
|
3
|
-
import n from "./Icon.js";
|
|
4
|
-
import { dialogTheme as r } from "../theme/dialog.js";
|
|
5
|
-
import { computed as i, createBlock as a, createCommentVNode as o, createElementBlock as s, createElementVNode as c, createTextVNode as l, createVNode as u, defineComponent as d, mergeModels as f, normalizeClass as p, openBlock as m, renderSlot as h, toDisplayString as g, unref as _, useModel as v, withCtx as y } from "vue";
|
|
6
|
-
import { DialogContent as b, DialogDescription as x, DialogOverlay as S, DialogPortal as C, DialogRoot as w, DialogTitle as T, DialogTrigger as E, VisuallyHidden as D } from "reka-ui";
|
|
7
|
-
//#region src/components/Dialog.vue?vue&type=script&setup=true&lang.ts
|
|
8
|
-
var O = ["aria-label"], k = /*@__PURE__*/ d({
|
|
9
|
-
__name: "Dialog",
|
|
10
|
-
props: /*@__PURE__*/ f({
|
|
11
|
-
title: {},
|
|
12
|
-
description: {},
|
|
13
|
-
size: {},
|
|
14
|
-
dismissible: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: !0
|
|
17
|
-
},
|
|
18
|
-
showClose: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: !0
|
|
21
|
-
},
|
|
22
|
-
closeLabel: { default: "Close" },
|
|
23
|
-
unstyled: {
|
|
24
|
-
type: Boolean,
|
|
25
|
-
default: void 0
|
|
26
|
-
},
|
|
27
|
-
class: {},
|
|
28
|
-
ui: {}
|
|
29
|
-
}, {
|
|
30
|
-
open: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: !1
|
|
33
|
-
},
|
|
34
|
-
openModifiers: {}
|
|
35
|
-
}),
|
|
36
|
-
emits: ["update:open"],
|
|
37
|
-
setup(d) {
|
|
38
|
-
let f = d, k = v(d, "open"), A = t(), j = i(() => f.unstyled ?? A.unstyled), M = i(() => r({ size: f.size })), N = i(() => j.value ? f.ui?.overlay : M.value.overlay({ class: f.ui?.overlay })), P = i(() => j.value ? [f.ui?.content, f.class] : M.value.content({ class: [f.ui?.content, f.class] })), F = i(() => j.value ? f.ui?.header : M.value.header({ class: f.ui?.header })), I = i(() => j.value ? f.ui?.title : M.value.title({ class: f.ui?.title })), L = i(() => j.value ? f.ui?.description : M.value.description({ class: f.ui?.description })), R = i(() => j.value ? f.ui?.body : M.value.body({ class: f.ui?.body })), z = i(() => j.value ? f.ui?.footer : M.value.footer({ class: f.ui?.footer })), B = i(() => j.value ? f.ui?.close : M.value.close({ class: f.ui?.close }));
|
|
39
|
-
function V(e) {
|
|
40
|
-
!e && !f.dismissible || (k.value = e);
|
|
41
|
-
}
|
|
42
|
-
function H() {
|
|
43
|
-
k.value = !1;
|
|
44
|
-
}
|
|
45
|
-
return (t, r) => (m(), a(_(w), {
|
|
46
|
-
open: k.value,
|
|
47
|
-
"onUpdate:open": V
|
|
48
|
-
}, {
|
|
49
|
-
default: y(() => [t.$slots.trigger ? (m(), a(_(E), {
|
|
50
|
-
key: 0,
|
|
51
|
-
"as-child": ""
|
|
52
|
-
}, {
|
|
53
|
-
default: y(() => [h(t.$slots, "trigger")]),
|
|
54
|
-
_: 3
|
|
55
|
-
})) : o("", !0), u(_(C), null, {
|
|
56
|
-
default: y(() => [u(_(S), { class: p(N.value) }, null, 8, ["class"]), u(_(b), { class: p(P.value) }, {
|
|
57
|
-
default: y(() => [
|
|
58
|
-
f.title || f.description || t.$slots.header ? (m(), s("div", {
|
|
59
|
-
key: 0,
|
|
60
|
-
class: p(F.value)
|
|
61
|
-
}, [h(t.$slots, "header", {}, () => [u(_(T), { class: p(I.value) }, {
|
|
62
|
-
default: y(() => [h(t.$slots, "title", {}, () => [l(g(f.title), 1)])]),
|
|
63
|
-
_: 3
|
|
64
|
-
}, 8, ["class"]), f.description || t.$slots.description ? (m(), a(_(x), {
|
|
65
|
-
key: 0,
|
|
66
|
-
class: p(L.value)
|
|
67
|
-
}, {
|
|
68
|
-
default: y(() => [h(t.$slots, "description", {}, () => [l(g(f.description), 1)])]),
|
|
69
|
-
_: 3
|
|
70
|
-
}, 8, ["class"])) : o("", !0)])], 2)) : (m(), a(_(D), { key: 1 }, {
|
|
71
|
-
default: y(() => [u(_(T), null, {
|
|
72
|
-
default: y(() => [l(g(f.closeLabel), 1)]),
|
|
73
|
-
_: 1
|
|
74
|
-
})]),
|
|
75
|
-
_: 1
|
|
76
|
-
})),
|
|
77
|
-
c("div", { class: p(R.value) }, [h(t.$slots, "default")], 2),
|
|
78
|
-
t.$slots.footer ? (m(), s("div", {
|
|
79
|
-
key: 2,
|
|
80
|
-
class: p(z.value)
|
|
81
|
-
}, [h(t.$slots, "footer", { close: H })], 2)) : o("", !0),
|
|
82
|
-
f.showClose ? (m(), s("button", {
|
|
83
|
-
key: 3,
|
|
84
|
-
type: "button",
|
|
85
|
-
"aria-label": f.closeLabel,
|
|
86
|
-
class: p(B.value),
|
|
87
|
-
onClick: H
|
|
88
|
-
}, [u(n, { icon: _(e) }, null, 8, ["icon"])], 10, O)) : o("", !0)
|
|
89
|
-
]),
|
|
90
|
-
_: 3
|
|
91
|
-
}, 8, ["class"])]),
|
|
92
|
-
_: 3
|
|
93
|
-
})]),
|
|
94
|
-
_: 3
|
|
95
|
-
}, 8, ["open"]));
|
|
96
|
-
}
|
|
97
|
-
});
|
|
98
|
-
//#endregion
|
|
99
|
-
export { k as default };
|