@gravity-ui/aikit 2.20.1 → 2.20.2-beta.06dfacf7b7ce91d63acd456737fe4ebc6e0ca2ea.0

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.
@@ -12,4 +12,5 @@
12
12
  }
13
13
  .g-aikit-submit-button__spinner {
14
14
  --g-color-line-brand: var(--g-color-text-brand-contrast);
15
+ --g-spin-color: var(--g-color-text-brand-contrast);
15
16
  }
@@ -14,11 +14,13 @@
14
14
  min-width: 0;
15
15
  max-width: 100%;
16
16
  }
17
- .g-aikit-base-message_btn-hover .g-aikit-base-message__actions {
18
- visibility: hidden;
19
- }
20
- .g-aikit-base-message_btn-hover:hover .g-aikit-base-message__actions {
21
- visibility: visible;
17
+ @media (hover: hover) {
18
+ .g-aikit-base-message_btn-hover .g-aikit-base-message__actions {
19
+ visibility: hidden;
20
+ }
21
+ .g-aikit-base-message_btn-hover:hover .g-aikit-base-message__actions {
22
+ visibility: visible;
23
+ }
22
24
  }
23
25
  .g-aikit-base-message__actions {
24
26
  display: flex;
@@ -1,4 +1,4 @@
1
- export type ControlSize = 'xs' | 's' | 'm' | 'l' | 'xl';
1
+ export type ControlSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
2
2
  /**
3
3
  * Resolves a control size: an explicit size always wins, otherwise the mobile
4
4
  * default is used in mobile mode and the desktop default elsewhere.
@@ -1 +1 @@
1
- {"version":3,"file":"useMobileControlSize.js","sourceRoot":"../../../src","sources":["hooks/useMobileControlSize.ts"],"names":[],"mappings":";;AAQA,4DASC;AAKD,oDAQC;AAKD,gDAEC;AArCD,6CAA4C;AAI5C;;;GAGG;AACH,SAAgB,wBAAwB,CAAwB,MAK/D;IACG,MAAM,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,GAAG,MAAM,CAAC;IAE/D,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAChC,IAAmB,EACnB,cAAiB,EACjB,aAAgB;IAEhB,MAAM,QAAQ,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE7B,OAAO,wBAAwB,CAAC,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,CAAC,CAAC;AACrF,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,IAA6B;IAC5D,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import {useMobile} from '@gravity-ui/uikit';\n\nexport type ControlSize = 'xs' | 's' | 'm' | 'l' | 'xl';\n\n/**\n * Resolves a control size: an explicit size always wins, otherwise the mobile\n * default is used in mobile mode and the desktop default elsewhere.\n */\nexport function resolveMobileControlSize<T extends ControlSize>(params: {\n size: T | undefined;\n desktopDefault: T;\n mobileDefault: T;\n isMobile: boolean;\n}): T {\n const {size, desktopDefault, mobileDefault, isMobile} = params;\n\n return size ?? (isMobile ? mobileDefault : desktopDefault);\n}\n\n/**\n * Mobile-aware control size, driven by the uikit `MobileProvider` context.\n */\nexport function useMobileControlSize<T extends ControlSize>(\n size: T | undefined,\n desktopDefault: T,\n mobileDefault: T,\n): T {\n const isMobile = useMobile();\n\n return resolveMobileControlSize({size, desktopDefault, mobileDefault, isMobile});\n}\n\n/**\n * Icon size matching the resolved control size.\n */\nexport function getControlIconSize(size: ControlSize | undefined): number {\n return size === 'xl' ? 20 : 16;\n}\n"]}
1
+ {"version":3,"file":"useMobileControlSize.js","sourceRoot":"../../../src","sources":["hooks/useMobileControlSize.ts"],"names":[],"mappings":";;AAUA,4DASC;AAKD,oDAQC;AAKD,gDAEC;AAvCD,6CAA4C;AAM5C;;;GAGG;AACH,SAAgB,wBAAwB,CAAwB,MAK/D;IACG,MAAM,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,GAAG,MAAM,CAAC;IAE/D,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,SAAgB,oBAAoB,CAChC,IAAmB,EACnB,cAAiB,EACjB,aAAgB;IAEhB,MAAM,QAAQ,GAAG,IAAA,iBAAS,GAAE,CAAC;IAE7B,OAAO,wBAAwB,CAAC,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,CAAC,CAAC;AACrF,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,IAA6B;IAC5D,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import {useMobile} from '@gravity-ui/uikit';\n\n// `xxs` only exists on `Label`, which uikit 7.48 gained. It is listed here so that the helpers\n// stay usable with the whole `LabelProps['size']` union across the supported uikit range.\nexport type ControlSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';\n\n/**\n * Resolves a control size: an explicit size always wins, otherwise the mobile\n * default is used in mobile mode and the desktop default elsewhere.\n */\nexport function resolveMobileControlSize<T extends ControlSize>(params: {\n size: T | undefined;\n desktopDefault: T;\n mobileDefault: T;\n isMobile: boolean;\n}): T {\n const {size, desktopDefault, mobileDefault, isMobile} = params;\n\n return size ?? (isMobile ? mobileDefault : desktopDefault);\n}\n\n/**\n * Mobile-aware control size, driven by the uikit `MobileProvider` context.\n */\nexport function useMobileControlSize<T extends ControlSize>(\n size: T | undefined,\n desktopDefault: T,\n mobileDefault: T,\n): T {\n const isMobile = useMobile();\n\n return resolveMobileControlSize({size, desktopDefault, mobileDefault, isMobile});\n}\n\n/**\n * Icon size matching the resolved control size.\n */\nexport function getControlIconSize(size: ControlSize | undefined): number {\n return size === 'xl' ? 20 : 16;\n}\n"]}
@@ -1 +1 @@
1
- {"version":"2.20.1","type":"commonjs","sideEffects":["*.css","*.scss"]}
1
+ {"version":"2.20.2-beta.06dfacf7b7ce91d63acd456737fe4ebc6e0ca2ea.0","type":"commonjs","sideEffects":["*.css","*.scss"]}
@@ -12,4 +12,5 @@
12
12
  }
