@react-fabric/form 1.0.0-beta.36 → 1.0.0-beta.37

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 (57) hide show
  1. package/{src/input/ArrayInput.module.css → css/_arrayInput.css} +8 -8
  2. package/{src/input/ColorPicker.module.css → css/_colorPicker.css} +13 -13
  3. package/{src/internal/Field.module.css → css/_field.css} +17 -17
  4. package/{src/input/File.module.css → css/_file.css} +7 -7
  5. package/css/styles.css +27 -0
  6. package/dist/cjs/builder/FileField.js +35 -23
  7. package/dist/cjs/input/ArrayInput.js +3 -4
  8. package/dist/cjs/input/AvatarInput.js +1 -1
  9. package/dist/cjs/input/Checkbox.js +1 -1
  10. package/dist/cjs/input/ColorInput.js +1 -1
  11. package/dist/cjs/input/ColorPicker.js +1 -2
  12. package/dist/cjs/input/Field.js +1 -2
  13. package/dist/cjs/input/File.js +1 -2
  14. package/dist/cjs/input/Radio.js +1 -1
  15. package/dist/cjs/internal/ErrorIcon.js +1 -1
  16. package/dist/cjs/internal/FieldWrapper.js +1 -2
  17. package/dist/cjs/internal/InputWrapper.js +4 -5
  18. package/dist/cjs/select/AutoComplete.js +1 -1
  19. package/dist/cjs/select/Select.js +1 -1
  20. package/dist/esm/builder/FileField.js +37 -25
  21. package/dist/esm/input/ArrayInput.js +3 -4
  22. package/dist/esm/input/AvatarInput.js +1 -1
  23. package/dist/esm/input/Checkbox.js +1 -1
  24. package/dist/esm/input/ColorInput.js +1 -1
  25. package/dist/esm/input/ColorPicker.js +1 -2
  26. package/dist/esm/input/Field.js +1 -2
  27. package/dist/esm/input/File.js +1 -2
  28. package/dist/esm/input/Radio.js +1 -1
  29. package/dist/esm/internal/ErrorIcon.js +1 -1
  30. package/dist/esm/internal/FieldWrapper.js +1 -2
  31. package/dist/esm/internal/InputWrapper.js +4 -5
  32. package/dist/esm/select/AutoComplete.js +1 -1
  33. package/dist/esm/select/Select.js +1 -1
  34. package/dist/types/builder/FileField.d.ts +3 -1
  35. package/package.json +16 -5
  36. package/src/builder/FileField.tsx +48 -23
  37. package/src/input/ArrayInput.tsx +3 -4
  38. package/src/input/AvatarInput.tsx +1 -1
  39. package/src/input/Checkbox.tsx +1 -1
  40. package/src/input/ColorInput.tsx +1 -1
  41. package/src/input/ColorPicker.tsx +1 -2
  42. package/src/input/Field.tsx +1 -2
  43. package/src/input/File.tsx +2 -5
  44. package/src/input/Radio.tsx +1 -1
  45. package/src/internal/ErrorIcon.tsx +1 -1
  46. package/src/internal/FieldWrapper.tsx +1 -2
  47. package/src/internal/InputWrapper.tsx +6 -7
  48. package/src/select/AutoComplete.tsx +1 -1
  49. package/src/select/Select.tsx +1 -1
  50. package/dist/cjs/input/ArrayInput.module.css +0 -1
  51. package/dist/cjs/input/ColorPicker.module.css +0 -1
  52. package/dist/cjs/input/File.module.css +0 -1
  53. package/dist/cjs/internal/Field.module.css +0 -1
  54. package/dist/esm/input/ArrayInput.module.css +0 -1
  55. package/dist/esm/input/ColorPicker.module.css +0 -1
  56. package/dist/esm/input/File.module.css +0 -1
  57. package/dist/esm/internal/Field.module.css +0 -1
@@ -21,20 +21,20 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  */
23
23
 
