@citruslime/ui 1.2.0-beta.0 → 1.2.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 (140) hide show
  1. package/README.md +5 -4
  2. package/dist/citrus-lime-ui.es.js +4602 -0
  3. package/dist/citrus-lime-ui.umd.js +2 -0
  4. package/dist/components/accordion/cl-ui-accordion.vue.d.ts +26 -0
  5. package/dist/components/accordion/index.d.ts +4 -0
  6. package/dist/components/accordion/item/cl-ui-accordion-item.vue.d.ts +35 -0
  7. package/dist/{@types/components/accordion/item.d.ts → components/accordion/types.d.ts} +0 -0
  8. package/dist/components/app/cl-ui-app.vue.d.ts +51 -0
  9. package/dist/components/app/index.d.ts +1 -0
  10. package/dist/components/button/cl-ui-button.vue.d.ts +51 -0
  11. package/dist/components/button/index.d.ts +2 -0
  12. package/dist/components/button/types.d.ts +4 -0
  13. package/dist/components/calendar/cl-ui-calendar.vue.d.ts +2 -0
  14. package/dist/components/calendar/index.d.ts +2 -0
  15. package/dist/components/calendar/types.d.ts +2 -0
  16. package/dist/components/calendar/utils.d.ts +38 -0
  17. package/dist/components/card/cl-ui-card.vue.d.ts +27 -0
  18. package/dist/components/card/index.d.ts +2 -0
  19. package/dist/components/card/types.d.ts +2 -0
  20. package/dist/components/combo-box/cl-ui-combo-box.vue.d.ts +583 -0
  21. package/dist/components/combo-box/index.d.ts +2 -0
  22. package/dist/components/combo-box/search-container/cl-ui-combo-box-search.vue.d.ts +276 -0
  23. package/dist/components/combo-box/search-container/header/cl-ui-combo-box-header.vue.d.ts +42 -0
  24. package/dist/components/combo-box/search-container/selectable/cl-ui-combo-box-selectable.vue.d.ts +81 -0
  25. package/dist/{@types/components/combo-box/item.d.ts → components/combo-box/types.d.ts} +0 -0
  26. package/dist/components/footer/index.d.ts +1 -0
  27. package/dist/components/grid/cell/cl-ui-grid-cell.vue.d.ts +72 -0
  28. package/dist/components/grid/cl-ui-grid.vue.d.ts +550 -0
  29. package/dist/components/grid/filter/cl-ui-grid-filter.vue.d.ts +72 -0
  30. package/dist/components/grid/filter/filter-methods.d.ts +5 -0
  31. package/dist/components/grid/footer/cl-ui-grid-footer.vue.d.ts +63 -0
  32. package/dist/components/grid/header/cl-ui-grid-header.vue.d.ts +207 -0
  33. package/dist/components/grid/index.d.ts +2 -0
  34. package/dist/components/grid/types.d.ts +92 -0
  35. package/dist/components/grid/view-manager/cl-ui-grid-view-manager.vue.d.ts +88 -0
  36. package/dist/components/header/index.d.ts +2 -0
  37. package/dist/components/header/menu/cl-ui-header-menu.vue.d.ts +40 -0
  38. package/dist/components/header/menu/index.d.ts +1 -0
  39. package/dist/components/index.d.ts +16 -14
  40. package/dist/components/input/cl-ui-input.vue.d.ts +2 -0
  41. package/dist/components/input/index.d.ts +2 -0
  42. package/dist/components/input/types.d.ts +6 -0
  43. package/dist/components/input/utils.d.ts +44 -0
  44. package/dist/components/language-switcher/cl-ui-language-switcher.vue.d.ts +37 -0
  45. package/dist/components/language-switcher/index.d.ts +2 -0
  46. package/dist/{@types/language.d.ts → components/language-switcher/types.d.ts} +0 -1
  47. package/dist/components/loading-spinner/index.d.ts +1 -0
  48. package/dist/components/login/cl-ui-login.vue.d.ts +106 -0
  49. package/dist/components/login/index.d.ts +2 -0
  50. package/dist/{@types/components/login/authentication.d.ts → components/login/types.d.ts} +0 -0
  51. package/dist/components/modal/cl-ui-modal.vue.d.ts +49 -0
  52. package/dist/components/modal/index.d.ts +2 -0
  53. package/dist/components/modal/types.d.ts +4 -0
  54. package/dist/components/navigation/cl-ui-navigation.vue.d.ts +11 -0
  55. package/dist/components/navigation/group/cl-ui-navigation-group.vue.d.ts +12 -0
  56. package/dist/components/navigation/icon/cl-ui-navigation-icon.vue.d.ts +20 -0
  57. package/dist/components/navigation/index.d.ts +5 -0
  58. package/dist/components/notification/cl-ui-notification.vue.d.ts +36 -0
  59. package/dist/components/notification/index.d.ts +1 -0
  60. package/dist/components/notification/types.d.ts +9 -0
  61. package/dist/components/slider/cl-ui-slider.vue.d.ts +114 -0
  62. package/dist/components/slider/index.d.ts +1 -0
  63. package/dist/components/tab/cl-ui-tab.vue.d.ts +52 -0
  64. package/dist/components/tab/header/cl-ui-tab-header.vue.d.ts +60 -0
  65. package/dist/components/tab/index.d.ts +4 -0
  66. package/dist/components/tab/types.d.ts +4 -0
  67. package/dist/composables/notification.d.ts +1 -1
  68. package/dist/main.d.ts +3 -5
  69. package/dist/style.css +1 -1
  70. package/dist/utils/i18n/config.d.ts +33 -0
  71. package/dist/utils/i18n/defaults.d.ts +4 -0
  72. package/dist/utils/i18n/index.d.ts +3 -0
  73. package/dist/utils/i18n/types.d.ts +97 -0
  74. package/dist/utils/index.d.ts +2 -6
  75. package/dist/utils/validation.d.ts +37 -0
  76. package/package.json +29 -13
  77. package/dist/.eslintrc.js +0 -448
  78. package/dist/.stylelintrc.js +0 -119
  79. package/dist/@types/appUser.d.ts +0 -10
  80. package/dist/@types/components/accordion/index.d.ts +0 -1
  81. package/dist/@types/components/combo-box/index.d.ts +0 -2
  82. package/dist/@types/components/combo-box/localisations.d.ts +0 -19
  83. package/dist/@types/components/grid/column.d.ts +0 -45
  84. package/dist/@types/components/grid/index.d.ts +0 -4
  85. package/dist/@types/components/grid/localisations.d.ts +0 -47
  86. package/dist/@types/components/grid/request.d.ts +0 -49
  87. package/dist/@types/components/grid/update.d.ts +0 -4
  88. package/dist/@types/components/header/index.d.ts +0 -2
  89. package/dist/@types/components/header/localisations.d.ts +0 -8
  90. package/dist/@types/components/header/navigation.d.ts +0 -15
  91. package/dist/@types/components/login/index.d.ts +0 -2
  92. package/dist/@types/components/login/localisations.d.ts +0 -7
  93. package/dist/@types/components/notification/index.d.ts +0 -1
  94. package/dist/@types/components/notification/item.d.ts +0 -7
  95. package/dist/@types/components/slider/index.d.ts +0 -1
  96. package/dist/@types/components/slider/localisations.d.ts +0 -3
  97. package/dist/@types/date-format.d.ts +0 -8
  98. package/dist/@types/debouncer.d.ts +0 -6
  99. package/dist/@types/index.d.ts +0 -15
  100. package/dist/@types/locale.d.ts +0 -10
  101. package/dist/@types/number-format.d.ts +0 -7
  102. package/dist/@types/string-format.d.ts +0 -3
  103. package/dist/@types/string.d.ts +0 -47
  104. package/dist/theme.js +0 -122
  105. package/dist/ui.es.js +0 -1
  106. package/dist/ui.umd.js +0 -1
  107. package/dist/utils/copy.d.ts +0 -8
  108. package/dist/utils/debouncer.d.ts +0 -8
  109. package/dist/utils/extensions/string-utilities.d.ts +0 -83
  110. package/dist/utils/extensions/string.d.ts +0 -1
  111. package/dist/utils/i18n/datetime-formats.d.ts +0 -3
  112. package/dist/utils/i18n/number-formats.d.ts +0 -3
  113. package/dist/utils/id.d.ts +0 -6
  114. package/dist/utils/name-of.d.ts +0 -7
  115. package/dist/utils/sort.d.ts +0 -9
  116. package/dist/utils/url-params.d.ts +0 -8
  117. package/src/components/accordion/accordion.vue +0 -30
  118. package/src/components/button/button.vue +0 -28
  119. package/src/components/calendar/calendar.vue +0 -35
  120. package/src/components/card/card.vue +0 -54
  121. package/src/components/combo-box/combo-box.vue +0 -78
  122. package/src/components/combo-box/search-container/header-option/header-option.vue +0 -21
  123. package/src/components/combo-box/search-container/search-container.vue +0 -57
  124. package/src/components/combo-box/search-container/selectable-option/selectable-option.vue +0 -27
  125. package/src/components/footer/footer.vue +0 -23
  126. package/src/components/grid/cell/cell.vue +0 -64
  127. package/src/components/grid/filter/filter.vue +0 -93
  128. package/src/components/grid/footer/footer.vue +0 -91
  129. package/src/components/grid/grid.vue +0 -194
  130. package/src/components/grid/header/header.vue +0 -39
  131. package/src/components/grid/view-manager/view-manager.vue +0 -73
  132. package/src/components/header/header-helper/header-helper.vue +0 -95
  133. package/src/components/header/header.vue +0 -33
  134. package/src/components/header/navigation/navigation.vue +0 -84
  135. package/src/components/language-switcher/language-switcher.vue +0 -36
  136. package/src/components/loading-spinner/loading-spinner.vue +0 -8
  137. package/src/components/login/login.vue +0 -101
  138. package/src/components/modal/modal.vue +0 -48
  139. package/src/components/notification/notification.vue +0 -36
  140. package/src/components/slider/slider.vue +0 -41
