@trionesdev/antd-mobile-base-react 0.0.2-beta.16 → 0.0.2-beta.17

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.
Files changed (110) hide show
  1. package/LICENSE +21 -21
  2. package/README.md +23 -23
  3. package/dist/Alert/style.scss +69 -69
  4. package/dist/Avatar/avatar.d.ts +2 -2
  5. package/dist/Avatar/avatar.js +1 -1
  6. package/dist/Avatar/style.scss +17 -17
  7. package/dist/Badge/style.scss +100 -100
  8. package/dist/Card/style.scss +35 -35
  9. package/dist/CascaderView/style.scss +22 -22
  10. package/dist/Cell/CellGroup.js +25 -8
  11. package/dist/Cell/cell.js +20 -37
  12. package/dist/Cell/context.d.ts +4 -2
  13. package/dist/Cell/styles.scss +81 -52
  14. package/dist/Cell/types.d.ts +6 -4
  15. package/dist/Checkbox/checkbox-group.js +1 -2
  16. package/dist/Checkbox/index.scss +165 -165
  17. package/dist/ConfigProvider/config-provider.d.ts +1 -0
  18. package/dist/DemoBlock/index.scss +20 -20
  19. package/dist/DemoDescription/index.scss +3 -3
  20. package/dist/Descriptions/style.scss +65 -65
  21. package/dist/Divider/divider.d.ts +1 -1
  22. package/dist/Divider/divider.js +5 -3
  23. package/dist/Divider/style.scss +62 -62
  24. package/dist/Ellipsis/style.scss +13 -13
  25. package/dist/Empty/style.scss +29 -29
  26. package/dist/ErrorBlock/demo/base.js +2 -2
  27. package/dist/ErrorBlock/style.scss +62 -62
  28. package/dist/Footer/style.scss +55 -55
  29. package/dist/Form/ErrorList.d.ts +4 -0
  30. package/dist/Form/ErrorList.js +9 -0
  31. package/dist/Form/context.d.ts +4 -2
  32. package/dist/Form/context.js +2 -1
  33. package/dist/Form/form.d.ts +24 -6
  34. package/dist/Form/form.js +22 -11
  35. package/dist/Form/hooks/useForm.js +1 -8
  36. package/dist/Form/hooks/useFormContext.js +1 -2
  37. package/dist/Form/index.d.ts +6 -3
  38. package/dist/Form/index.js +4 -1
  39. package/dist/Form/styles.scss +11 -0
  40. package/dist/Form/types.d.ts +2 -1
  41. package/dist/FormCell/FormCell.d.ts +21 -0
  42. package/dist/FormCell/FormCell.js +56 -0
  43. package/dist/FormCell/index.d.ts +4 -0
  44. package/dist/FormCell/index.js +3 -0
  45. package/dist/FormCell/styles.scss +103 -0
  46. package/dist/Grid/style.scss +17 -17
  47. package/dist/Icon/demo/base.js +2 -2
  48. package/dist/InputNumber/style.scss +100 -100
  49. package/dist/Loading/DotLoading.d.ts +8 -0
  50. package/dist/Loading/DotLoading.js +33 -0
  51. package/dist/Loading/SpinLoading.js +70 -0
  52. package/dist/Loading/dot-loading.scss +72 -0
  53. package/dist/Loading/index.d.ts +5 -0
  54. package/dist/Loading/index.js +3 -0
  55. package/dist/{SpinLoading → Loading}/spin-loading.scss +39 -40
  56. package/dist/NavBar/style.scss +64 -64
  57. package/dist/NoticeBar/style.scss +130 -130
  58. package/dist/PageIndicator/style.scss +59 -59
  59. package/dist/Progress/Progress.js +1 -1
  60. package/dist/Progress/ProgressCircle.js +5 -2
  61. package/dist/Progress/ProgressLine.js +2 -2
  62. package/dist/Progress/style.scss +33 -33
  63. package/dist/Progress/types.d.ts +2 -2
  64. package/dist/Radio/style.scss +154 -141
  65. package/dist/Rate/style.scss +37 -37
  66. package/dist/Result/demo/base.js +2 -2
  67. package/dist/Result/style.scss +73 -73
  68. package/dist/SafeArea/style.scss +20 -20
  69. package/dist/Scaffold/style.scss +17 -17
  70. package/dist/Segmented/style.scss +75 -75
  71. package/dist/Skeleton/Skeleton.d.ts +80 -21
  72. package/dist/Skeleton/Skeleton.js +248 -57
  73. package/dist/Skeleton/index.d.ts +3 -1
  74. package/dist/Skeleton/index.js +2 -1
  75. package/dist/Skeleton/style.scss +215 -48
  76. package/dist/Space/space.js +12 -9
  77. package/dist/Space/style.scss +101 -80
  78. package/dist/Stepper/stepper.js +2 -1
  79. package/dist/Stepper/style.scss +100 -100
  80. package/dist/Steps/HorizontalSteps.js +5 -2
  81. package/dist/Steps/VerticalSteps.js +5 -2
  82. package/dist/Steps/style.scss +153 -153
  83. package/dist/Steps/types.d.ts +2 -0
  84. package/dist/Switch/style.scss +127 -128
  85. package/dist/Switch/switch.d.ts +2 -0
  86. package/dist/Switch/switch.js +6 -5
  87. package/dist/TabBar/demo/base.js +2 -2
  88. package/dist/TabBar/index.scss +37 -37
  89. package/dist/Tabs/style.scss +108 -108
  90. package/dist/Tag/style.scss +110 -109
  91. package/dist/Tag/tag.d.ts +1 -1
  92. package/dist/Tag/tag.js +1 -1
  93. package/dist/WaterMark/style.scss +17 -17
  94. package/dist/index.d.ts +9 -4
  95. package/dist/index.js +4 -2
  96. package/dist/style/css-variable.scss +6 -6
  97. package/dist/style/style.scss +52 -52
  98. package/dist/style/theme-dark.scss +24 -24
  99. package/dist/style/theme-default.scss +54 -54
  100. package/dist/style/variable.scss +180 -173
  101. package/dist/types.d.ts +6 -1
  102. package/dist/utils/type.js +36 -36
  103. package/dist/utils/with-default-props.js +4 -4
  104. package/package.json +4 -7
  105. package/dist/SpinLoading/index.d.ts +0 -3
  106. package/dist/SpinLoading/index.js +0 -2
  107. package/dist/SpinLoading/spin-loading.js +0 -59
  108. package/dist/Tabs/demo/base.d.ts +0 -3
  109. package/dist/Tabs/demo/base.js +0 -59
  110. /package/dist/{SpinLoading/spin-loading.d.ts → Loading/SpinLoading.d.ts} +0 -0
