ansys-solutions-dash-super-components 0.2.dev8__tar.gz → 0.2.dev9__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 (29) hide show
  1. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/PKG-INFO +4 -6
  2. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/README.rst +1 -1
  3. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/pyproject.toml +35 -36
  4. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/assets/dashAgGridComponentFunctions.js +21 -5
  5. ansys_solutions_dash_super_components-0.2.dev9/src/ansys/solutions/dash_super_components/assets/tree-styles.css +63 -0
  6. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/authenticator.py +20 -18
  7. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/dual_input_range_slider.py +34 -10
  8. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/folder_selector.py +246 -93
  9. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/input_form.py +17 -9
  10. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/input_row_array.py +51 -37
  11. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/logs_supervisor.py +313 -100
  12. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/transaction_method_status_badge.py +35 -32
  13. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/transaction_supervisor.py +47 -56
  14. ansys_solutions_dash_super_components-0.2.dev9/src/ansys/solutions/dash_super_components/tree.py +979 -0
  15. ansys_solutions_dash_super_components-0.2.dev9/src/ansys/solutions/dash_super_components/utils/_common_colors.py +39 -0
  16. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/config.py +29 -4
  17. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/logs_parser.py +128 -28
  18. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/status_badge_properties.py +8 -33
  19. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/svg_icons.py +108 -2
  20. ansys_solutions_dash_super_components-0.2.dev8/src/ansys/solutions/dash_super_components/tree.py +0 -424
  21. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/AUTHORS +0 -0
  22. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/LICENSE +0 -0
  23. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/__init__.py +0 -0
  24. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/assets/__init__.py +0 -0
  25. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/__init__.py +0 -0
  26. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/aio_ids.py +0 -0
  27. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/api_requests.py +0 -0
  28. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/assets_server.py +0 -0
  29. {ansys_solutions_dash_super_components-0.2.dev8 → ansys_solutions_dash_super_components-0.2.dev9}/src/ansys/solutions/dash_super_components/utils/path_validator.py +0 -0
@@ -1,8 +1,8 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ansys-solutions-dash-super-components
3
- Version: 0.2.dev8
3
+ Version: 0.2.dev9
4
4
  Summary: A collection of pre-assembled, high-level Dash UI components built on Dash Mantine Components for simulation web applications.
5
- License: Apache-2.0
5
+ License-Expression: Apache-2.0
6
6
  License-File: AUTHORS
7
7
  License-File: LICENSE
8
8
  Keywords: Ansys Solutions
@@ -10,14 +10,12 @@ Author: ANSYS, Inc.
10
10
  Author-email: pyansys.core@ansys.com
11
11
  Maintainer: ANSYS, Inc.
12
12
  Maintainer-email: pyansys.core@ansys.com
13
- Requires-Python: >=3.10,<4
13
+ Requires-Python: >=3.11,<4
14
14
  Classifier: Development Status :: 3 - Alpha
15
15
  Classifier: Intended Audience :: Other Audience
16
16
  Classifier: License :: OSI Approved :: Apache Software License
17
17
  Classifier: Natural Language :: English
18
18
  Classifier: Operating System :: OS Independent
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3.10
21
19
  Classifier: Programming Language :: Python :: 3.11
22
20
  Classifier: Programming Language :: Python :: 3.12
23
21
  Classifier: Programming Language :: Python :: 3.13
@@ -86,7 +84,7 @@ issues to report bugs and request new features.
86
84
  Installation
87
85
  ------------
88
86
 
89
- The ``ansys-solutions-dash-super-components`` package supports Python 3.10
87
+ The ``ansys-solutions-dash-super-components`` package supports Python 3.11
90
88
  through 3.14 on Windows and Linux.
91
89
 
