reflex-base 0.9.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. reflex_base-0.9.0/.gitignore +24 -0
  2. reflex_base-0.9.0/PKG-INFO +17 -0
  3. reflex_base-0.9.0/README.md +3 -0
  4. reflex_base-0.9.0/pyproject.toml +29 -0
  5. reflex_base-0.9.0/src/reflex_base/.templates/apps/blank/assets/favicon.ico +0 -0
  6. reflex_base-0.9.0/src/reflex_base/.templates/apps/blank/code/__init__.py +0 -0
  7. reflex_base-0.9.0/src/reflex_base/.templates/apps/blank/code/blank.py +36 -0
  8. reflex_base-0.9.0/src/reflex_base/.templates/web/.gitignore +39 -0
  9. reflex_base-0.9.0/src/reflex_base/.templates/web/app/entry.client.js +8 -0
  10. reflex_base-0.9.0/src/reflex_base/.templates/web/app/routes.js +9 -0
  11. reflex_base-0.9.0/src/reflex_base/.templates/web/components/reflex/radix_themes_color_mode_provider.js +45 -0
  12. reflex_base-0.9.0/src/reflex_base/.templates/web/components/shiki/code.js +40 -0
  13. reflex_base-0.9.0/src/reflex_base/.templates/web/jsconfig.json +9 -0
  14. reflex_base-0.9.0/src/reflex_base/.templates/web/postcss.config.js +6 -0
  15. reflex_base-0.9.0/src/reflex_base/.templates/web/react-router.config.js +6 -0
  16. reflex_base-0.9.0/src/reflex_base/.templates/web/styles/__reflex_style_reset.css +374 -0
  17. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/helpers/dataeditor.js +83 -0
  18. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/helpers/debounce.js +17 -0
  19. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/helpers/paste.js +105 -0
  20. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/helpers/range.js +43 -0
  21. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/helpers/throttle.js +22 -0
  22. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/helpers/upload.js +167 -0
  23. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/react-theme.js +99 -0
  24. reflex_base-0.9.0/src/reflex_base/.templates/web/utils/state.js +1164 -0
  25. reflex_base-0.9.0/src/reflex_base/.templates/web/vite-plugin-safari-cachebust.js +160 -0
  26. reflex_base-0.9.0/src/reflex_base/__init__.py +1 -0
  27. reflex_base-0.9.0/src/reflex_base/breakpoints.py +91 -0
  28. reflex_base-0.9.0/src/reflex_base/compiler/__init__.py +1 -0
  29. reflex_base-0.9.0/src/reflex_base/compiler/templates.py +741 -0
  30. reflex_base-0.9.0/src/reflex_base/components/__init__.py +1 -0
  31. reflex_base-0.9.0/src/reflex_base/components/component.py +3026 -0
  32. reflex_base-0.9.0/src/reflex_base/components/dynamic.py +216 -0
  33. reflex_base-0.9.0/src/reflex_base/components/field.py +183 -0
  34. reflex_base-0.9.0/src/reflex_base/components/literals.py +34 -0
  35. reflex_base-0.9.0/src/reflex_base/components/props.py +441 -0
  36. reflex_base-0.9.0/src/reflex_base/components/tags/__init__.py +8 -0
  37. reflex_base-0.9.0/src/reflex_base/components/tags/cond_tag.py +31 -0
  38. reflex_base-0.9.0/src/reflex_base/components/tags/iter_tag.py +117 -0
  39. reflex_base-0.9.0/src/reflex_base/components/tags/match_tag.py +31 -0
  40. reflex_base-0.9.0/src/reflex_base/components/tags/tag.py +137 -0
  41. reflex_base-0.9.0/src/reflex_base/components/tags/tagless.py +36 -0
  42. reflex_base-0.9.0/src/reflex_base/config.py +698 -0
  43. reflex_base-0.9.0/src/reflex_base/constants/__init__.py +121 -0
  44. reflex_base-0.9.0/src/reflex_base/constants/base.py +294 -0
  45. reflex_base-0.9.0/src/reflex_base/constants/colors.py +99 -0
  46. reflex_base-0.9.0/src/reflex_base/constants/compiler.py +210 -0
  47. reflex_base-0.9.0/src/reflex_base/constants/config.py +76 -0
  48. reflex_base-0.9.0/src/reflex_base/constants/custom_components.py +35 -0
  49. reflex_base-0.9.0/src/reflex_base/constants/event.py +102 -0
  50. reflex_base-0.9.0/src/reflex_base/constants/installer.py +150 -0
  51. reflex_base-0.9.0/src/reflex_base/constants/route.py +94 -0
  52. reflex_base-0.9.0/src/reflex_base/constants/state.py +16 -0
  53. reflex_base-0.9.0/src/reflex_base/constants/utils.py +31 -0
  54. reflex_base-0.9.0/src/reflex_base/context/__init__.py +1 -0
  55. reflex_base-0.9.0/src/reflex_base/context/base.py +81 -0
  56. reflex_base-0.9.0/src/reflex_base/environment.py +877 -0
  57. reflex_base-0.9.0/src/reflex_base/event/__init__.py +2840 -0
  58. reflex_base-0.9.0/src/reflex_base/event/context.py +146 -0
  59. reflex_base-0.9.0/src/reflex_base/event/processor/__init__.py +14 -0
  60. reflex_base-0.9.0/src/reflex_base/event/processor/base_state_processor.py +398 -0
  61. reflex_base-0.9.0/src/reflex_base/event/processor/compat.py +87 -0
  62. reflex_base-0.9.0/src/reflex_base/event/processor/event_processor.py +741 -0
  63. reflex_base-0.9.0/src/reflex_base/event/processor/future.py +100 -0
  64. reflex_base-0.9.0/src/reflex_base/event/processor/timeout.py +52 -0
  65. reflex_base-0.9.0/src/reflex_base/plugins/__init__.py +21 -0
  66. reflex_base-0.9.0/src/reflex_base/plugins/_screenshot.py +148 -0
  67. reflex_base-0.9.0/src/reflex_base/plugins/base.py +126 -0
  68. reflex_base-0.9.0/src/reflex_base/plugins/shared_tailwind.py +235 -0
  69. reflex_base-0.9.0/src/reflex_base/plugins/sitemap.py +240 -0
  70. reflex_base-0.9.0/src/reflex_base/plugins/tailwind_v3.py +170 -0
  71. reflex_base-0.9.0/src/reflex_base/plugins/tailwind_v4.py +174 -0
  72. reflex_base-0.9.0/src/reflex_base/py.typed +0 -0
  73. reflex_base-0.9.0/src/reflex_base/registry.py +160 -0
  74. reflex_base-0.9.0/src/reflex_base/style.py +416 -0
  75. reflex_base-0.9.0/src/reflex_base/utils/__init__.py +1 -0
  76. reflex_base-0.9.0/src/reflex_base/utils/compat.py +50 -0
  77. reflex_base-0.9.0/src/reflex_base/utils/console.py +486 -0
  78. reflex_base-0.9.0/src/reflex_base/utils/decorator.py +148 -0
  79. reflex_base-0.9.0/src/reflex_base/utils/exceptions.py +286 -0
  80. reflex_base-0.9.0/src/reflex_base/utils/format.py +774 -0
  81. reflex_base-0.9.0/src/reflex_base/utils/imports.py +150 -0
  82. reflex_base-0.9.0/src/reflex_base/utils/lazy_loader.py +142 -0
  83. reflex_base-0.9.0/src/reflex_base/utils/pyi_generator.py +1783 -0
  84. reflex_base-0.9.0/src/reflex_base/utils/serializers.py +509 -0
  85. reflex_base-0.9.0/src/reflex_base/utils/streaming_response.py +157 -0
  86. reflex_base-0.9.0/src/reflex_base/utils/types.py +1197 -0
  87. reflex_base-0.9.0/src/reflex_base/vars/__init__.py +67 -0
  88. reflex_base-0.9.0/src/reflex_base/vars/base.py +3693 -0
  89. reflex_base-0.9.0/src/reflex_base/vars/color.py +166 -0
  90. reflex_base-0.9.0/src/reflex_base/vars/datetime.py +202 -0
  91. reflex_base-0.9.0/src/reflex_base/vars/dep_tracking.py +485 -0
  92. reflex_base-0.9.0/src/reflex_base/vars/function.py +555 -0
  93. reflex_base-0.9.0/src/reflex_base/vars/number.py +1148 -0
  94. reflex_base-0.9.0/src/reflex_base/vars/object.py +649 -0
  95. reflex_base-0.9.0/src/reflex_base/vars/sequence.py +1843 -0
