plain-design 1.0.0-beta.100 → 1.0.0-beta.101

Sign up to get free protection for your applications and to get access to all the features.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "plain-design",
3
- "version": "1.0.0-beta.100",
3
+ "version": "1.0.0-beta.101",
4
4
  "description": "",
5
5
  "main": "dist/plain-design.min.js",
6
6
  "module": "dist/plain-design.commonjs.min.js",
@@ -21,7 +21,7 @@
21
21
  "peerDependencies": {
22
22
  "exceljs": "^4.2.1",
23
23
  "file-saver": "^2.0.5",
24
- "plain-design-composition": "^0.0.190",
24
+ "plain-design-composition": "^0.0.194",
25
25
  "react": "^18.0.1",
26
26
  "react-dom": "^18.0.1"
27
27
  },
@@ -70,7 +70,7 @@
70
70
  "fork-ts-checker-webpack-plugin": "6.5.3",
71
71
  "mini-css-extract-plugin": "1.6.2",
72
72
  "mockjs": "^1.1.0",
73
- "plain-design-composition": "^0.0.190",
73
+ "plain-design-composition": "^0.0.194",
74
74
  "postcss": "8.4.32",
75
75
  "postcss-loader": "4.3.0",
76
76
  "qs": "6.11.2",
@@ -1,6 +1,5 @@
1
- import {getComponentCls, mergeAttrs, RenderNode} from "plain-design-composition";
1
+ import {createProvider, getComponentCls, mergeAttrs, RenderNode} from "plain-design-composition";
2
2
  import {createEnum} from "plain-utils/utils/createEnum";
3
- import {createProvider} from "../../utils/createProvider";
4
3
  import {Icon} from "../Icon";
5
4
  import './dropdown.public.scss';
6
5
  import {ePopupTrigger} from "../usePopup/utils/popup.utils";
@@ -351,6 +351,16 @@
351
351
  align-items: center;
352
352
  justify-content: center;
353
353
  }
354
+
355
+ &.input-tag-container-wrap {
356
+ .input-tag {
357
+ height: auto;
358
+ min-height: calc(#{$height} - 8px);
359
+ white-space: nowrap;
360
+ word-break: break-all;
361
+ max-width: 100%;
362
+ }
363
+ }
354
364
  }
355
365
  }
356
366
 
@@ -1,5 +1,4 @@
1
- import {createProvider} from "../../utils/createProvider";
2
- import {getComponentCls} from "plain-design-composition";
1
+ import {createProvider, getComponentCls} from "plain-design-composition";
3
2
  import {iPopupAnimation, iPopupTrigger, iPopupUseOption} from "../usePopup/utils/popup.utils";
4
3
 
