@usssa/component-library 1.0.0-alpha.21 → 1.0.0-alpha.210

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 (97) hide show
  1. package/README.md +8 -5
  2. package/package.json +25 -6
  3. package/src/assets/fonts/CorneroRegular.woff +0 -0
  4. package/src/assets/fonts/CorneroRegular.woff2 +0 -0
  5. package/src/assets/logo.svg +19 -0
  6. package/src/assets/no-result.svg +25 -0
  7. package/src/assets/upload-illustration.svg +48 -0
  8. package/src/components/core/UAccordionSelect.vue +237 -0
  9. package/src/components/core/UAvatar.vue +90 -26
  10. package/src/components/core/UAvatarGroup.vue +62 -52
  11. package/src/components/core/UBadgeStd.vue +6 -1
  12. package/src/components/core/UBannerStd.vue +100 -31
  13. package/src/components/core/UBreadCrumbs.vue +171 -0
  14. package/src/components/core/UBtnIcon.vue +57 -52
  15. package/src/components/core/UBtnStd.vue +38 -31
  16. package/src/components/core/UBtnToggle.vue +11 -6
  17. package/src/components/core/UCheckboxStd.vue +26 -20
  18. package/src/components/core/UChip.vue +91 -43
  19. package/src/components/core/UDate.vue +581 -0
  20. package/src/components/core/UDialogStd.vue +452 -58
  21. package/src/components/core/UDrawer/UDrawer.vue +471 -0
  22. package/src/components/core/UDrawer/UDrawerMenuItem.vue +124 -0
  23. package/src/components/core/UEventCard.vue +419 -0
  24. package/src/components/core/UExpansionStd.vue +274 -0
  25. package/src/components/core/UExpansionTableStd.vue +297 -0
  26. package/src/components/core/UFilter.vue +89 -0
  27. package/src/components/core/UGameObject.vue +441 -0
  28. package/src/components/core/UInnerLoader.vue +69 -0
  29. package/src/components/core/UInputAddressLookup.vue +484 -0
  30. package/src/components/core/UInputPhoneStd.vue +74 -68
  31. package/src/components/core/UInputTextStd.vue +137 -116
  32. package/src/components/core/UInputTypeahead.vue +44 -0
  33. package/src/components/core/UInputTypeaheadAdvanceSearch.vue +134 -0
  34. package/src/components/core/UMenuButtonStd.vue +280 -0
  35. package/src/components/core/UMenuDropdown.vue +82 -0
  36. package/src/components/core/UMenuDropdownAdvancedSearch.vue +306 -0
  37. package/src/components/core/UMenuItem.vue +221 -0
  38. package/src/components/core/UMenuSearch.vue +73 -0
  39. package/src/components/core/UModal.vue +660 -0
  40. package/src/components/core/UMultiSelectStd.vue +501 -61
  41. package/src/components/core/UPagination.vue +84 -25
  42. package/src/components/core/URadioBtn.vue +66 -43
  43. package/src/components/core/URadioStd.vue +23 -14
  44. package/src/components/core/USelectStd.vue +415 -84
  45. package/src/components/core/USheet.vue +349 -0
  46. package/src/components/core/UStepper/UProgress.vue +157 -0
  47. package/src/components/core/UStepper/UStepper.vue +211 -0
  48. package/src/components/core/UTabBtnStd.vue +36 -22
  49. package/src/components/core/UTable/UTable.vue +2055 -57
  50. package/src/components/core/UTableStd.vue +1301 -273
  51. package/src/components/core/UTabsStd.vue +52 -23
  52. package/src/components/core/UToggleStd.vue +18 -13
  53. package/src/components/core/UToolbar/UCustomMenuIcon.vue +58 -0
  54. package/src/components/core/UToolbar/UToolbar.vue +226 -0
  55. package/src/components/core/UTooltip.vue +31 -10
  56. package/src/components/core/UTypeahead.vue +890 -0
  57. package/src/components/core/UUploader.vue +644 -0
  58. package/src/components/index.js +77 -26
  59. package/src/composables/useNotify.js +16 -16
  60. package/src/composables/useOverlayLoader.js +23 -0
  61. package/src/composables/useScreenType.js +30 -0
  62. package/src/css/app.sass +42 -25
  63. package/src/css/colors.sass +2 -0
  64. package/src/css/quasar.variables.sass +99 -68
  65. package/src/css/vars/colors.variables.sass +28 -41
  66. package/src/utils/data.ts +177 -0
  67. package/src/App.vue +0 -9
  68. package/src/boot/.gitkeep +0 -0
  69. package/src/layouts/MainLayout.vue +0 -137
  70. package/src/pages/Avatar.vue +0 -77
  71. package/src/pages/AvatarGroup.vue +0 -139
  72. package/src/pages/BadgeStd.vue +0 -83
  73. package/src/pages/BannerPage.vue +0 -76
  74. package/src/pages/BtnIcon.vue +0 -120
  75. package/src/pages/BtnStd.vue +0 -126
  76. package/src/pages/BtnToggle.vue +0 -131
  77. package/src/pages/CheckBox.vue +0 -62
  78. package/src/pages/Chip.vue +0 -92
  79. package/src/pages/ComponentBase.vue +0 -54
  80. package/src/pages/Dialog.vue +0 -206
  81. package/src/pages/ErrorNotFound.vue +0 -11
  82. package/src/pages/IndexPage.vue +0 -11
  83. package/src/pages/InputPhone.vue +0 -152
  84. package/src/pages/InputText.vue +0 -139
  85. package/src/pages/MultiSelectStd.vue +0 -174
  86. package/src/pages/NotifyPage.vue +0 -109
  87. package/src/pages/Pagination.vue +0 -71
  88. package/src/pages/Radio.vue +0 -80
  89. package/src/pages/RadioBtn.vue +0 -104
  90. package/src/pages/SelectStd.vue +0 -160
  91. package/src/pages/TabButtonPage.vue +0 -126
  92. package/src/pages/TablePage.vue +0 -371
  93. package/src/pages/TabsPage.vue +0 -261
  94. package/src/pages/TogglePage.vue +0 -58
  95. package/src/pages/TooltipPage.vue +0 -125
  96. package/src/router/index.js +0 -34
  97. package/src/router/routes.js +0 -113
