@lobehub/ui 5.32.2 → 5.32.4

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.
@@ -23,8 +23,8 @@ declare const styles: {
23
23
  };
24
24
  declare const rootVariants: (props?: ({
25
25
  shadow?: boolean | null | undefined;
26
- size?: "large" | "middle" | "small" | null | undefined;
27
- variant?: "filled" | "borderless" | "outlined" | null | undefined;
26
+ size?: "small" | "middle" | "large" | null | undefined;
27
+ variant?: "filled" | "outlined" | "borderless" | null | undefined;
28
28
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
29
29
  //#endregion
30
30
  export { rootVariants, styles };
@@ -25,23 +25,31 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
25
25
  }
26
26
  `,
27
27
  thumb: css`
28
- width: 14px;
29
- height: 14px;
30
- border-radius: 50%;
28
+ flex-shrink: 0;
31
29
 
32
- background: ${cssVar.colorBgContainer};
33
- box-shadow:
34
- 0 0 0 1px ${cssVar.colorBorder},
35
- 0 1px 2px rgb(0 0 0 / 12%),
36
- 0 2px 6px rgb(0 30 80 / 12%);
30
+ width: 8px;
31
+ height: 16px;
32
+ border-radius: 100px;
33
+
34
+ background: ${cssVar.colorPrimary};
35
+ box-shadow: 0 0 0 1px ${cssVar.colorBgContainer};
37
36
 
38
37
  transition: box-shadow 150ms ${cssVar.motionEaseOut};
39
38
 
39
+ &::before {
40
+ content: '';
41
+
42
+ position: absolute;
43
+ inset-block-start: 50%;
44
+ inset-inline-start: 50%;
45
+ translate: -50% -50%;
46
+
47
+ width: 24px;
48
+ height: 40px;
49
+ }
50
+
40
51
  &:hover:not([data-disabled] *) {
41
- box-shadow:
42
- 0 0 0 1px ${cssVar.colorPrimary},
43
- 0 1px 2px rgb(0 0 0 / 12%),
44
- 0 3px 8px rgb(0 30 80 / 18%);
52
+ box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBorder};
45
53
  }
46
54
 
47
55
  &:focus-visible {
@@ -50,10 +58,16 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
50
58
  }
51
59
 
52
60
  [data-dragging] & {
53
- box-shadow:
54
- 0 0 0 1px ${cssVar.colorPrimary},
55
- 0 1px 2px rgb(0 0 0 / 12%),
56
- 0 3px 8px rgb(0 30 80 / 18%);
61
+ box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBorder};
62
+ }
63
+
64
+ [data-disabled] & {
65
+ background: ${cssVar.colorTextQuaternary};
66
+ box-shadow: 0 0 0 1px ${cssVar.colorBgContainer};
67
+ }
68
+
69
+ @media (prefers-reduced-motion: reduce) {
70
+ transition-duration: 0s;
57
71
  }