5
4
  /**
@@ -3,7 +3,6 @@ import i18n from "../i18n";
3
3
  import Tooltip from "../Tooltip";
4
4
  import PageThemeUtils from "../PageThemeUtils";
5
5
  import Icon from "../Icon";
6
- import './theme-dark-selector.scss';
7
6
 
8
7
  export const ThemeDarkSelector = designComponent({
9
8
  name: 'theme-dark-selector',
@@ -3,7 +3,6 @@ import Dropdown from "../Dropdown";
3
3
  import DropdownOption from "../DropdownOption";
4
4
  import Icon from "../Icon";
5
5
  import i18n from "../i18n";
6
- import './theme-locale-selector.scss';
7
6
 
8
7
  export const ThemeLocaleSelector = designComponent({
9
8
  name: 'theme-locale-selector',
@@ -5,7 +5,6 @@ import i18n from "../i18n";
5
5
  import Icon from "../Icon";
6
6
  import {ThemeShape} from "../../uses/useStyle";
7
7
  import PageThemeUtils from "../PageThemeUtils";
8
- import './theme-shape-selector.scss';
9
8
 
10
9
  export const ThemeShapeSelector = designComponent({
11
10
  name: 'theme-shape-selector',
@@ -4,7 +4,6 @@ import DropdownOption from "../DropdownOption";
4
4
  import i18n from "../i18n";
5
5
  import Icon from "../Icon";
6
6
  import PageThemeUtils from "../PageThemeUtils";
7
- import './theme-size-selector.scss';
8
7
  import {ThemeSize} from "../../uses/useStyle";
9
8
 
10
9
  export const ThemeSizeSelector = designComponent({
@@ -1,10 +1,9 @@
1
1
  import {createEnum} from "plain-utils/utils/createEnum";
2
2
  import {createCounter} from "plain-utils/utils/createCounter";
3
- import {getComponentCls, RenderNode, SimpleFunction} from "plain-design-composition";
3
+ import {createProvider, getComponentCls, RenderNode, SimpleFunction} from "plain-design-composition";
4
4
  import {iPopupManagerHooks} from "./createPopupManagerHooks";
5
5
  import {iElementRect} from "../../../utils/getRowEl";
6
6
  import {ThemeSize, ThemeStatus} from "../../../uses/useStyle";
7
- import {createProvider} from "../../../utils/createProvider";
8
7
 
9
8
  /**
10
9
  * direction
@@ -266,7 +266,6 @@ export {useReferenceTrigger} from './components/useReferenceTrigger';
266
266
  export {usePopupTrigger} from './components/usePopupTrigger';
267
267
  export {useWatchAutoClear} from './components/useWatchAutoClear';
268
268
  export {nextPopupId} from './components/nextPopupId';
269
- export {createProvider} from './components/createProvider';
270
269
  export {usePopupManager} from './components/usePopupManager';
271
270
  export {useEdit, EditProps, EDIT_PROVIDER} from './uses/useEdit';
272
271
  export type {tEditComputed, tEditControl, EditProvideData} from './uses/useEdit';
@@ -6,3 +6,10 @@
6
6
  transition: none !important;
7
7
  }
8
8
  }
9
+
10
+ @include comp(theme-selector) {
11
+ display: inline-flex;
12
+ align-items: center;
13
+ justify-content: center;
14
+ color: plv(text-1);
15
+ }
@@ -1,5 +0,0 @@
1
- @include comp(theme-dark-selector) {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- }
@@ -1,5 +0,0 @@
1
- @include comp(theme-locale-selector) {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- }
@@ -1,5 +0,0 @@
1
- @include comp(theme-shape-selector) {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- }
@@ -1,5 +0,0 @@
1
- @include comp(theme-size-selector) {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- }
@@ -1,5 +0,0 @@
1
- import {createProvider} from "../../utils/createProvider";
2
-
3
- export {createProvider};
4
-
5
- export default createProvider;
@@ -1,35 +0,0 @@
1
- import {designComponent, inject, PropType, provide} from "plain-design-composition";
2
-
3
- interface iInjection<T> {
4
- (): T,
5
-
6
- <D>(data: D): T | D,
7
- }
8
-
9
- export function createProvider<T>(provideKey: string) {
10
-
11
- const Provider = designComponent({
12
- props: {
13
- value: { type: Object as PropType<T>, required: true }
14
- },
15
- slots: ['default'],
16
- setup({ props, slots }) {
17
- // @ts-ignore
18
- !!props.value && provide(provideKey, props.value);
19
- return () => slots.default();
20
- },
21
- });
22
-
23
- return {
24
- provideKey,
25
- Provider,
26
- provide: (context: T) => {
27
- provide(provideKey, context);
28
- },
29
- inject: ((defaultData?: any) => inject(provideKey, defaultData)) as iInjection<T>,
30
- };
31
- }
32
-
33
- // const AppProvider = createProvider<HTMLDivElement>('@@APP_PROVIDER');
34
- // const a = AppProvider.inject(); // HTMLDivElement,注入不到东西会报错
35
- // const b = AppProvider.inject(null); // HTMLDivElement|null,注入不到东西会返回默认值