pentatrion-design 0.0.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 (208) hide show
  1. package/.storybook/main.ts +33 -0
  2. package/.storybook/manager.ts +8 -0
  3. package/.storybook/preview-head.html +2 -0
  4. package/.storybook/preview.ts +26 -0
  5. package/.storybook/public/bg-map.jpg +0 -0
  6. package/.storybook/public/favicon-32x32.png +0 -0
  7. package/.storybook/public/favicon.svg +28 -0
  8. package/.storybook/public/movies.json +2153 -0
  9. package/.storybook/public/population.json +1178 -0
  10. package/.storybook/public/town-74.geojson +8995 -0
  11. package/.storybook/public/town-74.json +4062 -0
  12. package/.storybook/theme.ts +14 -0
  13. package/Makefile +14 -0
  14. package/README.md +40 -0
  15. package/TODO.md +5 -0
  16. package/dist/index.d.ts +1110 -0
  17. package/dist/index.js +3707 -0
  18. package/dist/redux/index.d.ts +43 -0
  19. package/dist/redux/index.js +583 -0
  20. package/dist/types.d-DlHa_IaW.d.ts +14 -0
  21. package/images/logo-shadow.svg +173 -0
  22. package/images/logo.svg +76 -0
  23. package/package.json +85 -0
  24. package/postcss.config.js +7 -0
  25. package/src/components/autocomplete/Autocomplete.stories.tsx +89 -0
  26. package/src/components/autocomplete/Autocomplete.tsx +316 -0
  27. package/src/components/autocomplete/AutocompleteOption.tsx +35 -0
  28. package/src/components/autocomplete/LazyAutocomplete.tsx +130 -0
  29. package/src/components/autocomplete/SimpleAutocomplete.tsx +74 -0
  30. package/src/components/autocomplete/index.ts +6 -0
  31. package/src/components/autocomplete/useAutocompleteContext.ts +20 -0
  32. package/src/components/autocomplete/util.ts +19 -0
  33. package/src/components/badge/Badge.stories.tsx +72 -0
  34. package/src/components/badge/Badge.tsx +70 -0
  35. package/src/components/button/Button.stories.tsx +189 -0
  36. package/src/components/button/Button.test.tsx +20 -0
  37. package/src/components/button/Button.tsx +200 -0
  38. package/src/components/button/ButtonGroup.stories.tsx +46 -0
  39. package/src/components/button/ButtonGroup.tsx +29 -0
  40. package/src/components/button/index.ts +2 -0
  41. package/src/components/card/Card.stories.tsx +21 -0
  42. package/src/components/card/config.ts +4 -0
  43. package/src/components/card/index.ts +1 -0
  44. package/src/components/code/Code.tsx +15 -0
  45. package/src/components/context-menu/ContextMenu.stories.tsx +22 -0
  46. package/src/components/context-menu/ContextMenu.tsx +175 -0
  47. package/src/components/context-menu/ContextMenuItem.tsx +34 -0
  48. package/src/components/context-menu/index.ts +2 -0
  49. package/src/components/dialog/Dialog.stories.tsx +270 -0
  50. package/src/components/dialog/Dialog.tsx +46 -0
  51. package/src/components/dialog/index.ts +1 -0
  52. package/src/components/dialog/util.ts +29 -0
  53. package/src/components/dropdown-menu/DropdownMenu.stories.tsx +19 -0
  54. package/src/components/dropdown-menu/DropdownMenu.tsx +12 -0
  55. package/src/components/dropdown-menu/DropdownMenuContent.tsx +46 -0
  56. package/src/components/dropdown-menu/DropdownMenuItem.tsx +33 -0
  57. package/src/components/dropdown-menu/DropdownMenuTrigger.tsx +42 -0
  58. package/src/components/dropdown-menu/index.ts +7 -0
  59. package/src/components/dropdown-menu/interface.d.ts +13 -0
  60. package/src/components/dropdown-menu/useDropdownMenu.tsx +115 -0
  61. package/src/components/dropdown-menu/useDropdownMenuContext.ts +16 -0
  62. package/src/components/dropdown-menu-nested/DropdownMenuNested.stories.tsx +33 -0
  63. package/src/components/dropdown-menu-nested/DropdownMenuNested.tsx +19 -0
  64. package/src/components/dropdown-menu-nested/MenuContext.ts +15 -0
  65. package/src/components/dropdown-menu-nested/MenuItem.tsx +43 -0
  66. package/src/components/dropdown-menu-nested/MenuItemWithChildren.tsx +204 -0
  67. package/src/components/dropdown-menu-nested/index.ts +3 -0
  68. package/src/components/flash/Flash.stories.tsx +34 -0
  69. package/src/components/flash/Flash.tsx +24 -0
  70. package/src/components/highlight/Highlight.stories.tsx +128 -0
  71. package/src/components/highlight/Highlight.tsx +29 -0
  72. package/src/components/href/Href.stories.tsx +55 -0
  73. package/src/components/href/Href.tsx +18 -0
  74. package/src/components/input/Checkbox.stories.tsx +52 -0
  75. package/src/components/input/Checkbox.tsx +41 -0
  76. package/src/components/input/Input.stories.tsx +103 -0
  77. package/src/components/input/Input.test.tsx +10 -0
  78. package/src/components/input/Input.tsx +60 -0
  79. package/src/components/input/RadioGroup.stories.tsx +76 -0
  80. package/src/components/input/RadioGroup.tsx +84 -0
  81. package/src/components/input/Toggle.stories.tsx +29 -0
  82. package/src/components/input/Toggle.tsx +35 -0
  83. package/src/components/input/index.ts +4 -0
  84. package/src/components/input-field/InputField.stories.tsx +227 -0
  85. package/src/components/input-field/InputField.tsx +62 -0
  86. package/src/components/loader/Loader.stories.tsx +37 -0
  87. package/src/components/loader/Loader.tsx +54 -0
  88. package/src/components/modal/Components.tsx +58 -0
  89. package/src/components/modal/Modal.stories.tsx +113 -0
  90. package/src/components/modal/Modal.tsx +13 -0
  91. package/src/components/modal/ModalContent.tsx +46 -0
  92. package/src/components/modal/ModalTrigger.tsx +41 -0
  93. package/src/components/modal/index.ts +7 -0
  94. package/src/components/modal/interface.d.ts +10 -0
  95. package/src/components/modal/useModal.ts +48 -0
  96. package/src/components/modal/useModalContext.ts +16 -0
  97. package/src/components/notification/Notification.stories.tsx +51 -0
  98. package/src/components/notification/NotificationsContext.ts +79 -0
  99. package/src/components/notification/NotificationsProvider.tsx +58 -0
  100. package/src/components/notification/index.ts +2 -0
  101. package/src/components/popover/Components.tsx +45 -0
  102. package/src/components/popover/Popover.stories.tsx +46 -0
  103. package/src/components/popover/Popover.test.tsx +21 -0
  104. package/src/components/popover/Popover.tsx +12 -0
  105. package/src/components/popover/PopoverContent.tsx +46 -0
  106. package/src/components/popover/PopoverTrigger.tsx +42 -0
  107. package/src/components/popover/index.ts +7 -0
  108. package/src/components/popover/interface.d.ts +13 -0
  109. package/src/components/popover/usePopover.tsx +80 -0
  110. package/src/components/popover/usePopoverContext.ts +16 -0
  111. package/src/components/portal/Portal.tsx +12 -0
  112. package/src/components/quick-settings/QuickSettings.stories.tsx +182 -0
  113. package/src/components/resize-area/ResizeArea.stories.css +40 -0
  114. package/src/components/resize-area/ResizeArea.stories.tsx +30 -0
  115. package/src/components/resize-area/ResizeArea.tsx +79 -0
  116. package/src/components/scroll/Scroll.stories.tsx +81 -0
  117. package/src/components/scroll/Scroll.tsx +111 -0
  118. package/src/components/select/Select.stories.tsx +248 -0
  119. package/src/components/select/Select.tsx +362 -0
  120. package/src/components/select/SelectOption.tsx +29 -0
  121. package/src/components/select/SelectSelection.tsx +13 -0
  122. package/src/components/select/index.ts +5 -0
  123. package/src/components/select/interface.d.ts +36 -0
  124. package/src/components/select/useSelectContext.ts +19 -0
  125. package/src/components/select/util.ts +12 -0
  126. package/src/components/snack/Snack.stories.tsx +33 -0
  127. package/src/components/snack/Snack.tsx +47 -0
  128. package/src/components/sortable/Sortable.stories.tsx +98 -0
  129. package/src/components/sortable/Sortable.tsx +37 -0
  130. package/src/components/sortable/index.ts +2 -0
  131. package/src/components/sortable/types.d.ts +12 -0
  132. package/src/components/steps/Step.tsx +41 -0
  133. package/src/components/steps/Steps.stories.tsx +141 -0
  134. package/src/components/steps/Steps.tsx +49 -0
  135. package/src/components/steps/index.ts +3 -0
  136. package/src/components/steps/util.ts +3 -0
  137. package/src/components/table/Table.stories.tsx +36 -0
  138. package/src/components/table/Table.tsx +13 -0
  139. package/src/components/table/TableBody.tsx +9 -0
  140. package/src/components/table/TableCell.tsx +16 -0
  141. package/src/components/table/TableFooter.tsx +9 -0
  142. package/src/components/table/TableHeader.tsx +14 -0
  143. package/src/components/table/TableHeaderCell.tsx +14 -0
  144. package/src/components/table/TableRow.tsx +14 -0
  145. package/src/components/table/index.ts +7 -0
  146. package/src/components/tabs/Tabs.stories.tsx +66 -0
  147. package/src/components/tabs/Tabs.tsx +80 -0
  148. package/src/components/tooltip/SimpleTooltip.tsx +17 -0
  149. package/src/components/tooltip/Tooltip.stories.tsx +129 -0
  150. package/src/components/tooltip/Tooltip.test.tsx +18 -0
  151. package/src/components/tooltip/Tooltip.tsx +13 -0
  152. package/src/components/tooltip/TooltipContent.tsx +41 -0
  153. package/src/components/tooltip/TooltipTrigger.tsx +36 -0
  154. package/src/components/tooltip/index.ts +6 -0
  155. package/src/components/tooltip/interface.d.ts +15 -0
  156. package/src/components/tooltip/useTooltip.ts +87 -0
  157. package/src/components/tooltip/useTooltipContext.ts +16 -0
  158. package/src/env.d.ts +27 -0
  159. package/src/hooks/index.ts +13 -0
  160. package/src/hooks/useCombinedRefs.test.tsx +42 -0
  161. package/src/hooks/useCombinedRefs.ts +21 -0
  162. package/src/hooks/useCopyToClipboard.ts +28 -0
  163. package/src/hooks/useDebounce.ts +59 -0
  164. package/src/hooks/useEventCallback.ts +13 -0
  165. package/src/hooks/useEventListener.ts +86 -0
  166. package/src/hooks/useFetch.tsx +21 -0
  167. package/src/hooks/useIsClosing.ts +25 -0
  168. package/src/hooks/useIsMounted.tsx +16 -0
  169. package/src/hooks/useIsomorphicLayoutEffect.ts +4 -0
  170. package/src/hooks/useNotifications.tsx +13 -0
  171. package/src/hooks/useOnClickOutside.ts +35 -0
  172. package/src/hooks/usePrevious.ts +9 -0
  173. package/src/hooks/useRipple.test.tsx +52 -0
  174. package/src/hooks/useRipple.tsx +79 -0
  175. package/src/index.css +14 -0
  176. package/src/index.ts +39 -0
  177. package/src/lib/arrUtil.ts +8 -0
  178. package/src/lib/error.ts +18 -0
  179. package/src/lib/fetch.test.ts +107 -0
  180. package/src/lib/fetch.ts +115 -0
  181. package/src/lib/index.ts +3 -0
  182. package/src/lib/tailwindVariants.ts +35 -0
  183. package/src/redux/index.ts +1 -0
  184. package/src/redux/notification/components/NotificationConsumer.tsx +52 -0
  185. package/src/redux/notification/errorCatcherMiddleware.ts +17 -0
  186. package/src/redux/notification/hooks/useNotification.ts +26 -0
  187. package/src/redux/notification/index.ts +5 -0
  188. package/src/redux/notification/notificationSlice.ts +68 -0
  189. package/src/styles/Animation.stories.tsx +43 -0
  190. package/src/styles/Shadow.stories.tsx +43 -0
  191. package/src/styles/Themes.stories.tsx +31 -0
  192. package/src/styles/Typography.stories.tsx +101 -0
  193. package/src/tailwind/base.css +188 -0
  194. package/src/tailwind/components-input-outline.css +62 -0
  195. package/src/tailwind/components-resize-area.css +112 -0
  196. package/src/tailwind/components-step.css +161 -0
  197. package/src/tailwind/components.css +51 -0
  198. package/src/tailwind/keyframes.ts +69 -0
  199. package/src/tailwind/pentatrionTw.ts +147 -0
  200. package/src/tailwind/utilities-dialog.css +103 -0
  201. package/src/tailwind/utilities.css +3 -0
  202. package/src/types.d.ts +12 -0
  203. package/tailwind.config.js +18 -0
  204. package/tests/README.md +32 -0
  205. package/tests/setup.ts +1 -0
  206. package/tsconfig.json +14 -0
  207. package/tsup.config.ts +23 -0
  208. package/vite.config.ts +24 -0
