@indielayer/ui 1.13.1 → 1.14.0

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 (53) hide show
  1. package/docs/pages/component/accordion/index.vue +1 -1
  2. package/docs/pages/component/button/index.vue +1 -1
  3. package/docs/pages/component/checkbox/index.vue +1 -1
  4. package/docs/pages/component/container/index.vue +1 -1
  5. package/docs/pages/component/drawer/index.vue +1 -1
  6. package/docs/pages/component/form/index.vue +1 -1
  7. package/docs/pages/component/formGroup/index.vue +1 -1
  8. package/docs/pages/component/icon/index.vue +1 -1
  9. package/docs/pages/component/notifications/index.vue +1 -1
  10. package/docs/pages/component/pagination/index.vue +1 -1
  11. package/docs/pages/component/popover/index.vue +1 -1
  12. package/docs/pages/component/progress/index.vue +1 -1
  13. package/docs/pages/component/scroll/index.vue +1 -1
  14. package/docs/pages/component/skeleton/index.vue +1 -1
  15. package/docs/pages/component/slider/index.vue +1 -1
  16. package/docs/pages/component/spacer/index.vue +1 -1
  17. package/docs/pages/component/spinner/index.vue +1 -1
  18. package/docs/pages/component/table/index.vue +7 -0
  19. package/docs/pages/component/table/selectable.vue +67 -0
  20. package/docs/pages/component/table/usage.vue +2 -5
  21. package/docs/pages/component/table/virtual.vue +3 -0
  22. package/docs/pages/component/tag/index.vue +1 -1
  23. package/docs/pages/component/textarea/index.vue +1 -1
  24. package/docs/pages/component/toggle/index.vue +1 -1
  25. package/docs/pages/component/upload/index.vue +1 -1
  26. package/docs/search/components.json +1 -1
  27. package/lib/components/button/theme/Button.base.theme.js +21 -21
  28. package/lib/components/radio/theme/Radio.base.theme.js +24 -24
  29. package/lib/components/select/Select.vue.js +121 -112
  30. package/lib/components/table/Table.vue.d.ts +62 -8
  31. package/lib/components/table/Table.vue.js +273 -219
  32. package/lib/components/table/TableHeader.vue.d.ts +1 -1
  33. package/lib/components/table/TableHeader.vue.js +34 -32
  34. package/lib/components/table/TableRow.vue.d.ts +4 -0
  35. package/lib/components/table/TableRow.vue.js +3 -2
  36. package/lib/components/table/theme/TableHeader.base.theme.js +5 -1
  37. package/lib/components/table/theme/TableRow.base.theme.js +3 -3
  38. package/lib/composables/useFocusTrap.d.ts +9 -4
  39. package/lib/composables/useFocusTrap.js +42 -27
  40. package/lib/index.umd.js +4 -4
  41. package/lib/version.d.ts +1 -1
  42. package/lib/version.js +1 -1
  43. package/package.json +1 -1
  44. package/src/components/button/theme/Button.base.theme.ts +1 -1
  45. package/src/components/radio/theme/Radio.base.theme.ts +1 -1
  46. package/src/components/select/Select.vue +20 -5
  47. package/src/components/table/Table.vue +112 -15
  48. package/src/components/table/TableHeader.vue +3 -3
  49. package/src/components/table/TableRow.vue +1 -0
  50. package/src/components/table/theme/TableHeader.base.theme.ts +10 -4
  51. package/src/components/table/theme/TableRow.base.theme.ts +2 -2
  52. package/src/composables/useFocusTrap.ts +73 -42
  53. package/src/version.ts +1 -1
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Accordion'
7
- const description = 'Accordion'
7
+ const description = 'Accordion is a component that allows you to collapse and expand content.'
8
8
  const components = [XAccordion, XAccordionItem]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -14,7 +14,7 @@ import StatesDemoCode from './states.vue?raw'
14
14
  import StatesDemo from './states.vue'
15
15
 
16
16
  const title = 'Button'
17
- const description = 'Used to trigger an action, such as submitting a form, opening a menu, or performing a command.'
17
+ const description = 'Buttons allow users to perform actions and make choices with a single click. They are commonly used for submitting forms, opening dialogs or menus, and executing commands. Buttons can be customized with different styles, sizes, and icons to fit various use cases.'
18
18
  const components = [XButton, XButtonGroup]
