@uniformdev/design-system 19.152.2-alpha.9 → 19.153.1-alpha.6

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
@@ -13477,6 +13477,7 @@ var Chip = ({
13477
13477
  size = "sm",
13478
13478
  theme = "accent-light",
13479
13479
  chipAction,
13480
+ as = "span",
13480
13481
  ...props
13481
13482
  }) => {
13482
13483
  const chipSize = {
@@ -13484,7 +13485,8 @@ var Chip = ({
13484
13485
  sm: ChipSmall,
13485
13486
  md: ChipMedium
13486
13487
  };
13487
- return /* @__PURE__ */ jsxs23("span", { css: [ChipContainer, chipSize[size], chipTheme[theme]], ...props, children: [
13488
+ const ElementType = as;
13489
+ return /* @__PURE__ */ jsxs23(ElementType, { css: [ChipContainer, chipSize[size], chipTheme[theme]], ...props, children: [
13488
13490
  icon ? /* @__PURE__ */ jsxs23(Fragment7, { children: [
13489
13491
  /* @__PURE__ */ jsx39("span", { role: "presentation", css: [ChipIcon], children: /* @__PURE__ */ jsx39(Icon, { icon, iconColor: "currentColor", size: "1rem" }) }),
13490
13492
  /* @__PURE__ */ jsx39("span", { role: "separator", css: ChipSeparator })
package/dist/index.d.mts CHANGED
@@ -21352,6 +21352,11 @@ type ChipProps = {
21352
21352
  theme?: ChipTheme;
21353
21353
  chipAction?: React.ReactNode;
21354
21354
  size?: ChipSizeProp;
21355
+ /**
21356
+ * The HTML element to render
21357
+ * @default 'span'
21358
+ */
21359
+ as?: 'span' | 'button';
21355
21360
  } & React.HTMLAttributes<HTMLSpanElement>;
21356
21361
  /**
21357
21362
  * @description Chips are used in a variety of ways
@@ -21360,7 +21365,7 @@ type ChipProps = {
21360
21365
  * To represent a different object, as a reference
21361
21366
  * @example <Chip text="productId" theme="accent-light" chipAction={<DismissibleChipAction onDismiss={() => {...}}/>} />
21362
21367
  */
21363
- declare const Chip: ({ icon, text, size, theme, chipAction, ...props }: ChipProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21368
+ declare const Chip: ({ icon, text, size, theme, chipAction, as, ...props }: ChipProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21364
21369
  type DismissibleChipActionProps = {
21365
21370
  onDismiss: () => void;
21366
21371
  } & HTMLAttributes<HTMLButtonElement>;
package/dist/index.d.ts CHANGED
@@ -21352,6 +21352,11 @@ type ChipProps = {
21352
21352
  theme?: ChipTheme;
21353
21353
  chipAction?: React.ReactNode;
21354
21354
  size?: ChipSizeProp;
21355
+ /**
21356
+ * The HTML element to render
21357
+ * @default 'span'
21358
+ */
21359
+ as?: 'span' | 'button';
21355
21360
  } & React.HTMLAttributes<HTMLSpanElement>;
21356
21361
  /**
21357
21362
  * @description Chips are used in a variety of ways
@@ -21360,7 +21365,7 @@ type ChipProps = {
21360
21365
  * To represent a different object, as a reference
21361
21366
  * @example <Chip text="productId" theme="accent-light" chipAction={<DismissibleChipAction onDismiss={() => {...}}/>} />
21362
21367
  */
21363
- declare const Chip: ({ icon, text, size, theme, chipAction, ...props }: ChipProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21368
+ declare const Chip: ({ icon, text, size, theme, chipAction, as, ...props }: ChipProps) => _emotion_react_types_jsx_namespace.EmotionJSX.Element;
21364
21369
  type DismissibleChipActionProps = {
21365
21370
  onDismiss: () => void;
21366
21371
  } & HTMLAttributes<HTMLButtonElement>;
package/dist/index.js CHANGED
@@ -15177,6 +15177,7 @@ var Chip = ({
15177
15177
  size = "sm",
15178
15178
  theme = "accent-light",
15179
15179
  chipAction,
15180
+ as = "span",
15180
15181
  ...props
15181
15182
  }) => {
15182
15183
  const chipSize = {
@@ -15184,7 +15185,8 @@ var Chip = ({
15184
15185
  sm: ChipSmall,
15185
15186
  md: ChipMedium
15186
15187
  };
15187
- return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)("span", { css: [ChipContainer, chipSize[size], chipTheme[theme]], ...props, children: [
15188
+ const ElementType = as;
15189
+ return /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(ElementType, { css: [ChipContainer, chipSize[size], chipTheme[theme]], ...props, children: [
15188
15190
  icon ? /* @__PURE__ */ (0, import_jsx_runtime39.jsxs)(import_jsx_runtime39.Fragment, { children: [
15189
15191
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { role: "presentation", css: [ChipIcon], children: /* @__PURE__ */ (0, import_jsx_runtime39.jsx)(Icon, { icon, iconColor: "currentColor", size: "1rem" }) }),
15190
15192
  /* @__PURE__ */ (0, import_jsx_runtime39.jsx)("span", { role: "separator", css: ChipSeparator })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/design-system",
3
- "version": "19.152.2-alpha.9+a99c710d2a",
3
+ "version": "19.153.1-alpha.6+2f1fec9a75",
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.40",
26
26
  "@types/react-dom": "18.2.17",
27
- "@uniformdev/canvas": "^19.152.2-alpha.9+a99c710d2a",
28
- "@uniformdev/richtext": "^19.152.2-alpha.9+a99c710d2a",
27
+ "@uniformdev/canvas": "^19.153.1-alpha.6+2f1fec9a75",
28
+ "@uniformdev/richtext": "^19.153.1-alpha.6+2f1fec9a75",
29
29
  "autoprefixer": "10.4.16",
30
30
  "hygen": "6.2.11",
31
31
  "postcss": "8.4.38",
@@ -72,5 +72,5 @@
72
72
  "publishConfig": {
73
73
  "access": "public"
74
74
  },
75
- "gitHead": "a99c710d2aecec9e6d590301b75ef89d82da520c"
75
+ "gitHead": "2f1fec9a75a28564dcd4a019f348a3ba2a4c607b"
76
76
  }