@kizunacms/ui 0.0.0-stage → 0.1.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/LICENSE.MD +9 -0
- package/README.md +18 -2
- package/dist/_virtual/_rolldown/runtime.cjs +23 -0
- package/dist/admin.css +2158 -0
- package/dist/client.cjs +99 -0
- package/dist/client.d.cts +46 -0
- package/dist/client.d.mts +46 -0
- package/dist/client.mjs +45 -0
- package/dist/controls/AdminLink.cjs +21 -0
- package/dist/controls/AdminLink.d.cts +16 -0
- package/dist/controls/AdminLink.d.mts +16 -0
- package/dist/controls/AdminLink.mjs +20 -0
- package/dist/controls/Avatar.cjs +15 -0
- package/dist/controls/Avatar.d.cts +17 -0
- package/dist/controls/Avatar.d.mts +17 -0
- package/dist/controls/Avatar.mjs +14 -0
- package/dist/controls/Button.cjs +20 -0
- package/dist/controls/Button.d.cts +18 -0
- package/dist/controls/Button.d.mts +18 -0
- package/dist/controls/Button.mjs +18 -0
- package/dist/controls/ButtonTip.cjs +40 -0
- package/dist/controls/ButtonTip.mjs +39 -0
- package/dist/controls/Checkbox.cjs +27 -0
- package/dist/controls/Checkbox.d.cts +15 -0
- package/dist/controls/Checkbox.d.mts +15 -0
- package/dist/controls/Checkbox.mjs +26 -0
- package/dist/controls/ChipsInput.cjs +145 -0
- package/dist/controls/ChipsInput.mjs +143 -0
- package/dist/controls/ConfirmDialog.cjs +63 -0
- package/dist/controls/ConfirmDialog.d.cts +38 -0
- package/dist/controls/ConfirmDialog.d.mts +38 -0
- package/dist/controls/ConfirmDialog.mjs +62 -0
- package/dist/controls/Counter.cjs +18 -0
- package/dist/controls/Counter.mjs +17 -0
- package/dist/controls/InfoTip.cjs +29 -0
- package/dist/controls/InfoTip.d.cts +11 -0
- package/dist/controls/InfoTip.d.mts +11 -0
- package/dist/controls/InfoTip.mjs +28 -0
- package/dist/controls/LocalTime.cjs +62 -0
- package/dist/controls/LocalTime.d.cts +30 -0
- package/dist/controls/LocalTime.d.mts +30 -0
- package/dist/controls/LocalTime.mjs +61 -0
- package/dist/controls/Logo.cjs +56 -0
- package/dist/controls/Logo.d.cts +13 -0
- package/dist/controls/Logo.d.mts +13 -0
- package/dist/controls/Logo.mjs +54 -0
- package/dist/controls/MenuButton.cjs +118 -0
- package/dist/controls/MenuButton.d.cts +88 -0
- package/dist/controls/MenuButton.d.mts +88 -0
- package/dist/controls/MenuButton.mjs +117 -0
- package/dist/controls/Select.cjs +67 -0
- package/dist/controls/Select.d.cts +42 -0
- package/dist/controls/Select.d.mts +42 -0
- package/dist/controls/Select.mjs +66 -0
- package/dist/controls/Status.cjs +31 -0
- package/dist/controls/Status.d.cts +14 -0
- package/dist/controls/Status.d.mts +14 -0
- package/dist/controls/Status.mjs +30 -0
- package/dist/controls/TrailingButton.cjs +22 -0
- package/dist/controls/TrailingButton.d.cts +18 -0
- package/dist/controls/TrailingButton.d.mts +18 -0
- package/dist/controls/TrailingButton.mjs +21 -0
- package/dist/controls/icon.cjs +42 -0
- package/dist/controls/icon.mjs +38 -0
- package/dist/inputs/Affixed.cjs +49 -0
- package/dist/inputs/Affixed.mjs +47 -0
- package/dist/inputs/CheckboxField.cjs +22 -0
- package/dist/inputs/CheckboxField.d.cts +10 -0
- package/dist/inputs/CheckboxField.d.mts +10 -0
- package/dist/inputs/CheckboxField.mjs +21 -0
- package/dist/inputs/DateField.cjs +22 -0
- package/dist/inputs/DateField.d.cts +10 -0
- package/dist/inputs/DateField.d.mts +10 -0
- package/dist/inputs/DateField.mjs +21 -0
- package/dist/inputs/DateTimeField.cjs +56 -0
- package/dist/inputs/DateTimeField.d.cts +10 -0
- package/dist/inputs/DateTimeField.d.mts +10 -0
- package/dist/inputs/DateTimeField.mjs +55 -0
- package/dist/inputs/EmailField.cjs +20 -0
- package/dist/inputs/EmailField.d.cts +10 -0
- package/dist/inputs/EmailField.d.mts +10 -0
- package/dist/inputs/EmailField.mjs +19 -0
- package/dist/inputs/FallbackReset.cjs +23 -0
- package/dist/inputs/FallbackReset.mjs +21 -0
- package/dist/inputs/FieldFor.cjs +48 -0
- package/dist/inputs/FieldFor.d.cts +16 -0
- package/dist/inputs/FieldFor.d.mts +16 -0
- package/dist/inputs/FieldFor.mjs +46 -0
- package/dist/inputs/FieldFrame.cjs +97 -0
- package/dist/inputs/FieldFrame.d.cts +29 -0
- package/dist/inputs/FieldFrame.d.mts +29 -0
- package/dist/inputs/FieldFrame.mjs +95 -0
- package/dist/inputs/FieldList.cjs +39 -0
- package/dist/inputs/FieldList.d.cts +16 -0
- package/dist/inputs/FieldList.d.mts +16 -0
- package/dist/inputs/FieldList.mjs +38 -0
- package/dist/inputs/FileField.cjs +363 -0
- package/dist/inputs/FileField.d.cts +10 -0
- package/dist/inputs/FileField.d.mts +10 -0
- package/dist/inputs/FileField.mjs +362 -0
- package/dist/inputs/FocalPointPicker.cjs +114 -0
- package/dist/inputs/FocalPointPicker.mjs +113 -0
- package/dist/inputs/JsonField.cjs +21 -0
- package/dist/inputs/JsonField.d.cts +10 -0
- package/dist/inputs/JsonField.d.mts +10 -0
- package/dist/inputs/JsonField.mjs +20 -0
- package/dist/inputs/NumberField.cjs +42 -0
- package/dist/inputs/NumberField.d.cts +10 -0
- package/dist/inputs/NumberField.d.mts +10 -0
- package/dist/inputs/NumberField.mjs +41 -0
- package/dist/inputs/PasswordField.cjs +41 -0
- package/dist/inputs/PasswordField.d.cts +26 -0
- package/dist/inputs/PasswordField.d.mts +26 -0
- package/dist/inputs/PasswordField.mjs +39 -0
- package/dist/inputs/PickerButton.cjs +56 -0
- package/dist/inputs/PickerButton.mjs +55 -0
- package/dist/inputs/RelationshipField.cjs +162 -0
- package/dist/inputs/RelationshipField.d.cts +10 -0
- package/dist/inputs/RelationshipField.d.mts +10 -0
- package/dist/inputs/RelationshipField.mjs +161 -0
- package/dist/inputs/SelectField.cjs +79 -0
- package/dist/inputs/SelectField.d.cts +10 -0
- package/dist/inputs/SelectField.d.mts +10 -0
- package/dist/inputs/SelectField.mjs +78 -0
- package/dist/inputs/SlugField.cjs +71 -0
- package/dist/inputs/SlugField.d.cts +11 -0
- package/dist/inputs/SlugField.d.mts +11 -0
- package/dist/inputs/SlugField.mjs +69 -0
- package/dist/inputs/TextBox.cjs +41 -0
- package/dist/inputs/TextBox.d.cts +35 -0
- package/dist/inputs/TextBox.d.mts +35 -0
- package/dist/inputs/TextBox.mjs +39 -0
- package/dist/inputs/TextField.cjs +61 -0
- package/dist/inputs/TextField.d.cts +10 -0
- package/dist/inputs/TextField.d.mts +10 -0
- package/dist/inputs/TextField.mjs +60 -0
- package/dist/inputs/TitleField.cjs +76 -0
- package/dist/inputs/TitleField.mjs +75 -0
- package/dist/inputs/UrlField.cjs +20 -0
- package/dist/inputs/UrlField.d.cts +10 -0
- package/dist/inputs/UrlField.d.mts +10 -0
- package/dist/inputs/UrlField.mjs +19 -0
- package/dist/inputs/values.cjs +4 -0
- package/dist/inputs/values.d.cts +19 -0
- package/dist/inputs/values.d.mts +19 -0
- package/dist/inputs/values.mjs +4 -0
- package/dist/screens/AccountView.cjs +173 -0
- package/dist/screens/AccountView.d.cts +18 -0
- package/dist/screens/AccountView.d.mts +18 -0
- package/dist/screens/AccountView.mjs +172 -0
- package/dist/screens/AdminShell.cjs +136 -0
- package/dist/screens/AdminShell.d.cts +31 -0
- package/dist/screens/AdminShell.d.mts +31 -0
- package/dist/screens/AdminShell.mjs +135 -0
- package/dist/screens/AuthViews.cjs +260 -0
- package/dist/screens/AuthViews.d.cts +48 -0
- package/dist/screens/AuthViews.d.mts +48 -0
- package/dist/screens/AuthViews.mjs +255 -0
- package/dist/screens/CreateView.cjs +37 -0
- package/dist/screens/CreateView.d.cts +12 -0
- package/dist/screens/CreateView.d.mts +12 -0
- package/dist/screens/CreateView.mjs +36 -0
- package/dist/screens/DashboardView.cjs +39 -0
- package/dist/screens/DashboardView.d.cts +12 -0
- package/dist/screens/DashboardView.d.mts +12 -0
- package/dist/screens/DashboardView.mjs +38 -0
- package/dist/screens/DocumentForm.cjs +214 -0
- package/dist/screens/DocumentForm.d.cts +77 -0
- package/dist/screens/DocumentForm.d.mts +77 -0
- package/dist/screens/DocumentForm.mjs +213 -0
- package/dist/screens/DocumentView.cjs +53 -0
- package/dist/screens/DocumentView.d.cts +17 -0
- package/dist/screens/DocumentView.d.mts +17 -0
- package/dist/screens/DocumentView.mjs +52 -0
- package/dist/screens/FileView.cjs +74 -0
- package/dist/screens/FileView.d.cts +17 -0
- package/dist/screens/FileView.d.mts +17 -0
- package/dist/screens/FileView.mjs +73 -0
- package/dist/screens/FilesView.cjs +212 -0
- package/dist/screens/FilesView.d.cts +34 -0
- package/dist/screens/FilesView.d.mts +34 -0
- package/dist/screens/FilesView.mjs +211 -0
- package/dist/screens/GlobalView.cjs +28 -0
- package/dist/screens/GlobalView.d.cts +16 -0
- package/dist/screens/GlobalView.d.mts +16 -0
- package/dist/screens/GlobalView.mjs +27 -0
- package/dist/screens/ListParts.cjs +138 -0
- package/dist/screens/ListParts.mjs +135 -0
- package/dist/screens/ListView.cjs +155 -0
- package/dist/screens/ListView.d.cts +28 -0
- package/dist/screens/ListView.d.mts +28 -0
- package/dist/screens/ListView.mjs +154 -0
- package/dist/screens/LogoutView.cjs +45 -0
- package/dist/screens/LogoutView.d.cts +10 -0
- package/dist/screens/LogoutView.d.mts +10 -0
- package/dist/screens/LogoutView.mjs +44 -0
- package/dist/screens/MessageView.cjs +13 -0
- package/dist/screens/MessageView.d.cts +12 -0
- package/dist/screens/MessageView.d.mts +12 -0
- package/dist/screens/MessageView.mjs +12 -0
- package/dist/screens/ScreenHeader.cjs +101 -0
- package/dist/screens/ScreenHeader.d.cts +33 -0
- package/dist/screens/ScreenHeader.d.mts +33 -0
- package/dist/screens/ScreenHeader.mjs +98 -0
- package/dist/shared.cjs +55 -0
- package/dist/shared.d.cts +9 -0
- package/dist/shared.d.mts +9 -0
- package/dist/shared.mjs +9 -0
- package/dist/state/AdminProvider.cjs +188 -0
- package/dist/state/AdminProvider.d.cts +106 -0
- package/dist/state/AdminProvider.d.mts +106 -0
- package/dist/state/AdminProvider.mjs +186 -0
- package/dist/state/admin-path.cjs +132 -0
- package/dist/state/admin-path.d.cts +101 -0
- package/dist/state/admin-path.d.mts +101 -0
- package/dist/state/admin-path.mjs +131 -0
- package/dist/state/admin-sections.cjs +49 -0
- package/dist/state/admin-sections.d.cts +39 -0
- package/dist/state/admin-sections.d.mts +39 -0
- package/dist/state/admin-sections.mjs +48 -0
- package/dist/state/choice-search.cjs +95 -0
- package/dist/state/choice-search.mjs +94 -0
- package/dist/state/definition.cjs +53 -0
- package/dist/state/definition.d.cts +123 -0
- package/dist/state/definition.d.mts +123 -0
- package/dist/state/definition.mjs +48 -0
- package/dist/state/form-data.cjs +266 -0
- package/dist/state/form-data.d.cts +123 -0
- package/dist/state/form-data.d.mts +123 -0
- package/dist/state/form-data.mjs +245 -0
- package/dist/state/form-field.cjs +60 -0
- package/dist/state/form-field.d.cts +135 -0
- package/dist/state/form-field.d.mts +135 -0
- package/dist/state/form-field.mjs +56 -0
- package/dist/state/form-state.cjs +11 -0
- package/dist/state/form-state.d.cts +61 -0
- package/dist/state/form-state.d.mts +61 -0
- package/dist/state/form-state.mjs +11 -0
- package/dist/state/kept-focus.cjs +42 -0
- package/dist/state/kept-focus.mjs +41 -0
- package/dist/state/list-query.cjs +116 -0
- package/dist/state/list-query.d.cts +57 -0
- package/dist/state/list-query.d.mts +57 -0
- package/dist/state/list-query.mjs +108 -0
- package/dist/state/picker.cjs +48 -0
- package/dist/state/picker.mjs +47 -0
- package/dist/state/sidebar.cjs +15 -0
- package/dist/state/sidebar.d.cts +7 -0
- package/dist/state/sidebar.d.mts +7 -0
- package/dist/state/sidebar.mjs +14 -0
- package/dist/state/unsaved-guard.cjs +56 -0
- package/dist/state/unsaved-guard.mjs +54 -0
- package/dist/state/uploads.cjs +104 -0
- package/dist/state/uploads.mjs +102 -0
- package/package.json +89 -3
package/dist/client.cjs
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
+
const require_Button = require("./controls/Button.cjs");
|
|
3
|
+
const require_Status = require("./controls/Status.cjs");
|
|
4
|
+
const require_ConfirmDialog = require("./controls/ConfirmDialog.cjs");
|
|
5
|
+
const require_AdminProvider = require("./state/AdminProvider.cjs");
|
|
6
|
+
const require_AdminLink = require("./controls/AdminLink.cjs");
|
|
7
|
+
const require_Checkbox = require("./controls/Checkbox.cjs");
|
|
8
|
+
const require_LocalTime = require("./controls/LocalTime.cjs");
|
|
9
|
+
const require_Select = require("./controls/Select.cjs");
|
|
10
|
+
const require_Avatar = require("./controls/Avatar.cjs");
|
|
11
|
+
const require_InfoTip = require("./controls/InfoTip.cjs");
|
|
12
|
+
const require_Logo = require("./controls/Logo.cjs");
|
|
13
|
+
const require_MenuButton = require("./controls/MenuButton.cjs");
|
|
14
|
+
const require_TrailingButton = require("./controls/TrailingButton.cjs");
|
|
15
|
+
const require_FieldFrame = require("./inputs/FieldFrame.cjs");
|
|
16
|
+
const require_CheckboxField = require("./inputs/CheckboxField.cjs");
|
|
17
|
+
const require_TextBox = require("./inputs/TextBox.cjs");
|
|
18
|
+
const require_DateField = require("./inputs/DateField.cjs");
|
|
19
|
+
const require_DateTimeField = require("./inputs/DateTimeField.cjs");
|
|
20
|
+
const require_EmailField = require("./inputs/EmailField.cjs");
|
|
21
|
+
const require_FileField = require("./inputs/FileField.cjs");
|
|
22
|
+
const require_JsonField = require("./inputs/JsonField.cjs");
|
|
23
|
+
const require_NumberField = require("./inputs/NumberField.cjs");
|
|
24
|
+
const require_RelationshipField = require("./inputs/RelationshipField.cjs");
|
|
25
|
+
const require_PasswordField = require("./inputs/PasswordField.cjs");
|
|
26
|
+
const require_SelectField = require("./inputs/SelectField.cjs");
|
|
27
|
+
const require_SlugField = require("./inputs/SlugField.cjs");
|
|
28
|
+
const require_TextField = require("./inputs/TextField.cjs");
|
|
29
|
+
const require_UrlField = require("./inputs/UrlField.cjs");
|
|
30
|
+
const require_FieldFor = require("./inputs/FieldFor.cjs");
|
|
31
|
+
const require_FieldList = require("./inputs/FieldList.cjs");
|
|
32
|
+
const require_ScreenHeader = require("./screens/ScreenHeader.cjs");
|
|
33
|
+
const require_DocumentForm = require("./screens/DocumentForm.cjs");
|
|
34
|
+
const require_AccountView = require("./screens/AccountView.cjs");
|
|
35
|
+
const require_AdminShell = require("./screens/AdminShell.cjs");
|
|
36
|
+
const require_CreateView = require("./screens/CreateView.cjs");
|
|
37
|
+
const require_DocumentView = require("./screens/DocumentView.cjs");
|
|
38
|
+
const require_GlobalView = require("./screens/GlobalView.cjs");
|
|
39
|
+
const require_ListView = require("./screens/ListView.cjs");
|
|
40
|
+
const require_MessageView = require("./screens/MessageView.cjs");
|
|
41
|
+
const require_AuthViews = require("./screens/AuthViews.cjs");
|
|
42
|
+
const require_LogoutView = require("./screens/LogoutView.cjs");
|
|
43
|
+
const require_DashboardView = require("./screens/DashboardView.cjs");
|
|
44
|
+
const require_FilesView = require("./screens/FilesView.cjs");
|
|
45
|
+
const require_FileView = require("./screens/FileView.cjs");
|
|
46
|
+
exports.AccountView = require_AccountView.AccountView;
|
|
47
|
+
exports.AdminLink = require_AdminLink.AdminLink;
|
|
48
|
+
exports.AdminProvider = require_AdminProvider.AdminProvider;
|
|
49
|
+
exports.AdminShell = require_AdminShell.AdminShell;
|
|
50
|
+
exports.AuthFrame = require_AuthViews.AuthFrame;
|
|
51
|
+
exports.Avatar = require_Avatar.Avatar;
|
|
52
|
+
exports.Button = require_Button.Button;
|
|
53
|
+
exports.Checkbox = require_Checkbox.Checkbox;
|
|
54
|
+
exports.CheckboxField = require_CheckboxField.CheckboxField;
|
|
55
|
+
exports.ConfirmDialog = require_ConfirmDialog.ConfirmDialog;
|
|
56
|
+
exports.CreateView = require_CreateView.CreateView;
|
|
57
|
+
exports.DashboardView = require_DashboardView.DashboardView;
|
|
58
|
+
exports.DateField = require_DateField.DateField;
|
|
59
|
+
exports.DateTimeField = require_DateTimeField.DateTimeField;
|
|
60
|
+
exports.DocumentForm = require_DocumentForm.DocumentForm;
|
|
61
|
+
exports.DocumentView = require_DocumentView.DocumentView;
|
|
62
|
+
exports.EmailField = require_EmailField.EmailField;
|
|
63
|
+
exports.FieldFor = require_FieldFor.FieldFor;
|
|
64
|
+
exports.FieldFrame = require_FieldFrame.FieldFrame;
|
|
65
|
+
exports.FieldList = require_FieldList.FieldList;
|
|
66
|
+
exports.FileField = require_FileField.FileField;
|
|
67
|
+
exports.FileView = require_FileView.FileView;
|
|
68
|
+
exports.FilesView = require_FilesView.FilesView;
|
|
69
|
+
exports.ForgotView = require_AuthViews.ForgotView;
|
|
70
|
+
exports.GlobalView = require_GlobalView.GlobalView;
|
|
71
|
+
exports.InfoTip = require_InfoTip.InfoTip;
|
|
72
|
+
exports.JsonField = require_JsonField.JsonField;
|
|
73
|
+
exports.KizunaLogo = require_Logo.KizunaLogo;
|
|
74
|
+
exports.ListView = require_ListView.ListView;
|
|
75
|
+
exports.LocalTime = require_LocalTime.LocalTime;
|
|
76
|
+
exports.LoginView = require_AuthViews.LoginView;
|
|
77
|
+
exports.Logo = require_Logo.Logo;
|
|
78
|
+
exports.LogoutView = require_LogoutView.LogoutView;
|
|
79
|
+
exports.MenuButton = require_MenuButton.MenuButton;
|
|
80
|
+
exports.MessageView = require_MessageView.MessageView;
|
|
81
|
+
exports.NumberField = require_NumberField.NumberField;
|
|
82
|
+
exports.PasswordField = require_PasswordField.PasswordField;
|
|
83
|
+
exports.PasswordInput = require_PasswordField.PasswordInput;
|
|
84
|
+
exports.RelationshipField = require_RelationshipField.RelationshipField;
|
|
85
|
+
exports.ResetView = require_AuthViews.ResetView;
|
|
86
|
+
exports.ScreenHeader = require_ScreenHeader.ScreenHeader;
|
|
87
|
+
exports.Select = require_Select.Select;
|
|
88
|
+
exports.SelectField = require_SelectField.SelectField;
|
|
89
|
+
exports.SetupView = require_AuthViews.SetupView;
|
|
90
|
+
exports.SlugField = require_SlugField.SlugField;
|
|
91
|
+
exports.Status = require_Status.Status;
|
|
92
|
+
exports.TextAreaBox = require_TextBox.TextAreaBox;
|
|
93
|
+
exports.TextBox = require_TextBox.TextBox;
|
|
94
|
+
exports.TextField = require_TextField.TextField;
|
|
95
|
+
exports.TrailingButton = require_TrailingButton.TrailingButton;
|
|
96
|
+
exports.UrlField = require_UrlField.UrlField;
|
|
97
|
+
exports.inputComponents = require_FieldFor.inputComponents;
|
|
98
|
+
exports.updatedFactsOf = require_ScreenHeader.updatedFactsOf;
|
|
99
|
+
exports.useAdmin = require_AdminProvider.useAdmin;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AdminContextValue, AdminProvider, LinkComponent, useAdmin } from "./state/AdminProvider.cjs";
|
|
2
|
+
import { AdminLink } from "./controls/AdminLink.cjs";
|
|
3
|
+
import { Button } from "./controls/Button.cjs";
|
|
4
|
+
import { Checkbox } from "./controls/Checkbox.cjs";
|
|
5
|
+
import { ConfirmDialog } from "./controls/ConfirmDialog.cjs";
|
|
6
|
+
import { LocalTime } from "./controls/LocalTime.cjs";
|
|
7
|
+
import { Select, SelectItem } from "./controls/Select.cjs";
|
|
8
|
+
import { Status } from "./controls/Status.cjs";
|
|
9
|
+
import { Avatar } from "./controls/Avatar.cjs";
|
|
10
|
+
import { InfoTip } from "./controls/InfoTip.cjs";
|
|
11
|
+
import { KizunaLogo, Logo } from "./controls/Logo.cjs";
|
|
12
|
+
import { MenuButton, MenuEntry } from "./controls/MenuButton.cjs";
|
|
13
|
+
import { TrailingButton } from "./controls/TrailingButton.cjs";
|
|
14
|
+
import { FieldProps } from "./inputs/values.cjs";
|
|
15
|
+
import { CheckboxField } from "./inputs/CheckboxField.cjs";
|
|
16
|
+
import { DateField } from "./inputs/DateField.cjs";
|
|
17
|
+
import { DateTimeField } from "./inputs/DateTimeField.cjs";
|
|
18
|
+
import { EmailField } from "./inputs/EmailField.cjs";
|
|
19
|
+
import { FileField } from "./inputs/FileField.cjs";
|
|
20
|
+
import { FieldFrame } from "./inputs/FieldFrame.cjs";
|
|
21
|
+
import { JsonField } from "./inputs/JsonField.cjs";
|
|
22
|
+
import { NumberField } from "./inputs/NumberField.cjs";
|
|
23
|
+
import { RelationshipField } from "./inputs/RelationshipField.cjs";
|
|
24
|
+
import { FieldFor, inputComponents } from "./inputs/FieldFor.cjs";
|
|
25
|
+
import { FieldList } from "./inputs/FieldList.cjs";
|
|
26
|
+
import { SelectField } from "./inputs/SelectField.cjs";
|
|
27
|
+
import { SlugField } from "./inputs/SlugField.cjs";
|
|
28
|
+
import { PasswordField, PasswordInput } from "./inputs/PasswordField.cjs";
|
|
29
|
+
import { TextAreaBox, TextBox } from "./inputs/TextBox.cjs";
|
|
30
|
+
import { TextField } from "./inputs/TextField.cjs";
|
|
31
|
+
import { UrlField } from "./inputs/UrlField.cjs";
|
|
32
|
+
import { Fact, ScreenHeader, updatedFactsOf } from "./screens/ScreenHeader.cjs";
|
|
33
|
+
import { Deletion, DocumentForm, DocumentFormProps } from "./screens/DocumentForm.cjs";
|
|
34
|
+
import { AccountView } from "./screens/AccountView.cjs";
|
|
35
|
+
import { AdminShell } from "./screens/AdminShell.cjs";
|
|
36
|
+
import { CreateView } from "./screens/CreateView.cjs";
|
|
37
|
+
import { DocumentView } from "./screens/DocumentView.cjs";
|
|
38
|
+
import { GlobalView } from "./screens/GlobalView.cjs";
|
|
39
|
+
import { ListView } from "./screens/ListView.cjs";
|
|
40
|
+
import { MessageView } from "./screens/MessageView.cjs";
|
|
41
|
+
import { AuthFrame, ForgotView, LoginView, ResetView, SetupView } from "./screens/AuthViews.cjs";
|
|
42
|
+
import { LogoutView } from "./screens/LogoutView.cjs";
|
|
43
|
+
import { DashboardView } from "./screens/DashboardView.cjs";
|
|
44
|
+
import { FilesView } from "./screens/FilesView.cjs";
|
|
45
|
+
import { FileView } from "./screens/FileView.cjs";
|
|
46
|
+
export { AccountView, type AdminContextValue, AdminLink, AdminProvider, AdminShell, AuthFrame, Avatar, Button, Checkbox, CheckboxField, ConfirmDialog, CreateView, DashboardView, DateField, DateTimeField, type Deletion, DocumentForm, type DocumentFormProps, DocumentView, EmailField, type Fact, FieldFor, FieldFrame, FieldList, type FieldProps, FileField, FileView, FilesView, ForgotView, GlobalView, InfoTip, JsonField, KizunaLogo, type LinkComponent, ListView, LocalTime, LoginView, Logo, LogoutView, MenuButton, type MenuEntry, MessageView, NumberField, PasswordField, PasswordInput, RelationshipField, ResetView, ScreenHeader, Select, SelectField, type SelectItem, SetupView, SlugField, Status, TextAreaBox, TextBox, TextField, TrailingButton, UrlField, inputComponents, updatedFactsOf, useAdmin };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { AdminContextValue, AdminProvider, LinkComponent, useAdmin } from "./state/AdminProvider.mjs";
|
|
2
|
+
import { AdminLink } from "./controls/AdminLink.mjs";
|
|
3
|
+
import { Button } from "./controls/Button.mjs";
|
|
4
|
+
import { Checkbox } from "./controls/Checkbox.mjs";
|
|
5
|
+
import { ConfirmDialog } from "./controls/ConfirmDialog.mjs";
|
|
6
|
+
import { LocalTime } from "./controls/LocalTime.mjs";
|
|
7
|
+
import { Select, SelectItem } from "./controls/Select.mjs";
|
|
8
|
+
import { Status } from "./controls/Status.mjs";
|
|
9
|
+
import { Avatar } from "./controls/Avatar.mjs";
|
|
10
|
+
import { InfoTip } from "./controls/InfoTip.mjs";
|
|
11
|
+
import { KizunaLogo, Logo } from "./controls/Logo.mjs";
|
|
12
|
+
import { MenuButton, MenuEntry } from "./controls/MenuButton.mjs";
|
|
13
|
+
import { TrailingButton } from "./controls/TrailingButton.mjs";
|
|
14
|
+
import { FieldProps } from "./inputs/values.mjs";
|
|
15
|
+
import { CheckboxField } from "./inputs/CheckboxField.mjs";
|
|
16
|
+
import { DateField } from "./inputs/DateField.mjs";
|
|
17
|
+
import { DateTimeField } from "./inputs/DateTimeField.mjs";
|
|
18
|
+
import { EmailField } from "./inputs/EmailField.mjs";
|
|
19
|
+
import { FileField } from "./inputs/FileField.mjs";
|
|
20
|
+
import { FieldFrame } from "./inputs/FieldFrame.mjs";
|
|
21
|
+
import { JsonField } from "./inputs/JsonField.mjs";
|
|
22
|
+
import { NumberField } from "./inputs/NumberField.mjs";
|
|
23
|
+
import { RelationshipField } from "./inputs/RelationshipField.mjs";
|
|
24
|
+
import { FieldFor, inputComponents } from "./inputs/FieldFor.mjs";
|
|
25
|
+
import { FieldList } from "./inputs/FieldList.mjs";
|
|
26
|
+
import { SelectField } from "./inputs/SelectField.mjs";
|
|
27
|
+
import { SlugField } from "./inputs/SlugField.mjs";
|
|
28
|
+
import { PasswordField, PasswordInput } from "./inputs/PasswordField.mjs";
|
|
29
|
+
import { TextAreaBox, TextBox } from "./inputs/TextBox.mjs";
|
|
30
|
+
import { TextField } from "./inputs/TextField.mjs";
|
|
31
|
+
import { UrlField } from "./inputs/UrlField.mjs";
|
|
32
|
+
import { Fact, ScreenHeader, updatedFactsOf } from "./screens/ScreenHeader.mjs";
|
|
33
|
+
import { Deletion, DocumentForm, DocumentFormProps } from "./screens/DocumentForm.mjs";
|
|
34
|
+
import { AccountView } from "./screens/AccountView.mjs";
|
|
35
|
+
import { AdminShell } from "./screens/AdminShell.mjs";
|
|
36
|
+
import { CreateView } from "./screens/CreateView.mjs";
|
|
37
|
+
import { DocumentView } from "./screens/DocumentView.mjs";
|
|
38
|
+
import { GlobalView } from "./screens/GlobalView.mjs";
|
|
39
|
+
import { ListView } from "./screens/ListView.mjs";
|
|
40
|
+
import { MessageView } from "./screens/MessageView.mjs";
|
|
41
|
+
import { AuthFrame, ForgotView, LoginView, ResetView, SetupView } from "./screens/AuthViews.mjs";
|
|
42
|
+
import { LogoutView } from "./screens/LogoutView.mjs";
|
|
43
|
+
import { DashboardView } from "./screens/DashboardView.mjs";
|
|
44
|
+
import { FilesView } from "./screens/FilesView.mjs";
|
|
45
|
+
import { FileView } from "./screens/FileView.mjs";
|
|
46
|
+
export { AccountView, type AdminContextValue, AdminLink, AdminProvider, AdminShell, AuthFrame, Avatar, Button, Checkbox, CheckboxField, ConfirmDialog, CreateView, DashboardView, DateField, DateTimeField, type Deletion, DocumentForm, type DocumentFormProps, DocumentView, EmailField, type Fact, FieldFor, FieldFrame, FieldList, type FieldProps, FileField, FileView, FilesView, ForgotView, GlobalView, InfoTip, JsonField, KizunaLogo, type LinkComponent, ListView, LocalTime, LoginView, Logo, LogoutView, MenuButton, type MenuEntry, MessageView, NumberField, PasswordField, PasswordInput, RelationshipField, ResetView, ScreenHeader, Select, SelectField, type SelectItem, SetupView, SlugField, Status, TextAreaBox, TextBox, TextField, TrailingButton, UrlField, inputComponents, updatedFactsOf, useAdmin };
|
package/dist/client.mjs
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { Button } from "./controls/Button.mjs";
|
|
2
|
+
import { Status } from "./controls/Status.mjs";
|
|
3
|
+
import { ConfirmDialog } from "./controls/ConfirmDialog.mjs";
|
|
4
|
+
import { AdminProvider, useAdmin } from "./state/AdminProvider.mjs";
|
|
5
|
+
import { AdminLink } from "./controls/AdminLink.mjs";
|
|
6
|
+
import { Checkbox } from "./controls/Checkbox.mjs";
|
|
7
|
+
import { LocalTime } from "./controls/LocalTime.mjs";
|
|
8
|
+
import { Select } from "./controls/Select.mjs";
|
|
9
|
+
import { Avatar } from "./controls/Avatar.mjs";
|
|
10
|
+
import { InfoTip } from "./controls/InfoTip.mjs";
|
|
11
|
+
import { KizunaLogo, Logo } from "./controls/Logo.mjs";
|
|
12
|
+
import { MenuButton } from "./controls/MenuButton.mjs";
|
|
13
|
+
import { TrailingButton } from "./controls/TrailingButton.mjs";
|
|
14
|
+
import { FieldFrame } from "./inputs/FieldFrame.mjs";
|
|
15
|
+
import { CheckboxField } from "./inputs/CheckboxField.mjs";
|
|
16
|
+
import { TextAreaBox, TextBox } from "./inputs/TextBox.mjs";
|
|
17
|
+
import { DateField } from "./inputs/DateField.mjs";
|
|
18
|
+
import { DateTimeField } from "./inputs/DateTimeField.mjs";
|
|
19
|
+
import { EmailField } from "./inputs/EmailField.mjs";
|
|
20
|
+
import { FileField } from "./inputs/FileField.mjs";
|
|
21
|
+
import { JsonField } from "./inputs/JsonField.mjs";
|
|
22
|
+
import { NumberField } from "./inputs/NumberField.mjs";
|
|
23
|
+
import { RelationshipField } from "./inputs/RelationshipField.mjs";
|
|
24
|
+
import { PasswordField, PasswordInput } from "./inputs/PasswordField.mjs";
|
|
25
|
+
import { SelectField } from "./inputs/SelectField.mjs";
|
|
26
|
+
import { SlugField } from "./inputs/SlugField.mjs";
|
|
27
|
+
import { TextField } from "./inputs/TextField.mjs";
|
|
28
|
+
import { UrlField } from "./inputs/UrlField.mjs";
|
|
29
|
+
import { FieldFor, inputComponents } from "./inputs/FieldFor.mjs";
|
|
30
|
+
import { FieldList } from "./inputs/FieldList.mjs";
|
|
31
|
+
import { ScreenHeader, updatedFactsOf } from "./screens/ScreenHeader.mjs";
|
|
32
|
+
import { DocumentForm } from "./screens/DocumentForm.mjs";
|
|
33
|
+
import { AccountView } from "./screens/AccountView.mjs";
|
|
34
|
+
import { AdminShell } from "./screens/AdminShell.mjs";
|
|
35
|
+
import { CreateView } from "./screens/CreateView.mjs";
|
|
36
|
+
import { DocumentView } from "./screens/DocumentView.mjs";
|
|
37
|
+
import { GlobalView } from "./screens/GlobalView.mjs";
|
|
38
|
+
import { ListView } from "./screens/ListView.mjs";
|
|
39
|
+
import { MessageView } from "./screens/MessageView.mjs";
|
|
40
|
+
import { AuthFrame, ForgotView, LoginView, ResetView, SetupView } from "./screens/AuthViews.mjs";
|
|
41
|
+
import { LogoutView } from "./screens/LogoutView.mjs";
|
|
42
|
+
import { DashboardView } from "./screens/DashboardView.mjs";
|
|
43
|
+
import { FilesView } from "./screens/FilesView.mjs";
|
|
44
|
+
import { FileView } from "./screens/FileView.mjs";
|
|
45
|
+
export { AccountView, AdminLink, AdminProvider, AdminShell, AuthFrame, Avatar, Button, Checkbox, CheckboxField, ConfirmDialog, CreateView, DashboardView, DateField, DateTimeField, DocumentForm, DocumentView, EmailField, FieldFor, FieldFrame, FieldList, FileField, FileView, FilesView, ForgotView, GlobalView, InfoTip, JsonField, KizunaLogo, ListView, LocalTime, LoginView, Logo, LogoutView, MenuButton, MessageView, NumberField, PasswordField, PasswordInput, RelationshipField, ResetView, ScreenHeader, Select, SelectField, SetupView, SlugField, Status, TextAreaBox, TextBox, TextField, TrailingButton, UrlField, inputComponents, updatedFactsOf, useAdmin };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_Button = require("./Button.cjs");
|
|
4
|
+
const require_AdminProvider = require("../state/AdminProvider.cjs");
|
|
5
|
+
let clsx = require("clsx");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
//#region src/controls/AdminLink.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Renders a link to another admin screen, through the framework's own link.
|
|
10
|
+
*/
|
|
11
|
+
const AdminLink = (props) => {
|
|
12
|
+
const { Link } = require_AdminProvider.useAdmin();
|
|
13
|
+
const { variant, className, ...rest } = props;
|
|
14
|
+
const classes = (0, clsx.clsx)(variant !== void 0 && require_Button.buttonClassOf(variant), className);
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(Link, {
|
|
16
|
+
...rest,
|
|
17
|
+
...classes === "" ? {} : { className: classes }
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
//#endregion
|
|
21
|
+
exports.AdminLink = AdminLink;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
import { AnchorHTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/controls/AdminLink.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Renders a link to another admin screen, through the framework's own link.
|
|
7
|
+
*/
|
|
8
|
+
declare const AdminLink: (props: AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
9
|
+
href: string;
|
|
10
|
+
/**
|
|
11
|
+
* Styles the link as a button of this kind. Leave it out for a plain link.
|
|
12
|
+
*/
|
|
13
|
+
variant?: "primary" | "secondary" | "quiet";
|
|
14
|
+
}) => _$react.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { AdminLink };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
import { AnchorHTMLAttributes } from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/controls/AdminLink.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Renders a link to another admin screen, through the framework's own link.
|
|
7
|
+
*/
|
|
8
|
+
declare const AdminLink: (props: AnchorHTMLAttributes<HTMLAnchorElement> & {
|
|
9
|
+
href: string;
|
|
10
|
+
/**
|
|
11
|
+
* Styles the link as a button of this kind. Leave it out for a plain link.
|
|
12
|
+
*/
|
|
13
|
+
variant?: "primary" | "secondary" | "quiet";
|
|
14
|
+
}) => _$react.JSX.Element;
|
|
15
|
+
//#endregion
|
|
16
|
+
export { AdminLink };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { buttonClassOf } from "./Button.mjs";
|
|
3
|
+
import { useAdmin } from "../state/AdminProvider.mjs";
|
|
4
|
+
import { clsx } from "clsx";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/controls/AdminLink.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Renders a link to another admin screen, through the framework's own link.
|
|
9
|
+
*/
|
|
10
|
+
const AdminLink = (props) => {
|
|
11
|
+
const { Link } = useAdmin();
|
|
12
|
+
const { variant, className, ...rest } = props;
|
|
13
|
+
const classes = clsx(variant !== void 0 && buttonClassOf(variant), className);
|
|
14
|
+
return /* @__PURE__ */ jsx(Link, {
|
|
15
|
+
...rest,
|
|
16
|
+
...classes === "" ? {} : { className: classes }
|
|
17
|
+
});
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { AdminLink };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
const require_definition = require("../state/definition.cjs");
|
|
3
|
+
let clsx = require("clsx");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/controls/Avatar.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Shows the initials of a person's name.
|
|
8
|
+
*/
|
|
9
|
+
const Avatar = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10
|
+
className: (0, clsx.clsx)("kz-avatar", props.small === true && "kz-avatar--small"),
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
children: require_definition.initialsOf(props.name)
|
|
13
|
+
});
|
|
14
|
+
//#endregion
|
|
15
|
+
exports.Avatar = Avatar;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/controls/Avatar.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Shows the initials of a person's name.
|
|
6
|
+
*/
|
|
7
|
+
declare const Avatar: (props: {
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Draws the initials at a smaller size.
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
small?: boolean;
|
|
15
|
+
}) => _$react.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Avatar };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/controls/Avatar.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Shows the initials of a person's name.
|
|
6
|
+
*/
|
|
7
|
+
declare const Avatar: (props: {
|
|
8
|
+
name: string;
|
|
9
|
+
/**
|
|
10
|
+
* Draws the initials at a smaller size.
|
|
11
|
+
*
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
small?: boolean;
|
|
15
|
+
}) => _$react.JSX.Element;
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Avatar };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { initialsOf } from "../state/definition.mjs";
|
|
2
|
+
import { clsx } from "clsx";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/controls/Avatar.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Shows the initials of a person's name.
|
|
7
|
+
*/
|
|
8
|
+
const Avatar = (props) => /* @__PURE__ */ jsx("span", {
|
|
9
|
+
className: clsx("kz-avatar", props.small === true && "kz-avatar--small"),
|
|
10
|
+
"aria-hidden": "true",
|
|
11
|
+
children: initialsOf(props.name)
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { Avatar };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
2
|
+
let clsx = require("clsx");
|
|
3
|
+
let _base_ui_react_button = require("@base-ui/react/button");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
//#region src/controls/Button.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Renders a button in the admin's style. It submits a form only when `type` is `'submit'`.
|
|
8
|
+
*/
|
|
9
|
+
const Button = (props) => {
|
|
10
|
+
const { variant = "primary", className, type = "button", ...rest } = props;
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_button.Button, {
|
|
12
|
+
type,
|
|
13
|
+
className: (0, clsx.clsx)(buttonClassOf(variant), className),
|
|
14
|
+
...rest
|
|
15
|
+
});
|
|
16
|
+
};
|
|
17
|
+
const buttonClassOf = (variant) => (0, clsx.clsx)("kz-button", `kz-button--${variant}`);
|
|
18
|
+
//#endregion
|
|
19
|
+
exports.Button = Button;
|
|
20
|
+
exports.buttonClassOf = buttonClassOf;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
import { Button } from "@base-ui/react/button";
|
|
3
|
+
|
|
4
|
+
//#region src/controls/Button.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Renders a button in the admin's style. It submits a form only when `type` is `'submit'`.
|
|
7
|
+
*/
|
|
8
|
+
declare const Button$1: (props: Omit<Button.Props, "className"> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* How much the button stands out.
|
|
12
|
+
*
|
|
13
|
+
* @default 'primary'
|
|
14
|
+
*/
|
|
15
|
+
variant?: "primary" | "secondary" | "quiet";
|
|
16
|
+
}) => _$react.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Button$1 as Button };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
import { Button } from "@base-ui/react/button";
|
|
3
|
+
|
|
4
|
+
//#region src/controls/Button.d.ts
|
|
5
|
+
/**
|
|
6
|
+
* Renders a button in the admin's style. It submits a form only when `type` is `'submit'`.
|
|
7
|
+
*/
|
|
8
|
+
declare const Button$1: (props: Omit<Button.Props, "className"> & {
|
|
9
|
+
className?: string;
|
|
10
|
+
/**
|
|
11
|
+
* How much the button stands out.
|
|
12
|
+
*
|
|
13
|
+
* @default 'primary'
|
|
14
|
+
*/
|
|
15
|
+
variant?: "primary" | "secondary" | "quiet";
|
|
16
|
+
}) => _$react.JSX.Element;
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Button$1 as Button };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { clsx } from "clsx";
|
|
2
|
+
import { Button } from "@base-ui/react/button";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/controls/Button.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Renders a button in the admin's style. It submits a form only when `type` is `'submit'`.
|
|
7
|
+
*/
|
|
8
|
+
const Button$1 = (props) => {
|
|
9
|
+
const { variant = "primary", className, type = "button", ...rest } = props;
|
|
10
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
11
|
+
type,
|
|
12
|
+
className: clsx(buttonClassOf(variant), className),
|
|
13
|
+
...rest
|
|
14
|
+
});
|
|
15
|
+
};
|
|
16
|
+
const buttonClassOf = (variant) => clsx("kz-button", `kz-button--${variant}`);
|
|
17
|
+
//#endregion
|
|
18
|
+
export { Button$1 as Button, buttonClassOf };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
let react = require("react");
|
|
4
|
+
let _base_ui_react_tooltip = require("@base-ui/react/tooltip");
|
|
5
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
6
|
+
//#region src/controls/ButtonTip.tsx
|
|
7
|
+
const FIELD = ".kz-input, .kz-image, .kz-affix";
|
|
8
|
+
/**
|
|
9
|
+
* Shows a button's name in a tooltip above it, or above the field the button sits in.
|
|
10
|
+
*/
|
|
11
|
+
const ButtonTip = (props) => {
|
|
12
|
+
const trigger = (0, react.useRef)(null);
|
|
13
|
+
const [anchor] = (0, react.useState)(() => ({
|
|
14
|
+
getBoundingClientRect: () => {
|
|
15
|
+
const button = trigger.current;
|
|
16
|
+
if (button === null) return new DOMRect();
|
|
17
|
+
const own = button.getBoundingClientRect();
|
|
18
|
+
const field = button.closest(FIELD)?.getBoundingClientRect() ?? own;
|
|
19
|
+
return new DOMRect(own.x, field.y, own.width, field.height);
|
|
20
|
+
},
|
|
21
|
+
get contextElement() {
|
|
22
|
+
return trigger.current ?? void 0;
|
|
23
|
+
}
|
|
24
|
+
}));
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_tooltip.Tooltip.Root, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Trigger, {
|
|
26
|
+
ref: trigger,
|
|
27
|
+
render: props.children
|
|
28
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Portal, { children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Positioner, {
|
|
29
|
+
className: "kz-layer",
|
|
30
|
+
anchor,
|
|
31
|
+
side: "top",
|
|
32
|
+
sideOffset: 8,
|
|
33
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_tooltip.Tooltip.Popup, {
|
|
34
|
+
className: "kz-tooltip",
|
|
35
|
+
children: props.label
|
|
36
|
+
})
|
|
37
|
+
}) })] });
|
|
38
|
+
};
|
|
39
|
+
//#endregion
|
|
40
|
+
exports.ButtonTip = ButtonTip;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useRef, useState } from "react";
|
|
3
|
+
import { Tooltip } from "@base-ui/react/tooltip";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
//#region src/controls/ButtonTip.tsx
|
|
6
|
+
const FIELD = ".kz-input, .kz-image, .kz-affix";
|
|
7
|
+
/**
|
|
8
|
+
* Shows a button's name in a tooltip above it, or above the field the button sits in.
|
|
9
|
+
*/
|
|
10
|
+
const ButtonTip = (props) => {
|
|
11
|
+
const trigger = useRef(null);
|
|
12
|
+
const [anchor] = useState(() => ({
|
|
13
|
+
getBoundingClientRect: () => {
|
|
14
|
+
const button = trigger.current;
|
|
15
|
+
if (button === null) return new DOMRect();
|
|
16
|
+
const own = button.getBoundingClientRect();
|
|
17
|
+
const field = button.closest(FIELD)?.getBoundingClientRect() ?? own;
|
|
18
|
+
return new DOMRect(own.x, field.y, own.width, field.height);
|
|
19
|
+
},
|
|
20
|
+
get contextElement() {
|
|
21
|
+
return trigger.current ?? void 0;
|
|
22
|
+
}
|
|
23
|
+
}));
|
|
24
|
+
return /* @__PURE__ */ jsxs(Tooltip.Root, { children: [/* @__PURE__ */ jsx(Tooltip.Trigger, {
|
|
25
|
+
ref: trigger,
|
|
26
|
+
render: props.children
|
|
27
|
+
}), /* @__PURE__ */ jsx(Tooltip.Portal, { children: /* @__PURE__ */ jsx(Tooltip.Positioner, {
|
|
28
|
+
className: "kz-layer",
|
|
29
|
+
anchor,
|
|
30
|
+
side: "top",
|
|
31
|
+
sideOffset: 8,
|
|
32
|
+
children: /* @__PURE__ */ jsx(Tooltip.Popup, {
|
|
33
|
+
className: "kz-tooltip",
|
|
34
|
+
children: props.label
|
|
35
|
+
})
|
|
36
|
+
}) })] });
|
|
37
|
+
};
|
|
38
|
+
//#endregion
|
|
39
|
+
export { ButtonTip };
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
require("../_virtual/_rolldown/runtime.cjs");
|
|
3
|
+
const require_icon = require("./icon.cjs");
|
|
4
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
5
|
+
let lucide_react = require("lucide-react");
|
|
6
|
+
let _base_ui_react_checkbox = require("@base-ui/react/checkbox");
|
|
7
|
+
//#region src/controls/Checkbox.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Renders a checkbox. It takes its name from the surrounding `Field.Root`.
|
|
10
|
+
*/
|
|
11
|
+
const Checkbox = (props) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_checkbox.Checkbox.Root, {
|
|
12
|
+
className: "kz-check",
|
|
13
|
+
...props.defaultChecked === void 0 ? {} : { defaultChecked: props.defaultChecked },
|
|
14
|
+
...props.checked === void 0 ? {} : { checked: props.checked },
|
|
15
|
+
...props.onCheckedChange === void 0 ? {} : { onCheckedChange: props.onCheckedChange },
|
|
16
|
+
...props.value === void 0 ? {} : { value: props.value },
|
|
17
|
+
readOnly: props.readOnly === true,
|
|
18
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_checkbox.Checkbox.Indicator, {
|
|
19
|
+
className: "kz-check__indicator",
|
|
20
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(lucide_react.CheckIcon, {
|
|
21
|
+
...require_icon.CHECK_ICON,
|
|
22
|
+
"aria-hidden": true
|
|
23
|
+
})
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
//#endregion
|
|
27
|
+
exports.Checkbox = Checkbox;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/controls/Checkbox.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Renders a checkbox. It takes its name from the surrounding `Field.Root`.
|
|
6
|
+
*/
|
|
7
|
+
declare const Checkbox: (props: {
|
|
8
|
+
defaultChecked?: boolean;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
11
|
+
value?: string;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
}) => _$react.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Checkbox };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as _$react from "react";
|
|
2
|
+
|
|
3
|
+
//#region src/controls/Checkbox.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Renders a checkbox. It takes its name from the surrounding `Field.Root`.
|
|
6
|
+
*/
|
|
7
|
+
declare const Checkbox: (props: {
|
|
8
|
+
defaultChecked?: boolean;
|
|
9
|
+
checked?: boolean;
|
|
10
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
11
|
+
value?: string;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
}) => _$react.JSX.Element;
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Checkbox };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { CHECK_ICON } from "./icon.mjs";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
import { Checkbox } from "@base-ui/react/checkbox";
|
|
6
|
+
//#region src/controls/Checkbox.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Renders a checkbox. It takes its name from the surrounding `Field.Root`.
|
|
9
|
+
*/
|
|
10
|
+
const Checkbox$1 = (props) => /* @__PURE__ */ jsx(Checkbox.Root, {
|
|
11
|
+
className: "kz-check",
|
|
12
|
+
...props.defaultChecked === void 0 ? {} : { defaultChecked: props.defaultChecked },
|
|
13
|
+
...props.checked === void 0 ? {} : { checked: props.checked },
|
|
14
|
+
...props.onCheckedChange === void 0 ? {} : { onCheckedChange: props.onCheckedChange },
|
|
15
|
+
...props.value === void 0 ? {} : { value: props.value },
|
|
16
|
+
readOnly: props.readOnly === true,
|
|
17
|
+
children: /* @__PURE__ */ jsx(Checkbox.Indicator, {
|
|
18
|
+
className: "kz-check__indicator",
|
|
19
|
+
children: /* @__PURE__ */ jsx(CheckIcon, {
|
|
20
|
+
...CHECK_ICON,
|
|
21
|
+
"aria-hidden": true
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
//#endregion
|
|
26
|
+
export { Checkbox$1 as Checkbox };
|