@uniformdev/design-system 19.45.1 → 19.45.2-alpha.7

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
@@ -15181,57 +15181,67 @@ var ScrollableListItem = ({
15181
15181
 
15182
15182
  // src/components/LoadingIndicator/LoadingIndicator.styles.ts
15183
15183
  import { css as css67, keyframes as keyframes3 } from "@emotion/react";
15184
- var bounceFade = keyframes3`
15184
+ function bounceFade(size) {
15185
+ const bounceHeight = size === "lg" ? 10 : 5;
15186
+ return keyframes3`
15185
15187
  0%, 100% {
15186
- opacity: 1.0;
15187
- transform: translateY(0);
15188
+ opacity: 1.0;
15189
+ transform: translateY(0);
15188
15190
  }
15189
15191
  30% {
15190
- opacity: 0.6;
15192
+ opacity: 0.6;
15191
15193
  }
15192
15194
  80% {
15193
- opacity: 0.4;
15194
- transform: translateY(-10px);
15195
+ opacity: 0.4;
15196
+ transform: translateY(-${bounceHeight}px);
15195
15197
  }
15196
15198
  90% {
15197
15199
  opacity: 0.2;
15198
- transform: translateY(-5px);
15200
+ transform: translateY(-${bounceHeight / 2}px);
15199
15201
  }
15200
15202
  `;
15203
+ }
15201
15204
  var loader = css67`
15202
15205
  display: inline-flex;
15203
15206
  justify-content: center;
15204
15207
  `;
15205
- var loadingDot = css67`
15206
- background-color: var(--gray-700);
15207
- display: block;
15208
- border-radius: var(--rounded-full);
15209
- animation: ${bounceFade} 0.75s infinite ease-in-out;
15210
- width: 8px;
15211
- height: 8px;
15212
- margin: 0 var(--spacing-xs);
15213
- transform: translateY(0);
15208
+ function loadingDot(size) {
15209
+ const dotSize = size === "lg" ? 8 : 4;
15210
+ return css67`
15211
+ background-color: var(--gray-700);
15212
+ display: block;
15213
+ border-radius: var(--rounded-full);
15214
+ animation: ${bounceFade(size)} 0.75s infinite ease-in-out;
15215
+ width: ${dotSize}px;
15216
+ height: ${dotSize}px;
15217
+ margin: 0 var(--spacing-${size === "lg" ? "xs" : "2xs"});
15218
+ transform: translateY(0);
15214
15219
 
15215
- &:nth-of-type(1) {
15216
- animation-delay: 0.15s;
15217
- }
15220
+ &:nth-of-type(1) {
15221
+ animation-delay: 0.15s;
15222
+ }
15218
15223
 
15219
- &:nth-of-type(2) {
15220
- animation-delay: 0.3s;
15221
- }
15224
+ &:nth-of-type(2) {
15225
+ animation-delay: 0.3s;
15226
+ }
15222
15227
 
15223
- &:nth-of-type(3) {
15224
- animation-delay: 0.6s;
15225
- }
15226
- `;
15228
+ &:nth-of-type(3) {
15229
+ animation-delay: 0.6s;
15230
+ }
15231
+ `;
15232
+ }
15227
15233
 
15228
15234
  // src/components/LoadingIndicator/LoadingIndicator.tsx
15229
15235
  import { jsx as jsx81, jsxs as jsxs53 } from "@emotion/react/jsx-runtime";
15230
- var LoadingIndicator = ({ ...props }) => {
15236
+ var LoadingIndicator = ({
15237
+ size = "lg",
15238
+ ...props
15239
+ }) => {
15240
+ const dotStyle = loadingDot(size);
15231
15241
  return /* @__PURE__ */ jsxs53("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
15232
- /* @__PURE__ */ jsx81("span", { css: loadingDot }),
15233
- /* @__PURE__ */ jsx81("span", { css: loadingDot }),
15234
- /* @__PURE__ */ jsx81("span", { css: loadingDot })
15242
+ /* @__PURE__ */ jsx81("span", { css: dotStyle }),
15243
+ /* @__PURE__ */ jsx81("span", { css: dotStyle }),
15244
+ /* @__PURE__ */ jsx81("span", { css: dotStyle })
15235
15245
  ] });
15236
15246
  };
15237
15247
 
@@ -16220,6 +16230,7 @@ var extractParameterProps = (props) => {
16220
16230
  var ParameterShell = ({
16221
16231
  label,
16222
16232
  labelLeadingIcon,
16233
+ labelTrailingIcon,
16223
16234
  hiddenLabel,
16224
16235
  id,
16225
16236
  errorMessage,
@@ -16240,12 +16251,14 @@ var ParameterShell = ({
16240
16251
  const errorMessaging = errorMessage || manualErrorMessage;
16241
16252
  return /* @__PURE__ */ jsxs61("div", { css: inputContainer2, ...props, children: [
16242
16253
  hiddenLabel || title ? null : /* @__PURE__ */ jsxs61(ParameterLabel, { id, css: labelText2, children: [
16243
- labelLeadingIcon ? labelLeadingIcon : null,
16244
- label
16254
+ labelLeadingIcon != null ? labelLeadingIcon : null,
16255
+ label,
16256
+ labelTrailingIcon != null ? labelTrailingIcon : null
16245
16257
  ] }),
16246
16258
  !title ? null : /* @__PURE__ */ jsxs61(ParameterLabel, { id, asSpan: true, children: [
16247
- labelLeadingIcon ? labelLeadingIcon : null,
16248
- title
16259
+ labelLeadingIcon != null ? labelLeadingIcon : null,
16260
+ title,
16261
+ labelTrailingIcon != null ? labelTrailingIcon : null
16249
16262
  ] }),
16250
16263
  /* @__PURE__ */ jsxs61("div", { css: inputWrapper, children: [
16251
16264
  menuItems ? /* @__PURE__ */ jsx91(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
package/dist/index.d.mts CHANGED
@@ -21996,7 +21996,9 @@ declare const ScrollableListItem: ({ buttonText, active, disableShadow, ...props
21996
21996
  * Loading Indicator
21997
21997
  * @example <LoadingIndicator />
21998
21998
  */
21999
- declare const LoadingIndicator: ({ ...props }: HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21999
+ declare const LoadingIndicator: ({ size, ...props }: HTMLAttributes<HTMLDivElement> & {
22000
+ size?: "sm" | "lg" | undefined;
22001
+ }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22000
22002
 
22001
22003
  interface LoadingOverlayProps {
22002
22004
  /** sets whether to display the loading overlay components */
@@ -22163,8 +22165,10 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
22163
22165
  type CommonParameterProps = {
22164
22166
  /** sets the label value */
22165
22167
  label: string;
22166
- /** (optional): allows user to pass a component within the label */
22168
+ /** (optional): allows user to pass a component before the label */
22167
22169
  labelLeadingIcon?: ReactNode;
22170
+ /** (optional): allows user to pass a component after the label */
22171
+ labelTrailingIcon?: ReactNode;
22168
22172
  /** sets the value for label and id on the input field */
22169
22173
  id: string;
22170
22174
  /** (optional): hides the label, but set an aria-label on the input */
@@ -22500,9 +22504,6 @@ declare const extractParameterProps: <T>(props: T & CommonParameterProps & {
22500
22504
  menuItems?: ReactNode;
22501
22505
  errorTestId?: string | undefined;
22502
22506
  captionTestId?: string | undefined;
22503
- /** sets overriding parameters indicator
22504
- * @deprecated
22505
- */
22506
22507
  title?: string | undefined;
22507
22508
  }) => {
22508
22509
  shellProps: {
@@ -22526,9 +22527,6 @@ declare const extractParameterProps: <T>(props: T & CommonParameterProps & {
22526
22527
  menuItems?: ReactNode;
22527
22528
  errorTestId?: string | undefined;
22528
22529
  captionTestId?: string | undefined;
22529
- /** sets overriding parameters indicator
22530
- * @deprecated
22531
- */
22532
22530
  title?: string | undefined;
22533
22531
  }, "caption" | "label" | "title" | "id" | "menuItems" | "errorMessage" | "warningMessage" | "errorTestId" | "captionTestId" | "hiddenLabel" | "labelLeadingIcon" | "infoMessage" | "hasOverriddenValue" | "onResetOverriddenValue">;
22534
22532
  };
@@ -22547,7 +22545,7 @@ type ParameterShellProps = React.InputHTMLAttributes<HTMLDivElement> & CommonPar
22547
22545
  * Uniform Parameter shell component
22548
22546
  * @example <ParameterShell label="my label" id="my-id"><ParameterInput onChange={() => {}} /></ParameterShell>
22549
22547
  */
22550
- declare const ParameterShell: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22548
+ declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22551
22549
  declare const ParameterShellPlaceholder: ({ children }: {
22552
22550
  children?: ReactNode;
22553
22551
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
package/dist/index.d.ts CHANGED
@@ -21996,7 +21996,9 @@ declare const ScrollableListItem: ({ buttonText, active, disableShadow, ...props
21996
21996
  * Loading Indicator
21997
21997
  * @example <LoadingIndicator />
21998
21998
  */
21999
- declare const LoadingIndicator: ({ ...props }: HTMLAttributes<HTMLDivElement>) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21999
+ declare const LoadingIndicator: ({ size, ...props }: HTMLAttributes<HTMLDivElement> & {
22000
+ size?: "sm" | "lg" | undefined;
22001
+ }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22000
22002
 
22001
22003
  interface LoadingOverlayProps {
22002
22004
  /** sets whether to display the loading overlay components */
@@ -22163,8 +22165,10 @@ declare const Modal: React__default.ForwardRefExoticComponent<{
22163
22165
  type CommonParameterProps = {
22164
22166
  /** sets the label value */
22165
22167
  label: string;
22166
- /** (optional): allows user to pass a component within the label */
22168
+ /** (optional): allows user to pass a component before the label */
22167
22169
  labelLeadingIcon?: ReactNode;
22170
+ /** (optional): allows user to pass a component after the label */
22171
+ labelTrailingIcon?: ReactNode;
22168
22172
  /** sets the value for label and id on the input field */
22169
22173
  id: string;
22170
22174
  /** (optional): hides the label, but set an aria-label on the input */
@@ -22500,9 +22504,6 @@ declare const extractParameterProps: <T>(props: T & CommonParameterProps & {
22500
22504
  menuItems?: ReactNode;
22501
22505
  errorTestId?: string | undefined;
22502
22506
  captionTestId?: string | undefined;
22503
- /** sets overriding parameters indicator
22504
- * @deprecated
22505
- */
22506
22507
  title?: string | undefined;
22507
22508
  }) => {
22508
22509
  shellProps: {
@@ -22526,9 +22527,6 @@ declare const extractParameterProps: <T>(props: T & CommonParameterProps & {
22526
22527
  menuItems?: ReactNode;
22527
22528
  errorTestId?: string | undefined;
22528
22529
  captionTestId?: string | undefined;
22529
- /** sets overriding parameters indicator
22530
- * @deprecated
22531
- */
22532
22530
  title?: string | undefined;
22533
22531
  }, "caption" | "label" | "title" | "id" | "menuItems" | "errorMessage" | "warningMessage" | "errorTestId" | "captionTestId" | "hiddenLabel" | "labelLeadingIcon" | "infoMessage" | "hasOverriddenValue" | "onResetOverriddenValue">;
22534
22532
  };
@@ -22547,7 +22545,7 @@ type ParameterShellProps = React.InputHTMLAttributes<HTMLDivElement> & CommonPar
22547
22545
  * Uniform Parameter shell component
22548
22546
  * @example <ParameterShell label="my label" id="my-id"><ParameterInput onChange={() => {}} /></ParameterShell>
22549
22547
  */
22550
- declare const ParameterShell: ({ label, labelLeadingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22548
+ declare const ParameterShell: ({ label, labelLeadingIcon, labelTrailingIcon, hiddenLabel, id, errorMessage, warningMessage, infoMessage, caption, errorTestId, captionTestId, menuItems, hasOverriddenValue, onResetOverriddenValue, title, children, ...props }: ParameterShellProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
22551
22549
  declare const ParameterShellPlaceholder: ({ children }: {
22552
22550
  children?: ReactNode;
22553
22551
  }) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
package/dist/index.js CHANGED
@@ -16942,57 +16942,67 @@ init_emotion_jsx_shim();
16942
16942
  // src/components/LoadingIndicator/LoadingIndicator.styles.ts
16943
16943
  init_emotion_jsx_shim();
16944
16944
  var import_react85 = require("@emotion/react");
16945
- var bounceFade = import_react85.keyframes`
16945
+ function bounceFade(size) {
16946
+ const bounceHeight = size === "lg" ? 10 : 5;
16947
+ return import_react85.keyframes`
16946
16948
  0%, 100% {
16947
- opacity: 1.0;
16948
- transform: translateY(0);
16949
+ opacity: 1.0;
16950
+ transform: translateY(0);
16949
16951
  }
16950
16952
  30% {
16951
- opacity: 0.6;
16953
+ opacity: 0.6;
16952
16954
  }
16953
16955
  80% {
16954
- opacity: 0.4;
16955
- transform: translateY(-10px);
16956
+ opacity: 0.4;
16957
+ transform: translateY(-${bounceHeight}px);
16956
16958
  }
16957
16959
  90% {
16958
16960
  opacity: 0.2;
16959
- transform: translateY(-5px);
16961
+ transform: translateY(-${bounceHeight / 2}px);
16960
16962
  }
16961
16963
  `;
16964
+ }
16962
16965
  var loader = import_react85.css`
16963
16966
  display: inline-flex;
16964
16967
  justify-content: center;
16965
16968
  `;
16966
- var loadingDot = import_react85.css`
16967
- background-color: var(--gray-700);
16968
- display: block;
16969
- border-radius: var(--rounded-full);
16970
- animation: ${bounceFade} 0.75s infinite ease-in-out;
16971
- width: 8px;
16972
- height: 8px;
16973
- margin: 0 var(--spacing-xs);
16974
- transform: translateY(0);
16969
+ function loadingDot(size) {
16970
+ const dotSize = size === "lg" ? 8 : 4;
16971
+ return import_react85.css`
16972
+ background-color: var(--gray-700);
16973
+ display: block;
16974
+ border-radius: var(--rounded-full);
16975
+ animation: ${bounceFade(size)} 0.75s infinite ease-in-out;
16976
+ width: ${dotSize}px;
16977
+ height: ${dotSize}px;
16978
+ margin: 0 var(--spacing-${size === "lg" ? "xs" : "2xs"});
16979
+ transform: translateY(0);
16975
16980
 
16976
- &:nth-of-type(1) {
16977
- animation-delay: 0.15s;
16978
- }
16981
+ &:nth-of-type(1) {
16982
+ animation-delay: 0.15s;
16983
+ }
16979
16984
 
16980
- &:nth-of-type(2) {
16981
- animation-delay: 0.3s;
16982
- }
16985
+ &:nth-of-type(2) {
16986
+ animation-delay: 0.3s;
16987
+ }
16983
16988
 
16984
- &:nth-of-type(3) {
16985
- animation-delay: 0.6s;
16986
- }
16987
- `;
16989
+ &:nth-of-type(3) {
16990
+ animation-delay: 0.6s;
16991
+ }
16992
+ `;
16993
+ }
16988
16994
 
16989
16995
  // src/components/LoadingIndicator/LoadingIndicator.tsx
16990
16996
  var import_jsx_runtime81 = require("@emotion/react/jsx-runtime");
16991
- var LoadingIndicator = ({ ...props }) => {
16997
+ var LoadingIndicator = ({
16998
+ size = "lg",
16999
+ ...props
17000
+ }) => {
17001
+ const dotStyle = loadingDot(size);
16992
17002
  return /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { role: "alert", css: loader, "data-testid": "loading-indicator", ...props, children: [
16993
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: loadingDot }),
16994
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: loadingDot }),
16995
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: loadingDot })
17003
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: dotStyle }),
17004
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: dotStyle }),
17005
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("span", { css: dotStyle })
16996
17006
  ] });
