@nutui/nutui 3.1.12 → 3.1.13-beta.1

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 (97) hide show
  1. package/README.md +148 -37
  2. package/dist/nutui.d.ts +4 -1
  3. package/dist/nutui.es.js +1348 -560
  4. package/dist/nutui.umd.js +1356 -565
  5. package/dist/packages/_es/ActionSheet.js +1 -1
  6. package/dist/packages/_es/Address.js +3 -1
  7. package/dist/packages/_es/Avatar.js +1 -1
  8. package/dist/packages/_es/BackTop.js +1 -1
  9. package/dist/packages/_es/Badge.js +1 -1
  10. package/dist/packages/_es/Barrage.js +1 -1
  11. package/dist/packages/_es/Button.js +1 -1
  12. package/dist/packages/_es/Calendar.js +1 -1
  13. package/dist/packages/_es/Card.js +1 -1
  14. package/dist/packages/_es/Cascader.js +547 -0
  15. package/dist/packages/_es/Cell.js +1 -1
  16. package/dist/packages/_es/CellGroup.js +1 -1
  17. package/dist/packages/_es/Checkbox.js +1 -1
  18. package/dist/packages/_es/CheckboxGroup.js +1 -1
  19. package/dist/packages/_es/CircleProgress.js +1 -1
  20. package/dist/packages/_es/Col.js +1 -1
  21. package/dist/packages/_es/Collapse.js +1 -1
  22. package/dist/packages/_es/CollapseItem.js +1 -1
  23. package/dist/packages/_es/CountDown.js +2 -2
  24. package/dist/packages/_es/CountUp.js +3 -1
  25. package/dist/packages/_es/DatePicker.js +1 -1
  26. package/dist/packages/_es/Dialog.js +1 -1
  27. package/dist/packages/_es/Divider.js +1 -1
  28. package/dist/packages/_es/Drag.js +1 -1
  29. package/dist/packages/_es/Elevator.js +3 -2
  30. package/dist/packages/_es/FixedNav.js +1 -1
  31. package/dist/packages/_es/Form.js +1 -1
  32. package/dist/packages/_es/FormItem.js +1 -1
  33. package/dist/packages/_es/Grid.js +12 -0
  34. package/dist/packages/_es/GridItem.js +149 -0
  35. package/dist/packages/_es/Icon.js +1 -1
  36. package/dist/packages/_es/ImagePreview.js +1 -1
  37. package/dist/packages/_es/InfiniteLoading.js +1 -1
  38. package/dist/packages/_es/Input.js +1 -1
  39. package/dist/packages/_es/InputNumber.js +1 -1
  40. package/dist/packages/_es/Layout.js +1 -1
  41. package/dist/packages/_es/Menu.js +1 -1
  42. package/dist/packages/_es/MenuItem.js +1 -1
  43. package/dist/packages/_es/Navbar.js +1 -1
  44. package/dist/packages/_es/NoticeBar.js +6 -8
  45. package/dist/packages/_es/Notify.js +1 -1
  46. package/dist/packages/_es/NumberKeyboard.js +1 -1
  47. package/dist/packages/_es/OverLay.js +1 -1
  48. package/dist/packages/_es/Pagination.js +1 -1
  49. package/dist/packages/_es/Picker.js +1 -1
  50. package/dist/packages/_es/Popover.js +1 -1
  51. package/dist/packages/_es/Popup.js +1 -1
  52. package/dist/packages/_es/Price.js +1 -1
  53. package/dist/packages/_es/Progress.js +1 -1
  54. package/dist/packages/_es/Radio.js +1 -1
  55. package/dist/packages/_es/RadioGroup.js +1 -1
  56. package/dist/packages/_es/Range.js +1 -1
  57. package/dist/packages/_es/Rate.js +1 -1
  58. package/dist/packages/_es/Row.js +1 -1
  59. package/dist/packages/_es/SearchBar.js +1 -1
  60. package/dist/packages/_es/ShortPassword.js +1 -1
  61. package/dist/packages/_es/Signature.js +1 -1
  62. package/dist/packages/_es/Sku.js +1 -1
  63. package/dist/packages/_es/Step.js +1 -1
  64. package/dist/packages/_es/Steps.js +1 -1
  65. package/dist/packages/_es/Swipe.js +1 -1
  66. package/dist/packages/_es/Swiper.js +1 -1
  67. package/dist/packages/_es/SwiperItem.js +1 -1
  68. package/dist/packages/_es/Switch.js +1 -1
  69. package/dist/packages/_es/TabPane.js +1 -1
  70. package/dist/packages/_es/Tabbar.js +1 -1
  71. package/dist/packages/_es/TabbarItem.js +1 -1
  72. package/dist/packages/_es/Tabs.js +6 -2
  73. package/dist/packages/_es/Tag.js +1 -1
  74. package/dist/packages/_es/TextArea.js +1 -1
  75. package/dist/packages/_es/TimeDetail.js +1 -1
  76. package/dist/packages/_es/TimePannel.js +1 -1
  77. package/dist/packages/_es/TimeSelect.js +1 -1
  78. package/dist/packages/_es/Toast.js +1 -1
  79. package/dist/packages/_es/Uploader.js +1 -1
  80. package/dist/packages/_es/Video.js +1 -1
  81. package/dist/packages/_es/common.js +136 -0
  82. package/dist/packages/_es/component.js +1 -1
  83. package/dist/packages/_es/index.js +1 -1
  84. package/dist/packages/_es/index2.js +1 -1
  85. package/dist/packages/_es/index3.js +1 -1
  86. package/dist/packages/_es/plugin-vue_export-helper.js +1 -1
  87. package/dist/packages/_es/pxCheck.js +1 -1
  88. package/dist/packages/_es/raf.js +1 -1
  89. package/dist/packages/_es/util.js +1 -1
  90. package/dist/packages/cascader/index.scss +81 -0
  91. package/dist/packages/grid/index.scss +10 -0
  92. package/dist/packages/griditem/index.scss +92 -0
  93. package/dist/packages/tabs/index.scss +16 -0
  94. package/dist/style.css +1 -1
  95. package/dist/styles/themes/default.scss +41 -38
  96. package/dist/styles/variables.scss +26 -0
  97. package/package.json +2 -3
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
22
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
23
23
  * (c) 2021 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