92
90
  Install the latest release from `PyPI
@@ -47,7 +47,7 @@ issues to report bugs and request new features.
47
47
  Installation
48
48
  ------------
49
49
 
50
- The ``ansys-solutions-dash-super-components`` package supports Python 3.10
50
+ The ``ansys-solutions-dash-super-components`` package supports Python 3.11
51
51
  through 3.14 on Windows and Linux.
52
52
 
53
53
  Install the latest release from `PyPI
@@ -1,31 +1,40 @@
1
1
  [build-system]
2
2
  build-backend = "poetry.core.masonry.api"
3
- # The following lines were added to enforce the poetry version needed for the project.
4
- # It will be read by the setup_environment.py script to install this version.
5
- requires = [ "poetry-core>=2.0.0", "setuptools>=65.0" ]
3
+ requires = [ "poetry-core>=2.0.0" ]
6
4
 
7
- [tool.poetry]
5
+ [project]
8
6
  name = "ansys-solutions-dash-super-components"
9
- version = "0.2.dev8"
7
+ version = "0.2.dev9"
10
8
  description = "A collection of pre-assembled, high-level Dash UI components built on Dash Mantine Components for simulation web applications."
11
9
  license = "Apache-2.0"
12
- authors = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
13
- maintainers = ["ANSYS, Inc. <pyansys.core@ansys.com>"]
10
+ authors = [{ name = "ANSYS, Inc.", email = "pyansys.core@ansys.com" }]
11
+ maintainers = [{ name = "ANSYS, Inc.", email = "pyansys.core@ansys.com" }]
14
12
  readme = "README.rst"
15
13
  keywords = [ "Ansys Solutions" ]
14
+ requires-python = ">=3.11,<4"
15
+ dynamic = ["dependencies"]
16
16
  classifiers = [
17
17
  "Development Status :: 3 - Alpha",
18
18
  "Intended Audience :: Other Audience",
19
19
  "License :: OSI Approved :: Apache Software License",
20
20
  "Natural Language :: English",
21
21
  "Operating System :: OS Independent",
22
- "Programming Language :: Python :: 3.10",
23
22
  "Programming Language :: Python :: 3.11",
24
23
  "Programming Language :: Python :: 3.12",
25
24
  "Programming Language :: Python :: 3.13",
26
25
  "Programming Language :: Python :: 3.14",
27
26
  "Topic :: Scientific/Engineering",
28
27
  ]
28
+
29
+ [project.urls]
30
+ Homepage = "https://github.com/ansys/super-components-for-dash"
31
+ Documentation = "https://super-components-for-dash.docs.solutions.ansys.com/"
32
+ Repository = "https://github.com/ansys/super-components-for-dash"
33
+ Issues = "https://github.com/ansys/super-components-for-dash/issues"
34
+ Changelog = "https://super-components-for-dash.docs.solutions.ansys.com/version/stable/changelog.html"
35
+
36
+ [tool.poetry]
37
+ requires-poetry = ">=2.3.2"
29
38
  packages = [
30
39
  { include = "ansys/solutions/dash_super_components", from = "src" },
31
40
  ]
@@ -38,64 +47,57 @@ name = "PyPI"
38
47
  priority = "primary"
39
48
 
40
49
  [tool.poetry.dependencies]
41
- python = ">=3.10, <4"
50
+ python = ">=3.11, <4"
42
51
  dash = ">=2.18.2, <3.4.0" # >= 3.4.0 incompatible with dash-extensions <2.0.5
43
52
  dash-ag-grid = ">=31.2.0, <32.0.0" # 32.x introduces breaking changes for LogsSupervisor
44
53
  dash-extensions = ">=1.0.20"
45
54
  dash-iconify = "^0.1"
46
55
  dash-mantine-components = ">=2.3.0, <3.0.0"
47
56
  flask = ">=2.2.0, <4.0.0"
48
- pandas = "^2.2.2"
57
+ pandas = ">=2.2.2, <3.0.0"
49
58
 
50
59
  [tool.poetry.group.tests]
51
60
  optional = true
52
61
  [tool.poetry.group.tests.dependencies]
