@chocbite/ts-lib-ui 1.0.6 → 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 (63) hide show
  1. package/AGENTS.md +164 -3
  2. package/SOURCE.md +2000 -268
  3. package/base/index.d.mts +1 -1
  4. package/base/index.mjs +7 -7
  5. package/base/index.mjs.map +1 -1
  6. package/canvas/index.d.mts +1 -1
  7. package/canvas/index.mjs +8 -8
  8. package/canvas/index.mjs.map +1 -1
  9. package/context-menu/index.d.mts +2 -2
  10. package/context-menu/index.mjs +1 -1
  11. package/{context-menu-Bo8R6DmK.mjs → context-menu-DE3EUtY8.mjs} +149 -111
  12. package/context-menu-DE3EUtY8.mjs.map +1 -0
  13. package/document/index.mjs +1 -1
  14. package/document/index.mjs.map +1 -1
  15. package/dom/index.mjs +1 -1
  16. package/dom/index.mjs.map +1 -1
  17. package/form/index.d.mts +6 -5
  18. package/form/index.mjs +30 -29
  19. package/form/index.mjs.map +1 -1
  20. package/icons/index.d.mts +1 -1
  21. package/icons/index.mjs +1 -1
  22. package/{icons-e2J_Ojic.mjs → icons-B88i-7MC.mjs} +2 -2
  23. package/{index-ClIBfrHy.d.mts → index-BDWg5GX2.d.mts} +2 -2
  24. package/{index-ClfL2SQR.d.mts → index-CvzH3M_5.d.mts} +2 -2
  25. package/index-Cw4AcuUl.d.mts +371 -0
  26. package/{index-Pr2sLv9e.d.mts → index-YNZjMIO7.d.mts} +33 -17
  27. package/keyboard/index.d.mts +1 -1
  28. package/keyboard/index.mjs +12 -12
  29. package/keyboard/index.mjs.map +1 -1
  30. package/list/index.d.mts +2 -2
  31. package/list/index.mjs +1 -1
  32. package/list-D08epOjk.mjs +1566 -0
  33. package/list-D08epOjk.mjs.map +1 -0
  34. package/package.json +5 -80
  35. package/selection/index.mjs +1 -1
  36. package/selection/index.mjs.map +1 -1
  37. package/settings/index.mjs +1 -1
  38. package/settings/index.mjs.map +1 -1
  39. package/spinner/index.d.mts +1 -1
  40. package/spinner/index.mjs +3 -3
  41. package/spinner/index.mjs.map +1 -1
  42. package/state_ui/index.mjs +1 -1
  43. package/{state_ui-Bm3TeKNL.mjs → state_ui-Dtm2y5RU.mjs} +3 -3
  44. package/state_ui-Dtm2y5RU.mjs.map +1 -0
  45. package/style.css +307 -63
  46. package/svg/index.d.mts +1 -1
  47. package/svg/index.mjs +1 -1
  48. package/{svg-1bp-yIPC.mjs → svg-Yz7elqnU.mjs} +16 -16
  49. package/svg-Yz7elqnU.mjs.map +1 -0
  50. package/test/index.d.mts +1 -1
  51. package/test/index.mjs +1 -1
  52. package/test/index.mjs.map +1 -1
  53. package/theme/index.d.mts +1 -1
  54. package/theme/index.mjs +1 -1
  55. package/{theme-DgVtLDzP.mjs → theme-BJS5z1iW.mjs} +9 -9
  56. package/theme-BJS5z1iW.mjs.map +1 -0
  57. package/context-menu-Bo8R6DmK.mjs.map +0 -1
  58. package/index-BTUFkF9s.d.mts +0 -173
  59. package/list-DOXIQOEY.mjs +0 -715
  60. package/list-DOXIQOEY.mjs.map +0 -1
  61. package/state_ui-Bm3TeKNL.mjs.map +0 -1
  62. package/svg-1bp-yIPC.mjs.map +0 -1
  63. package/theme-DgVtLDzP.mjs.map +0 -1
@@ -1,6 +1,6 @@
1
1
  import "./style.css";
2
2
  import state from "@chocbite/ts-lib/state";
3
- // src/state_ui/array.ts
3
+ // state_ui/array.ts
4
4
  /**Applies an array to the child nodes of a parent, one node per value.
5
5
  * Arrays from array states carry what changed, so only the changed nodes are touched,
6
6
  * a plain array is applied as a whole, reusing existing nodes when update is given.
@@ -74,7 +74,7 @@ const ARRAY_UI = {
74
74
  * @param array new value of the array
75
75
  * @param handlers make, update and remove the nodes*/
76
76
  apply };
77
- // src/state_ui/index.ts
77
+ // state_ui/index.ts
78
78
  /**Shows states of @chocbite/ts-lib/state in the document*/