@@ -50,6 +50,10 @@ const _sfc_main = create({
50
50
  type: String,
51
51
  default: "horizontal"
52
52
  },
53
+ size: {
54
+ type: String,
55
+ default: "normal"
56
+ },
53
57
  type: {
54
58
  type: String,
55
59
  default: "line"
@@ -168,7 +172,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
168
172
  class: normalizeClass(["nut-tabs", [_ctx.direction]])
169
173
  }, [
170
174
  createElementVNode("view", {
171
- class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll }]),
175
+ class: normalizeClass(["nut-tabs__titles", { [_ctx.type]: _ctx.type, scrollable: _ctx.titleScroll, [_ctx.size]: _ctx.size }]),
172
176
  style: normalizeStyle(_ctx.tabsNavStyle)
173
177
  }, [
174
178
  _ctx.$slots.titles ? renderSlot(_ctx.$slots, "titles", { key: 0 }) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(_ctx.titles, (item, index2) => {
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -19,7 +19,7 @@ var __publicField = (obj, key, value) => {
19
19
  return value;
20
20
  };
21
21
  /*!
22
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
22
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
23
23
  * (c) 2021 @jdf2e.
24
24
  * Released under the MIT License.
25
25
  */
@@ -18,7 +18,7 @@ var __spreadValues = (a, b) => {
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
20
  /*!
21
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
21
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
22
22
  * (c) 2021 @jdf2e.
23
23
  * Released under the MIT License.
24
24
  */
@@ -0,0 +1,136 @@
1
+ /*!
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
+ * (c) 2021 @jdf2e.
4
+ * Released under the MIT License.
5
+ */
6
+ import { provide, shallowReactive, getCurrentInstance, markRaw, isVNode, computed, h } from "vue";
7
+ import { c as createComponent } from "./component.js";
8
+ import { p as pxCheck } from "./pxCheck.js";
9
+ function flattenVNodes(children, childName) {
10
+ const result = [];
11
+ const traverse = (children2) => {
12
+ if (!Array.isArray(children2))
13
+ return;
14
+ children2.forEach((child) => {
15
+ var _a;
16
+ if (!isVNode(child))
17
+ return;
18
+ if (childName) {
19
+ if (child.type && child.type.name === childName) {
20
+ result.push(child);
21
+ return;
22
+ }
23
+ } else {
24
+ result.push(child);
25
+ }
26
+ if ((_a = child.component) == null ? void 0 : _a.subTree) {
27
+ traverse(child.component.subTree.children);
28
+ }
29
+ if (child.children) {
30
+ traverse(child.children);
31
+ }
32
+ });
33
+ };
34
+ traverse(children);
35
+ return result;
36
+ }
37
+ function sortChildren(parent, internalChildren, childName) {
38
+ const vnodes = flattenVNodes(parent.subTree.children, childName);
39
+ internalChildren.sort((a, b) => {
40
+ return vnodes.indexOf(a.vnode) - vnodes.indexOf(b.vnode);
41
+ });
42
+ }
43
+ function useProvide(key, childName) {
44
+ const internalChildren = shallowReactive([]);
45
+ const parent = getCurrentInstance();
46
+ const add = (child) => {
47
+ if (!child.proxy)
48
+ return;
49
+ internalChildren.push(markRaw(child));
50
+ sortChildren(parent, internalChildren, childName);
51
+ };
52
+ const remove = (child) => {
53
+ internalChildren.splice(internalChildren.indexOf(markRaw(child)), 1);
54
+ };
55
+ const extend = Object.assign;
56
+ return (value) => {
57
+ provide(key, extend({
58
+ add,
59
+ remove,
60
+ internalChildren
61
+ }, value));
62
+ return {
63
+ internalChildren
64
+ };
65
+ };
66
+ }
67
+ const { componentName } = createComponent("grid");
68
+ const GRID_KEY = Symbol("grid");
69
+ const gridProps = {
70
+ columnNum: {
71
+ type: [Number, String],
72
+ default: 4
73
+ },
74
+ iconSize: {
75
+ type: [Number, String],
76
+ default: 28
77
+ },
78
+ iconColor: {
79
+ type: String
80
+ },
81
+ border: {
82
+ type: Boolean,
83
+ default: true
84
+ },
85
+ gutter: {
86
+ type: [Number, String],
87
+ default: 0
88
+ },
89
+ center: {
90
+ type: Boolean,
91
+ default: true
92
+ },
93
+ square: {
94
+ type: Boolean,
95
+ default: false
96
+ },
97
+ reverse: {
98
+ type: Boolean,
99
+ default: false
100
+ },
101
+ direction: {
102
+ type: String
103
+ },
104
+ clickable: {
105
+ type: Boolean,
106
+ default: false
107
+ }
108
+ };
109
+ const component = {
110
+ props: gridProps,
111
+ setup(props, { slots }) {
112
+ useProvide(GRID_KEY, `${componentName}-item`)({ props });
113
+ const rootClass = computed(() => {
114
+ const prefixCls = componentName;
115
+ return {
116
+ [prefixCls]: true,
117
+ [`${prefixCls}--border`]: props.border && !props.gutter
118
+ };
119
+ });
120
+ const rootStyle = computed(() => {
121
+ const style = {};
122
+ if (props.gutter) {
123
+ style.paddingLeft = pxCheck(props.gutter);
124
+ }
125
+ return style;
126
+ });
127
+ return () => {
128
+ var _a;
129
+ return h("view", {
130
+ class: rootClass.value,
131
+ style: rootStyle.value
132
+ }, (_a = slots.default) == null ? void 0 : _a.call(slots));
133
+ };
134
+ }
135
+ };
136
+ export { GRID_KEY as G, component as c };
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * @nutui/nutui v3.1.12 Sat Nov 27 2021 11:30:43 GMT+0800 (中国标准时间)
2
+ * @nutui/nutui v3.1.13-beta.1 Mon Dec 13 2021 11:01:35 GMT+0800 (中国标准时间)
3
3
  * (c) 2021 @jdf2e.
4
4
  * Released under the MIT License.
5
5
  */
@@ -0,0 +1,81 @@
1
+ .nut-cascader {
2
+ width: 100%;
3
+ font-size: $nut-cascader-font-size;
4
+ line-height: $nut-cascader-line-height;
5
+
6
+ .nut-tabpane {
7
+ padding: 0;
8
+ }
9
+
10
+ .nut-tabs__titles-item {
11
+ flex: initial;
12
+ min-width: auto;
13
+ padding: $nut-cascader-tabs-item-padding;
14
+ white-space: nowrap;
15
+ }
16
+
17
+ .nut-tabs__titles {
18
+ padding: $nut-cascader-tabs-item-padding;
19
+ background: #fff;
20
+ }
21
+
22
+ &__bar {
23
+ display: flex;
24
+ justify-content: center;
25
+ align-items: center;
26
+ padding: $nut-cascader-bar-padding;
27
+ text-align: center;
28
+ font-weight: bold;
29
+ line-height: $nut-cascader-bar-line-height;
30
+ color: $nut-cascader-bar-color;
31
+ font-size: $nut-cascader-bar-font-size;
32
+ }
33
+
34
+ &-pane {
35
+ display: block;
36
+ padding: 0;
37
+ margin: 0;
38
+ width: 100%;
39
+ padding-top: 10px;
40
+ height: 342px;
41
+ overflow-y: auto;
42
+ -webkit-overflow-scrolling: touch;
43
+ }
44
+
45
+ &-item {
46
+ display: flex;
47
+ align-items: center;
48
+ padding: $nut-cascader-item-padding;
49
+ margin: 0;
50
+ cursor: pointer;
51
+ font-size: $nut-cascader-item-font-size;
52
+ color: $nut-cascader-item-color;
53
+
54
+ &__title {
55
+ flex: 1;
56
+ }
57
+
58
+ &__icon-check {
59
+ margin-left: 10px;
60
+ visibility: hidden;
61
+ }
62
+
63
+ &__icon-loading {
64
+ margin-left: 10px;
65
+ }
66
+
67
+ &.active:not(.disabled) {
68
+ color: $nut-cascader-item-active-color;
69
+ }
70
+
71
+ &.active &__icon-check {
72
+ visibility: visible;
73
+ color: $nut-cascader-item-active-color;
74
+ }
75
+
76
+ &.disabled {
77
+ opacity: 0.6;
78
+ cursor: not-allowed;
79
+ }
80
+ }
81
+ }
@@ -0,0 +1,10 @@
1
+ .nut-grid {
2
+ display: flex;
3
+ flex-wrap: wrap;
4
+ border: 0 solid $grid-border-color;
5
+
6
+ &--border {
7
+ border-top-width: 1px;
8
+ border-left-width: 1px;
9
+ }
10
+ }
@@ -0,0 +1,92 @@
1
+ .nut-grid-item {
2
+ position: relative;
3
+ box-sizing: border-box;
4
+
5
+ $block: &;
6
+
7
+ &__text {
8
+ color: $grid-item-text-color;
9
+ font-size: $grid-item-text-font-size;
10
+ line-height: 1.5;
11
+ word-break: break-all;
12
+ margin: $grid-item-text-margin 0 0 0;
13
+ }
14
+
15
+ &__content {
16
+ display: flex;
17
+ flex-direction: column;
18
+ box-sizing: border-box;
19
+ height: 100%;
20
+ padding: $grid-item-content-padding;
21
+ background: $grid-item-content-bg-color;
22
+ border: 0 solid $grid-border-color;
23
+
24
+ &--border {
25
+ border-right-width: 1px;
26
+ border-bottom-width: 1px;
27
+ }
28
+
29
+ &--surround {
30
+ border-top-width: 1px;
31
+ border-left-width: 1px;
32
+ }
33
+
34
+ &--center {
35
+ align-items: center;
36
+ justify-content: center;
37
+ }
38
+
39
+ &--square {
40
+ position: absolute;
41
+ top: 0;
42
+ right: 0;
43
+ left: 0;
44
+ }
45
+
46
+ &--reverse {
47
+ flex-direction: column-reverse;
48
+
49
+ #{$block}__text {
50
+ margin: 0 0 $grid-item-text-margin;
51
+ }
52
+ }
53
+
54
+ &--horizontal {
55
+ flex-direction: row;
56
+
57
+ #{$block}__text {
58
+ margin: 0 0 0 $grid-item-text-margin;
59
+ }
60
+ }
61
+
62
+ &--horizontal#{&}--reverse {
63
+ flex-direction: row-reverse;
64
+ #{$block}__text {
65
+ margin: 0 $grid-item-text-margin 0 0;
66
+ }
67
+ }
68
+
69
+ &--clickable {
70
+ cursor: pointer;
71
+
72
+ &::before {
73
+ position: absolute;
74
+ top: 50%;
75
+ left: 50%;
76
+ width: 100%;
77
+ height: 100%;
78
+ background-color: $black;
79
+ border: inherit;
80
+ border-color: $black;
81
+ border-radius: inherit;
82
+ transform: translate(-50%, -50%);
83
+ opacity: 0;
84
+ content: ' ';
85
+ }
86
+
87
+ &:active::before {
88
+ opacity: 0.1;
89
+ }
90
+ }
91
+ }
92
+ }
@@ -66,6 +66,22 @@
66
66
  user-select: none;
67
67
  background: $tabs-titles-background-color;
68
68
  border-radius: $tabs-titles-border-radius;
69
+ flex-shrink: 0;
70
+ &.large {
71
+ .nut-tabs__titles-item {
72
+ font-size: $tabs-titles-item-large-font-size;
73
+ }
74
+ }
75
+ &.normal {
76
+ .nut-tabs__titles-item {
77
+ font-size: $tabs-titles-item-font-size;
78
+ }
79
+ }
80
+ &.small {
81
+ .nut-tabs__titles-item {
82
+ font-size: $tabs-titles-item-small-font-size;
83
+ }
84
+ }
69
85
  &::-webkit-scrollbar {
70
86
  display: none;
71
87
  width: 0;