@codbex/harmonia 1.8.0 → 1.9.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.
@@ -2838,7 +2838,8 @@ function badge_default(Alpine) {
2838
2838
  "focus-visible:border-ring",
2839
2839
  "focus-visible:ring-ring/50",
2840
2840
  "focus-visible:ring-[calc(var(--spacing)*0.75)]",
2841
- "transition-[color,box-shadow]",
2841
+ "transition-colors",
2842
+ "transition-shadow",
2842
2843
  "motion-reduce:transition-none",
2843
2844
  "overflow-hidden"
2844
2845
  );
@@ -2927,6 +2928,7 @@ var buttonVariants = {
2927
2928
  default: [
2928
2929
  "bg-secondary",
2929
2930
  "text-secondary-foreground",
2931
+ "fill-secondary-foreground",
2930
2932
  "shadow-button",
2931
2933
  "hover:bg-secondary-hover",
2932
2934
  "active:bg-secondary-active",
@@ -2938,6 +2940,7 @@ var buttonVariants = {
2938
2940
  primary: [
2939
2941
  "bg-primary",
2940
2942
  "text-primary-foreground",
2943
+ "fill-primary-foreground",
2941
2944
  "shadow-button",
2942
2945
  "focus-visible:outline-primary/50",
2943
2946
  "hover:bg-primary-hover",
@@ -2950,6 +2953,7 @@ var buttonVariants = {
2950
2953
  positive: [
2951
2954
  "bg-positive",
2952
2955
  "text-positive-foreground",
2956
+ "fill-positive-foreground",
2953
2957
  "shadow-button",
2954
2958
  "focus-visible:outline-positive/50",
2955
2959
  "hover:bg-positive-hover",
@@ -2962,6 +2966,7 @@ var buttonVariants = {
2962
2966
  negative: [
2963
2967
  "bg-negative",
2964
2968
  "text-negative-foreground",
2969
+ "fill-negative-foreground",
2965
2970
  "shadow-button",
2966
2971
  "focus-visible:outline-negative/50",
2967
2972
  "hover:bg-negative-hover",
@@ -2974,6 +2979,7 @@ var buttonVariants = {
2974
2979
  warning: [
2975
2980
  "bg-warning",
2976
2981
  "text-warning-foreground",
2982
+ "fill-warning-foreground",
2977
2983
  "shadow-button",
2978
2984
  "focus-visible:outline-warning/50",
2979
2985
  "hover:bg-warning-hover",
@@ -2986,6 +2992,7 @@ var buttonVariants = {
2986
2992
  information: [
2987
2993
  "bg-information",
2988
2994
  "text-information-foreground",
2995
+ "fill-information-foreground",
2989
2996
  "shadow-button",
2990
2997
  "focus-visible:outline-information/50",
2991
2998
  "hover:bg-information-hover",
@@ -2999,25 +3006,49 @@ var buttonVariants = {
2999
3006
  "border",
3000
3007
  "bg-background",
3001
3008
  "text-foreground",
3009
+ "fill-foreground",
3002
3010
  "hover:bg-secondary",
3003
3011
  "hover:text-secondary-foreground",
3012
+ "hover:fill-secondary-foreground",
3004
3013
  "active:bg-secondary-active",
3014
+ "active:text-secondary-foreground",
3015
+ "active:fill-secondary-foreground",
3005
3016
  "aria-pressed:bg-secondary-active",
3017
+ "aria-pressed:text-secondary-foreground",
3018
+ "aria-pressed:fill-secondary-foreground",
3006
3019
  "active:data-[toggled=true]:bg-secondary-active",
3020
+ "active:data-[toggled=true]:text-secondary-foreground",
3021
+ "active:data-[toggled=true]:fill-secondary-foreground",
3007
3022
  "hover:data-[toggled=true]:bg-secondary-hover",
3008
- "data-[toggled=true]:bg-secondary-active"
3023
+ "hover:data-[toggled=true]:text-secondary-foreground",
3024
+ "hover:data-[toggled=true]:fill-secondary-foreground",
3025
+ "data-[toggled=true]:bg-secondary-active",
3026
+ "data-[toggled=true]:text-secondary-foreground",
3027
+ "data-[toggled=true]:fill-secondary-foreground"
3009
3028
  ],
3010
3029
  transparent: [
3011
3030
  "bg-transparent",
3012
3031
  "text-foreground",
3032
+ "fill-foreground",
3013
3033
  "shadow-none",
3014
3034
  "hover:bg-secondary",
3015
3035
  "hover:text-secondary-foreground",
3036
+ "hover:fill-secondary-foreground",
3016
3037
  "active:bg-secondary-active",
3038
+ "active:text-secondary-foreground",
3039
+ "active:fill-secondary-foreground",
3017
3040
  "aria-pressed:bg-secondary-active",
3041
+ "aria-pressed:text-secondary-foreground",
3042
+ "aria-pressed:fill-secondary-foreground",
3018
3043
  "active:data-[toggled=true]:bg-secondary-active",
3044
+ "active:data-[toggled=true]:text-secondary-foreground",
3045
+ "active:data-[toggled=true]:fill-secondary-foreground",
3019
3046
  "hover:data-[toggled=true]:bg-secondary-hover",
3020
- "data-[toggled=true]:bg-secondary-active"
3047
+ "hover:data-[toggled=true]:text-secondary-foreground",
3048
+ "hover:data-[toggled=true]:fill-secondary-foreground",
3049
+ "data-[toggled=true]:bg-secondary-active",
3050
+ "data-[toggled=true]:text-secondary-foreground",
3051
+ "data-[toggled=true]:fill-secondary-foreground"
3021
3052
  ],
3022
3053
  link: ["text-primary", "underline-offset-4", "hover:underline"]
3023
3054
  };
@@ -3033,6 +3064,7 @@ var setButtonClasses = (el) => {
3033
3064
  "text-sm",
3034
3065
  "font-medium",
3035
3066
  "transition-all",
3067
+ "duration-100",
3036
3068
  "motion-reduce:transition-none",
3037
3069
  "disabled:pointer-events-none",
3038
3070
  "disabled:opacity-50",
@@ -5297,7 +5329,8 @@ function datepicker_default(Alpine) {
5297
5329
  "border-input",
5298
5330
  "flex",
5299
5331
  "items-center",
5300
- "transition-[color,box-shadow]",
5332
+ "transition-colors",
5333
+ "transition-shadow",
5301
5334
  "motion-reduce:transition-none",
5302
5335
  "duration-200",
5303
5336
  "outline-none",
@@ -5373,7 +5406,20 @@ function datepicker_default(Alpine) {
5373
5406
  if (!datepicker) {
5374
5407
  throw new Error(`${original2} must be inside an date-picker element`);
5375
5408
  }
5376
- el.classList.add("cursor-pointer", "inline-flex", "items-center", "justify-center", "h-full", "aspect-square", "bg-transparent", "hover:bg-secondary", "active:bg-secondary-active", "outline-none");
5409
+ el.classList.add(
5410
+ "cursor-pointer",
5411
+ "inline-flex",
5412
+ "items-center",
5413
+ "justify-center",
5414
+ "h-full",
5415
+ "aspect-square",
5416
+ "bg-transparent",
5417
+ "hover:bg-secondary",
5418
+ "hover:text-secondary-foreground",
5419
+ "active:bg-secondary-active",
5420
+ "active:text-secondary-foreground",
5421
+ "outline-none"
5422
+ );
5377
5423
  if (datepicker._h_datepicker.inTable) {
5378
5424
  el.classList.add(
5379
5425
  "focus-visible:inset-ring-ring/50",
@@ -5404,7 +5450,7 @@ function datepicker_default(Alpine) {
5404
5450
  el.appendChild(
5405
5451
  createSvg({
5406
5452
  icon: Calendar,
5407
- classes: "opacity-70 text-foreground size-4",
5453
+ classes: "opacity-70 text-inherit size-4",
5408
5454
  attrs: {
5409
5455
  "aria-hidden": true,
5410
5456
  role: "presentation"
@@ -5911,7 +5957,8 @@ function input_default(Alpine) {
5911
5957
  "[&::-webkit-color-swatch-wrapper]:rounded-0",
5912
5958
  "[&::-webkit-color-swatch-wrapper]:p-0",
5913
5959
  "text-base",
5914
- "transition-[color,box-shadow]",
5960
+ "transition-colors",
5961
+ "transition-shadow",
5915
5962
  "motion-reduce:transition-none",
5916
5963
  "outline-none",
5917
5964
  "file:inline-flex",
@@ -5969,7 +6016,8 @@ function input_default(Alpine) {
5969
6016
  "rounded-control",
5970
6017
  "border",
5971
6018
  "shadow-input",
5972
- "transition-[color,box-shadow]",
6019
+ "transition-colors",
6020
+ "transition-shadow",
5973
6021
  "motion-reduce:transition-none",
5974
6022
  "outline-none",
5975
6023
  "min-w-0",
@@ -6071,8 +6119,10 @@ function input_default(Alpine) {
6071
6119
  "rounded-control",
6072
6120
  "border",
6073
6121
  "shadow-input",
6074
- "transition-[color,box-shadow]",
6122
+ "transition-colors",
6123
+ "transition-shadow",
6075
6124
  "motion-reduce:transition-none",
6125
+ "duration-200",
6076
6126
  "outline-none",
6077
6127
  "min-w-0",
6078
6128
  "has-[input:focus-visible]:border-ring",
@@ -6117,7 +6167,7 @@ function input_default(Alpine) {
6117
6167
  stepDown.appendChild(
6118
6168
  createSvg({
6119
6169
  icon: Minus,
6120
- classes: "opacity-70 fill-foreground size-4 shrink-0 pointer-events-none",
6170
+ classes: "opacity-70 text-inherit size-4 shrink-0 pointer-events-none",
6121
6171
  attrs: {
6122
6172
  "aria-hidden": true,
6123
6173
  role: "presentation"
@@ -6135,16 +6185,23 @@ function input_default(Alpine) {
6135
6185
  "[input:invalid~&]:border-negative",
6136
6186
  "h-full",
6137
6187
  "aspect-square",
6188
+ "transition-colors",
6189
+ "motion-reduce:transition-none",
6190
+ "duration-100",
6138
6191
  "bg-transparent",
6139
6192
  "hover:bg-secondary",
6193
+ "hover:text-secondary-foreground",
6140
6194
  "active:bg-secondary-active",
6195
+ "active:text-secondary-foreground",
6141
6196
  "outline-none",
6142
6197
  "relative",
6143
6198
  "[&:hover>svg]:text-secondary-foreground"
6144
6199
  );
6145
6200
  el.appendChild(stepDown);
6146
6201
  const onStepDown = () => {
6147
- input.stepDown();
6202
+ if (input.step === "any") {
6203
+ input.value = (parseFloat(input.value) || 0) - 1;
6204
+ } else input.stepDown();
6148
6205
  input.dispatchEvent(new Event("input", { bubbles: true }));
6149
6206
  input.dispatchEvent(new Event("change", { bubbles: true }));
6150
6207
  };
@@ -6158,7 +6215,7 @@ function input_default(Alpine) {
6158
6215
  stepUp.appendChild(
6159
6216
  createSvg({
6160
6217
  icon: Plus,
6161
- classes: "opacity-70 fill-foreground size-4 shrink-0 pointer-events-none",
6218
+ classes: "opacity-70 text-inherit size-4 shrink-0 pointer-events-none",
6162
6219
  attrs: {
6163
6220
  "aria-hidden": true,
6164
6221
  role: "presentation"
@@ -6176,16 +6233,23 @@ function input_default(Alpine) {
6176
6233
  "[input:invalid~&]:border-negative",
6177
6234
  "h-full",
6178
6235
  "aspect-square",
6236
+ "transition-all",
6237
+ "motion-reduce:transition-none",
6238
+ "duration-100",
6179
6239
  "bg-transparent",
6180
6240
  "hover:bg-secondary",
6241
+ "hover:text-secondary-foreground",
6181
6242
  "active:bg-secondary-active",
6243
+ "active:text-secondary-foreground",
6182
6244
  "outline-none",
6183
6245
  "relative",
6184
6246
  "[&:hover>svg]:text-secondary-foreground"
6185
6247
  );
6186
6248
  el.appendChild(stepUp);
6187
6249
  const onStepUp = () => {
6188
- input.stepUp();
6250
+ if (input.step === "any") {
6251
+ input.value = (parseFloat(input.value) || 0) + 1;
6252
+ } else input.stepUp();
6189
6253
  input.dispatchEvent(new Event("input", { bubbles: true }));
6190
6254
  input.dispatchEvent(new Event("change", { bubbles: true }));
6191
6255
  };
@@ -6520,7 +6584,9 @@ function menu_default(Alpine) {
6520
6584
  }
6521
6585
  function onClick(event) {
6522
6586
  if (event.type === "contextmenu") event.preventDefault();
6523
- close(isSubmenu);
6587
+ if (el.getAttribute("data-innerclicks") === "true" && el.contains(event.composedPath()[0])) {
6588
+ return;
6589
+ } else close(isSubmenu);
6524
6590
  }
6525
6591
  el.pauseKeyEvents = false;
6526
6592
  function onKeyDown(event) {
@@ -7699,9 +7765,18 @@ function select_default(Alpine) {
7699
7765
  set: void 0,
7700
7766
  get: void 0
7701
7767
  };
7702
- el.classList.add("cursor-pointer", "outline-none", "transition-[color,box-shadow]", "motion-reduce:transition-none", "duration-200", "w-full", "has-[input:disabled]:pointer-events-none", "has-[input:disabled]:opacity-50");
7768
+ el.classList.add("cursor-pointer", "outline-none", "transition-colors", "transition-shadow", "motion-reduce:transition-none", "duration-200", "w-full", "has-[input:disabled]:pointer-events-none", "has-[input:disabled]:opacity-50");
7703
7769
  if (modifiers.includes("table")) {
7704
- el.classList.add("h-10", "flex", "focus-visible:inset-ring-ring/50", "focus-visible:inset-ring-2", "hover:bg-table-hover", "hover:text-table-hover-foreground", "active:!bg-table-active", "active:!text-table-active-foreground");
7770
+ el.classList.add(
7771
+ "h-10",
7772
+ "flex",
7773
+ "focus-visible:inset-ring-ring/50",
7774
+ "focus-visible:inset-ring-2",
7775
+ '[&>[data-slot="select-input"]]:hover:bg-table-hover',
7776
+ '[&>[data-slot="select-input"]]:hover:text-table-hover-foreground',
7777
+ '[&>[data-slot="select-input"]]:active:!bg-table-active',
7778
+ '[&>[data-slot="select-input"]]:active:!text-table-active-foreground'
7779
+ );
7705
7780
  el.setAttribute("data-slot", "cell-input-select");
7706
7781
  } else {
7707
7782
  el.classList.add(
@@ -7715,8 +7790,11 @@ function select_default(Alpine) {
7715
7790
  "has-[input[aria-invalid=true]]:ring-negative/20",
7716
7791
  "has-[input:invalid]:border-negative",
7717
7792
  "has-[input:invalid]:ring-negative/20",
7718
- "hover:bg-secondary-hover",
7719
- "active:bg-secondary-active",
7793
+ '[&>[data-slot="select-input"]]:hover:bg-secondary-hover',
7794
+ '[&>[data-slot="select-input"]]:hover:text-secondary-foreground',
7795
+ '[&>[data-slot="select-input"]]:active:bg-secondary-active',
7796
+ '[&>[data-slot="select-input"]]:active:text-secondary-foreground',
7797
+ '[&>[data-slot="select-input"]]:rounded-control',
7720
7798
  "rounded-control",
7721
7799
  "border",
7722
7800
  "bg-input-inner",
@@ -7973,7 +8051,7 @@ function select_default(Alpine) {
7973
8051
  fakeTrigger.addEventListener("click", onClick);
7974
8052
  const chevronDown = createSvg({
7975
8053
  icon: ChevronDown,
7976
- classes: "opacity-70 text-foreground size-4 shrink-0 pointer-events-none transition-transform motion-reduce:transition-none duration-200",
8054
+ classes: "opacity-70 text-inherit size-4 shrink-0 pointer-events-none transition-transform motion-reduce:transition-none duration-200",
7977
8055
  attrs: {
7978
8056
  "aria-hidden": true,
7979
8057
  role: "presentation"
@@ -8268,6 +8346,7 @@ function select_default(Alpine) {
8268
8346
  const onActivate = (event) => {
8269
8347
  if (event.type === "keydown" && (event.key === "Enter" || event.key === " ") || event.type === "click") {
8270
8348
  if (select._h_select.multiple) {
8349
+ event.stopPropagation();
8271
8350
  const vIndex = select._h_model.get().indexOf(getValue());
8272
8351
  if (vIndex > -1) {
8273
8352
  const val = select._h_model.get().splice(vIndex, 1);
@@ -8522,7 +8601,7 @@ function sidebar_default(Alpine) {
8522
8601
  );
8523
8602
  el.setAttribute("data-slot", "sidebar-group-label");
8524
8603
  if (group._h_sidebar_group.collapsable) {
8525
- el.classList.add("text-sidebar-foreground", "text-sm", "hover:bg-secondary-hover", "active:bg-secondary-active");
8604
+ el.classList.add("text-sidebar-foreground", "text-sm", "hover:bg-sidebar-secondary", "hover:text-sidebar-secondary-foreground", "active:bg-sidebar-secondary", "active:text-sidebar-secondary-foreground");
8526
8605
  if (el.hasAttribute("id")) {
8527
8606
  group._h_sidebar_group.controlId = el.getAttribute("id");
8528
8607
  } else {
@@ -9542,7 +9621,8 @@ function table_default(Alpine) {
9542
9621
  "justify-between",
9543
9622
  "outline-none",
9544
9623
  "gap-2",
9545
- "transition-[color,box-shadow]",
9624
+ "transition-colors",
9625
+ "transition-shadow",
9546
9626
  "motion-reduce:transition-none",
9547
9627
  "[&_svg]:pointer-events-none",
9548
9628
  "[&_svg]:opacity-70",
@@ -9668,7 +9748,8 @@ function tabs_default(Alpine) {
9668
9748
  "text-sm",
9669
9749
  "font-medium",
9670
9750
  "whitespace-nowrap",
9671
- "transition-[color,box-shadow]",
9751
+ "transition-colors",
9752
+ "transition-shadow",
9672
9753
  "motion-reduce:transition-none",
9673
9754
  "group-data-[floating=true]/tab-bar:rounded-md",
9674
9755
  "group-data-[floating=true]/tab-bar:border",
@@ -9850,7 +9931,8 @@ function textarea_default(Alpine) {
9850
9931
  "py-2",
9851
9932
  "text-base",
9852
9933
  "shadow-input",
9853
- "transition-[color,box-shadow]",
9934
+ "transition-colors",
9935
+ "transition-shadow",
9854
9936
  "motion-reduce:transition-none",
9855
9937
  "outline-none",
9856
9938
  "focus-visible:ring-[calc(var(--spacing)*0.75)]",
@@ -10032,8 +10114,6 @@ function timepicker_default(Alpine) {
10032
10114
  el.classList.add(
10033
10115
  "cursor-pointer",
10034
10116
  "border-input",
10035
- "hover:bg-secondary-hover",
10036
- "active:bg-secondary-active",
10037
10117
  "flex",
10038
10118
  "items-center",
10039
10119
  "justify-between",
@@ -10043,7 +10123,8 @@ function timepicker_default(Alpine) {
10043
10123
  "data-[size=sm]:pr-1",
10044
10124
  "text-sm",
10045
10125
  "whitespace-nowrap",
10046
- "transition-[color,box-shadow]",
10126
+ "transition-colors",
10127
+ "transition-shadow",
10047
10128
  "motion-reduce:transition-none",
10048
10129
  "duration-200",
10049
10130
  "outline-none",
@@ -10060,16 +10141,30 @@ function timepicker_default(Alpine) {
10060
10141
  "has-[input[aria-invalid=true]]:inset-ring-negative/20",
10061
10142
  "dark:has-[input[aria-invalid=true]]:inset-ring-negative/40",
10062
10143
  "has-[input:invalid]:!inset-ring-negative/20",
10063
- "dark:has-[input:invalid]:!inset-ring-negative/40"
10144
+ "dark:has-[input:invalid]:!inset-ring-negative/40",
10145
+ "hover:bg-table-hover",
10146
+ "hover:text-table-hover-foreground",
10147
+ "active:!bg-table-active",
10148
+ "active:!text-table-active-foreground",
10149
+ "has-[[aria-expanded=true]]:bg-transparent",
10150
+ "has-[[aria-expanded=true]]:text-foreground"
10064
10151
  );
10065
10152
  el.setAttribute("data-slot", "cell-input-time");
10066
10153
  } else {
10067
10154
  el.classList.add(
10068
10155
  "w-full",
10156
+ "hover:bg-secondary-hover",
10157
+ "hover:text-secondary-foreground",
10158
+ '[&>[data-slot="time-picker-input"]]:hover:text-secondary-foreground',
10159
+ "active:bg-secondary-active",
10160
+ "active:text-secondary-foreground",
10161
+ '[&>[data-slot="time-picker-input"]]:active:text-secondary-foreground',
10069
10162
  "rounded-control",
10070
10163
  "border",
10071
10164
  "bg-input-inner",
10072
10165
  "shadow-input",
10166
+ "has-[[aria-expanded=true]]:bg-input-inner",
10167
+ "has-[[aria-expanded=true]]:text-foreground",
10073
10168
  "has-[input:focus-visible]:border-ring",
10074
10169
  "has-[input:focus-visible]:ring-[calc(var(--spacing)*0.75)]",
10075
10170
  "has-[input:focus-visible]:ring-ring/50",
@@ -10086,7 +10181,7 @@ function timepicker_default(Alpine) {
10086
10181
  el.appendChild(
10087
10182
  createSvg({
10088
10183
  icon: Clock,
10089
- classes: "opacity-70 text-foreground size-4 shrink-0 pointer-events-none",
10184
+ classes: "opacity-70 text-inherit size-4 shrink-0 pointer-events-none",
10090
10185
  attrs: {
10091
10186
  "aria-hidden": true,
10092
10187
  role: "presentation"
@@ -11136,7 +11231,7 @@ function tree_default(Alpine) {
11136
11231
  }
11137
11232
 
11138
11233
  // package.json
11139
- var version = "1.8.0";
11234
+ var version = "1.9.0";
11140
11235
 
11141
11236
  // src/utils/theme.js
11142
11237
  var colorSchemeKey = "codbex.harmonia.colorMode";