53
- coverage = "^7.13.5"
62
+ coverage = "^7.15.0"
54
63
  mock = "^5.2.0"
55
- pytest = "^9.0.2"
64
+ pytest = "^9.1.1"
56
65
  pytest-cov = "^7.1.0"
57
66
  pytest-html = "^4.2.0"
58
67
  pytest-md = "^0.2.0"
59
68
  pytest-xdist = "^3.8.0"
60
69
  pytest-mock = "^3.15.1"
61
70
  requests = ">=2.28"
62
- tox = "^4.50.3"
71
+ tox = "^4.56.2"
63
72
 
64
73
  [tool.poetry.group.doc]
65
74
  optional = true
66
75
  [tool.poetry.group.doc.dependencies]
67
- ansys-sphinx-theme = "^1.7.2"
76
+ ansys-sphinx-theme = "^1.9.0"
68
77
  linkchecker = "^10.6.0"
69
78
  numpydoc = "^1.10.0"
70
- sphinx = "8.1.3"
79
+ sphinx = "^9.0.0"
71
80
  sphinx-copybutton = "^0.5.2"
72
- sphinx-autobuild = "^2024.10.3"
73
- sphinx-design = "^0.6.1"
81
+ sphinx-autobuild = "^2025.8.25"
82
+ sphinx-design = "^0.7.0"
74
83
  sphinx_code_tabs = "^0.5.5"
75
84
  sphinxcontrib-video = "^0.4.2"
76
- sphinx-gallery = "^0.20.0"
85
+ sphinx-gallery = "^0.21.0"
77
86
  toml = "^0.10.2" # Needed by conf.py
78
87
 
79
88
  [tool.poetry.group.style]
80
89
  optional = true
81
90
  [tool.poetry.group.style.dependencies]
82
- codespell = "^2.4.1"
91
+ codespell = "^2.4.2"
83
92
  numpydoc = "^1.10.0"
84
- pyright = "^1.1.408"
85
- ruff = "^0.15.7"
86
- pre-commit = "^4.5.1"
93
+ pyright = "^1.1.411"
94
+ ruff = "^0.15.20"
95
+ pre-commit = "^4.6.0"
87
96
  vale = ">=3.13.0"
88
- docformatter = "^1.7.7"
89
-
90
- [tool.poetry.urls]
91
- Homepage = "https://github.com/ansys/super-components-for-dash"
92
- Documentation = "https://super-components-for-dash.docs.solutions.ansys.com/"
93
- Repository = "https://github.com/ansys/super-components-for-dash"
94
- Issues = "https://github.com/ansys/super-components-for-dash/issues"
95
- Changelog = "https://super-components-for-dash.docs.solutions.ansys.com/version/stable/changelog.html"
97
+ docformatter = "^1.7.8"
96
98
 
97
99
  [tool.ruff]
98
- target-version = "py310" # not part of pyansys requirements but we use 3.10 features
100
+ target-version = "py311"
99
101
 
100
102
  line-length = 100 # pyansys requirement
101
103
  fix = true
@@ -168,9 +170,10 @@ source = [ "ansys.solutions.dash_super_components" ] # pyansys requirement
168
170
 
169
171
  [tool.coverage.report]
170
172
  show_missing = true # pyansys requirement
171
- omit = [ "*/pytest-of-*/pytest-*/popen-*/*", "/tmp*/*", "*/*setup_environment.py", "tests*" ]
173
+ omit = [ "*/pytest-of-*/pytest-*/popen-*/*", "/tmp*/*", "tests*" ]
172
174
 
173
175
  [tool.pyright]
176
+ pythonVersion = "3.11"
174
177
  extraPaths = [ "src" ]