@@ -0,0 +1,188 @@
1
+ html {
2
+ font-size: 16px;
3
+ line-height: 24px;
4
+ color-scheme: normal;
5
+ }
6
+ body {
7
+ @apply font-sans bg-gray-0 text-gray-7;
8
+ }
9
+ .light {
10
+ color-scheme: light;
11
+ }
12
+ .dark {
13
+ color-scheme: dark;
14
+ }
15
+
16
+ h1,
17
+ h2,
18
+ h3,
19
+ h4,
20
+ h5,
21
+ h6 {
22
+ @apply relative font-semibold;
23
+ }
24
+ h1 {
25
+ @apply text-3xl;
26
+ }
27
+ h2 {
28
+ @apply text-2xl;
29
+ }
30
+ h3 {
31
+ @apply text-xl;
32
+ }
33
+ h4 {
34
+ @apply text-lg;
35
+ }
36
+ h5 {
37
+ @apply text-base;
38
+ }
39
+ h6 {
40
+ @apply text-base;
41
+ }
42
+
43
+ a:not(.ghost-link) {
44
+ @apply decoration-gray-8 underline text-gray-8 visited:text-gray-8 active:text-yellow-5 hover:decoration-2 hover:decoration-yellow-5;
45
+ }
46
+
47
+ :focus-visible {
48
+ @apply outline outline-offset-2 outline-2 outline-yellow-5 rounded;
49
+ }
50
+
51
+ textarea:read-only {
52
+ @apply bg-gray-1;
53
+ }
54
+
55
+ mark {
56
+ @apply text-gray-8 bg-yellow-1;
57
+ }
58
+
59
+ abbr {
60
+ @apply underline decoration-dashed cursor-help;
61
+ }
62
+
63
+ input[type="search"]::-webkit-search-cancel-button,
64
+ input[type="search"]::-webkit-search-decoration,
65
+ input[type="search"]::-webkit-search-results-button,
66
+ input[type="search"]::-webkit-search-results-decoration {
67
+ display: none;
68
+ }
69
+
70
+ :root {
71
+ --color-white: 255 255 255;
72
+ --color-black: 0 0 0;
73
+
74
+ /* bg outlined color */
75
+ --color-yellow-1: 255 250 199; /* rgb(255, 250, 199); */
76
+
77
+ /* bg outlined hovered color */
78
+ --color-yellow-2: 255 245 142; /* rgb(255, 245, 142); */
79
+
80
+ /* button default bgcolor */
81
+ --color-yellow-3: 255 232 34; /* rgb(255, 232, 34); */
82
+
83
+ /* text color, button hover bgcolor */
84
+ --color-yellow-4: 242 214 62; /* rgb(242, 214, 62); */
85
+
86
+ /* text hover color, button active bgcolor */
87
+ --color-yellow-5: 219 167 38; /* rgb(219, 167, 38); */
88
+ --color-yellow-text: var(--color-gray-7);
89
+
90
+ --color-green-1: 232 245 212; /* rgb(232, 245, 212); */
91
+ --color-green-2: 209 235 170; /* rgb(209, 235, 170); */
92
+ --color-green-3: 162 215 87; /* rgb(162, 215, 87); */
93
+ --color-green-4: 138 200 66; /* rgb(138, 200, 66); */
94
+ --color-green-5: 79 158 35; /* rgb(79, 158, 35); */
95
+ --color-green-text: var(--color-gray-7);
96
+
97
+ --color-blue-1: 237 247 255; /* rgb(237, 247, 255); */
98
+ --color-blue-2: 203 232 255; /* rgb(203, 232, 255); */
99
+ --color-blue-3: 131 203 255; /* rgb(131, 203, 255);*/
100
+ --color-blue-4: 75 167 230; /* rgb(75, 167, 230);*/
101
+ --color-blue-5: 37 126 158; /* rgb(37, 126, 158);*/
102
+ --color-blue-text: var(--color-gray-7);
103
+
104
+ --color-orange-1: 255 244 219; /* rgb(255, 244, 219); */
105
+ --color-orange-2: 255 221 179; /* rgb(255, 221, 179); */
106
+ --color-orange-3: 255 176 100; /* rgb(255, 176, 100); */
107
+ --color-orange-4: 230 140 53; /* rgb(230, 140, 53); */
108
+ --color-orange-5: 179 91 38; /* rgb(179, 91, 38); */
109
+ --color-orange-text: var(--color-gray-7);
110
+
111
+ --color-red-1: 255 219 219; /* rgb(255, 219, 219); */
112
+ --color-red-2: 255 183 183; /* rgb(255, 183, 183); */
113
+ --color-red-3: 255 111 111; /* rgb(255, 111, 111); */
114
+ --color-red-4: 230 62 62; /* rgb(230, 62, 62); */
115
+ --color-red-5: 179 38 38; /* rgb(179, 38, 38); */
116
+ --color-red-text: var(--color-gray-7);
117
+
118
+ --color-gray-0: 255 255 255; /* rgb(255, 255, 255); */
119
+ --color-gray-1: 242 242 242; /* rgb(242, 242, 242); */
120
+ --color-gray-2: 228 228 228; /* rgb(228, 228, 228); */
121
+ --color-gray-3: 204 204 204; /* rgb(204, 204, 204); */
122
+ --color-gray-4: 180 180 180; /* rgb(180, 180, 180); */
123
+ --color-gray-5: 140 140 140; /* rgb(140, 140, 140); */
124
+ /* text-hint text-disabled */
125
+ --color-gray-6: 90 90 90; /* rgb(90, 90, 90); */
126
+ --color-gray-7: 50 50 50; /* rgb(50, 50, 50); */
127
+ --color-gray-8: 0 0 0; /* rgb(0, 0, 0); */
128
+ --color-gray-text: var(--color-gray-7);
129
+
130
+ --resize-grip: 10px;
131
+ --resize-indicator: 2px;
132
+
133
+ --step-circle-radius: 16px;
134
+ }
135
+ .dark {
136
+ /* text hover color, button active bgcolor */
137
+ --color-yellow-5: 255 250 199; /* rgb(255, 250, 199); */
138
+ /* text color, button hover bgcolor */
139
+ --color-yellow-4: 255 245 142; /* rgb(255, 245, 142); */
140
+ /* button default bgcolor */
141
+ --color-yellow-3: 255 232 34; /* rgb(255, 232, 34); */
142
+ /* bg outlined hovered color (with generally 50% transparency) */
143
+ --color-yellow-2: 242 214 62; /* rgb(242, 214, 62); */
144
+ /* bg outlined color (with generally 50% transparency) */
145
+ --color-yellow-1: 219 167 38; /* rgb(219, 167, 38); */
146
+
147
+ --color-yellow-text: var(--color-gray-0);
148
+
149
+ --color-green-5: 232 245 212; /* rgb(232, 245, 212); */
150
+ --color-green-4: 209 235 170; /* rgb(209, 235, 170); */
151
+ --color-green-3: 162 215 87; /* rgb(162, 215, 87); */
152
+ --color-green-2: 138 200 66; /* rgb(138, 200, 66); */
153
+ --color-green-1: 79 158 35; /* rgb(79, 158, 35); */
154
+ --color-green-text: var(--color-gray-0);
155
+
156
+ --color-blue-5: 237 247 255; /* rgb(237, 247, 255); */
157
+ --color-blue-4: 203 232 255; /* rgb(203, 232, 255); */
158
+ --color-blue-3: 131 203 255; /* rgb(131, 203, 255);*/
159
+ --color-blue-2: 75 167 230; /* rgb(75, 167, 230);*/
160
+ --color-blue-1: 37 126 158; /* rgb(37, 126, 158);*/
161
+ --color-blue-text: var(--color-gray-0);
162
+
163
+ --color-orange-5: 255 244 219; /* rgb(255, 244, 219); */
164
+ --color-orange-4: 255 221 179; /* rgb(255, 221, 179); */
165
+ --color-orange-3: 255 176 100; /* rgb(255, 176, 100); */
166
+ --color-orange-2: 230 140 53; /* rgb(230, 140, 53); */
167
+ --color-orange-1: 179 91 38; /* rgb(179, 91, 38); */
168
+ --color-orange-text: var(--color-gray-0);
169
+
170
+ --color-red-5: 255 219 219; /* rgb(255, 219, 219); */
171
+ --color-red-4: 255 183 183; /* rgb(255, 183, 183); */
172
+ --color-red-3: 255 111 111; /* rgb(255, 111, 111); */
173
+ --color-red-2: 230 62 62; /* rgb(230, 62, 62); */
174
+ --color-red-1: 179 38 38; /* rgb(179, 38, 38); */
175
+ --color-red-text: var(--color-gray-0);
176
+
177
+ --color-gray-8: 255 255 255; /* rgb(255, 255, 255); */
178
+ --color-gray-7: 220 220 220; /* rgb(220, 220, 220); */
179
+ /* text-hint text-disabled */
180
+ --color-gray-6: 180 180 180; /* rgb(180, 180, 180); */
181
+ --color-gray-5: 140 140 140; /* rgb(140, 140, 140); */
182
+ --color-gray-4: 100 100 100; /* rgb(100, 100, 100); */
183
+ --color-gray-3: 75 75 75; /* rgb(75, 75, 75); */
184
+ --color-gray-2: 50 50 50; /* rgb(50, 50, 50); */
185
+ --color-gray-1: 35 35 35; /* rgb(35, 35, 35); */
186
+ --color-gray-0: 21 29 29; /* rgb(21, 29, 29); */
187
+ --color-gray-text: var(--color-gray-8);
188
+ }
@@ -0,0 +1,62 @@
1
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text) {
2
+ @apply outline outline-1 focus-full:outline-2;
3
+ }
4
+
5
+ /* colored outline for inputs */
6
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-color="yellow"]) {
7
+ @apply outline-gray-2 hover:outline-gray-3 focus-full:outline-yellow-4;
8
+ }
9
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-color="gray"]) {
10
+ @apply outline-gray-2 hover:outline-gray-3 focus-full:outline-gray-4;
11
+ }
12
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-color="red"]) {
13
+ @apply outline-red-2 hover:outline-red-3 focus-full:outline-red-4;
14
+ }
15
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-color="orange"]) {
16
+ @apply outline-orange-2 hover:outline-orange-3 focus-full:outline-orange-4;
17
+ }
18
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-color="blue"]) {
19
+ @apply outline-blue-2 hover:outline-blue-3 focus-full:outline-blue-4;
20
+ }
21
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-color="green"]) {
22
+ @apply outline-green-2 hover:outline-green-3 focus-full:outline-green-4;
23
+ }
24
+ :is(.p8n-input-checkbox, .p8n-input-radio, .p8n-input-text):where([data-variant="ghost"]) {
25
+ @apply outline-transparent;
26
+ }
27
+
28
+ /* bg for checkbox and radio */
29
+ :is(.p8n-input-checkbox, .p8n-input-radio):where([data-color="yellow"]) {
30
+ @apply text-yellow-3;
31
+ }
32
+ :is(.p8n-input-checkbox, .p8n-input-radio):where([data-color="gray"]) {
33
+ @apply text-gray-3;
34
+ }
35
+ :is(.p8n-input-checkbox, .p8n-input-radio):where([data-color="red"]) {
36
+ @apply text-red-3;
37
+ }
38
+ :is(.p8n-input-checkbox, .p8n-input-radio):where([data-color="orange"]) {
39
+ @apply text-orange-3;
40
+ }
41
+ :is(.p8n-input-checkbox, .p8n-input-radio):where([data-color="blue"]) {
42
+ @apply text-blue-3;
43
+ }
44
+ :is(.p8n-input-checkbox, .p8n-input-radio):where([data-color="green"]) {
45
+ @apply text-green-3;
46
+ }
47
+
48
+ /* gray outline for current input */
49
+ :is(.p8n-input-checkbox, .p8n-input-radio):is(:checked, .checked, .indeterminate) {
50
+ @apply bg-full bg-center bg-no-repeat outline-gray-1 bg-current;
51
+ }
52
+
53
+ .p8n-input-checkbox:not(.p8n-input-toggle):where(:checked, .checked) {
54
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23333' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3e%3c/svg%3e");
55
+ }
56
+
57
+ .p8n-input-radio:where(:checked, .checked) {
58
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23333' xmlns='http://www.w3.org/2000/svg'%3e%3ccircle cx='8' cy='8' r='3'/%3e%3c/svg%3e");
59
+ }
60
+ :is(.p8n-input-checkbox, .p8n-input-radio):is(.indeterminate, :checked.indeterminate) {
61
+ background-image: url("data:image/svg+xml,%3csvg viewBox='0 0 16 16' fill='%23333' xmlns='http://www.w3.org/2000/svg'%3e%3cpath d='M4.5 7.5a1 1 0 0 0-1 1 1 1 0 0 0 1 1h7.5a1 1 0 0 0 1-1 1 1 0 0 0-1-1Z' /%3e%3c/svg%3e");
62
+ }
@@ -0,0 +1,112 @@
1
+ .p8n-resize-area {
2
+ position: absolute;
3
+ left: 0;
4
+ right: 0;
5
+ top: 0;
6
+ bottom: 0;
7
+ z-index: 10;
8
+ overflow: visible;
9
+
10
+ .area-button {
11
+ position: absolute;
12
+
13
+ &::before {
14
+ content: "";
15
+ position: absolute;
16
+ transition-delay: 0.25s;
17
+ transition: background-color 0.25s cubic-bezier(0.22, 1, 0.36, 1);
18
+ }
19
+
20
+ &:hover::before {
21
+ background-color: rgb(var(--color-gray-5));
22
+ }
23
+ }
24
+ }
25
+
26
+ .p8n-resize-area {
27
+ &:where(.top, .bottom) {
28
+ height: 0;
29
+ width: 100%;
30
+
31
+ .area-button {
32
+ left: 0;
33
+ right: 0;
34
+ width: 100%;
35
+ height: var(--resize-grip);
36
+ cursor: row-resize;
37
+
38
+ &::before {
39
+ left: 0;
40
+ right: 0;
41
+ height: var(--resize-indicator);
42
+ }
43
+ }
44
+ }
45
+
46
+ &:where(.left, .right) {
47
+ width: 0;
48
+ height: 100%;
49
+
50
+ .area-button {
51
+ top: 0;
52
+ bottom: 0;
53
+ height: 100%;
54
+ width: var(--resize-grip);
55
+ cursor: col-resize;
56
+
57
+ &::before {
58
+ top: 0;
59
+ bottom: 0;
60
+ width: var(--resize-indicator);
61
+ }
62
+ }
63
+ }
64
+
65
+ &.top {
66
+ bottom: auto;
67
+
68
+ .area-button {
69
+ top: calc(-1 * var(--resize-grip) / 2);
70
+
71
+ &::before {
72
+ top: calc(50% - var(--resize-indicator) / 2);
73
+ }
74
+ }
75
+ }
76
+
77
+ &.bottom {
78
+ top: auto;
79
+
80
+ .area-button {
81
+ bottom: calc(-1 * var(--resize-grip) / 2);
82
+
83
+ &::before {
84
+ bottom: calc(50% - var(--resize-indicator) / 2);
85
+ }
86
+ }
87
+ }
88
+
89
+ &.right {
90
+ left: auto;
91
+
92
+ .area-button {
93
+ right: calc(-1 * var(--resize-grip) / 2);
94
+
95
+ &::before {
96
+ right: calc(50% - var(--resize-indicator) / 2);
97
+ }
98
+ }
99
+ }
100
+
101
+ &.left {
102
+ right: auto;
103
+
104
+ .area-button {
105
+ left: calc(-1 * var(--resize-grip) / 2);
106
+
107
+ &::before {
108
+ left: calc(50% - var(--resize-indicator) / 2);
109
+ }
110
+ }
111
+ }
112
+ }
@@ -0,0 +1,161 @@
1
+ /* Ajouter un point */
2
+ .ll-steps-extra {
3
+ @apply flex justify-between;
4
+ & button:first-child {
5
+ padding: calc(var(--step-circle-radius) / 2) calc(var(--step-circle-radius) / 2)
6
+ calc(var(--step-circle-radius) / 2) calc(var(--step-circle-radius) * 1.5 + 1rem);
7
+ }
8
+
9
+ & .ll-marker {
10
+ transform: translate(calc(var(--step-circle-radius) / 3));
11
+ }
12
+ }
13
+
14
+ .ll-steps {
15
+ @apply relative;
16
+
17
+ &[data-marker="circle"] {
18
+ .marker {
19
+ @apply shadow bg-gray-1;
20
+ width: calc(var(--step-circle-radius) * 2);
21
+ height: calc(var(--step-circle-radius) * 2);
22
+
23
+ &.active {
24
+ @apply bg-gray-2;
25
+ }
26
+ }
27
+ }
28
+
29
+ &[data-marker="bullet"] {
30
+ .marker {
31
+ @apply text-2xs bg-gray-0 outline outline-2 outline-gray-2;
32
+ margin: calc(var(--step-circle-radius) / 2);
33
+ width: calc(var(--step-circle-radius));
34
+ height: calc(var(--step-circle-radius));
35
+
36
+ &.active {
37
+ @apply outline-gray-4;
38
+ }
39
+ }
40
+ }
41
+ &[data-direction="horizontal"] {
42
+ @apply flex flex-wrap;
43
+ &[data-marker="circle"] {
44
+ --line-width: calc(100% - var(--step-circle-radius) * 2 - var(--line-space) * 2);
45
+ --line-left: calc(50% + var(--step-circle-radius) + var(--line-space));
46
+ }
47
+
48
+ &[data-marker="bullet"] {
49
+ --line-width: calc(100% - var(--step-circle-radius) - var(--line-space) * 2);
50
+ --line-left: calc(50% + var(--step-circle-radius) / 2 + var(--line-space));
51
+ }
52
+
53
+ & .ll-step {
54
+ @apply flex flex-col flex-1 text-center;
55
+ .content {
56
+ @apply mt-2;
57
+ }
58
+ }
59
+
60
+ &[data-global-line="false"] .ll-step:not(:last-child)::after {
61
+ content: "";
62
+ border-style: none none var(--line-style) none;
63
+
64
+ width: var(--line-width);
65
+ margin-top: -2px;
66
+ order: -1;
67
+ position: relative;
68
+ top: calc(var(--step-circle-radius) + 1px);
69
+ left: var(--line-left);
70
+ }
71
+
72
+ .marker-container {
73
+ @apply flex-center;
74
+ }
75
+ }
76
+
77
+ &[data-direction="vertical"] {
78
+ &[data-marker="circle"] {
79
+ --line-top: calc(var(--step-circle-radius) * 2 + var(--line-space));
80
+ --line-bottom: var(--line-space);
81
+ }
82
+
83
+ &[data-marker="bullet"] {
84
+ --line-top: calc(var(--step-circle-radius) * 1.5 + var(--line-space));
85
+ --line-bottom: calc(-0.5 * var(--step-circle-radius) + var(--line-space));
86
+ }
87
+
88
+ .ll-step {
89
+ @apply relative gap-1 items-start flex;
90
+ &:not(:last-child) {
91
+ padding-bottom: 0.5rem;
92
+ }
93
+ }
94
+
95
+ &[data-global-line="false"] .ll-step:not(:last-child)::after {
96
+ @apply absolute left-0 w-0;
97
+ content: "";
98
+ top: var(--line-top);
99
+ bottom: var(--line-bottom);
100
+ transform: translateX(calc(var(--step-circle-radius) - 1px));
101
+ border-style: none none none var(--line-style);
102
+ }
103
+
104
+ &[data-global-line="true"]::after {
105
+ @apply absolute left-0 w-0 z-0;
106
+ content: "";
107
+ top: var(--line-top);
108
+ bottom: var(--line-top);
109
+ transform: translateX(calc(var(--step-circle-radius) - 1px));
110
+ border-style: none none none var(--line-style);
111
+ }
112
+
113
+ .content {
114
+ @apply flex-1;
115
+ }
116
+
117
+ .title {
118
+ line-height: 1rem;
119
+ }
120
+ }
121
+
122
+ &[data-global-line="true"] {
123
+ &::after {
124
+ @apply border-gray-2 border-2;
125
+ }
126
+
127
+ &.status-done::after {
128
+ @apply border-gray-3;
129
+ }
130
+ }
131
+ }
132
+
133
+ .ll-step {
134
+ [data-global-line="false"] &:not(:last-child) {
135
+ &::after {
136
+ @apply border-gray-2 border-2;
137
+ }
138
+
139
+ &.status-done::after {
140
+ @apply border-gray-3;
141
+ }
142
+ }
143
+
144
+ .handle {
145
+ @apply cursor-row-resize text-gray-6 transition-all;
146
+
147
+ &.active {
148
+ &:hover {
149
+ @apply bg-gray-2 text-transparent;
150
+ }
151
+ }
152
+ }
153
+
154
+ .ll-autocomplete {
155
+ @apply flex-1;
156
+ }
157
+
158
+ .ll-button {
159
+ @apply my-[2px] ml-2;
160
+ }
161
+ }
@@ -0,0 +1,51 @@
1
+ .can-copy {
2
+ @apply underline decoration-dashed decoration-gray-3 cursor-copy hover:decoration-gray-7;
3
+ }
4
+ .disabled {
5
+ @apply pointer-events-none text-gray-6;
6
+ }
7
+ .disabled[disabled] {
8
+ @apply opacity-50;
9
+ }
10
+
11
+ .option {
12
+ @apply flex w-full px-2 h-8 items-center text-left relative cursor-pointer first:rounded-t-2xl last:rounded-b-2xl hover:bg-gray-1 focus-full:text-gray-8 outline-none;
13
+
14
+ &[disabled] {
15
+ color: rgb(var(--color-gray-6));
16
+ pointer-events: none;
17
+ }
18
+
19
+ .bullet {
20
+ width: 1rem;
21
+ height: 1rem;
22
+ display: inline-flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ outline: 2px solid rgb(var(--color-gray-2));
26
+ font-size: var(--font-size-xs);
27
+ border-radius: 50%;
28
+ margin: 0 0.75rem 0 3px;
29
+ }
30
+ }
31
+
32
+ .p8n-separator {
33
+ @apply bg-gray-1 w-1/2 h-1 rounded-sm mx-auto relative;
34
+ }
35
+
36
+ .p8n-setting {
37
+ @apply flex items-center justify-between;
38
+
39
+ & > :first-child {
40
+ @apply text-gray-6 text-sm;
41
+ }
42
+ & > :nth-child(2) {
43
+ text-align: right;
44
+ }
45
+ & > :nth-child(2) input {
46
+ text-align: right;
47
+ }
48
+ &.multiple {
49
+ align-items: flex-start;
50
+ }
51
+ }
@@ -0,0 +1,69 @@
1
+ import { ThemeConfig } from "tailwindcss/types/config";
2
+
3
+ export const keyframes: ThemeConfig["keyframes"] = {
4
+ ripple: {
5
+ to: {
6
+ transform: "scale(4)",
7
+ opacity: "0",
8
+ },
9
+ },
10
+ "fade-in": {
11
+ from: {
12
+ transform: "scale(.8)",
13
+ opacity: "0",
14
+ },
15
+ to: {
16
+ transform: "scale(1)",
17
+ opacity: "1",
18
+ },
19
+ },
20
+ "fade-in-list": {
21
+ from: {
22
+ transform: "scaleY(.8)",
23
+ opacity: "0",
24
+ },
25
+ to: {
26
+ transform: "scaleY(1)",
27
+ opacity: "1",
28
+ },
29
+ },
30
+ "fade-out": {
31
+ from: {
32
+ transform: "scale(1)",
33
+ opacity: "1",
34
+ },
35
+ to: {
36
+ transform: "scale(.8)",
37
+ opacity: "0",
38
+ },
39
+ },
40
+ "fade-in-opacity": {
41
+ from: {
42
+ opacity: "0",
43
+ },
44
+ to: {
45
+ opacity: "1",
46
+ },
47
+ },
48
+ flash: {
49
+ "0%": {
50
+ opacity: "0",
51
+ },
52
+ "50%": {
53
+ opacity: "1",
54
+ },
55
+ "100%": {
56
+ opacity: "0",
57
+ },
58
+ },
59
+ "loader-stroke": {
60
+ from: {
61
+ // check : packages/pentatrion-design/components/loader/Loader.tsx
62
+ // for dashoffset value
63
+ "stroke-dashoffset": "43.699",
64
+ },
65
+ to: {
66
+ "stroke-dashoffset": "0",
67
+ },
68
+ },
69
+ };