@rebilly/revel 6.22.27 → 6.23.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 (29) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/dist/common/helpers/capitalize-first-letter.d.ts +1 -1
  3. package/dist/common/helpers/format-date.d.ts +0 -1
  4. package/dist/common/helpers/is-kebab-case.d.ts +1 -1
  5. package/dist/common/helpers/is-object.d.ts +1 -2
  6. package/dist/common/helpers/un-camel-case.d.ts +1 -1
  7. package/dist/components/r-avatar/r-avatar.vue.d.ts +0 -1
  8. package/dist/components/r-badge/r-badge.vue.d.ts +1 -1
  9. package/dist/components/r-date-input/r-date-input.vue.d.ts +1 -1
  10. package/dist/components/r-date-input/r-date-range-button-group.vue.d.ts +1 -2
  11. package/dist/components/r-date-input/r-range-calendar.vue.d.ts +1 -1
  12. package/dist/components/r-date-input/types.d.ts +0 -1
  13. package/dist/components/r-icon/r-icon-sprites.d.ts +2 -0
  14. package/dist/components/r-input/r-input.vue.d.ts +0 -1
  15. package/dist/components/r-month-picker/r-month-picker.vue.d.ts +0 -1
  16. package/dist/components/r-popper/r-popper.vue.d.ts +0 -1
  17. package/dist/components/r-select/async-extension.d.ts +0 -1
  18. package/dist/components/r-select/r-select.vue.d.ts +1 -1
  19. package/dist/components/r-tabs/r-tab.vue.d.ts +0 -1
  20. package/dist/components/r-tabs/r-tabs.vue.d.ts +0 -1
  21. package/dist/components/r-tabs/types.d.ts +0 -1
  22. package/dist/components/r-toast/default-error-handler.d.ts +1 -1
  23. package/dist/components/r-toast/r-toast.vue.d.ts +0 -1
  24. package/dist/directives/r-click-outside/r-click-outside.d.ts +0 -1
  25. package/dist/directives/r-tooltip/r-tooltip.d.ts +0 -1
  26. package/dist/revel.mjs +23 -3
  27. package/dist/revel.umd.js +14 -2
  28. package/dist/types.d.ts +0 -3
  29. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## [6.23.1](https://github.com/Rebilly/rebilly/compare/revel-v6.23.0...revel-v6.23.1) (2024-05-02)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * **revel:** Helpers / utility type improvements ([#5004](https://github.com/Rebilly/rebilly/issues/5004)) ([9baffcf](https://github.com/Rebilly/rebilly/commit/9baffcfe9666956f019874b8b5c8a15103c7c8a3))