175
178
  include = [
176
179
  "src",
@@ -180,7 +183,6 @@ exclude = [
180
183
  "**/.*",
181
184
  "examples/showcase_all",
182
185
  ".git",
183
- "setup_environment.py",
184
186
  ]
185
187
  venvPath = "."
186
188
  venv = ".venv"
@@ -269,6 +271,3 @@ wrap-summaries = 100
269
271
  wrap-descriptions = 100
270
272
  recursive = "true"
271
273
  pre-summary-newline = "true"
272
-
273
- [build-system-requirements]
274
- build-system-version = "2.3.2"
@@ -16,6 +16,14 @@
16
16
 
17
17
  var dagcomponentfuncs = window.dashAgGridComponentFunctions = window.dashAgGridComponentFunctions || {};
18
18
 
19
+ const commonColors = {
20
+ MANTINE_BLUE: "var(--mantine-color-blue-6)",
21
+ MANTINE_ORANGE: "var(--mantine-color-orange-6)",
22
+ MANTINE_RED: "var(--mantine-color-red-6)",
23
+ MANTINE_PINK: "var(--mantine-color-pink-6)",
24
+ MANTINE_GRAPE: "var(--mantine-color-grape-6)",
25
+ };
26
+
19
27
  dagcomponentfuncs.DMC_Badge_Level_Name = function (props) {
20
28
  const {setData, data} = props;
21
29
 
@@ -28,31 +36,31 @@ dagcomponentfuncs.DMC_Badge_Level_Name = function (props) {
28
36
  leftSection = React.createElement(window.dash_iconify.DashIconify, {
29
37
  icon: "material-symbols:info",
30
38
  });
31
- color = "blue";
39
+ color = commonColors.MANTINE_BLUE;
32
40
  }
33
41
  else if (props.value == "WARNING") {
34
42
  leftSection = React.createElement(window.dash_iconify.DashIconify, {
35
43
  icon: "material-symbols:warning",
36
44
  });
37
- color = "orange";
45
+ color = commonColors.MANTINE_ORANGE;
38
46
  }
39
47
  else if (props.value == "ERROR") {
40
48
  leftSection = React.createElement(window.dash_iconify.DashIconify, {
41
49
  icon: "icon-park-solid:error",
42
50
  });
43
- color = "red";
51
+ color = commonColors.MANTINE_RED;
44
52
  }
45
53
  else if (props.value == "CRITICAL") {
46
54
  leftSection = React.createElement(window.dash_iconify.DashIconify, {
47
55
  icon: "eos-icons:critical-bug-outlined",
48
56
  });
49
- color = "pink";
57
+ color = commonColors.MANTINE_PINK;
50
58
  }
51
59
  else if (props.value == "DEBUG") {
52
60
  leftSection = React.createElement(window.dash_iconify.DashIconify, {
53
61
  icon: "eos-icons:critical-bug",
54
62
  });
55
- color = "grape";
63
+ color = commonColors.MANTINE_GRAPE;
56
64
  }
57
65
 
58
66
  return React.createElement(
@@ -69,3 +77,11 @@ dagcomponentfuncs.DMC_Badge_Level_Name = function (props) {
69
77
  props.value
70
78
  );
71
79
  };
80
+
81
+ dagcomponentfuncs.DMC_NoRows_Overlay = function (props) {
82
+ return React.createElement(
83
+ "div",
84
+ {className: "ag-overlay-no-rows-center", role: "status"},
85
+ props.message || "No rows to show."
86
+ );
87
+ };
@@ -0,0 +1,63 @@
1
+ /*
2
+ * Copyright (C) 2026 ANSYS, Inc. and/or its affiliates.
3
+ * SPDX-License-Identifier: Apache-2.0
4
+ *
5
+ *
6
+ * Licensed under the Apache License, Version 2.0 (the "License");
7
+ * you may not use this file except in compliance with the License.
8
+ * You may obtain a copy of the License at
9
+ *
10
+ * http://www.apache.org/licenses/LICENSE-2.0
11
+ *
12
+ * Unless required by applicable law or agreed to in writing, software
13
+ * distributed under the License is distributed on an "AS IS" BASIS,
14
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ * See the License for the specific language governing permissions and
16
+ * limitations under the License.
17
+ */
18
+
19
+ /* Tree component theme support */
20
+
21
+ /* Ensure active item label/sections follow NavLink active color. */
22
+ .mantine-NavLink-root[data-active] .mantine-NavLink-label,
23
+ .mantine-NavLink-root[data-active] .mantine-NavLink-section {
24
+ color: inherit !important;
25
+ }
26
+
27
+ /* Keep icon sections theme-aware by default; active items inherit active color. */
28
+ .mantine-NavLink-section {
29
+ color: var(--mantine-color-text);
30
+ }
31
+
32
+ /* Dedicated expand/collapse control used by Tree parent items. */
33
+ .tree-expander-control {
34
+ display: inline-flex;
35
+ align-items: center;
36
+ justify-content: center;
37
+ width: 24px;
38
+ height: 24px;
39
+ color: var(--mantine-color-dimmed);
40
+ user-select: none;
41
+ cursor: pointer;
42
+ border-radius: 6px;
43
+ background: transparent;
44
+ flex-shrink: 0;
45
+ }
46
+
47
+ .tree-expander-control::before {
48
+ content: "";
49
+ width: 8px;
50
+ height: 8px;
51
+ border-right: 2px solid currentColor;
52
+ border-bottom: 2px solid currentColor;
53
+ transform: rotate(-45deg);
54
+ }
55
+
56
+ .tree-expander-control.tree-expander-open::before {
57
+ transform: rotate(45deg);
58
+ }
59
+
60
+ .tree-expander-control:hover {
61
+ color: var(--mantine-color-text);
62
+ background: color-mix(in srgb, var(--mantine-color-text) 8%, transparent);
63
+ }
@@ -17,9 +17,12 @@
17
17
 
18
18
  """Provide a Dash component for crafting an authentication form."""
19
19
 
20
+ import copy
20
21
  from typing import Any, TypeVar
21
22
  import uuid
22
23
 
24
+ from ansys.solutions.dash_super_components.utils._common_colors import _CommonColors as CommonColors
25
+
23
26
  try:
24
27
  # dash-extensions < 2.0.5
25
28
  from dash_extensions.enrich import _Wildcard # pyright: ignore[reportAttributeAccessIssue]
@@ -32,7 +35,10 @@ from dash_extensions.enrich import html
32
35
  import dash_mantine_components as dmc
33
36
 
34
37
  from ansys.solutions.dash_super_components.utils.aio_ids import AIOIds
35
- from ansys.solutions.dash_super_components.utils.svg_icons import IconNames, create_base64_svg_src
38
+ from ansys.solutions.dash_super_components.utils.svg_icons import (
39
+ IconNames,
40
+ create_icon_span,
41
+ )
36
42
 
37
43
  T = TypeVar("T", dmc.TextInput, dmc.PasswordInput, dmc.Button)
38
44
 
@@ -150,7 +156,7 @@ class Authenticator(html.Div):
150
156
  items = []
151
157
 
152
158
  self.items = items
153
- self.card_props = card_props
159
+ self._card_props = copy.deepcopy(card_props)
154
160
  self.aio_id = aio_id if aio_id is not None else str(uuid.uuid4())
155
161
  self._default_card_props = {
156
162
  "withBorder": True,
@@ -161,10 +167,7 @@ class Authenticator(html.Div):
161
167
  self._default_button_props = {
162
168
  "children": "Connect",
163
169
  "disabled": False,
164
- "leftSection": html.Img(
165
- src=create_base64_svg_src(IconNames.HUGE_ROCKET, color="#adb5bd"),
166
- ),
167
- "className": "mantine-button",
170
+ "leftSection": create_icon_span(IconNames.HUGE_ROCKET, size_px=16),
168
171
  "style": {"width": "100%"},
169
172
  }
170
173
  self._default_text_input_props = {
@@ -179,8 +182,8 @@ class Authenticator(html.Div):
179
182
  "placeholder": "Enter your password.",
180
183
  "required": True,
181
184
  "disabled": False,
182
- "leftSection": html.Img(
183
- src=create_base64_svg_src(IconNames.MDI_SECURE, color="#adb5bd"),
185
+ "leftSection": create_icon_span(
186
+ IconNames.MDI_SECURE, size_px=16, color=CommonColors.MANTINE_PLACEHOLDER
184
187
  ),
185
188
  "style": {"width": "100%"},
186
189
  }
@@ -194,8 +197,8 @@ class Authenticator(html.Div):
194
197
  "label": "Username",
195
198
  "placeholder": "Enter your username",
196
199
  "required": True,
197
- "leftSection": html.Img(
198
- src=create_base64_svg_src(IconNames.MDI_USER, color="#adb5bd"),
200
+ "leftSection": create_icon_span(
201
+ IconNames.MDI_USER, size_px=16, color=CommonColors.MANTINE_PLACEHOLDER
199
202
  ),
200
203
  },
201
204
  },
@@ -206,8 +209,8 @@ class Authenticator(html.Div):
206
209
  "label": "Password",
207
210
  "placeholder": "Enter your password",
208
211
  "required": True,
209
- "leftSection": html.Img(
210
- src=create_base64_svg_src(IconNames.MDI_SECURE, color="#adb5bd"),
212
+ "leftSection": create_icon_span(
213
+ IconNames.MDI_SECURE, size_px=16, color=CommonColors.MANTINE_PLACEHOLDER
211
214
  ),
212
215
  },
213
216
  },
@@ -216,22 +219,21 @@ class Authenticator(html.Div):
216
219
  "id": "connect",
217
220
  "properties": {
218
221
  "children": "Connect",
219
- "leftSection": html.Img(
220
- src=create_base64_svg_src(IconNames.HUGE_ROCKET, color="#adb5bd"),
221
- ),
222
+ "leftSection": create_icon_span(IconNames.HUGE_ROCKET, size_px=16),
222
223
  },
224
+ "variant": "filled",
223
225
  },
224
226
  ]
