@musecat/uikit 0.1.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 (180) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +51 -0
  3. package/index.ts +78 -0
  4. package/package.json +103 -0
  5. package/packages/Components/Box/Box.tsx +173 -0
  6. package/packages/Components/Box/Box.types.ts +48 -0
  7. package/packages/Components/Button/Button.tsx +275 -0
  8. package/packages/Components/Button/Button.types.ts +44 -0
  9. package/packages/Components/Card/Card.default.tsx +180 -0
  10. package/packages/Components/Card/Card.foldable.tsx +383 -0
  11. package/packages/Components/Card/Card.module.scss +23 -0
  12. package/packages/Components/Card/Card.tsx +8 -0
  13. package/packages/Components/Card/Card.types.ts +91 -0
  14. package/packages/Components/Card/Card.utils.ts +66 -0
  15. package/packages/Components/Checkbox/Checkbox.module.scss +11 -0
  16. package/packages/Components/Checkbox/Checkbox.tsx +104 -0
  17. package/packages/Components/Checkbox/Checkbox.types.ts +24 -0
  18. package/packages/Components/CodeBox/CodeBox.copy.tsx +43 -0
  19. package/packages/Components/CodeBox/CodeBox.module.scss +72 -0
  20. package/packages/Components/CodeBox/CodeBox.tsx +91 -0
  21. package/packages/Components/CodeBox/CodeBox.types.ts +17 -0
  22. package/packages/Components/ContextMenu/ContextMenu.module.scss +8 -0
  23. package/packages/Components/ContextMenu/ContextMenu.options.tsx +126 -0
  24. package/packages/Components/ContextMenu/ContextMenu.tsx +381 -0
  25. package/packages/Components/ContextMenu/ContextMenu.types.ts +46 -0
  26. package/packages/Components/ContributionGraph/ContributionGraph.module.scss +42 -0
  27. package/packages/Components/ContributionGraph/ContributionGraph.tsx +454 -0
  28. package/packages/Components/ContributionGraph/ContributionGraph.types.ts +27 -0
  29. package/packages/Components/DatePicker/DatePicker.calendar.tsx +161 -0
  30. package/packages/Components/DatePicker/DatePicker.core.tsx +582 -0
  31. package/packages/Components/DatePicker/DatePicker.module.scss +26 -0
  32. package/packages/Components/DatePicker/DatePicker.tsx +786 -0
  33. package/packages/Components/DatePicker/DatePicker.types.ts +36 -0
  34. package/packages/Components/DatePicker/DatePicker.utils.ts +80 -0
  35. package/packages/Components/DatePicker/hooks/useCalendar.ts +61 -0
  36. package/packages/Components/DatePicker/hooks/useSelection.ts +208 -0
  37. package/packages/Components/Divider/Divider.tsx +46 -0
  38. package/packages/Components/Divider/Divider.types.ts +12 -0
  39. package/packages/Components/Header/Header.module.scss +74 -0
  40. package/packages/Components/Header/Header.tsx +47 -0
  41. package/packages/Components/Header/Header.types.ts +8 -0
  42. package/packages/Components/Icon/Icon.group.tsx +122 -0
  43. package/packages/Components/Icon/Icon.group.types.ts +20 -0
  44. package/packages/Components/Icon/Icon.tsx +341 -0
  45. package/packages/Components/Icon/Icon.types.ts +59 -0
  46. package/packages/Components/Icon/SVG/data.tsx +232 -0
  47. package/packages/Components/Input/Input.module.scss +5 -0
  48. package/packages/Components/Input/Input.tsx +87 -0
  49. package/packages/Components/Input/Input.types.ts +14 -0
  50. package/packages/Components/Label/Label.module.scss +19 -0
  51. package/packages/Components/Label/Label.tsx +115 -0
  52. package/packages/Components/Label/Label.types.ts +28 -0
  53. package/packages/Components/Layout/Layout.docs.module.scss +42 -0
  54. package/packages/Components/Layout/Layout.docs.tsx +150 -0
  55. package/packages/Components/Layout/Layout.docs.types.ts +18 -0
  56. package/packages/Components/Layout/Layout.module.scss +91 -0
  57. package/packages/Components/Layout/Layout.tsx +306 -0
  58. package/packages/Components/Layout/Layout.types.ts +71 -0
  59. package/packages/Components/Maps/OSM/MapOSM.module.scss +11 -0
  60. package/packages/Components/Maps/OSM/MapOSM.shared.ts +121 -0
  61. package/packages/Components/Maps/OSM/MapOSM.tsx +279 -0
  62. package/packages/Components/Maps/OSM/MapOSM.types.ts +18 -0
  63. package/packages/Components/Nav/Nav.module.scss +137 -0
  64. package/packages/Components/Nav/Nav.tsx +304 -0
  65. package/packages/Components/Nav/Nav.types.ts +32 -0
  66. package/packages/Components/Nav/hooks/useNavDrag.ts +374 -0
  67. package/packages/Components/Nav/hooks/useNavIndicator.ts +137 -0
  68. package/packages/Components/Pagination/Pagination.tsx +254 -0
  69. package/packages/Components/Pagination/Pagination.types.ts +18 -0
  70. package/packages/Components/Pill/Pill.tsx +127 -0
  71. package/packages/Components/Pill/Pill.types.ts +33 -0
  72. package/packages/Components/Profile/Profile.shared.ts +74 -0
  73. package/packages/Components/Profile/Profile.tsx +382 -0
  74. package/packages/Components/Profile/Profile.types.ts +55 -0
  75. package/packages/Components/Progress/Progress.module.scss +15 -0
  76. package/packages/Components/Progress/Progress.tsx +88 -0
  77. package/packages/Components/Progress/Progress.types.ts +22 -0
  78. package/packages/Components/Radio/Radio.module.scss +11 -0
  79. package/packages/Components/Radio/Radio.tsx +121 -0
  80. package/packages/Components/Radio/Radio.types.ts +20 -0
  81. package/packages/Components/Select/Select.keyboard.tsx +76 -0
  82. package/packages/Components/Select/Select.trigger.tsx +88 -0
  83. package/packages/Components/Select/Select.tsx +11 -0
  84. package/packages/Components/Select/Select.types.ts +38 -0
  85. package/packages/Components/Select/Select.utils.ts +84 -0
  86. package/packages/Components/Select/hooks/useSelectNavigation.ts +461 -0
  87. package/packages/Components/Select/hooks/useSelectSelection.ts +142 -0
  88. package/packages/Components/Select/hooks/useSelectState.ts +314 -0
  89. package/packages/Components/Select/select.control.tsx +228 -0
  90. package/packages/Components/Select/select.inner.tsx +312 -0
  91. package/packages/Components/Skeleton/Skeleton.tsx +30 -0
  92. package/packages/Components/Skeleton/Skeleton.types.ts +12 -0
  93. package/packages/Components/Spinner/Spinner.module.scss +78 -0
  94. package/packages/Components/Spinner/Spinner.tsx +125 -0
  95. package/packages/Components/Spinner/Spinner.types.ts +19 -0
  96. package/packages/Components/Text/Text.module.scss +7 -0
  97. package/packages/Components/Text/Text.tsx +49 -0
  98. package/packages/Components/Text/Text.types.ts +33 -0
  99. package/packages/Components/TimePicker/TimePicker.core.tsx +448 -0
  100. package/packages/Components/TimePicker/TimePicker.module.scss +30 -0
  101. package/packages/Components/TimePicker/TimePicker.tsx +511 -0
  102. package/packages/Components/TimePicker/TimePicker.types.ts +22 -0
  103. package/packages/Components/Timeline/Timeline.tsx +111 -0
  104. package/packages/Components/Timeline/Timeline.types.ts +23 -0
  105. package/packages/Components/Title/Title.tsx +305 -0
  106. package/packages/Components/Title/Title.types.ts +64 -0
  107. package/packages/Components/Toggle/Toggle.module.scss +32 -0
  108. package/packages/Components/Toggle/Toggle.tsx +272 -0
  109. package/packages/Components/Toggle/Toggle.types.ts +17 -0
  110. package/packages/Components/Tooltip/Tooltip.module.scss +44 -0
  111. package/packages/Components/Tooltip/Tooltip.tsx +340 -0
  112. package/packages/Components/Tooltip/Tooltip.types.ts +38 -0
  113. package/packages/Frameworks/Dialog/Dialog.background.tsx +88 -0
  114. package/packages/Frameworks/Dialog/Dialog.boot.tsx +32 -0
  115. package/packages/Frameworks/Dialog/Dialog.store.ts +199 -0
  116. package/packages/Frameworks/Dialog/Dialog.tsx +185 -0
  117. package/packages/Frameworks/Dialog/Dialog.types.ts +264 -0
  118. package/packages/Frameworks/Dialog/Dialog.utils.ts +22 -0
  119. package/packages/Frameworks/Dialog/contents/Dialog.footer.tsx +79 -0
  120. package/packages/Frameworks/Dialog/contents/Dialog.funnel.tsx +260 -0
  121. package/packages/Frameworks/Dialog/contents/Dialog.header.tsx +137 -0
  122. package/packages/Frameworks/Dialog/hooks/useDialogPosition.ts +298 -0
  123. package/packages/Frameworks/Dialog/hooks/useSheetDrag.ts +325 -0
  124. package/packages/Frameworks/Dialog/hooks/useSheetGeometry.ts +201 -0
  125. package/packages/Frameworks/Dialog/hooks/useSheetProgressive.ts +98 -0
  126. package/packages/Frameworks/Dialog/renderers/renderModal.tsx +228 -0
  127. package/packages/Frameworks/Dialog/renderers/renderPopover.tsx +220 -0
  128. package/packages/Frameworks/Dialog/renderers/renderSheet.tsx +571 -0
  129. package/packages/Frameworks/EdgeEffect/EdgeEffect.tsx +52 -0
  130. package/packages/Frameworks/EdgeEffect/EdgeEffect.types.ts +5 -0
  131. package/packages/Frameworks/Motion/Motion.presets.ts +49 -0
  132. package/packages/Frameworks/Pressable/Pressable.module.scss +19 -0
  133. package/packages/Frameworks/Pressable/Pressable.tsx +651 -0
  134. package/packages/Frameworks/Pressable/Pressable.types.ts +73 -0
  135. package/packages/Frameworks/Squircle/Squircle.tsx +263 -0
  136. package/packages/Frameworks/Squircle/Squircle.types.ts +15 -0
  137. package/packages/Frameworks/Theme/Radius.types.ts +55 -0
  138. package/packages/Frameworks/Theme/Theme.types.ts +325 -0
  139. package/packages/Frameworks/Toaster/Toaster.boot.tsx +47 -0
  140. package/packages/Frameworks/Toaster/Toaster.module.scss +168 -0
  141. package/packages/Frameworks/Toaster/Toaster.types.ts +13 -0
  142. package/packages/Frameworks/View/DNDView/DNDView.module.scss +8 -0
  143. package/packages/Frameworks/View/DNDView/DNDView.tsx +470 -0
  144. package/packages/Frameworks/View/DNDView/DNDView.types.ts +61 -0
  145. package/packages/Frameworks/View/HScrollView/HScrollView.module.scss +59 -0
  146. package/packages/Frameworks/View/HScrollView/HScrollView.tsx +386 -0
  147. package/packages/Frameworks/View/HScrollView/HScrollView.types.ts +46 -0
  148. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.counter.tsx +27 -0
  149. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.footer.tsx +76 -0
  150. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.header.tsx +49 -0
  151. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.list.tsx +74 -0
  152. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.slide.tsx +71 -0
  153. package/packages/Frameworks/View/ImageView/Dialog/ImageDialog.tsx +175 -0
  154. package/packages/Frameworks/View/ImageView/Image.controls.tsx +39 -0
  155. package/packages/Frameworks/View/ImageView/Image.hooks.ts +82 -0
  156. package/packages/Frameworks/View/ImageView/Image.module.scss +7 -0
  157. package/packages/Frameworks/View/ImageView/Image.tsx +375 -0
  158. package/packages/Frameworks/View/ImageView/Image.types.ts +71 -0
  159. package/packages/Frameworks/View/ImageView/Image.utils.ts +79 -0
  160. package/packages/Frameworks/View/View.module.scss +34 -0
  161. package/packages/Frameworks/View/View.tsx +200 -0
  162. package/packages/Frameworks/View/View.types.ts +36 -0
  163. package/packages/Frameworks/_shared/Padding.types.ts +52 -0
  164. package/packages/Frameworks/_shared/StopParentInteraction.tsx +45 -0
  165. package/packages/Frameworks/_shared/Wind.types.ts +17 -0
  166. package/packages/Frameworks/_shared/bodyScrollLock.ts +127 -0
  167. package/packages/Frameworks/_shared/layer.constants.ts +8 -0
  168. package/packages/Frameworks/_shared/normalize.ts +39 -0
  169. package/packages/Frameworks/_shared/sizing.ts +55 -0
  170. package/packages/Frameworks/_shared/useControllableState.ts +29 -0
  171. package/packages/Styles/_animation.scss +42 -0
  172. package/packages/Styles/_color.scss +131 -0
  173. package/packages/Styles/_font.scss +30 -0
  174. package/packages/Styles/_icon.scss +782 -0
  175. package/packages/Styles/_importer.scss +9 -0
  176. package/packages/Styles/_system.scss +69 -0
  177. package/packages/Styles/_textstyle.scss +111 -0
  178. package/packages/Styles/_theme.scss +452 -0
  179. package/packages/Styles/_viewport-global.scss +99 -0
  180. package/packages/Styles/_viewport.scss +108 -0