58
72
  `,
59
73
  track: css`
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Slider/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n control: css`\n display: flex;\n align-items: center;\n width: 100%;\n height: 20px;\n `,\n indicator: css`\n border-radius: inherit;\n background: ${cssVar.colorPrimary};\n\n [data-disabled] & {\n background: ${cssVar.colorTextQuaternary};\n }\n `,\n root: css`\n display: flex;\n align-items: center;\n width: 100%;\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n `,\n thumb: css`\n width: 14px;\n height: 14px;\n border-radius: 50%;\n\n background: ${cssVar.colorBgContainer};\n box-shadow:\n 0 0 0 1px ${cssVar.colorBorder},\n 0 1px 2px rgb(0 0 0 / 12%),\n 0 2px 6px rgb(0 30 80 / 12%);\n\n transition: box-shadow 150ms ${cssVar.motionEaseOut};\n\n &:hover:not([data-disabled] *) {\n box-shadow:\n 0 0 0 1px ${cssVar.colorPrimary},\n 0 1px 2px rgb(0 0 0 / 12%),\n 0 3px 8px rgb(0 30 80 / 18%);\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: 1px;\n }\n\n [data-dragging] & {\n box-shadow:\n 0 0 0 1px ${cssVar.colorPrimary},\n 0 1px 2px rgb(0 0 0 / 12%),\n 0 3px 8px rgb(0 30 80 / 18%);\n }\n `,\n track: css`\n width: 100%;\n height: 4px;\n border-radius: 100px;\n background: ${cssVar.colorFillSecondary};\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,SAAS,GAAG;;;;;;CAMZ,WAAW,GAAG;;kBAEE,OAAO,aAAa;;;oBAGlB,OAAO,oBAAoB;;;CAG7C,MAAM,GAAG;;;;;;;;;CAST,OAAO,GAAG;;;;;kBAKM,OAAO,iBAAiB;;kBAExB,OAAO,YAAY;;;;mCAIF,OAAO,cAAc;;;;oBAIpC,OAAO,aAAa;;;;;;2BAMb,OAAO,mBAAmB;;;;;;oBAMjC,OAAO,aAAa;;;;;CAKtC,OAAO,GAAG;;;;kBAIM,OAAO,mBAAmB;;AAE5C,EAAE"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Slider/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n control: css`\n display: flex;\n align-items: center;\n width: 100%;\n height: 20px;\n `,\n indicator: css`\n border-radius: inherit;\n background: ${cssVar.colorPrimary};\n\n [data-disabled] & {\n background: ${cssVar.colorTextQuaternary};\n }\n `,\n root: css`\n display: flex;\n align-items: center;\n width: 100%;\n\n &[data-disabled] {\n cursor: not-allowed;\n }\n `,\n thumb: css`\n flex-shrink: 0;\n\n width: 8px;\n height: 16px;\n border-radius: 100px;\n\n background: ${cssVar.colorPrimary};\n box-shadow: 0 0 0 1px ${cssVar.colorBgContainer};\n\n transition: box-shadow 150ms ${cssVar.motionEaseOut};\n\n &::before {\n content: '';\n\n position: absolute;\n inset-block-start: 50%;\n inset-inline-start: 50%;\n translate: -50% -50%;\n\n width: 24px;\n height: 40px;\n }\n\n &:hover:not([data-disabled] *) {\n box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBorder};\n }\n\n &:focus-visible {\n outline: 2px solid ${cssVar.colorPrimaryBorder};\n outline-offset: 1px;\n }\n\n [data-dragging] & {\n box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBorder};\n }\n\n [data-disabled] & {\n background: ${cssVar.colorTextQuaternary};\n box-shadow: 0 0 0 1px ${cssVar.colorBgContainer};\n }\n\n @media (prefers-reduced-motion: reduce) {\n transition-duration: 0s;\n }\n `,\n track: css`\n width: 100%;\n height: 4px;\n border-radius: 100px;\n background: ${cssVar.colorFillSecondary};\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,SAAS,GAAG;;;;;;CAMZ,WAAW,GAAG;;kBAEE,OAAO,aAAa;;;oBAGlB,OAAO,oBAAoB;;;CAG7C,MAAM,GAAG;;;;;;;;;CAST,OAAO,GAAG;;;;;;;kBAOM,OAAO,aAAa;4BACV,OAAO,iBAAiB;;mCAEjB,OAAO,cAAc;;;;;;;;;;;;;;;8BAe1B,OAAO,mBAAmB;;;;2BAI7B,OAAO,mBAAmB;;;;;8BAKvB,OAAO,mBAAmB;;;;oBAIpC,OAAO,oBAAoB;8BACjB,OAAO,iBAAiB;;;;;;;CAOpD,OAAO,GAAG;;;;kBAIM,OAAO,mBAAmB;;AAE5C,EAAE"}
@@ -1,5 +1,6 @@
1
1
  //#region src/eslint/index.ts
