@uniformdev/design-system 19.63.2 → 19.65.1-alpha.4

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/esm/index.js CHANGED
@@ -572,7 +572,6 @@ var inputContainer = css2`
572
572
  `;
573
573
  var labelText = css2`
574
574
  display: flex;
575
- font-weight: var(--fw-bold);
576
575
  margin: 0 0 var(--spacing-xs);
577
576
  align-items: center;
578
577
  `;
@@ -702,8 +701,7 @@ var toggleInput = css2`
702
701
  no-repeat center center;
703
702
  }
704
703
  `;
705
- var inlineLabel = (fontWeight) => css2`
706
- font-weight: ${fontWeight === "medium" ? "var(--fw-medium)" : fontWeight === "normal" ? "var(--fw-regular)" : "var(--fw-bold)"};
704
+ var inlineLabel = css2`
707
705
  padding-left: var(--spacing-lg);
708
706
 
709
707
  > a {
@@ -714,6 +712,15 @@ var inlineLabel = (fontWeight) => css2`
714
712
  }
715
713
  }
716
714
  `;
715
+ var labelNormal = css2`
716
+ font-weight: var(--fw-regular);
717
+ `;
718
+ var labelMedium = css2`
719
+ font-weight: var(--fw-medium);
720
+ `;
721
+ var labelBold = css2`
722
+ font-weight: var(--fw-bold);
723
+ `;
717
724
  var inputDisabled = css2`
718
725
  cursor: not-allowed;
719
726
  color: var(--gray-400);
@@ -14369,9 +14376,14 @@ var InputToggle = React17.forwardRef(
14369
14376
  errorMessage,
14370
14377
  warningMessage,
14371
14378
  testId,
14372
- fontWeight = "medium",
14379
+ fontWeight = "normal",
14373
14380
  ...props
14374
14381
  }, ref) => {
14382
+ const fontWeightStyles = {
14383
+ normal: labelNormal,
14384
+ medium: labelMedium,
14385
+ bold: labelBold
14386
+ };
14375
14387
  return /* @__PURE__ */ jsxs37(
14376
14388
  Label,
14377
14389
  {
@@ -14390,7 +14402,7 @@ var InputToggle = React17.forwardRef(
14390
14402
  ...props
14391
14403
  }
14392
14404
  ),
14393
- /* @__PURE__ */ jsx60("span", { css: inlineLabel(fontWeight), children: label }),
14405
+ /* @__PURE__ */ jsx60("span", { css: [inlineLabel, fontWeightStyles[fontWeight]], children: label }),
14394
14406
  caption || errorMessage ? /* @__PURE__ */ jsxs37("span", { css: inputToggleMessageContainer, children: [
14395
14407
  caption ? /* @__PURE__ */ jsx60(Caption, { children: caption }) : null,
14396
14408
  errorMessage ? /* @__PURE__ */ jsx60(ErrorMessage, { message: errorMessage }) : null,
package/dist/index.d.mts CHANGED
@@ -21738,6 +21738,7 @@ type InputSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
21738
21738
  */
21739
21739
  declare const InputSelect: ({ label, defaultOption, options, caption, errorMessage, warningMessage, showLabel, labelCta, compact, classNameContainer, classNameControl, classNameLabel, ...props }: InputSelectProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21740
21740
 
21741
+ type FontWeightProps = 'normal' | 'medium' | 'bold';
21741
21742
  type InputToggleProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
21742
21743
  /** sets the label value */
21743
21744
  label: React$1.ReactNode;
@@ -21756,9 +21757,9 @@ type InputToggleProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
21756
21757
  /** (optional) sets and shows the the warning message value */
21757
21758
  warningMessage?: string;
21758
21759
  /** (optional) sets the font weight of the label text
21759
- * @default 'bold'
21760
+ * @default 'normal'
21760
21761
  */
21761
- fontWeight?: 'normal' | 'medium' | 'bold';
21762
+ fontWeight?: FontWeightProps;
21762
21763
  /** (optional) sets test id for test automation*/
21763
21764
  testId?: string;
21764
21765
  };
@@ -21784,9 +21785,9 @@ declare const InputToggle: React$1.ForwardRefExoticComponent<React$1.InputHTMLAt
21784
21785
  /** (optional) sets and shows the the warning message value */
21785
21786
  warningMessage?: string | undefined;
21786
21787
  /** (optional) sets the font weight of the label text
21787
- * @default 'bold'
21788
+ * @default 'normal'
21788
21789
  */
21789
- fontWeight?: "bold" | "medium" | "normal" | undefined;
21790
+ fontWeight?: FontWeightProps | undefined;
21790
21791
  /** (optional) sets test id for test automation*/
21791
21792
  testId?: string | undefined;
21792
21793
  } & React$1.RefAttributes<HTMLInputElement>>;
package/dist/index.d.ts CHANGED
@@ -21738,6 +21738,7 @@ type InputSelectProps = React.SelectHTMLAttributes<HTMLSelectElement> & {
21738
21738
  */
21739
21739
  declare const InputSelect: ({ label, defaultOption, options, caption, errorMessage, warningMessage, showLabel, labelCta, compact, classNameContainer, classNameControl, classNameLabel, ...props }: InputSelectProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21740
21740
 
21741
+ type FontWeightProps = 'normal' | 'medium' | 'bold';
21741
21742
  type InputToggleProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
21742
21743
  /** sets the label value */
21743
21744
  label: React$1.ReactNode;
@@ -21756,9 +21757,9 @@ type InputToggleProps = React$1.InputHTMLAttributes<HTMLInputElement> & {
21756
21757
  /** (optional) sets and shows the the warning message value */
21757
21758
  warningMessage?: string;
21758
21759
  /** (optional) sets the font weight of the label text
21759
- * @default 'bold'
21760
+ * @default 'normal'
21760
21761
  */
21761
- fontWeight?: 'normal' | 'medium' | 'bold';
21762
+ fontWeight?: FontWeightProps;
21762
21763
  /** (optional) sets test id for test automation*/
21763
21764
  testId?: string;
21764
21765
  };
@@ -21784,9 +21785,9 @@ declare const InputToggle: React$1.ForwardRefExoticComponent<React$1.InputHTMLAt
21784
21785
  /** (optional) sets and shows the the warning message value */
21785
21786
  warningMessage?: string | undefined;
21786
21787
  /** (optional) sets the font weight of the label text
21787
- * @default 'bold'
21788
+ * @default 'normal'
21788
21789
  */
21789
- fontWeight?: "bold" | "medium" | "normal" | undefined;
21790
+ fontWeight?: FontWeightProps | undefined;
21790
21791
  /** (optional) sets test id for test automation*/
21791
21792
  testId?: string | undefined;
21792
21793
  } & React$1.RefAttributes<HTMLInputElement>>;
package/dist/index.js CHANGED
@@ -2149,7 +2149,6 @@ var inputContainer = import_react4.css`
2149
2149
  `;
2150
2150
  var labelText = import_react4.css`
2151
2151
  display: flex;
2152
- font-weight: var(--fw-bold);
2153
2152
  margin: 0 0 var(--spacing-xs);
2154
2153
  align-items: center;
2155
2154
  `;
@@ -2279,8 +2278,7 @@ var toggleInput = import_react4.css`
2279
2278
  no-repeat center center;
2280
2279
  }