@@ -0,0 +1,99 @@
1
+ /**
2
+ * W1: 320px
3
+ * W2: 410px
4
+ * W3: 768px
5
+ * W4: 1280px
6
+ */
7
+
8
+ @use "sass:list";
9
+ @use "viewport" as viewport;
10
+
11
+ :root {
12
+ --viewport-w1-min: 0px;
13
+ --viewport-w1-max: 319.98px;
14
+ --viewport-w1-next: 320px;
15
+ --viewport-w2-min: 320px;
16
+ --viewport-w2-max: 409.98px;
17
+ --viewport-w2-next: 410px;
18
+ --viewport-w3-min: 410px;
19
+ --viewport-w3-max: 767.98px;
20
+ --viewport-w3-next: 768px;
21
+ --viewport-w4-min: 768px;
22
+ --viewport-w4-max: 1279.98px;
23
+ --viewport-w4-next: 1280px;
24
+ }
25
+
26
+ @each $key in viewport.$viewport-order {
27
+ $max: viewport.viewport-range($key, max);
28
+ $next: viewport.viewport-range($key, next);
29
+
30
+ @include viewport.viewport-selector("#{$key}-h") {
31
+ @include viewport.viewport-max($max) {
32
+ display: none !important;
33
+ }
34
+ }
35
+
36
+ @include viewport.viewport-selector("#{$key}-s") {
37
+ @include viewport.viewport-min($next) {
38
+ display: none !important;
39
+ }
40
+ }
41
+
42
+ @include viewport.viewport-selector("#{$key}-scrollX") {
43
+ @include viewport.viewport-max($max) {
44
+ overflow: auto hidden !important;
45
+ overscroll-behavior-x: contain;
46
+ -webkit-overflow-scrolling: touch;
47
+ }
48
+ }
49
+
50
+ @include viewport.viewport-selector("#{$key}-col") {
51
+ @include viewport.viewport-max($max) {
52
+ display: flex !important;
53
+ flex-direction: column !important;
54
+ }
55
+ }
56
+ }
57
+
58
+ @for $start-index from 1 through list.length(viewport.$viewport-order) {
59
+ $start-key: list.nth(viewport.$viewport-order, $start-index);
60
+ $start-min: viewport.viewport-range($start-key, min);
61
+ $start-previous-max: viewport.viewport-previous-max($start-key);
62
+
63
+ @if $start-index < list.length(viewport.$viewport-order) {
64
+ @for $end-index
65
+ from $start-index +
66
+ 1
67
+ through list.length(viewport.$viewport-order)
68
+ {
69
+ $end-key: list.nth(viewport.$viewport-order, $end-index);
70
+ $end-max: viewport.viewport-range($end-key, max);
71
+ $end-next: viewport.viewport-range($end-key, next);
72
+ $name: "#{$start-key}#{$end-key}";
73
+
74
+ @include viewport.viewport-selector("#{$name}-h") {
75
+ @if not $start-min {
76
+ @include viewport.viewport-max($end-max) {
77
+ display: none !important;
78
+ }
79
+ } @else {
80
+ @include viewport.viewport-between($start-min, $end-max) {
81
+ display: none !important;
82
+ }
83
+ }
84
+ }
85
+
86
+ @include viewport.viewport-selector("#{$name}-s") {
87
+ @if $start-previous-max {
88
+ @include viewport.viewport-max($start-previous-max) {
89
+ display: none !important;
90
+ }
91
+ }
92
+
93
+ @include viewport.viewport-min($end-next) {
94
+ display: none !important;
95
+ }
96
+ }
97
+ }
98
+ }
99
+ }
@@ -0,0 +1,108 @@
1
+ @use "sass:list";
2
+ @use "sass:map";
3
+
4
+ $viewport-order: w1, w2, w3, w4;
5
+ $viewport-ranges: (
6
+ w1: (
7
+ min: null,
8
+ max: 319.98px,
9
+ next: 320px,
10
+ ),
11
+ w2: (
12
+ min: 320px,
13
+ max: 409.98px,
14
+ next: 410px,
15
+ ),
16
+ w3: (
17
+ min: 410px,
18
+ max: 767.98px,
19
+ next: 768px,
20
+ ),
21
+ w4: (
22
+ min: 768px,
23
+ max: 1279.98px,
24
+ next: 1280px,
25
+ ),
26
+ );
27
+
28
+ @function viewport-range($key, $property) {
29
+ @return map.get(map.get($viewport-ranges, $key), $property);
30
+ }
31
+
32
+ @function viewport-previous-key($key) {
33
+ $index: list.index($viewport-order, $key);
34
+
35
+ @if not $index or $index <= 1 {
36
+ @return null;
37
+ }
38
+
39
+ @return list.nth($viewport-order, $index - 1);
40
+ }
41
+
42
+ @function viewport-previous-max($key) {
43
+ $previous-key: viewport-previous-key($key);
44
+
45
+ @if not $previous-key {
46
+ @return null;
47
+ }
48
+
49
+ @return viewport-range($previous-key, max);
50
+ }
51
+
52
+ @mixin viewport-max($max) {
53
+ @media (max-width: $max) {
54
+ @content;
55
+ }
56
+ }
57
+
58
+ @mixin viewport-min($min) {
59
+ @media (min-width: $min) {
60
+ @content;
61
+ }
62
+ }
63
+
64
+ @mixin viewport-between($min, $max) {
65
+ @media (min-width: $min) and (max-width: $max) {
66
+ @content;
67
+ }
68
+ }
69
+
70
+ @mixin down($key) {
71
+ @include viewport-max(viewport-range($key, max)) {
72
+ @content;
73
+ }
74
+ }
75
+
76
+ @mixin up($key) {
77
+ $min: viewport-range($key, min);
78
+
79
+ @if not $min {
80
+ @content;
81
+ } @else {
82
+ @include viewport-min($min) {
83
+ @content;
84
+ }
85
+ }
86
+ }
87
+
88
+ @mixin only($key) {
89
+ $min: viewport-range($key, min);
90
+ $max: viewport-range($key, max);
91
+
92
+ @if not $min {
93
+ @include viewport-max($max) {
94
+ @content;
95
+ }
96
+ } @else {
97
+ @include viewport-between($min, $max) {
98
+ @content;
99
+ }
100
+ }
101
+ }
102
+
103
+ @mixin viewport-selector($name) {
104
+ .#{$name},
105
+ .--#{$name} {
106
+ @content;
107
+ }
108
+ }