2
2
  const DEPRECATED_UI_COMPONENTS = [
3
+ "Alert",
3
4
  "AutoComplete",
4
5
  "Button",
5
6
  "Checkbox",
@@ -34,6 +35,8 @@ const restrictedImports = { rules: { "no-restricted-imports": ["error", {
34
35
  ],
35
36
  patterns: [{
36
37
  group: [
38
+ "antd/es/alert",
39
+ "antd/es/alert/*",
37
40
  "antd/es/auto-complete",
38
41
  "antd/es/auto-complete/*",
39
42
  "antd/es/checkbox",
@@ -42,6 +45,8 @@ const restrictedImports = { rules: { "no-restricted-imports": ["error", {
42
45
  "antd/es/radio/*",
43
46
  "antd/es/slider",
44
47
  "antd/es/slider/*",
48
+ "antd/lib/alert",
49
+ "antd/lib/alert/*",
45
50
  "antd/lib/auto-complete",
46
51
  "antd/lib/auto-complete/*",
47
52
  "antd/lib/checkbox",
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'AutoComplete',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Drawer',\n 'Modal',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Slider',\n 'SliderWithInput',\n 'Tabs',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAqBA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa;GACb,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;GA5CjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EA6BiB;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}
1
+ {"version":3,"file":"index.mjs","names":[],"sources":["../../src/eslint/index.ts"],"sourcesContent":["const DEPRECATED_UI_COMPONENTS = [\n 'Alert',\n 'AutoComplete',\n 'Button',\n 'Checkbox',\n 'CheckboxGroup',\n 'Drawer',\n 'Modal',\n 'Radio',\n 'RadioGroup',\n 'Segmented',\n 'Select',\n 'Slider',\n 'SliderWithInput',\n 'Tabs',\n];\n\nconst DEPRECATED_ANTD_COMPONENT_PATHS = [\n 'antd/es/alert',\n 'antd/es/alert/*',\n 'antd/es/auto-complete',\n 'antd/es/auto-complete/*',\n 'antd/es/checkbox',\n 'antd/es/checkbox/*',\n 'antd/es/radio',\n 'antd/es/radio/*',\n 'antd/es/slider',\n 'antd/es/slider/*',\n 'antd/lib/alert',\n 'antd/lib/alert/*',\n 'antd/lib/auto-complete',\n 'antd/lib/auto-complete/*',\n 'antd/lib/checkbox',\n 'antd/lib/checkbox/*',\n 'antd/lib/radio',\n 'antd/lib/radio/*',\n 'antd/lib/slider',\n 'antd/lib/slider/*',\n];\n\nexport const restrictedImports = {\n rules: {\n 'no-restricted-imports': [\n 'error',\n {\n paths: [\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message:\n 'The antd-based wrapper is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: '@lobehub/ui',\n },\n {\n importNames: ['createStyles'],\n message:\n '`createStyles` is banned in this project. Use `createStaticStyles` from \"antd-style\" instead.',\n name: 'antd-style',\n },\n {\n importNames: DEPRECATED_UI_COMPONENTS,\n message: 'Direct antd import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n name: 'antd',\n },\n ],\n patterns: [\n {\n group: DEPRECATED_ANTD_COMPONENT_PATHS,\n message:\n 'Direct antd component import is deprecated. Import from \"@lobehub/ui/base-ui\" instead.',\n },\n ],\n },\n ],\n },\n};\n\nexport default [restrictedImports];\n"],"mappings":";AAAA,MAAM,2BAA2B;CAC/B;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAyBA,MAAa,oBAAoB,EAC/B,OAAO,EACL,yBAAyB,CACvB,SACA;CACE,OAAO;EACL;GACE,aAAa;GACb,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa,CAAC,cAAc;GAC5B,SACE;GACF,MAAM;EACR;EACA;GACE,aAAa;GACb,SAAS;GACT,MAAM;EACR;CACF;CACA,UAAU,CACR;EACE,OAAO;GAhDjB;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;EA6BiB;EACP,SACE;CACJ,CACF;AACF,CACF,EACF,EACF;AAEA,IAAA,iBAAe,CAAC,iBAAiB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lobehub/ui",
3
- "version": "5.32.2",
3
+ "version": "5.32.4",
4
4
  "description": "Lobe UI is an open-source UI component library for building AIGC web apps",
5
5
  "keywords": [
6
6
  "lobehub",