16997
17007
  };
16998
17008
 
@@ -18008,6 +18018,7 @@ var extractParameterProps = (props) => {
18008
18018
  var ParameterShell = ({
18009
18019
  label,
18010
18020
  labelLeadingIcon,
18021
+ labelTrailingIcon,
18011
18022
  hiddenLabel,
18012
18023
  id,
18013
18024
  errorMessage,
@@ -18028,12 +18039,14 @@ var ParameterShell = ({
18028
18039
  const errorMessaging = errorMessage || manualErrorMessage;
18029
18040
  return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: inputContainer2, ...props, children: [
18030
18041
  hiddenLabel || title ? null : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ParameterLabel, { id, css: labelText2, children: [
18031
- labelLeadingIcon ? labelLeadingIcon : null,
18032
- label
18042
+ labelLeadingIcon != null ? labelLeadingIcon : null,
18043
+ label,
18044
+ labelTrailingIcon != null ? labelTrailingIcon : null
18033
18045
  ] }),
18034
18046
  !title ? null : /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ParameterLabel, { id, asSpan: true, children: [
18035
- labelLeadingIcon ? labelLeadingIcon : null,
18036
- title
18047
+ labelLeadingIcon != null ? labelLeadingIcon : null,
18048
+ title,
18049
+ labelTrailingIcon != null ? labelTrailingIcon : null
18037
18050
  ] }),
18038
18051
  /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { css: inputWrapper, children: [
18039
18052
  menuItems ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ParameterMenuButton, { label: `${label} menu`, children: menuItems }) : null,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.45.1",
3
+ "version": "19.45.2-alpha.7+9afef6594",
4
4
  "description": "Uniform design system components",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "main": "./dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "@storybook/react": "6.5.16",
25
25
  "@types/react": "18.2.20",
26
26
  "@types/react-dom": "18.2.7",
27
- "@uniformdev/canvas": "^19.45.1",
28
- "@uniformdev/richtext": "^19.45.1",
27
+ "@uniformdev/canvas": "^19.45.2-alpha.7+9afef6594",
28
+ "@uniformdev/richtext": "^19.45.2-alpha.7+9afef6594",
29
29
  "autoprefixer": "10.4.15",
30
30
  "hygen": "6.2.11",
31
31
  "postcss": "8.4.27",
@@ -67,5 +67,5 @@
67
67
  "publishConfig": {
68
68
  "access": "public"
69
69
  },
70
- "gitHead": "27d329b913db64152e9d49bcfa7dddf8b3b31bb6"
70
+ "gitHead": "9afef6594b505ff451ade8bdd5a2d29e8e0e586c"
71
71
  }