robodev 0.12.0 → 0.14.0
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/package.json +1 -1
- package/src/emit-starter.test.ts +14 -0
- package/src/index.ts +54 -45
- package/src/parse-create-args.test.ts +26 -0
- package/src/parse-create-args.ts +63 -0
- package/templates/auth-chat/.config/local.spa.template.yml +27 -0
- package/templates/auth-chat/.oxlint-base.json +29 -0
- package/templates/auth-chat/.oxlintrc.json +78 -0
- package/templates/auth-chat/.rulesync/rules/frontend-api-boundary.md +36 -0
- package/templates/auth-chat/.rulesync/rules/frontend-component-structure.md +38 -0
- package/templates/auth-chat/.rulesync/rules/frontend-forms.md +32 -0
- package/templates/auth-chat/.rulesync/rules/frontend-notifications.md +24 -0
- package/templates/auth-chat/.rulesync/rules/frontend-povio-components.md +42 -0
- package/templates/auth-chat/.rulesync/rules/frontend-povio-ui.md +45 -0
- package/templates/auth-chat/.rulesync/rules/frontend-query-autocomplete.md +29 -0
- package/templates/auth-chat/.rulesync/rules/frontend-tables-and-lists.md +34 -0
- package/templates/auth-chat/.rulesync/rules/frontend-translations.md +26 -0
- package/templates/auth-chat/.rulesync/rules/project-overview.md +32 -0
- package/templates/auth-chat/.rulesync/rules/robodev-api.md +30 -0
- package/templates/auth-chat/.rulesync/rules/robodev-auth.md +40 -0
- package/templates/auth-chat/.rulesync/rules/robodev-database.md +22 -0
- package/templates/auth-chat/.rulesync/rules/role-based-app-structure.md +36 -0
- package/templates/auth-chat/.rulesync/skills/media-feature/SKILL.md +21 -0
- package/templates/auth-chat/.rulesync/skills/povio-ui-styling/SKILL.md +208 -0
- package/templates/auth-chat/.rulesync/skills/povio-ui-styling/agents/openai.yaml +4 -0
- package/templates/auth-chat/.rulesync/skills/robodev-api-route/SKILL.md +13 -0
- package/templates/auth-chat/.rulesync/skills/robodev-table/SKILL.md +12 -0
- package/templates/auth-chat/README.md +26 -7
- package/templates/auth-chat/api/invite.ts +43 -0
- package/templates/auth-chat/apps/fe/index.html +24 -0
- package/templates/auth-chat/apps/fe/openapi-codegen.config.ts +37 -0
- package/templates/auth-chat/apps/fe/package.json +82 -0
- package/templates/auth-chat/apps/fe/public/apple-touch-icon.png +0 -0
- package/templates/auth-chat/apps/fe/public/favicon-96x96.png +0 -0
- package/templates/auth-chat/apps/fe/public/favicon.ico +0 -0
- package/templates/auth-chat/apps/fe/public/favicon.svg +3 -0
- package/templates/auth-chat/apps/fe/public/site.webmanifest +21 -0
- package/templates/auth-chat/apps/fe/public/web-app-manifest-192x192.png +0 -0
- package/templates/auth-chat/apps/fe/public/web-app-manifest-512x512.png +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Bold.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Medium.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Regular.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/fonts/GeneralSans-Semibold.otf +0 -0
- package/templates/auth-chat/apps/fe/src/assets/locales/en/translation.json +202 -0
- package/templates/auth-chat/apps/fe/src/assets/locales/sl/translation.json +202 -0
- package/templates/auth-chat/apps/fe/src/clients/app-rest-client.ts +15 -0
- package/templates/auth-chat/apps/fe/src/clients/auth-token-store.ts +101 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/app-error-handler.ts +31 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/authorization-header.interceptor.ts +15 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/refresh-token.interceptor.ts +37 -0
- package/templates/auth-chat/apps/fe/src/clients/rest/interceptors/response.interceptor.ts +17 -0
- package/templates/auth-chat/apps/fe/src/components/404.tsx +18 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/AuthBrandPanel.tsx +60 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/AuthLayout.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/LoginPage.tsx +111 -0
- package/templates/auth-chat/apps/fe/src/components/features/auth/RegisterPage.tsx +143 -0
- package/templates/auth-chat/apps/fe/src/components/features/chat/ChatPage.tsx +105 -0
- package/templates/auth-chat/apps/fe/src/components/features/chat/InviteForm.tsx +84 -0
- package/templates/auth-chat/apps/fe/src/components/features/profile/ProfilePage.tsx +96 -0
- package/templates/auth-chat/apps/fe/src/components/googleAnalytics/GoogleAnalytics.tsx +35 -0
- package/templates/auth-chat/apps/fe/src/components/layout/AppLayout.tsx +19 -0
- package/templates/auth-chat/apps/fe/src/components/layout/app-header/AppHeader.tsx +91 -0
- package/templates/auth-chat/apps/fe/src/components/layout/app-header/MobileNavigation.tsx +51 -0
- package/templates/auth-chat/apps/fe/src/components/layout/app-header/NavLink.tsx +29 -0
- package/templates/auth-chat/apps/fe/src/components/shared/branding/BrandLogo.tsx +13 -0
- package/templates/auth-chat/apps/fe/src/components/shared/error/ErrorFallback.tsx +43 -0
- package/templates/auth-chat/apps/fe/src/components/shared/error/ErrorText.tsx +20 -0
- package/templates/auth-chat/apps/fe/src/components/shared/error/NotFound.tsx +36 -0
- package/templates/auth-chat/apps/fe/src/components/shared/forms/RequiredLabel.tsx +21 -0
- package/templates/auth-chat/apps/fe/src/components/shared/forms/RowInputWrapper.tsx +50 -0
- package/templates/auth-chat/apps/fe/src/components/shared/head/AppHead.tsx +32 -0
- package/templates/auth-chat/apps/fe/src/components/shared/head/DefaultAppHead.tsx +34 -0
- package/templates/auth-chat/apps/fe/src/components/shared/layout/LoadingState.tsx +9 -0
- package/templates/auth-chat/apps/fe/src/components/shared/layout/ThinPageWrapper.tsx +5 -0
- package/templates/auth-chat/apps/fe/src/components/shared/page/PageHeader.tsx +69 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/Card.tsx +60 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/GoogleLoginButton.tsx +19 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/RequiredLabel.tsx +22 -0
- package/templates/auth-chat/apps/fe/src/components/shared/ui/TableActions.tsx +22 -0
- package/templates/auth-chat/apps/fe/src/config/app.config.ts +35 -0
- package/templates/auth-chat/apps/fe/src/config/i18n.ts +43 -0
- package/templates/auth-chat/apps/fe/src/config/inits/a11y.ts +14 -0
- package/templates/auth-chat/apps/fe/src/config/inits/logger.ts +7 -0
- package/templates/auth-chat/apps/fe/src/config/inits/sentry.ts +21 -0
- package/templates/auth-chat/apps/fe/src/config/jwt.config.ts +2 -0
- package/templates/auth-chat/apps/fe/src/config/query.config.ts +20 -0
- package/templates/auth-chat/apps/fe/src/hooks/useAuth.ts +5 -0
- package/templates/auth-chat/apps/fe/src/main.tsx +52 -0
- package/templates/auth-chat/apps/fe/src/pages/(guest)/login.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(guest)/register.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(guest)/route.tsx +18 -0
- package/templates/auth-chat/apps/fe/src/pages/(private)/index.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(private)/profile.tsx +23 -0
- package/templates/auth-chat/apps/fe/src/pages/(private)/route.tsx +18 -0
- package/templates/auth-chat/apps/fe/src/pages/(public)/auth.tsx +37 -0
- package/templates/auth-chat/apps/fe/src/pages/(public)/route.tsx +9 -0
- package/templates/auth-chat/apps/fe/src/pages/__root.tsx +164 -0
- package/templates/auth-chat/apps/fe/src/providers/AppErrorBoundary.tsx +10 -0
- package/templates/auth-chat/apps/fe/src/providers/OpenApiRuntimeProvider.tsx +31 -0
- package/templates/auth-chat/apps/fe/src/providers/index.tsx +44 -0
- package/templates/auth-chat/apps/fe/src/providers/jwt.provider.tsx +95 -0
- package/templates/auth-chat/apps/fe/src/routeTree.gen.ts +225 -0
- package/templates/auth-chat/apps/fe/src/styles/base.css +103 -0
- package/templates/auth-chat/apps/fe/src/styles/fonts/fonts.tsx +10 -0
- package/templates/auth-chat/apps/fe/src/styles/fonts/general-sans.css +31 -0
- package/templates/auth-chat/apps/fe/src/styles/globals.css +28 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/button.override.ts +536 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/checkbox.override.ts +71 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/input.override.ts +252 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/label.override.ts +91 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/modal.override.ts +57 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/radio.override.ts +46 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/table.override.ts +104 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/tag.override.ts +66 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/defaults/typography.override.ts +115 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/outline.clsx.ts +10 -0
- package/templates/auth-chat/apps/fe/src/styles/overrides/uiOverrides.override.ts +60 -0
- package/templates/auth-chat/apps/fe/src/styles/theme.css +2177 -0
- package/templates/auth-chat/apps/fe/src/types/i18next.d.ts +12 -0
- package/templates/auth-chat/apps/fe/src/types/table.d.ts +17 -0
- package/templates/auth-chat/apps/fe/src/types/ui.d.ts +26 -0
- package/templates/auth-chat/apps/fe/src/types/vite-env.d.ts +20 -0
- package/templates/auth-chat/apps/fe/src/utils/date.utils.ts +17 -0
- package/templates/auth-chat/apps/fe/src/utils/number.utils.ts +12 -0
- package/templates/auth-chat/apps/fe/src/utils/string.utils.ts +5 -0
- package/templates/auth-chat/apps/fe/src/vite-env.d.ts +1 -0
- package/templates/auth-chat/apps/fe/tsconfig.app.json +32 -0
- package/templates/auth-chat/apps/fe/tsconfig.json +9 -0
- package/templates/auth-chat/apps/fe/tsconfig.node.json +31 -0
- package/templates/auth-chat/apps/fe/vite.config.ts +94 -0
- package/templates/auth-chat/openapi.json +1016 -0
- package/templates/auth-chat/oxfmt.config.js +23 -0
- package/templates/auth-chat/package.json +6 -13
- package/templates/auth-chat/rulesync.jsonc +18 -0
- package/templates/auth-chat/tsconfig.json +2 -4
- package/templates/backend/README.md +2 -2
- package/templates/backend/api/_lib.ts +359 -0
- package/templates/backend/api/aliens/labels.ts +19 -0
- package/templates/backend/api/files/presigned-url.ts +48 -0
- package/templates/backend/api/files/upload.ts +29 -0
- package/templates/backend/api/planets/[id]/like.ts +36 -0
- package/templates/backend/api/planets/[id].ts +56 -13
- package/templates/backend/api/planets/paginate.ts +36 -0
- package/templates/backend/api/planets.ts +52 -44
- package/templates/backend/database.ts +33 -13
- package/templates/backend/package.json +1 -1
- package/templates/catalog.json +2 -2
- package/templates/empty/package.json +1 -1
- package/templates/space/package.json +1 -1
- package/templates/auth-chat/index.html +0 -201
- package/templates/auth-chat/src/main.tsx +0 -282
- package/templates/auth-chat/vite.config.ts +0 -7
- package/templates/backend/api/health.ts +0 -7
- package/templates/backend/api/launch.ts +0 -29
- package/templates/backend/api/me.ts +0 -14
- package/templates/backend/api/motto.ts +0 -9
- package/templates/backend/api/rockets.ts +0 -43
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { type CheckboxVariantProps, compoundMapper, UIOverrides, type TypographyVariantProps } from "@povio/ui";
|
|
2
|
+
|
|
3
|
+
import { uiGroupOutlineClass } from "@/styles/overrides/outline.clsx";
|
|
4
|
+
|
|
5
|
+
export const checkboxOverride = UIOverrides.defineOverride("checkbox.cva", {
|
|
6
|
+
mode: "overrideCva",
|
|
7
|
+
base: ["flex items-center justify-center border-2", "relative size-4 shrink-0 rounded-xs p-1", uiGroupOutlineClass],
|
|
8
|
+
config: {
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: [
|
|
12
|
+
"m-1 border-interactive-outlined-secondary-on-idle",
|
|
13
|
+
"text-interactive-contained-primary-on-idle",
|
|
14
|
+
"group-hover:text-interactive-contained-primary-on-hover",
|
|
15
|
+
"group-pressed:text-interactive-contained-primary-on-pressed",
|
|
16
|
+
"group-disabled:text-interactive-contained-primary-on-disabled",
|
|
17
|
+
"group-disabled:border-interactive-outlined-secondary-on-disabled",
|
|
18
|
+
"group-hover:border-interactive-outlined-secondary-on-hover",
|
|
19
|
+
"group-pressed:border-interactive-outlined-secondary-on-pressed",
|
|
20
|
+
"group-selected:border-interactive-contained-primary-idle",
|
|
21
|
+
"group-selected:bg-interactive-contained-primary-idle",
|
|
22
|
+
"group-selected:group-hover:bg-interactive-contained-primary-hover",
|
|
23
|
+
"group-selected:group-hover:border-interactive-contained-primary-hover",
|
|
24
|
+
"group-selected:group-pressed:bg-interactive-contained-primary-pressed",
|
|
25
|
+
"group-selected:group-pressed:border-interactive-contained-primary-pressed",
|
|
26
|
+
"group-selected:group-disabled:bg-interactive-contained-primary-disabled",
|
|
27
|
+
"group-selected:group-disabled:border-interactive-contained-primary-disabled",
|
|
28
|
+
"group-indeterminate:border-interactive-contained-primary-idle",
|
|
29
|
+
"group-indeterminate:bg-interactive-contained-primary-idle",
|
|
30
|
+
"group-indeterminate:group-hover:bg-interactive-contained-primary-hover",
|
|
31
|
+
"group-indeterminate:group-hover:border-interactive-contained-primary-hover",
|
|
32
|
+
"group-indeterminate:group-pressed:bg-interactive-contained-primary-pressed",
|
|
33
|
+
"group-indeterminate:group-pressed:border-interactive-contained-primary-pressed",
|
|
34
|
+
"group-indeterminate:group-disabled:bg-interactive-contained-primary-disabled",
|
|
35
|
+
"group-indeterminate:group-disabled:border-interactive-contained-primary-disabled",
|
|
36
|
+
"group-invalid:border-interactive-outlined-error-on-idle",
|
|
37
|
+
"group-focus-visible:outline-interactive-contained-primary-focus",
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
defaultVariants: {
|
|
42
|
+
variant: "default",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
export const checkboxIndicatorClass = "group flex items-center gap-2";
|
|
48
|
+
|
|
49
|
+
export const checkboxTypography = compoundMapper<TypographyVariantProps, CheckboxVariantProps>({
|
|
50
|
+
default: {
|
|
51
|
+
size: "label-1",
|
|
52
|
+
sizeMobile: "label-1",
|
|
53
|
+
variant: "default",
|
|
54
|
+
},
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
export const checkboxIconOverride = UIOverrides.defineOverride("checkbox.iconCva", {
|
|
58
|
+
mode: "overrideCva",
|
|
59
|
+
base: ["absolute hidden size-3"],
|
|
60
|
+
config: {
|
|
61
|
+
variants: {
|
|
62
|
+
iconVariant: {
|
|
63
|
+
selected: ["group-selected:block"],
|
|
64
|
+
indeterminate: ["group-indeterminate:block"],
|
|
65
|
+
},
|
|
66
|
+
},
|
|
67
|
+
defaultVariants: {
|
|
68
|
+
iconVariant: "selected",
|
|
69
|
+
},
|
|
70
|
+
},
|
|
71
|
+
});
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
import { UIOverrides, uiOutlineClass } from "@povio/ui";
|
|
2
|
+
|
|
3
|
+
export const inputBaseOverride = UIOverrides.defineOverride("input.baseCva", {
|
|
4
|
+
mode: "overrideCva",
|
|
5
|
+
base: [uiOutlineClass, "flex w-full not-[textarea]:truncate"],
|
|
6
|
+
config: {
|
|
7
|
+
variants: {
|
|
8
|
+
variant: {
|
|
9
|
+
outlined: "",
|
|
10
|
+
filled: "",
|
|
11
|
+
},
|
|
12
|
+
as: {
|
|
13
|
+
default: "rounded-input-rounding-default",
|
|
14
|
+
floating: "rounded-input-rounding-default",
|
|
15
|
+
filter: "rounded-input-rounding-default",
|
|
16
|
+
inline: [
|
|
17
|
+
"h-full",
|
|
18
|
+
"border-transparent border-b-0 bg-transparent text-text-default-1",
|
|
19
|
+
"hover:border-input-outlined-outline-hover",
|
|
20
|
+
"focus-within:border-input-outlined-outline-active",
|
|
21
|
+
"invalid:border-input-outlined-outline-error",
|
|
22
|
+
"has-invalid:border-input-outlined-outline-error",
|
|
23
|
+
"disabled:hover:border-transparent",
|
|
24
|
+
"has-disabled:hover:border-transparent",
|
|
25
|
+
],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
compoundVariants: [
|
|
29
|
+
{
|
|
30
|
+
variant: "outlined",
|
|
31
|
+
as: "default",
|
|
32
|
+
className: [
|
|
33
|
+
"border border-input-outlined-outline-idle border-solid bg-input-outlined-idle text-text-default-1",
|
|
34
|
+
"hover:border-input-outlined-outline-hover hover:border-solid hover:bg-input-outlined-hover hover:text-text-default-1",
|
|
35
|
+
"focus-within:border-input-outlined-outline-active focus-within:border-solid focus-within:bg-input-outlined-active focus-within:text-text-default-1",
|
|
36
|
+
"invalid:border-input-outlined-outline-error invalid:border-solid invalid:bg-input-outlined-error invalid:text-text-default-1",
|
|
37
|
+
"has-invalid:border-input-outlined-outline-error has-invalid:border-solid has-invalid:bg-input-outlined-error has-invalid:text-text-default-1",
|
|
38
|
+
"disabled:border-input-outlined-outline-disabled disabled:border-solid disabled:bg-input-outlined-disabled disabled:text-text-default-3",
|
|
39
|
+
"has-disabled:border-input-outlined-outline-disabled has-disabled:border-solid has-disabled:bg-input-outlined-disabled has-disabled:text-text-default-3",
|
|
40
|
+
"disabled:hover:border-input-outlined-outline-disabled disabled:hover:bg-input-outlined-disabled disabled:hover:text-text-default-3",
|
|
41
|
+
"has-disabled:hover:border-input-outlined-outline-disabled has-disabled:hover:bg-input-outlined-disabled has-disabled:hover:text-text-default-3",
|
|
42
|
+
"[&_input]:placeholder:text-text-default-3",
|
|
43
|
+
"disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
44
|
+
"has-disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
45
|
+
"focus-visible:outline-interactive-contained-primary-focus",
|
|
46
|
+
"has-focus-visible:outline-interactive-contained-primary-focus",
|
|
47
|
+
],
|
|
48
|
+
},
|
|
49
|
+
{
|
|
50
|
+
variant: "filled",
|
|
51
|
+
as: "default",
|
|
52
|
+
className: [
|
|
53
|
+
"border border-transparent border-solid bg-input-filled-idle text-text-default-1",
|
|
54
|
+
"hover:border-input-filled-outline-hover hover:border-solid hover:bg-input-filled-hover hover:text-text-default-1",
|
|
55
|
+
"focus-within:border-input-filled-outline-active focus-within:border-solid focus-within:bg-input-filled-active focus-within:text-text-default-1",
|
|
56
|
+
"invalid:border-input-filled-outline-error invalid:border-solid invalid:bg-input-filled-error invalid:text-text-default-1",
|
|
57
|
+
"has-invalid:border-input-filled-outline-error has-invalid:border-solid has-invalid:bg-input-filled-error has-invalid:text-text-default-1",
|
|
58
|
+
"disabled:bg-input-filled-disabled disabled:text-text-default-3",
|
|
59
|
+
"has-disabled:bg-input-filled-disabled has-disabled:text-text-default-3",
|
|
60
|
+
"disabled:hover:border-transparent disabled:hover:bg-input-filled-disabled disabled:hover:text-text-default-3",
|
|
61
|
+
"has-disabled:hover:border-transparent has-disabled:hover:bg-input-filled-disabled has-disabled:hover:text-text-default-3",
|
|
62
|
+
"[&_input]:placeholder:text-text-default-3",
|
|
63
|
+
"disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
64
|
+
"has-disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
65
|
+
"focus-visible:outline-interactive-contained-primary-focus",
|
|
66
|
+
"has-focus-visible:outline-interactive-contained-primary-focus",
|
|
67
|
+
],
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
variant: "outlined",
|
|
71
|
+
as: "floating",
|
|
72
|
+
className: [
|
|
73
|
+
"border border-input-outlined-outline-idle border-solid bg-input-outlined-idle text-text-default-1",
|
|
74
|
+
"hover:border-input-outlined-outline-hover hover:border-solid hover:bg-input-outlined-hover hover:text-text-default-1",
|
|
75
|
+
"focus-within:border-input-outlined-outline-active focus-within:border-solid focus-within:bg-input-outlined-active focus-within:text-text-default-1",
|
|
76
|
+
"invalid:border-input-outlined-outline-error invalid:border-solid invalid:bg-input-outlined-error invalid:text-text-default-1",
|
|
77
|
+
"has-invalid:border-input-outlined-outline-error has-invalid:border-solid has-invalid:bg-input-outlined-error has-invalid:text-text-default-1",
|
|
78
|
+
"disabled:border-input-outlined-outline-disabled disabled:border-solid disabled:bg-input-outlined-disabled disabled:text-text-default-3",
|
|
79
|
+
"has-disabled:border-input-outlined-outline-disabled has-disabled:border-solid has-disabled:bg-input-outlined-disabled has-disabled:text-text-default-3",
|
|
80
|
+
"disabled:hover:border-input-outlined-outline-disabled disabled:hover:bg-input-outlined-disabled disabled:hover:text-text-default-3",
|
|
81
|
+
"has-disabled:hover:border-input-outlined-outline-disabled has-disabled:hover:bg-input-outlined-disabled has-disabled:hover:text-text-default-3",
|
|
82
|
+
"[&_input]:placeholder:text-text-default-3",
|
|
83
|
+
"disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
84
|
+
"has-disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
85
|
+
"focus-visible:outline-interactive-contained-primary-focus",
|
|
86
|
+
"has-focus-visible:outline-interactive-contained-primary-focus",
|
|
87
|
+
],
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
variant: "filled",
|
|
91
|
+
as: "floating",
|
|
92
|
+
className: [
|
|
93
|
+
"border border-transparent border-solid bg-input-filled-idle text-text-default-1",
|
|
94
|
+
"hover:border-input-filled-outline-hover hover:border-solid hover:bg-input-filled-hover hover:text-text-default-1",
|
|
95
|
+
"focus-within:border-input-outlined-outline-active focus-within:border-solid focus-within:bg-input-outlined-idle focus-within:text-text-default-1",
|
|
96
|
+
"invalid:border-input-filled-outline-error invalid:border-solid invalid:bg-input-filled-error invalid:text-text-default-1",
|
|
97
|
+
"has-invalid:border-input-filled-outline-error has-invalid:border-solid has-invalid:bg-input-filled-error has-invalid:text-text-default-1",
|
|
98
|
+
"disabled:bg-input-filled-disabled disabled:text-text-default-3",
|
|
99
|
+
"has-disabled:bg-input-filled-disabled has-disabled:text-text-default-3",
|
|
100
|
+
"disabled:hover:border-transparent disabled:hover:bg-input-filled-disabled disabled:hover:text-text-default-3",
|
|
101
|
+
"has-disabled:hover:border-transparent has-disabled:hover:bg-input-filled-disabled has-disabled:hover:text-text-default-3",
|
|
102
|
+
"[&_input]:placeholder:text-text-default-3",
|
|
103
|
+
"disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
104
|
+
"has-disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
105
|
+
"focus-visible:outline-interactive-contained-primary-focus",
|
|
106
|
+
"has-focus-visible:outline-interactive-contained-primary-focus",
|
|
107
|
+
],
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
variant: "outlined",
|
|
111
|
+
as: "filter",
|
|
112
|
+
className: [
|
|
113
|
+
"border border-input-outlined-outline-idle border-solid bg-input-outlined-idle text-text-default-1",
|
|
114
|
+
"hover:border-input-outlined-outline-hover hover:border-solid hover:bg-input-outlined-hover hover:text-text-default-1",
|
|
115
|
+
"focus-within:border-input-outlined-outline-active focus-within:border-solid focus-within:bg-input-outlined-active focus-within:text-text-default-1",
|
|
116
|
+
"invalid:border-input-outlined-outline-error invalid:border-solid invalid:bg-input-outlined-error invalid:text-text-default-1",
|
|
117
|
+
"has-invalid:border-input-outlined-outline-error has-invalid:border-solid has-invalid:bg-input-outlined-error has-invalid:text-text-default-1",
|
|
118
|
+
"disabled:border-input-outlined-outline-disabled disabled:border-solid disabled:bg-input-outlined-disabled disabled:text-text-default-3",
|
|
119
|
+
"has-disabled:border-input-outlined-outline-disabled has-disabled:border-solid has-disabled:bg-input-outlined-disabled has-disabled:text-text-default-3",
|
|
120
|
+
"disabled:hover:border-input-outlined-outline-disabled disabled:hover:bg-input-outlined-disabled disabled:hover:text-text-default-3",
|
|
121
|
+
"has-disabled:hover:border-input-outlined-outline-disabled has-disabled:hover:bg-input-outlined-disabled has-disabled:hover:text-text-default-3",
|
|
122
|
+
"[&_input]:placeholder:text-text-default-3",
|
|
123
|
+
"disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
124
|
+
"has-disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
125
|
+
"focus-visible:outline-interactive-contained-primary-focus",
|
|
126
|
+
"has-focus-visible:outline-interactive-contained-primary-focus",
|
|
127
|
+
],
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
variant: "filled",
|
|
131
|
+
as: "filter",
|
|
132
|
+
className: [
|
|
133
|
+
"border border-transparent border-solid bg-input-filled-idle text-text-default-1",
|
|
134
|
+
"hover:border-input-filled-outline-hover hover:border-solid hover:bg-input-filled-hover hover:text-text-default-1",
|
|
135
|
+
"focus-within:border-input-filled-outline-active focus-within:border-solid focus-within:bg-input-filled-active focus-within:text-text-default-1",
|
|
136
|
+
"has-invalid:border-input-filled-outline-error has-invalid:border-solid has-invalid:bg-input-filled-error has-invalid:text-text-default-1",
|
|
137
|
+
"invalid:border-input-filled-outline-error invalid:border-solid invalid:bg-input-filled-error invalid:text-text-default-1",
|
|
138
|
+
"disabled:bg-input-filled-disabled disabled:text-text-default-3",
|
|
139
|
+
"has-disabled:bg-input-filled-disabled has-disabled:text-text-default-3",
|
|
140
|
+
"disabled:hover:border-transparent disabled:hover:bg-input-filled-disabled disabled:hover:text-text-default-3",
|
|
141
|
+
"has-disabled:hover:border-transparent has-disabled:hover:bg-input-filled-disabled has-disabled:hover:text-text-default-3",
|
|
142
|
+
"[&_input]:placeholder:text-text-default-3",
|
|
143
|
+
"disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
144
|
+
"has-disabled:placeholder:text-interactive-text-secondary-disabled",
|
|
145
|
+
"focus-visible:outline-interactive-contained-primary-focus",
|
|
146
|
+
"has-focus-visible:outline-interactive-contained-primary-focus",
|
|
147
|
+
],
|
|
148
|
+
},
|
|
149
|
+
],
|
|
150
|
+
defaultVariants: {
|
|
151
|
+
variant: "outlined",
|
|
152
|
+
as: "default",
|
|
153
|
+
},
|
|
154
|
+
},
|
|
155
|
+
});
|
|
156
|
+
|
|
157
|
+
export const inputSizeOverride = UIOverrides.defineOverride("input.sizeCva", {
|
|
158
|
+
mode: "overrideCva",
|
|
159
|
+
base: [""],
|
|
160
|
+
config: {
|
|
161
|
+
compoundVariants: [
|
|
162
|
+
{
|
|
163
|
+
as: ["default", "filter", "inline"],
|
|
164
|
+
className: "px-input-side-xs py-input-height-xs text-label-2! [&>button>p]:text-label-2! ",
|
|
165
|
+
size: "extra-small",
|
|
166
|
+
},
|
|
167
|
+
{
|
|
168
|
+
as: ["default", "filter", "inline"],
|
|
169
|
+
className: "px-input-side-s py-input-height-s",
|
|
170
|
+
size: "small",
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
as: ["default", "filter", "inline"],
|
|
174
|
+
className: "px-input-side-m py-input-height-m",
|
|
175
|
+
size: "default",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
as: ["default", "filter", "inline"],
|
|
179
|
+
className: "px-input-side-l py-input-height-l",
|
|
180
|
+
size: "large",
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
as: ["filter"],
|
|
184
|
+
className:
|
|
185
|
+
"text-label-2! [&_[data-type=select-trigger]]:text-left [&>button]:text-left [&>button>p]:text-left [&>label]:text-text-default-2! pr-0",
|
|
186
|
+
size: "extra-small",
|
|
187
|
+
},
|
|
188
|
+
],
|
|
189
|
+
defaultVariants: {
|
|
190
|
+
as: "default",
|
|
191
|
+
size: "default",
|
|
192
|
+
},
|
|
193
|
+
variants: {
|
|
194
|
+
as: {
|
|
195
|
+
default: "",
|
|
196
|
+
filter: "",
|
|
197
|
+
floating: [
|
|
198
|
+
"px-input-side-m",
|
|
199
|
+
"py-floating-label-input-height-empty",
|
|
200
|
+
|
|
201
|
+
// "input-filled" selector defined in tw-ui-plugin.ts in @povio/ui as a Tailwind Plugin
|
|
202
|
+
"input-filled:pb-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-bottom))]",
|
|
203
|
+
"input-filled:pt-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top)+var(--text-label-3--line-height)*var(--text-label-3))]",
|
|
204
|
+
],
|
|
205
|
+
inline: "",
|
|
206
|
+
},
|
|
207
|
+
size: {
|
|
208
|
+
default: "text-label-1",
|
|
209
|
+
"extra-small": "text-label-1",
|
|
210
|
+
large: "text-label-1",
|
|
211
|
+
small: "text-label-1",
|
|
212
|
+
},
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
});
|
|
216
|
+
|
|
217
|
+
export const inputSideOverride = UIOverrides.defineOverride("input.sideCva", {
|
|
218
|
+
mode: "overrideCva",
|
|
219
|
+
base: [""],
|
|
220
|
+
config: {
|
|
221
|
+
compoundVariants: [
|
|
222
|
+
{ className: "left-input-side-xs", size: "extra-small", type: "left" },
|
|
223
|
+
{ className: "right-input-side-xs", size: "extra-small", type: "right" },
|
|
224
|
+
{ className: "--spacing-input-side-xs", size: "extra-small", type: "var" },
|
|
225
|
+
{ className: "left-input-side-s", size: "small", type: "left" },
|
|
226
|
+
{ className: "right-input-side-s", size: "small", type: "right" },
|
|
227
|
+
{ className: "--spacing-input-side-s", size: "small", type: "var" },
|
|
228
|
+
{ className: "left-input-side-m", size: "default", type: "left" },
|
|
229
|
+
{ className: "right-input-side-m", size: "default", type: "right" },
|
|
230
|
+
{ className: "--spacing-input-side-m", size: "default", type: "var" },
|
|
231
|
+
{ className: "left-input-side-l", size: "large", type: "left" },
|
|
232
|
+
{ className: "right-input-side-l", size: "large", type: "right" },
|
|
233
|
+
{ className: "--spacing-input-side-l", size: "large", type: "var" },
|
|
234
|
+
],
|
|
235
|
+
defaultVariants: {
|
|
236
|
+
size: "default",
|
|
237
|
+
},
|
|
238
|
+
variants: {
|
|
239
|
+
size: {
|
|
240
|
+
default: "",
|
|
241
|
+
"extra-small": "",
|
|
242
|
+
large: "",
|
|
243
|
+
small: "",
|
|
244
|
+
},
|
|
245
|
+
type: {
|
|
246
|
+
left: "",
|
|
247
|
+
right: "",
|
|
248
|
+
var: "",
|
|
249
|
+
},
|
|
250
|
+
},
|
|
251
|
+
},
|
|
252
|
+
});
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { type TypographyVariantProps, UIOverrides, compoundMapper, type labelDefinition } from "@povio/ui";
|
|
2
|
+
|
|
3
|
+
export const labelBaseOverride = UIOverrides.defineOverride("label.cva", {
|
|
4
|
+
mode: "overrideCva",
|
|
5
|
+
base: [""],
|
|
6
|
+
config: {
|
|
7
|
+
defaultVariants: {
|
|
8
|
+
as: "default",
|
|
9
|
+
},
|
|
10
|
+
variants: {
|
|
11
|
+
as: {
|
|
12
|
+
default: ["flex items-start gap-1 text-text-default-1"],
|
|
13
|
+
filter: ["text-text-default-1"],
|
|
14
|
+
floating: [
|
|
15
|
+
"pointer-events-none",
|
|
16
|
+
"absolute transition-all duration-75",
|
|
17
|
+
"top-1/2 -translate-y-1/2",
|
|
18
|
+
|
|
19
|
+
"text-text-default-3",
|
|
20
|
+
|
|
21
|
+
// "input-disabled" selector defined in tw-ui-plugin.ts in @povio/ui as a Tailwind Plugin
|
|
22
|
+
"input-disabled:text-interactive-text-secondary-disabled!",
|
|
23
|
+
|
|
24
|
+
// "input-filled" selector defined in tw-ui-plugin.ts in @povio/ui as a Tailwind Plugin
|
|
25
|
+
"input-filled:top-[calc(var(--spacing-floating-label-input-height-filled)+var(--spacing-floating-label-input-offset-top))]",
|
|
26
|
+
"input-filled:translate-y-0",
|
|
27
|
+
"input-filled:text-text-default-1",
|
|
28
|
+
"input-filled:font-semibold!",
|
|
29
|
+
"input-filled:text-label-3!",
|
|
30
|
+
|
|
31
|
+
// TextArea
|
|
32
|
+
"group-data-[text-area]/text-area:top-floating-label-input-height-empty group-data-[text-area]/text-area:translate-y-0",
|
|
33
|
+
"group-has-[textarea:not(:placeholder-shown)]/text-area:hidden",
|
|
34
|
+
|
|
35
|
+
// TextEditor
|
|
36
|
+
"group-data-[text-editor]/text-editor:top-floating-label-input-height-empty group-data-[text-editor]/text-editor:left-input-side-default group-data-[text-editor]/text-editor:translate-y-0",
|
|
37
|
+
"group-data-[is-filled=true]/text-editor:hidden",
|
|
38
|
+
],
|
|
39
|
+
inline: ["flex items-start gap-1 text-text-default-1"],
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
});
|
|
44
|
+
|
|
45
|
+
export type LabelConfig = NonNullable<typeof labelDefinition.config>;
|
|
46
|
+
export interface LabelBaseProps extends UIOverrides.VariantProps<LabelConfig> {}
|
|
47
|
+
|
|
48
|
+
export const labelTypography = compoundMapper<TypographyVariantProps, LabelBaseProps>({
|
|
49
|
+
compoundVariants: [
|
|
50
|
+
{
|
|
51
|
+
as: "default",
|
|
52
|
+
value: {
|
|
53
|
+
size: "label-2",
|
|
54
|
+
sizeMobile: "label-2",
|
|
55
|
+
variant: "prominent-1",
|
|
56
|
+
},
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
as: "filter",
|
|
60
|
+
value: {
|
|
61
|
+
size: "label-2",
|
|
62
|
+
sizeMobile: "label-2",
|
|
63
|
+
variant: "default",
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
as: "inline",
|
|
68
|
+
value: {
|
|
69
|
+
size: "label-2",
|
|
70
|
+
sizeMobile: "label-2",
|
|
71
|
+
variant: "prominent-1",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
as: "floating",
|
|
76
|
+
value: {
|
|
77
|
+
size: "label-1",
|
|
78
|
+
sizeMobile: "label-1",
|
|
79
|
+
variant: "default",
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
],
|
|
83
|
+
default: {
|
|
84
|
+
size: "label-2",
|
|
85
|
+
sizeMobile: "label-2",
|
|
86
|
+
variant: "prominent-1",
|
|
87
|
+
},
|
|
88
|
+
defaultVariants: {
|
|
89
|
+
as: "default",
|
|
90
|
+
},
|
|
91
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { UIOverrides } from "@povio/ui";
|
|
2
|
+
|
|
3
|
+
export const modalContentOverride = UIOverrides.defineOverride("modal.contentCva", {
|
|
4
|
+
mode: "overrideCva",
|
|
5
|
+
base: [
|
|
6
|
+
"relative flex flex-col items-center gap-modal-gap-content px-modal-side-mobile py-modal-height-mobile md:px-modal-side-desktop md:py-modal-height-desktop",
|
|
7
|
+
"w-fit max-w-full [&>*]:max-w-full",
|
|
8
|
+
"border-elevation-outline-default-1 bg-elevation-fill-default-1 outline-none",
|
|
9
|
+
"pointer-events-auto",
|
|
10
|
+
],
|
|
11
|
+
config: {
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
aside: "center",
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
aside: {
|
|
17
|
+
center: "rounded-modal-rounding-default border",
|
|
18
|
+
left: "h-screen rounded-none border-r",
|
|
19
|
+
right: "h-screen rounded-none border-l",
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
export const modalOverlayOverride = UIOverrides.defineOverride("modal.overlayCva", {
|
|
26
|
+
mode: "overrideCva",
|
|
27
|
+
base: ["fixed inset-0 z-15 flex h-(--visual-viewport-height) w-screen overflow-y-auto bg-support-overlay"],
|
|
28
|
+
config: {
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
aside: "center",
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
aside: {
|
|
34
|
+
center: "p-4",
|
|
35
|
+
left: "p-0",
|
|
36
|
+
right: "p-0",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
export const modalMainOverride = UIOverrides.defineOverride("modal.mainCva", {
|
|
43
|
+
mode: "overrideCva",
|
|
44
|
+
base: ["pointer-events-none my-auto flex w-full"],
|
|
45
|
+
config: {
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
aside: "center",
|
|
48
|
+
},
|
|
49
|
+
variants: {
|
|
50
|
+
aside: {
|
|
51
|
+
center: "justify-center",
|
|
52
|
+
left: "entering:animate-drawer-enter-left exiting:animate-drawer-exit-left justify-start",
|
|
53
|
+
right: "entering:animate-drawer-enter-right exiting:animate-drawer-exit-right justify-end",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
},
|
|
57
|
+
});
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { type TypographyVariantProps, UIOverrides, compoundMapper } from "@povio/ui";
|
|
2
|
+
|
|
3
|
+
export const radioOverride = UIOverrides.defineOverride("radio.cva", {
|
|
4
|
+
mode: "overrideCva",
|
|
5
|
+
base: [
|
|
6
|
+
"flex items-center justify-center border-2",
|
|
7
|
+
"relative size-3-5 rounded-full p-1-5",
|
|
8
|
+
"before:absolute before:hidden before:size-1 before:rounded-full",
|
|
9
|
+
],
|
|
10
|
+
config: {
|
|
11
|
+
defaultVariants: {
|
|
12
|
+
variant: "default",
|
|
13
|
+
},
|
|
14
|
+
variants: {
|
|
15
|
+
variant: {
|
|
16
|
+
default: [
|
|
17
|
+
"border-interactive-outlined-secondary-on-idle",
|
|
18
|
+
"group-disabled:border-interactive-outlined-secondary-on-disabled",
|
|
19
|
+
"group-hover:border-interactive-outlined-secondary-on-hover",
|
|
20
|
+
"group-pressed:border-interactive-outlined-secondary-on-pressed",
|
|
21
|
+
"group-selected:border-interactive-contained-primary-idle",
|
|
22
|
+
"group-selected:bg-interactive-contained-primary-idle",
|
|
23
|
+
"group-selected:group-disabled:bg-interactive-contained-primary-disabled",
|
|
24
|
+
"group-selected:group-disabled:border-interactive-contained-primary-disabled",
|
|
25
|
+
"group-invalid:border-interactive-outlined-error-on-idle",
|
|
26
|
+
"group-focus-visible:outline-interactive-contained-primary-focus",
|
|
27
|
+
"before:bg-interactive-contained-primary-on-idle",
|
|
28
|
+
"group-hover:before:bg-interactive-contained-primary-on-hover",
|
|
29
|
+
"group-selected:before:block",
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
export interface RadioVariantProps extends UIOverrides.OverrideVariantProps<typeof radioOverride> {}
|
|
37
|
+
|
|
38
|
+
export const radioIndicatorClass = "group flex items-center gap-2";
|
|
39
|
+
|
|
40
|
+
export const radioTypography = compoundMapper<TypographyVariantProps, RadioVariantProps>({
|
|
41
|
+
default: {
|
|
42
|
+
size: "label-2",
|
|
43
|
+
sizeMobile: "label-2",
|
|
44
|
+
variant: "default",
|
|
45
|
+
},
|
|
46
|
+
});
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { UIOverrides } from "@povio/ui";
|
|
2
|
+
|
|
3
|
+
export const tableHeadDataOverride = UIOverrides.defineOverride("table.headDataCva", {
|
|
4
|
+
mode: "overrideCva",
|
|
5
|
+
base: [
|
|
6
|
+
"border-b border-b-elevation-outline-default-1 border-solid text-left",
|
|
7
|
+
"px-[calc(var(--container-table-header-cell-container-side-default)+var(--container-table-cell-content-side-m))]",
|
|
8
|
+
"py-[calc(var(--container-table-header-cell-container-height-xs)+var(--container-table-cell-content-height-m))]",
|
|
9
|
+
"group-data-[is-sticky=true]/table-head:bg-elevation-fill-default-1",
|
|
10
|
+
],
|
|
11
|
+
config: {
|
|
12
|
+
defaultVariants: {
|
|
13
|
+
hasRightBorder: false,
|
|
14
|
+
},
|
|
15
|
+
variants: {
|
|
16
|
+
hasRightBorder: {
|
|
17
|
+
false: "",
|
|
18
|
+
true: "border-l border-l-elevation-outline-default-1 border-solid",
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
export interface TableHeadDataVariantProps extends UIOverrides.OverrideVariantProps<typeof tableHeadDataOverride> {}
|
|
25
|
+
|
|
26
|
+
export const tableRowOverride = UIOverrides.defineOverride("table.rowCva", {
|
|
27
|
+
mode: "overrideCva",
|
|
28
|
+
base: [
|
|
29
|
+
"h-9 max-h-12",
|
|
30
|
+
"data-clickable:hover:bg-elevation-fill-default-2-5",
|
|
31
|
+
"disabled:opacity-50",
|
|
32
|
+
"selected:bg-elevation-fill-default-4",
|
|
33
|
+
"data-clickable:hover:selected:bg-elevation-fill-3",
|
|
34
|
+
"data-clickable:cursor-pointer",
|
|
35
|
+
"focus-within:bg-elevation-fill-default-4",
|
|
36
|
+
],
|
|
37
|
+
config: {
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
actionsOnHover: false,
|
|
40
|
+
disableInteractions: false,
|
|
41
|
+
},
|
|
42
|
+
variants: {
|
|
43
|
+
actionsOnHover: {
|
|
44
|
+
false: "",
|
|
45
|
+
true: "group/actions-on-hover actions-on-hover",
|
|
46
|
+
},
|
|
47
|
+
alternatingBackground: {
|
|
48
|
+
even: "even:bg-elevation-fill-inverted-4/5",
|
|
49
|
+
odd: "odd:bg-elevation-fill-inverted-4/5",
|
|
50
|
+
},
|
|
51
|
+
disableInteractions: {
|
|
52
|
+
false: "",
|
|
53
|
+
true: [
|
|
54
|
+
"hover:!bg-transparent",
|
|
55
|
+
"focus-within:!bg-transparent",
|
|
56
|
+
"selected:!bg-transparent",
|
|
57
|
+
"hover:selected:!bg-transparent",
|
|
58
|
+
"data-clickable:!cursor-default",
|
|
59
|
+
],
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
export interface TableRowVariantProps extends UIOverrides.OverrideVariantProps<typeof tableRowOverride> {}
|
|
66
|
+
|
|
67
|
+
export const tableDataOverride = UIOverrides.defineOverride("table.dataCva", {
|
|
68
|
+
mode: "overrideCva",
|
|
69
|
+
base: [
|
|
70
|
+
"relative h-0-5 overflow-hidden text-ellipsis whitespace-nowrap border-t border-t-transparent px-2",
|
|
71
|
+
"px-[calc(var(--container-table-cell-container-side-default)+var(--container-table-cell-content-side-m))]",
|
|
72
|
+
"py-[calc(var(--container-table-cell-container-height-xs)+var(--container-table-cell-content-height-s))]",
|
|
73
|
+
"border-b border-b-elevation-outline-default-1",
|
|
74
|
+
"has-[*>[data-invalid]]:border-b-input-outlined-outline-error!",
|
|
75
|
+
"outline-none focus:outline-none focus-visible:outline-none",
|
|
76
|
+
],
|
|
77
|
+
config: {
|
|
78
|
+
defaultVariants: {
|
|
79
|
+
hasRightBorder: false,
|
|
80
|
+
},
|
|
81
|
+
variants: {
|
|
82
|
+
hasRightBorder: {
|
|
83
|
+
false: "",
|
|
84
|
+
true: "border-l border-l-elevation-outline-default-1",
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
},
|
|
88
|
+
});
|
|
89
|
+
|
|
90
|
+
export interface TableDataVariantProps extends UIOverrides.OverrideVariantProps<typeof tableDataOverride> {}
|
|
91
|
+
|
|
92
|
+
export const tableHeaderTextOverride = UIOverrides.defineOverride("table.headerTextCva", {
|
|
93
|
+
mode: "overrideCva",
|
|
94
|
+
base: ["whitespace-nowrap"],
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
export interface TableHeaderTextVariantProps extends UIOverrides.OverrideVariantProps<typeof tableHeaderTextOverride> {}
|
|
98
|
+
|
|
99
|
+
export const tableCellTextOverride = UIOverrides.defineOverride("table.cellTextCva", {
|
|
100
|
+
mode: "overrideCva",
|
|
101
|
+
base: ["block overflow-hidden text-ellipsis text-text-default-2"],
|
|
102
|
+
});
|
|
103
|
+
|
|
104
|
+
export interface TableCellTextVariantProps extends UIOverrides.OverrideVariantProps<typeof tableCellTextOverride> {}
|