@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,179 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: date-picker
|
|
3
|
+
name: DatePicker
|
|
4
|
+
description: >-
|
|
5
|
+
A form button that opens a calendar in a popup to pick one date, shown in Thai with the
|
|
6
|
+
Buddhist year ("13 พ.ย. 2569"). Composed from Popover + Calendar + Button (shadcn only
|
|
7
|
+
has a recipe for this).
|
|
8
|
+
metadata:
|
|
9
|
+
status: {status: stable}
|
|
10
|
+
since: 1.0.0
|
|
11
|
+
tags: [form, date]
|
|
12
|
+
|
|
13
|
+
sections:
|
|
14
|
+
- kind: guidelines
|
|
15
|
+
for: all
|
|
16
|
+
framing: when-to-use
|
|
17
|
+
items:
|
|
18
|
+
- level: should
|
|
19
|
+
statement: >-
|
|
20
|
+
Use as a date field in a form, e.g. employment start date, effective date.
|
|
21
|
+
- level: may
|
|
22
|
+
statement: >-
|
|
23
|
+
Use for birth dates or other distant dates when the month/year dropdowns are turned
|
|
24
|
+
on through `calendarProps` (story `DateOfBirth`).
|
|
25
|
+
example:
|
|
26
|
+
ref:
|
|
27
|
+
href: ./DatePicker.stories.tsx#DateOfBirth
|
|
28
|
+
rel: demo
|
|
29
|
+
- level: must-not
|
|
30
|
+
statement: >-
|
|
31
|
+
Don't use for date ranges (not supported). Compose `Calendar mode="range"` in a
|
|
32
|
+
<dsds:popover> yourself.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: calendar
|
|
35
|
+
- to: popover
|
|
36
|
+
checkedBy: manual
|
|
37
|
+
- level: should-not
|
|
38
|
+
statement: >-
|
|
39
|
+
Don't use to show a date that can't be edited. Show it as text, "13 พ.ย. 2569".
|
|
40
|
+
|
|
41
|
+
- kind: guidelines
|
|
42
|
+
for: all
|
|
43
|
+
items:
|
|
44
|
+
- id: label-by-id
|
|
45
|
+
level: must
|
|
46
|
+
statement: >-
|
|
47
|
+
Put an `id` on DatePicker (it lands on the button) and bind it to `<Label htmlFor>`.
|
|
48
|
+
Otherwise the button's name is just "เลือกวันที่" (choose a date) or the date,
|
|
49
|
+
with no hint of what the field is.
|
|
50
|
+
evidence:
|
|
51
|
+
- href: https://www.w3.org/WAI/WCAG22/Understanding/labels-or-instructions.html
|
|
52
|
+
role: WCAG 2.2 SC 3.3.2 (A)
|
|
53
|
+
uses:
|
|
54
|
+
- to: label
|
|
55
|
+
checkedBy: manual
|
|
56
|
+
- id: value-is-date
|
|
57
|
+
level: must
|
|
58
|
+
statement: >-
|
|
59
|
+
The value is a `Date` (`value` / `onValueChange`); `onValueChange` gets `undefined`
|
|
60
|
+
when cleared. Keep it in Client Component state and send it to the server as ISO,
|
|
61
|
+
not as the displayed text (which uses the Buddhist year).
|
|
62
|
+
checkedBy: manual
|
|
63
|
+
- id: limit-range
|
|
64
|
+
level: must
|
|
65
|
+
statement: >-
|
|
66
|
+
Restrict pickable dates through `calendarProps.disabled` (e.g. birth date
|
|
67
|
+
`{ after: today }`, effective date `{ before: today }`) instead of validating after
|
|
68
|
+
the pick.
|
|
69
|
+
uses:
|
|
70
|
+
- to: calendar
|
|
71
|
+
checkedBy: manual
|
|
72
|
+
- id: closes-on-select
|
|
73
|
+
level: should
|
|
74
|
+
statement: >-
|
|
75
|
+
Picking a date closes the popup and returns focus to the button. No "ตกลง" (OK)
|
|
76
|
+
button is needed.
|
|
77
|
+
checks:
|
|
78
|
+
- href: ./DatePicker.stories.tsx#PickDate
|
|
79
|
+
role: test
|
|
80
|
+
note: play function checks that after picking, the button shows "20 พ.ย. 2569" and aria-expanded="false"
|
|
81
|
+
checkedBy: automated
|
|
82
|
+
- id: full-width-in-form
|
|
83
|
+
level: should
|
|
84
|
+
statement: >-
|
|
85
|
+
It's 240px wide by default. In forms add `className="w-full"` to match other
|
|
86
|
+
fields.
|
|
87
|
+
checkedBy: manual
|
|
88
|
+
- id: placeholder-default
|
|
89
|
+
level: may
|
|
90
|
+
statement: >-
|
|
91
|
+
Use the default `placeholder` "เลือกวันที่" (choose a date). Change it when it adds
|
|
92
|
+
meaning, e.g. "เลือกวันเกิด" (choose date of birth).
|
|
93
|
+
- id: no-date-fns-format
|
|
94
|
+
level: must-not
|
|
95
|
+
statement: >-
|
|
96
|
+
Don't format a date shown next to the field with `date-fns` `th` to match the
|
|
97
|
+
button. Use
|
|
98
|
+
`Intl.DateTimeFormat("th-TH", { day: "numeric", month: "short", year: "numeric" })`.
|
|
99
|
+
refs:
|
|
100
|
+
- to: shared-content#buddhist-year
|
|
101
|
+
rel: relates-to
|
|
102
|
+
checkedBy: manual
|
|
103
|
+
|
|
104
|
+
- kind: guidelines
|
|
105
|
+
for: all
|
|
106
|
+
title: Accessibility
|
|
107
|
+
tags: [accessibility]
|
|
108
|
+
items:
|
|
109
|
+
- id: invalid-described
|
|
110
|
+
level: must
|
|
111
|
+
statement: >-
|
|
112
|
+
An invalid field gets `aria-invalid` and `aria-describedby` pointing at the
|
|
113
|
+
`FieldError` (both props are passed on to the button).
|
|
114
|
+
refines:
|
|
115
|
+
- to: shared-a11y#invalid-has-message
|
|
116
|
+
checkedBy: manual
|
|
117
|
+
- id: placeholder-contrast
|
|
118
|
+
level: must
|
|
119
|
+
statement: >-
|
|
120
|
+
The muted placeholder text passes 5.97:1 light / 8.43:1 dark on the page
|
|
121
|
+
background.
|
|
122
|
+
checks:
|
|
123
|
+
- href: ../../../scripts/tokens.mjs
|
|
124
|
+
role: test
|
|
125
|
+
note: CONTRAST_PAIRS "คำอธิบายบนพื้นหน้า"
|
|
126
|
+
checkedBy: automated
|
|
127
|
+
|
|
128
|
+
- kind: section
|
|
129
|
+
for: all
|
|
130
|
+
title: Open decisions
|
|
131
|
+
freeform:
|
|
132
|
+
- title: TODO
|
|
133
|
+
body: >-
|
|
134
|
+
Date ranges aren't supported, there's no typed date field, and the look (an outline
|
|
135
|
+
button with a calendar icon) differs from Input / Select (`filled`); it's not
|
|
136
|
+
decided whether to make them match.
|
|
137
|
+
|
|
138
|
+
sourceFiles:
|
|
139
|
+
- platform: react
|
|
140
|
+
file: ./DatePicker.tsx
|
|
141
|
+
|
|
142
|
+
imports:
|
|
143
|
+
- platform: react
|
|
144
|
+
code: >-
|
|
145
|
+
import { DatePicker } from "@designil/labdsnov"
|
|
146
|
+
package: "@designil/labdsnov"
|
|
147
|
+
|
|
148
|
+
traits:
|
|
149
|
+
- traitType: state
|
|
150
|
+
kind: boolean
|
|
151
|
+
id: disabled
|
|
152
|
+
description: >-
|
|
153
|
+
Disabled
|
|
154
|
+
- traitType: state
|
|
155
|
+
kind: boolean
|
|
156
|
+
id: aria-invalid
|
|
157
|
+
name: Invalid
|
|
158
|
+
description: >-
|
|
159
|
+
Invalid value; red border
|
|
160
|
+
- traitType: state
|
|
161
|
+
kind: boolean
|
|
162
|
+
id: empty
|
|
163
|
+
description: >-
|
|
164
|
+
Nothing picked yet; shows the muted placeholder
|
|
165
|
+
|
|
166
|
+
uses:
|
|
167
|
+
- to: popover
|
|
168
|
+
- to: calendar
|
|
169
|
+
- to: button
|
|
170
|
+
alternatives:
|
|
171
|
+
- to: calendar
|
|
172
|
+
|
|
173
|
+
refs:
|
|
174
|
+
- href: ./DatePicker.md
|
|
175
|
+
rel: relates-to
|
|
176
|
+
role: Thai usage doc
|
|
177
|
+
- href: ./DatePicker.stories.tsx
|
|
178
|
+
rel: demo
|
|
179
|
+
role: CSF stories
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# DatePicker (ช่องเลือกวันที่)
|
|
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 { DatePicker, Label } from "@designil/labdsnov"
|
|
17
|
+
|
|
18
|
+
<Label htmlFor="start-date">วันที่เริ่มงาน</Label>
|
|
19
|
+
<DatePicker id="start-date" value={date} onValueChange={setDate} />
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
- แสดงวันที่แบบเดียวกับ `FundCard` เช่น "13 พ.ย. 2569"
|
|
23
|
+
- เลือกแล้วกล่องปิดเอง
|
|
24
|
+
- shadcn ไม่มีคอมโพเนนต์นี้ (มีแค่ตัวอย่างการประกอบ) ระบบนี้ประกอบจาก `Popover` + `Calendar` + `Button` ให้แล้ว
|
|
25
|
+
|
|
26
|
+
## When to use
|
|
27
|
+
|
|
28
|
+
- ช่องวันที่ในฟอร์ม เช่น วันที่เริ่มงาน วันที่ต้องการให้มีผล
|
|
29
|
+
|
|
30
|
+
## When not to use
|
|
31
|
+
|
|
32
|
+
- **ช่วงวันที่**: TODO: ยังไม่รองรับช่วง ใช้ `Calendar mode="range"` ใน `Popover` เอง
|
|
33
|
+
- **วันที่ไกลมาก เช่น วันเกิด**: ใช้ได้ แต่ต้องเปิด dropdown ปี (story `DateOfBirth`) TODO: ยังไม่มีช่องพิมพ์วันที่
|
|
34
|
+
- **แสดงวันที่อย่างเดียว**: ใช้ข้อความ
|
|
35
|
+
|
|
36
|
+
## Props and variants
|
|
37
|
+
|
|
38
|
+
| Prop | ค่า | ค่าเริ่มต้น | ความหมาย |
|
|
39
|
+
| ------------------------- | -------------------- | --------- | ---------------------------------------------------------------------- |
|
|
40
|
+
| `value` / `onValueChange` | `Date` / ฟังก์ชัน | – | ควบคุมค่าจากภายนอก |
|
|
41
|
+
| `defaultValue` | `Date` | – | วันที่เลือกไว้ตอนแรก |
|
|
42
|
+
| `placeholder` | ข้อความ | "เลือกวันที่" | แสดงเมื่อยังไม่เลือก (สี muted) |
|
|
43
|
+
| `id` | ข้อความ | – | ผูกกับ `Label` ผ่าน `htmlFor` |
|
|
44
|
+
| `disabled` | `boolean` | `false` | ปิดใช้งาน |
|
|
45
|
+
| `aria-invalid` | `boolean` | – | ข้อมูลไม่ถูกต้อง |
|
|
46
|
+
| `aria-describedby` | id | – | ผูกข้อความช่วยเหลือหรือข้อความผิดพลาด |
|
|
47
|
+
| `calendarProps` | props ของ `Calendar` | – | เช่น `disabled` วันที่เลือกไม่ได้, `captionLayout="dropdown"`, `defaultMonth` |
|
|
48
|
+
| `className` | class | – | ปกติกว้าง 240px ใส่ `w-full` ในฟอร์ม |
|
|
49
|
+
|
|
50
|
+
หน้าตา: ปุ่ม outline ไอคอนปฏิทินด้านซ้าย ข้อความชิดซ้าย TODO: หน้าตาต่างจาก `Input` / `Select` (แบบ `filled`) ยังไม่ได้ตัดสินใจว่าจะทำให้เหมือนกันหรือไม่
|
|
51
|
+
|
|
52
|
+
## Tokens used
|
|
53
|
+
|
|
54
|
+
ใช้ token ของ `Button` (`outline`), `Popover` และ `Calendar`
|
|
55
|
+
|
|
56
|
+
ค่าทั้งหมดมาจาก `src/styles/theme.css`
|
|
57
|
+
|
|
58
|
+
| Token | โหมดสว่าง | โหมดมืด | ใช้ใน |
|
|
59
|
+
| -------------------- | ------------------------- | -------------------------- | ------------ |
|
|
60
|
+
| `--border` | `oklch(0.93 0.007 106.5)` | `oklch(1 0 0 / 10%)` | เส้นขอบปุ่ม |
|
|
61
|
+
| `--background` | `oklch(1 0 0)` | `oklch(0.153 0.006 107.1)` | พื้นปุ่ม |
|
|
62
|
+
| `--muted-foreground` | `oklch(0.5 0.027 107.3)` | `oklch(0.737 0.021 106.9)` | placeholder |
|
|
63
|
+
| `--ring` | `oklch(0.45 0.03 106.9)` | `oklch(0.8 0.02 106.9)` | วงแหวน focus |
|
|
64
|
+
| `--destructive` | `oklch(0.505 0.2 27.325)` | `oklch(0.75 0.16 22.216)` | สถานะไม่ถูกต้อง |
|
|
65
|
+
|
|
66
|
+
## Example
|
|
67
|
+
|
|
68
|
+
จาก story `DateOfBirth` ใน `DatePicker.stories.tsx`:
|
|
69
|
+
|
|
70
|
+
```tsx
|
|
71
|
+
<Label htmlFor="dp-dob">วันเกิด</Label>
|
|
72
|
+
<DatePicker
|
|
73
|
+
id="dp-dob"
|
|
74
|
+
calendarProps={{
|
|
75
|
+
captionLayout: "dropdown",
|
|
76
|
+
defaultMonth: new Date(1985, 0),
|
|
77
|
+
startMonth: new Date(1940, 0),
|
|
78
|
+
endMonth: new Date(2026, 10),
|
|
79
|
+
disabled: { after: new Date(2026, 10, 13) },
|
|
80
|
+
}}
|
|
81
|
+
/>
|
|
82
|
+
```
|
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
kind: component
|
|
2
|
+
id: dialog
|
|
3
|
+
name: Dialog
|
|
4
|
+
description: >-
|
|
5
|
+
A modal window centred on screen, where users make a decision or fill in a short form
|
|
6
|
+
before returning to their task. It has a dark blurred backdrop and a "ปิด" (close)
|
|
7
|
+
button at the top right. Wraps Base UI's `Dialog`.
|
|
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
|
+
description: >-
|
|
18
|
+
Use sparingly. Carbon, Atlassian and Polaris treat modals as a last resort because
|
|
19
|
+
they interrupt users.
|
|
20
|
+
items:
|
|
21
|
+
- level: should
|
|
22
|
+
statement: >-
|
|
23
|
+
Use to confirm an important decision the user started, e.g. changing investment
|
|
24
|
+
plan.
|
|
25
|
+
- level: should
|
|
26
|
+
statement: >-
|
|
27
|
+
Use for a short form of 1–3 fields that shouldn't leave the page, e.g. editing
|
|
28
|
+
account details.
|
|
29
|
+
- level: must-not
|
|
30
|
+
statement: >-
|
|
31
|
+
Don't use to confirm an irreversible action. Use <dsds:alert-dialog>, which is
|
|
32
|
+
announced as `alertdialog` and doesn't close on an outside click.
|
|
33
|
+
alternatives:
|
|
34
|
+
- to: alert-dialog
|
|
35
|
+
checkedBy: manual
|
|
36
|
+
- level: must-not
|
|
37
|
+
statement: >-
|
|
38
|
+
Don't open a dialog from a dialog. Merge them into one, or move to a new page.
|
|
39
|
+
checkedBy: manual
|
|
40
|
+
- level: must-not
|
|
41
|
+
statement: >-
|
|
42
|
+
Don't use for messages that need no answer ("บันทึกแล้ว", saved). Use a `toast`
|
|
43
|
+
(<dsds:toaster>).
|
|
44
|
+
alternatives:
|
|
45
|
+
- to: toaster
|
|
46
|
+
checkedBy: manual
|
|
47
|
+
- level: should-not
|
|
48
|
+
statement: >-
|
|
49
|
+
Don't use for long content, large tables, multi-step forms or frequent tasks. Do
|
|
50
|
+
them on the page or a new page.
|
|
51
|
+
- level: should-not
|
|
52
|
+
statement: >-
|
|
53
|
+
Don't use for small options next to a button. Use <dsds:popover> or
|
|
54
|
+
<dsds:dropdown-menu>.
|
|
55
|
+
alternatives:
|
|
56
|
+
- to: popover
|
|
57
|
+
- to: dropdown-menu
|
|
58
|
+
- level: should-not
|
|
59
|
+
statement: >-
|
|
60
|
+
Don't use as a panel sliding from the screen edge on mobile. Use <dsds:drawer>.
|
|
61
|
+
alternatives:
|
|
62
|
+
- to: drawer
|
|
63
|
+
|
|
64
|
+
- kind: guidelines
|
|
65
|
+
for: all
|
|
66
|
+
items:
|
|
67
|
+
- id: title-required
|
|
68
|
+
level: must
|
|
69
|
+
statement: >-
|
|
70
|
+
Always include `DialogTitle`. It's the dialog's name, read out by screen readers
|
|
71
|
+
when it opens.
|
|
72
|
+
checks:
|
|
73
|
+
- href: ./Dialog.stories.tsx#OpenAndClose
|
|
74
|
+
role: test
|
|
75
|
+
note: play function checks toHaveAccessibleName and toHaveAccessibleDescription
|
|
76
|
+
checkedBy: automated
|
|
77
|
+
- id: title-matches-trigger
|
|
78
|
+
level: must
|
|
79
|
+
statement: >-
|
|
80
|
+
The title uses the same words as the button that opened it (button
|
|
81
|
+
"แก้ไขข้อมูลบัญชี" → title "แก้ไขข้อมูลบัญชี", edit account details). A
|
|
82
|
+
confirmation is phrased as a question ("เปลี่ยนแผนการลงทุน?", change investment
|
|
83
|
+
plan?).
|
|
84
|
+
checkedBy: manual
|
|
85
|
+
- id: cancel-then-primary
|
|
86
|
+
level: must
|
|
87
|
+
statement: >-
|
|
88
|
+
In `DialogFooter` put the cancel button first and the primary button last. The
|
|
89
|
+
footer is a right-aligned row on wide screens and stacks vertically on narrow ones
|
|
90
|
+
with the last button on top, so the primary ends up rightmost or topmost.
|
|
91
|
+
checkedBy: manual
|
|
92
|
+
- id: max-three-buttons
|
|
93
|
+
level: must
|
|
94
|
+
statement: >-
|
|
95
|
+
At most 3 footer buttons, only one of them primary, each a specific verb.
|
|
96
|
+
refs:
|
|
97
|
+
- to: shared-content#actions-are-verbs
|
|
98
|
+
rel: relates-to
|
|
99
|
+
checkedBy: manual
|
|
100
|
+
- id: description-consequence
|
|
101
|
+
level: should
|
|
102
|
+
statement: >-
|
|
103
|
+
`DialogDescription` states the consequence ("การเปลี่ยนแผนจะมีผลกับเงินสมทบงวดถัดไป",
|
|
104
|
+
the change applies from the next contribution), not what the buttons do.
|
|
105
|
+
checkedBy: manual
|
|
106
|
+
- id: controlled-to-close-after-save
|
|
107
|
+
level: should
|
|
108
|
+
statement: >-
|
|
109
|
+
A form that should close after a successful save controls `open` / `onOpenChange`
|
|
110
|
+
in a Client Component. Don't make the save button a `DialogClose` (it closes before
|
|
111
|
+
the result is known).
|
|
112
|
+
example:
|
|
113
|
+
ref:
|
|
114
|
+
href: ./Dialog.stories.tsx#EditAccountForm
|
|
115
|
+
rel: demo
|
|
116
|
+
checkedBy: manual
|
|
117
|
+
- id: size-choice
|
|
118
|
+
level: should
|
|
119
|
+
statement: >-
|
|
120
|
+
`sm` (384px) for short forms and confirmations, `default` (448px) for general
|
|
121
|
+
decisions (`lg` / `xl` have no examples yet). Below 640px every size is full width
|
|
122
|
+
with 16px side margins.
|
|
123
|
+
checkedBy: manual
|
|
124
|
+
- id: close-button-default
|
|
125
|
+
level: should
|
|
126
|
+
statement: >-
|
|
127
|
+
Keep the top-right "ปิด" (close) button. Hide it (`showCloseButton={false}`) only
|
|
128
|
+
when the footer already has a "ยกเลิก" (cancel) button. An information-only dialog
|
|
129
|
+
uses `DialogFooter showCloseButton`.
|
|
130
|
+
checks:
|
|
131
|
+
- href: ./Dialog.stories.tsx#WithoutCloseButton
|
|
132
|
+
role: test
|
|
133
|
+
checkedBy: automated
|
|
134
|
+
- id: trigger-render
|
|
135
|
+
level: must
|
|
136
|
+
statement: >-
|
|
137
|
+
Write the opening button and footer buttons as `DialogTrigger` / `DialogClose`
|
|
138
|
+
`render={<Button … />}`.
|
|
139
|
+
refs:
|
|
140
|
+
- to: shared-composition#render-prop
|
|
141
|
+
rel: relates-to
|
|
142
|
+
checkedBy: assisted
|
|
143
|
+
- id: no-tall-content
|
|
144
|
+
level: must-not
|
|
145
|
+
statement: >-
|
|
146
|
+
Don't put content taller than the screen in a dialog. Dialog has no max height and
|
|
147
|
+
no scrolling content area; move it to a new page until this is decided.
|
|
148
|
+
checkedBy: manual
|
|
149
|
+
|
|
150
|
+
- kind: guidelines
|
|
151
|
+
for: all
|
|
152
|
+
title: Accessibility
|
|
153
|
+
tags: [accessibility]
|
|
154
|
+
items:
|
|
155
|
+
- id: focus-management
|
|
156
|
+
level: must
|
|
157
|
+
statement: >-
|
|
158
|
+
On open, focus moves to the first focusable field (change it with `initialFocus`),
|
|
159
|
+
stays trapped in the dialog, and returns to the opening button on close
|
|
160
|
+
(`finalFocus`). Don't drop the focus trap with `modal={false}` on a dialog with a
|
|
161
|
+
form.
|
|
162
|
+
evidence:
|
|
163
|
+
- href: https://www.w3.org/WAI/ARIA/apg/patterns/dialog-modal/
|
|
164
|
+
role: WAI-ARIA APG Dialog (Modal) pattern
|
|
165
|
+
checks:
|
|
166
|
+
- href: ./Dialog.stories.tsx#EditAccountForm
|
|
167
|
+
role: test
|
|
168
|
+
note: play function checks the "ชื่อ-นามสกุล" (full name) field gets focus on open
|
|
169
|
+
checkedBy: automated
|
|
170
|
+
- id: escape-closes
|
|
171
|
+
level: must
|
|
172
|
+
statement: >-
|
|
173
|
+
Escape always closes the dialog.
|
|
174
|
+
checks:
|
|
175
|
+
- href: ./Dialog.stories.tsx#EscapeCloses
|
|
176
|
+
role: test
|
|
177
|
+
checkedBy: automated
|
|
178
|
+
- id: close-label-thai
|
|
179
|
+
level: must
|
|
180
|
+
statement: >-
|
|
181
|
+
The top-right icon button is already named "ปิด" (close). Don't replace it with
|
|
182
|
+
your own icon button without an `aria-label`.
|
|
183
|
+
refines:
|
|
184
|
+
- to: shared-a11y#icon-only-label
|
|
185
|
+
checkedBy: assisted
|
|
186
|
+
|
|
187
|
+
- kind: guidelines
|
|
188
|
+
for: agent
|
|
189
|
+
items:
|
|
190
|
+
- refs:
|
|
191
|
+
- to: shared-testing#assert-by-state
|
|
192
|
+
rel: same-as
|
|
193
|
+
- refs:
|
|
194
|
+
- to: shared-testing#query-portal-with-screen
|
|
195
|
+
rel: same-as
|
|
196
|
+
- refs:
|
|
197
|
+
- to: shared-testing#modal-stories-not-autodocs
|
|
198
|
+
rel: same-as
|
|
199
|
+
|
|
200
|
+
- kind: definitions
|
|
201
|
+
for: all
|
|
202
|
+
context: anatomy
|
|
203
|
+
items:
|
|
204
|
+
- term: Dialog
|
|
205
|
+
definition: >-
|
|
206
|
+
Root; takes `open` / `onOpenChange`, `defaultOpen`, `modal`,
|
|
207
|
+
`disablePointerDismissal`
|
|
208
|
+
- term: DialogTrigger
|
|
209
|
+
definition: >-
|
|
210
|
+
The opening button (`render={<Button />}`)
|
|
211
|
+
- term: DialogContent
|
|
212
|
+
definition: >-
|
|
213
|
+
The centred box (portal + overlay built in); takes `size`, `showCloseButton`,
|
|
214
|
+
`initialFocus`, `finalFocus`
|
|
215
|
+
- term: DialogHeader
|
|
216
|
+
definition: >-
|
|
217
|
+
DialogTitle (required) + DialogDescription (recommended)
|
|
218
|
+
- term: DialogFooter
|
|
219
|
+
definition: >-
|
|
220
|
+
Buttons; takes `showCloseButton` (an outline "ปิด" button at the end of the row)
|
|
221
|
+
- term: DialogClose
|
|
222
|
+
definition: >-
|
|
223
|
+
A button that closes the dialog when pressed
|
|
224
|
+
|
|
225
|
+
- kind: definitions
|
|
226
|
+
for: all
|
|
227
|
+
context: keyboard
|
|
228
|
+
items:
|
|
229
|
+
- term: Tab / Shift+Tab
|
|
230
|
+
definition: >-
|
|
231
|
+
Cycle within the dialog
|
|
232
|
+
- term: Escape
|
|
233
|
+
definition: >-
|
|
234
|
+
Close and return focus to the opening button
|
|
235
|
+
|
|
236
|
+
- kind: section
|
|
237
|
+
for: all
|
|
238
|
+
title: Open decisions
|
|
239
|
+
freeform:
|
|
240
|
+
- title: TODO
|
|
241
|
+
body: >-
|
|
242
|
+
Not yet decided: scrollable long content; whether an outside click should close a
|
|
243
|
+
dialog that has action buttons (Carbon says no, Base UI closes it); switching to
|
|
244
|
+
Drawer on mobile automatically. The `ConfirmDelete` example hasn't been moved to
|
|
245
|
+
AlertDialog yet.
|
|
246
|
+
|
|
247
|
+
sourceFiles:
|
|
248
|
+
- platform: react
|
|
249
|
+
file: ./Dialog.tsx
|
|
250
|
+
|
|
251
|
+
imports:
|
|
252
|
+
- platform: react
|
|
253
|
+
code: >-
|
|
254
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@designil/labdsnov"
|
|
255
|
+
package: "@designil/labdsnov"
|
|
256
|
+
|
|
257
|
+
traits:
|
|
258
|
+
- traitType: variant
|
|
259
|
+
kind: enum
|
|
260
|
+
id: size
|
|
261
|
+
description: >-
|
|
262
|
+
Max width of `DialogContent` on screens 640px and wider
|
|
263
|
+
values:
|
|
264
|
+
- id: sm
|
|
265
|
+
description: >-
|
|
266
|
+
384px, delete confirmations and short forms
|
|
267
|
+
- id: default
|
|
268
|
+
description: >-
|
|
269
|
+
448px, general decisions
|
|
270
|
+
- id: lg
|
|
271
|
+
description: >-
|
|
272
|
+
512px, no usage example yet
|
|
273
|
+
- id: xl
|
|
274
|
+
description: >-
|
|
275
|
+
672px, no usage example yet
|
|
276
|
+
- traitType: variant
|
|
277
|
+
kind: boolean
|
|
278
|
+
id: showCloseButton
|
|
279
|
+
description: >-
|
|
280
|
+
The top-right "ปิด" (close) icon button (default `true`)
|
|
281
|
+
- traitType: state
|
|
282
|
+
kind: boolean
|
|
283
|
+
id: open
|
|
284
|
+
description: >-
|
|
285
|
+
The dialog is open (`data-open`); the page behind can't scroll or be clicked
|
|
286
|
+
|
|
287
|
+
uses:
|
|
288
|
+
- to: button
|
|
289
|
+
alternatives:
|
|
290
|
+
- to: alert-dialog
|
|
291
|
+
- to: drawer
|
|
292
|
+
- to: popover
|
|
293
|
+
|
|
294
|
+
refs:
|
|
295
|
+
- href: ./Dialog.md
|
|
296
|
+
rel: relates-to
|
|
297
|
+
role: Thai usage doc (including Content rules and Open questions)
|
|
298
|
+
- href: ./Dialog.stories.tsx
|
|
299
|
+
rel: demo
|
|
300
|
+
role: CSF stories
|