@@ -0,0 +1,24 @@
1
+ **/.DS_Store
2
+ **/*.pyc
3
+ assets/external/*
4
+ dist/*
5
+ examples/
6
+ .web
7
+ .states
8
+ .idea
9
+ .vscode
10
+ .coverage
11
+ .coverage.*
12
+ .venv
13
+ venv
14
+ requirements.txt
15
+ .pyi_generator_last_run
16
+ .pyi_generator_diff
17
+ reflex.db
18
+ .codspeed
19
+ .env
20
+ .env.*
21
+ node_modules
22
+ package-lock.json
23
+ *.pyi
24
+ .pre-commit-config.yaml
@@ -0,0 +1,17 @@
1
+ Metadata-Version: 2.4
2
+ Name: reflex-base
3
+ Version: 0.9.0
4
+ Summary: Core types for the Reflex framework.
5
+ Author-email: Khaleel Al-Adhami <khaleel@reflex.dev>
6
+ Maintainer-email: Khaleel Al-Adhami <khaleel@reflex.dev>
7
+ Requires-Python: >=3.10
8
+ Requires-Dist: packaging<27,>=24.2
9
+ Requires-Dist: platformdirs<5.0,>=4.3.7
10
+ Requires-Dist: pydantic<3.0,>=1.10.21
11
+ Requires-Dist: rich<15,>=13
12
+ Requires-Dist: typing-extensions>=4.13.0
13
+ Description-Content-Type: text/markdown
14
+
15
+ # reflex-base
16
+
17
+ Core types for the Reflex framework.
@@ -0,0 +1,3 @@
1
+ # reflex-base
2
+
3
+ Core types for the Reflex framework.
@@ -0,0 +1,29 @@
1
+ [project]
2
+ name = "reflex-base"
3
+ dynamic = ["version"]
4
+ description = "Core types for the Reflex framework."
5
+ readme = "README.md"
6
+ authors = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
7
+ maintainers = [{ name = "Khaleel Al-Adhami", email = "khaleel@reflex.dev" }]
8
+ requires-python = ">=3.10"
9
+ dependencies = [
10
+ "packaging >=24.2,<27",
11
+ "pydantic >=1.10.21,<3.0",
12
+ "rich >=13,<15",
13
+ "typing_extensions >=4.13.0",
14
+ "platformdirs >=4.3.7,<5.0",
15
+ ]
16
+
17
+ [tool.hatch.version]
18
+ source = "uv-dynamic-versioning"
19
+
20
+ [tool.uv-dynamic-versioning]
21
+ pattern-prefix = "reflex-base-"
22
+ fallback-version = "0.0.0dev0"
23
+
24
+ [tool.hatch.build]
25
+ artifacts = [".templates/**"]
26
+
27
+ [build-system]
28
+ requires = ["hatchling", "uv-dynamic-versioning"]
29
+ build-backend = "hatchling.build"
@@ -0,0 +1,36 @@
1
+ """Welcome to Reflex! This file outlines the steps to create a basic app."""
2
+
3
+ import reflex as rx
4
+
5
+ from rxconfig import config
6
+
7
+
8
+ class State(rx.State):
9
+ """The app state."""
10
+
11
+
12
+ def index() -> rx.Component:
13
+ # Welcome Page (Index)
14
+ return rx.container(
15
+ rx.color_mode.button(position="top-right"),
16
+ rx.vstack(
17
+ rx.heading("Welcome to Reflex!", size="9"),
18
+ rx.text(
19
+ "Get started by editing ",
20
+ rx.code(f"{config.app_name}/{config.app_name}.py"),
21
+ size="5",
22
+ ),
23
+ rx.link(
24
+ rx.button("Check out our docs!"),
25
+ href="https://reflex.dev/docs/getting-started/introduction/",
26
+ is_external=True,
27
+ ),
28
+ spacing="5",
29
+ justify="center",
30
+ min_height="85vh",
31
+ ),
32
+ )
33
+
34
+
35
+ app = rx.App()
36
+ app.add_page(index)
@@ -0,0 +1,39 @@
1
+ # See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2
+
3
+ /_static
4
+
5
+ # dependencies
6
+ /node_modules
7
+ /.pnp
8
+ .pnp.js
9
+
10
+ # testing
11
+ /coverage
12
+
13
+ # next.js
14
+ /.next/
15
+ /out/
16
+
17
+ # production
18
+ /build
19
+
20
+ # misc
21
+ .DS_Store
22
+ *.pem
23
+
24
+ # debug
25
+ npm-debug.log*
26
+ yarn-debug.log*
27
+ yarn-error.log*
28
+
29
+ # local env files
30
+ .env.local
31
+ .env.development.local
32
+ .env.test.local
33
+ .env.production.local
34
+
35
+ # vercel
36
+ .vercel
37
+
38
+ # DS_Store
39
+ .DS_Store
@@ -0,0 +1,8 @@
1
+ import { startTransition } from "react";
2
+ import { hydrateRoot } from "react-dom/client";
3
+ import { HydratedRouter } from "react-router/dom";
4
+ import { createElement } from "react";
5
+
6
+ startTransition(() => {
7
+ hydrateRoot(document, createElement(HydratedRouter));
8
+ });
@@ -0,0 +1,9 @@
1
+ import { route } from "@react-router/dev/routes";
2
+ import { flatRoutes } from "@react-router/fs-routes";
3
+
4
+ export default [
5
+ ...(await flatRoutes({
6
+ ignoredRouteFiles: ["routes/\\[404\\]._index.jsx"],
7
+ })),
8
+ route("*", "routes/[404]._index.jsx"),
9
+ ];
@@ -0,0 +1,45 @@
1
+ import { useTheme } from "$/utils/react-theme";
2
+ import { createElement, useEffect } from "react";
3
+ import { ColorModeContext, defaultColorMode } from "$/utils/context";
4
+
5
+ export default function RadixThemesColorModeProvider({ children }) {
6
+ const { theme, resolvedTheme, setTheme } = useTheme();
7
+
8
+ const toggleColorMode = () => {
9
+ setTheme(resolvedTheme === "light" ? "dark" : "light");
10
+ };
11
+
12
+ const setColorMode = (mode) => {
13
+ const allowedModes = ["light", "dark", "system"];
14
+ if (!allowedModes.includes(mode)) {
15
+ console.error(
16
+ `Invalid color mode "${mode}". Defaulting to "${defaultColorMode}".`,
17
+ );
18
+ mode = defaultColorMode;
19
+ }
20
+ setTheme(mode);
21
+ };
22
+
23
+ useEffect(() => {
24
+ const radixRoot = document.querySelector(
25
+ '.radix-themes[data-is-root-theme="true"]',
26
+ );
27
+ if (radixRoot) {
28
+ radixRoot.classList.remove("light", "dark");
29
+ radixRoot.classList.add(resolvedTheme);
30
+ }
31
+ }, [resolvedTheme]);
32
+
33
+ return createElement(
34
+ ColorModeContext.Provider,
35
+ {
36
+ value: {
37
+ rawColorMode: theme,
38
+ resolvedColorMode: resolvedTheme,
39
+ toggleColorMode,
40
+ setColorMode,
41
+ },
42
+ },
43
+ children,
44
+ );
45
+ }
@@ -0,0 +1,40 @@
1
+ import { useEffect, useState, createElement } from "react";
2
+ import { codeToHtml } from "shiki";
3
+
4
+ /**
5
+ * Code component that uses Shiki to convert code to HTML and render it.
6
+ *
7
+ * @param code - The code to be highlighted.
8
+ * @param theme - The theme to be used for highlighting.
9
+ * @param language - The language of the code.
10
+ * @param transformers - The transformers to be applied to the code.
11
+ * @param decorations - The decorations to be applied to the code.
12
+ * @param divProps - Additional properties to be passed to the div element.
13
+ * @returns The rendered code block.
14
+ */
15
+ export function Code({
16
+ code,
17
+ theme,
18
+ language,
19
+ transformers,
20
+ decorations,
21
+ ...divProps
22
+ }) {
23
+ const [codeResult, setCodeResult] = useState("");
24
+ useEffect(() => {
25
+ async function fetchCode() {
26
+ const result = await codeToHtml(code, {
27
+ lang: language,
28
+ theme,
29
+ transformers,
30
+ decorations,
31
+ });
32
+ setCodeResult(result);
33
+ }
34
+ fetchCode();
35
+ }, [code, language, theme, transformers, decorations]);
36
+ return createElement("div", {
37
+ dangerouslySetInnerHTML: { __html: codeResult },
38
+ ...divProps,
39
+ });
40
+ }
@@ -0,0 +1,9 @@
1
+ {
2
+ "compilerOptions": {
3
+ "baseUrl": ".",
4
+ "paths": {
5
+ "$/*": ["*"],
6
+ "@/*": ["public/*"]
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,6 @@
1
+ export default {
2
+ plugins: {
3
+ "postcss-import": {},
4
+ autoprefixer: {},
5
+ },
6
+ };
@@ -0,0 +1,6 @@
1
+ export default {
2
+ future: {
3
+ unstable_optimizeDeps: true,
4
+ },
5
+ ssr: false,
6
+ };
@@ -0,0 +1,374 @@
1
+ @layer __reflex_base {
2
+ /*
3
+ 1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
4
+ 2. Remove default margins and padding
5
+ 3. Reset all borders.
6
+ */
7
+
8
+ *,
9
+ ::after,
10
+ ::before,
11
+ ::backdrop,
12
+ ::file-selector-button {
13
+ box-sizing: border-box; /* 1 */
14
+ margin: 0; /* 2 */
15
+ padding: 0; /* 2 */
16
+ border: 0 solid; /* 3 */
17
+ }
18
+
19
+ /*
20
+ 1. Use a consistent sensible line-height in all browsers.
21
+ 2. Prevent adjustments of font size after orientation changes in iOS.
22
+ 3. Use a more readable tab size.
23
+ 4. Use the user's configured `sans` font-family by default.
24
+ 5. Use the user's configured `sans` font-feature-settings by default.
25
+ 6. Use the user's configured `sans` font-variation-settings by default.
26
+ 7. Disable tap highlights on iOS.
27
+ */
28
+
29
+ html,
30
+ :host {
31
+ line-height: 1.5; /* 1 */
32
+ -webkit-text-size-adjust: 100%; /* 2 */
33
+ tab-size: 4; /* 3 */
34
+ font-family:
35
+ --default-font-family, ui-sans-serif, system-ui, sans-serif,
36
+ "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
37
+ "Noto Color Emoji"; /* 4 */
38
+ font-feature-settings: --default-font-feature-settings, normal; /* 5 */
39
+ font-variation-settings: --default-font-variation-settings, normal; /* 6 */
40
+ -webkit-tap-highlight-color: transparent; /* 7 */
41
+ }
42
+
43
+ /*
44
+ 1. Add the correct height in Firefox.
45
+ 2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
46
+ 3. Reset the default border style to a 1px solid border.
47
+ */
48
+
49
+ hr {
50
+ height: 0; /* 1 */
51
+ color: inherit; /* 2 */
52
+ border-top-width: 1px; /* 3 */
53
+ }
54
+
55
+ /*
56
+ Add the correct text decoration in Chrome, Edge, and Safari.
57
+ */
58
+
59
+ abbr:where([title]) {
60
+ -webkit-text-decoration: underline dotted;
61
+ text-decoration: underline dotted;
62
+ }
63
+
64
+ /*
65
+ Remove the default font size and weight for headings.
66
+ */
67
+
68
+ h1,
69
+ h2,
70
+ h3,
71
+ h4,
72
+ h5,
73
+ h6 {
74
+ font-size: inherit;
75
+ font-weight: inherit;
76
+ }
77
+
78
+ /*
79
+ Reset links to optimize for opt-in styling instead of opt-out.
80
+ */
81
+
82
+ a {
83
+ color: inherit;
84
+ -webkit-text-decoration: inherit;
85
+ text-decoration: inherit;
86
+ }
87
+
88
+ /*
89
+ Add the correct font weight in Edge and Safari.
90
+ */
91
+
92
+ b,
93
+ strong {
94
+ font-weight: bolder;
95
+ }
96
+
97
+ /*
98
+ 1. Use the user's configured `mono` font-family by default.
99
+ 2. Use the user's configured `mono` font-feature-settings by default.
100
+ 3. Use the user's configured `mono` font-variation-settings by default.
101
+ 4. Correct the odd `em` font sizing in all browsers.
102
+ */
103
+
104
+ code,
105
+ kbd,
106
+ samp,
107
+ pre {
108
+ font-family:
109
+ --default-mono-font-family, ui-monospace, SFMono-Regular, Menlo, Monaco,
110
+ Consolas, "Liberation Mono", "Courier New", monospace; /* 1 */
111
+ font-feature-settings: --default-mono-font-feature-settings, normal; /* 2 */
112
+ font-variation-settings:
113
+ --default-mono-font-variation-settings, normal; /* 3 */
114
+ font-size: 1em; /* 4 */
115
+ }
116
+
117
+ /*
118
+ Add the correct font size in all browsers.
119
+ */
120
+
121
+ small {
122
+ font-size: 80%;
123
+ }
124
+
125
+ /*
126
+ Prevent `sub` and `sup` elements from affecting the line height in all browsers.
127
+ */
128
+
129
+ sub,
130
+ sup {
131
+ font-size: 75%;
132
+ line-height: 0;
133
+ position: relative;
134
+ vertical-align: baseline;
135
+ }
136
+
137
+ sub {
138
+ bottom: -0.25em;
139
+ }
140
+
141
+ sup {
142
+ top: -0.5em;
143
+ }
144
+
145
+ /*
146
+ 1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
147
+ 2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
148
+ 3. Remove gaps between table borders by default.
149
+ */
150
+
151
+ table {
152
+ text-indent: 0; /* 1 */
153
+ border-color: inherit; /* 2 */
154
+ border-collapse: collapse; /* 3 */
155
+ }
156
+
157
+ /*
158
+ Use the modern Firefox focus style for all focusable elements.
159
+ */
160
+
161
+ :-moz-focusring {
162
+ outline: auto;
163
+ }
164
+
165
+ /*
166
+ Add the correct vertical alignment in Chrome and Firefox.
167
+ */
168
+
169
+ progress {
170
+ vertical-align: baseline;
171
+ }
172
+
173
+ /*
174
+ Add the correct display in Chrome and Safari.
175
+ */
176
+
177
+ summary {
178
+ display: list-item;
179
+ }
180
+
181
+ /*
182
+ Make lists unstyled by default.
183
+ */
184
+
185
+ ol,
186
+ ul,
187
+ menu {
188
+ list-style: none;
189
+ }
190
+
191
+ /*
192
+ 1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
193
+ 2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
194
+ This can trigger a poorly considered lint error in some tools but is included by design.
195
+ */
196
+
197
+ img,
198
+ svg,
199
+ video,
200
+ canvas,
201
+ audio,
202
+ iframe,
203
+ embed,
204
+ object {
205
+ display: block; /* 1 */
206
+ vertical-align: middle; /* 2 */
207
+ }
208
+
209
+ /*
210
+ Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
211
+ */
212
+
213
+ img,
214
+ video {
215
+ max-width: 100%;
216
+ height: auto;
217
+ }
218
+
219
+ /*
220
+ 1. Inherit font styles in all browsers.
221
+ 2. Remove border radius in all browsers.
222
+ 3. Remove background color in all browsers.
223
+ 4. Ensure consistent opacity for disabled states in all browsers.
224
+ */
225
+
226
+ button,
227
+ input,
228
+ select,
229
+ optgroup,
230
+ textarea,
231
+ ::file-selector-button {
232
+ font: inherit; /* 1 */
233
+ font-feature-settings: inherit; /* 1 */
234
+ font-variation-settings: inherit; /* 1 */
235
+ letter-spacing: inherit; /* 1 */
236
+ color: inherit; /* 1 */
237
+ border-radius: 0; /* 2 */
238
+ background-color: transparent; /* 3 */
239
+ opacity: 1; /* 4 */
240
+ }
241
+
242
+ /*
243
+ Restore default font weight.
244
+ */
245
+
246
+ :where(select:is([multiple], [size])) optgroup {
247
+ font-weight: bolder;
248
+ }
249
+
250
+ /*
251
+ Restore indentation.
252
+ */
253
+
254
+ :where(select:is([multiple], [size])) optgroup option {
255
+ padding-inline-start: 20px;
256
+ }
257
+
258
+ /*
259
+ Restore space after button.
260
+ */
261
+
262
+ ::file-selector-button {
263
+ margin-inline-end: 4px;
264
+ }
265
+
266
+ /*
267
+ Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
268
+ */
269
+
270
+ ::placeholder {
271
+ opacity: 1;
272
+ }
273
+
274
+ /*
275
+ Set the default placeholder color to a semi-transparent version of the current text color in browsers that do not
276
+ crash when using `color-mix(…)` with `currentcolor`. (https://github.com/tailwindlabs/tailwindcss/issues/17194)
277
+ */
278
+
279
+ @supports (not (-webkit-appearance: -apple-pay-button)) /* Not Safari */ or
280
+ (contain-intrinsic-size: 1px) /* Safari 17+ */ {
281
+ ::placeholder {
282
+ color: color-mix(in oklab, currentcolor 50%, transparent);
283
+ }
284
+ }
285
+
286
+ /*
287
+ Prevent resizing textareas horizontally by default.
288
+ */
289
+
290
+ textarea {
291
+ resize: vertical;
292
+ }
293
+
294
+ /*
295
+ Remove the inner padding in Chrome and Safari on macOS.
296
+ */
297
+
298
+ ::-webkit-search-decoration {
299
+ -webkit-appearance: none;
300
+ }
301
+
302
+ /*
303
+ 1. Ensure date/time inputs have the same height when empty in iOS Safari.
304
+ 2. Ensure text alignment can be changed on date/time inputs in iOS Safari.
305
+ */
306
+
307
+ ::-webkit-date-and-time-value {
308
+ min-height: 1lh; /* 1 */
309
+ text-align: inherit; /* 2 */
310
+ }
311
+
312
+ /*
313
+ Prevent height from changing on date/time inputs in macOS Safari when the input is set to `display: block`.
314
+ */
315
+
316
+ ::-webkit-datetime-edit {
317
+ display: inline-flex;
318
+ }
319
+
320
+ /*
321
+ Remove excess padding from pseudo-elements in date/time inputs to ensure consistent height across browsers.
322
+ */
323
+
324
+ ::-webkit-datetime-edit-fields-wrapper {
325
+ padding: 0;
326
+ }
327
+
328
+ ::-webkit-datetime-edit,
329
+ ::-webkit-datetime-edit-year-field,
330
+ ::-webkit-datetime-edit-month-field,
331
+ ::-webkit-datetime-edit-day-field,
332
+ ::-webkit-datetime-edit-hour-field,
333
+ ::-webkit-datetime-edit-minute-field,
334
+ ::-webkit-datetime-edit-second-field,
335
+ ::-webkit-datetime-edit-millisecond-field,
336
+ ::-webkit-datetime-edit-meridiem-field {
337
+ padding-block: 0;
338
+ }
339
+
340
+ /*
341
+ Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
342
+ */
343
+
344
+ :-moz-ui-invalid {
345
+ box-shadow: none;
346
+ }
347
+
348
+ /*
349
+ Correct the inability to style the border radius in iOS Safari.
350
+ */
351
+
352
+ button,
353
+ input:where([type="button"], [type="reset"], [type="submit"]),
354
+ ::file-selector-button {
355
+ appearance: button;
356
+ }
357
+
358
+ /*
359
+ Correct the cursor style of increment and decrement buttons in Safari.
360
+ */
361
+
362
+ ::-webkit-inner-spin-button,
363
+ ::-webkit-outer-spin-button {
364
+ height: auto;
365
+ }
366
+
367
+ /*
368
+ Make elements with the HTML hidden attribute stay hidden by default.
369
+ */
370
+
371
+ [hidden]:where(:not([hidden="until-found"])) {
372
+ display: none !important;
373
+ }
374
+ }