windly-ui 1.0.3 → 1.0.5

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 (38) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/module.mjs +8 -1
  3. package/dist/runtime/components/Accordion.vue +6 -2
  4. package/dist/runtime/components/Alert.d.vue.ts +83 -0
  5. package/dist/runtime/components/Alert.vue +78 -0
  6. package/dist/runtime/components/Alert.vue.d.ts +83 -0
  7. package/dist/runtime/components/Button.d.vue.ts +9 -0
  8. package/dist/runtime/components/Button.vue +2 -1
  9. package/dist/runtime/components/Button.vue.d.ts +9 -0
  10. package/dist/runtime/components/Dialog.d.vue.ts +9 -49
  11. package/dist/runtime/components/Dialog.vue +18 -85
  12. package/dist/runtime/components/Dialog.vue.d.ts +9 -49
  13. package/dist/runtime/components/FileUploader.d.vue.ts +22 -15
  14. package/dist/runtime/components/FileUploader.vue +286 -130
  15. package/dist/runtime/components/FileUploader.vue.d.ts +22 -15
  16. package/dist/runtime/components/Input.d.vue.ts +5 -3
  17. package/dist/runtime/components/Input.vue +15 -7
  18. package/dist/runtime/components/Input.vue.d.ts +5 -3
  19. package/dist/runtime/components/Select.d.vue.ts +25 -17
  20. package/dist/runtime/components/Select.vue +207 -136
  21. package/dist/runtime/components/Select.vue.d.ts +25 -17
  22. package/dist/runtime/components/Table.d.vue.ts +1 -1
  23. package/dist/runtime/components/Table.vue.d.ts +1 -1
  24. package/dist/runtime/components/Textarea.d.vue.ts +1 -1
  25. package/dist/runtime/components/Textarea.vue.d.ts +1 -1
  26. package/dist/runtime/docs/component.d.vue.ts +28 -0
  27. package/dist/runtime/docs/component.vue +34 -0
  28. package/dist/runtime/docs/component.vue.d.ts +28 -0
  29. package/dist/runtime/docs/index.d.vue.ts +3 -0
  30. package/dist/runtime/docs/index.vue +2537 -0
  31. package/dist/runtime/docs/index.vue.d.ts +3 -0
  32. package/dist/runtime/docs/megaSection.d.vue.ts +39 -0
  33. package/dist/runtime/docs/megaSection.vue +52 -0
  34. package/dist/runtime/docs/megaSection.vue.d.ts +39 -0
  35. package/dist/runtime/docs/section.d.vue.ts +39 -0
  36. package/dist/runtime/docs/section.vue +52 -0
  37. package/dist/runtime/docs/section.vue.d.ts +39 -0
  38. package/package.json +1 -1
@@ -2,74 +2,98 @@
2
2
  defineOptions({
3
3
  name: "UISelect"
4
4
  });
5
- import {
6
- computed,
7
- ref,
8
- watch
9
- } from "vue";
5
+ import { computed, ref, watch } from "vue";
10
6
  const props = defineProps({
11
- filter: { type: Boolean, required: false, default: false },
12
7
  modelValue: { type: [String, Number, Boolean], required: false, default: "" },
13
- label: { type: String, required: true },
14
- id: { type: String, required: false, default: void 0 },
15
- options: { type: Array, required: true },
16
- placeholder: { type: String, required: false, default: "Search or select..." },
17
- disabled: { type: Boolean, required: false, default: false },
18
- required: { type: Boolean, required: false, default: false },
8
+ label: { type: String, required: false, default: "" },
19
9
  hint: { type: String, required: false, default: "" },
20
- flat: { type: Boolean, required: false, default: false },
21
- bordered: { type: Boolean, required: false, default: true },
10
+ placeholder: { type: String, required: false, default: "Select..." },
11
+ filter: { type: Boolean, required: false, default: false },
12
+ size: { type: String, required: false, default: "md" },
13
+ color: { type: String, required: false, default: "" },
22
14
  rounded: { type: String, required: false, default: "md" },
23
- borderColor: { type: String, required: false, default: "gray-300" },
24
- bgColor: { type: String, required: false, default: "white" },
25
- textColor: { type: String, required: false, default: "black" }
15
+ dense: { type: Boolean, required: false, default: false },
16
+ width: { type: String, required: false, default: "" },
17
+ outlined: { type: Boolean, required: false, default: false },
18
+ borderless: { type: Boolean, required: false, default: false },
19
+ flat: { type: Boolean, required: false, default: false },
20
+ disabled: { type: Boolean, required: false, default: false },
21
+ readonly: { type: Boolean, required: false, default: false },
22
+ required: { type: Boolean, required: false, default: false },
23
+ id: { type: String, required: false, default: void 0 },
24
+ options: { type: Array, required: true }
26
25
  });