@@ -1,47 +0,0 @@
1
- export interface GridLocalisations {
2
- confirmFilters: string;
3
- manageView: string;
4
- noData: string;
5
- noDataFiltersPresent: string;
6
- field: string;
7
- filter: string;
8
- sortBy: string;
9
- gridTools: string;
10
- }
11
- export interface GridHeaderLocalisations {
12
- editData: string;
13
- finishEditing: string;
14
- clearFilters: string;
15
- modifyFilters: string;
16
- }
17
- export interface GridFilterLocalisations {
18
- equal: string;
19
- notequal: string;
20
- contains: string;
21
- notcontains: string;
22
- startswith: string;
23
- endswith: string;
24
- lessthan: string;
25
- greaterthan: string;
26
- equalorlessthan: string;
27
- equalorgreaterthan: string;
28
- currentMethod: string;
29
- availableMethods: string;
30
- true: string;
31
- false: string;
32
- selectDate: string;
33
- selectDateTime: string;
34
- }
35
- export interface GridFooterLocalisations {
36
- page: string;
37
- pageSize: string;
38
- totalRecords: string;
39
- jumpToPage: string;
40
- }
41
- export interface GridViewManagerLocalisations {
42
- manageView: string;
43
- column: string;
44
- visible: string;
45
- order: string;
46
- hidden: string;
47
- }
@@ -1,49 +0,0 @@
1
- export declare enum FilterOperation {
2
- CONTAINS = 0,
3
- NOT_CONTAINS = 1,
4
- EQUAL = 2,
5
- NOT_EQUAL = 3,
6
- STARTS_WITH = 4,
7
- ENDS_WITH = 5,
8
- GREATER_THAN = 6,
9
- LESS_THAN = 7,
10
- EQUAL_OR_GREATER_THAN = 8,
11
- EQUAL_OR_LESS_THAN = 9
12
- }
13
- export declare type FilterMethodType = 'equal' | 'notequal' | 'contains' | 'notcontains' | 'lessthan' | 'greaterthan' | 'startswith' | 'endswith' | 'equalorlessthan' | 'equalorgreaterthan';
14
- interface FilterArgs {
15
- filterOnColumn: string;
16
- filterMethod?: FilterMethodType;
17
- filterOperation: FilterOperation;
18
- filterValue: string;
19
- }
20
- interface SortArgs {
21
- sortOnColumn: string;
22
- sortByAscending: boolean;
23
- }
24
- export interface FilterRequest {
25
- filters: FilterArgs[];
26
- pageNumber: number;
27
- pageSize: number;
28
- sort: SortArgs | null;
29
- }
30
- export interface FilterResponse<T> {
31
- results: T[];
32
- totalRecords: number;
33
- }
34
- /**
35
- * Checks if the provided object is of type FilterRequest.
36
- *
37
- * @param objectToTest The object to validate.
38
- * @returns True if the object is a FilterRequest; false otherwise.
39
- */
40
- export declare function isFilterRequest(objectToTest: FilterRequest): boolean;
41
- /**
42
- * Checks if the provided object is of type FilterResponse.
43
- *
44
- * @param objectToTest The object to validate.
45
- * @param resultValidator Function to validate the list of Ts inside a FilterResponse.
46
- * @returns True if the object is a FilterResponse; false otherwise.
47
- */
48
- export declare function isFilterResponse<T>(objectToTest: FilterResponse<T>, resultValidator: (resultToTest: T) => boolean): boolean;
49
- export {};
@@ -1,4 +0,0 @@
1
- export interface GridUpdateModel {
2
- index: number;
3
- record: Record<string, unknown>;
4
- }
@@ -1,2 +0,0 @@
1
- export * from './localisations';
2
- export * from './navigation';
@@ -1,8 +0,0 @@
1
- export interface HeaderHelperLocalisations {
2
- helpLabel: string;
3
- helpMessage: string;
4
- support: string;
5
- feedback: string;
6
- website: string;
7
- logout: string;
8
- }
@@ -1,15 +0,0 @@
1
- export interface NavigationGroup {
2
- name: string;
3
- caption: string;
4
- icon: string | null;
5
- records: NavigationRecord[];
6
- collapsed: boolean;
7
- disabled: boolean;
8
- }
9
- export interface NavigationRecord {
10
- name: string;
11
- caption: string;
12
- link: string;
13
- linkIsExternal?: boolean;
14
- active: boolean;
15
- }
@@ -1,2 +0,0 @@
1
- export * from './authentication';
2
- export * from './localisations';
@@ -1,7 +0,0 @@
1
- export interface LoginLocalisations {
2
- login: string;
3
- email: string;
4
- password: string;
5
- validEmail: string;
6
- invalidEmail: string;
7
- }
@@ -1 +0,0 @@
1
- export * from './item';
@@ -1,7 +0,0 @@
1
- declare type NotificationColour = 'default' | 'primary' | 'secondary' | 'danger' | 'warning';
2
- export interface NotificationItem {
3
- message: string;
4
- colour: NotificationColour;
5
- duration: number;
6
- }
7
- export {};
@@ -1 +0,0 @@
1
- export * from './localisations';
@@ -1,3 +0,0 @@
1
- export interface SliderLocalisations {
2
- invalidProps: string;
3
- }
@@ -1,8 +0,0 @@
1
- export declare enum DateFormat {
2
- SHORT_DATE = "short-date",
3
- SHORT_DATETIME = "short-datetime",
4
- DATE = "date",
5
- DATETIME = "datetime",
6
- LONG_DATE = "long-date",
7
- LONG_DATETIME = "long-datetime"
8
- }
@@ -1,6 +0,0 @@
1
- import { Ref } from 'vue';
2
- export interface Debouncer {
3
- debouncer: Ref<number | null>;
4
- timeout: Ref<number>;
5
- debounce(event: Function, eventArgs: unknown[]): void;
6
- }
@@ -1,15 +0,0 @@
1
- export * from './appUser';
2
- export * from './components/accordion';
3
- export * from './components/combo-box';
4
- export * from './components/grid';
5
- export * from './components/header';
6
- export * from './components/login';
7
- export * from './components/notification';
8
- export * from './components/slider';
9
- export * from './date-format';
10
- export * from './debouncer';
11
- export * from './language';
12
- export * from './locale';
13
- export * from './number-format';
14
- export * from './string';
15
- export * from './string-format';
@@ -1,10 +0,0 @@
1
- export declare enum Locale {
2
- EN_GB = "en-GB",
3
- EN_IE = "en-IE",
4
- EN_US = "en-US",
5
- FR_FR = "fr-FR",
6
- DE_DE = "de-DE",
7
- IT_IT = "it-IT",
8
- NL_NL = "nl-NL",
9
- ES_ES = "es-ES"
10
- }
@@ -1,7 +0,0 @@
1
- export declare enum NumberFormat {
2
- CURRENCY = "currency",
3
- PERCENTAGE = "percentage",
4
- INTEGER = "integer",
5
- DECIMAL = "decimal",
6
- MULTIPLIER = "multiplier"
7
- }
@@ -1,3 +0,0 @@
1
- export declare enum StringFormat {
2
- ELLIPSIS = "ellipsis"
3
- }
@@ -1,47 +0,0 @@
1
- declare global {
2
- interface String {
3
- similarity(comparisonString: string): number;
4
- trimChar(character: string): string;
5
- trimStartChar(character: string): string;
6
- trimEndChar(character: string): string;
7
- trimToLength(length: number, addEllipsis?: boolean): string;
8
- firstCharToUpperCase(locale?: string | string[]): string;
9
- firstCharToLowerCase(locale?: string | string[]): string;
10
- removeWhitespace(): string;
11
- removeNonAlphanumeric(): string;
12
- removeNonAlphabetic(): string;
13
- removeNonNumeric(): string;
14
- replacePlaceholders(...args: string[]): string;
15
- camelCaseToKebabCase(lowerCase?: boolean, locale?: string | string[]): string;
16
- camelCaseToPascalCase(locale?: string | string[]): string;
17
- camelCaseToSentenceCase(locale?: string | string[]): string;
18
- camelCaseToSnakeCase(lowerCase?: boolean, locale?: string | string[]): string;
19
- camelCaseToTitleCase(locale?: string | string[]): string;
20
- kebabCaseToCamelCase(locale?: string | string[]): string;
21
- kebabCaseToPascalCase(locale?: string | string[]): string;
22
- kebabCaseToSentenceCase(locale?: string | string[]): string;
23
- kebabCaseToSnakeCase(lowerCase?: boolean, locale?: string | string[]): string;
24
- kebabCaseToTitleCase(locale?: string | string[]): string;
25
- pascalCaseToCamelCase(locale?: string | string[]): string;
26
- pascalCaseToKebabCase(lowerCase?: boolean, locale?: string | string[]): string;
27
- pascalCaseToSentenceCase(locale?: string | string[]): string;
28
- pascalCaseToSnakeCase(lowerCase?: boolean, locale?: string | string[]): string;
29
- pascalCaseToTitleCase(locale?: string | string[]): string;
30
- sentenceCaseToCamelCase(locale?: string | string[]): string;
31
- sentenceCaseToKebabCase(lowerCase?: boolean, locale?: string | string[]): string;
32
- sentenceCaseToPascalCase(locale?: string | string[]): string;
33
- sentenceCaseToSnakeCase(lowerCase?: boolean, locale?: string | string[]): string;
34
- sentenceCaseToTitleCase(locale?: string | string[]): string;
35
- snakeCaseToCamelCase(locale?: string | string[]): string;
36
- snakeCaseToKebabCase(lowerCase?: boolean, locale?: string | string[]): string;
37
- snakeCaseToPascalCase(locale?: string | string[]): string;
38
- snakeCaseToSentenceCase(locale?: string | string[]): string;
39
- snakeCaseToTitleCase(locale?: string | string[]): string;
40
- titleCaseToCamelCase(locale?: string | string[]): string;
41
- titleCaseToKebabCase(lowerCase?: boolean, locale?: string | string[]): string;
42
- titleCaseToPascalCase(locale?: string | string[]): string;
43
- titleCaseToSentenceCase(locale?: string | string[]): string;
44
- titleCaseToSnakeCase(lowerCase?: boolean, locale?: string | string[]): string;
45
- }
46
- }
47
- export {};
package/dist/theme.js DELETED
@@ -1,122 +0,0 @@
1
- // eslint-disable-next-line @typescript-eslint/naming-convention
2
- const _ = require('lodash');
3
- const colours = require('tailwindcss/colors');
4
-
5
- module.exports = {
6
- plugins: [
7
- require('@tailwindcss/forms'),
8
- function ({ addUtilities, theme, e }) {
9
- const fontWeights = theme('fontWeight');
10
- const padding = theme('padding');
11
-
12
- const emphasisUtilities = _.flatMap(theme('colors'), (value, key) => {
13
- const result = [];
14
-
15
- if (typeof value !== 'undefined') {
16
- if (typeof value.default !== 'undefined' && typeof value.light !== 'undefined') {
17
- result.push({
18
- [`.${e(`emphasis-${key}`)}`]: {
19
- background: value.light,
20
- color: value.default,
21
- 'font-weight': fontWeights.medium,
22
- padding: padding['p-3']
23
- }
24
- });
25
- }
26
-
27
- if (typeof value.light !== 'undefined' && typeof value.lighter !== 'undefined') {
28
- result.push({
29
- [`.${e(`emphasis-${key}-light`)}`]: {
30
- background: value.lighter,
31
- color: value.light,
32
- 'font-weight': fontWeights.medium,
33
- padding: padding['p-3']
34
- }
35
- });
36
- }
37
- }
38
-
39
- return result;
40
- });
41
-
42
- addUtilities(emphasisUtilities);
43
- }
44
- ],
45
- theme: {
46
- colors: {
47
- transparent: 'transparent',
48
- black: colours.black,
49
- white: colours.white,
50
- 'off-white': '#f5f5f5',
51
- primary: {
52
- default: '#9acd32',
53
- light: '#a5d740',
54
- lighter: '#e7f6e5'
55
- },
56
- secondary: {
57
- default: '#30363e',
58
- light: '#48515d'
59
- },
60
- danger: {
61
- default: '#f0506e',
62
- light: '#ffecf0',
63
- dark: '#ce3552'
64
- },
65
- warning: {
66
- default: '#ffeda9',
67
- dark: '#87701c'
68
- },
69
- link: {
70
- default: '#1e90ff',
71
- light: '#51a9ff'
72
- },
73
- blue: {
74
- default: '#637bc6',
75
- light: '#6495ed',
76
- lighter: '#f0f8ff',
77
- hover: '#76a3f6'
78
- },
79
- grey: {
80
- 0: '#eee',
81
- 1: '#e5e5e5',
82
- 2: '#d7d7d7',
83
- 3: '#999',
84
- 4: '#666',
85
- 5: '#5a5a5a',
86
- 6: '#444',
87
- 7: '#333'
88
- }
89
- },
90
- fontSize: {
91
- xs: [ '.75rem' ],
92
- sm: [ '.875rem' ],
93
- base: [ '16px' ],
94
- lg: [ '1.12rem' ],
95
- xl: [ '1.25rem' ],
96
- '2xl': [ '1.5rem' ],
97
- '3xl': [ '1.875rem' ],
98
- '4xl': [ '2rem' ],
99
- '5xl': [ '3rem' ],
100
- '6xl': [ '4rem' ],
101
- '7xl': [ '5rem' ]
102
- },
103
- extend: {
104
- fontFamily: {
105
- sans: [
106
- 'Roboto',
107
- 'sans-serif'
108
- ]
109
- },
110
- scale: {
111
- 101: '1.01'
112
- }
113
- }
114
- },
115
- variants: {
116
- extend: {
117
- width: [ 'group-hover' ],
118
- height: [ 'group-hover' ],
119
- display: [ 'group-hover' ]
120
- }
121
- }
122
- };