@enigmax/primitives 0.22.0 → 0.24.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.
- package/dist/{chunk-QQFNAKMY.js → chunk-45UHLZYT.js} +1 -1
- package/dist/chunk-4VUHQFAT.js +130 -0
- package/dist/{chunk-D5A2ZMAG.js → chunk-4ZPMP47J.js} +6 -1
- package/dist/chunk-DZMHY3SU.js +777 -0
- package/dist/{chunk-FWVWX67R.js → chunk-FGBIZDV2.js} +3 -3
- package/dist/chunk-N6PDHMAX.js +213 -0
- package/dist/chunk-NONGREXC.js +248 -0
- package/dist/{chunk-R4ZAEE7V.js → chunk-QJJ34E4G.js} +34 -10
- package/dist/chunk-S2FPN5ID.js +115 -0
- package/dist/chunk-S7EE57YB.js +9 -0
- package/dist/chunk-VKL3DEIQ.js +804 -0
- package/dist/chunk-WSQC3PCC.js +466 -0
- package/dist/chunk-Z3VDE7OA.js +532 -0
- package/dist/clipboard-menu-B_ouitfS.d.ts +264 -0
- package/dist/color-D_rZ83Oc.d.ts +152 -0
- package/dist/color-OPV3BJV6.js +452 -0
- package/dist/{index-BHpOZncw.d.ts → index-ZPvlf9vs.d.ts} +53 -5
- package/dist/index.d.ts +6 -2
- package/dist/index.js +9 -4
- package/dist/keys-D2zJs1uB.d.ts +100 -0
- package/dist/next/index.d.ts +10 -3
- package/dist/next/index.js +22 -13
- package/dist/react/context-menu.d.ts +219 -0
- package/dist/react/context-menu.js +6 -0
- package/dist/react/index.d.ts +12 -5
- package/dist/react/index.js +21 -12
- package/dist/react/input.d.ts +3 -3
- package/dist/react/input.js +2 -1
- package/dist/react/palette.d.ts +1 -1
- package/dist/react/palette.js +3 -3
- package/dist/react/search.d.ts +1 -1
- package/dist/react/search.js +2 -2
- package/dist/react/select.d.ts +217 -0
- package/dist/react/select.js +7 -0
- package/dist/react/selection.d.ts +104 -0
- package/dist/react/selection.js +4 -0
- package/dist/react-router/index.d.ts +10 -3
- package/dist/react-router/index.js +22 -13
- package/dist/search/index.d.ts +2 -2
- package/dist/search/index.js +1 -1
- package/dist/{search-BD9-5O5U.d.ts → search-DYgqRp37.d.ts} +13 -1
- package/dist/{search-UQEXAPQB.js → search-PBZORZ7P.js} +1 -1
- package/dist/select-ClSy-J1f.d.ts +100 -0
- package/dist/selection-B_pmzHpy.d.ts +150 -0
- package/package.json +23 -2
- package/recipes/color/styles.css +143 -0
- package/recipes/context-menu/styles.css +185 -0
- package/recipes/input/styles.css +9 -0
- package/recipes/palette/styles.css +3 -0
- package/recipes/search/tailwind.tsx +3 -2
- package/recipes/select/styles.css +230 -0
- package/recipes/toast/styles.css +1 -1
- package/registry.json +432 -5
- package/src/core/clipboard-menu.ts +270 -0
- package/src/core/color.ts +248 -0
- package/src/core/context-menu.ts +694 -0
- package/src/core/keys.ts +264 -0
- package/src/core/search.ts +19 -0
- package/src/core/select.ts +404 -0
- package/src/core/selection.ts +648 -0
- package/src/index.ts +92 -1
- package/src/react/context-menu/context.ts +64 -0
- package/src/react/context-menu/index.tsx +108 -0
- package/src/react/context-menu/root.tsx +970 -0
- package/src/react/context-menu/styles.ts +194 -0
- package/src/react/index.ts +100 -1
- package/src/react/input/color-styles.ts +156 -0
- package/src/react/input/color.tsx +466 -0
- package/src/react/input/index.tsx +54 -6
- package/src/react/input/types.ts +59 -3
- package/src/react/palette/root.tsx +2 -2
- package/src/react/select/context.ts +56 -0
- package/src/react/select/index.tsx +96 -0
- package/src/react/select/root.tsx +839 -0
- package/src/react/select/styles.ts +238 -0
- package/src/react/selection/index.tsx +115 -0
- package/src/react/selection/use-selection.ts +260 -0
- package/dist/password-C8lG4Zm9.d.ts +0 -71
- /package/dist/{chunk-U3V4EHOB.js → chunk-MSOCCQGH.js} +0 -0
package/registry.json
CHANGED
|
@@ -156,7 +156,7 @@
|
|
|
156
156
|
{
|
|
157
157
|
"name": "input",
|
|
158
158
|
"title": "Input, one field for every type",
|
|
159
|
-
"description": "A field you pass props to, typed by its `type`: password gets the reveal toggle, a generator, a strength meter and a breach check; search gets debouncing, ranking and a clear button; everything else is a plain field with native props. What each type needs is loaded when that type is used, so a form of text fields ships none of it.",
|
|
159
|
+
"description": "A field you pass props to, typed by its `type`: password gets the reveal toggle, a generator, a strength meter and a breach check; search gets debouncing, ranking and a clear button; color gets a swatch and a picker panel - saturation square, hue and alpha rails, presets and the screen eyedropper - instead of the operating system popup; everything else is a plain field with native props. What each type needs is loaded when that type is used, so a form of text fields ships none of it.",
|
|
160
160
|
"targets": [
|
|
161
161
|
"vanilla",
|
|
162
162
|
"astro",
|
|
@@ -224,7 +224,8 @@
|
|
|
224
224
|
],
|
|
225
225
|
"rewrite": {
|
|
226
226
|
"@/core/search": "./search-core",
|
|
227
|
-
"@/core/password": "./password-core"
|
|
227
|
+
"@/core/password": "./password-core",
|
|
228
|
+
"@/core/color": "./color-core"
|
|
228
229
|
}
|
|
229
230
|
},
|
|
230
231
|
{
|
|
@@ -262,6 +263,43 @@
|
|
|
262
263
|
"@/core/search": "./search-core"
|
|
263
264
|
}
|
|
264
265
|
},
|
|
266
|
+
{
|
|
267
|
+
"path": "src/core/color.ts",
|
|
268
|
+
"dest": "input/color-core.ts",
|
|
269
|
+
"targets": [
|
|
270
|
+
"vanilla",
|
|
271
|
+
"astro",
|
|
272
|
+
"react"
|
|
273
|
+
]
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
"path": "src/react/input/color-styles.ts",
|
|
277
|
+
"dest": "input/color-styles.ts",
|
|
278
|
+
"targets": [
|
|
279
|
+
"react"
|
|
280
|
+
]
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"path": "src/react/input/color.tsx",
|
|
284
|
+
"dest": "input/color.tsx",
|
|
285
|
+
"targets": [
|
|
286
|
+
"react"
|
|
287
|
+
],
|
|
288
|
+
"rewrite": {
|
|
289
|
+
"@/core/color": "./color-core",
|
|
290
|
+
"@/react/input/write-value": "./write-value",
|
|
291
|
+
"@/react/input/color-styles": "./color-styles",
|
|
292
|
+
"@/react/input/types": "./types"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
"path": "recipes/color/styles.css",
|
|
297
|
+
"dest": "input/color.css",
|
|
298
|
+
"targets": [
|
|
299
|
+
"react"
|
|
300
|
+
],
|
|
301
|
+
"style": "css"
|
|
302
|
+
},
|
|
265
303
|
{
|
|
266
304
|
"path": "recipes/input/styles.css",
|
|
267
305
|
"dest": "input/styles.css",
|
|
@@ -286,7 +324,8 @@
|
|
|
286
324
|
"@/react/input/types": "./types",
|
|
287
325
|
"@/react/input/password": "./password",
|
|
288
326
|
"@/react/input/search": "./search",
|
|
289
|
-
"@/core/password": "./password-core"
|
|
327
|
+
"@/core/password": "./password-core",
|
|
328
|
+
"@/react/input/color": "./color"
|
|
290
329
|
}
|
|
291
330
|
},
|
|
292
331
|
{
|
|
@@ -322,7 +361,26 @@
|
|
|
322
361
|
"[data-enigma-password-strength-segment][data-filled]",
|
|
323
362
|
"[data-enigma-password-strength-label]",
|
|
324
363
|
"[data-enigma-password-strength-warning]",
|
|
325
|
-
"[data-enigma-input-action=clear]"
|
|
364
|
+
"[data-enigma-input-action=clear]",
|
|
365
|
+
"[data-enigma-color]",
|
|
366
|
+
"[data-enigma-color][data-open]",
|
|
367
|
+
"[data-enigma-color-swatch]",
|
|
368
|
+
"[data-enigma-color-swatch][data-invalid]",
|
|
369
|
+
"[data-enigma-color-checkers]",
|
|
370
|
+
"[data-enigma-color-fill]",
|
|
371
|
+
"[data-enigma-color-panel]",
|
|
372
|
+
"[data-enigma-color-panel][data-side=top]",
|
|
373
|
+
"[data-enigma-color-area]",
|
|
374
|
+
"[data-enigma-color-controls]",
|
|
375
|
+
"[data-enigma-color-rails]",
|
|
376
|
+
"[data-enigma-color-rail=hue]",
|
|
377
|
+
"[data-enigma-color-rail=alpha]",
|
|
378
|
+
"[data-enigma-color-gradient]",
|
|
379
|
+
"[data-enigma-color-thumb]",
|
|
380
|
+
"[data-enigma-color-preview]",
|
|
381
|
+
"[data-enigma-color-eyedropper]",
|
|
382
|
+
"[data-enigma-color-swatches]",
|
|
383
|
+
"[data-enigma-color-preset]"
|
|
326
384
|
],
|
|
327
385
|
"docs": "docs/notes/primitives.md#input",
|
|
328
386
|
"recipes": [
|
|
@@ -454,6 +512,13 @@
|
|
|
454
512
|
"react"
|
|
455
513
|
]
|
|
456
514
|
},
|
|
515
|
+
{
|
|
516
|
+
"path": "src/react/slot.tsx",
|
|
517
|
+
"dest": "button/slot.tsx",
|
|
518
|
+
"targets": [
|
|
519
|
+
"react"
|
|
520
|
+
]
|
|
521
|
+
},
|
|
457
522
|
{
|
|
458
523
|
"path": "src/react/button.tsx",
|
|
459
524
|
"dest": "button/index.tsx",
|
|
@@ -464,7 +529,8 @@
|
|
|
464
529
|
"rewrite": {
|
|
465
530
|
"@/core/button": "./button",
|
|
466
531
|
"@/react/use-button": "./use-button",
|
|
467
|
-
"@/react/link": "./link"
|
|
532
|
+
"@/react/link": "./link",
|
|
533
|
+
"@/react/slot": "./slot"
|
|
468
534
|
}
|
|
469
535
|
}
|
|
470
536
|
],
|
|
@@ -585,6 +651,367 @@
|
|
|
585
651
|
"css"
|
|
586
652
|
]
|
|
587
653
|
},
|
|
654
|
+
{
|
|
655
|
+
"name": "select",
|
|
656
|
+
"title": "Select",
|
|
657
|
+
"description": "A listbox that replaces the native select: icons and a second line on an option, rows that cannot be chosen, one value or many with removable tags, groups, a filter that appears on its own once the list is long enough (fuzzy with Fuse.js, plain without it), typeahead and the full keyboard, a hidden field so a plain form still posts it, and a long list rendered a window at a time. It brings its own theme - an unstyled popup is transparent text over the page rather than a plain-looking control.",
|
|
658
|
+
"targets": [
|
|
659
|
+
"react"
|
|
660
|
+
],
|
|
661
|
+
"entry": {
|
|
662
|
+
"react": "@enigmax/primitives/react/select"
|
|
663
|
+
},
|
|
664
|
+
"exports": {
|
|
665
|
+
"react": [
|
|
666
|
+
"Select",
|
|
667
|
+
"useSelectContext",
|
|
668
|
+
"createSelect"
|
|
669
|
+
]
|
|
670
|
+
},
|
|
671
|
+
"files": [
|
|
672
|
+
{
|
|
673
|
+
"path": "src/core/search.ts",
|
|
674
|
+
"dest": "select/search-core.ts",
|
|
675
|
+
"targets": [
|
|
676
|
+
"react"
|
|
677
|
+
]
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
"path": "src/core/palette.ts",
|
|
681
|
+
"dest": "select/rows.ts",
|
|
682
|
+
"targets": [
|
|
683
|
+
"react"
|
|
684
|
+
]
|
|
685
|
+
},
|
|
686
|
+
{
|
|
687
|
+
"path": "src/core/keys.ts",
|
|
688
|
+
"dest": "select/keys.ts",
|
|
689
|
+
"targets": [
|
|
690
|
+
"react"
|
|
691
|
+
]
|
|
692
|
+
},
|
|
693
|
+
{
|
|
694
|
+
"path": "src/core/select.ts",
|
|
695
|
+
"dest": "select/select.ts",
|
|
696
|
+
"targets": [
|
|
697
|
+
"react"
|
|
698
|
+
],
|
|
699
|
+
"rewrite": {
|
|
700
|
+
"@/core/search": "./search-core",
|
|
701
|
+
"@/core/keys": "./keys"
|
|
702
|
+
}
|
|
703
|
+
},
|
|
704
|
+
{
|
|
705
|
+
"path": "src/react/slot.tsx",
|
|
706
|
+
"dest": "select/slot.tsx",
|
|
707
|
+
"targets": [
|
|
708
|
+
"react"
|
|
709
|
+
]
|
|
710
|
+
},
|
|
711
|
+
{
|
|
712
|
+
"path": "src/react/select/styles.ts",
|
|
713
|
+
"dest": "select/styles.ts",
|
|
714
|
+
"targets": [
|
|
715
|
+
"react"
|
|
716
|
+
]
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
"path": "recipes/select/styles.css",
|
|
720
|
+
"dest": "select/styles.css",
|
|
721
|
+
"targets": [
|
|
722
|
+
"react"
|
|
723
|
+
],
|
|
724
|
+
"style": "css"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
"path": "src/react/select/context.ts",
|
|
728
|
+
"dest": "select/context.ts",
|
|
729
|
+
"targets": [
|
|
730
|
+
"react"
|
|
731
|
+
],
|
|
732
|
+
"rewrite": {
|
|
733
|
+
"@/core/select": "./select"
|
|
734
|
+
}
|
|
735
|
+
},
|
|
736
|
+
{
|
|
737
|
+
"path": "src/react/select/root.tsx",
|
|
738
|
+
"dest": "select/root.tsx",
|
|
739
|
+
"targets": [
|
|
740
|
+
"react"
|
|
741
|
+
],
|
|
742
|
+
"rewrite": {
|
|
743
|
+
"@/core/select": "./select",
|
|
744
|
+
"@/core/palette": "./rows",
|
|
745
|
+
"@/core/search": "./search-core",
|
|
746
|
+
"@/react/slot": "./slot",
|
|
747
|
+
"@/react/select/styles": "./styles",
|
|
748
|
+
"@/react/select/context": "./context"
|
|
749
|
+
}
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
"path": "src/react/select/index.tsx",
|
|
753
|
+
"dest": "select/index.tsx",
|
|
754
|
+
"main": true,
|
|
755
|
+
"targets": [
|
|
756
|
+
"react"
|
|
757
|
+
],
|
|
758
|
+
"rewrite": {
|
|
759
|
+
"@/react/select/root": "./root",
|
|
760
|
+
"@/react/select/context": "./context",
|
|
761
|
+
"@/react/select/styles": "./styles",
|
|
762
|
+
"@/core/select": "./select"
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
],
|
|
766
|
+
"styles": true,
|
|
767
|
+
"themeHooks": [
|
|
768
|
+
"[data-enigma-select-root]",
|
|
769
|
+
"[data-enigma-select-trigger]",
|
|
770
|
+
"[data-enigma-select-trigger][data-open]",
|
|
771
|
+
"[data-enigma-select-value][data-placeholder]",
|
|
772
|
+
"[data-enigma-select-tag]",
|
|
773
|
+
"[data-enigma-select-tag-remove]",
|
|
774
|
+
"[data-enigma-select-indicator]",
|
|
775
|
+
"[data-enigma-select-caret]",
|
|
776
|
+
"[data-enigma-select-clear]",
|
|
777
|
+
"[data-enigma-select-content]",
|
|
778
|
+
"[data-enigma-select-content][data-side=top]",
|
|
779
|
+
"[data-enigma-select-search]",
|
|
780
|
+
"[data-enigma-select-list]",
|
|
781
|
+
"[data-enigma-select-group-label]",
|
|
782
|
+
"[data-enigma-select-option]",
|
|
783
|
+
"[data-enigma-select-option][data-active]",
|
|
784
|
+
"[data-enigma-select-option][data-selected]",
|
|
785
|
+
"[data-enigma-select-option][data-disabled]",
|
|
786
|
+
"[data-enigma-select-option-label]",
|
|
787
|
+
"[data-enigma-select-option-description]",
|
|
788
|
+
"[data-enigma-select-icon]",
|
|
789
|
+
"[data-enigma-select-check]",
|
|
790
|
+
"[data-enigma-select-empty]"
|
|
791
|
+
],
|
|
792
|
+
"docs": "docs/notes/primitives.md#select",
|
|
793
|
+
"recipes": [
|
|
794
|
+
"css"
|
|
795
|
+
]
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "context-menu",
|
|
799
|
+
"title": "Context menu",
|
|
800
|
+
"description": "A right-click menu with the desktop's behaviour: submenus that open on a beat of hovering and survive a diagonal pointer, icons, a second line, shortcuts printed on the right, checkable and radio rows, separators and captions, destructive rows in red, an optional heading naming what it acts on, a filter once a level is long, a long level rendered a window at a time, and a submenu fetched on demand and cached. Opens at the pointer, on a long press, and on Shift+F10. Copy, Cut and Paste are built from whatever was right-clicked and are on by default, because the browser menu this one replaces has them. A menu with no rows does not open at all. It brings its own theme - an unstyled popup is transparent text over the page rather than a plain-looking control.",
|
|
801
|
+
"targets": [
|
|
802
|
+
"react"
|
|
803
|
+
],
|
|
804
|
+
"entry": {
|
|
805
|
+
"react": "@enigmax/primitives/react/context-menu"
|
|
806
|
+
},
|
|
807
|
+
"exports": {
|
|
808
|
+
"react": [
|
|
809
|
+
"ContextMenu",
|
|
810
|
+
"useContextMenuContext",
|
|
811
|
+
"createContextMenu"
|
|
812
|
+
]
|
|
813
|
+
},
|
|
814
|
+
"files": [
|
|
815
|
+
{
|
|
816
|
+
"path": "src/core/search.ts",
|
|
817
|
+
"dest": "context-menu/search-core.ts",
|
|
818
|
+
"targets": [
|
|
819
|
+
"react"
|
|
820
|
+
]
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"path": "src/core/keys.ts",
|
|
824
|
+
"dest": "context-menu/keys.ts",
|
|
825
|
+
"targets": [
|
|
826
|
+
"react"
|
|
827
|
+
]
|
|
828
|
+
},
|
|
829
|
+
{
|
|
830
|
+
"path": "src/core/context-menu.ts",
|
|
831
|
+
"dest": "context-menu/context-menu.ts",
|
|
832
|
+
"targets": [
|
|
833
|
+
"react"
|
|
834
|
+
],
|
|
835
|
+
"rewrite": {
|
|
836
|
+
"@/core/search": "./search-core",
|
|
837
|
+
"@/core/keys": "./keys"
|
|
838
|
+
}
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
"path": "src/core/clipboard-menu.ts",
|
|
842
|
+
"dest": "context-menu/clipboard-menu.ts",
|
|
843
|
+
"targets": [
|
|
844
|
+
"react"
|
|
845
|
+
],
|
|
846
|
+
"rewrite": {
|
|
847
|
+
"@/core/context-menu": "./context-menu"
|
|
848
|
+
}
|
|
849
|
+
},
|
|
850
|
+
{
|
|
851
|
+
"path": "src/react/slot.tsx",
|
|
852
|
+
"dest": "context-menu/slot.tsx",
|
|
853
|
+
"targets": [
|
|
854
|
+
"react"
|
|
855
|
+
]
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
"path": "src/react/context-menu/styles.ts",
|
|
859
|
+
"dest": "context-menu/styles.ts",
|
|
860
|
+
"targets": [
|
|
861
|
+
"react"
|
|
862
|
+
]
|
|
863
|
+
},
|
|
864
|
+
{
|
|
865
|
+
"path": "recipes/context-menu/styles.css",
|
|
866
|
+
"dest": "context-menu/styles.css",
|
|
867
|
+
"targets": [
|
|
868
|
+
"react"
|
|
869
|
+
],
|
|
870
|
+
"style": "css"
|
|
871
|
+
},
|
|
872
|
+
{
|
|
873
|
+
"path": "src/react/context-menu/context.ts",
|
|
874
|
+
"dest": "context-menu/context.ts",
|
|
875
|
+
"targets": [
|
|
876
|
+
"react"
|
|
877
|
+
],
|
|
878
|
+
"rewrite": {
|
|
879
|
+
"@/core/context-menu": "./context-menu"
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
"path": "src/react/context-menu/root.tsx",
|
|
884
|
+
"dest": "context-menu/root.tsx",
|
|
885
|
+
"targets": [
|
|
886
|
+
"react"
|
|
887
|
+
],
|
|
888
|
+
"rewrite": {
|
|
889
|
+
"@/core/context-menu": "./context-menu",
|
|
890
|
+
"@/core/search": "./search-core",
|
|
891
|
+
"@/core/keys": "./keys",
|
|
892
|
+
"@/react/slot": "./slot",
|
|
893
|
+
"@/react/context-menu/styles": "./styles",
|
|
894
|
+
"@/react/context-menu/context": "./context",
|
|
895
|
+
"@/core/clipboard-menu": "./clipboard-menu"
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
{
|
|
899
|
+
"path": "src/react/context-menu/index.tsx",
|
|
900
|
+
"dest": "context-menu/index.tsx",
|
|
901
|
+
"main": true,
|
|
902
|
+
"targets": [
|
|
903
|
+
"react"
|
|
904
|
+
],
|
|
905
|
+
"rewrite": {
|
|
906
|
+
"@/react/context-menu/root": "./root",
|
|
907
|
+
"@/react/context-menu/context": "./context",
|
|
908
|
+
"@/react/context-menu/styles": "./styles",
|
|
909
|
+
"@/core/context-menu": "./context-menu",
|
|
910
|
+
"@/core/keys": "./keys",
|
|
911
|
+
"@/core/clipboard-menu": "./clipboard-menu"
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
],
|
|
915
|
+
"styles": true,
|
|
916
|
+
"themeHooks": [
|
|
917
|
+
"[data-enigma-menu-trigger]",
|
|
918
|
+
"[data-enigma-menu-panel]",
|
|
919
|
+
"[data-enigma-menu-panel][data-placed]",
|
|
920
|
+
"[data-enigma-menu-title]",
|
|
921
|
+
"[data-enigma-menu-search]",
|
|
922
|
+
"[data-enigma-menu-list]",
|
|
923
|
+
"[data-enigma-menu-item]",
|
|
924
|
+
"[data-enigma-menu-item][data-active]",
|
|
925
|
+
"[data-enigma-menu-item][data-disabled]",
|
|
926
|
+
"[data-enigma-menu-item][data-destructive]",
|
|
927
|
+
"[data-enigma-menu-item][data-submenu]",
|
|
928
|
+
"[data-enigma-menu-item-label]",
|
|
929
|
+
"[data-enigma-menu-item-description]",
|
|
930
|
+
"[data-enigma-menu-icon]",
|
|
931
|
+
"[data-enigma-menu-shortcut]",
|
|
932
|
+
"[data-enigma-menu-arrow]",
|
|
933
|
+
"[data-enigma-menu-check]",
|
|
934
|
+
"[data-enigma-menu-separator]",
|
|
935
|
+
"[data-enigma-menu-label]",
|
|
936
|
+
"[data-enigma-menu-status]",
|
|
937
|
+
"[data-enigma-menu-status][data-error]"
|
|
938
|
+
],
|
|
939
|
+
"docs": "docs/notes/primitives.md#context-menu",
|
|
940
|
+
"recipes": [
|
|
941
|
+
"css"
|
|
942
|
+
]
|
|
943
|
+
},
|
|
944
|
+
{
|
|
945
|
+
"name": "selection",
|
|
946
|
+
"title": "Selection list",
|
|
947
|
+
"description": "The file-manager selection model as a headless list: a plain click replaces, Ctrl toggles, Shift takes the range from the anchor, Ctrl+Shift adds that range, Ctrl+A takes everything and Escape drops it, with a rubber band over empty space and arrow keys that move a cursor and extend with Shift. Delete, F2, Enter, copy, cut and paste are reported as commands rather than performed. Every binding can be rebound, removed one at a time, or turned off altogether, and a binding of your own is matched and reported the same way. Ships no styles: state arrives as data attributes.",
|
|
948
|
+
"targets": [
|
|
949
|
+
"react"
|
|
950
|
+
],
|
|
951
|
+
"entry": {
|
|
952
|
+
"react": "@enigmax/primitives/react/selection"
|
|
953
|
+
},
|
|
954
|
+
"exports": {
|
|
955
|
+
"react": [
|
|
956
|
+
"SelectionList",
|
|
957
|
+
"useSelection",
|
|
958
|
+
"createSelection"
|
|
959
|
+
]
|
|
960
|
+
},
|
|
961
|
+
"files": [
|
|
962
|
+
{
|
|
963
|
+
"path": "src/core/keys.ts",
|
|
964
|
+
"dest": "selection/keys.ts",
|
|
965
|
+
"targets": [
|
|
966
|
+
"react"
|
|
967
|
+
]
|
|
968
|
+
},
|
|
969
|
+
{
|
|
970
|
+
"path": "src/core/selection.ts",
|
|
971
|
+
"dest": "selection/selection.ts",
|
|
972
|
+
"targets": [
|
|
973
|
+
"react"
|
|
974
|
+
],
|
|
975
|
+
"rewrite": {
|
|
976
|
+
"@/core/keys": "./keys"
|
|
977
|
+
}
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"path": "src/react/selection/use-selection.ts",
|
|
981
|
+
"dest": "selection/use-selection.ts",
|
|
982
|
+
"targets": [
|
|
983
|
+
"react"
|
|
984
|
+
],
|
|
985
|
+
"rewrite": {
|
|
986
|
+
"@/core/selection": "./selection"
|
|
987
|
+
}
|
|
988
|
+
},
|
|
989
|
+
{
|
|
990
|
+
"path": "src/react/selection/index.tsx",
|
|
991
|
+
"dest": "selection/index.tsx",
|
|
992
|
+
"main": true,
|
|
993
|
+
"targets": [
|
|
994
|
+
"react"
|
|
995
|
+
],
|
|
996
|
+
"rewrite": {
|
|
997
|
+
"@/react/selection/use-selection": "./use-selection",
|
|
998
|
+
"@/core/selection": "./selection",
|
|
999
|
+
"@/core/keys": "./keys"
|
|
1000
|
+
}
|
|
1001
|
+
}
|
|
1002
|
+
],
|
|
1003
|
+
"styles": false,
|
|
1004
|
+
"themeHooks": [
|
|
1005
|
+
"[data-enigma-selection-list]",
|
|
1006
|
+
"[data-enigma-selection-item]",
|
|
1007
|
+
"[data-enigma-selection-item][data-selected]",
|
|
1008
|
+
"[data-enigma-selection-item][data-cursor]",
|
|
1009
|
+
"[data-enigma-selection-item][data-disabled]",
|
|
1010
|
+
"[data-enigma-selection-marquee]",
|
|
1011
|
+
"[data-enigma-selection-empty]"
|
|
1012
|
+
],
|
|
1013
|
+
"docs": "docs/notes/primitives.md#selection"
|
|
1014
|
+
},
|
|
588
1015
|
{
|
|
589
1016
|
"name": "flags",
|
|
590
1017
|
"title": "Country flags",
|