225
227
 
226
228
  for prop, value in self._default_card_props.items():
227
- if prop not in card_props:
228
- card_props[prop] = value
229
+ if prop not in self._card_props:
230
+ self._card_props[prop] = value
229
231
 
230
232
  super().__init__(
231
233
  [
232
234
  html.Div(
233
235
  [
234
- dmc.Card(self._generate_form(), **card_props),
236
+ dmc.Card(self._generate_form(), **self._card_props),
235
237
  ],
236
238
  ),
237
239
  ],
@@ -82,14 +82,14 @@ class DualInputRangeSlider(html.Div):
82
82
  the component and will be overridden. Default style: ``{"width": "20%"}``.
83
83
  lower_bound_input_props : dict, optional
84
84
  Additional properties forwarded to the lower bound :class:`dmc.NumberInput`.
85
- The keys ``min``, ``max``, ``step``, ``value``, and ``decimalScale`` are
86
- controlled by the component and will be overridden.
87
- Default: label ``"Min"``, variant ``"filled"``, style ``{"width": "5%"}``.
85
+ The keys ``min``, ``max``, ``step``, ``value``, ``decimalScale``, ``debounce``,
86
+ and ``clampBehavior`` are controlled by the component and will be overridden.
87
+ Default: label ``"Min"``, variant ``"filled"``, style ``{"width": "15%"}``.
88
88
  upper_bound_input_props : dict, optional
89
89
  Additional properties forwarded to the upper bound :class:`dmc.NumberInput`.
90
- The keys ``min``, ``max``, ``step``, ``value``, and ``decimalScale`` are
91
- controlled by the component and will be overridden.
92
- Default: label ``"Max"``, variant ``"filled"``, style ``{"width": "5%"}``.
90
+ The keys ``min``, ``max``, ``step``, ``value``, ``decimalScale``, ``debounce``,
91
+ and ``clampBehavior`` are controlled by the component and will be overridden.
92
+ Default: label ``"Max"``, variant ``"filled"``, style ``{"width": "15%"}``.
93
93
  aio_id : str, optional
94
94
  Unique identifier for this component instance. A UUID is generated when
95
95
  not provided.
@@ -225,6 +225,8 @@ class DualInputRangeSlider(html.Div):
225
225
  "max": self._max,
226
226
  "step": self._step,
227
227
  "decimalScale": self._decimal_scale,
228
+ "debounce": True, # Avoids unnecessary callback calls while typing
229
+ "clampBehavior": "strict", # Prevents user from entering values outside of [min, max]
228
230
  }
