@dss-kit/ui-kit 1.0.3 → 1.1.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.
Files changed (59) hide show
  1. package/README.md +19 -0
  2. package/dist/components/builders/Sheet/SheetLayer.js +95 -83
  3. package/dist/components/builders/Sheet/hooks/index.d.ts +1 -0
  4. package/dist/components/builders/Sheet/hooks/useMotionValueStyle.d.ts +8 -0
  5. package/dist/components/builders/Sheet/hooks/useMotionValueStyle.js +14 -0
  6. package/dist/components/builders/Table/TablePagination/TablePagination.d.ts +10 -4
  7. package/dist/components/builders/Table/TablePagination/TablePagination.js +230 -177
  8. package/dist/components/builders/Text/Text.d.ts +4 -1
  9. package/dist/components/builders/Text/Text.js +78 -76
  10. package/dist/components/controls/Button/Button.d.ts +1 -1
  11. package/dist/components/controls/Button/Button.js +47 -46
  12. package/dist/components/controls/OtpInput/OtpInput.js +121 -143
  13. package/dist/components/controls/OtpInput/styles.d.ts +1 -0
  14. package/dist/components/controls/OtpInput/styles.js +9 -3
  15. package/dist/components/controls/Select/Select.js +72 -70
  16. package/dist/components/controls/Switch/Switch.d.ts +10 -6
  17. package/dist/components/controls/Switch/Switch.js +109 -86
  18. package/dist/components/controls/Switch/styles.d.ts +3 -2
  19. package/dist/components/controls/Switch/styles.js +76 -73
  20. package/dist/components/shared/Toast/ToastContainer.d.ts +1 -1
  21. package/dist/components/shared/Toast/ToastContainer.js +25 -23
  22. package/dist/fonts/inter-cyrillic-ext-400.woff2 +0 -0
  23. package/dist/fonts/inter-cyrillic-ext-500.woff2 +0 -0
  24. package/dist/fonts/inter-cyrillic-ext-600.woff2 +0 -0
  25. package/dist/fonts/inter-cyrillic-ext-700.woff2 +0 -0
  26. package/dist/fonts/inter-cyrillic-ext-800.woff2 +0 -0
  27. package/dist/fonts/inter-latin-cyrillic-400.woff2 +0 -0
  28. package/dist/fonts/inter-latin-cyrillic-500.woff2 +0 -0
  29. package/dist/fonts/inter-latin-cyrillic-600.woff2 +0 -0
  30. package/dist/fonts/inter-latin-cyrillic-700.woff2 +0 -0
  31. package/dist/fonts/inter-latin-cyrillic-800.woff2 +0 -0
  32. package/dist/fonts/inter-latin-ext-400.woff2 +0 -0
  33. package/dist/fonts/inter-latin-ext-500.woff2 +0 -0
  34. package/dist/fonts/inter-latin-ext-600.woff2 +0 -0
  35. package/dist/fonts/inter-latin-ext-700.woff2 +0 -0
  36. package/dist/fonts/inter-latin-ext-800.woff2 +0 -0
  37. package/dist/index.js +34 -32
  38. package/dist/providers/MotionProvider/MotionProvider.d.ts +9 -0
  39. package/dist/providers/MotionProvider/MotionProvider.js +21 -0
  40. package/dist/providers/MotionProvider/MotionProvider.types.d.ts +12 -0
  41. package/dist/providers/MotionProvider/features.d.ts +1 -0
  42. package/dist/providers/MotionProvider/features.js +4 -0
  43. package/dist/providers/MotionProvider/index.d.ts +2 -0
  44. package/dist/providers/MotionProvider/loadMotionFeatures.d.ts +13 -0
  45. package/dist/providers/MotionProvider/loadMotionFeatures.js +9 -0
  46. package/dist/providers/index.d.ts +1 -0
  47. package/dist/styles/utils/breakpoints.d.ts +12 -0
  48. package/dist/styles/utils/breakpoints.js +20 -13
  49. package/dist/styles/utils/breakpoints.ts +32 -0
  50. package/dist/ui-kit.cjs +8 -8
  51. package/dist/ui-kit.css +1 -1
  52. package/package.json +3 -1
  53. package/dist/fonts/inter-normal-200.woff2 +0 -0
  54. package/dist/fonts/inter-normal-300.woff2 +0 -0
  55. package/dist/fonts/inter-normal-400.woff2 +0 -0
  56. package/dist/fonts/inter-normal-500.woff2 +0 -0
  57. package/dist/fonts/inter-normal-600.woff2 +0 -0
  58. package/dist/fonts/inter-normal-700.woff2 +0 -0
  59. package/dist/fonts/inter-normal-800.woff2 +0 -0
@@ -33,3 +33,35 @@ export const bp = {
33
33
  bp1920: (direction: BreakpointDirection = "max") =>
34
34
  breakpoint(BreakpointsBase._1920, direction),
35
35
  } as const;
36
+
37
+ // Ширина контейнера бывает дробной (проценты, flex), и пара max-width: 575px /
38
+ // min-width: 576px оставляет щель, в которую не попадает ни одно правило.
39
+ // Синтаксис диапазонов щели не оставляет, и его понимают все браузеры с @container
40
+ const containerBreakpoint = (
41
+ name: string,
42
+ px: number,
43
+ direction: BreakpointDirection = "max"
44
+ ): string => {
45
+ if (direction === "min") {
46
+ return `@container ${name} (width >= ${px}px)`;
47
+ }
48
+ return `@container ${name} (width < ${px}px)`;
49
+ };
50
+
51
+ /**
52
+ * Брейкпоинты `bp` для контейнерных запросов: ориентир — ширина ближайшего
53
+ * предка с `container-name: <name>`, а не окна. Смысл `direction` тот же:
54
+ * `max` — уже брейкпоинта, `min` — от него и шире.
55
+ */
56
+ export const bpContainer = {
57
+ xs: (name: string, direction: BreakpointDirection = "max") =>
58
+ containerBreakpoint(name, Breakpoints.xs, direction),
59
+ sm: (name: string, direction: BreakpointDirection = "max") =>
60
+ containerBreakpoint(name, Breakpoints.sm, direction),
61
+ md: (name: string, direction: BreakpointDirection = "max") =>
62
+ containerBreakpoint(name, Breakpoints.md, direction),
63
+ lg: (name: string, direction: BreakpointDirection = "max") =>
64
+ containerBreakpoint(name, Breakpoints.lg, direction),
65
+ xl: (name: string, direction: BreakpointDirection = "max") =>
66
+ containerBreakpoint(name, Breakpoints.xl, direction),
67
+ } as const;