@liner-fe/prism 2.6.6 → 2.6.8

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.css CHANGED
@@ -1372,25 +1372,46 @@
1372
1372
  }
1373
1373
 
1374
1374
  /* esbuild-sass-plugin:css-chunk:src/components/Textfield/style.module.scss */
1375
- ._textfield-container_ogykf_1 {
1375
+ ._textfield-container_qi63h_1 {
1376
1376
  display: flex;
1377
1377
  flex-direction: column;
1378
1378
  gap: var(--lp-sys-gap-positive-200);
1379
1379
  width: 100%;
1380
1380
  }
1381
- ._textfield-container_ogykf_1:hover > ._textfield_ogykf_1 {
1381
+ ._textfield-container_qi63h_1 > ._textfield_qi63h_1:focus-within {
1382
+ outline: 2px solid var(--neutral-border-opaque-strong) !important;
1383
+ }
1384
+ ._textfield-container_qi63h_1:hover > ._textfield_qi63h_1 {
1382
1385
  outline: 1px solid var(--neutral-border-opaque-strong);
1383
1386
  }
1384
- ._textfield-container_ogykf_1[data-disabled=true] {
1387
+ ._textfield-container_qi63h_1[data-disabled=true] {
1385
1388
  cursor: not-allowed;
1386
1389
  }
1387
- ._textfield-container_ogykf_1[data-disabled=true] > * {
1390
+ ._textfield-container_qi63h_1[data-disabled=true] > * {
1388
1391
  cursor: not-allowed !important;
1389
1392
  }
1390
- ._textfield-container_ogykf_1[data-disabled=true] > ._textfield_ogykf_1 {
1391
- outline: 1px solid var(--neutral-border-opaque-normal) !important;
1393
+ ._textfield-container_qi63h_1[data-disabled=true] > ._textfield_qi63h_1 {
1394
+ outline: 1px solid var(--neutral-border-opaque-normal);
1395
+ }
1396
+ ._textfield-container_qi63h_1[data-error=true] > ._textfield_qi63h_1 {
1397
+ outline: 2px solid var(--function-label-negative);
1398
+ }
1399
+ ._textfield-container_qi63h_1[data-error=true] > ._textfield_qi63h_1 > ._input_qi63h_25 + ._label_qi63h_25 {
1400
+ color: var(--function-label-negative);
1401
+ }
1402
+ ._textfield-container_qi63h_1[data-error=true] > ._textfield_qi63h_1:hover {
1403
+ outline: 2px solid var(--function-label-negative);
1404
+ }
1405
+ ._textfield-container_qi63h_1[data-error=true] > ._textfield_qi63h_1:focus-within {
1406
+ outline: 2px solid var(--function-label-negative) !important;
1407
+ }
1408
+ ._textfield-container_qi63h_1[data-error=true] > ._textfield_qi63h_1:focus-within > ._label_qi63h_25 {
1409
+ color: var(--function-label-negative);
1392
1410
  }
1393
- ._textfield_ogykf_1 {
1411
+ ._textfield-container_qi63h_1[data-error=true] > ._footer_qi63h_37 > ._error-wrapper_qi63h_37 > ._error-message_qi63h_37 {
1412
+ color: var(--function-label-negative);
1413
+ }
1414
+ ._textfield_qi63h_1 {
1394
1415
  box-sizing: border-box;
1395
1416
  position: relative;
1396
1417
  width: 100%;
@@ -1401,43 +1422,40 @@
1401
1422
  cursor: text;
1402
1423
  transition: ease-out all 0.1s;
1403
1424
  }
1404
- ._textfield_ogykf_1:focus-within {
1405
- outline: 2px solid var(--neutral-border-opaque-strong);
1406
- }
1407
- ._textfield_ogykf_1:disabled {
1425
+ ._textfield_qi63h_1:disabled {
1408
1426
  outline: 1px solid var(--neutral-border-opaque-subtle);
1409
1427
  cursor: not-allowed;
1410
1428
  }
1411
- ._textfield_ogykf_1:disabled > ._label_ogykf_38 {
1429
+ ._textfield_qi63h_1:disabled > ._label_qi63h_25 {
1412
1430
  color: var(--neutral-label-tertiary);
1413
1431
  cursor: not-allowed;
1414
1432
  }
1415
- ._textfield_ogykf_1._label-out-textfield_ogykf_42 {
1433
+ ._textfield_qi63h_1._label-out-textfield_qi63h_60 {
1416
1434
  height: 52px;
1417
1435
  margin-top: 24px;
1418
1436
  }
1419
- ._textfield_ogykf_1._white_ogykf_46 {
1437
+ ._textfield_qi63h_1._white_qi63h_64 {
1420
1438
  background: var(--neutral-container-lowest);
1421
1439
  }
1422
- ._textfield_ogykf_1._gray_ogykf_49 {
1440
+ ._textfield_qi63h_1._gray_qi63h_67 {
1423
1441
  background: var(--neutral-container-mid);
1424
1442
  }
1425
- ._label_ogykf_38 {
1443
+ ._label_qi63h_25 {
1426
1444
  position: absolute;
1427
1445
  left: 0;
1428
1446
  top: 0;
1429
1447
  color: var(--neutral-label-secondary);
1430
1448
  cursor: text;
1431
1449
  }
1432
- ._label-in_ogykf_61 {
1450
+ ._label-in_qi63h_79 {
1433
1451
  transform-origin: left top;
1434
1452
  transform: translate(var(--lp-sys-padding-component-400), 100%) scale(1);
1435
1453
  transition: all 0.2s cubic-bezier(0, 0, 0.2, 1);
1436
1454
  }
1437
- ._label-out_ogykf_42 {
1455
+ ._label-out_qi63h_60 {
1438
1456
  transform: translateY(-150%);
1439
1457
  }
1440
- ._label-visually-hidden_ogykf_71 {
1458
+ ._label-visually-hidden_qi63h_89 {
1441
1459
  position: absolute;
1442
1460
  width: 1px;
1443
1461
  height: 1px;
@@ -1447,7 +1465,7 @@
1447
1465
  white-space: nowrap;
1448
1466
  border: 0;
1449
1467
  }
1450
- ._input-wrapper_ogykf_82 {
1468
+ ._input-wrapper_qi63h_100 {
1451
1469
  display: flex;
1452
1470
  align-items: center;
1453
1471
  justify-content: space-between;
@@ -1455,7 +1473,7 @@
1455
1473
  height: 100%;
1456
1474
  gap: var(--lp-sys-gap-positive-300);
1457
1475
  }
1458
- ._input_ogykf_82 {
1476
+ ._input_qi63h_25 {
1459
1477
  background: transparent;
1460
1478
  border: none;
1461
1479
  outline: none;
@@ -1469,68 +1487,49 @@
1469
1487
  font-weight: var(--lp-pri-font-weight-400);
1470
1488
  line-height: 130%;
1471
1489
  }
1472
- ._input_ogykf_82:focus + ._label-in_ogykf_61,
1473
- ._input_ogykf_82:not(:placeholder-shown) + ._label-in_ogykf_61 {
1490
+ ._input_qi63h_25:focus + ._label-in_qi63h_79,
1491
+ ._input_qi63h_25:not(:placeholder-shown) + ._label-in_qi63h_79 {
1474
1492
  transform: translate(var(--lp-sys-padding-component-400), 60%) scale(0.8);
1475
1493
  font-weight: var(--lp-pri-font-weight-500);
1476
1494
  color: var(--neutral-label-primary);
1477
1495
  }
1478
- ._input_ogykf_82::placeholder {
1496
+ ._input_qi63h_25::placeholder {
1479
1497
  color: var(--neutral-label-tertiary);
1480
1498
  font-size: var(--lp-pri-font-size-15);
1481
1499
  font-style: normal;
1482
1500
  font-weight: var(--lp-pri-font-weight-400);
1483
1501
  line-height: 130%;
1484
1502
  }
1485
- ._label-out-input_ogykf_118 {
1503
+ ._label-out-input_qi63h_136 {
1486
1504
  transform: translateY(0);
1487
1505
  }
1488
- ._input-action-buttons_ogykf_122 {
1506
+ ._input-action-buttons_qi63h_140 {
1489
1507
  display: flex;
1490
1508
  align-items: center;
1491
1509
  gap: var(--lp-sys-gap-positive-50);
1492
1510
  }
1493
- ._action-button_ogykf_128 {
1511
+ ._action-button_qi63h_146 {
1494
1512
  margin-right: var(--lp-sys-padding-component-100);
1495
1513
  }
1496
- ._action-button_ogykf_128 > svg > circle {
1514
+ ._action-button_qi63h_146 > svg > circle {
1497
1515
  fill: var(--neutral-label-secondary);
1498
1516
  }
1499
- ._error_ogykf_135 {
1500
- display: block;
1501
- outline: 2px solid var(--function-label-negative);
1502
- }
1503
- ._error_ogykf_135 > ._input_ogykf_82 + ._label_ogykf_38 {
1504
- color: var(--function-label-negative);
1505
- }
1506
- ._error_ogykf_135:hover {
1507
- outline: 2px solid var(--function-label-negative);
1508
- }
1509
- ._error_ogykf_135:focus-within {
1510
- outline: 2px solid var(--function-label-negative);
1511
- }
1512
- ._error_ogykf_135:focus-within > ._label_ogykf_38 {
1513
- color: var(--function-label-negative);
1514
- }
1515
- ._error_ogykf_135 > div > ._error-message_ogykf_151 {
1516
- color: var(--function-label-negative);
1517
- }
1518
- ._error-wrapper_ogykf_155 {
1517
+ ._error-wrapper_qi63h_37 {
1519
1518
  display: flex;
1520
1519
  align-items: flex-end;
1521
1520
  gap: 4px;
1522
1521
  }
1523
- ._error-wrapper_ogykf_155 > ._error-message_ogykf_151 {
1522
+ ._error-wrapper_qi63h_37 > ._error-message_qi63h_37 {
1524
1523
  color: var(--function-label-negative);
1525
1524
  }
1526
- ._footer_ogykf_164 {
1525
+ ._footer_qi63h_37 {
1527
1526
  display: flex;
1528
1527
  justify-content: space-between;
1529
1528
  align-items: center;
1530
1529
  gap: 8px;
1531
1530
  min-height: var(--lp-sys-icon-size-xs);
1532
1531
  }
1533
- ._character_ogykf_172 {
1532
+ ._character_qi63h_170 {
1534
1533
  color: var(--neutral-label-secondary);
1535
1534
  }
1536
1535
 
package/lib/index.d.ts CHANGED
@@ -8,6 +8,7 @@ import { ToastProps } from '@radix-ui/react-toast';
8
8
  import * as _artsy_fresnel_dist_Media from '@artsy/fresnel/dist/Media';
9
9
  import { breakpointOrigin } from '@liner-fe/design-token';
10
10
  import { Popover as Popover$1, Tooltip as Tooltip$1, Checkbox as Checkbox$1, RadioGroup, Slider as Slider$1, Select as Select$1, Label as Label$1 } from 'radix-ui';
11
+ import * as recoil from 'recoil';
11
12
  import * as PopoverPrimitive from '@radix-ui/react-popover';
12
13
  import { PopoverProps, PopoverPortalProps } from '@radix-ui/react-popover';
13
14
  import { ImageProps } from 'next/image';
@@ -504,6 +505,11 @@ type SnackbarPropWithId = SnackbarProp & {
504
505
  declare const Snackbar: () => react_jsx_runtime.JSX.Element;
505
506
  declare const SingleSnackbar: (props: SnackbarPropWithId) => react_jsx_runtime.JSX.Element;
506
507
 
508
+ declare const snackbarAtom: recoil.RecoilState<SnackbarPropWithId[]>;
509
+ declare const useSnackbar: () => {
510
+ open: (info: SnackbarProp) => void;
511
+ };
512
+
507
513
  declare const defaultLabelVariants: (props?: ({
508
514
  level?: "primary" | "secondary" | undefined;
509
515
  position?: "top" | "right" | undefined;
@@ -675,4 +681,4 @@ interface TagProps extends Omit<IPropsNormalBold, 'type' | 'size' | 'weight'> {
675
681
  }
676
682
  declare const Tag: react.ForwardRefExoticComponent<TagProps & react.RefAttributes<HTMLParagraphElement>>;
677
683
 
678
- export { type BaseCoachMarkContentProps, type BasicColorType, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DefaultButton, type DefaultButtonProps, Display, type FillFalseLevelType, type FillLevelType, type FillType, Heading, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, Icon, IconButton, type IconButtonLevelType, type IconButtonProps, type IconColorType, type IconComponent, type IconComponentProps, type IconKey, type IconMapType, type IconProps, type IconSizeKey, type IconSizeType, type ItemProps, Label, List, Loading, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Slider, Snackbar, Tag, TextButton, type TextButtonProps, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, getIconComponent, iconKeyOptions, iconMap, isEmptyObject, objectToArray, rootMediaStyle, useToast };
684
+ export { type BaseCoachMarkContentProps, type BasicColorType, type BreakPointsKey, Button, type ButtonIconProps, type ButtonProps, type ButtonSizeType, Caption, Checkbox, CoachMark, type CoachMarkContentProps, type CommonButtonProps, CompactCoachMark, DefaultButton, type DefaultButtonProps, Display, type FillFalseLevelType, type FillLevelType, type FillType, Heading, type ICaptionProps, type IDisplayProps, type IHeadingProps, type IPropsAccent, type IPropsAnswer, type IPropsNormal, type IPropsNormalBold, type IPropsPost, type ITitleProps, Icon, IconButton, type IconButtonLevelType, type IconButtonProps, type IconColorType, type IconComponent, type IconComponentProps, type IconKey, type IconMapType, type IconProps, type IconSizeKey, type IconSizeType, type ItemProps, Label, List, Loading, Logo, Media, MediaContextProvider, Paragraph, type ParagraphProps, Popover, type PopoverContentProps, PrimitiveCoachMark, type PrimitiveCoachMarkContentProps, type PrimitiveCoachMarkRootProps, Radio, Select, type SelectItemProps, type SelectProps, SingleSnackbar, Slider, Snackbar, Tag, TextButton, type TextButtonProps, Textfield, type TextfieldButtonProps, type TextfieldLabelType, type TextfieldProps, Title, Toaster, Tooltip, Typography, arrayToStyleObject, getIconComponent, iconKeyOptions, iconMap, isEmptyObject, objectToArray, rootMediaStyle, snackbarAtom, useSnackbar, useToast };
package/lib/index.js CHANGED
@@ -69,6 +69,8 @@ __export(index_exports, {
69
69
  isEmptyObject: () => isEmptyObject,
70
70
  objectToArray: () => objectToArray,
71
71
  rootMediaStyle: () => rootMediaStyle,
72
+ snackbarAtom: () => snackbarAtom,
73
+ useSnackbar: () => useSnackbar,
72
74
  useToast: () => useToast
73
75
  });
74
76
  module.exports = __toCommonJS(index_exports);
@@ -17125,25 +17127,24 @@ var import_react19 = require("react");
17125
17127
 
17126
17128
  // src/components/Textfield/style.module.scss
17127
17129
  var style_module_default13 = {
17128
- "textfield-container": "_textfield-container_ogykf_1",
17129
- "textfield": "_textfield_ogykf_1",
17130
- "label": "_label_ogykf_38",
17131
- "label-out-textfield": "_label-out-textfield_ogykf_42",
17132
- "white": "_white_ogykf_46",
17133
- "gray": "_gray_ogykf_49",
17134
- "label-in": "_label-in_ogykf_61",
17135
- "label-out": "_label-out_ogykf_42",
17136
- "label-visually-hidden": "_label-visually-hidden_ogykf_71",
17137
- "input-wrapper": "_input-wrapper_ogykf_82",
17138
- "input": "_input_ogykf_82",
17139
- "label-out-input": "_label-out-input_ogykf_118",
17140
- "input-action-buttons": "_input-action-buttons_ogykf_122",
17141
- "action-button": "_action-button_ogykf_128",
17142
- "error": "_error_ogykf_135",
17143
- "error-message": "_error-message_ogykf_151",
17144
- "error-wrapper": "_error-wrapper_ogykf_155",
17145
- "footer": "_footer_ogykf_164",
17146
- "character": "_character_ogykf_172"
17130
+ "textfield-container": "_textfield-container_qi63h_1",
17131
+ "textfield": "_textfield_qi63h_1",
17132
+ "input": "_input_qi63h_25",
17133
+ "label": "_label_qi63h_25",
17134
+ "footer": "_footer_qi63h_37",
17135
+ "error-wrapper": "_error-wrapper_qi63h_37",
17136
+ "error-message": "_error-message_qi63h_37",
17137
+ "label-out-textfield": "_label-out-textfield_qi63h_60",
17138
+ "white": "_white_qi63h_64",
17139
+ "gray": "_gray_qi63h_67",
17140
+ "label-in": "_label-in_qi63h_79",
17141
+ "label-out": "_label-out_qi63h_60",
17142
+ "label-visually-hidden": "_label-visually-hidden_qi63h_89",
17143
+ "input-wrapper": "_input-wrapper_qi63h_100",
17144
+ "label-out-input": "_label-out-input_qi63h_136",
17145
+ "input-action-buttons": "_input-action-buttons_qi63h_140",
17146
+ "action-button": "_action-button_qi63h_146",
17147
+ "character": "_character_qi63h_170"
17147
17148
  };
17148
17149
 
17149
17150
  // src/components/Textfield/index.tsx
@@ -17219,12 +17220,11 @@ var Textfield = (0, import_react19.forwardRef)((props, ref) => {
17219
17220
  }
17220
17221
  }, "handleDeidentify");
17221
17222
  (0, import_react19.useImperativeHandle)(ref, () => inputRef.current);
17222
- return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { className: style_module_default13["textfield-container"], "data-disabled": disabled, children: [
17223
+ return /* @__PURE__ */ (0, import_jsx_runtime206.jsxs)("div", { className: style_module_default13["textfield-container"], "data-disabled": disabled, "data-error": !!error, children: [
17223
17224
  /* @__PURE__ */ (0, import_jsx_runtime206.jsx)(
17224
17225
  "div",
17225
17226
  {
17226
17227
  className: (0, import_clsx15.default)(defaultTextfieldVariants({ color }), {
17227
- [style_module_default13.error]: !!error,
17228
17228
  [style_module_default13["label-out-textfield"]]: !label || labelType === "out"
17229
17229
  }),
17230
17230
  onClick: handleTextfieldClick,
@@ -17632,6 +17632,15 @@ var snackbarAtom = (0, import_recoil3.atom)({
17632
17632
  key: "snackbarAtom",
17633
17633
  default: []
17634
17634
  });
17635
+ var useSnackbar = /* @__PURE__ */ __name(() => {
17636
+ const setSnackbar = (0, import_recoil3.useSetRecoilState)(snackbarAtom);
17637
+ return {
17638
+ open: /* @__PURE__ */ __name((info) => {
17639
+ const snackbarId = generateRandomId();
17640
+ setSnackbar((prev) => [...prev, { ...info, snackbarId }]);
17641
+ }, "open")
17642
+ };
17643
+ }, "useSnackbar");
17635
17644
 
17636
17645
  // src/components/Snackbar/SnackbarIcon/style.module.scss
17637
17646
  var style_module_default18 = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liner-fe/prism",
3
- "version": "2.6.6",
3
+ "version": "2.6.8",
4
4
  "scripts": {
5
5
  "dev": "next dev",
6
6
  "start": "next start",