@public-ui/sample-react 2.1.7 → 2.1.8

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 (160) hide show
  1. package/dist/1487.js +1 -1
  2. package/dist/1636.js +1 -1
  3. package/dist/1792.js +1 -1
  4. package/dist/1795.js +1 -1
  5. package/dist/2017.js +1 -1
  6. package/dist/2322.js +1 -1
  7. package/dist/2538.js +1 -1
  8. package/dist/2567.js +1 -1
  9. package/dist/263.js +1 -1
  10. package/dist/2719.js +1 -1
  11. package/dist/3064.js +1 -1
  12. package/dist/3077.js +1 -1
  13. package/dist/3238.js +1 -1
  14. package/dist/3301.js +2 -0
  15. package/dist/3395.js +1 -1
  16. package/dist/35.js +1 -1
  17. package/dist/3521.js +1 -1
  18. package/dist/356.js +1 -1
  19. package/dist/3714.js +1 -1
  20. package/dist/3735.js +1 -1
  21. package/dist/3766.js +1 -1
  22. package/dist/3994.js +1 -1
  23. package/dist/4025.js +1 -1
  24. package/dist/4065.js +2 -0
  25. package/dist/4118.js +1 -1
  26. package/dist/4182.js +1 -1
  27. package/dist/4188.js +1 -1
  28. package/dist/4332.js +1 -1
  29. package/dist/4402.js +1 -1
  30. package/dist/4795.js +2 -0
  31. package/dist/4818.js +1 -1
  32. package/dist/4892.js +1 -1
  33. package/dist/4933.js +1 -1
  34. package/dist/4943.js +1 -1
  35. package/dist/495.js +1 -1
  36. package/dist/5034.js +1 -1
  37. package/dist/5056.js +1 -1
  38. package/dist/5138.js +1 -1
  39. package/dist/5296.js +1 -1
  40. package/dist/5356.js +1 -1
  41. package/dist/5551.js +1 -1
  42. package/dist/5835.js +1 -1
  43. package/dist/5840.js +1 -1
  44. package/dist/5889.js +1 -1
  45. package/dist/5912.js +1 -1
  46. package/dist/6082.js +1 -1
  47. package/dist/6099.js +1 -1
  48. package/dist/6181.js +1 -1
  49. package/dist/619.js +1 -1
  50. package/dist/6671.js +1 -1
  51. package/dist/6775.js +1 -1
  52. package/dist/7274.js +1 -1
  53. package/dist/7440.js +2 -0
  54. package/dist/7795.js +1 -1
  55. package/dist/7802.js +1 -1
  56. package/dist/7860.js +1 -1
  57. package/dist/8092.js +1 -1
  58. package/dist/8111.js +1 -1
  59. package/dist/8146.js +1 -1
  60. package/dist/8427.js +1 -1
  61. package/dist/8495.js +1 -1
  62. package/dist/8672.js +1 -1
  63. package/dist/8737.js +1 -1
  64. package/dist/8786.js +1 -1
  65. package/dist/8796.js +1 -1
  66. package/dist/8977.js +1 -1
  67. package/dist/9333.js +1 -1
  68. package/dist/9389.js +1 -1
  69. package/dist/9561.js +1 -1
  70. package/dist/9599.js +1 -1
  71. package/dist/9612.js +1 -1
  72. package/dist/9890.js +1 -1
  73. package/dist/index.html +1 -1
  74. package/dist/main.css +3 -3
  75. package/dist/main.js +1 -1
  76. package/dist/main.js.LICENSE.txt +2 -2
  77. package/package.json +16 -16
  78. package/public/index.html +1 -1
  79. package/src/@shared/_mixins.scss +3 -0
  80. package/src/App.tsx +1 -1
  81. package/src/components/FormWrap.tsx +1 -1
  82. package/src/components/Navigation.tsx +63 -0
  83. package/src/components/Sidebar.tsx +5 -41
  84. package/src/components/abbr/basic.tsx +12 -12
  85. package/src/components/alert/card-msg.tsx +3 -1
  86. package/src/components/alert/html.tsx +4 -2
  87. package/src/components/button/access-key.tsx +34 -25
  88. package/src/components/button/aria-description.tsx +20 -11
  89. package/src/components/button/baselined.tsx +22 -13
  90. package/src/components/button/icons.tsx +33 -26
  91. package/src/components/button/partials/cases.tsx +13 -6
  92. package/src/components/button/partials/variants.tsx +15 -17
  93. package/src/components/button/width.tsx +33 -28
  94. package/src/components/button-group/basic.tsx +25 -16
  95. package/src/components/button-link/basic.tsx +3 -3
  96. package/src/components/button-link/image.tsx +0 -1
  97. package/src/components/card/basic.tsx +1 -1
  98. package/src/components/combobox/partials/variants.tsx +1 -1
  99. package/src/components/details/basic.tsx +2 -2
  100. package/src/components/form/basic.tsx +1 -1
  101. package/src/components/form/error-list.tsx +1 -0
  102. package/src/components/handout/basic.tsx +304 -279
  103. package/src/components/input-checkbox/partials/variants.tsx +22 -10
  104. package/src/components/input-date/reset.tsx +1 -1
  105. package/src/components/input-password/show-password.tsx +1 -1
  106. package/src/components/input-text/partials/cases.tsx +1 -1
  107. package/src/components/input-text/routes.ts +2 -0
  108. package/src/components/input-text/smart-button.tsx +33 -0
  109. package/src/components/input-text/text-formatter.tsx +98 -45
  110. package/src/components/link/image.tsx +0 -1
  111. package/src/components/link/target.tsx +1 -1
  112. package/src/components/modal/basic.tsx +1 -1
  113. package/src/components/nav/basic.tsx +23 -12
  114. package/src/components/nav/horizontal.tsx +12 -3
  115. package/src/components/nav/links.ts +36 -0
  116. package/src/components/table/column-alignment.tsx +64 -62
  117. package/src/components/table/complex-headers.tsx +80 -78
  118. package/src/components/table/horizontal-scrollbar.tsx +30 -28
  119. package/src/components/table/interactive-child-elements.tsx +81 -69
  120. package/src/components/table/pagination-position.tsx +15 -13
  121. package/src/components/table/render-cell.tsx +14 -3
  122. package/src/components/table/sort-data.tsx +11 -8
  123. package/src/components/table/stateful-with-selection.tsx +47 -27
  124. package/src/components/table/stateful-with-single-selection.tsx +47 -27
  125. package/src/components/table/stateless-with-selection.tsx +37 -17
  126. package/src/components/table/stateless-with-single-selection.tsx +37 -17
  127. package/src/components/table/stateless.tsx +29 -27
  128. package/src/components/table/with-footer.tsx +1 -0
  129. package/src/components/table/with-pagination.tsx +1 -1
  130. package/src/components/tabs/behavior.tsx +61 -0
  131. package/src/components/tabs/routes.ts +2 -0
  132. package/src/components/textarea/adjust-height.tsx +1 -1
  133. package/src/components/textarea/counter.tsx +4 -1
  134. package/src/components/textarea/resize.tsx +1 -1
  135. package/src/components/textarea/rows.tsx +1 -1
  136. package/src/components/toast/basic.tsx +13 -11
  137. package/src/hooks/useToasterService.ts +21 -0
  138. package/src/react.main.tsx +6 -1
  139. package/src/scenarios/appointment-form/AppointmentForm.tsx +1 -0
  140. package/src/scenarios/custom-tooltip-width.tsx +26 -11
  141. package/src/scenarios/disabled-interactive-elements.tsx +123 -114
  142. package/src/scenarios/focus-elements.tsx +21 -16
  143. package/src/scenarios/horizontal-scrollbar-advanced/TableHorizontalScrollbarAdvanced.tsx +1 -1
  144. package/src/scenarios/horizontal-scrollbar-advanced/layout.scss +19 -0
  145. package/src/scenarios/input-group-with-error.tsx +41 -0
  146. package/src/scenarios/inputs-get-value.tsx +121 -119
  147. package/src/scenarios/routes.ts +4 -2
  148. package/src/scenarios/static-form.tsx +65 -62
  149. package/src/style.scss +10 -13
  150. package/tsconfig.json +1 -2
  151. package/unocss.config.ts +213 -0
  152. package/dist/3171.js +0 -2
  153. package/dist/4262.js +0 -2
  154. package/dist/479.js +0 -2
  155. package/dist/8710.js +0 -2
  156. package/src/scenarios/horizontal-scrollbar-advanced/layout.css +0 -31
  157. /package/dist/{3171.js.LICENSE.txt → 3301.js.LICENSE.txt} +0 -0
  158. /package/dist/{4262.js.LICENSE.txt → 4065.js.LICENSE.txt} +0 -0
  159. /package/dist/{479.js.LICENSE.txt → 4795.js.LICENSE.txt} +0 -0
  160. /package/dist/{8710.js.LICENSE.txt → 7440.js.LICENSE.txt} +0 -0