2281
2280
  `;
2282
- var inlineLabel = (fontWeight) => import_react4.css`
2283
- font-weight: ${fontWeight === "medium" ? "var(--fw-medium)" : fontWeight === "normal" ? "var(--fw-regular)" : "var(--fw-bold)"};
2281
+ var inlineLabel = import_react4.css`
2284
2282
  padding-left: var(--spacing-lg);
2285
2283
 
2286
2284
  > a {
@@ -2291,6 +2289,15 @@ var inlineLabel = (fontWeight) => import_react4.css`
2291
2289
  }
2292
2290
  }
2293
2291
  `;
2292
+ var labelNormal = import_react4.css`
2293
+ font-weight: var(--fw-regular);
2294
+ `;
2295
+ var labelMedium = import_react4.css`
2296
+ font-weight: var(--fw-medium);
2297
+ `;
2298
+ var labelBold = import_react4.css`
2299
+ font-weight: var(--fw-bold);
2300
+ `;
2294
2301
  var inputDisabled = import_react4.css`
2295
2302
  cursor: not-allowed;
2296
2303
  color: var(--gray-400);
@@ -16097,9 +16104,14 @@ var InputToggle = React17.forwardRef(
16097
16104
  errorMessage,
16098
16105
  warningMessage,
16099
16106
  testId,
16100
- fontWeight = "medium",
16107
+ fontWeight = "normal",
16101
16108
  ...props
16102
16109
  }, ref) => {
16110
+ const fontWeightStyles = {
16111
+ normal: labelNormal,
16112
+ medium: labelMedium,
16113
+ bold: labelBold
16114
+ };
16103
16115
  return /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)(
16104
16116
  Label,
16105
16117
  {
@@ -16118,7 +16130,7 @@ var InputToggle = React17.forwardRef(
16118
16130
  ...props
16119
16131
  }
16120
16132
  ),
16121
- /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { css: inlineLabel(fontWeight), children: label }),
16133
+ /* @__PURE__ */ (0, import_jsx_runtime60.jsx)("span", { css: [inlineLabel, fontWeightStyles[fontWeight]], children: label }),
16122
16134
  caption || errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime60.jsxs)("span", { css: inputToggleMessageContainer, children: [
16123
16135
  caption ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(Caption, { children: caption }) : null,
16124
16136
  errorMessage ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(ErrorMessage, { message: errorMessage }) : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.63.2",
3
+ "version": "19.65.1-alpha.4+d9220a0f9",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -23,8 +23,8 @@
23
23
  "@storybook/react": "6.5.16",
24
24
  "@types/react": "18.2.21",
25
25
  "@types/react-dom": "18.2.7",
26
- "@uniformdev/canvas": "^19.63.2",
27
- "@uniformdev/richtext": "^19.63.2",
26
+ "@uniformdev/canvas": "^19.65.1-alpha.4+d9220a0f9",
27
+ "@uniformdev/richtext": "^19.65.1-alpha.4+d9220a0f9",
28
28
  "autoprefixer": "10.4.16",
29
29
  "hygen": "6.2.11",
30
30
  "postcss": "8.4.31",
@@ -65,5 +65,5 @@
65
65
  "publishConfig": {
66
66
  "access": "public"
67
67
  },
68
- "gitHead": "d233507166f115f0253f2571590f32be095c3193"
68
+ "gitHead": "d9220a0f9c51bae1ae6b97d356ae510ffc484394"
69
69
  }