27
26
  const emit = defineEmits(["update:modelValue"]);
28
- const searchQuery = ref("");
29
27
  const showDropdown = ref(false);
30
- const isHex = (val) => {
31
- return val.startsWith("#") || val.startsWith("rgb") || val.startsWith("hsl");
28
+ const searchQuery = ref("");
29
+ const isHex = (val) => val.startsWith("#");
30
+ const roundedMap = {
31
+ none: "rounded-none",
32
+ sm: "rounded-sm",
33
+ md: "rounded-md",
34
+ lg: "rounded-lg",
35
+ xl: "rounded-xl",
36
+ full: "rounded-full"
32
37
  };
33
- const roundedClass = computed(() => {
34
- const map = {
35
- none: "rounded-none",
36
- sm: "rounded-sm",
37
- md: "rounded-md",
38
- lg: "rounded-lg",
39
- xl: "rounded-xl",
40
- full: "rounded-full"
41
- };
42
- return map[props.rounded];
43
- });
44
- const selectClasses = computed(() => [
45
- "block w-full px-3 py-2 transition-all focus:outline-none",
46
- roundedClass.value,
47
- props.flat ? "shadow-none" : "shadow-sm",
48
- props.bordered ? !isHex(
49
- props.borderColor
50
- ) ? `border border-${props.borderColor}` : "border" : "border-0",
51
- !isHex(props.bgColor) ? `bg-${props.bgColor}` : "",
52
- !isHex(
53
- props.textColor
54
- ) ? `text-${props.textColor}` : "",
55
- props.disabled ? "opacity-50 cursor-not-allowed" : ""
56
- ]);
57
- const selectStyles = computed(() => {
58
- const style = {};
59
- if (isHex(props.bgColor)) {
60
- style.backgroundColor = props.bgColor;
38
+ const computedClass = computed(() => {
39
+ let classes = "input block transition-all duration-300";
40
+ if (props.borderless) {
41
+ classes += " border-none bg-transparent";
42
+ } else if (props.outlined) {
43
+ classes += " border";
44
+ } else {
45
+ classes += " border-0 border-b";
46
+ }
47
+ classes += ` ${roundedMap[props.rounded] ?? roundedMap.md}`;
48
+ if (!props.flat) {
49
+ classes += " shadow-sm";
50
+ }
51
+ if (props.disabled) {
52
+ classes += " opacity-50 cursor-not-allowed";
53
+ }
54
+ if (props.readonly) {
55
+ classes += " pointer-events-none";
61
56
  }
62
- if (isHex(
63
- props.borderColor
57
+ switch (props.size) {
58
+ case "sm":
59
+ classes += " text-sm";
60
+ break;
61
+ case "lg":
62
+ classes += " text-lg";
63
+ break;
64
+ default:
65
+ classes += " text-base";
66
+ }
67
+ if (props.color && !isHex(props.color)) {
68
+ classes += ` border-${props.color} focus:ring-${props.color}`;
69
+ }
70
+ if (props.width && !CSS.supports(
71
+ "width",
72
+ props.width
64
73
  )) {
65
- style.borderColor = props.borderColor;
74
+ classes += ` w-${props.width}`;
75
+ }
76
+ if (!props.width) {
77
+ classes += " w-full";
66
78
  }
67
- if (isHex(
68
- props.textColor
79
+ if (props.modelValue !== "" && props.modelValue !== null && props.modelValue !== void 0) {
80
+ classes += " has-value";
81
+ }
82
+ return classes;
83
+ });
84
+ const computedStyle = computed(() => {
85
+ const styles = {};
86
+ if (props.width && CSS.supports(
87
+ "width",
88
+ props.width
69
89
  )) {
70
- style.color = props.textColor;
90
+ styles.width = props.width;
71
91
  }
72
- return style;
92
+ if (props.color && isHex(props.color)) {
93
+ styles["--tw-ring-color"] = props.color;
94
+ styles.borderColor = props.color;
95
+ }
96
+ return styles;
73
97
  });
74
98
  const filteredOptions = computed(() => {
75
99
  const query = searchQuery.value.toLowerCase();
@@ -79,122 +103,169 @@ const filteredOptions = computed(() => {
79
103
  });
80
104
  watch(
81
105
  () => props.modelValue,
82
- (val) => {
106
+ (value) => {
83
107
  const selected = props.options.find(
84
- (opt) => opt.value === val
108
+ (o) => o.value === value
85
109
  );
86
- if (selected) {
87
- searchQuery.value = selected.text;
88
- }
110
+ searchQuery.value = selected?.text ?? "";
89
111
  },
90
112
  {
91
113
  immediate: true
92
114
  }
93
115
  );
94
- const selectOption = (option) => {
116
+ function selectOption(option) {
95
117
  searchQuery.value = option.text;
96
118
  emit(
97
119
  "update:modelValue",
98
120
  option.value
99
121
  );
100
122
  showDropdown.value = false;
101
- };
102
- const handleChange = (event) => {
123
+ }
124
+ function handleChange(event) {
103
125
  const target = event.target;
104
- emit(
105
- "update:modelValue",
106
- target.value
126
+ const selected = props.options.find(
127
+ (option) => String(option.value) === target.value
107
128
  );
108
- };
109
- const handleBlur = () => {
129
+ if (selected) {
130
+ emit(
131
+ "update:modelValue",
132
+ selected.value
133
+ );
134
+ }
135
+ }
136
+ function handleBlur() {
110
137
  setTimeout(() => {
111
138
  showDropdown.value = false;
112
- }, 100);
113
- };
139
+ }, 150);
140
+ }
141
+ const inputAttrs = computed(() => {
142
+ const attrs = {};
143
+ if (props.placeholder)
144
+ attrs.placeholder = props.placeholder;
145
+ if (props.disabled)
146
+ attrs.disabled = props.disabled;
147
+ if (props.readonly)
148
+ attrs.readonly = props.readonly;
149
+ if (props.required)
150
+ attrs.required = props.required;
151
+ return attrs;
152
+ });
114
153
  </script>
115
154
 
116
155
  <template>
117
- <div class="relative my-5">
118
- <!-- Label -->
119
- <label v-if="label" :for="id" class="block mb-2 text-sm font-medium text-gray-600 dark:text-gray-300">
120
- {{ label }}
121
- </label>
122
-
156
+ <div
157
+ class="select-container"
158
+ :class="{
159
+ dense: !outlined || dense,
160
+ [`input-${size}`]: size
161
+ }"
162
+ >
123
163
  <!-- Filterable Select -->
124
- <div v-if="filter" class="relative">
125
- <input v-model="
126
- searchQuery
127
- " :placeholder="
128
- placeholder
129
- " :disabled="
130
- disabled
131
- " :required="
132
- required
133
- " :class="
134
- selectClasses
135
- " :style="
136
- selectStyles
137
- " @focus="
138
- showDropdown = true
139
- " @blur="
140
- handleBlur
141
- " @input="
142
- showDropdown = true
143
- ">
164
+ <div
165
+ v-if="filter"
166
+ class="relative"
167
+ >
168
+ <input
169
+ v-model="searchQuery"
170
+ v-bind="inputAttrs"
171
+ :class="computedClass"
172
+ :style="computedStyle"
173
+ @focus="showDropdown = true"
174
+ @input="showDropdown = true"
175
+ @blur="handleBlur"
176
+ />
144
177
 
145
- <!-- Dropdown -->
146
- <ul v-if="
147
- showDropdown
178
+ <label
179
+ class="label"
180
+ :class="
181
+ color && !isHex(color) ? `text-${color}` : ''
148
182
  "
149
- class="absolute z-10 mt-1 w-full max-h-48 overflow-y-auto bg-white dark:bg-gray-800 border border-gray-200 dark:border-gray-700 rounded-md shadow-lg">
150
- <li v-for="option in filteredOptions" :key="
151
- option.value.toString()
152
- " class="px-4 py-2 cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-700" @mousedown.prevent="
153
- selectOption(
154
- option
155
- )
156
- ">
183
+ :style="
184
+ color ? {
185
+ color: isHex(color) ? color : void 0
186
+ } : {
187
+ color: '#9ca3af'
188
+ }
189
+ "
190
+ >
191
+ {{ label }}
192
+ </label>
193
+
194
+ <!-- Dropdown -->
195
+ <ul
196
+ v-if="showDropdown"
197
+ class="absolute left-0 right-0 z-50 mt-1 max-h-60 overflow-y-auto rounded-md border bg-white shadow-lg"
198
+ >
199
+ <li
200
+ v-for="option in filteredOptions"
201
+ :key="option.value.toString()"
202
+ class="cursor-pointer px-3 py-2 transition-colors hover:bg-gray-100"
203
+ @mousedown.prevent="selectOption(option)"
204
+ >
157
205
  {{ option.text }}
158
206
  </li>
159
207
 
160
- <li v-if="
161
- filteredOptions.length === 0
162
- " class="px-4 py-2 text-gray-500">
208
+ <li
209
+ v-if="filteredOptions.length === 0"
210
+ class="px-3 py-2 text-sm text-gray-500"
211
+ >
163
212
  No results found
164
213
  </li>
165
214
  </ul>
166
215
  </div>
167
216
 
168
217
  <!-- Native Select -->
169
- <select v-else :id="id" :value="
170
- modelValue
171
- " :disabled="
172
- disabled
173
- " :required="
174
- required
175
- " :class="
176
- selectClasses
177
- " :style="
178
- selectStyles
179
- " @change="
180
- handleChange
181
- ">
182
- <option disabled value="">
183
- {{ placeholder }}
184
- </option>
218
+ <template v-else>
219
+ <select
220
+ :id="id"
221
+ :value="modelValue"
222
+ v-bind="inputAttrs"
223
+ :class="computedClass"
224
+ :style="computedStyle"
225
+ @change="handleChange"
226
+ >
227
+ <option
228
+ disabled
229
+ value=""
230
+ >
231
+ {{ placeholder }}
232
+ </option>
233
+
234
+ <option
235
+ v-for="option in options"
236
+ :key="option.value.toString()"
237
+ :value="option.value"
238
+ >
239
+ {{ option.text }}
240
+ </option>
241
+ </select>
185
242
 
186
- <option v-for="option in options" :key="
187
- option.value.toString()
188
- " :value="
189
- option.value
190
- ">
191
- {{ option.text }}
192
- </option>
193
- </select>
243
+ <label
244
+ class="label"
245
+ :class="
246
+ color && !isHex(color) ? `text-${color}` : ''
247
+ "
248
+ :style="
249
+ color ? {
250
+ color: isHex(color) ? color : void 0
251
+ } : {
252
+ color: '#9ca3af'
253
+ }
254
+ "
255
+ >
256
+ {{ label }}
257
+ </label>
258
+ </template>
194
259
 
195
- <!-- Hint -->
196
- <p v-if="hint" class="mt-1 text-sm text-gray-500">
260
+ <p
261
+ v-if="hint"
262
+ class="hint-text"
263
+ >
197
264
  {{ hint }}
198
265
  </p>
199
266
  </div>
200
267
  </template>
268
+
269
+ <style scoped>
270
+ .select-container{margin:20px 0 10px;position:relative}.select-container.dense{margin:10px 0}.input{background:transparent;padding:10px;width:100%}.select-container.dense .input{padding:6px 10px}.input:focus{outline:none}select.input{appearance:none;-webkit-appearance:none;-moz-appearance:none;cursor:pointer;padding-right:2.5rem}.label{left:10px;padding:0 5px;pointer-events:none;position:absolute;top:50%;transform:translateY(-50%);transition:top .2s ease,font-size .2s ease,color .2s ease,transform .2s ease}.input:-moz-placeholder+.label{left:5px;top:-20px;transform:none;z-index:2}.input.has-value+.label,.input:focus+.label,.input:placeholder-shown+.label,select.input.has-value+.label,select.input:focus+.label{left:5px;top:-20px;transform:none;z-index:2}.select-container.dense .input.has-value+.label,.select-container.dense .input:focus+.label,.select-container.dense select.input.has-value+.label,.select-container.dense select.input:focus+.label{top:-10px}.select-container.input-lg .input.has-value+.label,.select-container.input-lg .input:focus+.label,.select-container.input-lg select.input.has-value+.label,.select-container.input-lg select.input:focus+.label{top:-24px}.select-container.input-sm .label{font-size:14px}.select-container.input-md .label{font-size:16px}.select-container.input-lg .label{font-size:18px}.select-container.input-sm .input.has-value+.label,.select-container.input-sm .input:focus+.label,.select-container.input-sm select.input.has-value+.label,.select-container.input-sm select.input:focus+.label{font-size:12px}.select-container.input-md .input.has-value+.label,.select-container.input-md .input:focus+.label,.select-container.input-md select.input.has-value+.label,.select-container.input-md select.input:focus+.label{font-size:14px}.select-container.input-lg .input.has-value+.label,.select-container.input-lg .input:focus+.label,.select-container.input-lg select.input.has-value+.label,.select-container.input-lg select.input:focus+.label{font-size:16px}.hint-text{color:#6b7280;font-size:12px;margin-left:5px;margin-top:4px}ul{background:#fff;border:1px solid #d1d5db;border-radius:.5rem;box-shadow:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -4px rgba(0,0,0,.1);max-height:240px;overflow-y:auto}li{transition:background-color .2s}li:hover{background:#f3f4f6}.dark .label,.dark ul{background:#1f2937}.dark ul{border-color:#374151}.dark li:hover{background:#374151}.dark .hint-text{color:#9ca3af}
271
+ </style>
@@ -2,23 +2,27 @@ interface SelectOption {
2
2
  text: string;
3
3
  value: string | number | boolean;
4
4
  }
5
- type Rounded = 'none' | 'sm' | 'md' | 'lg' | 'xl' | 'full';
5
+ type Rounded = "none" | "sm" | "md" | "lg" | "xl" | "full";
6
+ type Size = "sm" | "md" | "lg";
6
7
  type __VLS_Props = {
7
- filter?: boolean;
8
8
  modelValue?: string | number | boolean;
9
- label: string;
10
- id?: string;
11
- options: SelectOption[];
9
+ label?: string;
10
+ hint?: string;
12
11
  placeholder?: string;
12
+ filter?: boolean;
13
+ size?: Size;
14
+ color?: string;
15
+ rounded?: Rounded;
16
+ dense?: boolean;
17
+ width?: string;
18
+ outlined?: boolean;
19
+ borderless?: boolean;
20
+ flat?: boolean;
13
21
  disabled?: boolean;
22
+ readonly?: boolean;
14
23
  required?: boolean;
15
- hint?: string;
16
- flat?: boolean;
17
- bordered?: boolean;
18
- rounded?: Rounded;
19
- borderColor?: string;
20
- bgColor?: string;
21
- textColor?: string;
24
+ id?: string;
25
+ options: SelectOption[];
22
26
  };
23
27
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {} & {
24
28
  "update:modelValue": (value: string | number | boolean) => any;
@@ -27,17 +31,21 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
27
31
  }>, {
28
32
  modelValue: string | number | boolean;
29
33
  disabled: boolean;
34
+ dense: boolean;
35
+ label: string;
30
36
  filter: boolean;
31
- textColor: string;
32
- rounded: Rounded;
33
- borderColor: string;
34
37
  required: boolean;
38
+ color: string;
39
+ rounded: Rounded;
40
+ size: Size;
35
41
  flat: boolean;
36
42
  id: string;
37
43
  placeholder: string;
38
- bordered: boolean;
39
- bgColor: string;
44
+ width: string;
45
+ readonly: boolean;
40
46
  hint: string;
47
+ outlined: boolean;
48
+ borderless: boolean;
41
49
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
42
50
  declare const _default: typeof __VLS_export;
43
51
  export default _default;
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
27
27
  separator: Separator;
28
28
  flat: boolean;
29
29
  bordered: boolean;
30
- bgColor: string;
31
30
  striped: boolean;
31
+ bgColor: string;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
34
34
  declare const _default: typeof __VLS_export;
@@ -27,8 +27,8 @@ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {},
27
27
  separator: Separator;
28
28
  flat: boolean;
29
29
  bordered: boolean;
30
- bgColor: string;
31
30
  striped: boolean;
31
+ bgColor: string;
32
32
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
33
33
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
34
34
  declare const _default: typeof __VLS_export;
@@ -195,8 +195,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
195
195
  placeholder: string;
196
196
  readonly: boolean;
197
197
  error: boolean;
198
- errorMessage: string;
199
198
  hint: string;
199
+ errorMessage: string;
200
200
  maxlength: number;
201
201
  rows: number;
202
202
  maxRows: number;
@@ -195,8 +195,8 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
195
195
  placeholder: string;
196
196
  readonly: boolean;
197
197
  error: boolean;
198
- errorMessage: string;
199
198
  hint: string;
199
+ errorMessage: string;
200
200
  maxlength: number;
201
201
  rows: number;
202
202
  maxRows: number;
@@ -0,0 +1,28 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
4
+ type __VLS_WithSlots<T, S> = T & (new () => {
5
+ $slots: S;
6
+ });
7
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ title: {
9
+ type: StringConstructor;
10
+ };
11
+ caption: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ title: {
17
+ type: StringConstructor;
18
+ };
19
+ caption: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ }>> & Readonly<{}>, {
24
+ caption: string;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
26
+ type __VLS_Slots = {
27
+ default?: ((props: {}) => any) | undefined;
28
+ };
@@ -0,0 +1,34 @@
1
+ <script setup>
2
+ const props = defineProps({
3
+ title: {
4
+ type: String
5
+ },
6
+ caption: {
7
+ type: String,
8
+ default: ""
9
+ }
10
+ });
11
+ const sectionId = props.title.split(" ").join("-").toLocaleLowerCase();
12
+ const copySectionLink = async () => {
13
+ const url = `${window.location.origin}${window.location.pathname}#${sectionId}`;
14
+ try {
15
+ await navigator.clipboard.writeText(url);
16
+ console.log("Link copied:", url);
17
+ } catch (err) {
18
+ console.error("Failed to copy link", err);
19
+ }
20
+ };
21
+ </script>
22
+
23
+ <template>
24
+ <div :id="sectionId" class="flex flex-col my-10">
25
+ <h4 class="text-3xl font-semibold text-gray-700 cursor-pointer" @click="copySectionLink"># {{title}}</h4>
26
+ <div v-if="caption" class="text-md font-light mt-2 text-gray-800 pl-7">{{caption}}</div>
27
+ <div class="my-6">
28
+ <UICodeBlock :title="title">
29
+ <slot />
30
+ </UICodeBlock>
31
+ </div>
32
+ <hr/>
33
+ </div>
34
+ </template>
@@ -0,0 +1,28 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
4
+ type __VLS_WithSlots<T, S> = T & (new () => {
5
+ $slots: S;
6
+ });
7
+ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
8
+ title: {
9
+ type: StringConstructor;
10
+ };
11
+ caption: {
12
+ type: StringConstructor;
13
+ default: string;
14
+ };
15
+ }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
16
+ title: {
17
+ type: StringConstructor;
18
+ };
19
+ caption: {
20
+ type: StringConstructor;
21
+ default: string;
22
+ };
23
+ }>> & Readonly<{}>, {
24
+ caption: string;
25
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
26
+ type __VLS_Slots = {
27
+ default?: ((props: {}) => any) | undefined;
28
+ };
@@ -0,0 +1,3 @@
1
+ declare const _default: typeof __VLS_export;
2
+ export default _default;
3
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;