13
13
  .g-aikit-submit-button__spinner {
14
14
  --g-color-line-brand: var(--g-color-text-brand-contrast);
15
+ --g-spin-color: var(--g-color-text-brand-contrast);
15
16
  }
@@ -14,11 +14,13 @@
14
14
  min-width: 0;
15
15
  max-width: 100%;
16
16
  }
17
- .g-aikit-base-message_btn-hover .g-aikit-base-message__actions {
18
- visibility: hidden;
19
- }
20
- .g-aikit-base-message_btn-hover:hover .g-aikit-base-message__actions {
21
- visibility: visible;
17
+ @media (hover: hover) {
18
+ .g-aikit-base-message_btn-hover .g-aikit-base-message__actions {
19
+ visibility: hidden;
20
+ }
21
+ .g-aikit-base-message_btn-hover:hover .g-aikit-base-message__actions {
22
+ visibility: visible;
23
+ }
22
24
  }
23
25
  .g-aikit-base-message__actions {
24
26
  display: flex;
@@ -1,4 +1,4 @@
1
- export type ControlSize = 'xs' | 's' | 'm' | 'l' | 'xl';
1
+ export type ControlSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';
2
2
  /**
3
3
  * Resolves a control size: an explicit size always wins, otherwise the mobile
4
4
  * default is used in mobile mode and the desktop default elsewhere.
@@ -1 +1 @@
1
- {"version":3,"file":"useMobileControlSize.js","sourceRoot":"../../../src","sources":["hooks/useMobileControlSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAI5C;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAwB,MAK/D;IACG,MAAM,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,GAAG,MAAM,CAAC;IAE/D,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAChC,IAAmB,EACnB,cAAiB,EACjB,aAAgB;IAEhB,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAE7B,OAAO,wBAAwB,CAAC,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,CAAC,CAAC;AACrF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAA6B;IAC5D,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import {useMobile} from '@gravity-ui/uikit';\n\nexport type ControlSize = 'xs' | 's' | 'm' | 'l' | 'xl';\n\n/**\n * Resolves a control size: an explicit size always wins, otherwise the mobile\n * default is used in mobile mode and the desktop default elsewhere.\n */\nexport function resolveMobileControlSize<T extends ControlSize>(params: {\n size: T | undefined;\n desktopDefault: T;\n mobileDefault: T;\n isMobile: boolean;\n}): T {\n const {size, desktopDefault, mobileDefault, isMobile} = params;\n\n return size ?? (isMobile ? mobileDefault : desktopDefault);\n}\n\n/**\n * Mobile-aware control size, driven by the uikit `MobileProvider` context.\n */\nexport function useMobileControlSize<T extends ControlSize>(\n size: T | undefined,\n desktopDefault: T,\n mobileDefault: T,\n): T {\n const isMobile = useMobile();\n\n return resolveMobileControlSize({size, desktopDefault, mobileDefault, isMobile});\n}\n\n/**\n * Icon size matching the resolved control size.\n */\nexport function getControlIconSize(size: ControlSize | undefined): number {\n return size === 'xl' ? 20 : 16;\n}\n"]}
1
+ {"version":3,"file":"useMobileControlSize.js","sourceRoot":"../../../src","sources":["hooks/useMobileControlSize.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,mBAAmB,CAAC;AAM5C;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAwB,MAK/D;IACG,MAAM,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,GAAG,MAAM,CAAC;IAE/D,OAAO,IAAI,aAAJ,IAAI,cAAJ,IAAI,GAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC;AAC/D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAChC,IAAmB,EACnB,cAAiB,EACjB,aAAgB;IAEhB,MAAM,QAAQ,GAAG,SAAS,EAAE,CAAC;IAE7B,OAAO,wBAAwB,CAAC,EAAC,IAAI,EAAE,cAAc,EAAE,aAAa,EAAE,QAAQ,EAAC,CAAC,CAAC;AACrF,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,IAA6B;IAC5D,OAAO,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACnC,CAAC","sourcesContent":["import {useMobile} from '@gravity-ui/uikit';\n\n// `xxs` only exists on `Label`, which uikit 7.48 gained. It is listed here so that the helpers\n// stay usable with the whole `LabelProps['size']` union across the supported uikit range.\nexport type ControlSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl';\n\n/**\n * Resolves a control size: an explicit size always wins, otherwise the mobile\n * default is used in mobile mode and the desktop default elsewhere.\n */\nexport function resolveMobileControlSize<T extends ControlSize>(params: {\n size: T | undefined;\n desktopDefault: T;\n mobileDefault: T;\n isMobile: boolean;\n}): T {\n const {size, desktopDefault, mobileDefault, isMobile} = params;\n\n return size ?? (isMobile ? mobileDefault : desktopDefault);\n}\n\n/**\n * Mobile-aware control size, driven by the uikit `MobileProvider` context.\n */\nexport function useMobileControlSize<T extends ControlSize>(\n size: T | undefined,\n desktopDefault: T,\n mobileDefault: T,\n): T {\n const isMobile = useMobile();\n\n return resolveMobileControlSize({size, desktopDefault, mobileDefault, isMobile});\n}\n\n/**\n * Icon size matching the resolved control size.\n */\nexport function getControlIconSize(size: ControlSize | undefined): number {\n return size === 'xl' ? 20 : 16;\n}\n"]}
@@ -1 +1 @@
1
- {"version":"2.20.1","type":"module","sideEffects":["*.css","*.scss"]}
1
+ {"version":"2.20.2-beta.06dfacf7b7ce91d63acd456737fe4ebc6e0ca2ea.0","type":"module","sideEffects":["*.css","*.scss"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gravity-ui/aikit",
3
- "version": "2.20.1",
3
+ "version": "2.20.2-beta.06dfacf7b7ce91d63acd456737fe4ebc6e0ca2ea.0",
4
4
  "description": "Gravity UI base kit for building ai assistant chats",
5
5
  "license": "MIT",
6
6
  "type": "commonjs",
@@ -745,7 +745,7 @@
745
745
  "@gravity-ui/readme-validator": "^1.3.0",
746
746
  "@gravity-ui/stylelint-config": "^4.0.1",
747
747
  "@gravity-ui/tsconfig": "^1.0.0",
748
- "@gravity-ui/uikit": "^7.25.0",
748
+ "@gravity-ui/uikit": "^7.48.3",
749
749
  "@playwright/experimental-ct-react": "^1.56.1",
750
750
  "@playwright/test": "^1.56.1",
751
751
  "@storybook/addon-docs": "^9.0.5",