@jsfour/root-ui 0.0.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 (158) hide show
  1. package/.stencil/.build/_README.log +8 -0
  2. package/.stencil/.build/optimizeCss_d508b9fc8ae8bf613c09ccb27d146e3a.log +1 -0
  3. package/.stencil/.build/optimizeModule_0b160af7f941adcacfa811e102b08adf.log +2 -0
  4. package/.stencil/.build/optimizeModule_0b246ca6c0647c40ed469a0cf4358a73.log +1 -0
  5. package/.stencil/.build/optimizeModule_1bed709b53ef02375e9f61a9dfa643f3.log +1 -0
  6. package/.stencil/.build/optimizeModule_1d7b03de1d56993f8736d0dfa953b016.log +1 -0
  7. package/.stencil/.build/optimizeModule_211068a08f9a2243f9b6bbc0d066ca7b.log +1 -0
  8. package/.stencil/.build/optimizeModule_2187d3c4a8fdf77d63b94a49e5339089.log +1 -0
  9. package/.stencil/.build/optimizeModule_25ac0c9c93505850d30d777a8983d6cc.log +1 -0
  10. package/.stencil/.build/optimizeModule_2a8347890bf34de8ebcd825e93de4eac.log +1 -0
  11. package/.stencil/.build/optimizeModule_310d74be43349d9cd4462216f44e3025.log +1 -0
  12. package/.stencil/.build/optimizeModule_35ed1b3083d56d1312b29cdc8702dde6.log +1 -0
  13. package/.stencil/.build/optimizeModule_3abf5364bd9f3e07cabdf31f25fdfccd.log +1 -0
  14. package/.stencil/.build/optimizeModule_3c694181a383d2d5d7c43959dae3fc40.log +2 -0
  15. package/.stencil/.build/optimizeModule_3e5a7a979ee157dee476e23a940398bf.log +1 -0
  16. package/.stencil/.build/optimizeModule_3f113b87a2543efdae16831cf4a13466.log +1 -0
  17. package/.stencil/.build/optimizeModule_4cf0a704790c64fa3e7636ba3472dff6.log +1 -0
  18. package/.stencil/.build/optimizeModule_5473d4453ebf4ef999ac7777394048db.log +1 -0
  19. package/.stencil/.build/optimizeModule_56e4598e7f285cec042c0632923a473c.log +1 -0
  20. package/.stencil/.build/optimizeModule_5721447e0280cf2192180b57b6ffd931.log +1 -0
  21. package/.stencil/.build/optimizeModule_5fe32756e8649adbca14ee76bdfbfad3.log +2 -0
  22. package/.stencil/.build/optimizeModule_60477845aacd02169ef3d0091bfb345f.log +1 -0
  23. package/.stencil/.build/optimizeModule_645cc880dd3009950a72ea147a926718.log +1 -0
  24. package/.stencil/.build/optimizeModule_64633d5e5c5103adb5683fc19edaa8b8.log +1 -0
  25. package/.stencil/.build/optimizeModule_6b615133c24ac4e6c5428eb74470b5cb.log +1 -0
  26. package/.stencil/.build/optimizeModule_6e9d6355a774b23f578c75f14d78e605.log +1 -0
  27. package/.stencil/.build/optimizeModule_8797e91e099ec89d9158d143cc9e8199.log +1 -0
  28. package/.stencil/.build/optimizeModule_8a9445cafc85dc657334e37e1fce6fdc.log +1 -0
  29. package/.stencil/.build/optimizeModule_8c399f3f088e7f1cbb87f65d8e96bfc4.log +1 -0
  30. package/.stencil/.build/optimizeModule_90f423b7b20b32670cb13ca6605940fa.log +1 -0
  31. package/.stencil/.build/optimizeModule_9d37b0c4d3ae587fe9c9f384659ac198.log +1 -0
  32. package/.stencil/.build/optimizeModule_9eb9260f8aec9636ffc5e00444eaa1ea.log +1 -0
  33. package/.stencil/.build/optimizeModule_a90d2726fdff70d788aaa8b3fbc0adc7.log +1 -0
  34. package/.stencil/.build/optimizeModule_ad865e38167d997d66ef7128fdb36b5e.log +1 -0
  35. package/.stencil/.build/optimizeModule_b1b3b2dbe6634f16e4a063d74c2df110.log +1 -0
  36. package/.stencil/.build/optimizeModule_b24fa4d64bacca187db7a0654705e182.log +1 -0
  37. package/.stencil/.build/optimizeModule_b90b0f1d4d3dd3aae106476a0cce19c0.log +1 -0
  38. package/.stencil/.build/optimizeModule_c0fee36e4d0c0c701c749a56eec1f7d8.log +1 -0
  39. package/.stencil/.build/optimizeModule_ceeae0c907ecc2a87e2ad19d79e99510.log +1 -0
  40. package/.stencil/.build/optimizeModule_d68f87c26c9b5557f71199e397b81fde.log +1 -0
  41. package/.stencil/.build/optimizeModule_d6b6b4cfa8009d54eb301d8147c45850.log +1 -0
  42. package/.stencil/.build/optimizeModule_d7a4dadc89824480596190cf7a033e72.log +1 -0
  43. package/.stencil/.build/optimizeModule_ddf02b2e19bf055fcfd20ed5dc8b956d.log +2 -0
  44. package/.stencil/.build/optimizeModule_eb39a27ff5ef48385b4bf233760a7d1f.log +1 -0
  45. package/.stencil/.build/optimizeModule_eee1991c594a387b17e535171c33abbf.log +1 -0
  46. package/.stencil/.build/optimizeModule_f0d6e7e6666905c8da7d7450a1b4088b.log +1 -0
  47. package/.stencil/.build/optimizeModule_f93c97ed92b866fd99189e5a0a44e774.log +1 -0
  48. package/.stencil/.build/optimizeModule_fdf66b9636906890546dde0f834d4d8e.log +1 -0
  49. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  50. package/dist/cjs/index-CbJkKnHq.js +3244 -0
  51. package/dist/cjs/index.cjs.js +25 -0
  52. package/dist/cjs/loader.cjs.js +13 -0
  53. package/dist/cjs/root-badge_6.cjs.entry.js +343 -0
  54. package/dist/cjs/stencil-library.cjs.js +25 -0
  55. package/dist/collection/collection-manifest.json +17 -0
  56. package/dist/collection/components/badge/badge-variation.enum.js +9 -0
  57. package/dist/collection/components/badge/badge.css +45 -0
  58. package/dist/collection/components/badge/badge.js +148 -0
  59. package/dist/collection/components/banner/banner-variation.enum.js +9 -0
  60. package/dist/collection/components/banner/banner.css +18 -0
  61. package/dist/collection/components/banner/banner.js +147 -0
  62. package/dist/collection/components/breadcrumbs/breadcrumbs.css +49 -0
  63. package/dist/collection/components/breadcrumbs/breadcrumbs.js +95 -0
  64. package/dist/collection/components/button/button-size.enum.js +5 -0
  65. package/dist/collection/components/button/button-type.enum.js +6 -0
  66. package/dist/collection/components/button/button-variation.enum.js +10 -0
  67. package/dist/collection/components/button/button.css +61 -0
  68. package/dist/collection/components/button/button.js +207 -0
  69. package/dist/collection/components/index.js +6 -0
  70. package/dist/collection/components/input/input-type.enum.js +18 -0
  71. package/dist/collection/components/input/input.css +134 -0
  72. package/dist/collection/components/input/input.js +415 -0
  73. package/dist/collection/components/list/list.css +18 -0
  74. package/dist/collection/components/list/list.js +50 -0
  75. package/dist/collection/enums.js +3 -0
  76. package/dist/collection/global/utils/randomIdGenerator/index.js +7 -0
  77. package/dist/collection/index.js +1 -0
  78. package/dist/components/index.d.ts +35 -0
  79. package/dist/components/index.js +1 -0
  80. package/dist/components/p-CIjEN4Bv.js +1 -0
  81. package/dist/components/p-CvhBNbMT.js +1 -0
  82. package/dist/components/root-badge.d.ts +11 -0
  83. package/dist/components/root-badge.js +1 -0
  84. package/dist/components/root-banner.d.ts +11 -0
  85. package/dist/components/root-banner.js +1 -0
  86. package/dist/components/root-breadcrumbs.d.ts +11 -0
  87. package/dist/components/root-breadcrumbs.js +1 -0
  88. package/dist/components/root-button.d.ts +11 -0
  89. package/dist/components/root-button.js +1 -0
  90. package/dist/components/root-input.d.ts +11 -0
  91. package/dist/components/root-input.js +1 -0
  92. package/dist/components/root-list.d.ts +11 -0
  93. package/dist/components/root-list.js +1 -0
  94. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  95. package/dist/esm/index-Cygc6-mN.js +3236 -0
  96. package/dist/esm/index.js +25 -0
  97. package/dist/esm/loader.js +11 -0
  98. package/dist/esm/root-badge_6.entry.js +336 -0
  99. package/dist/esm/stencil-library.js +21 -0
  100. package/dist/index.cjs.js +1 -0
  101. package/dist/index.js +1 -0
  102. package/dist/stencil-library/index.esm.js +1 -0
  103. package/dist/stencil-library/p-2b062e4c.entry.js +1 -0
  104. package/dist/stencil-library/p-Cygc6-mN.js +2 -0
  105. package/dist/stencil-library/p-DQuL1Twl.js +1 -0
  106. package/dist/stencil-library/stencil-library.esm.js +1 -0
  107. package/dist/types/components/badge/badge-variation.enum.d.ts +8 -0
  108. package/dist/types/components/badge/badge.d.ts +11 -0
  109. package/dist/types/components/banner/banner-variation.enum.d.ts +8 -0
  110. package/dist/types/components/banner/banner.d.ts +11 -0
  111. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +12 -0
  112. package/dist/types/components/button/button-size.enum.d.ts +4 -0
  113. package/dist/types/components/button/button-type.enum.d.ts +5 -0
  114. package/dist/types/components/button/button-variation.enum.d.ts +9 -0
  115. package/dist/types/components/button/button.d.ts +15 -0
  116. package/dist/types/components/index.d.ts +6 -0
  117. package/dist/types/components/input/input-type.enum.d.ts +17 -0
  118. package/dist/types/components/input/input.d.ts +37 -0
  119. package/dist/types/components/list/list.d.ts +7 -0
  120. package/dist/types/components.d.ts +388 -0
  121. package/dist/types/enums.d.ts +3 -0
  122. package/dist/types/global/utils/randomIdGenerator/index.d.ts +1 -0
  123. package/dist/types/index.d.ts +2 -0
  124. package/dist/types/stencil-public-runtime.d.ts +1839 -0
  125. package/package.json +28 -0
  126. package/src/components/badge/badge-variation.enum.ts +9 -0
  127. package/src/components/badge/badge.scss +53 -0
  128. package/src/components/badge/badge.tsx +42 -0
  129. package/src/components/badge/readme.md +27 -0
  130. package/src/components/banner/banner-variation.enum.ts +9 -0
  131. package/src/components/banner/banner.scss +22 -0
  132. package/src/components/banner/banner.tsx +41 -0
  133. package/src/components/banner/readme.md +27 -0
  134. package/src/components/breadcrumbs/breadcrumbs.scss +57 -0
  135. package/src/components/breadcrumbs/breadcrumbs.tsx +74 -0
  136. package/src/components/breadcrumbs/readme.md +24 -0
  137. package/src/components/button/button-size.enum.ts +5 -0
  138. package/src/components/button/button-type.enum.ts +5 -0
  139. package/src/components/button/button-variation.enum.ts +10 -0
  140. package/src/components/button/button.scss +73 -0
  141. package/src/components/button/button.tsx +52 -0
  142. package/src/components/button/readme.md +29 -0
  143. package/src/components/index.ts +7 -0
  144. package/src/components/input/input-type.enum.ts +18 -0
  145. package/src/components/input/input.scss +156 -0
  146. package/src/components/input/input.tsx +264 -0
  147. package/src/components/input/readme.md +34 -0
  148. package/src/components/list/list.scss +21 -0
  149. package/src/components/list/list.tsx +24 -0
  150. package/src/components/list/readme.md +17 -0
  151. package/src/components.d.ts +388 -0
  152. package/src/enums.ts +3 -0
  153. package/src/global/styles/index.scss +0 -0
  154. package/src/global/utils/randomIdGenerator/index.ts +8 -0
  155. package/src/index.html +105 -0
  156. package/src/index.ts +2 -0
  157. package/stencil.config.ts +36 -0
  158. package/tsconfig.json +25 -0