@@ -80,7 +80,7 @@ const Scenario = (props: Props) => {
80
80
  },
81
81
  }}
82
82
  ></KolButton>
83
- <pre>{formatter(value)}</pre>
83
+ <pre className="text-base">{formatter(value)}</pre>
84
84
  </div>
85
85
  );
86
86
  };
@@ -100,127 +100,129 @@ export const InputsGetValue: FC = () => {
100
100
  </p>
101
101
  </SampleDescription>
102
102
 
103
- <KolCard _label="Sample options" className="block ha mb-8">
104
- <KolInputCheckbox
105
- _label="Log events to console"
106
- _value={true}
107
- _checked={eventLoggerActive}
108
- _on={{ onChange: (_, active) => setEventLoggerActive(active as boolean) }}
109
- />
110
- </KolCard>
103
+ <section className="w-full flex flex-col">
104
+ <KolCard _label="Sample options" className="block ha mb-8">
105
+ <KolInputCheckbox
106
+ _label="Log events to console"
107
+ _value={true}
108
+ _checked={eventLoggerActive}
109
+ _on={{ onChange: (_, active) => setEventLoggerActive(active as boolean) }}
110
+ />
111
+ </KolCard>
111
112
 
112
- <div className="grid gap-4">
113
- <Scenario testId="scenario-inputText" InputComponent={KolInputText} inputProps={{ _label: 'InputText' }} />
114
- <Scenario
115
- testId="scenario-inputCheckboxString"
116
- InputComponent={KolInputCheckbox}
117
- inputProps={{ _label: 'KolInputCheckbox (value)', _value: 'Checkbox True Value' }}
118
- />
119
- <Scenario testId="scenario-inputCheckboxBoolean" InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox (boolean)' }} />
120
- <Scenario testId="scenario-inputColor" InputComponent={KolInputColor} inputProps={{ _label: 'KolInputColor' }} />
121
- <Scenario testId="scenario-inputDate" InputComponent={KolInputDate} inputProps={{ _label: 'KolInputDate' }} />
122
- <Scenario testId="scenario-inputEmail" InputComponent={KolInputEmail} inputProps={{ _label: 'KolInputEmail' }} />
123
- <Scenario
124
- testId="scenario-inputFile"
125
- InputComponent={KolInputFile}
126
- inputProps={{ _label: 'KolInputFile' }}
127
- formatter={(value) =>
128
- value instanceof FileList
129
- ? `FileList{${Array.from(value)
130
- .map((file: File) => file.name)
131
- .join(', ')}}`
132
- : JSON.stringify(value)
133
- }
134
- />
135
- <Scenario testId="scenario-inputNumber" InputComponent={KolInputNumber} inputProps={{ _label: 'KolInputNumber' }} />
136
- <Scenario testId="scenario-inputPassword" InputComponent={KolInputPassword} inputProps={{ _label: 'KolInputPassword' }} />
137
- <Scenario testId="scenario-inputRange" InputComponent={KolInputRange} inputProps={{ _label: 'KolInputRange' }} />
138
- <Scenario
139
- testId="scenario-inputRadio"
140
- InputComponent={KolInputRadio}
141
- inputProps={{
142
- _label: 'KolInputRadio',
143
- _orientation: 'horizontal',
144
- _options: [
145
- { label: 'New York', value: 'New York' },
146
- { label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
147
- { label: 'Rosenheim', value: 'Rosenheim' },
148
- ],
149
- _value: 'New York',
150
- }}
151
- />
152
- <Scenario
153
- testId="scenario-select"
154
- InputComponent={KolSelect}
155
- inputProps={{
156
- _label: 'KolSelect',
157
- _options: [
158
- { label: 'New York', value: 'New York' },
159
- { label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
160
- { label: 'Rosenheim', value: 'Rosenheim' },
161
- ],
162
- }}
163
- />
164
- <Scenario
165
- testId="scenario-singleSelect"
166
- InputComponent={KolSingleSelect}
167
- inputProps={{
168
- _label: 'KolSingleSelect',
169
- _options: [
170
- { label: 'New York', value: 'New York' },
171
- { label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
172
- { label: 'Rosenheim', value: 'Rosenheim' },
173
- ],
174
- _value: 'Rosenheim',
175
- }}
176
- />
177
- <Scenario
178
- testId="scenario-combobox"
179
- InputComponent={KolCombobox}
180
- inputProps={{
181
- _label: 'KolCombobox',
182
- _suggestions: COUNTRY_SUGGESTIONS,
183
- _value: 'Deutschland',
184
- }}
185
- />
186
- <Scenario
187
- testId="scenario-textarea"
188
- InputComponent={KolTextarea}
189
- inputProps={{
190
- _label: 'KolTextarea',
191
- }}
192
- />
193
- <Scenario
194
- testId="scenario-button"
195
- InputComponent={KolButton}
196
- inputProps={{
197
- _label: 'KolButton',
198
- _variant: 'ghost',
199
- _value: 'KolButton value',
200
- }}
201
- />
202
- <Scenario
203
- testId="scenario-buttonLink"
204
- InputComponent={KolButtonLink}
205
- inputProps={{
206
- _label: 'KolButtonLink',
207
- _value: 'KolButtonLink value',
208
- }}
209
- />
210
-
211
- <div className="grid grid-cols-3 gap-4">
212
- <div></div>
213
- <KolButton
214
- _label="Run all"
215
- _variant="primary"
216
- _on={{
217
- onClick: () => {
218
- eventTarget.dispatchEvent(new Event('runAll'));
219
- },
113
+ <div className="grid gap-4">
114
+ <Scenario testId="scenario-inputText" InputComponent={KolInputText} inputProps={{ _label: 'InputText' }} />
115
+ <Scenario
116
+ testId="scenario-inputCheckboxString"
117
+ InputComponent={KolInputCheckbox}
118
+ inputProps={{ _label: 'KolInputCheckbox (value)', _value: 'Checkbox True Value' }}
119
+ />
120
+ <Scenario testId="scenario-inputCheckboxBoolean" InputComponent={KolInputCheckbox} inputProps={{ _label: 'KolInputCheckbox (boolean)' }} />
121
+ <Scenario testId="scenario-inputColor" InputComponent={KolInputColor} inputProps={{ _label: 'KolInputColor' }} />
122
+ <Scenario testId="scenario-inputDate" InputComponent={KolInputDate} inputProps={{ _label: 'KolInputDate' }} />
123
+ <Scenario testId="scenario-inputEmail" InputComponent={KolInputEmail} inputProps={{ _label: 'KolInputEmail' }} />
124
+ <Scenario
125
+ testId="scenario-inputFile"
126
+ InputComponent={KolInputFile}
127
+ inputProps={{ _label: 'KolInputFile' }}
128
+ formatter={(value) =>
129
+ value instanceof FileList
130
+ ? `FileList{${Array.from(value)
131
+ .map((file: File) => file.name)
132
+ .join(', ')}}`
133
+ : JSON.stringify(value)
134
+ }
135
+ />
136
+ <Scenario testId="scenario-inputNumber" InputComponent={KolInputNumber} inputProps={{ _label: 'KolInputNumber' }} />
137
+ <Scenario testId="scenario-inputPassword" InputComponent={KolInputPassword} inputProps={{ _label: 'KolInputPassword' }} />
138
+ <Scenario testId="scenario-inputRange" InputComponent={KolInputRange} inputProps={{ _label: 'KolInputRange' }} />
139
+ <Scenario
140
+ testId="scenario-inputRadio"
141
+ InputComponent={KolInputRadio}
142
+ inputProps={{
143
+ _label: 'KolInputRadio',
144
+ _orientation: 'horizontal',
145
+ _options: [
146
+ { label: 'New York', value: 'New York' },
147
+ { label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
148
+ { label: 'Rosenheim', value: 'Rosenheim' },
149
+ ],
150
+ _value: 'New York',
151
+ }}
152
+ />
153
+ <Scenario
154
+ testId="scenario-select"
155
+ InputComponent={KolSelect}
156
+ inputProps={{
157
+ _label: 'KolSelect',
158
+ _options: [
159
+ { label: 'New York', value: 'New York' },
160
+ { label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
161
+ { label: 'Rosenheim', value: 'Rosenheim' },
162
+ ],
163
+ }}
164
+ />
165
+ <Scenario
166
+ testId="scenario-singleSelect"
167
+ InputComponent={KolSingleSelect}
168
+ inputProps={{
169
+ _label: 'KolSingleSelect',
170
+ _options: [
171
+ { label: 'New York', value: 'New York' },
172
+ { label: 'Rio de Janeiro', value: 'Rio de Janeiro' },
173
+ { label: 'Rosenheim', value: 'Rosenheim' },
174
+ ],
175
+ _value: 'Rosenheim',
176
+ }}
177
+ />
178
+ <Scenario
179
+ testId="scenario-combobox"
180
+ InputComponent={KolCombobox}
181
+ inputProps={{
182
+ _label: 'KolCombobox',
183
+ _suggestions: COUNTRY_SUGGESTIONS,
184
+ _value: 'Deutschland',
220
185
  }}
221
- ></KolButton>
186
+ />
187
+ <Scenario
188
+ testId="scenario-textarea"
189
+ InputComponent={KolTextarea}
190
+ inputProps={{
191
+ _label: 'KolTextarea',
192
+ }}
193
+ />
194
+ <Scenario
195
+ testId="scenario-button"
196
+ InputComponent={KolButton}
197
+ inputProps={{
198
+ _label: 'KolButton',
199
+ _variant: 'ghost',
200
+ _value: 'KolButton value',
201
+ }}
202
+ />
203
+ <Scenario
204
+ testId="scenario-buttonLink"
205
+ InputComponent={KolButtonLink}
206
+ inputProps={{
207
+ _label: 'KolButtonLink',
208
+ _value: 'KolButtonLink value',
209
+ }}
210
+ />
211
+
212
+ <div className="grid grid-cols-3 gap-4">
213
+ <div></div>
214
+ <KolButton
215
+ _label="Run all"
216
+ _variant="primary"
217
+ _on={{
218
+ onClick: () => {
219
+ eventTarget.dispatchEvent(new Event('runAll'));
220
+ },
221
+ }}
222
+ ></KolButton>
223
+ </div>
222
224
  </div>
223
- </div>
225
+ </section>
224
226
  </EventLoggerActiveContext.Provider>
225
227
  </EventTargetContext.Provider>
226
228
  </>
@@ -6,15 +6,17 @@ import { InputsGetValue } from './inputs-get-value';
6
6
  import { StaticForm } from './static-form';
7
7
  import { FocusElements } from './focus-elements';
8
8
  import { TableHorizontalScrollAdvanced } from './horizontal-scrollbar-advanced';
9
+ import { InputGroupWithError } from './input-group-with-error';
9
10
 
10
11
  export const SCENARIO_ROUTES: Routes = {
11
12
  scenarios: {
12
13
  'appointment-form': AppointmentForm,
13
- 'inputs-get-value': InputsGetValue,
14
14
  'custom-tooltip-width': CustomTooltipWidth,
15
- 'static-form': StaticForm,
16
15
  'disabled-interactive-scenario': DisabledInteractiveElements,
17
16
  'focus-elements': FocusElements,
17
+ 'input-group-with-error': InputGroupWithError,
18
+ 'inputs-get-value': InputsGetValue,
19
+ 'static-form': StaticForm,
18
20
  'table-horizontal-scrollbar-advanced': TableHorizontalScrollAdvanced,
19
21
  },
20
22
  };
@@ -14,6 +14,7 @@ import {
14
14
  KolSingleSelect,
15
15
  KolCombobox,
16
16
  KolTextarea,
17
+ KolHeading,
17
18
  } from '@public-ui/react';
18
19
  import type { FC } from 'react';
19
20
  import React from 'react';
@@ -47,70 +48,72 @@ export const StaticForm: FC = () => {
47
48
  </ol>
48
49
  </SampleDescription>
49
50
 
50
- {searchParams.size > 0 && (
51
- <>
52
- <h2>Submitted data</h2>
53
- <pre>
54
- <code>{JSON.stringify(Object.fromEntries(searchParams.entries()), null, 2)}</code>
55
- </pre>
56
- </>
57
- )}
51
+ <section className="w-full flex flex-col">
52
+ {searchParams.size > 0 && (
53
+ <div className="grid gap-4">
54
+ <KolHeading _level={2} _label="Submitted data" />
55
+ <pre className="text-base">
56
+ <code>{JSON.stringify(Object.fromEntries(searchParams.entries()), null, 2)}</code>
57
+ </pre>
58
+ </div>
59
+ )}
58
60
 
59
- <form className="grid gap-4" method="get" noValidate>
60
- <KolInputCheckbox _name="checkbox" _label="Checkbox" />
61
- <KolInputColor _name="color" _label="Color" />
62
- <KolInputDate _name="date" _label="Date" />
63
- <KolInputEmail _name="email" _label="Email" />
64
- <KolInputFile _name="file" _label="File" />
65
- <KolInputFile _name="file" _label="Files (multiple)" _multiple />
66
- <KolInputNumber _name="number" _label="Number" />
67
- <KolInputPassword _name="password" _label="Password" />
68
- <KolInputRadio
69
- _name="radio"
70
- _label="Radio"
71
- _options={[
72
- { label: 'Option A', value: 'A' },
73
- { label: 'Option B', value: 'B' },
74
- ]}
75
- />
76
- <KolInputRange _name="range" _label="Range" />
77
- <KolInputText _name="text" _label="Text" />
78
- <KolSelect
79
- _name="select"
80
- _label="Select"
81
- _options={[
82
- { label: 'Option A', value: 'A' },
83
- { label: 'Option B', value: 'B' },
84
- ]}
85
- />
86
- <KolSelect
87
- _name="select"
88
- _label="Select (multiple)"
89
- _multiple
90
- _options={[
91
- { label: 'Option A', value: 'A' },
92
- { label: 'Option B', value: 'B' },
93
- ]}
94
- _rows={2}
95
- />
96
- <KolSingleSelect
97
- _name="singleSelect"
98
- _label="Single Select"
99
- _options={[
100
- { label: 'Option A', value: 'A' },
101
- { label: 'Option B', value: 'B' },
102
- ]}
103
- />
104
- <KolCombobox _name="combobox" _label="Combobox" _suggestions={COUNTRY_SUGGESTIONS} />
105
- <KolTextarea _name="textarea" _label="Textarea" _rows={5} />
106
- <div className="flex flex-wrap gap-4">
107
- <KolButton _label="Submit" _type="submit" _variant="primary" />
108
- <KolButton _label="Reset" _type="reset" />
109
- </div>
61
+ <form className="grid gap-4" method="get" noValidate>
62
+ <KolInputCheckbox _name="checkbox" _label="Checkbox" />
63
+ <KolInputColor _name="color" _label="Color" />
64
+ <KolInputDate _name="date" _label="Date" />
65
+ <KolInputEmail _name="email" _label="Email" />
66
+ <KolInputFile _name="file" _label="File" />
67
+ <KolInputFile _name="file" _label="Files (multiple)" _multiple />
68
+ <KolInputNumber _name="number" _label="Number" />
69
+ <KolInputPassword _name="password" _label="Password" />
70
+ <KolInputRadio
71
+ _name="radio"
72
+ _label="Radio"
73
+ _options={[
74
+ { label: 'Option A', value: 'A' },
75
+ { label: 'Option B', value: 'B' },
76
+ ]}
77
+ />
78
+ <KolInputRange _name="range" _label="Range" />
79
+ <KolInputText _name="text" _label="Text" />
80
+ <KolSelect
81
+ _name="select"
82
+ _label="Select"
83
+ _options={[
84
+ { label: 'Option A', value: 'A' },
85
+ { label: 'Option B', value: 'B' },
86
+ ]}
87
+ />
88
+ <KolSelect
89
+ _name="select"
90
+ _label="Select (multiple)"
91
+ _multiple
92
+ _options={[
93
+ { label: 'Option A', value: 'A' },
94
+ { label: 'Option B', value: 'B' },
95
+ ]}
96
+ _rows={2}
97
+ />
98
+ <KolSingleSelect
99
+ _name="singleSelect"
100
+ _label="Single Select"
101
+ _options={[
102
+ { label: 'Option A', value: 'A' },
103
+ { label: 'Option B', value: 'B' },
104
+ ]}
105
+ />
106
+ <KolCombobox _name="combobox" _label="Combobox" _suggestions={COUNTRY_SUGGESTIONS} />
107
+ <KolTextarea _name="textarea" _label="Textarea" _rows={5} />
108
+ <div className="flex flex-wrap gap-4">
109
+ <KolButton _label="Submit" _type="submit" _variant="primary" />
110
+ <KolButton _label="Reset" _type="reset" />
111
+ </div>
110
112
 
111
- {/* Add a random string to allow the form to be always submitted. Without it, if theres no change to the data, the form simply won't submit when requested. */}
112
- <input type="hidden" value={crypto.randomUUID()} name="random" />
113
- </form>
113
+ {/* Add a random string to allow the form to be always submitted. Without it, if theres no change to the data, the form simply won't submit when requested. */}
114
+ <input type="hidden" value={crypto.randomUUID()} name="random" />
115
+ </form>
116
+ </section>
114
117
  </>
115
118
  );
116
119
  };
package/src/style.scss CHANGED
@@ -1,6 +1,15 @@
1
+ @import './@shared/mixins';
2
+
3
+ :root {
4
+ --kolibri-root-font-size: 100;
5
+ font-size: 625%;
6
+ }
7
+
1
8
  body {
2
9
  margin: 0;
3
10
  font-family: Verdana;
11
+ font-size: rem(16);
12
+ line-height: normal;
4
13
  }
5
14
 
6
15
  dl,
@@ -8,18 +17,6 @@ hr {
8
17
  margin: 0;
9
18
  }
10
19
 
11
- .w-4rem {
12
- width: 4rem;
13
- }
14
-
15
- .w-8rem {
16
- width: 8rem;
17
- }
18
-
19
- .w-12rem {
20
- width: 12rem;
21
- }
22
-
23
20
  .grid-cols-2 {
24
21
  grid-template-columns: auto auto;
25
22
  }
@@ -42,7 +39,7 @@ hr {
42
39
  bottom: 0;
43
40
  left: 0;
44
41
  width: 330px;
45
- margin: 1rem;
42
+ margin: rem(16);
46
43
  flex-direction: column;
47
44
  display: flex;
48
45
 
package/tsconfig.json CHANGED
@@ -9,8 +9,7 @@
9
9
  "preserveSymlinks": true,
10
10
  "moduleResolution": "node",
11
11
  "lib": ["es2017", "dom"],
12
- "types": ["node", "react", "react-dom"],
13
- "typeRoots": ["node_modules/@types", "src/types"],
12
+ "typeRoots": ["node_modules/@types"],
14
13
  "noUnusedLocals": true,
15
14
  "resolveJsonModule": true,
16
15
  "noEmit": true,