@heymantle/litho 0.0.10 → 0.0.13
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.
- package/dist/cjs/components/Banner.js +6 -1
- package/dist/cjs/components/Button.js +33 -4
- package/dist/cjs/components/ButtonGroup.js +19 -4
- package/dist/cjs/components/Card.js +39 -3
- package/dist/cjs/components/ChoiceList.js +3 -2
- package/dist/cjs/components/Code.js +227 -0
- package/dist/cjs/components/Filters.js +1 -1
- package/dist/cjs/components/Frame.js +2 -2
- package/dist/cjs/components/Layout.js +16 -4
- package/dist/cjs/components/Link.js +35 -4
- package/dist/cjs/components/Modal.js +4 -0
- package/dist/cjs/components/Page.js +5 -2
- package/dist/cjs/components/Pane.js +669 -84
- package/dist/cjs/components/ResourceList.js +2 -2
- package/dist/cjs/components/TabNavigation.js +300 -0
- package/dist/cjs/components/TextField.js +3 -0
- package/dist/cjs/components/Tip.js +3 -0
- package/dist/cjs/components/Tooltip.js +12 -13
- package/dist/cjs/index.js +4 -0
- package/dist/cjs/stories/Pane.stories.js +352 -3
- package/dist/cjs/utilities/useBodyScrollLock.js +63 -0
- package/dist/cjs/utilities/useKeyboardAction.js +19 -0
- package/dist/cjs/utilities/useLocalStorage.js +126 -0
- package/dist/cjs/utilities/useMobile.js +92 -0
- package/dist/cjs/utilities/usePaneState.js +340 -0
- package/dist/cjs/utilities/useTabStorage.js +325 -0
- package/dist/esm/components/Banner.js +7 -2
- package/dist/esm/components/Button.js +33 -4
- package/dist/esm/components/ButtonGroup.js +19 -4
- package/dist/esm/components/Card.js +39 -3
- package/dist/esm/components/ChoiceList.js +3 -2
- package/dist/esm/components/Code.js +212 -0
- package/dist/esm/components/Filters.js +2 -2
- package/dist/esm/components/Frame.js +2 -2
- package/dist/esm/components/Layout.js +16 -4
- package/dist/esm/components/Link.js +31 -5
- package/dist/esm/components/Modal.js +4 -0
- package/dist/esm/components/Page.js +5 -2
- package/dist/esm/components/Pane.js +619 -83
- package/dist/esm/components/ResourceList.js +2 -2
- package/dist/esm/components/TabNavigation.js +285 -0
- package/dist/esm/components/TextField.js +4 -1
- package/dist/esm/components/Tip.js +4 -1
- package/dist/esm/components/Tooltip.js +12 -13
- package/dist/esm/index.js +1 -0
- package/dist/esm/stories/Pane.stories.js +346 -3
- package/dist/esm/utilities/useBodyScrollLock.js +53 -0
- package/dist/esm/utilities/useKeyboardAction.js +25 -0
- package/dist/esm/utilities/useLocalStorage.js +115 -0
- package/dist/esm/utilities/useMobile.js +79 -0
- package/dist/esm/utilities/usePaneState.js +334 -0
- package/dist/esm/utilities/useTabStorage.js +311 -0
- package/dist/types/components/Banner.d.ts.map +1 -1
- package/dist/types/components/Button.d.ts +2 -2
- package/dist/types/components/Button.d.ts.map +1 -1
- package/dist/types/components/ButtonGroup.d.ts.map +1 -1
- package/dist/types/components/Card.d.ts +34 -1
- package/dist/types/components/Card.d.ts.map +1 -1
- package/dist/types/components/Code.d.ts +28 -0
- package/dist/types/components/Code.d.ts.map +1 -0
- package/dist/types/components/Filters.d.ts.map +1 -1
- package/dist/types/components/Layout.d.ts +2 -0
- package/dist/types/components/Layout.d.ts.map +1 -1
- package/dist/types/components/Link.d.ts +4 -0
- package/dist/types/components/Link.d.ts.map +1 -1
- package/dist/types/components/Modal.d.ts +2 -0
- package/dist/types/components/Modal.d.ts.map +1 -1
- package/dist/types/components/Page.d.ts.map +1 -1
- package/dist/types/components/Pane.d.ts +2 -0
- package/dist/types/components/Pane.d.ts.map +1 -1
- package/dist/types/components/TabNavigation.d.ts +3 -0
- package/dist/types/components/TabNavigation.d.ts.map +1 -0
- package/dist/types/components/TextField.d.ts.map +1 -1
- package/dist/types/components/Tip.d.ts.map +1 -1
- package/dist/types/components/Tooltip.d.ts +2 -0
- package/dist/types/components/Tooltip.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/utilities/useBodyScrollLock.d.ts +12 -0
- package/dist/types/utilities/useBodyScrollLock.d.ts.map +1 -0
- package/dist/types/utilities/useKeyboardAction.d.ts +2 -0
- package/dist/types/utilities/useKeyboardAction.d.ts.map +1 -0
- package/dist/types/utilities/useLocalStorage.d.ts +13 -0
- package/dist/types/utilities/useLocalStorage.d.ts.map +1 -0
- package/dist/types/utilities/useMobile.d.ts +9 -0
- package/dist/types/utilities/useMobile.d.ts.map +1 -0
- package/dist/types/utilities/usePaneState.d.ts +2 -0
- package/dist/types/utilities/usePaneState.d.ts.map +1 -0
- package/dist/types/utilities/useTabStorage.d.ts +8 -0
- package/dist/types/utilities/useTabStorage.d.ts.map +1 -0
- package/index.css +77 -6
- package/package.json +2 -2
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing localStorage with React state
|
|
3
|
+
* @param {string} key - The localStorage key
|
|
4
|
+
* @param {any} initialValue - The initial value if key doesn't exist
|
|
5
|
+
* @param {Object} options - Optional configuration
|
|
6
|
+
* @param {boolean} options.serialize - Whether to serialize/deserialize JSON (default: true)
|
|
7
|
+
* @returns {[any, Function]} - [storedValue, setValue]
|
|
8
|
+
*/
|
|
9
|
+
export function useLocalStorage(key: string, initialValue: any, options?: {
|
|
10
|
+
serialize: boolean;
|
|
11
|
+
}): [any, Function];
|
|
12
|
+
export default useLocalStorage;
|
|
13
|
+
//# sourceMappingURL=useLocalStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useLocalStorage.d.ts","sourceRoot":"","sources":["../../../utilities/useLocalStorage.js"],"names":[],"mappings":"AAIA;;;;;;;GAOG;AACH,qCANW,MAAM,gBACN,GAAG,YAEX;IAAyB,SAAS,EAA1B,OAAO;CACf,GAAU,CAAC,GAAG,WAAW,CAqD3B"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for detecting mobile viewport
|
|
3
|
+
* @param {number} breakpoint - The breakpoint width in pixels (default: 768)
|
|
4
|
+
* @param {number} debounceMs - Debounce delay for resize events in milliseconds (default: 150)
|
|
5
|
+
* @returns {boolean} - True if viewport width is below the breakpoint
|
|
6
|
+
*/
|
|
7
|
+
export function useMobile(breakpoint?: number, debounceMs?: number): boolean;
|
|
8
|
+
export default useMobile;
|
|
9
|
+
//# sourceMappingURL=useMobile.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMobile.d.ts","sourceRoot":"","sources":["../../../utilities/useMobile.js"],"names":[],"mappings":"AAKA;;;;;GAKG;AACH,uCAJW,MAAM,eACN,MAAM,GACJ,OAAO,CA0BnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"usePaneState.d.ts","sourceRoot":"","sources":["../../../utilities/usePaneState.js"],"names":[],"mappings":"AA0CO,qCAHI,MAAM,OAyNhB"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Custom hook for managing tab storage in consolidated pane state, scoped by orgId
|
|
3
|
+
* @param {string} [orgId] - Organization ID to scope the tab storage (optional, but required for operations)
|
|
4
|
+
* @returns {Object} Tab storage utilities
|
|
5
|
+
*/
|
|
6
|
+
export function useTabStorage(orgId?: string): any;
|
|
7
|
+
export default useTabStorage;
|
|
8
|
+
//# sourceMappingURL=useTabStorage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTabStorage.d.ts","sourceRoot":"","sources":["../../../utilities/useTabStorage.js"],"names":[],"mappings":"AAKA;;;;GAIG;AACH,sCAHW,MAAM,OA8OhB"}
|
package/index.css
CHANGED
|
@@ -151,6 +151,7 @@
|
|
|
151
151
|
--color-lower: #75716d;
|
|
152
152
|
--color-lowest: #8f8a84;
|
|
153
153
|
--color-alternate: #ffffff;
|
|
154
|
+
--color-insight-text: #250E6A;
|
|
154
155
|
|
|
155
156
|
--color-fg-success: #0e4d25;
|
|
156
157
|
--color-fg-success-alternate: #41e67c;
|
|
@@ -238,10 +239,10 @@
|
|
|
238
239
|
--color-highlight-alt-fg: #08060d;
|
|
239
240
|
--color-highlight-alt-icon: #403366;
|
|
240
241
|
|
|
241
|
-
--color-insight: #
|
|
242
|
-
--color-insight-low: #
|
|
243
|
-
--color-insight-lower: #
|
|
244
|
-
--color-insight-lowest: #
|
|
242
|
+
--color-insight: #F3A0FF;
|
|
243
|
+
--color-insight-low: #E698F2;
|
|
244
|
+
--color-insight-lower: #DA90E5;
|
|
245
|
+
--color-insight-lowest: #CE88D9;
|
|
245
246
|
--color-insight-fg: #111014;
|
|
246
247
|
--color-insight-icon: #650274;
|
|
247
248
|
--color-insight-alt: #f5cafc;
|
|
@@ -326,6 +327,17 @@
|
|
|
326
327
|
--color-btn-highlight-disabled: #ffbb70;
|
|
327
328
|
--color-btn-highlight-disabled-fg: #66635f;
|
|
328
329
|
|
|
330
|
+
--color-btn-insight: #F5CAFC;
|
|
331
|
+
--color-btn-insight-low: #ECC2F2;
|
|
332
|
+
--color-btn-insight-lower: #E2BAE8;
|
|
333
|
+
--color-btn-insight-fg: #0c060d;
|
|
334
|
+
--color-btn-insight-fg-alt: #0c060d;
|
|
335
|
+
--color-btn-insight-icon: #5f3366;
|
|
336
|
+
--color-btn-insight-border: #F5CAFC;
|
|
337
|
+
--color-btn-insight-border-low: #ECC2F2;
|
|
338
|
+
--color-btn-insight-disabled: #ffbb70;
|
|
339
|
+
--color-btn-insight-disabled-fg: #66635f;
|
|
340
|
+
|
|
329
341
|
--color-form-accent: #ffb64e;
|
|
330
342
|
--color-form-bg: #ffffff;
|
|
331
343
|
--color-form-bg-hover: #fcfcfc;
|
|
@@ -529,7 +541,7 @@
|
|
|
529
541
|
--litho-table-header-sticky-at: 56px;
|
|
530
542
|
--litho-pane-width: 400px;
|
|
531
543
|
--litho-pane-width-default: 400px;
|
|
532
|
-
--litho-pane-width
|
|
544
|
+
--litho-pane-collapsed-width: 36px;
|
|
533
545
|
|
|
534
546
|
overscroll-behavior: none;
|
|
535
547
|
}
|
|
@@ -551,6 +563,7 @@
|
|
|
551
563
|
--color-lower: #807B7B;
|
|
552
564
|
--color-lowest: #666363;
|
|
553
565
|
--color-alternate: #FFFFFF;
|
|
566
|
+
--color-insight-text: #CEBDFF;
|
|
554
567
|
|
|
555
568
|
--color-fg-success: #40fb84;
|
|
556
569
|
--color-fg-success-alternate: #40fb84;
|
|
@@ -772,6 +785,17 @@
|
|
|
772
785
|
--color-btn-highlight-disabled: transparent;
|
|
773
786
|
--color-btn-highlight-disabled-fg: #b98449;
|
|
774
787
|
|
|
788
|
+
--color-btn-insight: #F5CAFC;
|
|
789
|
+
--color-btn-insight-low: #ECC2F2;
|
|
790
|
+
--color-btn-insight-lower: #E2BAE8;
|
|
791
|
+
--color-btn-insight-fg: #0c060d;
|
|
792
|
+
--color-btn-insight-fg-alt: #0c060d;
|
|
793
|
+
--color-btn-insight-icon: #5f3366;
|
|
794
|
+
--color-btn-insight-border: #F5CAFC;
|
|
795
|
+
--color-btn-insight-border-low: #ECC2F2;
|
|
796
|
+
--color-btn-insight-disabled: #ffbb70;
|
|
797
|
+
--color-btn-insight-disabled-fg: #66635f;
|
|
798
|
+
|
|
775
799
|
--color-form-accent: #ffb64e;
|
|
776
800
|
--color-form-bg: var(--color-surface-normal);
|
|
777
801
|
--color-form-bg-hover: var(--color-surface-lower);
|
|
@@ -824,7 +848,7 @@
|
|
|
824
848
|
.Litho-Frame-Content.Litho-Frame-Content--InIframe iframe { z-index: 1900; }
|
|
825
849
|
.Litho-ModalContainer { z-index: 1800; }
|
|
826
850
|
.Litho-ModalOverlay { z-index: 1700; }
|
|
827
|
-
.Litho-Pane { z-index:
|
|
851
|
+
.Litho-Pane { z-index: 1600; }
|
|
828
852
|
.Litho-Logo.Litho-Logo--ModalOpen { z-index: 1600; }
|
|
829
853
|
.Litho-FrameSaveBar__Toggle { z-index: 1500; }
|
|
830
854
|
.Litho-FrameSaveBar { z-index: 1400; }
|
|
@@ -1153,4 +1177,51 @@
|
|
|
1153
1177
|
label {
|
|
1154
1178
|
@apply text-xxs! text-low!;
|
|
1155
1179
|
}
|
|
1180
|
+
}
|
|
1181
|
+
|
|
1182
|
+
.Litho-TabNavigation .scroll-container::-webkit-scrollbar-track {
|
|
1183
|
+
background-color: var(--color-surface-lowest);
|
|
1184
|
+
}
|
|
1185
|
+
.Litho-TabNavigation .scroll-container::-webkit-scrollbar-thumb {
|
|
1186
|
+
background-color: var(--color-edge-default);
|
|
1187
|
+
}
|
|
1188
|
+
.Litho-TabNavigation .scroll-container::-webkit-scrollbar-thumb:hover {
|
|
1189
|
+
background-color: var(--color-edge-dark);
|
|
1190
|
+
}
|
|
1191
|
+
.Litho-TabNavigation .scroll-container {
|
|
1192
|
+
scrollbar-width: thin;
|
|
1193
|
+
scrollbar-color: var(--color-edge-default) var(--color-surface-lowest);
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
.typing-indicator {
|
|
1197
|
+
color: currentColor;
|
|
1198
|
+
opacity: 0.6;
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
.typing-dot {
|
|
1202
|
+
opacity: 0.3;
|
|
1203
|
+
animation: typing-pulse 1s ease-in-out infinite;
|
|
1204
|
+
}
|
|
1205
|
+
|
|
1206
|
+
.typing-dot-1 {
|
|
1207
|
+
animation-delay: 0s;
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
.typing-dot-2 {
|
|
1211
|
+
animation-delay: 0.15s;
|
|
1212
|
+
}
|
|
1213
|
+
|
|
1214
|
+
.typing-dot-3 {
|
|
1215
|
+
animation-delay: 0.3s;
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
@keyframes typing-pulse {
|
|
1219
|
+
0%,
|
|
1220
|
+
60%,
|
|
1221
|
+
100% {
|
|
1222
|
+
opacity: 0.3;
|
|
1223
|
+
}
|
|
1224
|
+
30% {
|
|
1225
|
+
opacity: 1;
|
|
1226
|
+
}
|
|
1156
1227
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heymantle/litho",
|
|
3
3
|
"description": "Litho is a library of components for building Mantle extensions",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.13",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/esm/index.js",
|
|
7
7
|
"module": "./dist/esm/index.js",
|
|
@@ -92,4 +92,4 @@
|
|
|
92
92
|
"zx": "^8.7.1"
|
|
93
93
|
},
|
|
94
94
|
"license": "MIT"
|
|
95
|
-
}
|
|
95
|
+
}
|