@@ -0,0 +1,33 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
5
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
6
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
7
+ import classNames from 'classnames';
8
+ import React, { memo, useMemo } from 'react';
9
+ import "./dot-loading.scss";
10
+ var dotLoadingCls = 'triones-antm-dot-loading';
11
+ export var DotLoading = /*#__PURE__*/memo(function (_ref) {
12
+ var className = _ref.className,
13
+ styleProp = _ref.style,
14
+ _ref$color = _ref.color,
15
+ colorProp = _ref$color === void 0 ? 'default' : _ref$color;
16
+ var colors = ['default', 'primary', 'white'];
17
+ var rootStyle = useMemo(function () {
18
+ var style = _objectSpread({}, styleProp);
19
+ if (!colors.includes(colorProp)) {
20
+ style.color = colorProp;
21
+ }
22
+ return style;
23
+ }, [colorProp]);
24
+ return /*#__PURE__*/React.createElement("div", {
25
+ className: classNames(className, dotLoadingCls, _defineProperty({}, "".concat(dotLoadingCls, "-").concat(colorProp), colors.includes(colorProp))),
26
+ style: rootStyle
27
+ }, [0, 1, 2].map(function (i) {
28
+ return /*#__PURE__*/React.createElement("i", {
29
+ key: i,
30
+ className: classNames("".concat(dotLoadingCls, "-dot"), "".concat(dotLoadingCls, "-dot-").concat(i))
31
+ });
32
+ }));
33
+ });
@@ -0,0 +1,70 @@
1
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
2
+ function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
3
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : String(i); }
4
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
5
+ import classNames from 'classnames';
6
+ import Base64 from 'crypto-js/enc-base64';
7
+ import Utf8 from 'crypto-js/enc-utf8';
8
+ import React from 'react';
9
+ import "./spin-loading.scss";
10
+ var spinLoadingCls = 'triones-antm-spin-loading';
11
+ export function createSvgStr(props) {
12
+ return "<svg xmlns=\"http://www.w3.org/2000/svg\" style=\"width:100%;height:100%\" viewBox=\"0 0 32 32\">\n <circle r=\"15\" cx=\"16\" cy=\"16\"\n stroke-width=\"2\"\n stroke=\"".concat(props.stroke, "\"\n fill=\"transparent\"\n stroke-linecap=\"round\"\n stroke-dasharray=\"").concat(15 * 3.14159265358979 * 2, "\"\n stroke-dashoffset=\"").concat(15 * 3.14159265358979 * 0.5, "\"></circle>\n </svg>");
13
+ }
14
+ export var SpinLoading = function SpinLoading(_ref) {
15
+ var _ref$size = _ref.size,
16
+ size = _ref$size === void 0 ? 'middle' : _ref$size,
17
+ _ref$color = _ref.color,
18
+ colorProp = _ref$color === void 0 ? 'default' : _ref$color;
19
+ var colors = ['default', 'primary', 'white'];
20
+ var computedSize = React.useMemo(function () {
21
+ var resSize = null;
22
+ if (size === 'small') {
23
+ resSize = '24Px';
24
+ } else if (size === 'middle') {
25
+ resSize = '32Px';
26
+ } else if (size === 'large') {
27
+ resSize = '48Px';
28
+ } else {
29
+ resSize = size;
30
+ }
31
+ if (typeof resSize === 'number') {
32
+ return "".concat(resSize, "Px");
33
+ } else {
34
+ return resSize;
35
+ }
36
+ }, [size]);
37
+
38
+ // const computedColor = React.useMemo(() => {
39
+ // if (colorProp === 'default') {
40
+ // return '#9D9D9D';
41
+ // } else if (colorProp === 'primary') {
42
+ // return '#1677ff';
43
+ // } else if (colorProp === 'white') {
44
+ // return '#ffffff';
45
+ // } else {
46
+ // return colorProp;
47
+ // }
48
+ // }, [colorProp]);
49
+
50
+ var completedStyle = React.useMemo(function () {
51
+ var maskImageSvg = createSvgStr({
52
+ stroke: 'currentColor'
53
+ });
54
+ var style = {
55
+ '--size': computedSize,
56
+ // '--color': computedColor,
57
+ '--maskImage': "url(data:image/svg+xml;base64,".concat(Base64.stringify(Utf8.parse(maskImageSvg)), ")")
58
+ };
59
+ if (!colors.includes(colorProp)) {
60
+ style.color = colorProp;
61
+ }
62
+ return style;
63
+ }, [computedSize, colorProp]);
64
+ return /*#__PURE__*/React.createElement("div", {
65
+ className: classNames(spinLoadingCls, _defineProperty({}, "".concat(spinLoadingCls, "-").concat(colorProp), colors.includes(colorProp))),
66
+ style: completedStyle
67
+ }, /*#__PURE__*/React.createElement("i", {
68
+ className: classNames("".concat(spinLoadingCls, "-spin"))
69
+ }));
70
+ };
@@ -0,0 +1,72 @@
1
+ @use "../style/variable" as variable;
2
+
3
+ $dotLoadingCls: triones-antm-dot-loading;
4
+
5
+ .#{$dotLoadingCls} {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ height: 1em;
9
+ vertical-align: -0.125em;
10
+ /* 18 / 40 * 1em — horizontal gap between dots in antd-mobile viewBox */
11
+ gap: 0.45em;
12
+
13
+ &-default {
14
+ color: #9D9D9D;
15
+ }
16
+
17
+ &-primary {
18
+ color: variable.$trionesColorPrimary;
19
+ }
20
+
21
+ &-white {
22
+ color: white;
23
+ }
24
+
25
+ &-dot {
26
+ display: block;
27
+ flex-shrink: 0;
28
+ /* 8×8 in a 40-unit-tall viewBox, height = 1em */
29
+ width: 0.2em;
30
+ height: 0.2em;
31
+ background: currentColor;
32
+ //mask-image: var(--dotLoadingMask);
33
+ //-webkit-mask-image: var(--dotLoadingMask);
34
+ mask-repeat: no-repeat;
35
+ -webkit-mask-repeat: no-repeat;
36
+ mask-size: 100% 100%;
37
+ -webkit-mask-size: 100% 100%;
38
+ mask-position: center;
39
+ -webkit-mask-position: center;
40
+ animation: triones-antm-dot-loading-bounce 2s infinite linear;
41
+ animation-fill-mode: backwards;
42
+ }
43
+
44
+ &-dot-0 {
45
+ animation-delay: 0s;
46
+ }
47
+
48
+ &-dot-1 {
49
+ animation-delay: 0.2s;
50
+ }
51
+
52
+ &-dot-2 {
53
+ animation-delay: 0.4s;
54
+ }
55
+ }
56
+
57
+ /* Mirrors antd-mobile SMIL: values 16;6;26;16;16, keyTimes 0;0.1;0.3;0.4;1, viewBox height 40 */
58
+ @keyframes triones-antm-dot-loading-bounce {
59
+ 0%,
60
+ 40%,
61
+ 100% {
62
+ transform: translateY(0);
63
+ }
64
+
65
+ 10% {
66
+ transform: translateY(-0.25em);
67
+ }
68
+
69
+ 30% {
70
+ transform: translateY(0.25em);
71
+ }
72
+ }
@@ -0,0 +1,5 @@
1
+ import { SpinLoading, SpinLoadingProps } from './SpinLoading';
2
+ export { DotLoading } from './DotLoading';
3
+ export type { DotLoadingProps } from './DotLoading';
4
+ export type { SpinLoadingProps };
5
+ export { SpinLoading };
@@ -0,0 +1,3 @@
1
+ import { SpinLoading } from "./SpinLoading";
2
+ export { DotLoading } from "./DotLoading";
3
+ export { SpinLoading };
@@ -1,40 +1,39 @@
1
- $spinLoadingCls: triones-antm-spin-loading;
2
-
3
- .#{$spinLoadingCls} {
4
- --size: 32Px;
5
- --color: #1677ff;
6
- width: var(--size);
7
- height: var(--size);
8
-
9
- &-svg {
10
- width: 100%;
11
- height: 100%;
12
- //animation: adm-spin-loading-rotate 0.8s infinite linear;
13
-
14
- > .#{$spinLoadingCls}-circle {
15
- //stroke: #1677ff;
16
- stroke: var(--color);
17
- }
18
- }
19
-
20
- &-loading {
21
- color: var(--color);
22
- display: inline-block;
23
- height: 100%;
24
- width: 100%;
25
- background: currentColor;
26
- mask-image: var(--maskImage);
27
- -webkit-mask-image: var(--maskImage);
28
- animation: adm-spin-loading-rotate 2s infinite linear;
29
- }
30
-
31
- }
32
-
33
- @keyframes adm-spin-loading-rotate {
34
- from {
35
- transform: rotate(0deg);
36
- }
37
- to {
38
- transform: rotate(360deg);
39
- }
40
- }
1
+ @use "../style/variable" as variable;
2
+ $spinLoadingCls: triones-antm-spin-loading;
3
+
4
+ .#{$spinLoadingCls} {
5
+ --size: 32Px;
6
+ width: var(--size);
7
+ height: var(--size);
8
+
9
+ &-default{
10
+ color: #9D9D9D;
11
+ }
12
+ &-primary{
13
+ color: variable.$trionesColorPrimary;
14
+ }
15
+ &-white{
16
+ color: #ffffff;
17
+ }
18
+
19
+ &-spin {
20
+ //color: var(--color);
21
+ display: inline-block;
22
+ height: 100%;
23
+ width: 100%;
24
+ background: currentColor;
25
+ mask-image: var(--maskImage);
26
+ -webkit-mask-image: var(--maskImage);
27
+ animation: adm-spin-loading-rotate 2s infinite linear;
28
+ }
29
+
30
+ }
31
+
32
+ @keyframes adm-spin-loading-rotate {
33
+ from {
34
+ transform: rotate(0deg);
35
+ }
36
+ to {
37
+ transform: rotate(360deg);
38
+ }
39
+ }
@@ -1,64 +1,64 @@
1
- @use "../style/variable" as variable;
2
-
3
- $trionesNavBarColorBg: variable.$trionesColorBorderBg !default;
4
- $trionesNavBarColorText: variable.$trionesColorTextBase !default;
5
-
6
- $class-prefix-nav-bar: 'triones-antm-nav-bar';
7
- /* prettier-ignore */
8
- .#{$class-prefix-nav-bar} {
9
- --height: 45PX;
10
- --border-bottom: none;
11
- display: flex;
12
- align-items: center;
13
- height: var(--height);
14
- border-bottom: var(--border-bottom);
15
- padding: 0 12PX;
16
- white-space: nowrap;
17
- color: $trionesNavBarColorText;
18
- background-color: $trionesNavBarColorBg;
19
-
20
- &-left,
21
- &-right {
22
- flex: 1;
23
- }
24
-
25
- &-title {
26
- flex: auto;
27
- text-align: center;
28
- overflow: hidden;
29
- text-overflow: ellipsis;
30
- }
31
-
32
- &-back {
33
- display: flex;
34
- align-items: center;
35
- margin-right: 16PX;
36
- padding: 6PX 0;
37
- cursor: pointer;
38
-
39
- &-arrow {
40
- font-size: 20PX;
41
- margin-right: 5PX;
42
- display: flex;
43
- align-items: center;
44
- }
45
- }
46
-
47
- &-left {
48
- font-size: var(--triones-antm-font-size-7);
49
- display: flex;
50
- justify-content: flex-start;
51
- align-items: center;
52
- }
53
-
54
- &-title {
55
- justify-content: center;
56
- white-space: nowrap;
57
- font-size: var(--triones-antm-font-size-10);
58
- padding: 0 12PX;
59
- }
60
-
61
- &-right {
62
- text-align: right;
63
- }
64
- }
1
+ @use "../style/variable" as variable;
2
+
3
+ $trionesNavBarColorBg: variable.$trionesColorBorderBg !default;
4
+ $trionesNavBarColorText: variable.$trionesColorTextBase !default;
5
+
6
+ $class-prefix-nav-bar: 'triones-antm-nav-bar';
7
+ /* prettier-ignore */
8
+ .#{$class-prefix-nav-bar} {
9
+ --height: 45PX;
10
+ --border-bottom: none;
11
+ display: flex;
12
+ align-items: center;
13
+ height: var(--height);
14
+ border-bottom: var(--border-bottom);
15
+ padding: 0 12PX;
16
+ white-space: nowrap;
17
+ color: $trionesNavBarColorText;
18
+ background-color: $trionesNavBarColorBg;
19
+
20
+ &-left,
21
+ &-right {
22
+ flex: 1;
23
+ }
24
+
25
+ &-title {
26
+ flex: auto;
27
+ text-align: center;
28
+ overflow: hidden;
29
+ text-overflow: ellipsis;
30
+ }
31
+
32
+ &-back {
33
+ display: flex;
34
+ align-items: center;
35
+ margin-right: 16PX;
36
+ padding: 6PX 0;
37
+ cursor: pointer;
38
+
39
+ &-arrow {
40
+ font-size: 20PX;
41
+ margin-right: 5PX;
42
+ display: flex;
43
+ align-items: center;
44
+ }
45
+ }
46
+
47
+ &-left {
48
+ font-size: var(--triones-antm-font-size-7);
49
+ display: flex;
50
+ justify-content: flex-start;
51
+ align-items: center;
52
+ }
53
+
54
+ &-title {
55
+ justify-content: center;
56
+ white-space: nowrap;
57
+ font-size: var(--triones-antm-font-size-10);
58
+ padding: 0 12PX;
59
+ }
60
+
61
+ &-right {
62
+ text-align: right;
63
+ }
64
+ }
@@ -1,130 +1,130 @@
1
- $class-prefix-notice-bar: 'triones-antm-notice-bar';
2
- /* prettier-ignore */
3
- .#{$class-prefix-notice-bar} {
4
- --background-color: var(--triones-antm-color-weak);
5
- --border-color: var(--triones-antm-color-weak);
6
- --text-color: var(--triones-antm-color-text-light-solid);
7
- --font-size: var(--triones-antm-font-size-7);
8
- --icon-font-size: var(--triones-antm-font-size-10);
9
- --height: 40PX;
10
- --triones-antm-notice-bar-border-radius: 4PX;
11
- --triones-antm-notice-bar-border-width: 1PX;
12
-
13
- flex: 1 auto;
14
- height: var(--height);
15
- box-sizing: border-box;
16
- font-size: var(--font-size);
17
- padding: 0 12PX;
18
- display: flex;
19
- align-items: center;
20
- justify-content: space-between;
21
-
22
- border: solid var(--triones-antm-notice-bar-border-width) var(--border-color);
23
- border-left-width: 0;
24
- border-right-width: 0;
25
- background-color: var(--background-color);
26
- color: var(--text-color);
27
- & > span[role='img'] {
28
- color: var(--text-color);
29
- }
30
-
31
- &.#{$class-prefix-notice-bar}-alert {
32
- --background-color: #fff9ed;
33
- --border-color: #fff3e9;
34
- --text-color: var(--triones-antm-color-orange);
35
- }
36
- &.#{$class-prefix-notice-bar}-error {
37
- --background-color: #d9281e;
38
- --border-color: #d9281e;
39
- --text-color: #fff;
40
- }
41
- &.#{$class-prefix-notice-bar}-info {
42
- --background-color: #d0e4ff;
43
- --border-color: #bcd8ff;
44
- --text-color: var(--triones-antm-color-primary);
45
- }
46
- &.#{$class-prefix-notice-bar}-success {
47
- --background-color: #d1fff0;
48
- --border-color: #a8f0d8;
49
- --text-color: var(--triones-antm-color-success);
50
- }
51
-
52
- & .#{$class-prefix-notice-bar}-left {
53
- flex-shrink: 0;
54
- margin-right: 8PX;
55
- font-size: var(--icon-font-size);
56
- }
57
- & .#{$class-prefix-notice-bar}-content {
58
- flex: 1;
59
- overflow: hidden;
60
- position: relative;
61
- height: 100%;
62
- display: flex;
63
- align-items: center;
64
-
65
- & .#{$class-prefix-notice-bar}-content-inner {
66
- width: auto;
67
- transition-timing-function: linear;
68
- white-space: nowrap;
69
- }
70
- }
71
-
72
- & .#{$class-prefix-notice-bar}-right {
73
- display: flex;
74
- align-items: center;
75
- flex-shrink: 0;
76
- margin-left: 12PX;
77
- }
78
-
79
- &-close {
80
- width: 24PX;
81
- height: 24PX;
82
- margin-right: -3PX;
83
- display: flex;
84
- align-items: center;
85
- justify-content: center;
86
- font-size: var(--triones-antm-font-size-10);
87
- }
88
-
89
- &-wrap {
90
- height: auto;
91
- align-items: flex-start;
92
- padding-top: 8PX;
93
- padding-bottom: 8PX;
94
- line-height: 22PX;
95
- }
96
-
97
- &-neutral {
98
- border-radius: var(--triones-antm-notice-bar-border-radius);
99
- -webkit-border-radius: var(--triones-antm-notice-bar-border-radius);
100
- -moz-border-radius: var(--triones-antm-notice-bar-border-radius);
101
- -ms-border-radius: var(--triones-antm-notice-bar-border-radius);
102
- -o-border-radius: var(--triones-antm-notice-bar-border-radius);
103
- }
104
-
105
- &-rounded {
106
- border-radius: 1000PX;
107
- -webkit-border-radius: 1000PX;
108
- -moz-border-radius: 1000PX;
109
- -ms-border-radius: 1000PX;
110
- -o-border-radius: 1000PX;
111
- }
112
-
113
- &-bordered {
114
- border-left-width: var(--triones-antm-notice-bar-border-width);
115
- border-right-width: var(--triones-antm-notice-bar-border-width);
116
- }
117
-
118
- &-without-border {
119
- border-top-width: 0;
120
- border-bottom-width: 0;
121
- }
122
- }
123
-
124
- .#{$class-prefix-notice-bar}.#{$class-prefix-notice-bar}-wrap {
125
- .#{$class-prefix-notice-bar}-content {
126
- .#{$class-prefix-notice-bar}-content-inner {
127
- white-space: normal;
128
- }
129
- }
130
- }
1
+ $class-prefix-notice-bar: 'triones-antm-notice-bar';
2
+ /* prettier-ignore */
3
+ .#{$class-prefix-notice-bar} {
4
+ --background-color: var(--triones-antm-color-weak);
5
+ --border-color: var(--triones-antm-color-weak);
6
+ --text-color: var(--triones-antm-color-text-light-solid);
7
+ --font-size: var(--triones-antm-font-size-7);
8
+ --icon-font-size: var(--triones-antm-font-size-10);
9
+ --height: 40PX;
10
+ --triones-antm-notice-bar-border-radius: 4PX;
11
+ --triones-antm-notice-bar-border-width: 1PX;
12
+
13
+ flex: 1 auto;
14
+ height: var(--height);
15
+ box-sizing: border-box;
16
+ font-size: var(--font-size);
17
+ padding: 0 12PX;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: space-between;
21
+
22
+ border: solid var(--triones-antm-notice-bar-border-width) var(--border-color);
23
+ border-left-width: 0;
24
+ border-right-width: 0;
25
+ background-color: var(--background-color);
26
+ color: var(--text-color);
27
+ & > span[role='img'] {
28
+ color: var(--text-color);
29
+ }
30
+
31
+ &.#{$class-prefix-notice-bar}-alert {
32
+ --background-color: #fff9ed;
33
+ --border-color: #fff3e9;
34
+ --text-color: var(--triones-antm-color-orange);
35
+ }
36
+ &.#{$class-prefix-notice-bar}-error {
37
+ --background-color: #d9281e;
38
+ --border-color: #d9281e;
39
+ --text-color: #fff;
40
+ }
41
+ &.#{$class-prefix-notice-bar}-info {
42
+ --background-color: #d0e4ff;
43
+ --border-color: #bcd8ff;
44
+ --text-color: var(--triones-antm-color-primary);
45
+ }
46
+ &.#{$class-prefix-notice-bar}-success {
47
+ --background-color: #d1fff0;
48
+ --border-color: #a8f0d8;
49
+ --text-color: var(--triones-antm-color-success);
50
+ }
51
+
52
+ & .#{$class-prefix-notice-bar}-left {
53
+ flex-shrink: 0;
54
+ margin-right: 8PX;
55
+ font-size: var(--icon-font-size);
56
+ }
57
+ & .#{$class-prefix-notice-bar}-content {
58
+ flex: 1;
59
+ overflow: hidden;
60
+ position: relative;
61
+ height: 100%;
62
+ display: flex;
63
+ align-items: center;
64
+
65
+ & .#{$class-prefix-notice-bar}-content-inner {
66
+ width: auto;
67
+ transition-timing-function: linear;
68
+ white-space: nowrap;
69
+ }
70
+ }
71
+
72
+ & .#{$class-prefix-notice-bar}-right {
73
+ display: flex;
74
+ align-items: center;
75
+ flex-shrink: 0;
76
+ margin-left: 12PX;
77
+ }
78
+
79
+ &-close {
80
+ width: 24PX;
81
+ height: 24PX;
82
+ margin-right: -3PX;
83
+ display: flex;
84
+ align-items: center;
85
+ justify-content: center;
86
+ font-size: var(--triones-antm-font-size-10);
87
+ }
88
+
89
+ &-wrap {
90
+ height: auto;
91
+ align-items: flex-start;
92
+ padding-top: 8PX;
93
+ padding-bottom: 8PX;
94
+ line-height: 22PX;
95
+ }
96
+
97
+ &-neutral {
98
+ border-radius: var(--triones-antm-notice-bar-border-radius);
99
+ -webkit-border-radius: var(--triones-antm-notice-bar-border-radius);
100
+ -moz-border-radius: var(--triones-antm-notice-bar-border-radius);
101
+ -ms-border-radius: var(--triones-antm-notice-bar-border-radius);
102
+ -o-border-radius: var(--triones-antm-notice-bar-border-radius);
103
+ }
104
+
105
+ &-rounded {
106
+ border-radius: 1000PX;
107
+ -webkit-border-radius: 1000PX;
108
+ -moz-border-radius: 1000PX;
109
+ -ms-border-radius: 1000PX;
110
+ -o-border-radius: 1000PX;
111
+ }
112
+
113
+ &-bordered {
114
+ border-left-width: var(--triones-antm-notice-bar-border-width);
115
+ border-right-width: var(--triones-antm-notice-bar-border-width);
116
+ }
117
+
118
+ &-without-border {
119
+ border-top-width: 0;
120
+ border-bottom-width: 0;
121
+ }
122
+ }
123
+
124
+ .#{$class-prefix-notice-bar}.#{$class-prefix-notice-bar}-wrap {
125
+ .#{$class-prefix-notice-bar}-content {
126
+ .#{$class-prefix-notice-bar}-content-inner {
127
+ white-space: normal;
128
+ }
129
+ }
130
+ }