classcard-ui 0.2.1476 → 0.2.1477

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "classcard-ui",
3
- "version": "0.2.1476",
3
+ "version": "0.2.1477",
4
4
  "main": "dist/classcard-ui.umd.min.js",
5
5
  "scripts": {
6
6
  "serve": "vue-cli-service serve",
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div class="flex items-center gap-3">
3
+ <div
4
+ :class="'h-1 w-full overflow-hidden rounded-full bg-gray-200 ' + customClasses"
5
+ role="progressbar"
6
+ :aria-valuemin="0"
7
+ :aria-valuemax="max"
8
+ :aria-valuenow="percentage"
9
+ :aria-label="ariaLabel"
10
+ >
11
+ <div
12
+ class="h-full origin-left rounded-full transition-transform duration-300"
13
+ :class="fillColorClass"
14
+ :style="{ transform: 'scaleX(' + (percentage / max) + ')' }"
15
+ />
16
+ </div>
17
+
18
+ <span class="text-sm text-gray-500">
19
+ {{ percentage + "%" }}
20
+ </span>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ export default {
26
+ name: "CLinearProgressBar",
27
+ props: {
28
+ max: { type: Number, default: 100 },
29
+ ariaLabel: { type: String, default: "Progress" },
30
+ fillColorClass: { type: String, default: "bg-gray-900" },
31
+ customClasses: { type: String, default: "" },
32
+ percentage: { type: Number, default: 0 },
33
+ },
34
+ };
35
+ </script>
@@ -0,0 +1,3 @@
1
+ import CLinearProgressBar from './CLinearProgressBar.vue'
2
+
3
+ export default CLinearProgressBar
@@ -1,5 +1,6 @@
1
1
  export { default as CAlerts } from "./CAlerts";
2
2
  export { default as CAnchorTabs } from "./CAnchorTabs";
3
+ export { default as CLinearProgressBar } from "./CLinearProgressBar";
3
4
  export { default as CAnchorTag } from "./CAnchorTag";
4
5
  export { default as CAvatar } from "./CAvatar";
5
6
  export { default as CAvatarGroup } from "./CAvatarGroup";
@@ -0,0 +1,22 @@
1
+ import CLinearProgressBar from "../components/CLinearProgressBar/CLinearProgressBar.vue";
2
+ import "./utils.css";
3
+
4
+ export default {
5
+ title: "CLinearProgressBar",
6
+ component: CLinearProgressBar,
7
+ };
8
+
9
+ const Template = (args, { argTypes }) => ({
10
+ props: Object.keys(argTypes),
11
+ components: { CLinearProgressBar },
12
+ template: '<c-linear-progress-bar v-bind="$props" />',
13
+ });
14
+
15
+ export const Default = Template.bind({});
16
+ Default.args = {
17
+ max: 100,
18
+ ariaLabel: "Progress",
19
+ fillColorClass: "bg-gray-900",
20
+ customClasses: "",
21
+ percentage: 50,
22
+ };