@designil/labdsnov 0.0.0-stage → 1.1.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.
- package/LICENSE +21 -0
- package/README.md +150 -2
- package/dist/components/Accordion/Accordion.d.ts +8 -0
- package/dist/components/Accordion/Accordion.js +82 -0
- package/dist/components/Accordion/Accordion.module.css.js +23 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Alert/Alert.d.ts +17 -0
- package/dist/components/Alert/Alert.js +58 -0
- package/dist/components/Alert/Alert.module.css.js +17 -0
- package/dist/components/Alert/index.d.ts +1 -0
- package/dist/components/AlertDialog/AlertDialog.d.ts +29 -0
- package/dist/components/AlertDialog/AlertDialog.js +150 -0
- package/dist/components/AlertDialog/AlertDialog.module.css.js +23 -0
- package/dist/components/AlertDialog/index.d.ts +1 -0
- package/dist/components/Avatar/Avatar.d.ts +23 -0
- package/dist/components/Avatar/Avatar.js +84 -0
- package/dist/components/Avatar/Avatar.module.css.js +23 -0
- package/dist/components/Avatar/index.d.ts +1 -0
- package/dist/components/Badge/Badge.d.ts +17 -0
- package/dist/components/Badge/Badge.js +37 -0
- package/dist/components/Badge/Badge.module.css.js +19 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +15 -0
- package/dist/components/Breadcrumb/Breadcrumb.js +111 -0
- package/dist/components/Breadcrumb/Breadcrumb.module.css.js +19 -0
- package/dist/components/Breadcrumb/index.d.ts +1 -0
- package/dist/components/Button/Button.d.ts +39 -0
- package/dist/components/Button/Button.js +62 -0
- package/dist/components/Button/Button.module.css.js +37 -0
- package/dist/components/Button/index.d.ts +1 -0
- package/dist/components/ButtonGroup/ButtonGroup.d.ts +21 -0
- package/dist/components/ButtonGroup/ButtonGroup.js +59 -0
- package/dist/components/ButtonGroup/ButtonGroup.module.css.js +15 -0
- package/dist/components/ButtonGroup/index.d.ts +1 -0
- package/dist/components/Calendar/Calendar.d.ts +17 -0
- package/dist/components/Calendar/Calendar.js +154 -0
- package/dist/components/Calendar/Calendar.module.css.js +67 -0
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Card/Card.d.ts +20 -0
- package/dist/components/Card/Card.js +87 -0
- package/dist/components/Card/Card.module.css.js +23 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Chart/Chart.d.ts +59 -0
- package/dist/components/Chart/Chart.js +199 -0
- package/dist/components/Chart/Chart.module.css.js +47 -0
- package/dist/components/Chart/index.d.ts +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +4 -0
- package/dist/components/Checkbox/Checkbox.js +44 -0
- package/dist/components/Checkbox/Checkbox.module.css.js +13 -0
- package/dist/components/Checkbox/index.d.ts +1 -0
- package/dist/components/Collapsible/Collapsible.d.ts +8 -0
- package/dist/components/Collapsible/Collapsible.js +28 -0
- package/dist/components/Collapsible/Collapsible.module.css.js +7 -0
- package/dist/components/Collapsible/index.d.ts +1 -0
- package/dist/components/Combobox/Combobox.d.ts +36 -0
- package/dist/components/Combobox/Combobox.js +296 -0
- package/dist/components/Combobox/Combobox.module.css.js +39 -0
- package/dist/components/Combobox/index.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.d.ts +28 -0
- package/dist/components/DatePicker/DatePicker.js +73 -0
- package/dist/components/DatePicker/DatePicker.module.css.js +9 -0
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/Dialog/Dialog.d.ts +27 -0
- package/dist/components/Dialog/Dialog.js +144 -0
- package/dist/components/Dialog/Dialog.module.css.js +29 -0
- package/dist/components/Dialog/index.d.ts +1 -0
- package/dist/components/Drawer/Drawer.d.ts +22 -0
- package/dist/components/Drawer/Drawer.js +166 -0
- package/dist/components/Drawer/Drawer.module.css.js +23 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/DropdownMenu/DropdownMenu.d.ts +32 -0
- package/dist/components/DropdownMenu/DropdownMenu.js +245 -0
- package/dist/components/DropdownMenu/DropdownMenu.module.css.js +33 -0
- package/dist/components/DropdownMenu/index.d.ts +1 -0
- package/dist/components/Empty/Empty.d.ts +18 -0
- package/dist/components/Empty/Empty.js +76 -0
- package/dist/components/Empty/Empty.module.css.js +21 -0
- package/dist/components/Empty/index.d.ts +1 -0
- package/dist/components/Field/Field.d.ts +53 -0
- package/dist/components/Field/Field.js +172 -0
- package/dist/components/Field/Field.module.css.js +41 -0
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/FundCard/FundCard.d.ts +18 -0
- package/dist/components/FundCard/FundCard.js +66 -0
- package/dist/components/FundCard/FundCard.module.css.js +25 -0
- package/dist/components/FundCard/index.d.ts +1 -0
- package/dist/components/HoverCard/HoverCard.d.ts +8 -0
- package/dist/components/HoverCard/HoverCard.js +42 -0
- package/dist/components/HoverCard/HoverCard.module.css.js +9 -0
- package/dist/components/HoverCard/index.d.ts +1 -0
- package/dist/components/Input/Input.d.ts +12 -0
- package/dist/components/Input/Input.js +23 -0
- package/dist/components/Input/Input.module.css.js +11 -0
- package/dist/components/Input/index.d.ts +1 -0
- package/dist/components/InputGroup/InputGroup.d.ts +39 -0
- package/dist/components/InputGroup/InputGroup.js +103 -0
- package/dist/components/InputGroup/InputGroup.module.css.js +31 -0
- package/dist/components/InputGroup/index.d.ts +1 -0
- package/dist/components/InputOTP/InputOTP.d.ts +18 -0
- package/dist/components/InputOTP/InputOTP.js +72 -0
- package/dist/components/InputOTP/InputOTP.module.css.js +19 -0
- package/dist/components/InputOTP/index.d.ts +1 -0
- package/dist/components/Kbd/Kbd.d.ts +5 -0
- package/dist/components/Kbd/Kbd.js +20 -0
- package/dist/components/Kbd/Kbd.module.css.js +9 -0
- package/dist/components/Kbd/index.d.ts +1 -0
- package/dist/components/Label/Label.d.ts +7 -0
- package/dist/components/Label/Label.js +17 -0
- package/dist/components/Label/Label.module.css.js +9 -0
- package/dist/components/Label/index.d.ts +1 -0
- package/dist/components/NavigationMenu/NavigationMenu.d.ts +20 -0
- package/dist/components/NavigationMenu/NavigationMenu.js +153 -0
- package/dist/components/NavigationMenu/NavigationMenu.module.css.js +29 -0
- package/dist/components/NavigationMenu/index.d.ts +1 -0
- package/dist/components/Pagination/Pagination.d.ts +29 -0
- package/dist/components/Pagination/Pagination.js +133 -0
- package/dist/components/Pagination/Pagination.module.css.js +19 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Popover/Popover.d.ts +10 -0
- package/dist/components/Popover/Popover.js +78 -0
- package/dist/components/Popover/Popover.module.css.js +15 -0
- package/dist/components/Popover/index.d.ts +1 -0
- package/dist/components/Progress/Progress.d.ts +12 -0
- package/dist/components/Progress/Progress.js +74 -0
- package/dist/components/Progress/Progress.module.css.js +15 -0
- package/dist/components/Progress/index.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroup.d.ts +6 -0
- package/dist/components/RadioGroup/RadioGroup.js +37 -0
- package/dist/components/RadioGroup/RadioGroup.module.css.js +13 -0
- package/dist/components/RadioGroup/index.d.ts +1 -0
- package/dist/components/ScrollArea/ScrollArea.d.ts +9 -0
- package/dist/components/ScrollArea/ScrollArea.js +60 -0
- package/dist/components/ScrollArea/ScrollArea.module.css.js +17 -0
- package/dist/components/ScrollArea/index.d.ts +1 -0
- package/dist/components/Select/Select.d.ts +23 -0
- package/dist/components/Select/Select.js +188 -0
- package/dist/components/Select/Select.module.css.js +37 -0
- package/dist/components/Select/index.d.ts +1 -0
- package/dist/components/Separator/Separator.d.ts +4 -0
- package/dist/components/Separator/Separator.js +22 -0
- package/dist/components/Separator/Separator.module.css.js +7 -0
- package/dist/components/Separator/index.d.ts +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +4 -0
- package/dist/components/Skeleton/Skeleton.js +16 -0
- package/dist/components/Skeleton/Skeleton.module.css.js +7 -0
- package/dist/components/Skeleton/index.d.ts +1 -0
- package/dist/components/Slider/Slider.d.ts +13 -0
- package/dist/components/Slider/Slider.js +61 -0
- package/dist/components/Slider/Slider.module.css.js +15 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Spinner/Spinner.d.ts +6 -0
- package/dist/components/Spinner/Spinner.js +22 -0
- package/dist/components/Spinner/Spinner.module.css.js +7 -0
- package/dist/components/Spinner/index.d.ts +1 -0
- package/dist/components/Switch/Switch.d.ts +13 -0
- package/dist/components/Switch/Switch.js +29 -0
- package/dist/components/Switch/Switch.module.css.js +13 -0
- package/dist/components/Switch/index.d.ts +1 -0
- package/dist/components/Table/Table.d.ts +12 -0
- package/dist/components/Table/Table.js +96 -0
- package/dist/components/Table/Table.module.css.js +23 -0
- package/dist/components/Table/index.d.ts +1 -0
- package/dist/components/Tabs/Tabs.d.ts +16 -0
- package/dist/components/Tabs/Tabs.js +55 -0
- package/dist/components/Tabs/Tabs.module.css.js +17 -0
- package/dist/components/Tabs/index.d.ts +1 -0
- package/dist/components/Textarea/Textarea.d.ts +4 -0
- package/dist/components/Textarea/Textarea.js +16 -0
- package/dist/components/Textarea/Textarea.module.css.js +7 -0
- package/dist/components/Textarea/index.d.ts +1 -0
- package/dist/components/Toaster/Toaster.d.ts +8 -0
- package/dist/components/Toaster/Toaster.js +85 -0
- package/dist/components/Toaster/Toaster.module.css.js +11 -0
- package/dist/components/Toaster/index.d.ts +1 -0
- package/dist/components/Toggle/Toggle.d.ts +26 -0
- package/dist/components/Toggle/Toggle.js +35 -0
- package/dist/components/Toggle/Toggle.module.css.js +17 -0
- package/dist/components/Toggle/index.d.ts +1 -0
- package/dist/components/ToggleGroup/ToggleGroup.d.ts +20 -0
- package/dist/components/ToggleGroup/ToggleGroup.js +64 -0
- package/dist/components/ToggleGroup/ToggleGroup.module.css.js +11 -0
- package/dist/components/ToggleGroup/index.d.ts +1 -0
- package/dist/components/Tooltip/Tooltip.d.ts +8 -0
- package/dist/components/Tooltip/Tooltip.js +61 -0
- package/dist/components/Tooltip/Tooltip.module.css.js +11 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/index.d.ts +47 -0
- package/dist/index.js +265 -0
- package/dist/styles.css +1 -0
- package/docs/Accessibility.md +129 -0
- package/docs/Colors.md +149 -0
- package/docs/ComponentTokens.md +191 -0
- package/docs/Contributing.md +104 -0
- package/docs/GettingStarted.md +106 -0
- package/docs/Radius.md +25 -0
- package/docs/Typography.md +38 -0
- package/package.json +88 -4
- package/src/components/Accordion/Accordion.dsds.yaml +195 -0
- package/src/components/Accordion/Accordion.md +102 -0
- package/src/components/Alert/Alert.dsds.yaml +206 -0
- package/src/components/Alert/Alert.md +90 -0
- package/src/components/AlertDialog/AlertDialog.dsds.yaml +243 -0
- package/src/components/AlertDialog/AlertDialog.md +131 -0
- package/src/components/Avatar/Avatar.dsds.yaml +172 -0
- package/src/components/Avatar/Avatar.md +77 -0
- package/src/components/Badge/Badge.dsds.yaml +191 -0
- package/src/components/Badge/Badge.md +124 -0
- package/src/components/Breadcrumb/Breadcrumb.dsds.yaml +162 -0
- package/src/components/Breadcrumb/Breadcrumb.md +110 -0
- package/src/components/Button/Button.dsds.yaml +350 -0
- package/src/components/Button/Button.md +165 -0
- package/src/components/ButtonGroup/ButtonGroup.dsds.yaml +193 -0
- package/src/components/ButtonGroup/ButtonGroup.md +96 -0
- package/src/components/Calendar/Calendar.dsds.yaml +236 -0
- package/src/components/Calendar/Calendar.md +111 -0
- package/src/components/Card/Card.dsds.yaml +199 -0
- package/src/components/Card/Card.md +99 -0
- package/src/components/Chart/Chart.dsds.yaml +216 -0
- package/src/components/Chart/Chart.md +112 -0
- package/src/components/Checkbox/Checkbox.dsds.yaml +215 -0
- package/src/components/Checkbox/Checkbox.md +105 -0
- package/src/components/Collapsible/Collapsible.dsds.yaml +146 -0
- package/src/components/Collapsible/Collapsible.md +86 -0
- package/src/components/Combobox/Combobox.dsds.yaml +241 -0
- package/src/components/Combobox/Combobox.md +143 -0
- package/src/components/DatePicker/DatePicker.dsds.yaml +179 -0
- package/src/components/DatePicker/DatePicker.md +82 -0
- package/src/components/Dialog/Dialog.dsds.yaml +300 -0
- package/src/components/Dialog/Dialog.md +193 -0
- package/src/components/Drawer/Drawer.dsds.yaml +207 -0
- package/src/components/Drawer/Drawer.md +125 -0
- package/src/components/DropdownMenu/DropdownMenu.dsds.yaml +265 -0
- package/src/components/DropdownMenu/DropdownMenu.md +151 -0
- package/src/components/Empty/Empty.dsds.yaml +171 -0
- package/src/components/Empty/Empty.md +90 -0
- package/src/components/Field/Field.dsds.yaml +285 -0
- package/src/components/Field/Field.md +139 -0
- package/src/components/FundCard/FundCard.dsds.yaml +195 -0
- package/src/components/FundCard/FundCard.md +93 -0
- package/src/components/HoverCard/HoverCard.dsds.yaml +157 -0
- package/src/components/HoverCard/HoverCard.md +100 -0
- package/src/components/Input/Input.dsds.yaml +235 -0
- package/src/components/Input/Input.md +115 -0
- package/src/components/InputGroup/InputGroup.dsds.yaml +234 -0
- package/src/components/InputGroup/InputGroup.md +115 -0
- package/src/components/InputOTP/InputOTP.dsds.yaml +184 -0
- package/src/components/InputOTP/InputOTP.md +105 -0
- package/src/components/Kbd/Kbd.dsds.yaml +119 -0
- package/src/components/Kbd/Kbd.md +85 -0
- package/src/components/Label/Label.dsds.yaml +141 -0
- package/src/components/Label/Label.md +75 -0
- package/src/components/NavigationMenu/NavigationMenu.dsds.yaml +196 -0
- package/src/components/NavigationMenu/NavigationMenu.md +128 -0
- package/src/components/Pagination/Pagination.dsds.yaml +172 -0
- package/src/components/Pagination/Pagination.md +115 -0
- package/src/components/Popover/Popover.dsds.yaml +168 -0
- package/src/components/Popover/Popover.md +111 -0
- package/src/components/Progress/Progress.dsds.yaml +169 -0
- package/src/components/Progress/Progress.md +83 -0
- package/src/components/RadioGroup/RadioGroup.dsds.yaml +215 -0
- package/src/components/RadioGroup/RadioGroup.md +123 -0
- package/src/components/ScrollArea/ScrollArea.dsds.yaml +153 -0
- package/src/components/ScrollArea/ScrollArea.md +88 -0
- package/src/components/Select/Select.dsds.yaml +239 -0
- package/src/components/Select/Select.md +170 -0
- package/src/components/Separator/Separator.dsds.yaml +121 -0
- package/src/components/Separator/Separator.md +68 -0
- package/src/components/Skeleton/Skeleton.dsds.yaml +124 -0
- package/src/components/Skeleton/Skeleton.md +68 -0
- package/src/components/Slider/Slider.dsds.yaml +194 -0
- package/src/components/Slider/Slider.md +107 -0
- package/src/components/Spinner/Spinner.dsds.yaml +126 -0
- package/src/components/Spinner/Spinner.md +64 -0
- package/src/components/Switch/Switch.dsds.yaml +198 -0
- package/src/components/Switch/Switch.md +101 -0
- package/src/components/Table/Table.dsds.yaml +195 -0
- package/src/components/Table/Table.md +117 -0
- package/src/components/Tabs/Tabs.dsds.yaml +239 -0
- package/src/components/Tabs/Tabs.md +173 -0
- package/src/components/Textarea/Textarea.dsds.yaml +167 -0
- package/src/components/Textarea/Textarea.md +89 -0
- package/src/components/Toaster/Toaster.dsds.yaml +226 -0
- package/src/components/Toaster/Toaster.md +107 -0
- package/src/components/Toggle/Toggle.dsds.yaml +224 -0
- package/src/components/Toggle/Toggle.md +103 -0
- package/src/components/ToggleGroup/ToggleGroup.dsds.yaml +230 -0
- package/src/components/ToggleGroup/ToggleGroup.md +95 -0
- package/src/components/Tooltip/Tooltip.dsds.yaml +202 -0
- package/src/components/Tooltip/Tooltip.md +104 -0
- package/src/index.dsds.yaml +467 -0
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: popover
|
|
3
|
+
name: Popover
|
|
4
|
+
description: >-
|
|
5
|
+
A floating box next to a button that opens on click, holding short content or a few
|
|
6
|
+
fields without covering the whole page. 288px wide, 16px padding. Wraps Base UI's
|
|
7
|
+
`Popover`.
|
|
8
|
+
metadata:
|
|
9
|
+
status: {status: stable}
|
|
10
|
+
since: 1.0.0
|
|
11
|
+
tags: [overlay]
|
|
12
|
+
|
|
13
|
+
sections:
|
|
14
|
+
- kind: guidelines
|
|
15
|
+
for: all
|
|
16
|
+
framing: when-to-use
|
|
17
|
+
items:
|
|
18
|
+
- level: should
|
|
19
|
+
statement: >-
|
|
20
|
+
Use for details or small settings tied to that button, such as setting a goal or a
|
|
21
|
+
table filter.
|
|
22
|
+
- level: should
|
|
23
|
+
statement: >-
|
|
24
|
+
Use for explanations that contain a link or are too long for a <dsds:tooltip>.
|
|
25
|
+
- level: must-not
|
|
26
|
+
statement: >-
|
|
27
|
+
Don't use for confirming a decision or for a form that must be finished first; use
|
|
28
|
+
<dsds:dialog>. A Popover closes on an outside click, and what was typed is lost.
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: dialog
|
|
31
|
+
checkedBy: manual
|
|
32
|
+
- level: should-not
|
|
33
|
+
statement: >-
|
|
34
|
+
Don't use for a one-line explanation; use <dsds:tooltip>.
|
|
35
|
+
alternatives:
|
|
36
|
+
- to: tooltip
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: >-
|
|
39
|
+
Don't use as a list of actions (use <dsds:dropdown-menu>) or to pick a value from a
|
|
40
|
+
list (use <dsds:select>).
|
|
41
|
+
alternatives:
|
|
42
|
+
- to: dropdown-menu
|
|
43
|
+
- to: select
|
|
44
|
+
|
|
45
|
+
- kind: guidelines
|
|
46
|
+
for: all
|
|
47
|
+
items:
|
|
48
|
+
- id: title-required
|
|
49
|
+
level: must
|
|
50
|
+
statement: >-
|
|
51
|
+
Always include a `PopoverTitle`, which names the box for screen readers, and a
|
|
52
|
+
`PopoverDescription` as its description.
|
|
53
|
+
checks:
|
|
54
|
+
- href: ./Popover.stories.tsx#OpenAndClose
|
|
55
|
+
role: test
|
|
56
|
+
note: play function checks toHaveAccessibleDescription
|
|
57
|
+
checkedBy: automated
|
|
58
|
+
- id: trigger-render
|
|
59
|
+
level: must
|
|
60
|
+
statement: >-
|
|
61
|
+
Write the trigger as `<PopoverTrigger render={<Button variant="outline" />}>`.
|
|
62
|
+
refs:
|
|
63
|
+
- to: shared-composition#render-prop
|
|
64
|
+
rel: relates-to
|
|
65
|
+
uses:
|
|
66
|
+
- to: button
|
|
67
|
+
checkedBy: assisted
|
|
68
|
+
- id: small-content
|
|
69
|
+
level: should
|
|
70
|
+
statement: >-
|
|
71
|
+
Keep the content to 1–3 fields or a short paragraph. Change the width with
|
|
72
|
+
`className` (e.g. `w-80`) only when needed.
|
|
73
|
+
checkedBy: manual
|
|
74
|
+
- id: apply-explicitly
|
|
75
|
+
level: should
|
|
76
|
+
statement: >-
|
|
77
|
+
Settings that affect the page (such as filters) apply as soon as they change, or
|
|
78
|
+
have a clear "ใช้ตัวกรอง" (apply filters) button. Don't make the result depend on
|
|
79
|
+
closing the box.
|
|
80
|
+
checkedBy: manual
|
|
81
|
+
|
|
82
|
+
- kind: guidelines
|
|
83
|
+
for: all
|
|
84
|
+
title: Accessibility
|
|
85
|
+
tags: [accessibility]
|
|
86
|
+
items:
|
|
87
|
+
- id: escape-returns-focus
|
|
88
|
+
level: must
|
|
89
|
+
statement: >-
|
|
90
|
+
Escape or an outside click closes it, and focus returns to the trigger.
|
|
91
|
+
evidence:
|
|
92
|
+
- href: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
93
|
+
role: WAI-ARIA APG Dialog pattern (non-modal)
|
|
94
|
+
checks:
|
|
95
|
+
- href: ./Popover.stories.tsx#OpenAndClose
|
|
96
|
+
role: test
|
|
97
|
+
note: play function checks aria-expanded and that focus returns to the trigger
|
|
98
|
+
checkedBy: automated
|
|
99
|
+
- id: popover-contrast
|
|
100
|
+
level: must
|
|
101
|
+
statement: >-
|
|
102
|
+
Text in the box passes 19.59:1 / 16.38:1, descriptions 5.97:1 / 7.30:1, and field
|
|
103
|
+
borders in the box 3.93:1 / 3.50:1.
|
|
104
|
+
checks:
|
|
105
|
+
- href: ../../../scripts/tokens.mjs
|
|
106
|
+
role: test
|
|
107
|
+
note: CONTRAST_PAIRS "… ในกล่องลอย" (in popovers)
|
|
108
|
+
checkedBy: automated
|
|
109
|
+
|
|
110
|
+
- kind: guidelines
|
|
111
|
+
for: agent
|
|
112
|
+
items:
|
|
113
|
+
- refs:
|
|
114
|
+
- to: shared-testing#assert-by-state
|
|
115
|
+
rel: same-as
|
|
116
|
+
- refs:
|
|
117
|
+
- to: shared-testing#query-portal-with-screen
|
|
118
|
+
rel: same-as
|
|
119
|
+
|
|
120
|
+
- kind: definitions
|
|
121
|
+
for: all
|
|
122
|
+
context: anatomy
|
|
123
|
+
items:
|
|
124
|
+
- term: Popover
|
|
125
|
+
definition: >-
|
|
126
|
+
The root. Takes `open` / `onOpenChange` and `defaultOpen`.
|
|
127
|
+
- term: PopoverTrigger
|
|
128
|
+
definition: >-
|
|
129
|
+
Opens and closes it.
|
|
130
|
+
- term: PopoverContent
|
|
131
|
+
definition: >-
|
|
132
|
+
The floating box (portalled). Takes `side` (`bottom`), `align` (`center`),
|
|
133
|
+
`sideOffset` (4).
|
|
134
|
+
- term: PopoverHeader / PopoverTitle / PopoverDescription
|
|
135
|
+
definition: >-
|
|
136
|
+
The header, its title and its description.
|
|
137
|
+
|
|
138
|
+
sourceFiles:
|
|
139
|
+
- platform: react
|
|
140
|
+
file: ./Popover.tsx
|
|
141
|
+
|
|
142
|
+
imports:
|
|
143
|
+
- platform: react
|
|
144
|
+
code: >-
|
|
145
|
+
import { Popover, PopoverContent, PopoverDescription, PopoverHeader, PopoverTitle, PopoverTrigger } from "@designil/labdsnov"
|
|
146
|
+
package: "@designil/labdsnov"
|
|
147
|
+
|
|
148
|
+
traits:
|
|
149
|
+
- traitType: state
|
|
150
|
+
kind: boolean
|
|
151
|
+
id: open
|
|
152
|
+
description: >-
|
|
153
|
+
The box is open (`data-open`).
|
|
154
|
+
|
|
155
|
+
uses:
|
|
156
|
+
- to: button
|
|
157
|
+
alternatives:
|
|
158
|
+
- to: tooltip
|
|
159
|
+
- to: dialog
|
|
160
|
+
- to: hover-card
|
|
161
|
+
|
|
162
|
+
refs:
|
|
163
|
+
- href: ./Popover.md
|
|
164
|
+
rel: relates-to
|
|
165
|
+
role: Thai usage doc
|
|
166
|
+
- href: ./Popover.stories.tsx
|
|
167
|
+
rel: demo
|
|
168
|
+
role: CSF stories
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Popover (กล่องลอย)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
กล่องลอยข้างปุ่มที่เปิดขึ้นเมื่อคลิก มีเนื้อหาหรือช่องกรอกสั้น ๆ โดยไม่บังทั้งหน้า
|
|
6
|
+
|
|
7
|
+
## Import and usage
|
|
8
|
+
|
|
9
|
+
**ตั้งค่าครั้งเดียวในแอป** (ใช้ร่วมกันทุกคอมโพเนนต์):
|
|
10
|
+
|
|
11
|
+
1. ติดตั้ง `@designil/labdsnov` (`pnpm add @designil/labdsnov`) พร้อม `react` และ `react-dom` 19
|
|
12
|
+
2. import สไตล์ครั้งเดียวที่ root layout: `import "@designil/labdsnov/styles.css"`
|
|
13
|
+
3. กำหนดตัวแปร `--font-heading` (แอปใช้ IBM Plex Sans Thai) และใส่ class `dark` ที่ `<html>` เมื่อต้องการโหมดมืด
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import {
|
|
17
|
+
Button,
|
|
18
|
+
Popover,
|
|
19
|
+
PopoverContent,
|
|
20
|
+
PopoverDescription,
|
|
21
|
+
PopoverHeader,
|
|
22
|
+
PopoverTitle,
|
|
23
|
+
PopoverTrigger,
|
|
24
|
+
} from "@designil/labdsnov"
|
|
25
|
+
|
|
26
|
+
;<Popover>
|
|
27
|
+
<PopoverTrigger render={<Button variant="outline" />}>
|
|
28
|
+
ตั้งเป้าหมายการออม
|
|
29
|
+
</PopoverTrigger>
|
|
30
|
+
<PopoverContent>
|
|
31
|
+
<PopoverHeader>
|
|
32
|
+
<PopoverTitle>เป้าหมายการออม</PopoverTitle>
|
|
33
|
+
<PopoverDescription>ยอดเงินที่อยากมีเมื่อเกษียณ</PopoverDescription>
|
|
34
|
+
</PopoverHeader>
|
|
35
|
+
…
|
|
36
|
+
</PopoverContent>
|
|
37
|
+
</Popover>
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
- ใส่ `PopoverTitle` เสมอ เป็นชื่อของกล่องสำหรับโปรแกรมอ่านหน้าจอ
|
|
41
|
+
|
|
42
|
+
## When to use
|
|
43
|
+
|
|
44
|
+
- รายละเอียดเพิ่มเติมหรือการตั้งค่าเล็ก ๆ ที่เกี่ยวกับปุ่มนั้น เช่น ตั้งเป้าหมาย ตัวกรองของตาราง
|
|
45
|
+
- คำอธิบายที่มีลิงก์หรือยาวเกิน `Tooltip`
|
|
46
|
+
|
|
47
|
+
## When not to use
|
|
48
|
+
|
|
49
|
+
| สถานการณ์ | ใช้แทน |
|
|
50
|
+
| ----------------------------------- | -------------- |
|
|
51
|
+
| คำอธิบายสั้นบรรทัดเดียว | `Tooltip` |
|
|
52
|
+
| รายการคำสั่ง (แก้ไข / ลบ) | `DropdownMenu` |
|
|
53
|
+
| เลือกค่าจากรายการ | `Select` |
|
|
54
|
+
| ยืนยันการตัดสินใจหรือฟอร์มที่ต้องทำให้เสร็จก่อน | `Dialog` |
|
|
55
|
+
|
|
56
|
+
## Props and variants
|
|
57
|
+
|
|
58
|
+
### PopoverContent
|
|
59
|
+
|
|
60
|
+
| Prop | ค่า | ค่าเริ่มต้น | ความหมาย |
|
|
61
|
+
| ------------ | -------------------------------- | -------- | ------------------------ |
|
|
62
|
+
| `side` | `top`, `right`, `bottom`, `left` | `bottom` | ด้านที่ลอยออกจาก trigger |
|
|
63
|
+
| `align` | `start`, `center`, `end` | `center` | การจัดแนวตาม trigger |
|
|
64
|
+
| `sideOffset` | ตัวเลข (px) | `4` | ระยะห่างจาก trigger |
|
|
65
|
+
| `className` | class | – | เช่น ความกว้าง (ปกติ 288px) |
|
|
66
|
+
|
|
67
|
+
### Popover
|
|
68
|
+
|
|
69
|
+
| Prop | ค่า | ค่าเริ่มต้น | ความหมาย |
|
|
70
|
+
| ----------------------- | ----------------- | ------- | -------------------- |
|
|
71
|
+
| `open` / `onOpenChange` | `boolean` / ฟังก์ชัน | – | ควบคุมการเปิดจากภายนอก |
|
|
72
|
+
| `defaultOpen` | `boolean` | `false` | เปิดไว้ตั้งแต่แรก |
|
|
73
|
+
|
|
74
|
+
### พฤติกรรมที่มีให้แล้ว
|
|
75
|
+
|
|
76
|
+
- คลิก trigger เพื่อเปิด/ปิด กด Escape หรือคลิกนอกกล่องเพื่อปิด แล้วโฟกัสกลับไปที่ trigger
|
|
77
|
+
- หน้าตาเหมือนกล่องของ `Dialog` (พื้น popover มุมโค้ง เงา) ระยะขอบใน 16px
|
|
78
|
+
|
|
79
|
+
## Tokens used
|
|
80
|
+
|
|
81
|
+
ค่าทั้งหมดมาจาก `src/styles/theme.css`
|
|
82
|
+
|
|
83
|
+
| Token | โหมดสว่าง | โหมดมืด | ใช้ใน |
|
|
84
|
+
| ---------------------- | -------------------------- | -------------------------- | ------------------------------- |
|
|
85
|
+
| `--popover` | `oklch(1 0 0)` | `oklch(0.228 0.013 107.4)` | พื้นกล่อง |
|
|
86
|
+
| `--popover-foreground` | `oklch(0.153 0.006 107.1)` | `oklch(0.988 0.003 106.5)` | ตัวอักษร |
|
|
87
|
+
| `--muted-foreground` | `oklch(0.5 0.027 107.3)` | `oklch(0.737 0.021 106.9)` | คำอธิบาย |
|
|
88
|
+
| `--foreground` | `oklch(0.153 0.006 107.1)` | `oklch(0.988 0.003 106.5)` | เส้นขอบบาง ๆ (5% สว่าง, 10% มืด) |
|
|
89
|
+
| `--radius` | `0.625rem` | – | มุมโค้ง (`--radius × 2.2` = 22px) |
|
|
90
|
+
|
|
91
|
+
## Example
|
|
92
|
+
|
|
93
|
+
จาก story `Playground` ใน `Popover.stories.tsx`:
|
|
94
|
+
|
|
95
|
+
```tsx
|
|
96
|
+
<Popover>
|
|
97
|
+
<PopoverTrigger render={<Button variant="outline" />}>
|
|
98
|
+
ตั้งเป้าหมายการออม
|
|
99
|
+
</PopoverTrigger>
|
|
100
|
+
<PopoverContent>
|
|
101
|
+
<PopoverHeader>
|
|
102
|
+
<PopoverTitle>เป้าหมายการออม</PopoverTitle>
|
|
103
|
+
<PopoverDescription>ยอดเงินที่อยากมีเมื่อเกษียณ</PopoverDescription>
|
|
104
|
+
</PopoverHeader>
|
|
105
|
+
<div className="grid gap-2">
|
|
106
|
+
<Label htmlFor="popover-goal">จำนวนเงิน (AUD)</Label>
|
|
107
|
+
<Input id="popover-goal" type="number" defaultValue={500000} />
|
|
108
|
+
</div>
|
|
109
|
+
</PopoverContent>
|
|
110
|
+
</Popover>
|
|
111
|
+
```
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: progress
|
|
3
|
+
name: Progress
|
|
4
|
+
description: >-
|
|
5
|
+
A bar showing how much of a task or goal is done. 12px high, full width, capsule
|
|
6
|
+
shaped. Wraps Base UI's `Progress`.
|
|
7
|
+
metadata:
|
|
8
|
+
status: {status: stable}
|
|
9
|
+
since: 1.0.0
|
|
10
|
+
tags: [feedback, data-display]
|
|
11
|
+
|
|
12
|
+
sections:
|
|
13
|
+
- kind: guidelines
|
|
14
|
+
for: all
|
|
15
|
+
framing: when-to-use
|
|
16
|
+
items:
|
|
17
|
+
- level: should
|
|
18
|
+
statement: >-
|
|
19
|
+
Use for measurable progress, such as a document upload or the steps of an
|
|
20
|
+
application.
|
|
21
|
+
- level: should
|
|
22
|
+
statement: >-
|
|
23
|
+
Use for the share of a single goal, such as this year's contributions against the
|
|
24
|
+
cap.
|
|
25
|
+
- level: should-not
|
|
26
|
+
statement: >-
|
|
27
|
+
Don't use for a wait of unknown length. Use <dsds:skeleton> for loading content or
|
|
28
|
+
<dsds:spinner> in a button (use `value={null}` only when it must be a bar).
|
|
29
|
+
alternatives:
|
|
30
|
+
- to: skeleton
|
|
31
|
+
- to: spinner
|
|
32
|
+
- level: must-not
|
|
33
|
+
statement: >-
|
|
34
|
+
Don't use to compare several values; use <dsds:chart> or <dsds:table>.
|
|
35
|
+
alternatives:
|
|
36
|
+
- to: chart
|
|
37
|
+
- to: table
|
|
38
|
+
checkedBy: manual
|
|
39
|
+
|
|
40
|
+
- kind: guidelines
|
|
41
|
+
for: all
|
|
42
|
+
items:
|
|
43
|
+
- id: value-range
|
|
44
|
+
level: must
|
|
45
|
+
statement: >-
|
|
46
|
+
`value` lies within `min`–`max` (default 0–100). For money against a cap, pass the
|
|
47
|
+
real cap as `max` (e.g. `value={18600} max={30000}`) instead of working out a
|
|
48
|
+
percentage yourself.
|
|
49
|
+
checkedBy: manual
|
|
50
|
+
- id: label-and-value
|
|
51
|
+
level: should
|
|
52
|
+
statement: >-
|
|
53
|
+
Show `ProgressLabel` (top left) and `ProgressValue` (top right, "62%") so the
|
|
54
|
+
number can be read without estimating from the bar.
|
|
55
|
+
example:
|
|
56
|
+
ref:
|
|
57
|
+
href: ./Progress.stories.tsx#Playground
|
|
58
|
+
rel: demo
|
|
59
|
+
checkedBy: manual
|
|
60
|
+
- id: money-format
|
|
61
|
+
level: should
|
|
62
|
+
statement: >-
|
|
63
|
+
For money, pass `format` (`Intl.NumberFormatOptions`, e.g.
|
|
64
|
+
`{ style: "currency", currency: "AUD" }`) or write the amount in nearby text
|
|
65
|
+
(whether `ProgressValue` uses Thai formatting hasn't been checked).
|
|
66
|
+
checkedBy: manual
|
|
67
|
+
- id: no-colour-states
|
|
68
|
+
level: must-not
|
|
69
|
+
statement: >-
|
|
70
|
+
Don't recolour the bar to warning/danger with `className` when it nears or passes
|
|
71
|
+
the cap. These colours aren't defined yet (see Open decisions); use text or an
|
|
72
|
+
<dsds:alert> instead.
|
|
73
|
+
checkedBy: manual
|
|
74
|
+
|
|
75
|
+
- kind: guidelines
|
|
76
|
+
for: all
|
|
77
|
+
title: Accessibility
|
|
78
|
+
tags: [accessibility]
|
|
79
|
+
items:
|
|
80
|
+
- id: name-required
|
|
81
|
+
level: must
|
|
82
|
+
statement: >-
|
|
83
|
+
The bar needs a name: a `ProgressLabel`, or an `aria-label` when only the bar is
|
|
84
|
+
shown.
|
|
85
|
+
evidence:
|
|
86
|
+
- href: https://www.w3.org/WAI/WCAG22/Understanding/name-role-value.html
|
|
87
|
+
role: WCAG 2.2 SC 4.1.2 (A)
|
|
88
|
+
checks:
|
|
89
|
+
- href: ./Progress.stories.tsx#Playground
|
|
90
|
+
role: test
|
|
91
|
+
note: play function checks aria-valuenow="62"
|
|
92
|
+
checkedBy: assisted
|
|
93
|
+
- id: indicator-contrast
|
|
94
|
+
level: must
|
|
95
|
+
statement: >-
|
|
96
|
+
The indicator (`--progress-indicator`) on its track (`--progress-track`) passes
|
|
97
|
+
4.74:1 light / 5.09:1 dark.
|
|
98
|
+
refines:
|
|
99
|
+
- to: shared-a11y#non-text-contrast
|
|
100
|
+
checks:
|
|
101
|
+
- href: ../../../scripts/tokens.mjs
|
|
102
|
+
role: test
|
|
103
|
+
note: CONTRAST_PAIRS "แถบ Progress บนราง" (Progress bar on track)
|
|
104
|
+
checkedBy: automated
|
|
105
|
+
- id: indeterminate-no-value
|
|
106
|
+
level: must
|
|
107
|
+
statement: >-
|
|
108
|
+
`value={null}` has no `aria-valuenow`, so screen readers know progress is unknown.
|
|
109
|
+
Never pass 0 to mean unknown.
|
|
110
|
+
checks:
|
|
111
|
+
- href: ./Progress.stories.tsx#Indeterminate
|
|
112
|
+
role: test
|
|
113
|
+
checkedBy: automated
|
|
114
|
+
|
|
115
|
+
- kind: definitions
|
|
116
|
+
for: all
|
|
117
|
+
context: anatomy
|
|
118
|
+
items:
|
|
119
|
+
- term: Progress
|
|
120
|
+
definition: >-
|
|
121
|
+
The root. Takes `value`, `min`, `max`, `format`, `aria-label`.
|
|
122
|
+
- term: ProgressLabel
|
|
123
|
+
definition: >-
|
|
124
|
+
The bar's name, top left, 14px medium.
|
|
125
|
+
- term: ProgressValue
|
|
126
|
+
definition: >-
|
|
127
|
+
The number, top right, 14px muted.
|
|
128
|
+
- term: Track + indicator
|
|
129
|
+
definition: >-
|
|
130
|
+
12px high, capsule shaped.
|
|
131
|
+
|
|
132
|
+
- kind: section
|
|
133
|
+
for: all
|
|
134
|
+
title: Open decisions
|
|
135
|
+
freeform:
|
|
136
|
+
- title: TODO
|
|
137
|
+
body: >-
|
|
138
|
+
Not yet checked whether `format` shows Thai number formatting, and no colours are
|
|
139
|
+
defined for passing a goal or nearing a cap.
|
|
140
|
+
|
|
141
|
+
sourceFiles:
|
|
142
|
+
- platform: react
|
|
143
|
+
file: ./Progress.tsx
|
|
144
|
+
|
|
145
|
+
imports:
|
|
146
|
+
- platform: react
|
|
147
|
+
code: >-
|
|
148
|
+
import { Progress, ProgressLabel, ProgressValue } from "@designil/labdsnov"
|
|
149
|
+
package: "@designil/labdsnov"
|
|
150
|
+
|
|
151
|
+
traits:
|
|
152
|
+
- traitType: state
|
|
153
|
+
kind: boolean
|
|
154
|
+
id: indeterminate
|
|
155
|
+
description: >-
|
|
156
|
+
`value={null}`: progress is unknown.
|
|
157
|
+
|
|
158
|
+
alternatives:
|
|
159
|
+
- to: skeleton
|
|
160
|
+
- to: spinner
|
|
161
|
+
- to: chart
|
|
162
|
+
|
|
163
|
+
refs:
|
|
164
|
+
- href: ./Progress.md
|
|
165
|
+
rel: relates-to
|
|
166
|
+
role: Thai usage doc
|
|
167
|
+
- href: ./Progress.stories.tsx
|
|
168
|
+
rel: demo
|
|
169
|
+
role: CSF stories
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
# Progress (แถบความคืบหน้า)
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
แถบแสดงสัดส่วนที่ทำไปแล้วของงานหรือเป้าหมาย
|
|
6
|
+
|
|
7
|
+
## Import and usage
|
|
8
|
+
|
|
9
|
+
**ตั้งค่าครั้งเดียวในแอป** (ใช้ร่วมกันทุกคอมโพเนนต์):
|
|
10
|
+
|
|
11
|
+
1. ติดตั้ง `@designil/labdsnov` (`pnpm add @designil/labdsnov`) พร้อม `react` และ `react-dom` 19
|
|
12
|
+
2. import สไตล์ครั้งเดียวที่ root layout: `import "@designil/labdsnov/styles.css"`
|
|
13
|
+
3. กำหนดตัวแปร `--font-heading` (แอปใช้ IBM Plex Sans Thai) และใส่ class `dark` ที่ `<html>` เมื่อต้องการโหมดมืด
|
|
14
|
+
|
|
15
|
+
```tsx
|
|
16
|
+
import { Progress, ProgressLabel, ProgressValue } from "@designil/labdsnov"
|
|
17
|
+
|
|
18
|
+
;<Progress value={62}>
|
|
19
|
+
<ProgressLabel>เงินสมทบปีนี้เทียบกับเพดาน</ProgressLabel>
|
|
20
|
+
<ProgressValue />
|
|
21
|
+
</Progress>
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
- `value` คือ 0–100 (เปลี่ยนช่วงได้ด้วย `min` / `max`)
|
|
25
|
+
- ถ้าไม่มี `ProgressLabel` ต้องใส่ `aria-label` ให้แถบ
|
|
26
|
+
|
|
27
|
+
## When to use
|
|
28
|
+
|
|
29
|
+
- ความคืบหน้าที่วัดได้ เช่น อัปโหลดเอกสาร ขั้นตอนการยื่นคำขอ
|
|
30
|
+
- สัดส่วนของเป้าหมาย เช่น เงินสมทบปีนี้เทียบกับเพดาน
|
|
31
|
+
|
|
32
|
+
## When not to use
|
|
33
|
+
|
|
34
|
+
- **รอโดยไม่รู้ว่านานเท่าไร**: ใช้ `Skeleton` สำหรับเนื้อหาที่โหลด (หรือ `value={null}` ถ้าต้องเป็นแถบ)
|
|
35
|
+
- **เปรียบเทียบตัวเลขหลายค่า**: ใช้ตารางหรือกราฟ หรือ `Chart`
|
|
36
|
+
|
|
37
|
+
## Props and variants
|
|
38
|
+
|
|
39
|
+
ไม่มี variant หรือ size แถบสูง 12px กว้างเต็มพื้นที่ ทรงแคปซูล
|
|
40
|
+
|
|
41
|
+
| Prop | ค่า | ค่าเริ่มต้น | ความหมาย |
|
|
42
|
+
| ------------- | -------------------------- | ----------- | ------------------------------------------------------------- |
|
|
43
|
+
| `value` | ตัวเลข หรือ `null` | – | ค่าปัจจุบัน `null` = ไม่รู้ความคืบหน้า |
|
|
44
|
+
| `min` / `max` | ตัวเลข | `0` / `100` | ช่วงของค่า |
|
|
45
|
+
| `format` | `Intl.NumberFormatOptions` | – | รูปแบบตัวเลขใน `ProgressValue` TODO: ยังไม่ได้ตรวจว่าใช้ภาษาไทยหรือไม่ |
|
|
46
|
+
| `aria-label` | ข้อความ | – | ชื่อของแถบ เมื่อไม่มี `ProgressLabel` |
|
|
47
|
+
| `className` | class | – | เช่น ความกว้าง |
|
|
48
|
+
|
|
49
|
+
- **ProgressLabel**: ชื่อของแถบ แสดงด้านซ้ายบน (14px, medium)
|
|
50
|
+
- **ProgressValue**: ตัวเลข เช่น "62%" แสดงด้านขวาบน (14px, สี muted)
|
|
51
|
+
- TODO: ยังไม่ได้กำหนดสีเมื่อเกินเป้าหรือใกล้เพดาน (เช่น สีเตือน)
|
|
52
|
+
|
|
53
|
+
## Tokens used
|
|
54
|
+
|
|
55
|
+
ค่าทั้งหมดมาจาก `src/styles/theme.css`
|
|
56
|
+
|
|
57
|
+
### Component tokens
|
|
58
|
+
|
|
59
|
+
token เฉพาะของคอมโพเนนต์นี้ ชี้ไปที่ semantic token ด้านล่าง เปลี่ยนที่นี่เพื่อปรับเฉพาะคอมโพเนนต์นี้ (โหมดมืด "–" = ใช้ค่าเดียวกับโหมดสว่าง)
|
|
60
|
+
|
|
61
|
+
| Token | โหมดสว่าง | โหมดมืด | ใช้ใน |
|
|
62
|
+
| ---------------------- | ----------- | ------ | ------------ |
|
|
63
|
+
| `--progress-track` | `--muted` | – | ราง |
|
|
64
|
+
| `--progress-indicator` | `--primary` | – | แถบความคืบหน้า |
|
|
65
|
+
|
|
66
|
+
### Semantic tokens
|
|
67
|
+
|
|
68
|
+
| Token | โหมดสว่าง | โหมดมืด | ใช้ใน |
|
|
69
|
+
| -------------------- | --------------------------- | --------------------------- | ----------------------- |
|
|
70
|
+
| `--muted` | `oklch(0.966 0.005 106.5)` | `oklch(0.286 0.016 107.4)` | ราง |
|
|
71
|
+
| `--primary` | `oklch(0.553 0.195 38.402)` | `oklch(0.705 0.187 47.604)` | ส่วนที่ทำแล้ว |
|
|
72
|
+
| `--muted-foreground` | `oklch(0.5 0.027 107.3)` | `oklch(0.737 0.021 106.9)` | ตัวเลข (`ProgressValue`) |
|
|
73
|
+
|
|
74
|
+
## Example
|
|
75
|
+
|
|
76
|
+
จาก story `Playground` ใน `Progress.stories.tsx`:
|
|
77
|
+
|
|
78
|
+
```tsx
|
|
79
|
+
<Progress value={62} className="w-80">
|
|
80
|
+
<ProgressLabel>เงินสมทบปีนี้เทียบกับเพดาน</ProgressLabel>
|
|
81
|
+
<ProgressValue />
|
|
82
|
+
</Progress>
|
|
83
|
+
```
|