@liner-fe/prism 2.1.34 → 2.1.36

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.
@@ -0,0 +1,8 @@
1
+ type LoadingSizeType = 'm' | 's' | 'xs';
2
+ type LoadingLevelType = 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'negative' | 'static' | 'inverse' | 'inverse-static';
3
+ interface LoadingProps {
4
+ size?: LoadingSizeType;
5
+ level?: LoadingLevelType;
6
+ }
7
+ export declare const Loading: ({ size, level }: LoadingProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
@@ -1,15 +1,15 @@
1
1
  import { Figma } from './types';
2
2
  export declare const FIGMA: {
3
- Icon: Figma;
4
3
  Button: Figma;
5
- CheckBox: Figma;
4
+ Icon: Figma;
6
5
  IconButton: Figma;
6
+ Label: Figma;
7
+ CheckBox: Figma;
7
8
  Typography: Figma;
8
9
  Textfield: Figma;
9
10
  Toast: Figma;
10
11
  PopOver: Figma;
11
12
  Tooltip: Figma;
12
- Label: Figma;
13
13
  Radio: Figma;
14
14
  Badge: Figma;
15
15
  Illust: Figma;
package/lib/index.cjs CHANGED
@@ -41,6 +41,7 @@ __export(index_exports, {
41
41
  IconButton: () => IconButton,
42
42
  Label: () => Label,
43
43
  List: () => List,
44
+ Loading: () => Loading,
44
45
  Media: () => Media,
45
46
  MediaContextProvider: () => MediaContextProvider,
46
47
  Paragraph: () => Paragraph,
@@ -7497,25 +7498,25 @@ var Icon = /* @__PURE__ */ __name((props) => {
7497
7498
  );
7498
7499
  }, "Icon");
7499
7500
 
7500
- // src/components/_ButtonLoading/style.module.scss
7501
+ // src/components/Loading/style.module.scss
7501
7502
  var style_module_default3 = {
7502
- "loading": "_loading_16nlw_1",
7503
- "loading-dot": "_loading-dot_16nlw_5",
7504
- "loadingFade": "_loadingFade_16nlw_1",
7505
- "m": "_m_16nlw_13",
7506
- "s": "_s_16nlw_19",
7507
- "xs": "_xs_16nlw_25",
7508
- "primary": "_primary_16nlw_31",
7509
- "secondary": "_secondary_16nlw_34",
7510
- "tertiary": "_tertiary_16nlw_37",
7511
- "quaternary": "_quaternary_16nlw_40",
7512
- "negative": "_negative_16nlw_43",
7513
- "static": "_static_16nlw_46",
7514
- "inverse": "_inverse_16nlw_49",
7515
- "inverse-static": "_inverse-static_16nlw_52"
7503
+ "loading": "_loading_1cm08_1",
7504
+ "loading-dot": "_loading-dot_1cm08_5",
7505
+ "loadingFade": "_loadingFade_1cm08_1",
7506
+ "m": "_m_1cm08_13",
7507
+ "s": "_s_1cm08_19",
7508
+ "xs": "_xs_1cm08_25",
7509
+ "primary": "_primary_1cm08_31",
7510
+ "secondary": "_secondary_1cm08_34",
7511
+ "tertiary": "_tertiary_1cm08_37",
7512
+ "quaternary": "_quaternary_1cm08_40",
7513
+ "negative": "_negative_1cm08_43",
7514
+ "static": "_static_1cm08_46",
7515
+ "inverse": "_inverse_1cm08_49",
7516
+ "inverse-static": "_inverse-static_1cm08_52"
7516
7517
  };
7517
7518
 
7518
- // src/components/_ButtonLoading/index.tsx
7519
+ // src/components/Loading/index.tsx
7519
7520
  var import_cva2 = require("cva");
7520
7521
  var import_jsx_runtime156 = require("react/jsx-runtime");
7521
7522
  var loadingVariants = (0, import_cva2.cva)({
@@ -7538,13 +7539,13 @@ var loadingVariants = (0, import_cva2.cva)({
7538
7539
  }
7539
7540
  }
7540
7541
  });
7541
- var ButtonLoading = /* @__PURE__ */ __name(({ size = "m", level = "primary" }) => {
7542
+ var Loading = /* @__PURE__ */ __name(({ size = "m", level = "primary" }) => {
7542
7543
  return /* @__PURE__ */ (0, import_jsx_runtime156.jsxs)("div", { className: style_module_default3.loading, children: [
7543
7544
  /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: loadingVariants({ size, level }) }),
7544
7545
  /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: loadingVariants({ size, level }) }),
7545
7546
  /* @__PURE__ */ (0, import_jsx_runtime156.jsx)("div", { className: loadingVariants({ size, level }) })
7546
7547
  ] });
7547
- }, "ButtonLoading");
7548
+ }, "Loading");
7548
7549
 
7549
7550
  // src/components/Button/index.tsx
7550
7551
  var import_jsx_runtime157 = require("react/jsx-runtime");
