@stack-spot/citric-react 0.13.0 → 0.14.1

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/dist/citric.css CHANGED
@@ -36,6 +36,7 @@
36
36
  }
37
37
 
38
38
  .text-h3 {
39
+ margin: 0;
39
40
  font: var(--font-h3);
40
41
  }
41
42
 
@@ -1932,6 +1933,13 @@ input[type="reset"][data-citric="icon-box"], .apply-citric input[type="reset"].c
1932
1933
  background-color: var(--light-400);
1933
1934
  width: fit-content;
1934
1935
 
1936
+ &.full-width {
1937
+ width: auto;
1938
+ input {
1939
+ flex: 1;
1940
+ }
1941
+ }
1942
+
1935
1943
  > :not(:first-child) {
1936
1944
  border-top-left-radius: 0 !important;
1937
1945
  border-bottom-left-radius: 0 !important;
@@ -7,7 +7,13 @@ export interface BaseFieldGroupProps {
7
7
  * @default true
8
8
  */
9
9
  auto?: boolean;
10
+ /**
11
+ * When this is true, the FieldGroup will occupy all the width available instead of just what its children need.
12
+ *
13
+ * @default false
14
+ */
15
+ fullWidth?: boolean;
10
16
  }
11
17
  export type FieldGroupProps = React.JSX.IntrinsicElements['div'] & BaseFieldGroupProps;
12
- export declare const FieldGroup: ({ auto, className, children, ...props }: FieldGroupProps) => import("react/jsx-runtime").JSX.Element;
18
+ export declare const FieldGroup: ({ auto, fullWidth, className, children, ...props }: FieldGroupProps) => import("react/jsx-runtime").JSX.Element;
13
19
  //# sourceMappingURL=FieldGroup.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../src/components/FieldGroup.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;CAChB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAA;AAEtF,eAAO,MAAM,UAAU,4CAA4D,eAAe,4CAIhG,CAAA"}
1
+ {"version":3,"file":"FieldGroup.d.ts","sourceRoot":"","sources":["../../src/components/FieldGroup.tsx"],"names":[],"mappings":"AAIA,MAAM,WAAW,mBAAmB;IAClC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,GAAG,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,mBAAmB,CAAA;AAEtF,eAAO,MAAM,UAAU,uDAAuE,eAAe,4CAS3G,CAAA"}
@@ -2,5 +2,5 @@ import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { listToClass } from '@stack-spot/portal-theme';
3
3
  import { withRef } from '../utils/react.js';
4
4
  import { CitricComponent } from './CitricComponent.js';
5
- export const FieldGroup = withRef(({ auto = true, className, children, ...props }) => (_jsx(CitricComponent, { tag: "div", component: "field-group", className: listToClass([className, auto && 'auto']), ...props, children: children })));
5
+ export const FieldGroup = withRef(({ auto = true, fullWidth, className, children, ...props }) => (_jsx(CitricComponent, { tag: "div", component: "field-group", className: listToClass([className, auto && 'auto', fullWidth && 'full-width']), ...props, children: children })));
6
6
  //# sourceMappingURL=FieldGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FieldGroup.js","sourceRoot":"","sources":["../../src/components/FieldGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAenD,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE,CAAC,CACrG,KAAC,eAAe,IAAC,GAAG,EAAC,KAAK,EAAC,SAAS,EAAC,aAAa,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,MAAM,CAAC,CAAC,KAAM,KAAK,YAC9G,QAAQ,GACO,CACnB,CAAC,CAAA"}
1
+ {"version":3,"file":"FieldGroup.js","sourceRoot":"","sources":["../../src/components/FieldGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAA;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAA;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAqBnD,MAAM,CAAC,MAAM,UAAU,GAAG,OAAO,CAAC,CAAC,EAAE,IAAI,GAAG,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAmB,EAAE,EAAE,CAAC,CAChH,KAAC,eAAe,IACd,GAAG,EAAC,KAAK,EACT,SAAS,EAAC,aAAa,EACvB,SAAS,EAAE,WAAW,CAAC,CAAC,SAAS,EAAE,IAAI,IAAI,MAAM,EAAE,SAAS,IAAI,YAAY,CAAC,CAAC,KAC1E,KAAK,YAER,QAAQ,GACO,CACnB,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stack-spot/citric-react",
3
- "version": "0.13.0",
3
+ "version": "0.14.1",
4
4
  "author": "StackSpot",
5
5
  "main": "dist/index.js",
6
6
  "typings": "dist/index.d.ts",
@@ -11,12 +11,23 @@ export interface BaseFieldGroupProps {
11
11
  * @default true
12
12
  */
13
13
  auto?: boolean,
14
+ /**
15
+ * When this is true, the FieldGroup will occupy all the width available instead of just what its children need.
16
+ *
17
+ * @default false
18
+ */
19
+ fullWidth?: boolean,
14
20
  }
15
21
 
16
22
  export type FieldGroupProps = React.JSX.IntrinsicElements['div'] & BaseFieldGroupProps
17
23
 
18
- export const FieldGroup = withRef(({ auto = true, className, children, ...props }: FieldGroupProps) => (
19
- <CitricComponent tag="div" component="field-group" className={listToClass([className, auto && 'auto'])} {...props}>
24
+ export const FieldGroup = withRef(({ auto = true, fullWidth, className, children, ...props }: FieldGroupProps) => (
25
+ <CitricComponent
26
+ tag="div"
27
+ component="field-group"
28
+ className={listToClass([className, auto && 'auto', fullWidth && 'full-width'])}
29
+ {...props}
30
+ >
20
31
  {children}
21
32
  </CitricComponent>
22
33
  ))