229
231
  self._populate_with_defaults(self._lower_bound_input_props, default_lower_bound_input_props)
230
232
  self._enforce_controlled_props(
@@ -243,6 +245,8 @@ class DualInputRangeSlider(html.Div):
243
245
  "max": self._max,
244
246
  "step": self._step,
245
247
  "decimalScale": self._decimal_scale,
248
+ "debounce": True, # Avoids unnecessary callback calls while typing
249
+ "clampBehavior": "strict", # Prevents user from entering values outside of [min, max]
246
250
  }
247
251
  self._populate_with_defaults(self._upper_bound_input_props, default_upper_bound_input_props)
248
252
  self._enforce_controlled_props(
@@ -369,8 +373,8 @@ class DualInputRangeSlider(html.Div):
369
373
  )
370
374
  def update_slider_or_inputs_values(
371
375
  slider_value: list[float | int],
372
- lower_bound_value: float | int,
373
- upper_bound_value: float | int,
376
+ lower_bound_value: float | int | str,
377
+ upper_bound_value: float | int | str,
374
378
  slider_id: dict[str, Any],
375
379
  lower_bound_id: dict[str, Any],
376
380
  upper_bound_id: dict[str, Any],
@@ -386,12 +390,32 @@ class DualInputRangeSlider(html.Div):
386
390
  elif trigger_id == lower_bound_id:
387
391
  # make sure that minRange=0 is respected (i.e., lower bound <= upper bound)
388
392
  # if not respected, shift upper bound (comparable to RangeSlider behavior)
393
+ lower_bound_value_update = no_update
394
+ try:
395
+ lower_bound_value = float(lower_bound_value)
396
+ except (ValueError, TypeError):
397
+ lower_bound_value = slider_value[0]
398
+ lower_bound_value_update = slider_value[0]
389
399
  valid_upper_bound_value = max(lower_bound_value, slider_value[1])
390
- return [lower_bound_value, valid_upper_bound_value], no_update, valid_upper_bound_value
400
+ return (
401
+ [lower_bound_value, valid_upper_bound_value],
402
+ lower_bound_value_update,
403
+ valid_upper_bound_value,
404
+ )
391
405
  elif trigger_id == upper_bound_id:
392
406
  # make sure that minRange=0 is respected (i.e., lower bound <= upper bound)
393
407
  # if not respected, shift lower bound (comparable to RangeSlider behavior)
408
+ upper_bound_value_update = no_update
409
+ try:
410
+ upper_bound_value = float(upper_bound_value)
411
+ except (ValueError, TypeError):
412
+ upper_bound_value = slider_value[1]
413
+ upper_bound_value_update = slider_value[1]
394
414
  valid_lower_bound_value = min(upper_bound_value, slider_value[0])
395
- return [valid_lower_bound_value, upper_bound_value], valid_lower_bound_value, no_update
415
+ return (
416
+ [valid_lower_bound_value, upper_bound_value],
417
+ valid_lower_bound_value,
418
+ upper_bound_value_update,
419
+ )
396
420
  else:
397
421
  raise PreventUpdate