@@ -1,83 +0,0 @@
1
- <script setup>
2
- import { computed, ref, watch } from 'vue'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { UBadgeStd } from 'src/components'
5
-
6
- const color = ref('primary')
7
- const colorOptions = ['primary', 'accent', 'warning', 'positive', 'neutral']
8
-
9
- const size = ref('md')
10
- const type = ref('basic')
11
- const sizeOptions = ['xxs', 'xs', 'sm', 'md', 'lg']
12
- watch(type, () => {
13
- size.value = type.value === 'indicator' ? 'xxs' : 'md'
14
- })
15
- const filteredSizeOptions = computed(() => {
16
- if (type.value === 'indicator') {
17
- return sizeOptions.filter((size) => size !== 'md' && size !== 'lg')
18
- }
19
- return ['md', 'lg']
20
- })
21
- const label = ref('01')
22
- const htmlContent = `<UBadgeStd
23
- :label="label"
24
- :color="color"
25
- :size="size"
26
- :type="type"
27
- />`
28
- defineOptions({
29
- name: 'BtnStd',
30
- })
31
- </script>
32
-
33
- <template>
34
- <q-page class="flex flex-center">
35
- <ComponentBase
36
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=508-19370&t=DR7gF8DTYY1JvngY-0"
37
- >
38
- <template v-slot:component>
39
- <UBadgeStd :label="label" :color="color" :size="size" :type="type" />
40
- </template>
41
-
42
- <template v-slot:properties
43
- ><div class="column q-gutter-y-lg">
44
- <div class="container column">
45
- <div class="q-gutter-sm">
46
- <div class="q-mt-md">
47
- <q-label>Label</q-label>
48
- <q-input v-model="label"></q-input>
49
- </div>
50
- <q-select v-model="color" :options="colorOptions" label="Color" />
51
- <q-select
52
- v-model="size"
53
- :options="filteredSizeOptions"
54
- label="Size"
55
- />
56
- <div>
57
- <q-label class="q-mr-sm">Type</q-label>
58
-
59
- <q-radio
60
- dense
61
- v-model="type"
62
- val="basic"
63
- label="Basic"
64
- class="q-pr-sm"
65
- />
66
- <q-radio
67
- dense
68
- v-model="type"
69
- val="indicator"
70
- label="Indicator"
71
- />
72
- </div>
73
- </div>
74
- </div>
75
- </div>
76
- </template>
77
-
78
- <template v-slot:code>
79
- <pre>{{ htmlContent }}</pre>
80
- </template>
81
- </ComponentBase>
82
- </q-page>
83
- </template>
@@ -1,76 +0,0 @@
1
- <script setup>
2
- import { ref } from 'vue'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { UBannerStd } from 'src/components'
5
-
6
- defineOptions({
7
- name: 'BannerPage',
8
- })
9
-
10
- const htmlContent = `<UBannerStd
11
- :type="type"
12
- :show="show"
13
- :primaryActionLabel="primaryActionLabel"
14
- :secondaryActionLabel="secondaryActionLabel"
15
- :message="message"
16
- @primaryAction="handlePrimaryActionClick"
17
- @secondaryAction="handleSecondaryActionClick"
18
- :icon="icon"
19
- />`
20
-
21
- const typeOptions = ['info', 'positive', 'accent', 'warning', 'primary']
22
-
23
- const type = ref('primary')
24
- const message = ref('This is banner message.')
25
- const icon = ref('fa-kit-duotone fa-circle-info')
26
- const primaryActionLabel = ref('Submit')
27
- const secondaryActionLabel = ref('Close')
28
- const show = ref(true)
29
-
30
- const handlePrimaryActionClick = () => {
31
- alert('First Clicked')
32
- }
33
-
34
- const handleSecondaryActionClick = () => {
35
- alert('Second Clicked')
36
- }
37
- </script>
38
-
39
- <template>
40
- <q-page class="flex flex-center">
41
- <ComponentBase
42
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2145-13266&m=dev"
43
- cardWidth="70%"
44
- >
45
- <template v-slot:component>
46
- <UBannerStd
47
- :type="type"
48
- :show="show"
49
- :primaryActionLabel="primaryActionLabel"
50
- :secondaryActionLabel="secondaryActionLabel"
51
- :message="message"
52
- @primaryAction="handlePrimaryActionClick"
53
- @secondaryAction="handleSecondaryActionClick"
54
- :icon="icon"
55
- />
56
- </template>
57
- <template v-slot:properties>
58
- <div class="column q-gutter-y-md">
59
- <q-toggle v-model="show" label="Show" />
60
- <q-input label="Message" v-model="message" />
61
- <q-input label="Icon" v-model="icon" />
62
- <q-select v-model="type" :options="typeOptions" label="Type" />
63
- <q-input label="Primary Action label" v-model="primaryActionLabel" />
64
- <q-input
65
- label="Secondary Action label"
66
- v-model="secondaryActionLabel"
67
- />
68
- </div>
69
- </template>
70
- <template v-slot:code>
71
- <pre><code>{{ htmlContent }}</code></pre>
72
- </template>
73
- </ComponentBase>
74
- </q-page>
75
- </template>
76
- <style lang="sass"></style>
@@ -1,120 +0,0 @@
1
- <script setup>
2
- import { UBtnIcon } from 'src/components'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { ref } from 'vue'
5
-
6
- const color = ref('primary')
7
- const colorOptions = ['primary', 'neutral', 'accent', 'transparent']
8
-
9
- const tooltip = ref('Tooltip')
10
- const anchorOptions = [
11
- 'top left',
12
- 'top middle',
13
- 'top right',
14
- 'top start',
15
- 'top end',
16
- 'center left',
17
- 'center middle',
18
- 'center right',
19
- 'center start',
20
- 'center end',
21
- 'bottom left',
22
- 'bottom middle',
23
- 'bottom right',
24
- 'bottom start',
25
- 'bottom end',
26
- ]
27
-
28
- const selfOptions = [
29
- 'top left',
30
- 'top middle',
31
- 'top right',
32
- 'top start',
33
- 'top end',
34
- 'center left',
35
- 'center middle',
36
- 'center right',
37
- 'center start',
38
- 'center end',
39
- 'bottom left',
40
- 'bottom middle',
41
- 'bottom right',
42
- 'bottom start',
43
- 'bottom end',
44
- ]
45
- const ariaLabel = ref('Btn Icon')
46
- const size = ref('sm')
47
- const sizeOptions = ['sm', 'md', 'lg']
48
- const anchor = ref('center left')
49
- const self = ref('center end')
50
-
51
- const iconClass = ref('fa-kit-duotone fa-circle-bolt')
52
-
53
- const htmlContent = `<UBtnIcon
54
- ref="btn-icon"
55
- :size="size"
56
- :ariaLabel="ariaLabel"
57
- :color="color"
58
- :iconClass="iconClass"
59
- :tooltip="tooltip"
60
- :anchor="anchor"
61
- :self="self"
62
- />`
63
-
64
- defineOptions({
65
- name: 'BtnIcon',
66
- })
67
- </script>
68
-
69
- <template>
70
- <q-page class="flex flex-center">
71
- <ComponentBase
72
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2710-35247"
73
- >
74
- <template v-slot:component>
75
- <UBtnIcon
76
- ref="btn-icon"
77
- :size="size"
78
- :ariaLabel="ariaLabel"
79
- :color="color"
80
- :iconClass="iconClass"
81
- :tooltip="tooltip"
82
- :anchor="anchor"
83
- :self="self"
84
- />
85
- </template>
86
-
87
- <template v-slot:properties>
88
- <div class="column q-gutter-y-lg">
89
- <q-input label="Aria Label" v-model="ariaLabel"></q-input>
90
- <q-select v-model="color" :options="colorOptions" label="Color" />
91
- <q-input label="Icon Class" v-model="iconClass"></q-input>
92
- <q-select v-model="size" :options="sizeOptions" label="Icon Size" />
93
-
94
- <div class="q-my-md">
95
- <q-input v-model="tooltip" label="Tooltip"></q-input>
96
- </div>
97
- <div class="column">
98
- <span class="text-grey-8 text-caption-sm">Tooltip Position</span>
99
- <div>
100
- <q-select
101
- v-model="anchor"
102
- :options="anchorOptions"
103
- label="Anchor Origin"
104
- />
105
- <q-select
106
- v-model="self"
107
- :options="selfOptions"
108
- label="Self Origin"
109
- />
110
- </div>
111
- </div>
112
- </div>
113
- </template>
114
-
115
- <template v-slot:code>
116
- <pre>{{ htmlContent }}</pre>
117
- </template>
118
- </ComponentBase>
119
- </q-page>
120
- </template>
@@ -1,126 +0,0 @@
1
- <script setup>
2
- import ComponentBase from './ComponentBase.vue'
3
- import UBtnStd from '../components/core/UBtnStd.vue'
4
- import { computed, ref } from 'vue'
5
-
6
- const color = ref('primary')
7
- const colorOptions = [
8
- 'positive',
9
- 'info',
10
- 'warning',
11
- 'neutral',
12
- 'primary',
13
- 'accent',
14
- ]
15
-
16
- const size = ref('sm')
17
- const sizeOptions = ['sm', 'md', 'lg']
18
- const disabled = ref(false)
19
- const type = ref('standard')
20
- const label = ref('Button')
21
-
22
- const flat = computed(() => {
23
- return type.value === 'flat'
24
- })
25
- const outline = computed(() => {
26
- return type.value === 'outline'
27
- })
28
-
29
- const leftIcon = computed(() => {
30
- return iconLeft.value ? 'fa-kit-duotone fa-triangle-exclamation' : ''
31
- })
32
- const rightIcon = computed(() => {
33
- return iconRight.value ? 'fa-kit-duotone fa-triangle-exclamation' : ''
34
- })
35
-
36
- const iconLeft = ref(false)
37
- const iconRight = ref(false)
38
- const fullWidth = ref(false)
39
- const htmlContent =
40
- '<UBtnStd\n :size="size"\n :label="label"\n :color="color"\n :outline="outline"\n :disable="disabled"\n :flat="flat"\n :left-icon="leftIcon"\n :right-icon="rightIcon"\n :full-width="fullWidth"\n/>'
41
-
42
- defineOptions({
43
- name: 'BtnStd',
44
- })
45
- </script>
46
-
47
- <template>
48
- <q-page class="flex flex-center">
49
- <ComponentBase
50
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=4-18&t=W9U6NqDHbuiUvAxN-0"
51
- >
52
- <template v-slot:component>
53
- <u-btn-std
54
- ref="btn"
55
- :size="size"
56
- :label="label"
57
- :color="color"
58
- :outline="outline"
59
- :disable="disabled"
60
- :flat="flat"
61
- :left-icon="leftIcon"
62
- :right-icon="rightIcon"
63
- :full-width="fullWidth"
64
- />
65
- </template>
66
-
67
- <template v-slot:properties>
68
- <div class="column q-gutter-y-lg">
69
- <q-input label="Label" v-model="label" />
70
-
71
- <q-select v-model="color" :options="colorOptions" label="Color" />
72
- <q-select v-model="size" :options="sizeOptions" label="Size" />
73
-
74
- <div class="column">
75
- <span class="text-grey-8 text-caption-sm">Type</span>
76
- <div>
77
- <q-radio
78
- dense
79
- v-model="type"
80
- val="standard"
81
- label="Default/Standard"
82
- />
83
- <q-radio
84
- dense
85
- v-model="type"
86
- val="flat"
87
- label="Flat"
88
- class="q-pa-sm"
89
- />
90
- <q-radio dense v-model="type" val="outline" label="Outline" />
91
- </div>
92
- </div>
93
-
94
- <div class="column">
95
- <span class="text-grey-8 text-caption-sm">Icons</span>
96
- <div>
97
- <q-checkbox
98
- size="xs"
99
- v-model="iconLeft"
100
- val="fa-kit-duotone fa-triangle-exclamation"
101
- label="Left Icon"
102
- />
103
- <q-checkbox
104
- size="xs"
105
- v-model="iconRight"
106
- val="fa-kit-duotone fa-triangle-exclamation"
107
- label="Right Icon"
108
- />
109
- </div>
110
- </div>
111
-
112
- <div>
113
- <q-checkbox size="xs" v-model="fullWidth" label="Full Width" />
114
- </div>
115
- <div>
116
- <q-checkbox size="xs" v-model="disabled" label="Disable" />
117
- </div>
118
- </div>
119
- </template>
120
-
121
- <template v-slot:code>
122
- <pre><code>{{ htmlContent }}</code></pre>
123
- </template>
124
- </ComponentBase>
125
- </q-page>
126
- </template>
@@ -1,131 +0,0 @@
1
- <script setup>
2
- import ComponentBase from './ComponentBase.vue'
3
- import UBtnToggle from 'src/components/core/UBtnToggle.vue'
4
-
5
- import { computed, ref } from 'vue'
6
-
7
- const toggleOptions = ref([
8
- {
9
- value: 'one',
10
- slot: 'first',
11
- name: 'Add new',
12
- iconClass: 'fa-kit-duotone fa-circle-info',
13
- },
14
- {
15
- value: 'two',
16
- slot: 'second',
17
- name: 'Pending invitations',
18
- iconClass: 'fa-kit-duotone fa-circle-info',
19
- },
20
- ])
21
-
22
- const onAdd = () => {
23
- toggleOptions.value.push({
24
- value: '',
25
- slot: '',
26
- name: '',
27
- iconClass: '',
28
- })
29
- }
30
-
31
- const onRemove = () => {
32
- toggleOptions.value.pop()
33
- }
34
-
35
- const model = ref('two')
36
-
37
- const htmlContent = `<UBtnToggle
38
- :options="toggleOptions"
39
- v-model="model"
40
- />`
41
-
42
- const contentInfo = `The options should looklike [{
43
- value: 'one',
44
- slot: 'first',
45
- name: 'Add new',
46
- iconClass: 'fa-kit-duotone fa-circle-info',
47
- },
48
- {
49
- value: 'two',
50
- slot: 'second',
51
- name: 'Pending invitations',
52
- iconClass: 'fa-kit-duotone fa-circle-info',
53
- },`
54
-
55
- defineOptions({
56
- name: 'BtnToggle',
57
- })
58
- </script>
59
-
60
- <template>
61
- <q-page class="flex flex-center">
62
- <ComponentBase
63
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=4-18&t=lUWZsHyIzqTPpTfg-0"
64
- card-width="70%"
65
- >
66
- <template v-slot:component>
67
- <UBtnToggle :options="toggleOptions" v-model="model" />
68
- <span>You selected option {{ model }}</span>
69
- </template>
70
-
71
- <template v-slot:properties>
72
- <div class="q-gutter-x-sm q-pb-sm">
73
- <q-btn label="Add" @click="onAdd()"></q-btn>
74
- <q-btn
75
- label="Remove"
76
- @click="onRemove()"
77
- :disable="toggleOptions.length <= 2"
78
- ></q-btn>
79
- <p>Make sure to have different slot and value name</p>
80
- </div>
81
-
82
- <div class="column q-gutter-y-lg" style="position: relative">
83
- <div
84
- v-for="(option, index) in toggleOptions"
85
- :key="option"
86
- class="column"
87
- >
88
- <div class="justify-start items-center">Option {{ index + 1 }}</div>
89
- <div class="row q-gutter-x-sm">
90
- <q-input
91
- class="col-12 col-md-3"
92
- placeholder="Slot"
93
- v-model="option.slot"
94
- label="Slot"
95
- @input="updateItem(index, 'slot', option.slot)"
96
- ></q-input>
97
- <q-input
98
- class="col-12 col-md-3"
99
- placeholder="Value"
100
- label="Value"
101
- v-model="option.value"
102
- @input="updateItem(index, 'value', option.value)"
103
- ></q-input>
104
- <q-input
105
- class="col-12 col-md-3"
106
- placeholder="Label"
107
- label="Label"
108
- v-model="option.name"
109
- @input="updateItem(index, 'name', option.name)"
110
- ></q-input>
111
- <q-input
112
- placeholder="Icon"
113
- label="Icon"
114
- class="col-12 col-md-4"
115
- v-model="option.iconClass"
116
- @input="updateItem(index, 'iconClass', option.iconClass)"
117
- ></q-input>
118
- </div>
119
- </div>
120
- </div>
121
- </template>
122
-
123
- <template v-slot:code>
124
- <pre><code>{{ htmlContent }}</code></pre>
125
- <pre class="text-neutral-6" style="font-size: 12px; font-weight: 600">{{
126
- contentInfo
127
- }}</pre>
128
- </template>
129
- </ComponentBase>
130
- </q-page>
131
- </template>
@@ -1,62 +0,0 @@
1
- <script setup>
2
- import { computed, ref } from 'vue'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { UCheckboxStd } from 'src/components'
5
-
6
- const label = ref('Checkbox')
7
- const checked = ref(false)
8
- const disabled = ref(false)
9
- const variant = ref('With Label')
10
- const variantOptions = ['With Label', 'Without Label']
11
- const showLabel = computed(() => {
12
- return variant.value === 'With Label'
13
- })
14
-
15
- const htmlContent = `<UCheckboxStd
16
- v-model="checked"
17
- :label="label"
18
- :showLabel="showLabel"
19
- :disabled="disabled"
20
- :id="u-checkbox"
21
- />`
22
-
23
- defineOptions({
24
- name: 'CheckBox',
25
- })
26
- </script>
27
-
28
- <template>
29
- <q-page class="flex flex-center">
30
- <ComponentBase
31
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2293-164568&t=W9U6NqDHbuiUvAxN-0"
32
- >
33
- <template v-slot:component>
34
- <div class="q-mt-sm">
35
- <UCheckboxStd
36
- v-model="checked"
37
- :label="label"
38
- :showLabel="showLabel"
39
- :disabled="disabled"
40
- id="playground"
41
- />
42
- </div>
43
- </template>
44
-
45
- <template v-slot:properties>
46
- <div class="column q-gutter-y-lg">
47
- <q-input label="Label" v-model="label" />
48
- <q-select
49
- v-model="variant"
50
- :options="variantOptions"
51
- label="Variant"
52
- />
53
- <q-checkbox size="xs" v-model="disabled" label="Disable" />
54
- </div>
55
- </template>
56
-
57
- <template v-slot:code>
58
- <pre><code>{{ htmlContent }}</code></pre>
59
- </template>
60
- </ComponentBase>
61
- </q-page>
62
- </template>
@@ -1,92 +0,0 @@
1
- <script setup>
2
- import { UChip } from 'src/components'
3
- import ComponentBase from './ComponentBase.vue'
4
- import { ref } from 'vue'
5
-
6
- const chipLabel = ref('Label')
7
- const avatarLabel = ref('OR')
8
- const type = ref('primary')
9
- const iconClass = ref('')
10
- const typeOptions = [
11
- 'primary',
12
- 'accent',
13
- 'positive',
14
- 'warning',
15
- 'info',
16
- 'neutral',
17
- 'yellow',
18
- 'teal',
19
- 'gold',
20
- 'pink',
21
- ]
22
-
23
- const dense = ref(false)
24
- const removable = ref(false)
25
- const modelVal = ref(true)
26
-
27
- const htmlContent = ` <UChip
28
- ref="chip"
29
- v-model="modelVal"
30
- @update:modelValue="modelVal = $event"
31
- :type="type"
32
- :dense="dense"
33
- :iconClass="iconClass"
34
- :avatarLabel="avatarLabel"
35
- :chipLabel="chipLabel"
36
- :removable="removable"
37
- />`
38
-
39
- defineOptions({
40
- name: 'UChip',
41
- })
42
- </script>
43
-
44
- <template>
45
- <q-page class="flex flex-center">
46
- <ComponentBase
47
- figmaUrl="https://www.figma.com/design/2FoTrjVL4ZrTdsvB4DcSao/Components?node-id=2281-51609"
48
- >
49
- <template v-slot:component>
50
- <UChip
51
- ref="chip"
52
- v-model="modelVal"
53
- @update:modelValue="modelVal = $event"
54
- :type="type"
55
- :dense="dense"
56
- :iconClass="iconClass"
57
- :avatarLabel="avatarLabel"
58
- :chipLabel="chipLabel"
59
- :removable="removable"
60
- />
61
- </template>
62
-
63
- <template v-slot:properties>
64
- <div class="column q-gutter-y-lg">
65
- <q-input label="Chip Label" v-model="chipLabel"></q-input>
66
- <q-input label="Avatar Label" v-model="avatarLabel"></q-input>
67
- <!-- <q-input label="Icon" v-model="icon"></q-input> -->
68
- <q-input label="Icon Class" v-model="iconClass"></q-input>
69
- <q-select v-model="type" :options="typeOptions" label="Chip Type" />
70
-
71
- <div class="column">
72
- <span class="text-grey-8 text-caption-sm">Chip Layout Type</span>
73
- <q-checkbox size="xs" v-model="dense" :val="true" label="Dense" />
74
- </div>
75
- <div class="column">
76
- <span class="text-grey-8 text-caption-sm">Removable</span>
77
- <q-checkbox
78
- size="xs"
79
- v-model="removable"
80
- :val="true"
81
- label="Removable"
82
- />
83
- </div>
84
- </div>
85
- </template>
86
-
87
- <template v-slot:code>
88
- <pre>{{ htmlContent }}</pre>
89
- </template>
90
- </ComponentBase>
91
- </q-page>
92
- </template>