19
19
  const demos = [{
20
20
  name: 'Usage',
@@ -10,7 +10,7 @@ import StatesDemoCode from './states.vue?raw'
10
10
  import StatesDemo from './states.vue'
11
11
 
12
12
  const title = 'Checkbox'
13
- const description = 'Checkboxes allow the user to select one or more items from a set. Checkboxes can be used to turn an option on or off.'
13
+ const description = 'Checkboxes enable users to select one or multiple options from a list. They are ideal for toggling settings or making selections where more than one choice is allowed. Each checkbox can be checked or unchecked independently.'
14
14
  const components = [XCheckbox]
15
15
  const demos = [{
16
16
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Container'
7
- const description = 'Containers are used to wrap content in an organized manner.'
7
+ const description = 'Containers provide a flexible layout element for grouping and organizing content. They help structure pages by controlling width, alignment, and spacing, ensuring consistent presentation across different sections.'
8
8
  const components = [XContainer]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Drawer'
7
- const description = 'Drawers are used to display content in a side panel.'
7
+ const description = 'Drawers slide in from the edge of the screen to present navigation, options, or additional content without disrupting the main view. They are ideal for menus, filters, or contextual panels.'
8
8
  const components = [XDrawer]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Form'
7
- const description = 'Forms are used to collect user input.'
7
+ const description = 'Forms provide a structured way to collect and validate user input, such as text, selections, and files. They support features like validation, grouping, and submission handling, making it easy to build interactive and accessible data entry interfaces.'
8
8
  const components = [XForm]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'FormGroup'
7
- const description = 'A form group is a wrapper for form elements.'
7
+ const description = 'Form groups organize related form elements together, providing structure and shared validation. They help group checkboxes, radio buttons, or inputs that belong to the same logical section.'
8
8
  const components = [XFormGroup]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -6,7 +6,7 @@ import VariantsDemoCode from './variants.vue?raw'
6
6
  import VariantsDemo from './variants.vue'
7
7
 
8
8
  const title = 'Icon'
9
- const description = 'Icons are used to represent an action or an object.'
9
+ const description = 'Icons visually represent actions, objects, or concepts, enhancing usability and recognition in interfaces. They can be used alone or alongside text for buttons, menus, and indicators.'
10
10
  const components = [XIcon]
11
11
  const demos = [{
12
12
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Notifications'
7
- const description = 'Notifications are used to display a message to the user.'
7
+ const description = 'Notifications provide timely feedback or alerts to users, such as success messages, warnings, or errors. They help keep users informed about important events or actions.'
8
8
  const components = [XNotifications]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Pagination'
7
- const description = 'Pagination is used to navigate through a list of items.'
7
+ const description = 'Pagination divides large sets of content into manageable pages, allowing users to navigate through items efficiently. It is commonly used in tables, lists, and search results to improve usability and performance.'
8
8
  const components = [XPagination]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Popover'
7
- const description = 'Popover is used to display content in a small overlay.'
7
+ const description = 'Popovers display additional information or interactive content in a floating overlay, anchored to a trigger element. They are useful for tooltips, menus, or contextual actions without navigating away from the current view.'
8
8
  const components = [XPopover, XPopoverContainer]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -6,7 +6,7 @@ import VariantsDemoCode from './variants.vue?raw'
6
6
  import VariantsDemo from './variants.vue'
7
7
 
8
8
  const title = 'Progress'
9
- const description = 'Progress is used to show the progress of an operation.'
9
+ const description = 'Progress indicators visually communicate the completion status of a task or process, such as file uploads or data loading. They help users understand how much work remains.'
10
10
  const components = [XProgress]
11
11
  const demos = [{
12
12
  name: 'Usage',
@@ -6,7 +6,7 @@ import HorizontalDemoCode from './horizontal.vue?raw'
6
6
  import HorizontalDemo from './horizontal.vue'
7
7
 
8
8
  const title = 'Scroll'
9
- const description = 'Scroll is used to scroll through a list of items with added features like inner shadows to indicate there is more to scroll.'
9
+ const description = 'The Scroll component enhances scrolling experiences by adding visual cues, such as inner shadows, to indicate additional content. It is useful for horizontally or vertically scrolling lists and containers.'
10
10
  const components = [XScroll]
11
11
  const demos = [{
12
12
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Skeleton'
7
- const description = 'Skeletons are used to display a loading state.'
7
+ const description = 'Skeletons provide placeholder elements that mimic the layout of content while data is loading. They improve perceived performance by giving users a visual cue that content is being fetched.'
8
8
  const components = [XSkeleton]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Slider'
7
- const description = 'Sliders are used to select a value from a range.'
7
+ const description = 'Sliders allow users to select a numeric value or range by dragging a handle along a track. They are ideal for adjusting settings such as volume, brightness, or price filters.'
8
8
  const components = [XSlider]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Spacer'
7
- const description = 'Spacer is used to add space between elements inside a display flex wrapper.'
7
+ const description = 'Spacers create adjustable gaps between elements within flex layouts, helping to control spacing and alignment without using margin or padding directly.'
8
8
  const components = [XSpacer]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -6,7 +6,7 @@ import VariantsDemoCode from './variants.vue?raw'
6
6
  import VariantsDemo from './variants.vue'
7
7
 
8
8
  const title = 'Spinner'
9
- const description = 'Spinners are used to indicate that an operation is in progress.'
9
+ const description = 'Spinners visually indicate that a background process or operation is ongoing, such as loading data or submitting a form. They help manage user expectations by signaling that the system is working.'
10
10
  const components = [XSpinner]
11
11
  const demos = [{
12
12
  name: 'Usage',
@@ -6,6 +6,8 @@ import VirtualDemoCode from './virtual.vue?raw'
6
6
  import VirtualDemo from './virtual.vue'
7
7
  import StatesDemoCode from './states.vue?raw'
8
8
  import StatesDemo from './states.vue'
9
+ import SelectableDemoCode from './selectable.vue?raw'
10
+ import SelectableDemo from './selectable.vue'
9
11
 
10
12
  const title = 'Table'
11
13
  const description = 'Tables are used to display data in a tabular format.'
@@ -15,6 +17,11 @@ const demos = [{
15
17
  description: '',
16
18
  code: UsageDemoCode,
17
19
  component: UsageDemo,
20
+ }, {
21
+ name: 'Selectable',
22
+ description: '',
23
+ code: SelectableDemoCode,
24
+ component: SelectableDemo,
18
25
  }, {
19
26
  name: 'Virtual List',
20
27
  description: '',
@@ -0,0 +1,67 @@
1
+ <script setup lang="ts">
2
+ import { ref } from 'vue'
3
+ import { type TableHeader } from '@indielayer/ui'
4
+
5
+ const headers: TableHeader[] = [
6
+ { text: '#', value: 'id', align: 'center' },
7
+ { text: 'Title', value: 'title' },
8
+ { text: 'Description', value: 'description', truncate: true, width: 400 },
9
+ { text: 'Published', value: 'published', align: 'center' },
10
+ { text: 'Status', value: 'status' },
11
+ ]
12
+
13
+ type Book = {
14
+ id: number;
15
+ title: string;
16
+ description: string;
17
+ published: number;
18
+ status: string;
19
+ }
20
+
21
+ const items = ref<Book[]>([{
22
+ id: 1,
23
+ title: 'Book of Magic',
24
+ description: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Saepe, velit.',
25
+ published: Date.now() - 1000,
26
+ status: 'Tag label',
27
+ }, {
28
+ id: 2,
29
+ title: 'Another book',
30
+ description: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Saepe, velit.',
31
+ published: Date.now() - 5000,
32
+ status: 'Tag label',
33
+ }, {
34
+ id: 3,
35
+ title: 'Clever cove',
36
+ description: 'Lorem ipsum dolor sit, amet consectetur adipisicing elit. Saepe, velit.',
37
+ published: Date.now() - 3000,
38
+ status: 'Tag label',
39
+ }])
40
+
41
+ const selected = ref<number[]>([])
42
+ const singleSelected = ref<number>(2)
43
+ </script>
44
+
45
+ <template>
46
+ <div class="grid gap-4">
47
+ <x-card>
48
+ <x-table
49
+ v-model:selected="selected"
50
+ selectable
51
+ :headers="headers"
52
+ :items="items"
53
+ />
54
+ </x-card>
55
+ <x-card>
56
+ <x-table
57
+ v-model:selected="singleSelected"
58
+ key-prop="id"
59
+ selectable
60
+ pointer
61
+ single-select
62
+ :headers="headers"
63
+ :items="items"
64
+ />
65
+ </x-card>
66
+ </div>
67
+ </template>
@@ -8,7 +8,7 @@ const headers: TableHeader[] = [
8
8
  { text: '#', value: 'id', sortable: true, align: 'center' },
9
9
  { text: 'Title', value: 'title' },
10
10
  { text: 'Description', value: 'description', truncate: true, width: 400 },
11
- { text: 'Published', value: 'published', sortable: true, tooltip: 'Published date' },
11
+ { text: 'Published', value: 'published', sortable: true, tooltip: 'Published date', align: 'center' },
12
12
  { text: 'Status', value: 'status' },
13
13
  ]
14
14
 
@@ -60,8 +60,6 @@ const itemsSorted = computed<Book[]>(() => {
60
60
  return 0
61
61
  })
62
62
  })
63
-
64
- const selected = ref<number>(2)
65
63
  </script>
66
64
 
67
65
  <template>
@@ -89,14 +87,13 @@ const selected = ref<number>(2)
89
87
  <x-card>
90
88
  <x-table
91
89
  v-model:sort="sort"
92
- v-model:selected="selected"
93
90
  key-prop="id"
94
91
  dense
95
92
  pointer
96
93
  striped
97
94
  :headers="headers"
98
95
  :items="itemsSorted"
99
- @click-row="(event, index) => { notifications?.log(event); selected = event.id }"
96
+ @click-row="(event, index) => { notifications?.log(event); }"
100
97
  >
101
98
  <template #item-published="{ item }">
102
99
  {{ formatDate(item.published) }}
@@ -38,18 +38,21 @@ function generateItems(x: number) {
38
38
  }
39
39
 
40
40
  const items = ref(generateItems(1000))
41
+ const selected = ref<number[]>([])
41
42
  </script>
42
43
 
43
44
  <template>
44
45
  <x-card>
45
46
  <x-table
46
47
  v-model:sort="sort"
48
+ v-model:selected="selected"
47
49
  :headers="headers"
48
50
  :items="itemsSorted"
49
51
  class="!h-80"
50
52
  fixed
51
53
  virtual-list
52
54
  :virtual-list-item-height="54"
55
+ selectable
53
56
  >
54
57
  <template #item-action="{ item }">
55
58
  <x-button
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Tag'
7
- const description = 'Tags are used to display a small amount of information. They can be used to display a category, a status, or a label.'
7
+ const description = 'Tags are compact elements used to display brief information, such as categories, statuses, or labels. They help organize content and provide quick context or filtering options within lists and interfaces.'
8
8
  const components = [XTag]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -8,7 +8,7 @@ import StatesDemoCode from './states.vue?raw'
8
8
  import StatesDemo from './states.vue'
9
9
 
10
10
  const title = 'Textarea'
11
- const description = 'Textareas allow the user to enter text.'
11
+ const description = 'Textareas provide a multi-line input field for users to enter longer text, such as comments, descriptions, or messages. They support resizing and can be customized for different use cases.'
12
12
  const components = [XTextarea]
13
13
  const demos = [{
14
14
  name: 'Usage',
@@ -8,7 +8,7 @@ import StatesDemoCode from './states.vue?raw'
8
8
  import StatesDemo from './states.vue'
9
9
 
10
10
  const title = 'Toggle'
11
- const description = 'Toggles are used to switch between two states.'
11
+ const description = 'Toggles provide a simple switch interface for enabling or disabling a setting, or switching between two mutually exclusive states. They are ideal for binary options such as on/off, active/inactive, or show/hide.'
12
12
  const components = [XToggle]
13
13
  const demos = [{
14
14
  name: 'Usage',
@@ -4,7 +4,7 @@ import UsageDemoCode from './usage.vue?raw'
4
4
  import UsageDemo from './usage.vue'
5
5
 
6
6
  const title = 'Upload'
7
- const description = 'The upload component is used to upload files.'
7
+ const description = 'Upload is a component that allows you to upload files.'
8
8
  const components = [XUpload]
9
9
  const demos = [{
10
10
  name: 'Usage',
@@ -1 +1 @@
1
- [{"name":"Accordion","description":"Accordion","url":"/component/accordion"},{"name":"Alert","description":"Alerts are used to communicate a state that affects a system, feature or page.","url":"/component/alert"},{"name":"Avatar","description":"Avatars are used to represent a user.","url":"/component/avatar"},{"name":"Badge","description":"Badges are used to display a small amount of information.","url":"/component/badge"},{"name":"Breadcrumbs","description":"Breadcrumbs are used to indicate the current page\\","url":"/component/breadcrumbs"},{"name":"Button","description":"Used to trigger an action, such as submitting a form, opening a menu, or performing a command.","url":"/component/button"},{"name":"Card","description":"Cards are used to display content in an organized manner.","url":"/component/card"},{"name":"Carousel","description":"A carousel is a rotating set of images.","url":"/component/carousel"},{"name":"Checkbox","description":"Checkboxes allow the user to select one or more items from a set. Checkboxes can be used to turn an option on or off.","url":"/component/checkbox"},{"name":"Container","description":"Containers are used to wrap content in an organized manner.","url":"/component/container"},{"name":"Datepicker","description":"The datepicker component is used to select a date or time.","url":"/component/datepicker"},{"name":"Divider","description":"Dividers are used to separate content.","url":"/component/divider"},{"name":"Drawer","description":"Drawers are used to display content in a side panel.","url":"/component/drawer"},{"name":"Form","description":"Forms are used to collect user input.","url":"/component/form"},{"name":"FormGroup","description":"A form group is a wrapper for form elements.","url":"/component/formGroup"},{"name":"Icon","description":"Icons are used to represent an action or an object.","url":"/component/icon"},{"name":"Image","description":"Image is used to load an image file with a skeleton as placeholder and on load display the image.","url":"/component/image"},{"name":"Input","description":"This is a text input component that allows users to enter and edit text.","url":"/component/input"},{"name":"Link","description":"Links are used to navigate to a different page.","url":"/component/link"},{"name":"Loader","description":"Loader component is used to show a loading state.","url":"/component/loader"},{"name":"Menu","description":"Menus are used to display a list of options.","url":"/component/menu"},{"name":"Modal","description":"Modals are used to display content on top of the current page.","url":"/component/modal"},{"name":"Notifications","description":"Notifications are used to display a message to the user.","url":"/component/notifications"},{"name":"Pagination","description":"Pagination is used to navigate through a list of items.","url":"/component/pagination"},{"name":"Popover","description":"Popover is used to display content in a small overlay.","url":"/component/popover"},{"name":"Progress","description":"Progress is used to show the progress of an operation.","url":"/component/progress"},{"name":"QR Code","description":"The QR Code component is used to generate a QR code.","url":"/component/qrCode"},{"name":"Radio","description":"Radios allow the user to select one option from a set. Use radio buttons for exclusive selection if you think that the user needs to see all available options side-by-side.","url":"/component/radio"},{"name":"Scroll","description":"Scroll is used to scroll through a list of items with added features like inner shadows to indicate there is more to scroll.","url":"/component/scroll"},{"name":"Select","description":"Selects allow the user to select one or more options from a set.","url":"/component/select"},{"name":"Skeleton","description":"Skeletons are used to display a loading state.","url":"/component/skeleton"},{"name":"Slider","description":"Sliders are used to select a value from a range.","url":"/component/slider"},{"name":"Spacer","description":"Spacer is used to add space between elements inside a display flex wrapper.","url":"/component/spacer"},{"name":"Spinner","description":"Spinners are used to indicate that an operation is in progress.","url":"/component/spinner"},{"name":"Stepper","description":"Stepper is a navigation component that guides users through the steps of a task.","url":"/component/stepper"},{"name":"Table","description":"Tables are used to display data in a tabular format.","url":"/component/table"},{"name":"Tabs","description":"Tabs are used to navigate through a set of views.","url":"/component/tabs"},{"name":"Tag","description":"Tags are used to display a label.","url":"/component/tag"},{"name":"Textarea","description":"Textareas allow the user to enter text.","url":"/component/textarea"},{"name":"Toggle","description":"Toggles are used to switch between two states.","url":"/component/toggle"},{"name":"Tooltip","description":"Tooltips are used to display a message when hovering over an element.","url":"/component/tooltip"},{"name":"Upload","description":"The upload component is used to upload files.","url":"/component/upload"}]
1
+ [{"name":"Accordion","description":"Accordion is a component that allows you to collapse and expand content.","url":"/component/accordion"},{"name":"Alert","description":"Alerts are used to communicate a state that affects a system, feature or page.","url":"/component/alert"},{"name":"Avatar","description":"Avatars are used to represent a user.","url":"/component/avatar"},{"name":"Badge","description":"Badges are used to display a small amount of information.","url":"/component/badge"},{"name":"Breadcrumbs","description":"Breadcrumbs are used to indicate the current page\\","url":"/component/breadcrumbs"},{"name":"Button","description":"Buttons allow users to perform actions and make choices with a single click. They are commonly used for submitting forms, opening dialogs or menus, and executing commands. Buttons can be customized with different styles, sizes, and icons to fit various use cases.","url":"/component/button"},{"name":"Card","description":"Cards are used to display content in an organized manner.","url":"/component/card"},{"name":"Carousel","description":"A carousel is a rotating set of images.","url":"/component/carousel"},{"name":"Checkbox","description":"Checkboxes enable users to select one or multiple options from a list. They are ideal for toggling settings or making selections where more than one choice is allowed. Each checkbox can be checked or unchecked independently.","url":"/component/checkbox"},{"name":"Container","description":"Containers provide a flexible layout element for grouping and organizing content. They help structure pages by controlling width, alignment, and spacing, ensuring consistent presentation across different sections.","url":"/component/container"},{"name":"Datepicker","description":"The datepicker component is used to select a date or time.","url":"/component/datepicker"},{"name":"Divider","description":"Dividers are used to separate content.","url":"/component/divider"},{"name":"Drawer","description":"Drawers slide in from the edge of the screen to present navigation, options, or additional content without disrupting the main view. They are ideal for menus, filters, or contextual panels.","url":"/component/drawer"},{"name":"Form","description":"Forms provide a structured way to collect and validate user input, such as text, selections, and files. They support features like validation, grouping, and submission handling, making it easy to build interactive and accessible data entry interfaces.","url":"/component/form"},{"name":"FormGroup","description":"Form groups organize related form elements together, providing structure and shared validation. They help group checkboxes, radio buttons, or inputs that belong to the same logical section.","url":"/component/formGroup"},{"name":"Icon","description":"Icons visually represent actions, objects, or concepts, enhancing usability and recognition in interfaces. They can be used alone or alongside text for buttons, menus, and indicators.","url":"/component/icon"},{"name":"Image","description":"Image is used to load an image file with a skeleton as placeholder and on load display the image.","url":"/component/image"},{"name":"Input","description":"This is a text input component that allows users to enter and edit text.","url":"/component/input"},{"name":"Link","description":"Links are used to navigate to a different page.","url":"/component/link"},{"name":"Loader","description":"Loader component is used to show a loading state.","url":"/component/loader"},{"name":"Menu","description":"Menus are used to display a list of options.","url":"/component/menu"},{"name":"Modal","description":"Modals are used to display content on top of the current page.","url":"/component/modal"},{"name":"Notifications","description":"Notifications provide timely feedback or alerts to users, such as success messages, warnings, or errors. They help keep users informed about important events or actions.","url":"/component/notifications"},{"name":"Pagination","description":"Pagination divides large sets of content into manageable pages, allowing users to navigate through items efficiently. It is commonly used in tables, lists, and search results to improve usability and performance.","url":"/component/pagination"},{"name":"Popover","description":"Popovers display additional information or interactive content in a floating overlay, anchored to a trigger element. They are useful for tooltips, menus, or contextual actions without navigating away from the current view.","url":"/component/popover"},{"name":"Progress","description":"Progress indicators visually communicate the completion status of a task or process, such as file uploads or data loading. They help users understand how much work remains.","url":"/component/progress"},{"name":"QR Code","description":"The QR Code component is used to generate a QR code.","url":"/component/qrCode"},{"name":"Radio","description":"Radios allow the user to select one option from a set. Use radio buttons for exclusive selection if you think that the user needs to see all available options side-by-side.","url":"/component/radio"},{"name":"Scroll","description":"The Scroll component enhances scrolling experiences by adding visual cues, such as inner shadows, to indicate additional content. It is useful for horizontally or vertically scrolling lists and containers.","url":"/component/scroll"},{"name":"Select","description":"Selects allow the user to select one or more options from a set.","url":"/component/select"},{"name":"Skeleton","description":"Skeletons provide placeholder elements that mimic the layout of content while data is loading. They improve perceived performance by giving users a visual cue that content is being fetched.","url":"/component/skeleton"},{"name":"Slider","description":"Sliders allow users to select a numeric value or range by dragging a handle along a track. They are ideal for adjusting settings such as volume, brightness, or price filters.","url":"/component/slider"},{"name":"Spacer","description":"Spacers create adjustable gaps between elements within flex layouts, helping to control spacing and alignment without using margin or padding directly.","url":"/component/spacer"},{"name":"Spinner","description":"Spinners visually indicate that a background process or operation is ongoing, such as loading data or submitting a form. They help manage user expectations by signaling that the system is working.","url":"/component/spinner"},{"name":"Stepper","description":"Stepper is a navigation component that guides users through the steps of a task.","url":"/component/stepper"},{"name":"Table","description":"Tables are used to display data in a tabular format.","url":"/component/table"},{"name":"Tabs","description":"Tabs are used to navigate through a set of views.","url":"/component/tabs"},{"name":"Tag","description":"Tags are compact elements used to display brief information, such as categories, statuses, or labels. They help organize content and provide quick context or filtering options within lists and interfaces.","url":"/component/tag"},{"name":"Textarea","description":"Textareas provide a multi-line input field for users to enter longer text, such as comments, descriptions, or messages. They support resizing and can be customized for different use cases.","url":"/component/textarea"},{"name":"Toggle","description":"Toggles provide a simple switch interface for enabling or disabling a setting, or switching between two mutually exclusive states. They are ideal for binary options such as on/off, active/inactive, or show/hide.","url":"/component/toggle"},{"name":"Tooltip","description":"Tooltips are used to display a message when hovering over an element.","url":"/component/tooltip"},{"name":"Upload","description":"Upload is a component that allows you to upload files.","url":"/component/upload"}]
@@ -1,15 +1,15 @@
1
1
  const g = {
2
2
  classes: {
3
3
  wrapper({ props: e, slots: n, data: i }) {
4
- const l = ["relative transition duration-150 focus:outline-none inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden align-middle active:!shadow-none border appearance-none shrink-0"];
5
- return i.isButtonGroup || l.push(e.rounded ? "rounded-full" : "rounded-md"), !e.flat && !e.light && !e.ghost && !e.disabled && !e.loading && l.push("shadow-sm"), e.size === "xs" ? l.push(n.default ? `py-1 text-xs ${e.icon, "px-2"}` : "leading-none p-1") : e.size === "sm" ? l.push(n.default ? `py-1.5 text-sm ${e.icon, "px-3"}` : "leading-none p-1.5") : e.size === "lg" ? l.push(n.default ? `py-3 text-lg ${e.icon ? "px-4" : "px-5"}` : "leading-none p-3") : e.size === "xl" ? l.push(n.default ? "py-4 text-xl px-6" : "leading-none p-3.5") : l.push(n.default ? "py-2 px-4" : "leading-none p-[0.532rem]"), e.disabled ? l.push("cursor-not-allowed") : e.loading ? l.push("cursor-default") : l.push("cursor-pointer"), l;
4
+ const d = ["relative transition duration-150 focus-visible:outline-secondary-300 outline-transparent outline outline-1 outline-offset-2 inline-flex items-center justify-center font-medium whitespace-nowrap overflow-hidden align-middle active:!shadow-none border appearance-none shrink-0"];
5
+ return i.isButtonGroup || d.push(e.rounded ? "rounded-full" : "rounded-md"), !e.flat && !e.light && !e.ghost && !e.disabled && !e.loading && d.push("shadow-sm"), e.size === "xs" ? d.push(n.default ? `py-1 text-xs ${e.icon, "px-2"}` : "leading-none p-1") : e.size === "sm" ? d.push(n.default ? `py-1.5 text-sm ${e.icon, "px-3"}` : "leading-none p-1.5") : e.size === "lg" ? d.push(n.default ? `py-3 text-lg ${e.icon ? "px-4" : "px-5"}` : "leading-none p-3") : e.size === "xl" ? d.push(n.default ? "py-4 text-xl px-6" : "leading-none p-3.5") : d.push(n.default ? "py-2 px-4" : "leading-none p-[0.532rem]"), e.disabled ? d.push("cursor-not-allowed") : e.loading ? d.push("cursor-default") : d.push("cursor-pointer"), d;
6
6
  },
7
7
  iconLeft: ({ slots: e }) => e.default ? "mr-2" : "m-0.5",
8
8
  iconRight: ({ slots: e }) => e.default ? "ml-2" : "m-0.5"
9
9
  },
10
- styles({ props: e, colors: n, css: i, data: l }) {
11
- const a = n.getPalette("gray"), t = e.color ? n.getPalette(e.color) : a, d = [], r = e.color && e.light, b = !e.color && !e.ghost;
12
- return e.glow && d.push(i.get("glow", n.getColorOpacity(e.color ? t[500] : a[500], 0.5))), b ? e.disabled ? d.push(i.variables({
10
+ styles({ props: e, colors: n, css: i, data: d }) {
11
+ const a = n.getPalette("gray"), t = e.color ? n.getPalette(e.color) : a, l = [], r = e.color && e.light, b = !e.color && !e.ghost;
12
+ return e.glow && l.push(i.get("glow", n.getColorOpacity(e.color ? t[500] : a[500], 0.5))), b ? e.disabled ? l.push(i.variables({
13
13
  bg: a[50],
14
14
  text: a[300],
15
15
  border: a[200],
@@ -18,7 +18,7 @@ const g = {
18
18
  text: a[600],
19
19
  border: a[700]
20
20
  }
21
- })) : d.push(i.variables({
21
+ })) : l.push(i.variables({
22
22
  bg: "white",
23
23
  text: a[800],
24
24
  border: a[300],
@@ -31,7 +31,7 @@ const g = {
31
31
  hover: { bg: e.loading ? "" : a[700], border: a[600] },
32
32
  active: { bg: e.loading ? "" : a[600], border: a[500] }
33
33
  }
34
- })) : r ? ((!e.outlined || e.disabled) && d.push(i.get("border", "transparent")), e.disabled ? d.push(i.variables({
34
+ })) : r ? ((!e.outlined || e.disabled) && l.push(i.get("border", "transparent")), e.disabled ? l.push(i.variables({
35
35
  bg: t[50],
36
36
  text: t[200],
37
37
  border: "transparent",
@@ -40,7 +40,7 @@ const g = {
40
40
  text: t[900],
41
41
  border: "transparent"
42
42
  }
43
- })) : d.push(i.variables({
43
+ })) : l.push(i.variables({
44
44
  bg: t[50],
45
45
  text: t[600],
46
46
  border: e.outlined ? t[500] : "transparent",
@@ -53,69 +53,69 @@ const g = {
53
53
  hover: { bg: e.loading ? "" : t[800] },
54
54
  active: { bg: e.loading ? "" : t[700] }
55
55
  }
56
- }))) : e.ghost ? (e.outlined || d.push(i.get("border", "transparent")), e.color ? e.disabled ? d.push(i.variables({
56
+ }))) : e.ghost ? (e.outlined || l.push(i.get("border", "transparent")), e.color ? e.disabled ? l.push(i.variables({
57
57
  text: t[200],
58
58
  dark: {
59
59
  text: t[700]
60
60
  }
61
- })) : (d.push(i.variables({
61
+ })) : (l.push(i.variables({
62
62
  text: t[600],
63
63
  dark: {
64
64
  text: t[500]
65
65
  }
66
- })), e.loading || d.push(i.variables({
66
+ })), e.loading || l.push(i.variables({
67
67
  hover: { bg: t[50] },
68
68
  active: { bg: t[100] },
69
69
  dark: {
70
70
  hover: { bg: a[800] },
71
71
  active: { bg: a[700] }
72
72
  }
73
- }))) : e.disabled ? d.push(i.variables({
73
+ }))) : e.disabled ? l.push(i.variables({
74
74
  text: a[200],
75
75
  dark: {
76
76
  text: a[700]
77
77
  }
78
- })) : (d.push(i.variables({
78
+ })) : (l.push(i.variables({
79
79
  text: a[800],
80
80
  dark: {
81
81
  text: "white"
82
82
  }
83
- })), e.loading || d.push(i.variables({
83
+ })), e.loading || l.push(i.variables({
84
84
  hover: { bg: a[100] },
85
85
  active: { bg: a[200] },
86
86
  dark: {
87
87
  hover: { bg: a[800] },
88
88
  active: { bg: a[700] }
89
89
  }
90
- })))) : e.outlined ? e.disabled ? d.push(i.variables({
90
+ })))) : e.outlined ? e.disabled ? l.push(i.variables({
91
91
  text: t[200],
92
92
  border: t[200],
93
93
  dark: {
94
94
  text: t[700],
95
95
  border: t[700]
96
96
  }
97
- })) : (d.push(i.variables({
97
+ })) : (l.push(i.variables({
98
98
  text: t[600],
99
99
  border: t[600],
100
100
  dark: {
101
101
  text: t[500],
102
102
  border: t[500]
103
103
  }
104
- })), e.loading || d.push(i.variables({
104
+ })), e.loading || l.push(i.variables({
105
105
  hover: { bg: t[100] },
106
106
  active: { bg: t[200] },
107
107
  dark: {
108
108
  hover: { bg: a[800] },
109
109
  active: { bg: a[700] }
110
110
  }
111
- }))) : (d.push(i.variables({
111
+ }))) : (l.push(i.variables({
112
112
  text: "#fff",
113
113
  border: t[600],
114
114
  dark: {
115
115
  text: "#fff",
116
116
  border: t[500]
117
117
  }
118
- })), e.disabled ? d.push(i.variables({
118
+ })), e.disabled ? l.push(i.variables({
119
119
  bg: a[100],
120
120
  border: a[300],
121
121
  text: a[400],
@@ -124,7 +124,7 @@ const g = {
124
124
  border: a[700],
125
125
  bg: a[800]
126
126
  }
127
- })) : d.push(i.variables({
127
+ })) : l.push(i.variables({
128
128
  bg: t[500],
129
129
  hover: { bg: e.loading ? "" : t[600] },
130
130
  active: { bg: e.loading ? "" : t[800] },
@@ -133,7 +133,7 @@ const g = {
133
133
  hover: { bg: e.loading ? "" : t[700] },
134
134
  active: { bg: e.loading ? "" : t[800] }
135
135
  }
136
- }))), d;
136
+ }))), l;
137
137
  }
138
138
  }, o = g;
139
139
  export {