@inntechcorp/it-design 3.1.23 → 4.0.0-beta.1
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/ACCESSIBILITY.md +517 -0
- package/README.md +88 -11
- package/dist/accordion/index.d.ts +2 -2
- package/dist/accordion/item/styled.d.ts +2 -2
- package/dist/accordion/styled.d.ts +1 -0
- package/dist/accordion/submenu/styled.d.ts +5 -5
- package/dist/alert/Description.d.ts +7 -0
- package/dist/alert/Title.d.ts +7 -0
- package/dist/alert/alert.style.error.d.ts +1 -1
- package/dist/alert/alert.style.info.d.ts +1 -1
- package/dist/alert/alert.style.neutral.d.ts +4 -0
- package/dist/alert/alert.style.success.d.ts +1 -1
- package/dist/alert/alert.style.warning.d.ts +1 -1
- package/dist/alert/index.d.ts +4 -2
- package/dist/alert/styled.d.ts +4 -8
- package/dist/alink/index.d.ts +2 -10
- package/dist/alink/styled.d.ts +1 -1
- package/dist/back-top/styled.d.ts +2 -2
- package/dist/button/button.style.default.d.ts +1 -1
- package/dist/button/button.style.filled.d.ts +1 -1
- package/dist/button/button.style.ghost.d.ts +1 -1
- package/dist/button/button.style.icon.d.ts +2 -2
- package/dist/button/button.style.link.d.ts +1 -1
- package/dist/button/button.style.outline.d.ts +1 -1
- package/dist/button/button.style.size.d.ts +4 -1
- package/dist/button/button.style.solid.d.ts +1 -1
- package/dist/button/index.d.ts +10 -2
- package/dist/button/styled.d.ts +3 -12
- package/dist/calendar/day/Day.d.ts +2 -2
- package/dist/calendar/day/styled.d.ts +1 -1
- package/dist/calendar/header/styled.d.ts +6 -6
- package/dist/calendar/index.d.ts +11 -3
- package/dist/calendar/styled.d.ts +6 -6
- package/dist/card/Card.d.ts +9 -0
- package/dist/card/CardAction.d.ts +7 -0
- package/dist/card/CardContent.d.ts +7 -0
- package/dist/card/CardDescription.d.ts +7 -0
- package/dist/card/CardFooter.d.ts +8 -0
- package/dist/card/CardHeader.d.ts +8 -0
- package/dist/card/CardTabs.d.ts +7 -0
- package/dist/card/CardTitle.d.ts +7 -0
- package/dist/card/index.d.ts +8 -3
- package/dist/card/styles.d.ts +9 -9
- package/dist/checkbox/group/index.d.ts +1 -1
- package/dist/checkbox/group/styled.d.ts +1 -1
- package/dist/checkbox/index.d.ts +1 -1
- package/dist/checkbox/styled.d.ts +6 -5
- package/dist/context/ITDContext.d.ts +3 -2
- package/dist/context/ITDThemeProvider.d.ts +8 -0
- package/dist/context/styled.d.ts +1 -1
- package/dist/datepicker/index.d.ts +2 -2
- package/dist/datepicker/styled.d.ts +5 -5
- package/dist/enums/enum.d.ts +138 -8
- package/dist/flex/index.d.ts +1 -1
- package/dist/flex/styled.d.ts +2 -2
- package/dist/floating/Arrow.d.ts +17 -0
- package/dist/floating/FloatingContent.d.ts +60 -0
- package/dist/floating/mergeTriggerProps.d.ts +8 -0
- package/dist/form/context/FormContext.d.ts +5 -2
- package/dist/form/context/FormStore.d.ts +6 -3
- package/dist/form/control/Control.d.ts +1 -1
- package/dist/form/control/styled.d.ts +1 -1
- package/dist/form/group/Group.d.ts +1 -1
- package/dist/form/group/styled.d.ts +1 -1
- package/dist/form/index.d.ts +5 -5
- package/dist/form/item/Item.d.ts +2 -3
- package/dist/form/validation/Validator.d.ts +2 -3
- package/dist/form/wrapper/FormWrapper.d.ts +2 -2
- package/dist/helpers/binary/GetTypeByFileType.d.ts +2 -2
- package/dist/helpers/country/GetCountryCodeByCurrencyCode.d.ts +1 -1
- package/dist/helpers/country/GetCountryCodeByLanguage.d.ts +1 -1
- package/dist/helpers/css/FindSelector.d.ts +10 -0
- package/dist/helpers/currency/ConvertCurrency.d.ts +1 -1
- package/dist/helpers/currency/GetCurrencyFormat.d.ts +9 -0
- package/dist/helpers/currency/GetCurrencySymbol.d.ts +1 -1
- package/dist/helpers/datetime/FormatTime.d.ts +1 -1
- package/dist/helpers/datetime/dayjsSetup.d.ts +1 -1
- package/dist/helpers/index.d.ts +36 -32
- package/dist/helpers/locale/getLocaleDateByString.d.ts +1 -0
- package/dist/helpers/svg/styles.d.ts +1 -1
- package/dist/helpers/theme/Color.d.ts +19 -0
- package/dist/helpers/theme/GenerateColorScale.d.ts +16 -0
- package/dist/helpers/theme/cssVariables.d.ts +30 -0
- package/dist/helpers/theme/dark.d.ts +3 -0
- package/dist/helpers/theme/index.d.ts +9 -0
- package/dist/helpers/theme/light.d.ts +3 -0
- package/dist/helpers/theme/themes.d.ts +5 -0
- package/dist/helpers/theme/tokens.d.ts +392 -0
- package/dist/hooks/index.d.ts +15 -15
- package/dist/hooks/useAddExternalCSS.d.ts +4 -5
- package/dist/hooks/useAvoidCollision.d.ts +6 -1
- package/dist/hooks/useComponentSize.d.ts +1 -1
- package/dist/hooks/useConnectionStatus.d.ts +1 -1
- package/dist/hooks/useFloatingPosition.d.ts +63 -0
- package/dist/hooks/useFloatingTrigger.d.ts +64 -0
- package/dist/hooks/useFocusTrap.d.ts +36 -0
- package/dist/hooks/useOnClickOutside.d.ts +1 -1
- package/dist/hooks/useSingleQuery.d.ts +1 -1
- package/dist/hovercard/HoverCard.d.ts +12 -0
- package/dist/hovercard/HoverCardContent.d.ts +22 -0
- package/dist/hovercard/HoverCardTrigger.d.ts +17 -0
- package/dist/hovercard/hoverCardContext.d.ts +7 -0
- package/dist/hovercard/index.d.ts +4 -0
- package/dist/html/header/H1.d.ts +1 -1
- package/dist/html/header/H2.d.ts +1 -1
- package/dist/html/header/H3.d.ts +1 -1
- package/dist/html/header/H4.d.ts +1 -1
- package/dist/html/header/index.d.ts +4 -4
- package/dist/html/header/styled.d.ts +4 -4
- package/dist/icons/index.d.ts +11 -14
- package/dist/image/index.d.ts +1 -2
- package/dist/image/styled.d.ts +5 -2
- package/dist/index.cjs.js +2702 -2559
- package/dist/index.cjs.js.map +1 -0
- package/dist/index.css +1 -0
- package/dist/index.d.ts +168 -1786
- package/dist/index.es.js +22339 -0
- package/dist/index.es.js.map +1 -0
- package/dist/index.iife.js +5728 -0
- package/dist/index.iife.js.map +1 -0
- package/dist/index.umd.js +5728 -0
- package/dist/index.umd.js.map +1 -0
- package/dist/input/index.d.ts +29 -2
- package/dist/input/style.settings.d.ts +9 -0
- package/dist/input/styled.d.ts +16 -18
- package/dist/label/index.d.ts +6 -0
- package/dist/label/style.settings.d.ts +9 -0
- package/dist/label/styled.d.ts +27 -0
- package/dist/link/index.d.ts +1 -10
- package/dist/locales/en/{calendar.json → calendar.json.d.ts} +4 -2
- package/dist/locales/en/{itd.json → itd.json.d.ts} +35 -20
- package/dist/locales/{calendar.json → tr/calendar.json.d.ts} +4 -2
- package/dist/locales/{itd.json → tr/itd.json.d.ts} +35 -21
- package/dist/logger/index.d.ts +9 -0
- package/dist/modal/container/ModalContainer.d.ts +4 -4
- package/dist/modal/container/styled.d.ts +2 -2
- package/dist/modal/context/ModalContext.d.ts +23 -14
- package/dist/modal/index.d.ts +7 -22
- package/dist/modal/modal/Modal.d.ts +2 -2
- package/dist/modal/modal/styled.d.ts +11 -11
- package/dist/notification/container/Container.d.ts +5 -0
- package/dist/notification/container/styled.d.ts +1 -0
- package/dist/notification/context/NotificationsContext.d.ts +2 -2
- package/dist/notification/index.d.ts +1 -1
- package/dist/notification/item/Item.d.ts +12 -0
- package/dist/notification/item/styled.d.ts +1166 -0
- package/dist/popover/Popover.d.ts +42 -0
- package/dist/popover/PopoverContent.d.ts +34 -0
- package/dist/popover/PopoverTrigger.d.ts +26 -0
- package/dist/popover/index.d.ts +4 -0
- package/dist/primitives/Slot.d.ts +36 -0
- package/dist/progress/styled.d.ts +1 -1
- package/dist/radio/button/RadioButton.d.ts +2 -2
- package/dist/radio/button/styled.d.ts +8 -9
- package/dist/radio/group/Group.d.ts +3 -3
- package/dist/radio/group/styled.d.ts +1 -1
- package/dist/radio/index.d.ts +2 -2
- package/dist/reportWebVitals.d.ts +2 -0
- package/dist/result/index.d.ts +2 -2
- package/dist/result/styled.d.ts +9 -9
- package/dist/select/dropdown/Dropdown.d.ts +20 -0
- package/dist/select/dropdown/styled.d.ts +14 -0
- package/dist/select/index.d.ts +1 -1
- package/dist/select/option/Option.d.ts +14 -6
- package/dist/select/option/styled.d.ts +4 -4
- package/dist/select/selector/Selector.d.ts +3 -0
- package/dist/select/selector/selectorinput/SelectorInput.d.ts +6 -0
- package/dist/select/selector/selectorinput/styled.d.ts +2 -0
- package/dist/select/selector/styled.d.ts +16 -0
- package/dist/select/style.settings.d.ts +83 -26
- package/dist/select/styled.d.ts +5 -3
- package/dist/setupTests.d.ts +1 -0
- package/dist/spin/styled.d.ts +4 -4
- package/dist/status/styled.d.ts +1 -1
- package/dist/stories/Accordion.d.ts +0 -1
- package/dist/stories/Accordion.stories.d.ts +3 -3
- package/dist/stories/Alert.stories.d.ts +18 -4
- package/dist/stories/AlertComposition.d.ts +2 -0
- package/dist/stories/AlertComposition.stories.d.ts +17 -0
- package/dist/stories/Button.d.ts +0 -1
- package/dist/stories/Button.stories.d.ts +16 -4
- package/dist/stories/Card.stories.d.ts +3 -2
- package/dist/stories/Checkbox.stories.d.ts +3 -3
- package/dist/stories/CheckboxGroup.stories.d.ts +3 -3
- package/dist/stories/CheckboxGroupControl.stories.d.ts +3 -3
- package/dist/stories/ColorScale.d.ts +10 -0
- package/dist/stories/ColorScale.stories.d.ts +24 -0
- package/dist/stories/ColorScaleCompare.d.ts +8 -0
- package/dist/stories/ColorScaleCompare.stories.d.ts +47 -0
- package/dist/stories/DatePicker.d.ts +0 -1
- package/dist/stories/DatePicker.stories.d.ts +3 -3
- package/dist/stories/Form.d.ts +1 -1
- package/dist/stories/Form.stories.d.ts +13 -3
- package/dist/stories/Header.d.ts +0 -1
- package/dist/stories/Header.stories.d.ts +5 -5
- package/dist/stories/HoverCard.d.ts +2 -0
- package/dist/stories/HoverCard.stories.d.ts +18 -0
- package/dist/stories/Input.d.ts +0 -1
- package/dist/stories/Input.stories.d.ts +86 -4
- package/dist/stories/ModalManager.d.ts +0 -1
- package/dist/stories/ModalManager.stories.d.ts +2 -2
- package/dist/stories/Page.d.ts +0 -1
- package/dist/stories/Page.stories.d.ts +2 -2
- package/dist/stories/Popover.d.ts +2 -0
- package/dist/stories/Popover.stories.d.ts +40 -0
- package/dist/stories/Progress.stories.d.ts +3 -3
- package/dist/stories/RadioGroup.stories.d.ts +3 -3
- package/dist/stories/Result.stories.d.ts +3 -3
- package/dist/stories/Select.d.ts +0 -1
- package/dist/stories/Select.stories.d.ts +16 -6
- package/dist/stories/Status.stories.d.ts +3 -3
- package/dist/stories/Switch.stories.d.ts +12 -5
- package/dist/stories/Table.stories.d.ts +2 -2
- package/dist/stories/Tabs.stories.d.ts +3 -3
- package/dist/stories/TextArea.d.ts +0 -1
- package/dist/stories/TextArea.stories.d.ts +11 -4
- package/dist/stories/Tooltip.d.ts +1 -0
- package/dist/stories/Tooltip.stories.d.ts +35 -0
- package/dist/stories/Upload.stories.d.ts +3 -8
- package/dist/stories/root/index.d.ts +1 -2
- package/dist/stories/select.styled.d.ts +1 -1
- package/dist/switch/index.d.ts +1 -1
- package/dist/switch/styled.d.ts +4 -4
- package/dist/table/index.d.ts +2 -2
- package/dist/table/styled.d.ts +5 -5
- package/dist/tabs/index.d.ts +1 -1
- package/dist/tabs/styles.d.ts +4 -9
- package/dist/textarea/index.d.ts +1 -1
- package/dist/textarea/styled.d.ts +6 -8
- package/dist/tinyscrollbar/index.d.ts +1 -2
- package/dist/tinyscrollbar/scroll.styled.d.ts +1 -1
- package/dist/tinyscrollbar/styled.d.ts +1 -1
- package/dist/tooltip/Tooltip.d.ts +12 -0
- package/dist/tooltip/TooltipContent.d.ts +15 -0
- package/dist/tooltip/TooltipTrigger.d.ts +19 -0
- package/dist/tooltip/index.d.ts +4 -0
- package/dist/tooltip/tooltipContext.d.ts +7 -0
- package/dist/types/AccordionItemProps.d.ts +1 -1
- package/dist/types/AccordionProps.d.ts +1 -1
- package/dist/types/AccordionSubMenuProps.d.ts +1 -1
- package/dist/types/AlertProps.d.ts +6 -6
- package/dist/types/ButtonProps.d.ts +13 -31
- package/dist/types/CalendarProps.d.ts +4 -5
- package/dist/types/CardProps.d.ts +7 -3
- package/dist/types/CheckboxProps.d.ts +7 -3
- package/dist/types/DatePickerProps.d.ts +8 -7
- package/dist/types/FlexProps.d.ts +2 -2
- package/dist/types/FormProps.d.ts +10 -8
- package/dist/types/ITDProps.d.ts +4 -2
- package/dist/types/InputProps.d.ts +12 -18
- package/dist/types/LabelProps.d.ts +7 -0
- package/dist/types/ModalProps.d.ts +2 -2
- package/dist/types/PopoverProps.d.ts +10 -0
- package/dist/types/RadioProps.d.ts +3 -4
- package/dist/types/ResultProps.d.ts +2 -1
- package/dist/types/SelectProps.d.ts +22 -16
- package/dist/types/SingleQueryProps.d.ts +1 -1
- package/dist/types/StatusProps.d.ts +2 -2
- package/dist/types/SwitchProps.d.ts +4 -1
- package/dist/types/TableProps.d.ts +3 -2
- package/dist/types/TabsProps.d.ts +1 -1
- package/dist/types/TextAreaProps.d.ts +3 -3
- package/dist/types/Theme.d.ts +103 -0
- package/dist/types/UploadProps.d.ts +3 -40
- package/dist/upload/index.d.ts +2 -2
- package/dist/upload/styled.d.ts +11 -45
- package/dist/utils/CommonStyledComponents.d.ts +18 -0
- package/dist/utils/ErrorAnnouncement.d.ts +25 -0
- package/dist/utils/GetButtonSizeSlug.d.ts +6 -0
- package/dist/utils/GetIconSizeBySize.d.ts +1 -1
- package/dist/utils/GetSizeBySizeSlug.d.ts +2 -2
- package/dist/utils/GetSizeSlugBySize.d.ts +5 -2
- package/dist/utils/InlineSVGCached.d.ts +1 -1
- package/dist/utils/index.d.ts +6 -4
- package/package.json +87 -64
- package/dist/button/button.style.SVG.d.ts +0 -4
- package/dist/button/button.style.circle.d.ts +0 -4
- package/dist/button/button.style.strecth.d.ts +0 -4
- package/dist/cropper/index.d.ts +0 -44
- package/dist/global.css +0 -146
- package/dist/icons/FileDocument.d.ts +0 -6
- package/dist/icons/FileExcel.d.ts +0 -5
- package/dist/icons/FilePdf.d.ts +0 -5
- package/dist/index.d.mts +0 -716
- package/dist/index.esm.js +0 -5584
- package/dist/locales/tr/calendar.json +0 -30
- package/dist/locales/tr/itd.json +0 -325
- package/dist/select/menu/Menu.d.ts +0 -14
- package/dist/select/menu/styled.d.ts +0 -8
- package/dist/select/toggle/Toggle.d.ts +0 -3
- package/dist/select/toggle/label/floating/FloatingLabel.d.ts +0 -12
- package/dist/select/toggle/label/floating/styled.d.ts +0 -8
- package/dist/select/toggle/label/single/SingleLabel.d.ts +0 -18
- package/dist/select/toggle/label/single/styled.d.ts +0 -2
- package/dist/select/toggle/styled.d.ts +0 -24
- package/dist/stories/ButtonIcon.d.ts +0 -2
package/ACCESSIBILITY.md
ADDED
|
@@ -0,0 +1,517 @@
|
|
|
1
|
+
# Accessibility (Erişilebilirlik)
|
|
2
|
+
|
|
3
|
+
ITD Design System, **WCAG 2.1 AA** standartlarına uygun olarak geliştirilmiştir.
|
|
4
|
+
|
|
5
|
+
## 📋 İçindekiler
|
|
6
|
+
|
|
7
|
+
- [Form Elementleri](#form-elementleri)
|
|
8
|
+
- [Keyboard Navigation](#keyboard-navigation)
|
|
9
|
+
- [Screen Reader Desteği](#screen-reader-desteği)
|
|
10
|
+
- [Focus Management](#focus-management)
|
|
11
|
+
- [Color Contrast](#color-contrast)
|
|
12
|
+
- [Motion & Animation](#motion--animation)
|
|
13
|
+
- [Browser Support](#browser-support)
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Form Elementleri
|
|
18
|
+
|
|
19
|
+
Tüm ITD form bileşenleri aşağıdaki WCAG standartlarını karşılar:
|
|
20
|
+
|
|
21
|
+
| Component | HTML Element | ARIA Attributes | Screen Reader | Keyboard | WCAG Level |
|
|
22
|
+
|-----------|--------------|-----------------|---------------|----------|------------|
|
|
23
|
+
| Input | `<input>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
24
|
+
| Textarea | `<textarea>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
25
|
+
| Checkbox | `<input>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
26
|
+
| Switch | `<button>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
27
|
+
| Select | `<input>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
28
|
+
| Upload | `<input>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
29
|
+
| Radio | `<input>` | ✅ Full | ✅ Full | ✅ Full | AA |
|
|
30
|
+
|
|
31
|
+
### ARIA Attributes
|
|
32
|
+
|
|
33
|
+
Her form elementi uygun ARIA attribute'larını içerir:
|
|
34
|
+
|
|
35
|
+
**Genel (tüm form elementleri):**
|
|
36
|
+
```tsx
|
|
37
|
+
<input
|
|
38
|
+
id="input-123"
|
|
39
|
+
aria-invalid="true" // Error varsa
|
|
40
|
+
aria-describedby="input-123__error" // Error mesajına bağlantı
|
|
41
|
+
/>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Select (Combobox pattern):**
|
|
45
|
+
```tsx
|
|
46
|
+
<input
|
|
47
|
+
role="combobox" // Combo box elementi
|
|
48
|
+
aria-controls="select-123-listbox" // Kontrol ettiği listbox
|
|
49
|
+
aria-expanded={isOpen} // Açık/kapalı durumu
|
|
50
|
+
aria-haspopup="listbox" // Popup tipi
|
|
51
|
+
aria-autocomplete="list" // Autocomplete davranışı
|
|
52
|
+
aria-activedescendant="select-123-option-2" // Aktif option
|
|
53
|
+
aria-invalid="true" // Error durumu
|
|
54
|
+
aria-describedby="select-123__error" // Error mesajı
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<div
|
|
58
|
+
id="select-123-listbox" // ← aria-controls buraya bağlı
|
|
59
|
+
role="listbox" // Listbox elementi
|
|
60
|
+
aria-multiselectable="true" // Multi select mi
|
|
61
|
+
>
|
|
62
|
+
<div
|
|
63
|
+
id="select-123-option-2" // ← aria-activedescendant buraya bağlı
|
|
64
|
+
role="option" // Option elementi
|
|
65
|
+
aria-selected="true" // Seçili mi
|
|
66
|
+
aria-disabled="false" // Disabled mi
|
|
67
|
+
>
|
|
68
|
+
Seçenek 3
|
|
69
|
+
</div>
|
|
70
|
+
</div>
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Screen Reader deneyimi:**
|
|
74
|
+
1. Tab → "Combo box, collapsed, type to filter"
|
|
75
|
+
2. Enter → "Expanded, listbox with 5 options"
|
|
76
|
+
3. Arrow Down → "Seçenek 1, option 1 of 5"
|
|
77
|
+
4. Arrow Down → "Seçenek 2, option 2 of 5"
|
|
78
|
+
5. Enter → "Seçenek 2 selected, collapsed"
|
|
79
|
+
|
|
80
|
+
### Error Announcement Pattern
|
|
81
|
+
|
|
82
|
+
ITD, WCAG'ın önerdiği **dual announcement** pattern'ini kullanır:
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
// 1. Visual Tooltip (görsel kullanıcılar için)
|
|
86
|
+
<ErrorTooltip aria-hidden="true">
|
|
87
|
+
{errorMessage}
|
|
88
|
+
</ErrorTooltip>
|
|
89
|
+
|
|
90
|
+
// 2. Hidden Announcement (screen reader kullanıcıları için)
|
|
91
|
+
<p
|
|
92
|
+
id="input-123__error"
|
|
93
|
+
role="alert"
|
|
94
|
+
aria-live="assertive"
|
|
95
|
+
className="sr-only"
|
|
96
|
+
>
|
|
97
|
+
{errorMessage}
|
|
98
|
+
</p>
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
**Avantajlar:**
|
|
102
|
+
- 👁️ Görsel kullanıcılar → Hover'da tooltip görür
|
|
103
|
+
- 🔊 Screen reader → Error anında bildirim alır
|
|
104
|
+
- 🎯 Duplicate announcement yok
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## Keyboard Navigation
|
|
109
|
+
|
|
110
|
+
### Genel Klavye Desteği
|
|
111
|
+
|
|
112
|
+
| Tuş | Davranış |
|
|
113
|
+
|-----|----------|
|
|
114
|
+
| `Tab` | Sonraki focusable elemente git |
|
|
115
|
+
| `Shift + Tab` | Önceki focusable elemente git |
|
|
116
|
+
| `Enter` | Button/Link aktive et, Form submit |
|
|
117
|
+
| `Space` | Button/Checkbox/Switch aktive et |
|
|
118
|
+
| `Escape` | Modal/Dropdown kapat |
|
|
119
|
+
| `Arrow Keys` | Select/DatePicker navigasyonu |
|
|
120
|
+
|
|
121
|
+
### Component-Specific
|
|
122
|
+
|
|
123
|
+
**Select:**
|
|
124
|
+
- `Arrow Down/Up` → Dropdown açar/seçenekler arası geçiş
|
|
125
|
+
- `Enter` → Seçim yapar, dropdown kapatır
|
|
126
|
+
- `Escape` → Dropdown kapatır
|
|
127
|
+
- `Home/End` → İlk/son seçeneğe gider
|
|
128
|
+
- `Type to search` → showSearch aktifse yazarak filtreler
|
|
129
|
+
|
|
130
|
+
**Select ARIA Pattern (WAI-ARIA Combobox):**
|
|
131
|
+
|
|
132
|
+
ITD Select, [WAI-ARIA Combobox pattern](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/) uyumludur:
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
// Input (Combobox)
|
|
136
|
+
<input
|
|
137
|
+
role="combobox" // Combo box elementi
|
|
138
|
+
aria-controls="select-id-listbox" // Kontrol ettiği listbox ID'si
|
|
139
|
+
aria-expanded="true" // Açık mı kapalı mı
|
|
140
|
+
aria-haspopup="listbox" // Ne tür popup açılıyor
|
|
141
|
+
aria-autocomplete="list" // Filtreleme davranışı
|
|
142
|
+
aria-activedescendant="select-id-option-2" // Klavyede hangi option aktif
|
|
143
|
+
/>
|
|
144
|
+
|
|
145
|
+
// Dropdown (Listbox)
|
|
146
|
+
<div
|
|
147
|
+
id="select-id-listbox" // Input'tan referans ediliyor
|
|
148
|
+
role="listbox" // Listbox elementi
|
|
149
|
+
aria-multiselectable="true" // Multi-select desteği
|
|
150
|
+
>
|
|
151
|
+
// Options
|
|
152
|
+
<div
|
|
153
|
+
id="select-id-option-2" // aria-activedescendant buraya işaret edebilir
|
|
154
|
+
role="option" // Option elementi
|
|
155
|
+
aria-selected="true" // Seçili mi
|
|
156
|
+
aria-disabled="false" // Disabled mi
|
|
157
|
+
>
|
|
158
|
+
Seçenek 3
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
**Radix UI Select ile karşılaştırma:**
|
|
164
|
+
|
|
165
|
+
| ARIA Attribute | Radix UI | ITD | Notlar |
|
|
166
|
+
|----------------|----------|-----|--------|
|
|
167
|
+
| `role="combobox"` | ✅ | ✅ | Her ikisi de tam uyumlu |
|
|
168
|
+
| `aria-controls` | ✅ | ✅ | Listbox'a bağlantı |
|
|
169
|
+
| `aria-expanded` | ✅ | ✅ | Açık/kapalı durumu |
|
|
170
|
+
| `aria-haspopup` | ✅ | ✅ | Popup tipi belirtimi |
|
|
171
|
+
| `aria-autocomplete` | ✅ | ✅ | ITD: showSearch prop'una göre |
|
|
172
|
+
| `aria-activedescendant` | ✅ | ✅ | Aktif option tracking |
|
|
173
|
+
| `aria-invalid` | ❌ | ✅ | **ITD avantajı** |
|
|
174
|
+
| `aria-describedby` | ❌ | ✅ | **ITD avantajı** |
|
|
175
|
+
| Error announcement | ❌ | ✅ | **ITD avantajı** |
|
|
176
|
+
|
|
177
|
+
**Sonuç:** ITD Select, Radix UI ile aynı seviyede ARIA desteği sağlar, hatta error handling konusunda daha kapsamlıdır.
|
|
178
|
+
|
|
179
|
+
**DatePicker:**
|
|
180
|
+
- `Arrow Keys` → Tarih navigasyonu
|
|
181
|
+
- `Home/End` → Ay başı/sonu
|
|
182
|
+
- `Page Up/Down` → Önceki/sonraki ay
|
|
183
|
+
- `Enter` → Tarih seçer
|
|
184
|
+
|
|
185
|
+
**Modal:**
|
|
186
|
+
- `Escape` → Modal kapatır
|
|
187
|
+
- `Tab` → Modal içinde focus trap (dışarı çıkmaz)
|
|
188
|
+
|
|
189
|
+
### Safari Özel Düzeltmeleri
|
|
190
|
+
|
|
191
|
+
Safari'de keyboard navigation için özel düzeltmeler uygulanmıştır:
|
|
192
|
+
|
|
193
|
+
```tsx
|
|
194
|
+
// Button, Checkbox, Switch
|
|
195
|
+
tabIndex={disabled ? -1 : 0}
|
|
196
|
+
user-select: none
|
|
197
|
+
pointer-events: none // Child elementlerde
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
## Screen Reader Desteği
|
|
203
|
+
|
|
204
|
+
### Desteklenen Screen Reader'lar
|
|
205
|
+
|
|
206
|
+
- ✅ **NVDA** (Windows)
|
|
207
|
+
- ✅ **JAWS** (Windows)
|
|
208
|
+
- ✅ **VoiceOver** (macOS, iOS)
|
|
209
|
+
- ✅ **TalkBack** (Android)
|
|
210
|
+
- ✅ **Narrator** (Windows)
|
|
211
|
+
|
|
212
|
+
### ARIA Roles
|
|
213
|
+
|
|
214
|
+
| Component | Role | States & Properties |
|
|
215
|
+
|-----------|------|---------------------|
|
|
216
|
+
| Button | `button` | `aria-disabled`, `aria-pressed` (toggle) |
|
|
217
|
+
| Checkbox | `checkbox` | `aria-checked`, `aria-invalid`, `aria-describedby` |
|
|
218
|
+
| Switch | `switch` | `aria-checked`, `aria-invalid`, `aria-describedby` |
|
|
219
|
+
| Radio | `radio` | `aria-checked`, `aria-invalid` |
|
|
220
|
+
| Select (Input) | `combobox` | `aria-controls`, `aria-expanded`, `aria-haspopup`, `aria-autocomplete`, `aria-activedescendant`, `aria-invalid`, `aria-describedby` |
|
|
221
|
+
| Select (Dropdown) | `listbox` | `aria-multiselectable` |
|
|
222
|
+
| Select (Option) | `option` | `aria-selected`, `aria-disabled` |
|
|
223
|
+
| Modal | `dialog` | `aria-modal`, `aria-labelledby`, `aria-describedby` |
|
|
224
|
+
| Alert | `alert` | `aria-live` (implicit) |
|
|
225
|
+
|
|
226
|
+
### Live Regions
|
|
227
|
+
|
|
228
|
+
Error mesajları `role="alert"` ve `aria-live="assertive"` ile anında duyurulur:
|
|
229
|
+
|
|
230
|
+
```tsx
|
|
231
|
+
<p role="alert" aria-live="assertive">
|
|
232
|
+
{errorMessage}
|
|
233
|
+
</p>
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Focus Management
|
|
239
|
+
|
|
240
|
+
### Focus Visible Strategy
|
|
241
|
+
|
|
242
|
+
ITD, **mouse** ve **keyboard** focus'unu ayırır:
|
|
243
|
+
|
|
244
|
+
```css
|
|
245
|
+
/* Mouse tıklamalarında outline gizli */
|
|
246
|
+
:focus {
|
|
247
|
+
outline: none;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/* Klavye navigasyonunda outline görünür */
|
|
251
|
+
:focus-visible {
|
|
252
|
+
outline: 2px solid var(--itd-ring);
|
|
253
|
+
outline-offset: 2px;
|
|
254
|
+
}
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
### Focus Ring Colors
|
|
258
|
+
|
|
259
|
+
```css
|
|
260
|
+
--itd-ring: oklch(0.62 0.18 250); /* Light tema */
|
|
261
|
+
--itd-ring: oklch(0.72 0.20 250); /* Dark tema */
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Skip Link
|
|
265
|
+
|
|
266
|
+
Klavye kullanıcıları için ana içeriğe atlama linki:
|
|
267
|
+
|
|
268
|
+
```tsx
|
|
269
|
+
<a href="#main-content" className="skip-link">
|
|
270
|
+
Ana içeriğe atla
|
|
271
|
+
</a>
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
```css
|
|
275
|
+
.skip-link {
|
|
276
|
+
position: absolute;
|
|
277
|
+
transform: translateY(-150%);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.skip-link:focus {
|
|
281
|
+
transform: translateY(0);
|
|
282
|
+
outline: 2px solid var(--itd-ring);
|
|
283
|
+
}
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
---
|
|
287
|
+
|
|
288
|
+
## Color Contrast
|
|
289
|
+
|
|
290
|
+
### WCAG AA Standartları
|
|
291
|
+
|
|
292
|
+
- **Normal text:** Minimum 4.5:1 kontrast oranı
|
|
293
|
+
- **Large text (18px+):** Minimum 3:1 kontrast oranı
|
|
294
|
+
- **UI Components:** Minimum 3:1 kontrast oranı
|
|
295
|
+
|
|
296
|
+
### ITD Renk Sistemi
|
|
297
|
+
|
|
298
|
+
```css
|
|
299
|
+
/* Light Theme */
|
|
300
|
+
--itd-text: oklch(0.35 0.02 250); /* Kontrast: 11:1 */
|
|
301
|
+
--itd-text-muted: oklch(0.55 0.02 250); /* Kontrast: 5.5:1 */
|
|
302
|
+
--itd-border: oklch(0.85 0.01 250); /* Kontrast: 2.8:1 */
|
|
303
|
+
|
|
304
|
+
/* Dark Theme */
|
|
305
|
+
--itd-text: oklch(0.85 0.02 250); /* Kontrast: 10:1 */
|
|
306
|
+
--itd-text-muted: oklch(0.65 0.02 250); /* Kontrast: 6:1 */
|
|
307
|
+
--itd-border: oklch(0.30 0.01 250); /* Kontrast: 3.5:1 */
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
### High Contrast Mode
|
|
311
|
+
|
|
312
|
+
Windows High Contrast mode için özel destek:
|
|
313
|
+
|
|
314
|
+
```css
|
|
315
|
+
@media (forced-colors: active) {
|
|
316
|
+
::selection {
|
|
317
|
+
forced-color-adjust: none;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
:focus {
|
|
321
|
+
outline: 1px solid CanvasText;
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
@media (prefers-contrast: more) {
|
|
326
|
+
:focus-visible {
|
|
327
|
+
outline-width: 3px;
|
|
328
|
+
}
|
|
329
|
+
}
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
---
|
|
333
|
+
|
|
334
|
+
## Motion & Animation
|
|
335
|
+
|
|
336
|
+
### Reduced Motion Support
|
|
337
|
+
|
|
338
|
+
Kullanıcının hareket tercihine saygı gösterilir:
|
|
339
|
+
|
|
340
|
+
```css
|
|
341
|
+
@media (prefers-reduced-motion: reduce) {
|
|
342
|
+
.modal-enter-active,
|
|
343
|
+
.modal-exit-active,
|
|
344
|
+
.itd-select-dropdown-transition-enter-active,
|
|
345
|
+
.itd-select-dropdown-transition-exit-active,
|
|
346
|
+
.datepicker-modal-enter-active,
|
|
347
|
+
.datepicker-modal-exit-active {
|
|
348
|
+
transition: none;
|
|
349
|
+
animation: none;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
### Smooth Scrolling
|
|
355
|
+
|
|
356
|
+
Sadece keyboard navigasyonunda aktif:
|
|
357
|
+
|
|
358
|
+
```css
|
|
359
|
+
html:focus-within {
|
|
360
|
+
scroll-behavior: smooth;
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
@media (prefers-reduced-motion: reduce) {
|
|
364
|
+
html:focus-within {
|
|
365
|
+
scroll-behavior: auto;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
```
|
|
369
|
+
|
|
370
|
+
---
|
|
371
|
+
|
|
372
|
+
## Browser Support
|
|
373
|
+
|
|
374
|
+
### Tam Destek
|
|
375
|
+
|
|
376
|
+
- ✅ Chrome 90+
|
|
377
|
+
- ✅ Firefox 88+
|
|
378
|
+
- ✅ Safari 14+ (keyboard navigation fix'leri dahil)
|
|
379
|
+
- ✅ Edge 90+
|
|
380
|
+
- ✅ Opera 76+
|
|
381
|
+
|
|
382
|
+
### Mobile Browsers
|
|
383
|
+
|
|
384
|
+
- ✅ Safari iOS 14+
|
|
385
|
+
- ✅ Chrome Android 90+
|
|
386
|
+
- ✅ Samsung Internet 14+
|
|
387
|
+
|
|
388
|
+
### Legacy Browser Fallbacks
|
|
389
|
+
|
|
390
|
+
```css
|
|
391
|
+
/* :focus-visible desteklemeyen tarayıcılar için */
|
|
392
|
+
@supports not selector(:focus-visible) {
|
|
393
|
+
:where(:focus) {
|
|
394
|
+
outline: 2px solid currentColor;
|
|
395
|
+
outline-offset: 2px;
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
/* color-mix desteklemeyen tarayıcılar için */
|
|
400
|
+
input::placeholder {
|
|
401
|
+
color: var(--itd-placeholder-color, currentColor);
|
|
402
|
+
opacity: 0.6;
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
@supports (color: color-mix(in oklab, red, red)) {
|
|
406
|
+
input::placeholder {
|
|
407
|
+
color: color-mix(in oklab, currentColor 55%, transparent);
|
|
408
|
+
opacity: 1;
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
---
|
|
414
|
+
|
|
415
|
+
## WCAG 2.1 Checklist
|
|
416
|
+
|
|
417
|
+
### Level A (Tamamlandı)
|
|
418
|
+
|
|
419
|
+
- ✅ **1.1.1** Non-text Content
|
|
420
|
+
- ✅ **1.3.1** Info and Relationships
|
|
421
|
+
- ✅ **2.1.1** Keyboard
|
|
422
|
+
- ✅ **2.1.2** No Keyboard Trap
|
|
423
|
+
- ✅ **2.4.1** Bypass Blocks (skip-link)
|
|
424
|
+
- ✅ **3.3.1** Error Identification
|
|
425
|
+
- ✅ **4.1.2** Name, Role, Value
|
|
426
|
+
|
|
427
|
+
### Level AA (Tamamlandı)
|
|
428
|
+
|
|
429
|
+
- ✅ **1.4.3** Contrast (Minimum) - 4.5:1
|
|
430
|
+
- ✅ **1.4.11** Non-text Contrast - 3:1
|
|
431
|
+
- ✅ **2.4.7** Focus Visible
|
|
432
|
+
- ✅ **4.1.3** Status Messages
|
|
433
|
+
|
|
434
|
+
### Level AAA (Kısmi)
|
|
435
|
+
|
|
436
|
+
- ⚠️ **1.4.6** Contrast (Enhanced) - 7:1 (bazı renklerde)
|
|
437
|
+
- ✅ **2.4.8** Location (breadcrumb pattern)
|
|
438
|
+
- ✅ **2.5.5** Target Size (minimum 44x44px button'lar)
|
|
439
|
+
|
|
440
|
+
---
|
|
441
|
+
|
|
442
|
+
## Test Araçları
|
|
443
|
+
|
|
444
|
+
Accessibility testleri için önerilen araçlar:
|
|
445
|
+
|
|
446
|
+
### Otomatik Test Araçları
|
|
447
|
+
|
|
448
|
+
- **axe DevTools** - Chrome/Firefox extension
|
|
449
|
+
- **Lighthouse** - Chrome DevTools (Accessibility audit)
|
|
450
|
+
- **WAVE** - Web accessibility evaluation tool
|
|
451
|
+
- **pa11y** - CLI automation tool
|
|
452
|
+
|
|
453
|
+
### Manuel Test
|
|
454
|
+
|
|
455
|
+
```bash
|
|
456
|
+
# Keyboard navigasyon testi
|
|
457
|
+
# 1. Tab ile tüm form elementlerine ulaşılabilir mi?
|
|
458
|
+
# 2. Focus ring görünür mü?
|
|
459
|
+
# 3. Space/Enter ile aktive edilebiliyor mu?
|
|
460
|
+
|
|
461
|
+
# Screen reader testi (macOS)
|
|
462
|
+
# VoiceOver açık, tab ile gezin
|
|
463
|
+
Cmd + F5
|
|
464
|
+
|
|
465
|
+
# Screen reader testi (Windows)
|
|
466
|
+
# NVDA açık, tab ile gezin
|
|
467
|
+
```
|
|
468
|
+
|
|
469
|
+
### Otomatik Test Scripti
|
|
470
|
+
|
|
471
|
+
```tsx
|
|
472
|
+
import { render } from '@testing-library/react'
|
|
473
|
+
import { axe, toHaveNoViolations } from 'jest-axe'
|
|
474
|
+
|
|
475
|
+
expect.extend(toHaveNoViolations)
|
|
476
|
+
|
|
477
|
+
it('should not have accessibility violations', async () => {
|
|
478
|
+
const { container } = render(<YourComponent />)
|
|
479
|
+
const results = await axe(container)
|
|
480
|
+
expect(results).toHaveNoViolations()
|
|
481
|
+
})
|
|
482
|
+
```
|
|
483
|
+
|
|
484
|
+
---
|
|
485
|
+
|
|
486
|
+
## Katkıda Bulunma
|
|
487
|
+
|
|
488
|
+
Accessibility sorunları bulursanız:
|
|
489
|
+
|
|
490
|
+
1. GitHub Issues'da "accessibility" etiketi ile bildirin
|
|
491
|
+
2. WCAG kriteri ve seviyesini belirtin (örn: WCAG 2.1 AA - 1.4.3)
|
|
492
|
+
3. Hangi tarayıcı/screen reader'da sorun olduğunu belirtin
|
|
493
|
+
|
|
494
|
+
---
|
|
495
|
+
|
|
496
|
+
## Kaynaklar
|
|
497
|
+
|
|
498
|
+
- [WCAG 2.1 Guidelines](https://www.w3.org/WAI/WCAG21/quickref/)
|
|
499
|
+
- [ARIA Authoring Practices](https://www.w3.org/WAI/ARIA/apg/)
|
|
500
|
+
- [MDN Accessibility](https://developer.mozilla.org/en-US/docs/Web/Accessibility)
|
|
501
|
+
- [WebAIM](https://webaim.org/)
|
|
502
|
+
|
|
503
|
+
---
|
|
504
|
+
|
|
505
|
+
## Lisans
|
|
506
|
+
|
|
507
|
+
ITD Design System - Accessibility features are part of the core library.
|
|
508
|
+
|
|
509
|
+
**Standartlar:**
|
|
510
|
+
- WCAG 2.1 (W3C)
|
|
511
|
+
- ARIA 1.2 (W3C)
|
|
512
|
+
- Section 508 (US Federal)
|
|
513
|
+
|
|
514
|
+
---
|
|
515
|
+
|
|
516
|
+
_Son güncelleme: Kasım 2024_
|
|
517
|
+
|
package/README.md
CHANGED
|
@@ -1,20 +1,97 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ITD Design System
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
> Modern, accessible, and composable React component library
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
[](https://www.npmjs.com/package/@inntechcorp/it-design)
|
|
6
|
+
[](http://www.apache.org/licenses/LICENSE-2.0)
|
|
7
|
+
[](https://www.w3.org/WAI/WCAG21/quickref/)
|
|
8
|
+
|
|
9
|
+
**ITD Design System** - Inn.Tech websites için geliştirilmiş, production-ready UI component library.
|
|
10
|
+
|
|
11
|
+
## ✨ Features
|
|
12
|
+
|
|
13
|
+
- 🎨 **Modern Design** - OKLCH color space, smooth transitions
|
|
14
|
+
- ♿ **Accessibility First** - WCAG 2.1 AA compliant, WAI-ARIA Combobox pattern
|
|
15
|
+
- 🔊 **Screen Reader** - Full NVDA, JAWS, VoiceOver support
|
|
16
|
+
- ⌨️ **Keyboard Navigation** - Safari compatible, focus management
|
|
17
|
+
- 🎯 **TypeScript** - Full type safety
|
|
18
|
+
- 🌙 **Dark Mode** - Built-in theme support with `prefers-color-scheme`
|
|
19
|
+
- 📦 **Modular CSS** - Import only what you need (reset, base, components, utilities)
|
|
20
|
+
- 🚀 **Performance** - Optimized bundles, tree-shakeable, Lighthouse 100
|
|
21
|
+
- 🌍 **i18n Ready** - TR/EN locales included
|
|
22
|
+
|
|
23
|
+
## 🎯 Highlights
|
|
24
|
+
|
|
25
|
+
- **WAI-ARIA Combobox Pattern** - Industry-standard Select implementation
|
|
26
|
+
- **Radix UI Level Accessibility** - Comparable ARIA support with enhanced error handling
|
|
27
|
+
- **Safari Keyboard Navigation** - Special fixes for Safari tab navigation
|
|
28
|
+
- **Dual Error Announcement** - Visual tooltip + screen reader live region
|
|
29
|
+
- **Focus Management** - Mouse vs keyboard detection, `:focus-visible` strategy
|
|
30
|
+
- **Forced Colors Mode** - Windows High Contrast support
|
|
31
|
+
- **Reduced Motion** - Respects `prefers-reduced-motion` preference
|
|
32
|
+
|
|
33
|
+
## 📚 Documentation
|
|
34
|
+
|
|
35
|
+
- [Accessibility Guide](./ACCESSIBILITY.md) - WCAG compliance, keyboard navigation, screen reader support
|
|
36
|
+
- [CSS Guide](./lib/GLOBAL-CSS-README.md) - Modular CSS, design tokens, utilities
|
|
37
|
+
- [Storybook](http://localhost:6006) - Component playground (run `yarn storybook`)
|
|
38
|
+
|
|
39
|
+
## 📦 Installation
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# npm
|
|
43
|
+
npm install @inntechcorp/it-design styled-components
|
|
7
44
|
|
|
8
|
-
|
|
45
|
+
# yarn
|
|
46
|
+
yarn add @inntechcorp/it-design styled-components
|
|
9
47
|
|
|
10
|
-
|
|
48
|
+
# pnpm
|
|
49
|
+
pnpm add @inntechcorp/it-design styled-components
|
|
50
|
+
```
|
|
11
51
|
|
|
12
|
-
|
|
13
|
-
`[!] (plugin styles) Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize({ 'lib/mappings.wasm': ... }) before using SourceMapConsumer`
|
|
14
|
-
`lib/multiselect/style.module.scss`
|
|
52
|
+
## 🚀 Quick Start
|
|
15
53
|
|
|
16
|
-
|
|
17
|
-
|
|
54
|
+
```tsx
|
|
55
|
+
import { ITDProvider, Button, Input, Card } from '@inntechcorp/it-design'
|
|
56
|
+
import '@inntechcorp/it-design/dist/global.css'
|
|
57
|
+
|
|
58
|
+
function App() {
|
|
59
|
+
return (
|
|
60
|
+
<ITDProvider theme="light" language="tr">
|
|
61
|
+
<Card>
|
|
62
|
+
<Input placeholder="Enter text..." />
|
|
63
|
+
<Button variant="filled">Submit</Button>
|
|
64
|
+
</Card>
|
|
65
|
+
</ITDProvider>
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
## 🎨 Modular CSS
|
|
71
|
+
|
|
72
|
+
Import only what you need:
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
// Option 1: Full package (recommended)
|
|
76
|
+
import '@inntechcorp/it-design/dist/global.css'
|
|
77
|
+
|
|
78
|
+
// Option 2: Modular (for Tailwind users)
|
|
79
|
+
import '@inntechcorp/it-design/css/properties.css'
|
|
80
|
+
import '@inntechcorp/it-design/css/reset.css'
|
|
81
|
+
import '@inntechcorp/it-design/css/base.css'
|
|
82
|
+
import '@inntechcorp/it-design/css/components.css'
|
|
83
|
+
// Skip utilities.css if using Tailwind
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## 🧩 Components
|
|
87
|
+
|
|
88
|
+
- **Layout:** Card, Flex, Grid
|
|
89
|
+
- **Forms:** Input, Textarea, Select, Checkbox, Radio, Switch, Upload, DatePicker
|
|
90
|
+
- **Feedback:** Alert, Modal, Notification, Spin, Progress
|
|
91
|
+
- **Navigation:** Button, Tabs, BackTop
|
|
92
|
+
- **Data Display:** Table, Status, Result
|
|
93
|
+
|
|
94
|
+
---
|
|
18
95
|
|
|
19
96
|
## Authors ##
|
|
20
97
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FunctionComponent } from 'react';
|
|
2
|
-
import SubMenu from '
|
|
3
|
-
import Item from '
|
|
2
|
+
import { default as SubMenu } from '../submenu/SubMenu';
|
|
3
|
+
import { default as Item } from '../item/Item';
|
|
4
4
|
import { AccordionProps } from '../index';
|
|
5
5
|
type AccordionMenuSubComponents = {
|
|
6
6
|
SubMenu: typeof SubMenu;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
declare const Wrapper: import(
|
|
1
|
+
declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
2
2
|
$itemHeight: number;
|
|
3
3
|
$isActive: boolean;
|
|
4
4
|
}>> & string;
|
|
5
|
-
declare const Arrow: import(
|
|
5
|
+
declare const Arrow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
6
6
|
export { Wrapper, Arrow };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
declare const Wrapper: import(
|
|
2
|
-
declare const Icon: import(
|
|
1
|
+
declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
declare const Icon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
3
3
|
$size: number;
|
|
4
4
|
}>> & string;
|
|
5
|
-
declare const Content: import(
|
|
6
|
-
declare const Arrow: import(
|
|
5
|
+
declare const Content: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLUListElement>, HTMLUListElement>, never>> & string;
|
|
6
|
+
declare const Arrow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
7
7
|
$width?: number;
|
|
8
8
|
$height?: number;
|
|
9
9
|
$isSingle?: boolean;
|
|
10
10
|
$isOpen?: boolean;
|
|
11
11
|
}>> & string;
|
|
12
|
-
declare const Title: import(
|
|
12
|
+
declare const Title: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Substitute<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
|
|
13
13
|
$height: number;
|
|
14
14
|
}>> & string;
|
|
15
15
|
export { Wrapper, Title, Icon, Content, Arrow };
|