@luscii-healthtech/web-ui 58.16.0 → 58.18.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.
@@ -6,16 +6,18 @@ import { TertiaryButton } from './TertiaryButton.js';
6
6
 
7
7
  const TertiaryIconButton = React__default.forwardRef((props, innerRef) => {
8
8
  const { children: icon, size = "medium", label, expand = false } = props, rest = __rest(props, ["children", "size", "label", "expand"]);
9
+ const expandX = expand === true || expand === "x";
10
+ const expandY = expand === true || expand === "y";
9
11
  return jsx(TertiaryButton, Object.assign({ ref: innerRef }, rest, { "aria-label": label, size, leadingIcon: icon, className: classNames({
10
12
  /**
11
13
  * Add horizontal padding and possibly undo it with negative margin.
12
14
  */
13
15
  "ui:px-[calc(var(--ui-spacing-xxs)-1px)]": size === "medium",
14
- "ui:-mx-[calc(theme('spacing.xxs')-1px)]": expand && size === "medium",
16
+ "ui:-mx-[calc(theme('spacing.xxs')-1px)]": expandX && size === "medium",
15
17
  "ui:px-[calc(var(--ui-spacing-s)-1px)]": size === "large",
16
- "ui:-mx-[calc(theme('spacing.s')-1px)]": expand && size === "large",
17
- "ui:-my-[calc(theme('spacing.xxs')-1px)]": expand && size === "medium",
18
- "ui:-my-[calc(theme('spacing.s')-1px)]": expand && size === "large"
18
+ "ui:-mx-[calc(theme('spacing.s')-1px)]": expandX && size === "large",
19
+ "ui:-my-[calc(theme('spacing.xxs')-1px)]": expandY && size === "medium",
20
+ "ui:-my-[calc(theme('spacing.s')-1px)]": expandY && size === "large"
19
21
  }, props.className) }));
20
22
  });
21
23
 
@@ -1 +1 @@
1
- {"version":3,"file":"TertiaryIconButton.js","sources":["../../../../../../src/components/ButtonV2/TertiaryIconButton.tsx"],"sourcesContent":[null],"names":["React","_jsx"],"mappings":";;;;;;AAkBO,MAAM,kBAAA,GAAqBA,cAAA,CAAM,UAAA,CACtC,CAAC,OAAc,QAAA,KAAY;AACzB,EAAA,MAAM,EACJ,QAAA,EAAU,IAAA,EACV,OAAO,QAAA,EACP,KAAA,EACA,SAAS,KAAA,EAAK,GAEZ,KAAA,EADC,IAAA,UACD,KAAA,EANE,CAAA,YAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAML,CAAA;AAED,EAAA,OACEC,IAAC,cAAA,EAAc,MAAA,CAAA,MAAA,CAAA,EACb,KAAK,QAAA,EAAQ,EACT,IAAA,EAAI,EAAA,cACI,KAAA,EACZ,IAAA,EACA,WAAA,EAAa,IAAA,EACb,WAAW,UAAA,CACT;AAAA;AAAA;AAAA;AAAA,IAIE,2CAA2C,IAAA,KAAS,QAAA;AAAA,IACpD,yCAAA,EACE,UAAU,IAAA,KAAS,QAAA;AAAA,IAErB,yCAAyC,IAAA,KAAS,OAAA;AAAA,IAClD,uCAAA,EAAyC,UAAU,IAAA,KAAS,OAAA;AAAA,IAE5D,yCAAA,EACE,UAAU,IAAA,KAAS,QAAA;AAAA,IAErB,uCAAA,EAAyC,UAAU,IAAA,KAAS;AAAA,GAC7D,EACD,KAAA,CAAM,SAAS,CAAA,EAChB,CAAA,CAAA;AAGP,CAAC;;"}
1
+ {"version":3,"file":"TertiaryIconButton.js","sources":["../../../../../../src/components/ButtonV2/TertiaryIconButton.tsx"],"sourcesContent":[null],"names":["React","_jsx"],"mappings":";;;;;;AAqBO,MAAM,kBAAA,GAAqBA,cAAA,CAAM,UAAA,CACtC,CAAC,OAAc,QAAA,KAAY;AACzB,EAAA,MAAM,EACJ,QAAA,EAAU,IAAA,EACV,OAAO,QAAA,EACP,KAAA,EACA,SAAS,KAAA,EAAK,GAEZ,KAAA,EADC,IAAA,UACD,KAAA,EANE,CAAA,YAAA,MAAA,EAAA,OAAA,EAAA,QAAA,CAML,CAAA;AAED,EAAA,MAAM,OAAA,GAAU,MAAA,KAAW,IAAA,IAAQ,MAAA,KAAW,GAAA;AAC9C,EAAA,MAAM,OAAA,GAAU,MAAA,KAAW,IAAA,IAAQ,MAAA,KAAW,GAAA;AAE9C,EAAA,OACEC,IAAC,cAAA,EAAc,MAAA,CAAA,MAAA,CAAA,EACb,KAAK,QAAA,EAAQ,EACT,IAAA,EAAI,EAAA,cACI,KAAA,EACZ,IAAA,EACA,WAAA,EAAa,IAAA,EACb,WAAW,UAAA,CACT;AAAA;AAAA;AAAA;AAAA,IAIE,2CAA2C,IAAA,KAAS,QAAA;AAAA,IACpD,yCAAA,EACE,WAAW,IAAA,KAAS,QAAA;AAAA,IAEtB,yCAAyC,IAAA,KAAS,OAAA;AAAA,IAClD,uCAAA,EACE,WAAW,IAAA,KAAS,OAAA;AAAA,IAEtB,yCAAA,EACE,WAAW,IAAA,KAAS,QAAA;AAAA,IAEtB,uCAAA,EACE,WAAW,IAAA,KAAS;AAAA,GACvB,EACD,KAAA,CAAM,SAAS,CAAA,EAChB,CAAA,CAAA;AAGP,CAAC;;"}
@@ -1,15 +1,18 @@
1
1
  import { __rest } from '../../vendor/tslib/tslib.es6.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import React__default from 'react';