@@ -0,0 +1,134 @@
1
+ .root-input--full-width {
2
+ width: 100%;
3
+ }
4
+ .root-input .root-input-field {
5
+ display: flex;
6
+ align-items: center;
7
+ width: 100%;
8
+ border-radius: 0.75rem;
9
+ background-color: var(--rootsdk-input);
10
+ border: 0.03125rem solid var(--rootsdk-highlight-normal);
11
+ color: var(--rootsdk-text-primary);
12
+ min-height: 2em;
13
+ outline: transparent;
14
+ box-shadow: none;
15
+ padding: 1rem;
16
+ box-sizing: border-box;
17
+ cursor: text;
18
+ }
19
+ .root-input .root-input-field.root-input-field--textarea {
20
+ align-items: flex-start;
21
+ }
22
+ .root-input .root-input-field.root-input-field--file {
23
+ position: relative;
24
+ cursor: pointer;
25
+ }
26
+ .root-input .root-input-field.root-input-field--color {
27
+ position: relative;
28
+ cursor: pointer;
29
+ }
30
+ .root-input .root-input-field:focus-within {
31
+ border: 0.03125rem solid var(--rootsdk-brand-primary);
32
+ }
33
+ .root-input .root-input-field.root-input-field--error {
34
+ border-color: var(--rootsdk-error, #e53935);
35
+ }
36
+ .root-input .root-input-icon {
37
+ margin-right: 0.5rem;
38
+ display: flex;
39
+ align-items: center;
40
+ justify-content: center;
41
+ height: 1em;
42
+ }
43
+ .root-input input {
44
+ flex: 1;
45
+ border: none;
46
+ background: transparent;
47
+ color: inherit;
48
+ font-family: inherit;
49
+ outline: none;
50
+ padding: 0;
51
+ margin: 0;
52
+ text-overflow: ellipsis;
53
+ cursor: text;
54
+ }
55
+ .root-input input[type=file] {
56
+ position: absolute;
57
+ inset: 0;
58
+ opacity: 0;
59
+ cursor: pointer;
60
+ }
61
+ .root-input input[type=color] {
62
+ position: absolute;
63
+ inset: 0;
64
+ opacity: 0;
65
+ cursor: pointer;
66
+ }
67
+ .root-input input::-webkit-calendar-picker-indicator {
68
+ display: none;
69
+ }
70
+ .root-input input::-webkit-outer-spin-button, .root-input input::-webkit-inner-spin-button {
71
+ -webkit-appearance: none;
72
+ margin: 0;
73
+ }
74
+ .root-input textarea {
75
+ flex: 1;
76
+ border: none;
77
+ background: transparent;
78
+ color: inherit;
79
+ font-family: inherit;
80
+ outline: none;
81
+ padding: 0;
82
+ margin: 0;
83
+ resize: vertical;
84
+ min-height: 6rem;
85
+ }
86
+ .root-input .root-input-number-controls {
87
+ display: flex;
88
+ flex-direction: column;
89
+ gap: 0;
90
+ margin-left: 0;
91
+ margin-right: 0.5rem;
92
+ height: 1em;
93
+ line-height: 0.5;
94
+ align-items: center;
95
+ justify-content: center;
96
+ cursor: pointer;
97
+ }
98
+ .root-input .root-input-file-label {
99
+ display: flex;
100
+ align-items: center;
101
+ justify-content: space-between;
102
+ gap: 0.5rem;
103
+ width: 100%;
104
+ pointer-events: none;
105
+ }
106
+ .root-input .root-input-color-label {
107
+ display: flex;
108
+ align-items: center;
109
+ gap: 0.5rem;
110
+ width: 100%;
111
+ pointer-events: none;
112
+ }
113
+ .root-input .root-input-color-swatch {
114
+ width: 1rem;
115
+ height: 1rem;
116
+ border-radius: 4px;
117
+ border: 0.03125rem solid var(--rootsdk-highlight-normal);
118
+ }
119
+ .root-input .root-input-color-text {
120
+ font-family: inherit;
121
+ color: inherit;
122
+ }
123
+ .root-input label {
124
+ font-size: 0.875rem;
125
+ color: var(--rootsdk-text-tertiary);
126
+ text-transform: capitalize;
127
+ margin-bottom: 0.5rem;
128
+ display: block;
129
+ }
130
+ .root-input .root-input-error {
131
+ margin-top: 0.35rem;
132
+ color: var(--rootsdk-error, #e53935);
133
+ font-size: 0.75rem;
134
+ }
@@ -0,0 +1,415 @@
1
+ import { h } from "@stencil/core";
2
+ import { randomIdGenerator } from "../../global/utils/randomIdGenerator";
3
+ import { RootInputType } from "./input-type.enum";
4
+ export class RootInput {
5
+ constructor() {
6
+ this.inputId = randomIdGenerator('root-input');
7
+ this.type = RootInputType.TEXT;
8
+ this.placeholder = '';
9
+ this.value = '';
10
+ this.fullWidth = false;
11
+ this.multiline = false;
12
+ this.icon = true;
13
+ this.showPassword = false;
14
+ this.inputValue = '';
15
+ this.error = '';
16
+ this.touched = false;
17
+ this.hasIcon = false;
18
+ this.fileLabel = 'Select file';
19
+ this.openPicker = () => {
20
+ if (!this.inputRef)
21
+ return;
22
+ const el = this.inputRef;
23
+ if (el instanceof HTMLInputElement && el.showPicker) {
24
+ el.showPicker();
25
+ }
26
+ else {
27
+ el.focus();
28
+ if (el instanceof HTMLInputElement) {
29
+ el.click();
30
+ }
31
+ }
32
+ };
33
+ this.togglePasswordVisibility = () => {
34
+ this.showPassword = !this.showPassword;
35
+ };
36
+ this.incrementNumber = () => {
37
+ if (this.inputRef instanceof HTMLInputElement) {
38
+ this.inputRef.stepUp();
39
+ this.inputValue = this.inputRef.value;
40
+ this.rootInputChange.emit(this.inputValue);
41
+ }
42
+ };
43
+ this.decrementNumber = () => {
44
+ if (this.inputRef instanceof HTMLInputElement) {
45
+ this.inputRef.stepDown();
46
+ this.inputValue = this.inputRef.value;
47
+ this.rootInputChange.emit(this.inputValue);
48
+ }
49
+ };
50
+ this.validate = (val) => {
51
+ if (!val)
52
+ return '';
53
+ if (this.type === RootInputType.EMAIL) {
54
+ const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
55
+ return emailRegex.test(val) ? '' : 'Please enter a valid email address.';
56
+ }
57
+ if (this.type === RootInputType.TEL) {
58
+ const phoneRegex = /^[+]?[- 0-9()]{7,}$/;
59
+ return phoneRegex.test(val) ? '' : 'Please enter a valid phone number.';
60
+ }
61
+ return '';
62
+ };
63
+ this.handleBlur = (e) => {
64
+ this.touched = true;
65
+ this.error = this.validate(this.inputValue);
66
+ this.rootInputBlur.emit(e);
67
+ };
68
+ this.handleChange = (e) => {
69
+ const target = e.target;
70
+ const nextValue = target.value;
71
+ this.inputValue = nextValue;
72
+ this.rootInputChange.emit(nextValue);
73
+ if (this.touched) {
74
+ this.error = this.validate(nextValue);
75
+ }
76
+ };
77
+ this.handleFileChange = (e) => {
78
+ var _a;
79
+ const target = e.target;
80
+ const file = (_a = target.files) === null || _a === void 0 ? void 0 : _a[0];
81
+ if (file) {
82
+ this.fileLabel = file.name;
83
+ }
84
+ else {
85
+ this.fileLabel = 'Select file';
86
+ }
87
+ this.rootInputChange.emit(target.value);
88
+ };
89
+ this.handleFieldClick = () => {
90
+ if (!this.inputRef)
91
+ return;
92
+ if (this.multiline) {
93
+ this.inputRef.focus();
94
+ return;
95
+ }
96
+ if (this.inputRef instanceof HTMLInputElement) {
97
+ if (this.inputRef.type === 'color') {
98
+ this.inputRef.click();
99
+ return;
100
+ }
101
+ if (this.inputRef.type !== 'date') {
102
+ this.inputRef.focus();
103
+ }
104
+ }
105
+ };
106
+ }
107
+ onValueChanged(newValue) {
108
+ this.inputValue = newValue;
109
+ }
110
+ componentWillLoad() {
111
+ this.setHasIcon();
112
+ this.inputValue = this.value;
113
+ }
114
+ setHasIcon() {
115
+ const icon = !!this.hostElement.querySelector('[slot="icon"]');
116
+ if (icon) {
117
+ this.hasIcon = icon;
118
+ }
119
+ }
120
+ render() {
121
+ const inputType = this.type === RootInputType.PASSWORD
122
+ ? (this.showPassword ? 'text' : 'password')
123
+ : this.type;
124
+ const colorValue = this.type === RootInputType.COLOR
125
+ ? (this.inputValue || '#000000')
126
+ : this.inputValue;
127
+ const classes = {
128
+ 'root-input': true,
129
+ 'root-input--full-width': this.fullWidth,
130
+ };
131
+ const fieldClasses = {
132
+ 'root-input-field': true,
133
+ 'root-input-field--error': !!this.error,
134
+ 'root-input-field--file': this.type === RootInputType.FILE,
135
+ 'root-input-field--color': this.type === RootInputType.COLOR,
136
+ 'root-input-field--textarea': this.multiline,
137
+ };
138
+ return (h("div", { key: 'f0cfdfa2a787ca3d24467aa14bed615f003669a3', class: classes }, h("label", { key: 'efdc7aa0e6b58ea500d2496c2536c1ed8e1baaeb', htmlFor: this.inputId }, this.label), h("div", { key: '2aeb9c360647154827070708b7ffa5a9c43b48d6', class: fieldClasses, onClick: this.handleFieldClick }, this.hasIcon && (h("div", { key: '8d48d017c77409a49b23c31af4e8010784f7282b', class: "root-input-icon", onClick: this.openPicker }, h("slot", { key: '063c38a33aefd8b6cb3120a35f45600e998c93fa', name: "icon" }))), this.multiline ? (h("textarea", { ref: (el) => this.inputRef = el, placeholder: this.placeholder, id: this.inputId, name: this.inputName, maxLength: this.maxlength, value: this.inputValue, onBlur: this.handleBlur, onInput: this.handleChange, "aria-invalid": !!this.error ? 'true' : 'false', rows: 3 })) : (h("input", { ref: (el) => this.inputRef = el, placeholder: this.placeholder, id: this.inputId, name: this.inputName, maxLength: this.maxlength, type: inputType, value: colorValue, onBlur: this.handleBlur, onInput: this.type === RootInputType.FILE ? this.handleFileChange : this.handleChange, "aria-invalid": !!this.error ? 'true' : 'false' })), this.type === RootInputType.COLOR && (h("div", { key: '7deca8ea931a30fbcfa02cfc7232266a5d04bd6e', class: "root-input-color-label" }, h("span", { key: '03ea754ebde8113944d7a3ca84dc14fb606bed62', class: "root-input-color-swatch", style: { backgroundColor: colorValue } }), h("span", { key: '912f3e9a93f8c6a5e775b2ba7d5ddcb6976fe288', class: "root-input-color-text" }, colorValue))), this.type === RootInputType.FILE && !this.multiline && (h("div", { key: 'fe5ebf39d54b21740d1ff7e18c8ca28633d894a3', class: "root-input-file-label" }, h("span", { key: 'dab576c2c1ba5b0d8f38cd0a981aa90848a8de58' }, this.fileLabel), h("slot", { key: '4a7469093cb502a4596164a39f7e6ba9a2e45f26', name: "file-icon" }))), this.type === RootInputType.PASSWORD && !this.multiline && (h("div", { key: 'fd783cd0384fd5efd9c12e967bfd990281f9f1aa', class: "root-input-icon", onClick: this.togglePasswordVisibility }, h("slot", { key: '242f5399701370494f5f81d41cc40478136871e0', name: "password-icon" }))), this.type === RootInputType.NUMBER && !this.multiline && (h("div", { key: 'f6fa71e43701933280c41f60a27c6e3f923e3670', class: "root-input-number-controls" }, h("div", { key: '04d2f6d6e152c0c6326c0e9f38b78f6c15ea3626', class: "root-input-icon", onClick: this.incrementNumber }, h("slot", { key: '8de93b51aba6b7f220653c39d8a0e1ba234a15ed', name: "number-up-icon" })), h("div", { key: '2baf375834a3926b36d818f563e4fcf545a4146b', class: "root-input-icon", onClick: this.decrementNumber }, h("slot", { key: 'f4a7772d01d7d78e7a675ae34cee3ae76c92cdce', name: "number-down-icon" }))))), this.error && this.touched && (h("div", { key: 'e0d328cc5154baf82963af89a37e70676df94ee2', class: "root-input-error" }, this.error))));
139
+ }
140
+ static get is() { return "root-input"; }
141
+ static get encapsulation() { return "shadow"; }
142
+ static get originalStyleUrls() {
143
+ return {
144
+ "$": ["input.scss"]
145
+ };
146
+ }
147
+ static get styleUrls() {
148
+ return {
149
+ "$": ["input.css"]
150
+ };
151
+ }
152
+ static get properties() {
153
+ return {
154
+ "inputId": {
155
+ "type": "string",
156
+ "mutable": false,
157
+ "complexType": {
158
+ "original": "string",
159
+ "resolved": "string",
160
+ "references": {}
161
+ },
162
+ "required": false,
163
+ "optional": false,
164
+ "docs": {
165
+ "tags": [],
166
+ "text": ""
167
+ },
168
+ "getter": false,
169
+ "setter": false,
170
+ "reflect": false,
171
+ "attribute": "input-id",
172
+ "defaultValue": "randomIdGenerator('root-input')"
173
+ },
174
+ "type": {
175
+ "type": "string",
176
+ "mutable": false,
177
+ "complexType": {
178
+ "original": "RootInputType",
179
+ "resolved": "RootInputType.COLOR | RootInputType.DATE | RootInputType.EMAIL | RootInputType.FILE | RootInputType.IMAGE | RootInputType.MONTH | RootInputType.NUMBER | RootInputType.PASSWORD | RootInputType.SEARCH | RootInputType.SUBMIT | RootInputType.TEL | RootInputType.TEXT | RootInputType.TIME | RootInputType.URL | RootInputType.WEEK",
180
+ "references": {
181
+ "RootInputType": {
182
+ "location": "import",
183
+ "path": "./input-type.enum",
184
+ "id": "src/components/input/input-type.enum.ts::RootInputType",
185
+ "referenceLocation": "RootInputType"
186
+ }
187
+ }
188
+ },
189
+ "required": false,
190
+ "optional": false,
191
+ "docs": {
192
+ "tags": [],
193
+ "text": ""
194
+ },
195
+ "getter": false,
196
+ "setter": false,
197
+ "reflect": false,
198
+ "attribute": "type",
199
+ "defaultValue": "RootInputType.TEXT"
200
+ },
201
+ "label": {
202
+ "type": "string",
203
+ "mutable": false,
204
+ "complexType": {
205
+ "original": "string",
206
+ "resolved": "string",
207
+ "references": {}
208
+ },
209
+ "required": true,
210
+ "optional": false,
211
+ "docs": {
212
+ "tags": [],
213
+ "text": ""
214
+ },
215
+ "getter": false,
216
+ "setter": false,
217
+ "reflect": false,
218
+ "attribute": "label"
219
+ },
220
+ "inputName": {
221
+ "type": "string",
222
+ "mutable": false,
223
+ "complexType": {
224
+ "original": "string",
225
+ "resolved": "string",
226
+ "references": {}
227
+ },
228
+ "required": false,
229
+ "optional": false,
230
+ "docs": {
231
+ "tags": [],
232
+ "text": ""
233
+ },
234
+ "getter": false,
235
+ "setter": false,
236
+ "reflect": false,
237
+ "attribute": "input-name"
238
+ },
239
+ "placeholder": {
240
+ "type": "string",
241
+ "mutable": false,
242
+ "complexType": {
243
+ "original": "string",
244
+ "resolved": "string",
245
+ "references": {}
246
+ },
247
+ "required": false,
248
+ "optional": false,
249
+ "docs": {
250
+ "tags": [],
251
+ "text": ""
252
+ },
253
+ "getter": false,
254
+ "setter": false,
255
+ "reflect": false,
256
+ "attribute": "placeholder",
257
+ "defaultValue": "''"
258
+ },
259
+ "value": {
260
+ "type": "string",
261
+ "mutable": true,
262
+ "complexType": {
263
+ "original": "string",
264
+ "resolved": "string",
265
+ "references": {}
266
+ },
267
+ "required": false,
268
+ "optional": false,
269
+ "docs": {
270
+ "tags": [],
271
+ "text": ""
272
+ },
273
+ "getter": false,
274
+ "setter": false,
275
+ "reflect": false,
276
+ "attribute": "value",
277
+ "defaultValue": "''"
278
+ },
279
+ "maxlength": {
280
+ "type": "number",
281
+ "mutable": false,
282
+ "complexType": {
283
+ "original": "number",
284
+ "resolved": "number",
285
+ "references": {}
286
+ },
287
+ "required": false,
288
+ "optional": false,
289
+ "docs": {
290
+ "tags": [],
291
+ "text": ""
292
+ },
293
+ "getter": false,
294
+ "setter": false,
295
+ "reflect": false,
296
+ "attribute": "maxlength"
297
+ },
298
+ "fullWidth": {
299
+ "type": "boolean",
300
+ "mutable": false,
301
+ "complexType": {
302
+ "original": "boolean",
303
+ "resolved": "boolean",
304
+ "references": {}
305
+ },
306
+ "required": false,
307
+ "optional": false,
308
+ "docs": {
309
+ "tags": [],
310
+ "text": ""
311
+ },
312
+ "getter": false,
313
+ "setter": false,
314
+ "reflect": false,
315
+ "attribute": "full-width",
316
+ "defaultValue": "false"
317
+ },
318
+ "multiline": {
319
+ "type": "boolean",
320
+ "mutable": false,
321
+ "complexType": {
322
+ "original": "boolean",
323
+ "resolved": "boolean",
324
+ "references": {}
325
+ },
326
+ "required": false,
327
+ "optional": false,
328
+ "docs": {
329
+ "tags": [],
330
+ "text": ""
331
+ },
332
+ "getter": false,
333
+ "setter": false,
334
+ "reflect": false,
335
+ "attribute": "multiline",
336
+ "defaultValue": "false"
337
+ },
338
+ "icon": {
339
+ "type": "boolean",
340
+ "mutable": false,
341
+ "complexType": {
342
+ "original": "boolean",
343
+ "resolved": "boolean",
344
+ "references": {}
345
+ },
346
+ "required": false,
347
+ "optional": false,
348
+ "docs": {
349
+ "tags": [],
350
+ "text": ""
351
+ },
352
+ "getter": false,
353
+ "setter": false,
354
+ "reflect": false,
355
+ "attribute": "icon",
356
+ "defaultValue": "true"
357
+ }
358
+ };
359
+ }
360
+ static get states() {
361
+ return {
362
+ "showPassword": {},
363
+ "inputValue": {},
364
+ "error": {},
365
+ "touched": {},
366
+ "hasIcon": {},
367
+ "fileLabel": {}
368
+ };
369
+ }
370
+ static get events() {
371
+ return [{
372
+ "method": "rootInputChange",
373
+ "name": "rootInputChange",
374
+ "bubbles": true,
375
+ "cancelable": true,
376
+ "composed": true,
377
+ "docs": {
378
+ "tags": [],
379
+ "text": ""
380
+ },
381
+ "complexType": {
382
+ "original": "string",
383
+ "resolved": "string",
384
+ "references": {}
385
+ }
386
+ }, {
387
+ "method": "rootInputBlur",
388
+ "name": "rootInputBlur",
389
+ "bubbles": true,
390
+ "cancelable": true,
391
+ "composed": true,
392
+ "docs": {
393
+ "tags": [],
394
+ "text": ""
395
+ },
396
+ "complexType": {
397
+ "original": "FocusEvent",
398
+ "resolved": "FocusEvent",
399
+ "references": {
400
+ "FocusEvent": {
401
+ "location": "global",
402
+ "id": "global::FocusEvent"
403
+ }
404
+ }
405
+ }
406
+ }];
407
+ }
408
+ static get elementRef() { return "hostElement"; }
409
+ static get watchers() {
410
+ return [{
411
+ "propName": "value",
412
+ "methodName": "onValueChanged"
413
+ }];
414
+ }
415
+ }
@@ -0,0 +1,18 @@
1
+ .root-list {
2
+ margin: 0;
3
+ padding-left: 1.5rem;
4
+ color: var(--rootsdk-text-primary);
5
+ font-size: 1rem;
6
+ line-height: 1.6;
7
+ list-style-position: inside;
8
+ }
9
+ .root-list--bullet {
10
+ list-style-type: disc;
11
+ }
12
+ .root-list--numbered {
13
+ list-style-type: decimal;
14
+ }
15
+ .root-list li {
16
+ margin-bottom: 0.5rem;
17
+ padding-left: 0.25rem;
18
+ }
@@ -0,0 +1,50 @@
1
+ import { h } from "@stencil/core";
2
+ export class RootList {
3
+ constructor() {
4
+ /**
5
+ * The type of list: bullet or numbered
6
+ */
7
+ this.type = 'bullet';
8
+ }
9
+ render() {
10
+ const isNumbered = this.type === 'numbered';
11
+ const Tag = isNumbered ? 'ol' : 'ul';
12
+ return (h(Tag, { key: '315491245470e4eb4601debdfbdfeebec6ec0862', class: { 'root-list': true, [`root-list--${this.type}`]: true } }, h("slot", { key: '630f9ab955f57568bd6c8686068afc6593a66185' })));
13
+ }
14
+ static get is() { return "root-list"; }
15
+ static get encapsulation() { return "shadow"; }
16
+ static get originalStyleUrls() {
17
+ return {
18
+ "$": ["list.scss"]
19
+ };
20
+ }
21
+ static get styleUrls() {
22
+ return {
23
+ "$": ["list.css"]
24
+ };
25
+ }
26
+ static get properties() {
27
+ return {
28
+ "type": {
29
+ "type": "string",
30
+ "mutable": false,
31
+ "complexType": {
32
+ "original": "'bullet' | 'numbered'",
33
+ "resolved": "\"bullet\" | \"numbered\"",
34
+ "references": {}
35
+ },
36
+ "required": false,
37
+ "optional": false,
38
+ "docs": {
39
+ "tags": [],
40
+ "text": "The type of list: bullet or numbered"
41
+ },
42
+ "getter": false,
43
+ "setter": false,
44
+ "reflect": false,
45
+ "attribute": "type",
46
+ "defaultValue": "'bullet'"
47
+ }
48
+ };
49
+ }
50
+ }
@@ -0,0 +1,3 @@
1
+ export * from './components/button/button-size.enum';
2
+ export * from './components/button/button-type.enum';
3
+ export * from './components/button/button-variation.enum';
@@ -0,0 +1,7 @@
1
+ const ids = [];
2
+ export function randomIdGenerator(prefix = 'root') {
3
+ let id = `${prefix}-${Math.random().toString(36).substring(2, 7)}`;
4
+ while (ids.includes(id))
5
+ id = `${prefix}-${Math.random().toString(36).substring(2, 7)}`;
6
+ return id;
7
+ }
@@ -0,0 +1 @@
1
+ export * from './enums';
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Get the base path to where the assets can be found. Use "setAssetPath(path)"
3
+ * if the path needs to be customized.
4
+ */
5
+ export declare const getAssetPath: (path: string) => string;
6
+
7
+ /**
8
+ * Used to manually set the base path where assets can be found.
9
+ * If the script is used as "module", it's recommended to use "import.meta.url",
10
+ * such as "setAssetPath(import.meta.url)". Other options include
11
+ * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
12
+ * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
13
+ * But do note that this configuration depends on how your script is bundled, or lack of
14
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
15
+ * will have to ensure the static assets are copied to its build directory.
16
+ */
17
+ export declare const setAssetPath: (path: string) => void;
18
+
19
+ /**
20
+ * Used to specify a nonce value that corresponds with an application's CSP.
21
+ * When set, the nonce will be added to all dynamically created script and style tags at runtime.
22
+ * Alternatively, the nonce value can be set on a meta tag in the DOM head
23
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) which
24
+ * will result in the same behavior.
25
+ */
26
+ export declare const setNonce: (nonce: string) => void
27
+
28
+ export interface SetPlatformOptions {
29
+ raf?: (c: FrameRequestCallback) => number;
30
+ ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
31
+ rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
32
+ }
33
+ export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
34
+
35
+ export * from '../types';
@@ -0,0 +1 @@
1
+ export{g as getAssetPath,r as render,s as setAssetPath,a as setNonce,b as setPlatformOptions}from"./p-CIjEN4Bv.js";var t,e,n;!function(t){t.SMALL="small",t.LARGE="large"}(t||(t={})),function(t){t.BUTTON="button",t.SUBMIT="submit",t.RESET="reset"}(e||(e={})),function(t){t.PRIMARY="primary",t.SECONDARY="secondary",t.TERTIARY="tertiary",t.OUTLINE="outline",t.SUBMIT="submit",t.DANGER="danger",t.CANCEL="cancel"}(n||(n={}));export{t as RootButtonSize,e as RootButtonType,n as RootButtonVariation}