24
- @layer var {
25
- .arrayInput {
24
+ @layer variants {
25
+ .fabric-arrayInput {
26
26
  & [data-ref="fieldWrapper"] {
27
27
  flex: 1 1 0%;
28
28
  }
29
29
 
30
- & .addButton :global(.buttonInner) {
31
- color: theme(colors.tint.600);
32
- outline: 1px dashed theme(colors.tint.600);
30
+ & .fabric-addButton .fabric-button {
31
+ color: var(--color-tint-600);
32
+ outline: 1px dashed var(--color-tint-600);
33
33
 
34
34
  &[data-invalid="true"] {
35
- color: theme(colors.danger.600);
36
- background-color: theme(colors.danger.100);
37
- outline: 1px dashed theme(colors.danger.600);
35
+ color: var(--color-danger-600);
36
+ background-color: var(--color-danger-100);
37
+ outline: 1px dashed var(--color-danger-600);
38
38
  }
39
39
  }
40
40
  }
@@ -21,44 +21,44 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  */
23
23
 
24
- @layer comp {
25
- .colorPicker {
26
- --color-shadow: theme(borderColor.base);
24
+ @layer components {
25
+ .fabric-colorPicker {
26
+ --color-shadow: var(--border-color-base);
27
27
 
28
28
  & input {
29
29
  padding: 0 4px !important;
30
30
 
31
31
  line-height: 2;
32
- color: theme(textColor.base);
32
+ color: var(--text-color-base);
33
33
 
34
- background-color: theme(backgroundColor.base);
35
- border: 1px solid theme(borderColor.base);
36
- border-radius: theme(borderRadius.sm);
34
+ background-color: var(--bg-color-base);
35
+ border: 1px solid var(--border-color-base);
36
+ border-radius: var(--rounded-sm);
37
37
  box-shadow: none;
38
38
 
39
39
  &:focus {
40
- border-color: theme(borderColor.primary.DEFAULT);
40
+ border-color: var(--border-primary-500);
41
41
  }
42
42
  }
43
43
 
44
44
  & label {
45
- color: theme(textColor.base);
45
+ color: var(--text-color-base);
46
46
  }
47
47
 
48
- & :global(.flexbox-fix) {
48
+ & .flexbox-fix {
49
49
  justify-content: center;
50
- border-color: theme(borderColor.muted);
50
+ border-color: var(--border-color-muted);
51
51
 
52
52
  & > div > div {
53
53
  text-align: center;
54
54
  }
55
55
 
56
56
  & span > div {
57
- box-shadow: 0 0 1px 1px theme(borderColor.base) inset !important;
57
+ box-shadow: 0 0 1px 1px var(--border-color-base) inset !important;
58
58
  }
59
59
  }
60
60
 
61
- & :global(.saturation-black) ~ div {
61
+ & .saturation-black ~ div {
62
62
  pointer-events: none;
63
63
  }
64
64
  }
@@ -21,28 +21,28 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  */
23
23
 
24
- @layer comp {
25
- .fieldWrapper {
24
+ @layer components {
25
+ .fabric-fieldWrapper {
26
26
  /* later */
27
27
  }
28
28
  }
29
29
 
30
- @layer var {
31
- .inputWrapper {
30
+ @layer variants {
31
+ .fabric-inputWrapper {
32
32
  &::after {
33
33
  inset-inline: 50%;
34
34
  transition: all 300ms;
35
35
  transition-delay: 100ms;
36
36
  }
37
37
 
38
- & .decorate:has([data-ref="button"]) {
38
+ & .fabric-decorate:has([data-ref="button"]) {
39
39
  display: flex;
40
40
  align-self: stretch;
41
41
  }
42
42
 
43
43
  &:has(input[disabled], textarea[disabled]) {
44
44
  cursor: not-allowed;
45
- background-color: theme(colors.tint.50);
45
+ background-color: var(--color-tint-50);
46
46
 
47
47
  & input,
48
48
  & textarea {
@@ -54,14 +54,14 @@
54
54
  &:has([data-open="true"]) {
55
55
  z-index: 1;
56
56
  background-color: var(--fabric-input-focus);
57
- outline-color: var(--primary);
57
+ outline-color: var(--color-primary);
58
58
 
59
59
  &:not(:has([aria-readonly="true"]:not([hidden])))::after {
60
60
  inset-inline: 0;
61
61
  }
62
62
  }
63
63
 
64
- &:global(.fixed) {
64
+ &.fixed {
65
65
  box-shadow: 0 0 2rem 0.5rem var(--fabric-shadow);
66
66
  }
67
67
 
@@ -96,33 +96,33 @@
96
96
  appearance: none;
97
97
  }
98
98
 
99
- & input[type="date"]:global(.empty)::-webkit-datetime-edit,
100
- & input[type="datetime-local"]:global(.empty)::-webkit-datetime-edit {
101
- color: theme(colors.tint.400);
99
+ & input[type="date"].empty::-webkit-datetime-edit,
100
+ & input[type="datetime-local"].empty::-webkit-datetime-edit {
101
+ color: var(--color-tint-400);
102
102
  }
103
103
 
104
104
  & input:-webkit-autofill {
105
105
  box-shadow: 0 0 0 999em var(--fabric-input) inset;
106
106
 
107
- -webkit-text-fill-color: theme(colors.accent.700);
107
+ -webkit-text-fill-color: var(--color-accent-700);
108
108
  }
109
109
 
110
110
  & input:-webkit-autofill:focus {
111
111
  box-shadow: 0 0 0 999em var(--fabric-input-focus) inset;
112
112
 
113
- -webkit-text-fill-color: theme(colors.accent.700);
113
+ -webkit-text-fill-color: var(--color-accent-700);
114
114
  }
115
115
 
116
- &.invalidWrapper {
117
- outline-color: theme(colors.danger.500);
116
+ &.fabric-invalidWrapper {
117
+ outline-color: var(--color-danger-500);
118
118
 
119
119
  &::after {
120
- background-color: theme(colors.danger.500);
120
+ background-color: var(--color-danger-500);
121
121
  }
122
122
  }
123
123
  }
124
124
 
125
- .fieldGroup {
125
+ .fabric-fieldGroup {
126
126
  > * {
127
127
  line-height: 1;
128
128
  }
@@ -21,19 +21,19 @@
21
21
  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
22
  */
23
23
 
24
- @layer comp {
25
- .fileInput {
24
+ @layer components {
25
+ .fabric-fileInput {
26
26
  &::-webkit-file-upload-button {
27
27
  cursor: pointer;
28
28
 
29
29
  padding-block: 0;
30
30
 
31
- color: theme(textColor.white);
31
+ color: var(--text-white);
32
32
 
33
33
  opacity: 0.8;
34
- background-color: theme(backgroundColor.primary.500);
34
+ background-color: var(--bg-primary-500);
35
35
  border: 0;
36
- border-radius: theme(borderRadius.DEFAULT);
36
+ border-radius: var(--rounded);
37
37
 
38
38
  &:hover {
39
39
  opacity: 0.9;
@@ -41,12 +41,12 @@
41
41
  }
42
42
 
43
43
  &[aria-invalid="true"]::-webkit-file-upload-button {
44
- background-color: theme(backgroundColor.danger.500);
44
+ background-color: var(--bg-danger-500);
45
45
  }
46
46
 
47
47
  &:disabled::-webkit-file-upload-button {
48
48
  pointer-events: none;
49
- background-color: theme(backgroundColor.muted);
49
+ background-color: var(--bg-color-muted);
50
50
  }
51
51
 
52
52
  &[readOnly] {
package/css/styles.css ADDED
@@ -0,0 +1,27 @@
1
+ /*
2
+ * React Fabric
3
+ * @version: 1.0.0
4
+ *
5
+ *
6
+ * The MIT License (MIT)
7
+ * Copyright (c) 2025 Adarsh Pastakia
8
+ *
9
+ * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
10
+ * and associated documentation files (the "Software"), to deal in the Software without restriction,
11
+ * including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
12
+ * and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
13
+ * subject to the following conditions:
14
+ *
15
+ * The above copyright notice and this permission notice shall be included in all copies or substantial
16
+ * portions of the Software.
17
+ *
18
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19
+ * TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
20
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
22
+ */
23
+
24
+ @import "./_arrayInput.css";
25
+ @import "./_colorPicker.css";
26
+ @import "./_field.css";
27
+ @import "./_file.css";
@@ -7,23 +7,29 @@ var _regeneratorRuntime = require('@babel/runtime/regenerator');
7
7
  var core = require('@react-fabric/core');
8
8
  var utilities = require('@react-fabric/utilities');
9
9
  var react = require('react');
10
+ var reactI18next = require('react-i18next');
10
11
  var useFileUploader = require('../hooks/useFileUploader.js');
11
12
  var Field = require('../input/Field.js');
12
13
  var Hidden = require('../input/Hidden.js');
13
14
  var jsxRuntime = require('react/jsx-runtime');
14
15
 
15
- var _excluded = ["uploadHandler", "inline", "label", "accept", "value", "fileUrl", "multiple"];
16
+ var _excluded = ["uploadHandler", "inline", "label", "accept", "value", "fileUrl", "multiple", "invalid", "error"];
16
17
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
17
18
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18
19
  var FileField = function FileField(_ref) {
20
+ var _error$values$label, _error$values, _error$values2;
19
21
  var uploadHandler = _ref.uploadHandler,
20
22
  inline = _ref.inline,
21
23
  label = _ref.label,
22
24
  accept = _ref.accept,
23
25
  value = _ref.value;
24
26
  _ref.fileUrl;
25
- var multiple = _ref.multiple,
27
+ var multiple = _ref.multiple;
28
+ _ref.invalid;
29
+ var error = _ref.error,
26
30
  rest = _objectWithoutProperties(_ref, _excluded);
31
+ var _useTranslation = reactI18next.useTranslation(),
32
+ t = _useTranslation.t;
27
33
  var _useFileUploader = useFileUploader.useFileUploader( /*#__PURE__*/function () {
28
34
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(data, config) {
29
35
  return _regeneratorRuntime.wrap(function _callee$(_context) {
@@ -49,32 +55,38 @@ var FileField = function FileField(_ref) {
49
55
  upload = _useFileUploader.upload,
50
56
  remove = _useFileUploader.remove;
51
57
  return /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
52
- children: [/*#__PURE__*/jsxRuntime.jsxs(Field.Field, {
58
+ children: [/*#__PURE__*/jsxRuntime.jsx(Field.Field, {
53
59
  plain: true,
54
60
  inline: inline,
55
61
  label: label,
56
- className: "inline-block",
57
- children: [/*#__PURE__*/jsxRuntime.jsx(Hidden.HiddenInput, _objectSpread({
62
+ children: /*#__PURE__*/jsxRuntime.jsx(Hidden.HiddenInput, _objectSpread({
58
63
  hiddenValue: multiple ? list : list === null || list === void 0 ? void 0 : list[0]
59
- }, rest)), /*#__PURE__*/jsxRuntime.jsx("span", {
60
- children: /*#__PURE__*/jsxRuntime.jsx(core.Button, {
61
- badge: pending > 0 ? "".concat(pending) : undefined,
62
- "data-ref": "filebtn",
63
- children: /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
64
- children: [/*#__PURE__*/jsxRuntime.jsx("span", {
65
- children: "Add file"
66
- }), /*#__PURE__*/jsxRuntime.jsx("input", {
67
- type: "file",
68
- accept: accept,
69
- multiple: multiple,
70
- className: "absolute inset-0 opacity-0 z-5",
71
- onChange: function onChange(e) {
72
- return [upload(e.target.files), e.target.value = ""];
73
- }
74
- })]
75
- })
64
+ }, rest))
65
+ }), /*#__PURE__*/jsxRuntime.jsx(core.Tooltip, {
66
+ color: "danger-200",
67
+ content: utilities.isString(error) ? "".concat(error) : error && t(error === null || error === void 0 ? void 0 : error.key, error.values ? _objectSpread(_objectSpread({}, error === null || error === void 0 ? void 0 : error.values), {}, {
68
+ label: t((_error$values$label = (_error$values = error.values) === null || _error$values === void 0 ? void 0 : _error$values.label) !== null && _error$values$label !== void 0 ? _error$values$label : "form:badkey", (_error$values2 = error.values) === null || _error$values2 === void 0 ? void 0 : _error$values2.path)
69
+ }) : {}),
70
+ disabled: !error,
71
+ children: /*#__PURE__*/jsxRuntime.jsx(core.Button, {
72
+ badge: pending > 0 ? "".concat(pending) : undefined,
73
+ color: error ? "danger" : undefined,
74
+ variant: error ? "soft" : undefined,
75
+ "data-ref": "filebtn",
76
+ children: /*#__PURE__*/jsxRuntime.jsxs(react.Fragment, {
77
+ children: [/*#__PURE__*/jsxRuntime.jsx("span", {
78
+ children: "Add file"
79
+ }), /*#__PURE__*/jsxRuntime.jsx("input", {
80
+ type: "file",
81
+ accept: accept,
82
+ multiple: multiple,
83
+ className: "absolute inset-0 opacity-0 z-5",
84
+ onChange: function onChange(e) {
85
+ return [upload(e.target.files), e.target.value = ""];
86
+ }
87
+ })]
76
88
  })
77
- })]
89
+ })
78
90
  }), /*#__PURE__*/jsxRuntime.jsx("br", {}), /*#__PURE__*/jsxRuntime.jsx("div", {
79
91
  className: "bg-alternate",
80
92
  children: files.map(function (file, idx) {
@@ -11,7 +11,6 @@ var react = require('react');
11
11
  var reactHookForm = require('react-hook-form');
12
12
  var reactI18next = require('react-i18next');
13
13
  var FieldWrapper = require('../internal/FieldWrapper.js');
14
- var ArrayInput_module = require('./ArrayInput.module.css');
15
14
  var modifiers = require('@dnd-kit/modifiers');
16
15
  var utilities = require('@dnd-kit/utilities');
17
16
  var jsxRuntime = require('react/jsx-runtime');
@@ -135,7 +134,7 @@ var ArrayInput = function ArrayInput(_ref) {
135
134
  return /*#__PURE__*/jsxRuntime.jsx("div", {
136
135
  className: "flex justify-end",
137
136
  children: /*#__PURE__*/jsxRuntime.jsx(core$1.Tooltip, {
138
- color: "danger",
137
+ color: "danger-200",
139
138
  content: utilities$1.isString(error) ? "".concat(error) : t(error === null || error === void 0 ? void 0 : error.key, error !== null && error !== void 0 && error.values ? _objectSpread(_objectSpread({}, error === null || error === void 0 ? void 0 : error.values), {}, {
140
139
  label: t((_error$values$label = (_error$values = error.values) === null || _error$values === void 0 ? void 0 : _error$values.label) !== null && _error$values$label !== void 0 ? _error$values$label : "form:badkey", (_error$values2 = error.values) === null || _error$values2 === void 0 ? void 0 : _error$values2.path)
141
140
  }) : {}),
@@ -148,14 +147,14 @@ var ArrayInput = function ArrayInput(_ref) {
148
147
  },
149
148
  "data-invalid": !!error,
150
149
  disabled: !!disabled || readOnly || fields.length > maxItems,
151
- className: classNames(ArrayInput_module.addButton, "me-10"),
150
+ className: classNames("fabric-addButton", "me-10"),
152
151
  children: addLabel !== null && addLabel !== void 0 ? addLabel : t("addArray")
153
152
  })
154
153
  })
155
154
  });
156
155
  }, [error, fields, handleAdd, disabled, readOnly, addLabel, maxItems]);
157
156
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
158
- className: ArrayInput_module.arrayInput,
157
+ className: "fabric-arrayInput",
159
158
  children: [/*#__PURE__*/jsxRuntime.jsx(FieldWrapper.FieldWrapper, _objectSpread(_objectSpread({}, rest), {}, {
160
159
  appendLabel: /*#__PURE__*/jsxRuntime.jsx("div", {
161
160
  className: "-me-2",
@@ -80,7 +80,7 @@ var AvatarInput = function AvatarInput(_ref) {
80
80
  size: size,
81
81
  avatar: base64
82
82
  }), /*#__PURE__*/jsxRuntime.jsxs("div", {
83
- className: "absolute inset-x-0 bottom-0 cursor-pointer bg-opacity-20 hover:bg-opacity-50 bg-black text-white text-xs text-center py-1",
83
+ className: "absolute inset-x-0 bottom-0 cursor-pointer bg-black/20 hover:bg-black/50 text-white text-xs text-center py-1",
84
84
  children: [/*#__PURE__*/jsxRuntime.jsx("span", {
85
85
  children: "Edit"
86
86
  }), /*#__PURE__*/jsxRuntime.jsx("input", {
@@ -67,7 +67,7 @@ var Checkbox = function Checkbox(_ref) {
67
67
  checked: actualValue,
68
68
  onChange: handleChange
69
69
  }, rest)), /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
70
- className: classNames("p-0.5", actualValue && icon && !iconChecked && "bg-primary-500 text-white"),
70
+ className: classNames("p-0.5", actualValue && icon && !iconChecked && "bg-primary-500 text-white!"),
71
71
  size: "1.25em",
72
72
  color: invalid ? "danger" : "primary",
73
73
  icon: actualValue ? iconOn : iconOff
@@ -77,7 +77,7 @@ var ColorInput = function ColorInput(_ref) {
77
77
  getReferenceProps = _useInteractions.getReferenceProps,
78
78
  getFloatingProps = _useInteractions.getFloatingProps;
79
79
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
80
- className: classNames("flex-content min-h-[1.5em] min-w-[3.5em] self-stretch flex items-center outline-tint-200 rounded", !disabled && "bg-base", !noOutline && "bg-[var(--fabric-input)] outline overflow-hidden"),
80
+ className: classNames("flex-content min-h-[1.5em] min-w-[3.5em] self-stretch flex items-center outline-tint-200 rounded", !disabled && "bg-base", !noOutline && "bg-(--fabric-input) outline overflow-hidden"),
81
81
  children: [decorateStart && /*#__PURE__*/jsxRuntime.jsx("div", {
82
82
  className: classNames("text-muted leading-none flex-content", utilities.isString(decorateStart) && "px-2"),
83
83
  children: decorateStart
@@ -5,7 +5,6 @@ var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
5
5
  var Color = require('color');
6
6
  var react = require('react');
7
7
  var reactColor = require('react-color');
8
- var ColorPicker_module = require('./ColorPicker.module.css');
9
8
  var jsxRuntime = require('react/jsx-runtime');
10
9
 
11
10
  var _excluded = ["a"],
@@ -37,7 +36,7 @@ var ColorPicker = /*#__PURE__*/react.memo(function (_ref) {
37
36
  }, [onChange]);
38
37
  return /*#__PURE__*/jsxRuntime.jsx(reactColor.SketchPicker, {
39
38
  width: "16rem",
40
- className: ColorPicker_module.colorPicker,
39
+ className: "fabric-colorPicker",
41
40
  styles: {
42
41
  "default": {
43
42
  hue: {
@@ -5,7 +5,6 @@ var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProp
5
5
  var core = require('@react-fabric/core');
6
6
  var classNames = require('classnames');
7
7
  var react = require('react');
8
- var Field_module = require('../internal/Field.module.css');
9
8
  var FieldWrapper = require('../internal/FieldWrapper.js');
10
9
  var jsxRuntime = require('react/jsx-runtime');
11
10
 
@@ -20,7 +19,7 @@ var Field = function Field(_ref) {
20
19
  rest = _objectWithoutProperties(_ref, _excluded);
21
20
  return /*#__PURE__*/jsxRuntime.jsx(FieldWrapper.FieldWrapper, _objectSpread(_objectSpread({}, rest), {}, {
22
21
  children: /*#__PURE__*/jsxRuntime.jsx("div", {
23
- className: classNames(Field_module.fieldGroup, !plain && !noOutline && "outline", !plain && "bg-base", plain && "flex-wrap", "flex-1 rounded", !vertical && "flex"),
22
+ className: classNames("fabric-fieldGroup", !plain && !noOutline && "outline", !plain && "bg-base", plain && "flex-wrap", "flex-1 rounded", !vertical && "flex"),
24
23
  children: core.cloneChildren(children, function (child) {
25
24
  return /*#__PURE__*/react.cloneElement(child, {
26
25
  "data-inner": true
@@ -9,7 +9,6 @@ var classNames = require('classnames');
9
9
  var react = require('react');
10
10
  var InputWrapper = require('../internal/InputWrapper.js');
11
11
  var eventHandlers = require('../utils/eventHandlers.js');
12
- var File_module = require('./File.module.css');
13
12
  var jsxRuntime = require('react/jsx-runtime');
14
13
 
15
14
  var _excluded = ["ref", "value", "invalid", "readOnly", "disabled", "required", "placeholder", "autoFocus", "error", "name", "accept", "showList", "multiple", "onChange", "onEnterPressed"];
@@ -139,7 +138,7 @@ var FileInput = function FileInput(_ref) {
139
138
  })
140
139
  }, rest), {}, {
141
140
  children: /*#__PURE__*/jsxRuntime.jsx("input", {
142
- className: classNames("appearance-none bg-transparent py-1 px-2 flex-1 border-none outline-none ring-0", File_module.fileInput, utilities.isArray(actualValue) && (actualValue === null || actualValue === void 0 ? void 0 : actualValue.length) && "text-[var(--fabric-bg)]"),
141
+ className: classNames("appearance-none bg-transparent py-1 px-2 flex-1 border-none outline-none ring-0", "fabric-fileInput", utilities.isArray(actualValue) && (actualValue === null || actualValue === void 0 ? void 0 : actualValue.length) && "text-(--fabric-bg)"),
143
142
  "aria-invalid": invalid,
144
143
  "aria-disabled": disabled,
145
144
  "aria-readonly": readOnly,
@@ -51,7 +51,7 @@ var Radio = function Radio(_ref) {
51
51
  autoComplete: "off",
52
52
  onChange: handleChange
53
53
  }, rest)), /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
54
- className: classNames("p-0.5 hidden peer-checked:inline-block", icon && !iconChecked && "bg-primary-500 text-white"),
54
+ className: classNames("p-0.5 hidden peer-checked:inline-block", icon && !iconChecked && "bg-primary-500 text-white!"),
55
55
  color: invalid ? "danger" : "primary",
56
56
  size: "1.25em",
57
57
  icon: iconOn
@@ -20,7 +20,7 @@ var ErrorIcon = function ErrorIcon(_ref) {
20
20
  label: t((_error$values$label = (_error$values = error.values) === null || _error$values === void 0 ? void 0 : _error$values.label) !== null && _error$values$label !== void 0 ? _error$values$label : "form:badkey", (_error$values2 = error.values) === null || _error$values2 === void 0 ? void 0 : _error$values2.path)
21
21
  }) : {}),
22
22
  placement: "bottom",
23
- color: "danger",
23
+ color: "danger-200",
24
24
  children: /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
25
25
  className: "flex-content first:ms-2 self-center",
26
26
  color: "danger",
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
 
3
3
  var classNames = require('classnames');
4
- var Field_module = require('./Field.module.css');
5
4
  var jsxRuntime = require('react/jsx-runtime');
6
5
 
7
6
  /*
@@ -42,7 +41,7 @@ var FieldWrapper = function FieldWrapper(_ref) {
42
41
  className = _ref.className,
43
42
  isInner = _ref["data-inner"];
44
43
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
45
- className: classNames(Field_module.fieldWrapper, className, inline ? "flex flex-nowrap gap-1" : "block"),
44
+ className: classNames("fabric-fieldWrapper", className, inline ? "flex flex-nowrap gap-1" : "block"),
46
45
  "data-ref": "fieldWrapper",
47
46
  style: {
48
47
  width: width,
@@ -9,7 +9,6 @@ var classNames = require('classnames');
9
9
  var react = require('react');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  var ErrorIcon = require('./ErrorIcon.js');
12
- var Field_module = require('./Field.module.css');
13
12
  var FieldWrapper = require('./FieldWrapper.js');
14
13
 
15
14
  var _excluded = ["invalid", "error", "allowClear", "showClear", "decorateStart", "decorateEnd", "decorateEndShowWhenEmpty", "decorateEndHideWhenEmpty", "children", "onClear", "noOutline", "noBorder", "textarea", "textareaExpandable", "data-inner", "data-open", "floatingExpand", "wrapperRef", "width"];
@@ -69,13 +68,13 @@ var InputWrapper = function InputWrapper(_ref) {
69
68
  var el = /*#__PURE__*/jsxRuntime.jsxs("div", {
70
69
  role: "none",
71
70
  ref: wrapperRef,
72
- className: classNames(Field_module.inputWrapper, invalid && Field_module.invalidWrapper, !noOutline && !noBorder && "bg-[var(--fabric-input)] outline overflow-hidden", "flex flex-nowrap items-center flex-1", textarea ? "rounded-capped group" : "rounded", isExpanded ? "fixed inset-4 z-[99]" : floatingExpand ? "absolute inset-x-0" : "relative", !noOutline && "after:absolute after:bottom-0 after:h-px after:bg-primary-500 after:mx-auto"),
71
+ className: classNames("fabric-inputWrapper", invalid && "fabric-invalidWrapper", !noOutline && !noBorder && "bg-(--fabric-input) outline overflow-hidden", "flex flex-nowrap items-center flex-1", textarea ? "rounded-capped group" : "rounded", isExpanded ? "fixed inset-4 z-[99]" : floatingExpand ? "absolute inset-x-0" : "relative", !noOutline && "after:absolute after:bottom-0 after:h-px after:bg-primary-500 after:mx-auto"),
73
72
  onKeyDown: function onKeyDown(e) {
74
73
  return e.key === "Escape" && isExpanded && (setExpanded(false), e.stopPropagation());
75
74
  },
76
75
  children: [decorateStart && /*#__PURE__*/jsxRuntime.jsx("div", {
77
76
  onClickCapture: doFocus,
78
- className: classNames(Field_module.decorate, "text-muted leading-none flex-content", utilities.isString(decorateStart) && "px-1"),
77
+ className: classNames("fabric-decorate", "text-muted leading-none flex-content", utilities.isString(decorateStart) && "px-1"),
79
78
  children: decorateStart
80
79
  }), /*#__PURE__*/jsxRuntime.jsx(ErrorIcon.ErrorIcon, {
81
80
  invalid: invalid,
@@ -83,10 +82,10 @@ var InputWrapper = function InputWrapper(_ref) {
83
82
  }), children, allowClear && showClear && /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
84
83
  icon: core.CoreIcons.close,
85
84
  onClick: handleClear,
86
- className: classNames("text-tint-500 hover:text-tint-700 p-1 z-1 flex-content", Field_module.inputClear, textarea && "self-start mt-1 me-1")
85
+ className: classNames("text-tint-500 hover:text-tint-700 p-1 z-1 flex-content", "fabric-inputClear", textarea && "self-start mt-1 me-1")
87
86
  }), decorateEnd && /*#__PURE__*/jsxRuntime.jsx("div", {
88
87
  onClickCapture: doFocus,
89
- className: classNames(Field_module.decorate, "text-muted leading-none flex-content", utilities.isString(decorateEnd) && "px-1", decorateEndHideWhenEmpty && "peer-placeholder-shown:hidden", decorateEndShowWhenEmpty && "hidden peer-placeholder-shown:inline-block"),
88
+ className: classNames("fabric-decorate", "text-muted leading-none flex-content", utilities.isString(decorateEnd) && "px-1", decorateEndHideWhenEmpty && "peer-placeholder-shown:hidden", decorateEndShowWhenEmpty && "hidden peer-placeholder-shown:inline-block"),
90
89
  children: decorateEnd
91
90
  }), textareaExpandable && /*#__PURE__*/jsxRuntime.jsx(core.Icon, {
92
91
  onClick: function onClick() {
@@ -243,7 +243,7 @@ var AutoComplete = function AutoComplete(_ref) {
243
243
  visuallyHiddenDismiss: true,
244
244
  children: /*#__PURE__*/jsxRuntime.jsx(Options.Options, _objectSpread(_objectSpread({
245
245
  ref: refs.setFloating,
246
- className: "outline shadow-lg max-h-[40vh] z-[var(--z-popover)]",
246
+ className: "outline shadow-lg max-h-[40vh] z-(--z-popover)",
247
247
  style: _objectSpread({
248
248
  width: (_refs$reference$curre = refs.reference.current) === null || _refs$reference$curre === void 0 ? void 0 : _refs$reference$curre.getBoundingClientRect().width
249
249
  }, floatingStyles)
@@ -262,7 +262,7 @@ var Select = function Select(_ref) {
262
262
  visuallyHiddenDismiss: true,
263
263
  children: /*#__PURE__*/jsxRuntime.jsx(Options.Options, _objectSpread(_objectSpread({
264
264
  ref: refs.setFloating,
265
- className: "outline shadow-lg max-h-[40vh] z-[var(--z-popover)]",
265
+ className: "outline shadow-lg max-h-[40vh] z-(--z-popover)",
266
266
  style: _objectSpread({
267
267
  width: (_refs$reference$curre = refs.reference.current) === null || _refs$reference$curre === void 0 ? void 0 : _refs$reference$curre.getBoundingClientRect().width
268
268
  }, floatingStyles)