@gridui/form 4.1.2 → 4.2.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/README.md CHANGED
@@ -3,10 +3,20 @@
3
3
  Core family. Public API: `ActionForm`, `ActionFormProps`, `Field`, `FieldGrid`, `FieldGridProps`, `FieldNote`, `FieldNoteProps`, `FieldProps`, `Fieldset`, `FieldsetProps`, `ListFieldControl`, `ListFieldControlProps`, `ListFieldProps`, `SearchForm`, `SearchFormProps`, `fieldClass`, `focusInvalidControl`, `runFormAction`, `useFormReset`, `useListField`.
4
4
 
5
5
  Import components from `@gridui/form` and load `@gridui/form/styles.css` after Theme.
6
- Load styles for any composed dependency used by this family. Applications own routes, labels, state persistence, and branding.
6
+ Applications own routes, labels, state persistence, and branding.
7
7
 
8
8
  See [component ownership](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/component-ownership.md) and [release history](https://github.com/sudo-ui/GridUI-React-Monorepo/tree/main/packages-core/form/.changeset/history).
9
9
 
10
+ ## Styles
11
+
12
+ Load Theme once. Use `@gridui/form/styled` for automatic component CSS in
13
+ CSS-aware bundlers, or keep the CSS-free root import and load `@gridui/form/styles.css`.
14
+ Both entries expose the same root API. The standalone stylesheet includes component
15
+ dependency styles; Theme/reset remain separate. See the
16
+ [integration guide](https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/docs/usage/integration.md)
17
+ for static HTML loading, SSR limits, and avoiding duplicate CSS.
18
+
19
+
10
20
  ## Form controls
11
21
 
12
22
  Read [Fields and native controls](docs/guides/fields.md).
package/dist/styled.js ADDED
@@ -0,0 +1,2 @@
1
+ import "./styles.local.css";
2
+ export * from "./index.js";
@@ -0,0 +1,101 @@
1
+ /*! tailwindcss v4.3.5 | MIT License | https://tailwindcss.com */
2
+ @layer properties;
3
+ @layer theme, base, components, utilities;
4
+ @layer theme {
5
+ :root, :host {
6
+ --spacing: 0.25rem;
7
+ }
8
+ }
9
+ @layer utilities {
10
+ .gridui-u-form--sr-only {
11
+ position: absolute;
12
+ width: 1px;
13
+ height: 1px;
14
+ padding: 0;
15
+ margin: -1px;
16
+ overflow: hidden;
17
+ clip-path: inset(50%);
18
+ white-space: nowrap;
19
+ border-width: 0;
20
+ }
21
+ .gridui-u-form--m-0 {
22
+ margin: 0px;
23
+ }
24
+ .gridui-u-form--flex {
25
+ display: flex;
26
+ }
27
+ .gridui-u-form--grid {
28
+ display: grid;
29
+ }
30
+ .gridui-u-form--min-w-0 {
31
+ min-width: 0px;
32
+ }
33
+ .gridui-u-form--flex-1 {
34
+ flex: 1;
35
+ }
36
+ .gridui-u-form--basis-48 {
37
+ flex-basis: calc(var(--spacing) * 48);
38
+ }
39
+ .gridui-u-form--grid-cols-2 {
40
+ grid-template-columns: repeat(2, minmax(0, 1fr));
41
+ }
42
+ .gridui-u-form--flex-wrap {
43
+ flex-wrap: wrap;
44
+ }
45
+ .gridui-u-form--items-end {
46
+ align-items: flex-end;
47
+ }
48
+ .gridui-u-form--gap-gridui-8 {
49
+ gap: var(--gridui-space-8);
50
+ }
51
+ .gridui-u-form--gap-gridui-16 {
52
+ gap: var(--gridui-space-16);
53
+ }
54
+ .gridui-u-form--border-0 {
55
+ border-style: var(--tw-border-style);
56
+ border-width: 0px;
57
+ }
58
+ .gridui-u-form--p-0 {
59
+ padding: 0px;
60
+ }
61
+ .gridui-u-form--type-supporting {
62
+ font: var(--gridui-type-supporting);
63
+ font-family: var(--gridui-font-body);
64
+ letter-spacing: normal;
65
+ }
66
+ .gridui-u-form--wrap-anywhere {
67
+ overflow-wrap: anywhere;
68
+ }
69
+ .gridui-u-form--text-muted {
70
+ color: var(--gridui-muted);
71
+ }
72
+ .gridui-u-form--data-\[invalid\=\'true\'\]\:text-status-danger-text[data-invalid='true'] {
73
+ color: var(--gridui-status-danger-text);
74
+ }
75
+ :is(.gridui-u-form--\*\:data-\[span\=\'full\'\]\:col-span-full > *)[data-span='full'] {
76
+ grid-column: 1 / -1;
77
+ }
78
+ .gridui-u-form--\[\&\>legend\]\:mb-gridui-24 > legend {
79
+ margin-bottom: var(--gridui-space-24);
80
+ }
81
+ .gridui-u-form--\[\&\>legend\]\:p-0 > legend {
82
+ padding: 0px;
83
+ }
84
+ @media (max-width:24rem) {
85
+ .gridui-u-form--\[\@media\(max-width\:24rem\)\]\:grid-cols-\[1fr\] {
86
+ grid-template-columns: 1fr;
87
+ }
88
+ }
89
+ }
90
+ @property --tw-border-style {
91
+ syntax: "*";
92
+ inherits: false;
93
+ initial-value: solid;
94
+ }
95
+ @layer properties {
96
+ @supports ((-webkit-hyphens: none) and (not (margin-trim: block))) or ((-moz-orient: inline) and (not (color:rgb(from red r g b)))) {
97
+ *, ::before, ::after, ::backdrop {
98
+ --tw-border-style: solid;
99
+ }
100
+ }
101
+ }
package/docs/catalog.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "name": "@gridui/form",
4
- "version": "4.1.2",
4
+ "version": "4.2.0",
5
5
  "category": "core",
6
6
  "description": "GridUI React form",
7
7
  "usage": "Read Fields and native controls.",
@@ -147,6 +147,7 @@
147
147
  "@gridui/theme/styles.css",
148
148
  "@gridui/form/styles.css"
149
149
  ],
150
+ "styledImport": "@gridui/form/styled",
150
151
  "examples": [
151
152
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/form/stories/custom-controls.mdx",
152
153
  "https://github.com/sudo-ui/GridUI-React-Monorepo/blob/main/packages-core/form/stories/field-associations.mdx",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gridui/form",
3
- "version": "4.1.2",
3
+ "version": "4.2.0",
4
4
  "description": "GridUI React form",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -10,14 +10,19 @@
10
10
  "docs"
11
11
  ],
12
12
  "sideEffects": [
13
- "**/*.css"
13
+ "**/*.css",
14
+ "./dist/styled.js"
14
15
  ],
15
16
  "exports": {
16
17
  ".": {
17
18
  "types": "./dist/index.d.ts",
18
19
  "import": "./dist/index.js"
19
20
  },
20
- "./styles.css": "./dist/styles.css"
21
+ "./styles.css": "./dist/styles.css",
22
+ "./styled": {
23
+ "types": "./dist/index.d.ts",
24
+ "import": "./dist/styled.js"
25
+ }
21
26
  },
22
27
  "publishConfig": {
23
28
  "access": "public"
@@ -28,13 +33,13 @@
28
33
  },
29
34
  "dependencies": {
30
35
  "@gridui/style-utils": "^4.0.0",
31
- "@gridui/theme": "^3.0.0",
36
+ "@gridui/theme": "^4.0.0",
32
37
  "class-variance-authority": "0.7.1"
33
38
  },
34
39
  "devDependencies": {
35
40
  "@gridui-internal/configuration": "0.0.0-internal",
36
- "@gridui/button": "5.1.0",
37
- "@gridui/input": "4.0.2",
41
+ "@gridui/button": "5.2.0",
42
+ "@gridui/input": "4.1.0",
38
43
  "@jest/globals": "30.5.2",
39
44
  "@storybook/react-vite": "10.6.7",
40
45
  "@types/jest": "30.0.0",