@@ -7673,9 +7674,9 @@ var DefaultButton = (0, import_react.forwardRef)(
7673
7674
  const renderContent = /* @__PURE__ */ __name((children2) => /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)("span", { className: (0, import_clsx2.default)(defaultButtonChildrenVariants({ size })), children: [
7674
7675
  !!leftIcon && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Icon, { ...iconProps, ...leftIcon }),
7675
7676
  isLoading ? !!leftIcon || !!rightIcon ? /* @__PURE__ */ (0, import_jsx_runtime157.jsxs)(import_jsx_runtime157.Fragment, { children: [
7676
- /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(ButtonLoading, { size: buttonLoadingSizeMap[size], level }),
7677
+ /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Loading, { size: buttonLoadingSizeMap[size], level }),
7677
7678
  /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: style_module_default.content, children: children2 })
7678
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(ButtonLoading, { size: buttonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: style_module_default.content, children: children2 }),
7679
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Loading, { size: buttonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime157.jsx)("p", { className: style_module_default.content, children: children2 }),
7679
7680
  !!rightIcon && !isLoading && /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(Icon, { ...iconProps, ...rightIcon })
7680
7681
  ] }), "renderContent");
7681
7682
  if (asChild) {
@@ -7698,12 +7699,17 @@ var DefaultButton = (0, import_react.forwardRef)(
7698
7699
  ...rest,
7699
7700
  className: (0, import_clsx2.default)(defaultButtonVariants({ level, fill, align, size, width }), className),
7700
7701
  ref,
7702
+ "aria-label": rest["aria-label"] || "button",
7703
+ role: "button",
7704
+ tabIndex: 0,
7701
7705
  children: renderContent(children)
7702
7706
  }
7703
7707
  );
7704
7708
  }
7705
7709
  );
7710
+ DefaultButton.displayName = "DefaultButton";
7706
7711
  var Button = (0, import_react.forwardRef)((props, ref) => /* @__PURE__ */ (0, import_jsx_runtime157.jsx)(DefaultButton, { ...props, ref }));
7712
+ Button.displayName = "Button";
7707
7713
 
7708
7714
  // src/hooks/useToast.ts
7709
7715
  var import_recoil = require("recoil");
@@ -8670,6 +8676,7 @@ var TextButton = (0, import_react10.forwardRef)(
8670
8676
  return /* @__PURE__ */ (0, import_jsx_runtime165.jsx)("button", { className: (0, import_clsx8.default)(textButtonVariants({ level, thick, underline, size }), className), ref, ...rest, children: renderContent(children) });
8671
8677
  }
8672
8678
  );
8679
+ TextButton.displayName = "TextButton";
8673
8680
 
8674
8681
  // src/components/Popover/index.tsx
8675
8682
  var import_jsx_runtime166 = require("react/jsx-runtime");
@@ -8925,7 +8932,10 @@ var IconButton = (0, import_react12.forwardRef)(
8925
8932
  className: (0, import_clsx11.default)(iconButtonVariants({ level, size, fill }), className),
8926
8933
  ref,
8927
8934
  disabled: disabled && !isLoading,
8928
- children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(ButtonLoading, { size: iconButtonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
8935
+ "aria-label": icon.name,
8936
+ role: "button",
8937
+ tabIndex: 0,
8938
+ children: isLoading ? /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(Loading, { size: iconButtonLoadingSizeMap[size], level }) : /* @__PURE__ */ (0, import_jsx_runtime168.jsx)(
8929
8939
  Icon,
8930
8940
  {
8931
8941
  size: iconButtonSizeIconSizeMap[size],
@@ -8937,6 +8947,7 @@ var IconButton = (0, import_react12.forwardRef)(
8937
8947
  );
8938
8948
  }
8939
8949
  );
8950
+ IconButton.displayName = "IconButton";
8940
8951
 
8941
8952
  // src/components/CheckBox/index.tsx
8942
8953
  var CheckboxPrimitive = __toESM(require("@radix-ui/react-checkbox"));
@@ -9028,6 +9039,7 @@ var Label = (0, import_react13.forwardRef)(
9028
9039
  );
9029
9040
  }
9030
9041
  );
9042
+ Label.displayName = "Label";
9031
9043
 
9032
9044
  // src/components/CheckBox/index.tsx
9033
9045
  var import_jsx_runtime170 = require("react/jsx-runtime");
@@ -9051,10 +9063,10 @@ var import_react15 = require("react");
9051
9063
 
9052
9064
  // src/components/Radio/style.module.scss
9053
9065
  var style_module_default12 = {
9054
- "radio-item": "_radio-item_1l2fz_1",
9055
- "indicator": "_indicator_1l2fz_41",
9056
- "label-wrapper": "_label-wrapper_1l2fz_47",
9057
- "description": "_description_1l2fz_57"
9066
+ "radio-item": "_radio-item_184np_1",
9067
+ "indicator": "_indicator_184np_44",
9068
+ "label-wrapper": "_label-wrapper_184np_50",
9069
+ "description": "_description_184np_60"
9058
9070
  };
9059
9071
 
9060
9072
  // src/components/Radio/index.tsx