4
+ import classNames from 'classnames';
5
+ import { calculateResponsiveWidthClasses } from '../../utils/responsiveness.utils.js';
4
6
  import { Stack } from '../Stack/Stack.js';
5
7
  import { HelperAndErrorText } from '../forms/shared/HelperAndErrorText.js';
6
8
  import { LabelText } from '../forms/shared/LabelText.js';
7
9
  import { StyledInput } from './StyledInput.js';
8
10
 
9
11
  const LabeledInput = React__default.forwardRef((props, ref) => {
10
- const { className, helperText, errorText, label, fullWidth, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "fullWidth", "aria-describedby"]);
12
+ const { className, helperText, errorText, label, width, fullWidth, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "width", "fullWidth", "aria-describedby"]);
11
13
  const helperErrorTextId = React__default.useId();
12
- return jsxs(Stack, { as: "label", _gap: "s", align: fullWidth ? "stretch" : void 0, className, children: [label && jsx(LabelText, { children: props.label }), jsx(StyledInput, Object.assign({}, rest, { ref, isError: Boolean(errorText), "aria-describedby": [ariaDescribedBy, helperErrorTextId].join(" ") })), jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
14
+ const fieldWidth = width !== null && width !== void 0 ? width : fullWidth ? "full" : void 0;
15
+ return jsxs(Stack, { as: "label", _gap: "s", align: fieldWidth ? "stretch" : void 0, className: classNames(fieldWidth && calculateResponsiveWidthClasses(fieldWidth), className), children: [label && jsx(LabelText, { children: props.label }), jsx(StyledInput, Object.assign({}, rest, { ref, isError: Boolean(errorText), "aria-describedby": [ariaDescribedBy, helperErrorTextId].join(" ") })), jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
13
16
  });
14
17
 
15
18
  export { LabeledInput };
@@ -1 +1 @@
1
- {"version":3,"file":"LabeledInput.js","sources":["../../../../../../src/components/Input/LabeledInput.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;AAgEO,MAAM,YAAA,GAAeA,cAAA,CAAM,UAAA,CAChC,CAAC,OAAO,GAAA,KAAO;AAIb,EAAA,MAAM,EACJ,WACA,UAAA,EACA,SAAA,EACA,OACA,SAAA,EACA,kBAAA,EAAoB,iBAAe,GAEjC,KAAA,EADC,cACD,KAAA,EARE,CAAA,WAAA,EAAA,YAAA,EAAA,aAAA,OAAA,EAAA,WAAA,EAAA,kBAAA,CAQL,CAAA;AAED,EAAA,MAAM,iBAAA,GAAoBA,eAAM,KAAA;AAEhC,EAAA,OACEC,IAAA,CAAC,KAAA,EAAK,EACJ,EAAA,EAAG,OAAA,EACH,IAAA,EAAK,GAAA,EACL,KAAA,EAAO,SAAA,GAAY,SAAA,GAAY,MAAA,EAC/B,SAAA,aAEC,KAAA,IAASC,GAAA,CAAC,SAAA,cAAW,KAAA,CAAM,KAAA,EAAK,CAAA,EACjCA,GAAA,CAAC,WAAA,EAAW,MAAA,CAAA,MAAA,CAAA,IACN,IAAA,EAAI,EACR,GAAA,EACA,OAAA,EAAS,OAAA,CAAQ,SAAS,CAAA,EAAC,kBAAA,EACT,CAAC,eAAA,EAAiB,iBAAiB,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA,EAAC,CAAA,CAAA,EAGlEA,GAAA,CAAC,kBAAA,IACC,UAAA,EACA,SAAA,EACA,YAAA,EAAc,iBAAA,EAAiB,CAC/B,CAAA,EAAA,CAAA;AAGR,CAAC;;"}
1
+ {"version":3,"file":"LabeledInput.js","sources":["../../../../../../src/components/Input/LabeledInput.tsx"],"sourcesContent":[null],"names":["React","_jsxs","_jsx"],"mappings":";;;;;;;;;;AA0EO,MAAM,YAAA,GAAeA,cAAA,CAAM,UAAA,CAChC,CAAC,OAAO,GAAA,KAAO;AAIb,EAAA,MAAM,EACJ,WACA,UAAA,EACA,SAAA,EACA,OACA,KAAA,EACA,SAAA,EACA,kBAAA,EAAoB,eAAA,EAAe,GAEjC,KAAA,EADC,OAAI,MAAA,CACL,KAAA,EATE,CAAA,WAAA,EAAA,YAAA,EAAA,aAAA,OAAA,EAAA,OAAA,EAAA,WAAA,EAAA,kBAAA,CASL,CAAA;AAED,EAAA,MAAM,iBAAA,GAAoBA,eAAM,KAAA;AAChC,EAAA,MAAM,aAAa,KAAA,aAAA,UAAK,MAAA,GAAL,KAAA,GAAU,YAAY,MAAA,GAAS,MAAA;AAElD,EAAA,OACEC,IAAA,CAAC,KAAA,EAAK,EACJ,EAAA,EAAG,OAAA,EACH,IAAA,EAAK,GAAA,EACL,KAAA,EAAO,UAAA,GAAa,SAAA,GAAY,MAAA,EAChC,SAAA,EAAW,WACT,UAAA,IAAc,+BAAA,CAAgC,UAAU,CAAA,EACxD,SAAS,CAAA,aAGV,KAAA,IAASC,GAAA,CAAC,SAAA,EAAS,EAAA,QAAA,EAAE,KAAA,CAAM,KAAA,KAC5BA,GAAA,CAAC,WAAA,EAAW,MAAA,CAAA,MAAA,CAAA,EAAA,EACN,IAAA,IACJ,GAAA,EACA,OAAA,EAAS,OAAA,CAAQ,SAAS,CAAA,EAAC,kBAAA,EACT,CAAC,eAAA,EAAiB,iBAAiB,CAAA,CAAE,IAAA,CAAK,GAAG,CAAA,EAAC,CAAA,CAAA,EAGlEA,GAAA,CAAC,kBAAA,EAAkB,EACjB,UAAA,EACA,SAAA,EACA,YAAA,EAAc,iBAAA,EAAiB,CAC/B,GAAA,CAAA;AAGR,CAAC;;"}
@@ -2486,16 +2486,18 @@ const SecondaryIconButton = React__namespace.default.forwardRef((props, innerRef
2486
2486
 
2487
2487
  const TertiaryIconButton = React__namespace.default.forwardRef((props, innerRef) => {
2488
2488
  const { children: icon, size = "medium", label, expand = false } = props, rest = __rest(props, ["children", "size", "label", "expand"]);
2489
+ const expandX = expand === true || expand === "x";
2490
+ const expandY = expand === true || expand === "y";
2489
2491
  return jsxRuntime.jsx(TertiaryButton, Object.assign({ ref: innerRef }, rest, { "aria-label": label, size, leadingIcon: icon, className: classNames__default.default({
2490
2492
  /**
2491
2493
  * Add horizontal padding and possibly undo it with negative margin.
2492
2494
  */
2493
2495
  "ui:px-[calc(var(--ui-spacing-xxs)-1px)]": size === "medium",
2494
- "ui:-mx-[calc(theme('spacing.xxs')-1px)]": expand && size === "medium",
2496
+ "ui:-mx-[calc(theme('spacing.xxs')-1px)]": expandX && size === "medium",
2495
2497
  "ui:px-[calc(var(--ui-spacing-s)-1px)]": size === "large",
2496
- "ui:-mx-[calc(theme('spacing.s')-1px)]": expand && size === "large",
2497
- "ui:-my-[calc(theme('spacing.xxs')-1px)]": expand && size === "medium",
2498
- "ui:-my-[calc(theme('spacing.s')-1px)]": expand && size === "large"
2498
+ "ui:-mx-[calc(theme('spacing.s')-1px)]": expandX && size === "large",
2499
+ "ui:-my-[calc(theme('spacing.xxs')-1px)]": expandY && size === "medium",
2500
+ "ui:-my-[calc(theme('spacing.s')-1px)]": expandY && size === "large"
2499
2501
  }, props.className) }));
2500
2502
  });
2501
2503
 
@@ -3175,9 +3177,10 @@ const LabeledDatePicker = (_a) => {
3175
3177
  };
3176
3178
 
3177
3179
  const LabeledInput = React__namespace.default.forwardRef((props, ref) => {
3178
- const { className, helperText, errorText, label, fullWidth, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "fullWidth", "aria-describedby"]);
3180
+ const { className, helperText, errorText, label, width, fullWidth, "aria-describedby": ariaDescribedBy } = props, rest = __rest(props, ["className", "helperText", "errorText", "label", "width", "fullWidth", "aria-describedby"]);
3179
3181
  const helperErrorTextId = React__namespace.default.useId();
3180
- return jsxRuntime.jsxs(Stack, { as: "label", _gap: "s", align: fullWidth ? "stretch" : void 0, className, children: [label && jsxRuntime.jsx(LabelText, { children: props.label }), jsxRuntime.jsx(StyledInput, Object.assign({}, rest, { ref, isError: Boolean(errorText), "aria-describedby": [ariaDescribedBy, helperErrorTextId].join(" ") })), jsxRuntime.jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
3182
+ const fieldWidth = width !== null && width !== void 0 ? width : fullWidth ? "full" : void 0;
3183
+ return jsxRuntime.jsxs(Stack, { as: "label", _gap: "s", align: fieldWidth ? "stretch" : void 0, className: classNames__default.default(fieldWidth && calculateResponsiveWidthClasses(fieldWidth), className), children: [label && jsxRuntime.jsx(LabelText, { children: props.label }), jsxRuntime.jsx(StyledInput, Object.assign({}, rest, { ref, isError: Boolean(errorText), "aria-describedby": [ariaDescribedBy, helperErrorTextId].join(" ") })), jsxRuntime.jsx(HelperAndErrorText, { helperText, errorText, describingId: helperErrorTextId })] });
3181
3184
  });
3182
3185
 
3183
3186
  const LabeledRadio = React__namespace.default.forwardRef((props, ref) => {