79
79
  const state_ui = {
80
80
  /**Array states, applies arrays to child nodes*/
@@ -84,4 +84,4 @@ const state_ui = {
84
84
  };
85
85
  export { state_ui as t };
86
86
 
87
- //# sourceMappingURL=state_ui-Bm3TeKNL.mjs.map
87
+ //# sourceMappingURL=state_ui-Dtm2y5RU.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"state_ui-Dtm2y5RU.mjs","names":[],"sources":["../../package-ui/state_ui/array.ts","../../package-ui/state_ui/index.ts"],"sourcesContent":["import state from \"@chocbite/ts-lib/state\";\n\n/**How the nodes for the values of an array are made, updated and removed*/\nexport interface StateUIArrayApplyHandlers<T, N extends ChildNode> {\n /**Gives the node for a value*/\n create: (value: T) => N;\n /**Updates a node to a new value, when given nodes are reused, otherwise nodes of changed values are replaced*/\n update?: (node: N, value: T) => void;\n /**Called for every node that is removed or replaced*/\n destroy?: (node: N) => void;\n}\n\n/**Applies an array to the child nodes of a parent, one node per value.\n * Arrays from array states carry what changed, so only the changed nodes are touched,\n * a plain array is applied as a whole, reusing existing nodes when update is given.\n * @param parent node holding the nodes for the array, it must contain nothing else\n * @param array new value of the array\n * @param handlers make, update and remove the nodes*/\nfunction apply<T, N extends ChildNode>(\n parent: ParentNode,\n array: readonly T[],\n handlers: StateUIArrayApplyHandlers<T, N>,\n): void {\n const { create, update, destroy } = handlers;\n //Live list, it follows every change made below\n const nodes = parent.childNodes as NodeListOf<N>;\n const remove = (node: N) => {\n destroy?.(node);\n node.remove();\n };\n for (const change of state.a.read(array)) {\n switch (change.type) {\n case \"fresh\": {\n if (update) {\n const reused = Math.min(nodes.length, change.items.length);\n for (let i = 0; i < reused; i++) update(nodes[i], change.items[i]);\n while (nodes.length > change.items.length)\n remove(nodes[nodes.length - 1]);\n parent.append(...change.items.slice(reused).map((v) => create(v)));\n } else {\n if (destroy) for (const node of [...nodes]) destroy(node);\n parent.replaceChildren(...change.items.map((v) => create(v)));\n }\n break;\n }\n case \"added\": {\n const created = change.items.map((v) => create(v));\n const next = nodes[change.index];\n if (next) next.before(...created);\n else parent.append(...created);\n break;\n }\n case \"removed\":\n for (let i = 0; i < change.items.length; i++) {\n const node = nodes[change.index];\n if (node) remove(node);\n }\n break;\n case \"changed\":\n for (let i = 0; i < change.items.length; i++) {\n const node = nodes[change.index + i];\n if (!node) continue;\n if (update) update(node, change.items[i]);\n else {\n destroy?.(node);\n node.replaceWith(create(change.items[i]));\n }\n }\n break;\n case \"moved\": {\n const moved: N[] = [];\n //Every removal moves the next node to from_index\n for (let i = 0; i < change.items.length; i++) {\n const node = nodes[change.from_index];\n if (!node) break;\n moved.push(node);\n node.remove();\n }\n const next = nodes[change.to_index];\n if (next) next.before(...moved);\n else parent.append(...moved);\n break;\n }\n }\n }\n}\n\n/**Array states shown in the document*/\nexport const ARRAY_UI = {\n /**Applies an array to the child nodes of a parent, one node per value.\n * Arrays from array states carry what changed, so only the changed nodes are touched,\n * a plain array is applied as a whole, reusing existing nodes when update is given.\n * @param parent node holding the nodes for the array, it must contain nothing else\n * @param array new value of the array\n * @param handlers make, update and remove the nodes*/\n apply,\n};\n","import { ARRAY_UI } from \"./array\";\n\n/**Shows states of @chocbite/ts-lib/state in the document*/\nexport const state_ui = {\n //The \"as typeof\" casts make the declaration output reference the helper objects instead of inlining\n //their types, inlining would drop the doc comments on their members\n /* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */\n /**Array states, applies arrays to child nodes*/\n a: ARRAY_UI as typeof ARRAY_UI,\n /**Array states, applies arrays to child nodes*/\n array: ARRAY_UI as typeof ARRAY_UI,\n /* eslint-enable @typescript-eslint/no-unnecessary-type-assertion */\n};\nexport default state_ui;\n\nexport type { StateUIArrayApplyHandlers } from \"./array\";\n"],"mappings":";;;;;;;;;AAkBA,SAAS,MACP,QACA,OACA,UACM;CACN,MAAM,EAAE,QAAQ,QAAQ,YAAY;CAEpC,MAAM,QAAQ,OAAO;CACrB,MAAM,UAAU,SAAY;EAC1B,UAAU,IAAI;EACd,KAAK,OAAO;CACd;CACA,KAAK,MAAM,UAAU,MAAM,EAAE,KAAK,KAAK,GACrC,QAAQ,OAAO,MAAf;EACE,KAAK;GACH,IAAI,QAAQ;IACV,MAAM,SAAS,KAAK,IAAI,MAAM,QAAQ,OAAO,MAAM,MAAM;IACzD,KAAK,IAAI,IAAI,GAAG,IAAI,QAAQ,KAAK,OAAO,MAAM,IAAI,OAAO,MAAM,EAAE;IACjE,OAAO,MAAM,SAAS,OAAO,MAAM,QACjC,OAAO,MAAM,MAAM,SAAS,EAAE;IAChC,OAAO,OAAO,GAAG,OAAO,MAAM,MAAM,MAAM,CAAC,CAAC,KAAK,MAAM,OAAO,CAAC,CAAC,CAAC;GACnE,OAAO;IACL,IAAI,SAAS,KAAK,MAAM,QAAQ,CAAC,GAAG,KAAK,GAAG,QAAQ,IAAI;IACxD,OAAO,gBAAgB,GAAG,OAAO,MAAM,KAAK,MAAM,OAAO,CAAC,CAAC,CAAC;GAC9D;GACA;EAEF,KAAK,SAAS;GACZ,MAAM,UAAU,OAAO,MAAM,KAAK,MAAM,OAAO,CAAC,CAAC;GACjD,MAAM,OAAO,MAAM,OAAO;GAC1B,IAAI,MAAM,KAAK,OAAO,GAAG,OAAO;QAC3B,OAAO,OAAO,GAAG,OAAO;GAC7B;EACF;EACA,KAAK;GACH,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,QAAQ,KAAK;IAC5C,MAAM,OAAO,MAAM,OAAO;IAC1B,IAAI,MAAM,OAAO,IAAI;GACvB;GACA;EACF,KAAK;GACH,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,QAAQ,KAAK;IAC5C,MAAM,OAAO,MAAM,OAAO,QAAQ;IAClC,IAAI,CAAC,MAAM;IACX,IAAI,QAAQ,OAAO,MAAM,OAAO,MAAM,EAAE;SACnC;KACH,UAAU,IAAI;KACd,KAAK,YAAY,OAAO,OAAO,MAAM,EAAE,CAAC;IAC1C;GACF;GACA;EACF,KAAK,SAAS;GACZ,MAAM,QAAa,CAAC;GAEpB,KAAK,IAAI,IAAI,GAAG,IAAI,OAAO,MAAM,QAAQ,KAAK;IAC5C,MAAM,OAAO,MAAM,OAAO;IAC1B,IAAI,CAAC,MAAM;IACX,MAAM,KAAK,IAAI;IACf,KAAK,OAAO;GACd;GACA,MAAM,OAAO,MAAM,OAAO;GAC1B,IAAI,MAAM,KAAK,OAAO,GAAG,KAAK;QACzB,OAAO,OAAO,GAAG,KAAK;GAC3B;EACF;CACF;AAEJ;;AAGA,MAAa,WAAW;;;;;;;AAOtB,MACF;;;AC7FA,MAAa,WAAW;;CAKtB,GAAG;;CAEH,OAAO;AAET"}
package/style.css CHANGED
@@ -2697,20 +2697,6 @@ contextmenu-option .shortcut {
2697
2697
  contextmenu-option .checkmark {
2698
2698
  text-align: center;
2699
2699
  }
2700
- contextmenu-container {
2701
- display: block;
2702
- z-index: 999999999;
2703
- position: fixed;
2704
- pointer-events: none;
2705
- touch-action: none;
2706
- top: 0;
2707
- left: 0;
2708
- width: 100vw;
2709
- height: 100vh;
2710
- }
2711
- html {
2712
- overflow: auto;
2713
- }
2714
2700
  contextmenu-buffer {
2715
2701
  display: table-row;
2716
2702
  height: 1.8rem;
@@ -2761,6 +2747,17 @@ contextmenu-buffer > * {
2761
2747
  contextmenu-buffer > * > svg {
2762
2748
  fill: var(--contextmenu-hoverText);
2763
2749
  }
2750
+ contextmenu-container {
2751
+ display: block;
2752
+ z-index: 999999999;
2753
+ position: fixed;
2754
+ pointer-events: none;
2755
+ touch-action: none;
2756
+ top: 0;
2757
+ left: 0;
2758
+ width: 100vw;
2759
+ height: 100vh;
2760
+ }
2764
2761
  contextmenu-menu {
2765
2762
  display: block;
2766
2763
  position: fixed;
@@ -2901,21 +2898,19 @@ contextmenu-submenu .chevron > svg {
2901
2898
  .touch contextmenu-submenu .chevron > svg {
2902
2899
  width: 2.6rem;
2903
2900
  }
2901
+ html {
2902
+ overflow: auto;
2903
+ }
2904
2904
  list-addrow {
2905
2905
  display: contents;
2906
2906
  }
2907
- list-addrow[inert] > span {
2907
+ list-addrow[inert] span.add {
2908
2908
  opacity: 0.6;
2909
2909
  pointer-events: none;
2910
2910
  }
2911
- list-addrow > span {
2911
+ list-addrow span.add {
2912
2912
  color: var(--list-colors-text-add);
2913
2913
  grid-column: 1/-1;
2914
- }
2915
- list-container > div.sub-rows list-addrow > span {
2916
- grid-column: 2/-1;
2917
- }
2918
- list-addrow > span {
2919
2914
  display: flex;
2920
2915
  align-items: center;
2921
2916
  justify-content: center;
@@ -2929,19 +2924,19 @@ list-addrow > span {
2929
2924
  min-height: var(--list-size-add_min);
2930
2925
  outline: none;
2931
2926
  }
2932
- .touch list-addrow > span {
2927
+ .touch list-addrow span.add {
2933
2928
  min-height: var(--list-size-touch_add_min);
2934
2929
  }
2935
- list-addrow > span:focus-visible {
2930
+ list-addrow span.add:focus-visible {
2936
2931
  outline: 2px solid var(--list-colors-focus-normal);
2937
2932
  }
2938
- list-addrow > span:hover {
2933
+ list-addrow span.add:hover {
2939
2934
  background-color: var(--list-colors-background-row_hover);
2940
2935
  }
2941
- list-addrow > span:active {
2936
+ list-addrow span.add:active {
2942
2937
  box-shadow: 0 0rem 0.2rem 0rem var(--list-colors-border-header);
2943
2938
  }
2944
- list-addrow > span svg {
2939
+ list-addrow span.add svg {
2945
2940
  fill: var(--list-colors-icon-add_icon);
2946
2941
  height: 1.2em;
2947
2942
  width: auto;
@@ -2949,11 +2944,35 @@ list-addrow > span svg {
2949
2944
  }
2950
2945
  list-keyfield {
2951
2946
  --list-row-size: var(--list-size-row_min);
2947
+ --list-key-indent: calc(var(--list-row-size) / 2);
2948
+ --list-key-indent-space: calc(var(--list-row-size) / 2 - 0.1rem);
2949
+ --list-key-opener: var(--list-row-size);
2950
+ --list-key-icon: calc(var(--list-row-size) - 0.4rem);
2952
2951
  }
2953
2952
  .touch list-keyfield {
2954
2953
  --list-row-size: var(--list-size-touch_row_min);
2954
+ --list-key-indent: calc(var(--list-row-size) / 2 - 0.3rem + 1.5px);
2955
+ --list-key-indent-space: calc(var(--list-row-size) / 2 - 0.4rem);
2956
+ --list-key-opener: calc(var(--list-row-size) - 0.4rem);
2957
+ --list-key-icon: calc(var(--list-row-size) - 1.1rem);
2958
+ }
2959
+ list-keyfield {
2960
+ --list-key-min-icon: 0px;
2961
+ --list-key-min-text: 0px;
2962
+ }
2963
+ list-keyfield.has-icon {
2964
+ --list-key-min-icon: calc(var(--list-key-icon) + 0.5rem);
2965
+ }
2966
+ list-keyfield.has-text, list-keyfield.tail {
2967
+ --list-key-min-text: 4rem;
2955
2968
  }
2956
2969
  list-keyfield {
2970
+ --list-key-min: calc(
2971
+ var(--list-key-depth) *
2972
+ (var(--list-key-indent) + 1px + var(--list-key-indent-space)) +
2973
+ var(--list-key-opener) + var(--list-key-min-icon) +
2974
+ var(--list-key-min-text) + 1px
2975
+ );
2957
2976
  position: sticky;
2958
2977
  left: 0;
2959
2978
  display: flex;
@@ -2963,7 +2982,7 @@ list-keyfield {
2963
2982
  border-right: 1px solid var(--list-colors-border-column);
2964
2983
  background-color: var(--list-colors-background-row_odd);
2965
2984
  }
2966
- list-keyfield:focus-visible::before {
2985
+ list-keyfield:focus-visible:not(.click-focus)::before {
2967
2986
  content: "";
2968
2987
  position: absolute;
2969
2988
  width: 100%;
@@ -2973,34 +2992,35 @@ list-keyfield:focus-visible::before {
2973
2992
  z-index: 1;
2974
2993
  pointer-events: none;
2975
2994
  }
2995
+ list-row.open > div > list-keyfield {
2996
+ background-image: linear-gradient(var(--list-colors-border-column), var(--list-colors-border-column));
2997
+ background-repeat: no-repeat;
2998
+ background-size: 1px 50%;
2999
+ background-position: calc((var(--list-key-depth) + 1) * (var(--list-key-indent) + 1px + var(--list-key-indent-space)) + var(--list-key-opener) / 2) 100%;
3000
+ }
2976
3001
  list-keyfield > div {
2977
- width: calc(var(--list-row-size) / 2);
2978
- margin-right: calc(var(--list-row-size) / 2 - 0.1rem);
3002
+ flex-shrink: 0;
3003
+ width: var(--list-key-indent);
3004
+ margin-right: var(--list-key-indent-space);
2979
3005
  height: 100%;
2980
3006
  position: relative;
2981
3007
  border-right: 1px solid;
2982
3008
  }
2983
- .touch list-keyfield > div {
2984
- width: calc(var(--list-row-size) / 2 - 0.3rem + 1.5px);
2985
- margin-right: calc(var(--list-row-size) / 2 - 0.4rem);
2986
- }
2987
- list-keyfield.openable > span > div {
3009
+ list-keyfield.openable > span.opener > div {
2988
3010
  display: block;
2989
3011
  }
2990
- list-keyfield > span {
3012
+ list-keyfield > span.opener {
2991
3013
  position: relative;
3014
+ flex-shrink: 0;
2992
3015
  display: flex;
2993
3016
  align-items: center;
2994
3017
  justify-content: flex-start;
2995
3018
  height: 100%;
2996
3019
  min-height: var(--list-row-size);
2997
3020
  background-color: inherit;
2998
- width: var(--list-row-size);
3021
+ width: var(--list-key-opener);
2999
3022
  }
3000
- .touch list-keyfield > span {
3001
- width: calc(var(--list-row-size) - 0.4rem);
3002
- }
3003
- list-keyfield > span::before {
3023
+ list-keyfield > span.opener::before {
3004
3024
  content: "";
3005
3025
  display: block;
3006
3026
  position: absolute;
@@ -3010,20 +3030,20 @@ list-keyfield > span::before {
3010
3030
  top: 0;
3011
3031
  border-right: 1px solid var(--list-colors-border-column);
3012
3032
  }
3013
- list-addrow > list-keyfield > span::before, list-rowserror > list-keyfield > span::before, list-row:not(.addrow) > span > list-row:last-child > * > list-keyfield > span::before, div:not(.addrow) > div > list-row:last-child > * > list-keyfield > span::before {
3014
- height: calc(var(--list-row-size) / 2);
3033
+ list-addrow > list-keyfield > span.opener::before, list-rowserror > list-keyfield > span.opener::before, list-row:not(.addrow) > span > list-row:last-child > * > list-keyfield > span.opener::before, div:not(.addrow) > div > list-row:last-child > * > list-keyfield > span.opener::before {
3034
+ height: 50%;
3015
3035
  }
3016
- list-keyfield > span::after {
3036
+ list-keyfield > span.opener::after {
3017
3037
  content: "";
3018
3038
  display: block;
3019
3039
  position: absolute;
3020
- height: calc(var(--list-row-size) / 2);
3040
+ height: 50%;
3021
3041
  width: 50%;
3022
3042
  top: 0;
3023
3043
  left: 50%;
3024
3044
  border-bottom: 1px solid var(--list-colors-border-column);
3025
3045
  }
3026
- list-keyfield > span > div {
3046
+ list-keyfield > span.opener > div {
3027
3047
  font-family: "Material Symbols Rounded";
3028
3048
  font-weight: normal;
3029
3049
  font-style: normal;
@@ -3043,18 +3063,18 @@ list-keyfield > span > div {
3043
3063
  z-index: 1;
3044
3064
  background-color: inherit;
3045
3065
  }
3046
- .touch list-keyfield > span > div {
3066
+ .touch list-keyfield > span.opener > div {
3047
3067
  height: calc(var(--list-row-size) - 1.2rem);
3048
3068
  width: calc(var(--list-row-size) - 1.4rem);
3049
3069
  margin-left: 0.6rem;
3050
3070
  }
3051
- list-row.open > * > list-keyfield > span > div::before {
3071
+ list-row.open > * > list-keyfield > span.opener > div::before {
3052
3072
  content: "\e313";
3053
3073
  }
3054
- list-keyfield > span > div:hover::before {
3074
+ list-keyfield > span.opener > div:hover::before {
3055
3075
  background-color: var(--list-colors-focus-normal);
3056
3076
  }
3057
- list-keyfield > span > div::before {
3077
+ list-keyfield > span.opener > div::before {
3058
3078
  font-family: "Material Symbols Rounded";
3059
3079
  font-weight: normal;
3060
3080
  font-style: normal;
@@ -3076,27 +3096,121 @@ list-keyfield > span > div::before {
3076
3096
  font-size: 1.2rem;
3077
3097
  line-height: 0rem;
3078
3098
  }
3079
- .touch list-keyfield > span > div::before {
3099
+ .touch list-keyfield > span.opener > div::before {
3080
3100
  inset: -0.4rem;
3081
3101
  font-size: 2rem;
3082
3102
  }
3083
- list-keyfield svg {
3103
+ list-keyfield > span.text {
3104
+ display: flex;
3105
+ align-self: center;
3106
+ align-items: center;
3107
+ min-width: 0;
3108
+ color: var(--list-colors-text-key_field);
3109
+ padding: 0 0.25rem;
3110
+ min-height: var(--list-row-size);
3111
+ background-color: inherit;
3112
+ }
3113
+ list-keyfield > svg {
3084
3114
  position: relative;
3115
+ flex-shrink: 0;
3116
+ align-self: center;
3117
+ background-color: inherit;
3085
3118
  fill: var(--list-colors-icon-key_icon);
3086
3119
  padding: 0.25rem;
3087
- width: calc(var(--list-row-size) - 0.4rem);
3120
+ width: var(--list-key-icon);
3088
3121
  height: auto;
3089
3122
  }
3090
- .touch list-keyfield svg {
3091
- width: calc(var(--list-row-size) - 1.1rem);
3092
- height: auto;
3123
+ list-keyfield.tail {
3124
+ grid-column: 1/-1;
3125
+ border-right: none;
3126
+ }
3127
+ list-keyfield.tail > :last-child {
3128
+ flex-grow: 1;
3129
+ }
3130
+ list-keyfield.tail::after {
3131
+ display: none;
3093
3132
  }
3094
3133
  list-keyfield::after {
3095
3134
  content: "";
3135
+ align-self: flex-start;
3096
3136
  height: 50%;
3097
3137
  border-bottom: 1px solid var(--list-colors-border-column);
3098
3138
  flex-grow: 1;
3099
- height: calc(var(--list-row-size) / 2);
3139
+ }
3140
+ list-dragfield {
3141
+ position: sticky;
3142
+ left: 0;
3143
+ z-index: 2;
3144
+ display: flex;
3145
+ align-items: center;
3146
+ justify-content: center;
3147
+ box-sizing: border-box;
3148
+ min-height: var(--list-drag-width);
3149
+ user-select: none;
3150
+ touch-action: none;
3151
+ border-right: 1px solid var(--list-colors-border-column);
3152
+ }
3153
+ list-dragfield::before {
3154
+ font-family: "Material Symbols Rounded";
3155
+ font-weight: normal;
3156
+ font-style: normal;
3157
+ letter-spacing: normal;
3158
+ text-transform: none;
3159
+ white-space: nowrap;
3160
+ word-wrap: normal;
3161
+ direction: ltr;
3162
+ -webkit-font-feature-settings: "liga";
3163
+ -webkit-font-smoothing: antialiased;
3164
+ font-size: 1.2rem;
3165
+ line-height: 1;
3166
+ color: var(--list-colors-icon-drag);
3167
+ }
3168
+ .touch list-dragfield::before {
3169
+ font-size: 1.8rem;
3170
+ }
3171
+ list-row.movable > div > list-dragfield {
3172
+ cursor: grab;
3173
+ }
3174
+ list-row.movable > div > list-dragfield::before {
3175
+ content: "\e945";
3176
+ }
3177
+
3178
+ list-row.dragging > div > * {
3179
+ opacity: 0.4;
3180
+ }
3181
+
3182
+ list-container > span.list-drop {
3183
+ display: block;
3184
+ position: absolute;
3185
+ z-index: 998;
3186
+ pointer-events: none;
3187
+ box-sizing: border-box;
3188
+ background-color: var(--list-colors-focus-normal);
3189
+ }
3190
+ list-container > span.list-drop[hidden] {
3191
+ display: none;
3192
+ }
3193
+ list-container > span.list-drop.into {
3194
+ background-color: transparent;
3195
+ border: 2px solid var(--list-colors-focus-normal);
3196
+ }
3197
+
3198
+ span.list-drag-label {
3199
+ display: block;
3200
+ position: fixed;
3201
+ z-index: 10000;
3202
+ pointer-events: none;
3203
+ padding: 0.2rem 0.5rem;
3204
+ border-radius: 0.3rem;
3205
+ font-size: 0.9rem;
3206
+ white-space: nowrap;
3207
+ color: var(--list-colors-text-field);
3208
+ background-color: var(--list-colors-background-row_even);
3209
+ border: 1px solid var(--list-colors-border-header);
3210
+ box-shadow: 0 0.1rem 0.3rem var(--list-colors-border-header);
3211
+ }
3212
+ span.list-drag-label.none {
3213
+ opacity: 0.5;
3100
3214
  }
3101
3215
  list-container {
3102
3216
  position: relative;
@@ -3120,8 +3234,6 @@ list-container > div > list-headerrow > * {
3120
3234
  }
3121
3235
  list-container > div > list-headerrow > *:first-child {
3122
3236
  left: 0;
3123
- z-index: 3;
3124
- border-right: 1px solid var(--list-colors-border-column);
3125
3237
  }
3126
3238
  list-container > div > list-headerrow > list-headerfield {
3127
3239
  box-sizing: border-box;
@@ -3163,8 +3275,9 @@ list-container > div > list-headerrow > list-headerfield > div > div {
3163
3275
  cursor: ew-resize;
3164
3276
  justify-content: center;
3165
3277
  align-items: center;
3278
+ touch-action: none;
3166
3279
  }
3167
- list-container > div > list-headerrow > list-headerfield > div > div:hover {
3280
+ list-container > div > list-headerrow > list-headerfield > div > div:hover, list-container > div > list-headerrow > list-headerfield > div > div.active {
3168
3281
  background-color: var(--list-colors-background-row_hover);
3169
3282
  }
3170
3283
  list-container > div > list-headerrow > list-headerfield > div > div::after {
@@ -3173,13 +3286,82 @@ list-container > div > list-headerrow > list-headerfield > div > div::after {
3173
3286
  height: 80%;
3174
3287
  background-color: var(--list-colors-border-column);
3175
3288
  }
3289
+ list-container > div > list-headerrow > list-headerfield > div > div.active::after {
3290
+ background-color: var(--list-colors-focus-normal);
3291
+ }
3292
+ .touch list-container > div > list-headerrow > list-headerfield > div > div {
3293
+ width: 1.5rem;
3294
+ }
3295
+ .touch list-container > div > list-headerrow > list-headerfield > div > div::after {
3296
+ width: 3px;
3297
+ height: 60%;
3298
+ transform: translateX(-0.2rem);
3299
+ box-shadow: 0.4rem 0 0 var(--list-colors-border-column);
3300
+ }
3301
+ .touch list-container > div > list-headerrow > list-headerfield > div > div.active::after {
3302
+ box-shadow: 0.4rem 0 0 var(--list-colors-focus-normal);
3303
+ }
3176
3304
  list-container > div > div {
3177
3305
  display: contents;
3178
3306
  }
3307
+
3308
+ list-container > input.list-warn {
3309
+ all: unset;
3310
+ visibility: hidden;
3311
+ position: absolute;
3312
+ pointer-events: none;
3313
+ }
3314
+
3315
+ list-container > div {
3316
+ --list-drag-width: 0px;
3317
+ --list-check-width: 0px;
3318
+ --list-lead-size: var(--list-size-row_min);
3319
+ }
3320
+ .touch list-container > div {
3321
+ --list-lead-size: var(--list-size-touch_row_min);
3322
+ }
3323
+ list-container > div.drag {
3324
+ --list-drag-width: var(--list-lead-size);
3325
+ }
3326
+ list-container > div.check {
3327
+ --list-check-width: var(--list-lead-size);
3328
+ }
3329
+ list-container > div list-keyfield,
3330
+ list-container > div > list-headerrow > .key {
3331
+ left: calc(var(--list-drag-width) + var(--list-check-width));
3332
+ }
3333
+ list-container > div > list-headerrow > :first-child,
3334
+ list-container > div > list-headerrow > .key,
3335
+ list-container > div > list-headerrow > list-dragfield,
3336
+ list-container > div > list-headerrow > list-checkfield {
3337
+ z-index: 1000;
3338
+ }
3339
+ list-container > div.key-sized list-keyfield {
3340
+ box-sizing: border-box;
3341
+ contain: inline-size;
3342
+ min-width: max(var(--list-key-width), var(--list-key-min));
3343
+ }
3344
+ list-container > div.key-sized list-keyfield > span.text {
3345
+ overflow-wrap: anywhere;
3346
+ }
3347
+ list-container > div.key-sized > list-headerrow > .key {
3348
+ min-width: var(--list-key-width);
3349
+ }
3350
+ list-container > div.lead-1 list-keyfield.tail,
3351
+ list-container > div.lead-1 list-addrow > span,
3352
+ list-container > div.lead-1 list-error {
3353
+ grid-column: 2/-1;
3354
+ }
3355
+ list-container > div.lead-2 list-keyfield.tail,
3356
+ list-container > div.lead-2 list-addrow > span,
3357
+ list-container > div.lead-2 list-error {
3358
+ grid-column: 3/-1;
3359
+ }
3179
3360
  list-rowserror {
3180
3361
  display: contents;
3181
3362
  }
3182
- list-rowserror > list-error {
3363
+ list-rowserror > list-error,
3364
+ list-rowserror > list-keyfield {
3183
3365
  background-color: var(--list-colors-background-row_odd);
3184
3366
  }
3185
3367
 
@@ -3197,9 +3379,6 @@ list-error {
3197
3379
  .touch list-error {
3198
3380
  min-height: var(--list-size-touch_row_min);
3199
3381
  }
3200
- list-container > div.sub-rows list-error {
3201
- grid-column: 2/-1;
3202
- }
3203
3382
  list-textfield,
3204
3383
  list-numberfield,
3205
3384
  list-nodefield {
@@ -3273,3 +3452,68 @@ list-row > span {
3273
3452
  list-row:not(.open) > list-addrow {
3274
3453
  display: none;
3275
3454
  }
3455
+
3456
+ list-row.selected > div > * {
3457
+ background-color: var(--list-colors-background-row_selected);
3458
+ }
3459
+ list-row.selected > div:hover > * {
3460
+ background-color: var(--list-colors-background-row_selected_hover);
3461
+ }
3462
+ list-checkfield {
3463
+ position: sticky;
3464
+ left: var(--list-drag-width);
3465
+ z-index: 2;
3466
+ display: flex;
3467
+ align-items: center;
3468
+ justify-content: center;
3469
+ box-sizing: border-box;
3470
+ min-height: var(--list-check-width);
3471
+ user-select: none;
3472
+ cursor: pointer;
3473
+ outline: none;
3474
+ border-right: 1px solid var(--list-colors-border-column);
3475
+ }
3476
+ list-checkfield::before {
3477
+ font-family: "Material Symbols Rounded";
3478
+ font-weight: normal;
3479
+ font-style: normal;
3480
+ letter-spacing: normal;
3481
+ text-transform: none;
3482
+ white-space: nowrap;
3483
+ word-wrap: normal;
3484
+ direction: ltr;
3485
+ -webkit-font-feature-settings: "liga";
3486
+ -webkit-font-smoothing: antialiased;
3487
+ font-size: 1.2rem;
3488
+ line-height: 1;
3489
+ color: var(--list-colors-icon-check);
3490
+ }
3491
+ .touch list-checkfield::before {
3492
+ font-size: 1.8rem;
3493
+ }
3494
+ list-checkfield:focus-visible:not(.click-focus) {
3495
+ outline: 2px solid var(--list-colors-focus-normal);
3496
+ outline-offset: -2px;
3497
+ }
3498
+
3499
+ list-container > div.multi list-row.selectable > div > list-checkfield::before,
3500
+ list-container > div.multi > list-headerrow > list-checkfield::before {
3501
+ content: "\e835";
3502
+ }
3503
+ list-container > div.multi list-row.selectable.selected > div > list-checkfield::before,
3504
+ list-container > div.multi > list-headerrow > list-checkfield.all::before {
3505
+ content: "\e834";
3506
+ }
3507
+ list-container > div.multi > list-headerrow > list-checkfield.some:not(.all)::before {
3508
+ content: "\e909";
3509
+ }
3510
+
3511
+ list-container > div.single list-row.selectable > div > list-checkfield::before {
3512
+ content: "\e836";
3513
+ }
3514
+ list-container > div.single list-row.selectable.selected > div > list-checkfield::before {
3515
+ content: "\e837";
3516
+ }
3517
+ list-container > div.single > list-headerrow > list-checkfield {
3518
+ cursor: default;
3519
+ }
package/svg/index.d.mts CHANGED
@@ -1,3 +1,3 @@
1
1
  import '../style.css';
2
- import { n as svg, r as SVGAnchorPoint, t as SVGFunc } from "../index-ClIBfrHy.mjs";
2
+ import { n as svg, r as SVGAnchorPoint, t as SVGFunc } from "../index-BDWg5GX2.mjs";
3
3
  export { SVGAnchorPoint, SVGFunc, svg };
package/svg/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
1
  import "../style.css";
2
- export { n as SVGAnchorPoint, t as svg } from "../svg-1bp-yIPC.mjs";
2
+ export { n as SVGAnchorPoint, t as svg } from "../svg-Yz7elqnU.mjs";