7
+
8
+ ## [6.23.0](https://github.com/Rebilly/rebilly/compare/revel-v6.22.27...revel-v6.23.0) (2024-04-30)
9
+
10
+
11
+ ### Features
12
+
13
+ * **recomm:** Theme switcher user dropdown menu ([#4964](https://github.com/Rebilly/rebilly/issues/4964)) ([f556a85](https://github.com/Rebilly/rebilly/commit/f556a85b142ab448d446d3c2808587dd4ad16dcd))
14
+
1
15
  ## [6.22.27](https://github.com/Rebilly/rebilly/compare/revel-v6.22.26...revel-v6.22.27) (2024-04-30)
2
16
 
3
17
  ## [6.22.26](https://github.com/Rebilly/rebilly/compare/revel-v6.22.25...revel-v6.22.26) (2024-04-29)
@@ -1 +1 @@
1
- export declare function capitalizeFirstLetter(str: string): string;
1
+ export declare function capitalizeFirstLetter(input: string): string;
@@ -1,4 +1,3 @@
1
1
  import type { Moment } from 'moment';
2
2
  import { type DateTimeFormatsVariant } from '../datetime-formats';
3
- import type { Voidable } from '../../types';
4
3
  export declare const formatDate: (value: Voidable<Moment | string | Date>, format?: DateTimeFormatsVariant | string, timezone?: string) => string;
@@ -1 +1 @@
1
- export declare function isKebabCase(str: string): boolean;
1
+ export declare function isKebabCase(value: string): boolean;
@@ -1,2 +1 @@
1
- import type { Nullable } from '../../types';
2
- export declare function isObject(value?: Nullable<object>): boolean;
1
+ export declare function isObject(value: unknown): boolean;
@@ -1 +1 @@
1
- export declare function unCamelCase(str: string): string;
1
+ export declare function unCamelCase(value: string): string;
@@ -1,5 +1,4 @@
1
1
  import { type PropType } from 'vue';
2
- import type { Nullable } from '../../types';
3
2
  declare const _default: import("vue").DefineComponent<{
4
3
  /**
5
4
  * Display initials
@@ -14,7 +14,7 @@ declare const _default: import("vue").DefineComponent<{
14
14
  default: boolean;
15
15
  };
16
16
  }, unknown, unknown, {
17
- classes(): Record<string, boolean>;
17
+ classes(): Record<`r-badge-${string}`, boolean>;
18
18
  }, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("click" | "close")[], "click" | "close", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
19
  /**
20
20
  * Changes background color
@@ -1,6 +1,6 @@
1
1
  import { type PropType } from 'vue';
2
2
  import type { DateRange } from './types';
3
- import type { Optional, ValidationState } from '../../types';
3
+ import type { ValidationState } from '../../types';
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  /**
6
6
  * Label for the date picker
@@ -2,7 +2,6 @@ import { type PropType } from 'vue';
2
2
  import type { Moment } from 'moment';
3
3
  import { type CalendarPresetLabel, type CalendarPreset } from './calendar-presets';
4
4
  import type { DateRange } from './types';
5
- import type { Voidable } from '../../types';
6
5
  declare const _default: import("vue").DefineComponent<{
7
6
  modelValue: {
8
7
  type: PropType<string | DateRange>;
@@ -82,7 +81,7 @@ declare const _default: import("vue").DefineComponent<{
82
81
  start: string | Moment | Date;
83
82
  end: string | Moment | Date;
84
83
  isRelative: boolean;
85
- relativeFilterValue: import("../../types").Nullable<string>;
84
+ relativeFilterValue: Nullable<string>;
86
85
  presetName: string;
87
86
  presetLabel: string;
88
87
  } | {
@@ -123,7 +123,7 @@ declare const _default: import("vue").DefineComponent<{
123
123
  start: string | Date;
124
124
  end: string | Date;
125
125
  isRelative: boolean;
126
- relativeFilterValue: import("../../types").Nullable<string>;
126
+ relativeFilterValue: Nullable<string>;
127
127
  } | null;
128
128
  prepareValueDatepicker(): {
129
129
  start: Date;
@@ -1,5 +1,4 @@
1
1
  import type { Moment } from 'moment';
2
- import type { Nullable } from '../../types';
3
2
  export type DateRange<T = Date | string | Moment> = {
4
3
  start: T;
5
4
  end: T;
@@ -118,6 +118,8 @@ export declare const RIconNames: {
118
118
  allowlists: string;
119
119
  'collapse-layout': string;
120
120
  'rebilly-icon': string;
121
+ sun: string;
122
+ moon: string;
121
123
  };
122
124
  export declare const RIconColors: {
123
125
  default: null;
@@ -1,5 +1,4 @@
1
1
  import { type PropType } from 'vue';
2
- import type { Nullable } from '../../types';
3
2
  declare const _default: import("vue").DefineComponent<{
4
3
  /**
5
4
  * TBD
@@ -1,5 +1,4 @@
1
1
  import { type PropType } from 'vue';
2
- import type { Nullable } from '../../types';
3
2
  type Position = 'bottomStart' | 'bottomEnd' | 'topStart' | 'topEnd';
4
3
  interface Month {
5
4
  monthIndex: Nullable<number>;
@@ -1,5 +1,4 @@
1
1
  import { type PropType } from 'vue';
2
- import type { Nullable } from '../../types';
3
2
  interface State {
4
3
  id: string;
5
4
  hideTimer: Nullable<ReturnType<typeof setTimeout>>;
@@ -1,6 +1,5 @@
1
1
  import type { CreateComponentPublicInstance } from 'vue';
2
2
  import type { Query, Value, CacheItem, Methods, AsyncSearchFn, Options } from './types';
3
- import type { Nullable, Optional } from '../../types';
4
3
  export type CacheValuePrefix = (value: unknown) => string;
5
4
  export interface Config {
6
5
  limit: number;
@@ -1,7 +1,7 @@
1
1
  import type { PropType, StyleValue } from 'vue';
2
2
  import { AsyncExtension, type Config } from './async-extension';
3
3
  import type { Query, OptionItem, Options, AsyncSearchFn, ComplexOptionItem } from './types';
4
- import type { Nullable, ValidationState } from '../../types';
4
+ import type { ValidationState } from '../../types';
5
5
  interface Message {
6
6
  loading: string;
7
7
  more: (count: number) => string;
@@ -1,7 +1,6 @@
1
1
  import { type PropType, type Ref } from 'vue';
2
2
  import type { RouteLocation } from 'vue-router';
3
3
  import type { Tab } from './types';
4
- import type { Optional } from '../../types';
5
4
  declare const _default: import("vue").DefineComponent<{
6
5
  name: {
7
6
  required: true;
@@ -1,6 +1,5 @@
1
1
  import type { RouteLocation } from 'vue-router';
2
2
  import type { Tab } from './types';
3
- import type { Nullable } from '../../types';
4
3
  interface State {
5
4
  tabs: Tab[];
6
5
  }
@@ -1,6 +1,5 @@
1
1
  import type { Ref } from 'vue';
2
2
  import type { RouteLocation } from 'vue-router';
3
- import type { Optional } from '../../types';
4
3
  export interface ReactiveTab {
5
4
  tabId: Ref<string>;
6
5
  tabPanelId: Ref<string>;
@@ -1,4 +1,4 @@
1
- import type { ApiError, Nullable } from '../../types';
1
+ import type { ApiError } from '../../types';
2
2
  export declare class DefaultErrorHandler {
3
3
  static parseError(error: Nullable<ApiError>, defaultMessage?: string): string[];
4
4
  }
@@ -1,5 +1,4 @@
1
1
  import { type PropType, type Component } from 'vue';
2
- import type { Nullable } from '../../types';
3
2
  interface State {
4
3
  isVisible: boolean;
5
4
  timerHandle: Nullable<ReturnType<typeof setTimeout>>;
@@ -1,5 +1,4 @@
1
1
  import type { Directive } from 'vue';
2
- import type { Nullable } from '../../types';
3
2
  interface ClickOutsideTarget extends HTMLElement {
4
3
  clickOutside: Nullable<(event: MouseEvent) => void>;
5
4
  }
@@ -1,6 +1,5 @@
1
1
  import type { Directive } from 'vue';
2
2
  import './r-tooltip.scss';
3
- import type { Nullable } from '../../types';
4
3
  interface ToolTipTarget extends HTMLElement {
5
4
  vTooltipEnter: Nullable<() => void>;
6
5
  vTooltipLeave: Nullable<() => void>;
package/dist/revel.mjs CHANGED
@@ -8890,7 +8890,7 @@ const VB = /* @__PURE__ */ bM(IB);
8890
8890
  function xB(M) {
8891
8891
  return VB(M) === M.toLowerCase();
8892
8892
  }
8893
- function wb(M = null) {
8893
+ function wb(M) {
8894
8894
  return M !== null && typeof M == "object" && !Array.isArray(M);
8895
8895
  }
8896
8896
  function HB(M) {
@@ -9066,7 +9066,13 @@ function ZB(M, b, z, p, o, O) {
9066
9066
  ])
9067
9067
  ], 16);
9068
9068
  }
9069
- const JO = /* @__PURE__ */ s0(YB, [["render", ZB]]), mo = ["gray", "yellow", "green", "accent", "dark-background"], QB = G({
9069
+ const JO = /* @__PURE__ */ s0(YB, [["render", ZB]]), mo = [
9070
+ "gray",
9071
+ "yellow",
9072
+ "green",
9073
+ "accent",
9074
+ "dark-background"
9075
+ ], QB = G({
9070
9076
  name: "RAvatar",
9071
9077
  components: { RIcon: u1, RImg: JO },
9072
9078
  customElement: !0,
@@ -14504,7 +14510,9 @@ const M$ = (M, b) => ({
14504
14510
  reports: "reports",
14505
14511
  allowlists: "allowlists",
14506
14512
  "collapse-layout": "collapse-layout",
14507
- "rebilly-icon": "rebilly-icon"
14513
+ "rebilly-icon": "rebilly-icon",
14514
+ sun: "sun",
14515
+ moon: "moon"
14508
14516
  }, mC = {
14509
14517
  default: null,
14510
14518
  "on-surface": "on-surface",
@@ -15493,6 +15501,18 @@ const M$ = (M, b) => ({
15493
15501
  <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path d="M16 1a3 3 0 0 1 3 3v12a3 3 0 0 1-3 3H4a3 3 0 0 1-3-3V4a3 3 0 0 1 3-3Zm0 2H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4a1 1 0 0 0-1-1ZM6 9a1 1 0 0 1 1 1v4a1 1 0 0 1-2 0v-4a1 1 0 0 1 1-1Zm4-2a1 1 0 0 1 1 1v6a1 1 0 0 1-2 0V8a1 1 0 0 1 1-1Zm4-2a1 1 0 0 1 1 1v8a1 1 0 0 1-2 0V6a1 1 0 0 1 1-1Z"/></svg>
15494
15502
  </symbol>
15495
15503
  </svg>
15504
+ <!-- Sun icon -->
15505
+ <svg xmlns="http://www.w3.org/2000/svg">
15506
+ <symbol id="icon-${h.sun}">
15507
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path fill-rule="nonzero" d="M10 1a1 1 0 0 1 1 1v2l-.004.082c.915.153 1.76.513 2.485 1.03l.055-.062 1.414-1.414a1 1 0 1 1 1.414 1.414L14.95 6.464l-.062.055c.517.725.877 1.57 1.03 2.485L16 9h2a1 1 0 0 1 0 2h-2l-.082-.004a5.968 5.968 0 0 1-1.03 2.485.573.573 0 0 1 .062.055l1.414 1.414a1 1 0 1 1-1.414 1.414l-1.414-1.414-.055-.062a5.968 5.968 0 0 1-2.485 1.03A.723.723 0 0 1 11 16v2a1 1 0 0 1-2 0v-2l.004-.082a5.968 5.968 0 0 1-2.485-1.03l-.055.062-1.414 1.414a1 1 0 0 1-1.414-1.414l1.414-1.414.062-.055a5.968 5.968 0 0 1-1.03-2.485L4 11H2a1 1 0 0 1 0-2h2l.082.004a5.968 5.968 0 0 1 1.03-2.485.573.573 0 0 1-.062-.055L3.636 5.05A1 1 0 0 1 5.05 3.636L6.464 5.05l.055.062a5.968 5.968 0 0 1 2.485-1.03A.725.725 0 0 1 9 4V2a1 1 0 0 1 1-1Zm0 5a4 4 0 1 0 0 8 4 4 0 0 0 0-8Z"/></svg>
15508
+ </symbol>
15509
+ </svg>
15510
+ <!-- Moon icon -->
15511
+ <svg xmlns="http://www.w3.org/2000/svg">
15512
+ <symbol id="icon-${h.moon}">
15513
+ <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20"><path fill-rule="nonzero" d="M12 3a7 7 0 1 0 3.002 13.325 1 1 0 0 0 .203-1.677A5.985 5.985 0 0 1 13 10c0-1.825.819-3.514 2.206-4.648a1 1 0 0 0-.204-1.677A6.976 6.976 0 0 0 12 3Zm.281 2.008c.093.005.186.013.278.023l.154.021-.012.015A7.975 7.975 0 0 0 11 10l.006.303a7.973 7.973 0 0 0 1.495 4.364l.212.28-.154.022A5 5 0 1 1 12 5l.282.009Z"/></svg>
15514
+ </symbol>
15515
+ </svg>
15496
15516
  `;
15497
15517
  function ce(M = document.body) {
15498
15518
  if (!M?.querySelector(