@activecollab/components 2.0.231 → 2.0.233

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.
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","names":[],"sources":["../../../src/utils/types.ts"],"sourcesContent":["import React from \"react\";\n\n// Source: https://github.com/emotion-js/emotion/blob/master/packages/styled-base/types/helper.d.ts\n// A more precise version of just React.ComponentPropsWithoutRef on its own\nexport type PropsOf<\n C extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<unknown>\n> = JSX.LibraryManagedAttributes<C, React.ComponentPropsWithoutRef<C>>;\n\ntype AsProp<C extends React.ElementType> = {\n /**\n * An override of the default HTML tag.\n * Can also be another React component.\n */\n as?: C;\n};\n\n/**\n * Allows for extending a set of props (`ExtendedProps`) by an overriding set of props\n * (`OverrideProps`), ensuring that any duplicates are overridden by the overriding\n * set of props.\n */\nexport type ExtendableProps<\n ExtendedProps = Record<string, unknown>,\n OverrideProps = Record<string, unknown>\n> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;\n\n/**\n * Allows for inheriting the props from the specified element type so that\n * props like children, className & style work, as well as element-specific\n * attributes like aria roles. The component (`C`) must be passed in.\n */\nexport type InheritableElementProps<\n C extends React.ElementType,\n Props = Record<string, unknown>\n> = ExtendableProps<PropsOf<C>, Props>;\n\n/**\n * A more sophisticated version of `InheritableElementProps` where\n * the passed in `as` prop will determine which props can be included\n */\nexport type PolymorphicComponentProps<\n C extends React.ElementType,\n Props = Record<string, unknown>\n> = InheritableElementProps<C, Props & AsProp<C>>;\n\n/**\n * Utility type to extract the `ref` prop from a polymorphic component\n */\nexport type PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>[\"ref\"];\n/**\n * A wrapper of `PolymorphicComponentProps` that also includes the `ref`\n * prop for the polymorphic component\n */\nexport type PolymorphicComponentPropsWithRef<\n C extends React.ElementType,\n Props = Record<string, unknown>\n> = PolymorphicComponentProps<C, Props> & { ref?: PolymorphicRef<C> };\n\nexport interface FormatNumberArgs {\n value: string | number;\n thousandSeparator?: \",\" | \".\" | \" \";\n decimalSeparator?: \",\" | \".\";\n trimDecimals?: boolean;\n decimalSpaces?: number;\n format?: FormatType;\n shortenThreshold?: number;\n}\n\nexport interface FormatCurrencyArgs extends FormatNumberArgs {\n currencyCode?: string;\n currencyCodePosition?: \"right\" | \"left\";\n}\n\nexport type FormatType = \"short\" | \"long\";\n"],"mappings":""}
1
+ {"version":3,"file":"types.js","names":[],"sources":["../../../src/utils/types.ts"],"sourcesContent":["import React from \"react\";\n\n// Source: https://github.com/emotion-js/emotion/blob/master/packages/styled-base/types/helper.d.ts\n// A more precise version of just React.ComponentPropsWithoutRef on its own\nexport type PropsOf<\n C extends keyof JSX.IntrinsicElements | React.JSXElementConstructor<unknown>\n> = JSX.LibraryManagedAttributes<C, React.ComponentPropsWithoutRef<C>>;\n\ntype AsProp<C extends React.ElementType> = {\n /**\n * An override of the default HTML tag.\n * Can also be another React component.\n */\n as?: C;\n};\n\n/**\n * Allows for extending a set of props (`ExtendedProps`) by an overriding set of props\n * (`OverrideProps`), ensuring that any duplicates are overridden by the overriding\n * set of props.\n */\nexport type ExtendableProps<\n ExtendedProps = Record<string, unknown>,\n OverrideProps = Record<string, unknown>\n> = OverrideProps & Omit<ExtendedProps, keyof OverrideProps>;\n\n/**\n * Allows for inheriting the props from the specified element type so that\n * props like children, className & style work, as well as element-specific\n * attributes like aria roles. The component (`C`) must be passed in.\n */\nexport type InheritableElementProps<\n C extends React.ElementType,\n Props = Record<string, unknown>\n> = ExtendableProps<PropsOf<C>, Props>;\n\n/**\n * A more sophisticated version of `InheritableElementProps` where\n * the passed in `as` prop will determine which props can be included\n */\nexport type PolymorphicComponentProps<\n C extends React.ElementType,\n Props = Record<string, unknown>\n> = InheritableElementProps<C, Props & AsProp<C>>;\n\n/**\n * Utility type to extract the `ref` prop from a polymorphic component\n */\nexport type PolymorphicRef<C extends React.ElementType> =\n React.ComponentPropsWithRef<C>[\"ref\"];\n/**\n * A wrapper of `PolymorphicComponentProps` that also includes the `ref`\n * prop for the polymorphic component\n */\nexport type PolymorphicComponentPropsWithRef<\n C extends React.ElementType,\n Props = Record<string, unknown>\n> = PolymorphicComponentProps<C, Props> & { ref?: PolymorphicRef<C> };\n\nexport interface FormatNumberArgs {\n value?: string | number;\n thousandSeparator?: \",\" | \".\" | \" \";\n decimalSeparator?: \",\" | \".\";\n trimDecimals?: boolean;\n decimalSpaces?: number;\n format?: FormatType;\n shortenThreshold?: number;\n}\n\nexport interface FormatCurrencyArgs extends FormatNumberArgs {\n currencyCode?: string;\n currencyCodePosition?: \"right\" | \"left\";\n}\n\nexport type FormatType = \"short\" | \"long\";\n"],"mappings":""}
package/dist/index.js CHANGED
@@ -706,7 +706,7 @@
706
706
  var decimalSpaces = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : 2;
707
707
  var format = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : "long";
708
708
  var shortenThreshold = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : 1000;
709
- if (typeof n === undefined || typeof n === null) return "";
709
+ if (n === undefined || n === null) return "";
710
710
  var number = getNumberFromString(n, thousandSeparator, decimalSeperator);
711
711
  if (isNaN(number)) {
712
712
  return "";
@@ -10033,6 +10033,7 @@
10033
10033
  xmlns: "http://www.w3.org/2000/svg",
10034
10034
  width: 24,
10035
10035
  height: 24,
10036
+ viewBox: "0 0 24 24",
10036
10037
  "data-testid": "SparkIcon",
10037
10038
  fill: gradient ? "url(#icon-gradient)" : props !== null && props !== void 0 && props.fill ? props.fill : "var(--color-theme-600)",
10038
10039
  focusable: false,