@liner-fe/prism 1.12.4 → 1.12.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/lib/index.mjs CHANGED
@@ -6205,7 +6205,10 @@ var iconMap = {
6205
6205
  var objectToArray = /* @__PURE__ */ __name((obj) => {
6206
6206
  return Object.entries(obj);
6207
6207
  }, "objectToArray");
6208
- var arrayToStyleObject = /* @__PURE__ */ __name((colorKeys2, style) => colorKeys2.reduce((acc, value) => ({ ...acc, [value]: style[value] }), {}), "arrayToStyleObject");
6208
+ var arrayToStyleObject = /* @__PURE__ */ __name((colorKeys2, style, prefix) => colorKeys2.reduce(
6209
+ (acc, value) => ({ ...acc, [value]: prefix ? style[`${prefix}-${value}`] : style[value] }),
6210
+ {}
6211
+ ), "arrayToStyleObject");
6209
6212
 
6210
6213
  // src/components/Button/index.tsx
6211
6214
  import { Children, cloneElement, forwardRef } from "react";
@@ -6252,29 +6255,51 @@ import clsx from "clsx";
6252
6255
 
6253
6256
  // src/components/Icon/style.module.scss
6254
6257
  var style_module_default2 = {
6255
- "icon": "_icon_h9p7f_1",
6256
- "neutral-label-primary": "_neutral-label-primary_h9p7f_5",
6257
- "neutral-label-secondary": "_neutral-label-secondary_h9p7f_12",
6258
- "neutral-label-tertiary": "_neutral-label-tertiary_h9p7f_19",
6259
- "neutral-label-quaternary": "_neutral-label-quaternary_h9p7f_26",
6260
- "neutral-label-static-primary": "_neutral-label-static-primary_h9p7f_33",
6261
- "neutral-label-static-secondary": "_neutral-label-static-secondary_h9p7f_40",
6262
- "inverse-label-primary": "_inverse-label-primary_h9p7f_47",
6263
- "inverse-label-secondary": "_inverse-label-secondary_h9p7f_54",
6264
- "inverse-label-tertiary": "_inverse-label-tertiary_h9p7f_61",
6265
- "inverse-label-quaternary": "_inverse-label-quaternary_h9p7f_68",
6266
- "inverse-label-static-primary": "_inverse-label-static-primary_h9p7f_75",
6267
- "inverse-label-static-secondary": "_inverse-label-static-secondary_h9p7f_82",
6268
- "brand-label-primary": "_brand-label-primary_h9p7f_89",
6269
- "brand-label-secondary": "_brand-label-secondary_h9p7f_96",
6270
- "function-label-positive": "_function-label-positive_h9p7f_103",
6271
- "function-label-negative": "_function-label-negative_h9p7f_110",
6272
- "function-label-caution": "_function-label-caution_h9p7f_117",
6273
- "accent-yellow": "_accent-yellow_h9p7f_124",
6274
- "accent-mint": "_accent-mint_h9p7f_131",
6275
- "accent-cyan": "_accent-cyan_h9p7f_138",
6276
- "accent-purple": "_accent-purple_h9p7f_145",
6277
- "accent-pink": "_accent-pink_h9p7f_152"
6258
+ "icon": "_icon_8x0ip_1",
6259
+ "neutral-label-primary": "_neutral-label-primary_8x0ip_8",
6260
+ "neutral-label-secondary": "_neutral-label-secondary_8x0ip_13",
6261
+ "neutral-label-tertiary": "_neutral-label-tertiary_8x0ip_18",
6262
+ "neutral-label-quaternary": "_neutral-label-quaternary_8x0ip_23",
6263
+ "neutral-label-static-primary": "_neutral-label-static-primary_8x0ip_28",
6264
+ "neutral-label-static-secondary": "_neutral-label-static-secondary_8x0ip_33",
6265
+ "inverse-label-primary": "_inverse-label-primary_8x0ip_38",
6266
+ "inverse-label-secondary": "_inverse-label-secondary_8x0ip_43",
6267
+ "inverse-label-tertiary": "_inverse-label-tertiary_8x0ip_48",
6268
+ "inverse-label-quaternary": "_inverse-label-quaternary_8x0ip_53",
6269
+ "inverse-label-static-primary": "_inverse-label-static-primary_8x0ip_58",
6270
+ "inverse-label-static-secondary": "_inverse-label-static-secondary_8x0ip_63",
6271
+ "brand-label-primary": "_brand-label-primary_8x0ip_68",
6272
+ "brand-label-secondary": "_brand-label-secondary_8x0ip_73",
6273
+ "function-label-positive": "_function-label-positive_8x0ip_78",
6274
+ "function-label-negative": "_function-label-negative_8x0ip_83",
6275
+ "function-label-caution": "_function-label-caution_8x0ip_88",
6276
+ "accent-yellow": "_accent-yellow_8x0ip_93",
6277
+ "accent-mint": "_accent-mint_8x0ip_98",
6278
+ "accent-cyan": "_accent-cyan_8x0ip_103",
6279
+ "accent-purple": "_accent-purple_8x0ip_108",
6280
+ "accent-pink": "_accent-pink_8x0ip_113",
6281
+ "fill-neutral-label-primary": "_fill-neutral-label-primary_8x0ip_118",
6282
+ "fill-neutral-label-secondary": "_fill-neutral-label-secondary_8x0ip_122",
6283
+ "fill-neutral-label-tertiary": "_fill-neutral-label-tertiary_8x0ip_126",
6284
+ "fill-neutral-label-quaternary": "_fill-neutral-label-quaternary_8x0ip_130",
6285
+ "fill-neutral-label-static-primary": "_fill-neutral-label-static-primary_8x0ip_134",
6286
+ "fill-neutral-label-static-secondary": "_fill-neutral-label-static-secondary_8x0ip_138",
6287
+ "fill-inverse-label-primary": "_fill-inverse-label-primary_8x0ip_142",
6288
+ "fill-inverse-label-secondary": "_fill-inverse-label-secondary_8x0ip_146",
6289
+ "fill-inverse-label-tertiary": "_fill-inverse-label-tertiary_8x0ip_150",
6290
+ "fill-inverse-label-quaternary": "_fill-inverse-label-quaternary_8x0ip_154",
6291
+ "fill-inverse-label-static-primary": "_fill-inverse-label-static-primary_8x0ip_158",
6292
+ "fill-inverse-label-static-secondary": "_fill-inverse-label-static-secondary_8x0ip_162",
6293
+ "fill-brand-label-primary": "_fill-brand-label-primary_8x0ip_166",
6294
+ "fill-brand-label-secondary": "_fill-brand-label-secondary_8x0ip_170",
6295
+ "fill-function-label-positive": "_fill-function-label-positive_8x0ip_174",
6296
+ "fill-function-label-negative": "_fill-function-label-negative_8x0ip_178",
6297
+ "fill-function-label-caution": "_fill-function-label-caution_8x0ip_182",
6298
+ "fill-accent-yellow": "_fill-accent-yellow_8x0ip_186",
6299
+ "fill-accent-mint": "_fill-accent-mint_8x0ip_190",
6300
+ "fill-accent-cyan": "_fill-accent-cyan_8x0ip_194",
6301
+ "fill-accent-purple": "_fill-accent-purple_8x0ip_198",
6302
+ "fill-accent-pink": "_fill-accent-pink_8x0ip_202"
6278
6303
  };
6279
6304
 
6280
6305
  // src/components/Icon/index.tsx
@@ -6313,19 +6338,29 @@ var colorKeys = [
6313
6338
  ];
6314
6339
  var iconVariants = cva(style_module_default2.icon, {
6315
6340
  variants: {
6316
- type: arrayToStyleObject(colorKeys, style_module_default2)
6341
+ type: arrayToStyleObject(colorKeys, style_module_default2),
6342
+ fillType: arrayToStyleObject(colorKeys, style_module_default2, "fill")
6317
6343
  }
6318
6344
  });
6319
6345
  var getIconComponent = /* @__PURE__ */ __name((iconKey, map) => map[iconKey], "getIconComponent");
6320
6346
  var Icon = /* @__PURE__ */ __name((props) => {
6321
- const { name, type = "neutral-label-primary", size = "m", thick = false, fill = false, className, ...rest } = props;
6347
+ const {
6348
+ name,
6349
+ type = "neutral-label-primary",
6350
+ fillType,
6351
+ size = "m",
6352
+ thick = false,
6353
+ fill = false,
6354
+ className,
6355
+ ...rest
6356
+ } = props;
6322
6357
  const IconComponent = getIconComponent(name, iconMap);
6323
6358
  const iconSize = iconSizeMap[size];
6324
6359
  return /* @__PURE__ */ jsx130(
6325
6360
  IconComponent,
6326
6361
  {
6327
6362
  ...rest,
6328
- className: clsx(iconVariants({ type }), className),
6363
+ className: clsx(iconVariants({ type, fillType }), className),
6329
6364
  size: iconSize,
6330
6365
  thick,
6331
6366
  fill
@@ -6920,17 +6955,17 @@ import clsx10 from "clsx";
6920
6955
 
6921
6956
  // src/components/IconButton/style.module.scss
6922
6957
  var style_module_default7 = {
6923
- "iconButton": "_iconButton_thmn0_1",
6924
- "primary": "_primary_thmn0_11",
6925
- "secondary": "_secondary_thmn0_22",
6926
- "tertiary": "_tertiary_thmn0_29",
6927
- "quaternary": "_quaternary_thmn0_39",
6928
- "negative": "_negative_thmn0_49",
6929
- "static": "_static_thmn0_59",
6930
- "l": "_l_thmn0_69",
6931
- "m": "_m_thmn0_75",
6932
- "s": "_s_thmn0_22",
6933
- "xs": "_xs_thmn0_87"
6958
+ "iconButton": "_iconButton_1qjd0_1",
6959
+ "primary": "_primary_1qjd0_11",
6960
+ "secondary": "_secondary_1qjd0_19",
6961
+ "tertiary": "_tertiary_1qjd0_26",
6962
+ "quaternary": "_quaternary_1qjd0_33",
6963
+ "negative": "_negative_1qjd0_40",
6964
+ "static": "_static_1qjd0_47",
6965
+ "l": "_l_1qjd0_54",
6966
+ "m": "_m_1qjd0_60",
6967
+ "s": "_s_1qjd0_19",
6968
+ "xs": "_xs_1qjd0_72"
6934
6969
  };
6935
6970
 
6936
6971
  // src/components/IconButton/index.tsx
@@ -6942,6 +6977,14 @@ var iconButtonSizeIconSizeMap = {
6942
6977
  s: "xs",
6943
6978
  xs: "xs"
6944
6979
  };
6980
+ var iconButtonLevelIconTypeMap = {
6981
+ primary: "neutral-label-primary",
6982
+ secondary: "neutral-label-primary",
6983
+ tertiary: "neutral-label-secondary",
6984
+ quaternary: "neutral-label-tertiary",
6985
+ negative: "function-label-negative",
6986
+ static: "neutral-label-static-primary"
6987
+ };
6945
6988
  var iconButtonVariants = cva6([style_module_default7.iconButton], {
6946
6989
  variants: {
6947
6990
  level: {
@@ -6963,7 +7006,16 @@ var iconButtonVariants = cva6([style_module_default7.iconButton], {
6963
7006
  var IconButton = forwardRef4(
6964
7007
  ({ asChild, level = "primary", name, thick = false, fill = false, size = "m", className, ...rest }, ref) => {
6965
7008
  const Comp = asChild ? Slot2 : "button";
6966
- return /* @__PURE__ */ jsx140(Comp, { ...rest, className: clsx10(iconButtonVariants({ level, size }), className), ref, children: /* @__PURE__ */ jsx140(Icon, { name, thick, fill, size: iconButtonSizeIconSizeMap[size] }) });
7009
+ return /* @__PURE__ */ jsx140(Comp, { ...rest, className: clsx10(iconButtonVariants({ level, size }), className), ref, children: /* @__PURE__ */ jsx140(
7010
+ Icon,
7011
+ {
7012
+ name,
7013
+ thick,
7014
+ fill,
7015
+ size: iconButtonSizeIconSizeMap[size],
7016
+ type: iconButtonLevelIconTypeMap[level]
7017
+ }
7018
+ ) });
6967
7019
  }
6968
7020
  );
6969
7021