@chotot/clad-ui 2.0.0-next.4 → 2.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/README.md +7 -9
- package/dist/components/Announcer/Announcer.stories.d.ts.map +1 -1
- package/dist/components/Announcer/Announcer.stories.js +1 -26
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.d.ts.map +1 -1
- package/dist/components/Badge/Badge.js +34 -24
- package/dist/components/Badge/Badge.stories.d.ts.map +1 -1
- package/dist/components/Badge/Badge.stories.js +61 -54
- package/dist/components/Badge/Badge.styles.d.ts +1 -0
- package/dist/components/Badge/Badge.styles.d.ts.map +1 -1
- package/dist/components/Badge/Badge.styles.js +17 -8
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts +6 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -0
- package/dist/components/Breadcrumbs/BreadcrumbItem.js +11 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.js +7 -25
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -11
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.d.ts.map +1 -1
- package/dist/components/Breadcrumbs/Breadcrumbs.stories.js +47 -96
- package/dist/components/Button/Button.d.ts +8 -17
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Button/Button.js +5 -3
- package/dist/components/Button/Button.stories.d.ts +78 -4
- package/dist/components/Button/Button.stories.d.ts.map +1 -1
- package/dist/components/Button/Button.stories.js +105 -11
- package/dist/components/Button/Button.styles.d.ts.map +1 -1
- package/dist/components/Button/Button.styles.js +30 -11
- package/dist/components/Button/GhostButton.d.ts +6 -26
- package/dist/components/Button/GhostButton.d.ts.map +1 -1
- package/dist/components/Button/GhostButton.js +4 -4
- package/dist/components/Button/GhostButton.stories.d.ts +80 -2
- package/dist/components/Button/GhostButton.stories.d.ts.map +1 -1
- package/dist/components/Button/GhostButton.stories.js +80 -7
- package/dist/components/Button/GhostButton.styles.d.ts.map +1 -1
- package/dist/components/Button/GhostButton.styles.js +17 -1
- package/dist/components/Button/IconButton.d.ts +1 -2
- package/dist/components/Button/IconButton.d.ts.map +1 -1
- package/dist/components/Button/IconButton.js +2 -7
- package/dist/components/Button/IconButton.stories.d.ts +75 -3
- package/dist/components/Button/IconButton.stories.d.ts.map +1 -1
- package/dist/components/Button/IconButton.stories.js +74 -7
- package/dist/components/Button/constant.d.ts +10 -0
- package/dist/components/Button/constant.d.ts.map +1 -0
- package/dist/components/Button/constant.js +21 -0
- package/dist/components/Checkbox/Checkbox.stories.d.ts +0 -10
- package/dist/components/Checkbox/Checkbox.stories.d.ts.map +1 -1
- package/dist/components/Checkbox/Checkbox.stories.js +1 -34
- package/dist/components/Chip/Chip.stories.js +1 -1
- package/dist/components/CurrencyInput/CurrencyInput.stories.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +4 -0
- package/dist/components/DatePicker/DatePicker.d.ts.map +1 -1
- package/dist/components/DatePicker/DatePicker.js +4 -1
- package/dist/components/DatePicker/DatePicker.stories.d.ts +1 -0
- package/dist/components/DatePicker/DatePicker.stories.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.js +5 -0
- package/dist/components/Dropdown/Dropdown.styles.d.ts.map +1 -1
- package/dist/components/Dropdown/Dropdown.styles.js +27 -3
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.d.ts.map +1 -1
- package/dist/components/Input/Input.js +17 -15
- package/dist/components/Input/Input.stories.js +1 -1
- package/dist/components/Pagination/PageItem.d.ts +6 -11
- package/dist/components/Pagination/PageItem.d.ts.map +1 -1
- package/dist/components/Pagination/PageItem.js +11 -5
- package/dist/components/Pagination/Pagination.stories.d.ts +0 -3
- package/dist/components/Pagination/Pagination.stories.d.ts.map +1 -1
- package/dist/components/Pagination/Pagination.stories.js +5 -15
- package/dist/components/Popover/Popover.stories.d.ts.map +1 -1
- package/dist/components/Popover/Popover.stories.js +1 -0
- package/dist/components/RadioButton/RadioButton.stories.d.ts +0 -10
- package/dist/components/RadioButton/RadioButton.stories.d.ts.map +1 -1
- package/dist/components/RadioButton/RadioButton.stories.js +1 -38
- package/dist/components/RowItem/RowItem.d.ts.map +1 -1
- package/dist/components/RowItem/RowItem.js +3 -6
- package/dist/components/RowItem/RowItem.stories.d.ts.map +1 -1
- package/dist/components/RowItem/RowItem.stories.js +1 -2
- package/dist/components/Slider/Slider.stories.js +1 -1
- package/dist/components/Snack/Snack.stories.js +1 -1
- package/dist/components/Tabs/Tab.d.ts +7 -14
- package/dist/components/Tabs/Tab.d.ts.map +1 -1
- package/dist/components/Tabs/Tab.js +6 -9
- package/dist/components/Tabs/Tabs.stories.d.ts +3 -3
- package/dist/components/Tabs/Tabs.stories.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.stories.js +32 -10
- package/dist/components/Tabs/Tabs.styles.js +1 -1
- package/dist/components/TextArea/TextArea.d.ts +1 -1
- package/dist/components/TextArea/TextArea.stories.js +1 -1
- package/dist/components/TextLabel/TextLabel.stories.js +1 -1
- package/dist/components/ToggleSwitch/ToggleSwitch.stories.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -1
- package/dist/components/Tooltip/Tooltip.stories.d.ts.map +1 -1
- package/dist/components/Tooltip/Tooltip.stories.js +1 -30
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/patterns/Drawer/Drawer.d.ts +1 -0
- package/dist/patterns/Drawer/Drawer.d.ts.map +1 -1
- package/dist/patterns/Drawer/Drawer.js +7 -16
- package/dist/patterns/Drawer/Drawer.stories.d.ts +6 -0
- package/dist/patterns/Drawer/Drawer.stories.d.ts.map +1 -1
- package/dist/patterns/Drawer/Drawer.stories.js +23 -24
- package/dist/patterns/Drawer/Drawer.styles.d.ts +1 -2
- package/dist/patterns/Drawer/Drawer.styles.d.ts.map +1 -1
- package/dist/patterns/Drawer/Drawer.styles.js +1 -6
- package/dist/patterns/EmptyState/EmptyState.d.ts +1 -1
- package/dist/patterns/EmptyState/EmptyState.d.ts.map +1 -1
- package/dist/patterns/EmptyState/EmptyState.js +52 -47
- package/dist/patterns/EmptyState/EmptyState.stories.d.ts +11 -1
- package/dist/patterns/EmptyState/EmptyState.stories.d.ts.map +1 -1
- package/dist/patterns/EmptyState/EmptyState.stories.js +51 -12
- package/dist/patterns/EmptyState/EmptyState.styles.d.ts +3 -15
- package/dist/patterns/EmptyState/EmptyState.styles.d.ts.map +1 -1
- package/dist/patterns/EmptyState/EmptyState.styles.js +23 -40
- package/dist/patterns/InputGroup/InputGroup.d.ts +1 -1
- package/dist/patterns/InputGroup/InputGroup.styles.d.ts.map +1 -1
- package/dist/patterns/InputGroup/InputGroup.styles.js +3 -2
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts +1 -1
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.d.ts.map +1 -1
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.js +4 -0
- package/dist/patterns/MultiSearchDropdown/MultiSearchDropdown.stories.js +1 -1
- package/dist/patterns/Popup/Popup.d.ts +1 -0
- package/dist/patterns/Popup/Popup.d.ts.map +1 -1
- package/dist/patterns/Popup/Popup.js +6 -15
- package/dist/patterns/Popup/Popup.stories.d.ts +6 -0
- package/dist/patterns/Popup/Popup.stories.d.ts.map +1 -1
- package/dist/patterns/Popup/Popup.stories.js +29 -30
- package/dist/patterns/Popup/Popup.styles.d.ts +1 -2
- package/dist/patterns/Popup/Popup.styles.d.ts.map +1 -1
- package/dist/patterns/Popup/Popup.styles.js +1 -6
- package/dist/patterns/RangeInput/RangeInput.d.ts +30 -0
- package/dist/patterns/RangeInput/RangeInput.d.ts.map +1 -0
- package/dist/patterns/RangeInput/RangeInput.js +27 -0
- package/dist/patterns/RangeInput/RangeInput.stories.d.ts +68 -0
- package/dist/patterns/RangeInput/RangeInput.stories.d.ts.map +1 -0
- package/dist/patterns/RangeInput/RangeInput.stories.js +121 -0
- package/dist/patterns/RangeInput/RangeInput.styles.d.ts +5 -0
- package/dist/patterns/RangeInput/RangeInput.styles.d.ts.map +1 -0
- package/dist/patterns/RangeInput/RangeInput.styles.js +32 -0
- package/dist/patterns/SearchInput/SearchInput.d.ts +1 -1
- package/dist/patterns/SearchInput/SearchInput.d.ts.map +1 -1
- package/dist/patterns/SearchInput/SearchInput.js +7 -8
- package/dist/patterns/SearchInput/SearchInput.stories.d.ts.map +1 -1
- package/dist/patterns/SearchInput/SearchInput.stories.js +1 -3
- package/dist/patterns/Searchbar/Searchbar.d.ts +28 -0
- package/dist/patterns/Searchbar/Searchbar.d.ts.map +1 -0
- package/dist/patterns/Searchbar/Searchbar.js +37 -0
- package/dist/patterns/Searchbar/Searchbar.stories.d.ts +70 -0
- package/dist/patterns/Searchbar/Searchbar.stories.d.ts.map +1 -0
- package/dist/patterns/Searchbar/Searchbar.stories.js +80 -0
- package/dist/patterns/Searchbar/Searchbar.styles.d.ts +3 -0
- package/dist/patterns/Searchbar/Searchbar.styles.d.ts.map +1 -0
- package/dist/patterns/Searchbar/Searchbar.styles.js +48 -0
- package/dist/patterns/TagCloud/TagCloud.d.ts +1 -1
- package/dist/patterns/TagCloud/TagCloud.stories.d.ts.map +1 -1
- package/dist/patterns/TagCloud/TagCloud.stories.js +1 -5
- package/dist/patterns/index.d.ts +4 -0
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +2 -0
- package/dist/storybook/ColorFoundationList.js +2 -2
- package/dist/theme/chotot.d.ts +57 -52
- package/dist/theme/chotot.d.ts.map +1 -1
- package/dist/theme/chotot.js +18 -13
- package/dist/theme/ct-job.d.ts +56 -51
- package/dist/theme/ct-job.d.ts.map +1 -1
- package/dist/theme/ct-pty.d.ts +56 -51
- package/dist/theme/ct-pty.d.ts.map +1 -1
- package/dist/theme/ct-veh.d.ts +57 -52
- package/dist/theme/ct-veh.d.ts.map +1 -1
- package/dist/theme/ct-veh.js +1 -1
- package/dist/theme/mudah.js +1 -1
- package/dist/typography/HeaderAnnotation.d.ts +19 -0
- package/dist/typography/HeaderAnnotation.d.ts.map +1 -0
- package/dist/typography/HeaderAnnotation.js +15 -0
- package/dist/typography/index.d.ts +2 -0
- package/dist/typography/index.d.ts.map +1 -1
- package/dist/typography/index.js +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +1 -0
- package/dist/utils/scrollLock/index.d.ts +7 -0
- package/dist/utils/scrollLock/index.d.ts.map +1 -0
- package/dist/utils/scrollLock/index.js +7 -0
- package/dist/utils/scrollLock/scrollLock.styles.d.ts +6 -0
- package/dist/utils/scrollLock/scrollLock.styles.d.ts.map +1 -0
- package/dist/utils/scrollLock/scrollLock.styles.js +9 -0
- package/dist/utils/scrollLock/useBodyScrollLock.d.ts +10 -0
- package/dist/utils/scrollLock/useBodyScrollLock.d.ts.map +1 -0
- package/dist/utils/scrollLock/useBodyScrollLock.js +41 -0
- package/dist/utils/sx.d.ts +8 -8
- package/dist/utils/types.d.ts +23 -0
- package/dist/utils/types.d.ts.map +1 -0
- package/dist/utils/types.js +5 -0
- package/package.json +4 -3
- package/dist/storybook/GuideImage.d.ts +0 -9
- package/dist/storybook/GuideImage.d.ts.map +0 -1
- package/dist/storybook/GuideImage.js +0 -40
package/dist/theme/ct-veh.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export namespace alias {
|
|
2
2
|
let backgroundBrand: "#FFD400";
|
|
3
3
|
let backgroundBrandLight: "#FFF8D6";
|
|
4
|
-
let textBrand: "#
|
|
4
|
+
let textBrand: "#CC8F00";
|
|
5
5
|
let textOnBackground: "#222222";
|
|
6
6
|
let buttonPrimary: "#FFD400";
|
|
7
7
|
let buttonSecondary: "#FFF8D6";
|
|
@@ -28,7 +28,7 @@ declare const vehicleTheme: {
|
|
|
28
28
|
/**
|
|
29
29
|
* Brand text color
|
|
30
30
|
*/
|
|
31
|
-
textBrand: "#
|
|
31
|
+
textBrand: "#CC8F00";
|
|
32
32
|
/**
|
|
33
33
|
* Primary button solid background color
|
|
34
34
|
*/
|
|
@@ -325,13 +325,13 @@ declare const vehicleTheme: {
|
|
|
325
325
|
0: "576px";
|
|
326
326
|
1: "768px";
|
|
327
327
|
2: "992px";
|
|
328
|
-
3: "
|
|
329
|
-
4: "
|
|
328
|
+
3: "1280px";
|
|
329
|
+
4: "1440px";
|
|
330
330
|
sm: "576px";
|
|
331
331
|
md: "768px";
|
|
332
332
|
lg: "992px";
|
|
333
|
-
xl: "
|
|
334
|
-
xxl: "
|
|
333
|
+
xl: "1280px";
|
|
334
|
+
xxl: "1440px";
|
|
335
335
|
};
|
|
336
336
|
durations: {
|
|
337
337
|
none: 0;
|
|
@@ -410,15 +410,15 @@ declare const vehicleTheme: {
|
|
|
410
410
|
desktop: `screen and (min-width: {breakpoints.lg})` | string;
|
|
411
411
|
};
|
|
412
412
|
radii: {
|
|
413
|
-
none:
|
|
414
|
-
xs:
|
|
415
|
-
sm:
|
|
416
|
-
$sm:
|
|
417
|
-
md:
|
|
418
|
-
lg:
|
|
419
|
-
xl:
|
|
420
|
-
pill:
|
|
421
|
-
circle:
|
|
413
|
+
readonly none: "0";
|
|
414
|
+
readonly xs: "2px";
|
|
415
|
+
readonly sm: "4px";
|
|
416
|
+
readonly $sm: "6px";
|
|
417
|
+
readonly md: "8px";
|
|
418
|
+
readonly lg: "12px";
|
|
419
|
+
readonly xl: "20px";
|
|
420
|
+
readonly pill: "9999px";
|
|
421
|
+
readonly circle: "100%";
|
|
422
422
|
};
|
|
423
423
|
shadows: {
|
|
424
424
|
none: "none";
|
|
@@ -427,45 +427,46 @@ declare const vehicleTheme: {
|
|
|
427
427
|
lg: "2px 2px 14px rgba(0,0,0,.3)";
|
|
428
428
|
};
|
|
429
429
|
sizes: {
|
|
430
|
-
vW:
|
|
431
|
-
vH:
|
|
432
|
-
quarter:
|
|
433
|
-
third:
|
|
434
|
-
half:
|
|
435
|
-
twoThird:
|
|
436
|
-
threeQuarter:
|
|
437
|
-
full:
|
|
438
|
-
xxxs:
|
|
439
|
-
xxs:
|
|
440
|
-
xs:
|
|
441
|
-
sm:
|
|
442
|
-
md:
|
|
443
|
-
lg:
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
$
|
|
452
|
-
$
|
|
453
|
-
$
|
|
430
|
+
readonly vW: "100vw";
|
|
431
|
+
readonly vH: "100vh";
|
|
432
|
+
readonly quarter: "25%";
|
|
433
|
+
readonly third: "33.33%";
|
|
434
|
+
readonly half: "50%";
|
|
435
|
+
readonly twoThird: "66.66%";
|
|
436
|
+
readonly threeQuarter: "75%";
|
|
437
|
+
readonly full: "100%";
|
|
438
|
+
readonly xxxs: "12px";
|
|
439
|
+
readonly xxs: "16px";
|
|
440
|
+
readonly xs: "20px";
|
|
441
|
+
readonly sm: "24px";
|
|
442
|
+
readonly md: "28px";
|
|
443
|
+
readonly lg: "32px";
|
|
444
|
+
readonly lxl: "40px";
|
|
445
|
+
readonly xl: "48px";
|
|
446
|
+
readonly xxl: "64px";
|
|
447
|
+
readonly xxxl: "80px";
|
|
448
|
+
readonly xxxxl: "96px";
|
|
449
|
+
readonly xxxxxl: "128px";
|
|
450
|
+
readonly buttonMaxWidth: "352px";
|
|
451
|
+
readonly $sm: "236px";
|
|
452
|
+
readonly $md: "480px";
|
|
453
|
+
readonly $lg: "636px";
|
|
454
|
+
readonly $xl: "864px";
|
|
454
455
|
};
|
|
455
456
|
space: {
|
|
456
|
-
none:
|
|
457
|
-
xxxs:
|
|
458
|
-
xxs:
|
|
459
|
-
xs:
|
|
460
|
-
sm:
|
|
461
|
-
md:
|
|
462
|
-
mdl:
|
|
463
|
-
lg:
|
|
464
|
-
xl:
|
|
465
|
-
xxl:
|
|
466
|
-
xxxl:
|
|
467
|
-
xxxxl:
|
|
468
|
-
xxxxxl:
|
|
457
|
+
readonly none: "0px";
|
|
458
|
+
readonly xxxs: "2px";
|
|
459
|
+
readonly xxs: "4px";
|
|
460
|
+
readonly xs: "8px";
|
|
461
|
+
readonly sm: "12px";
|
|
462
|
+
readonly md: "16px";
|
|
463
|
+
readonly mdl: "20px";
|
|
464
|
+
readonly lg: "24px";
|
|
465
|
+
readonly xl: "32px";
|
|
466
|
+
readonly xxl: "48px";
|
|
467
|
+
readonly xxxl: "64px";
|
|
468
|
+
readonly xxxxl: "96px";
|
|
469
|
+
readonly xxxxxl: "128px";
|
|
469
470
|
};
|
|
470
471
|
zIndices: {
|
|
471
472
|
initial: "auto";
|
|
@@ -509,6 +510,10 @@ declare const vehicleTheme: {
|
|
|
509
510
|
font: string;
|
|
510
511
|
fontWeight: 600;
|
|
511
512
|
};
|
|
513
|
+
annotation: {
|
|
514
|
+
font: string;
|
|
515
|
+
fontWeight: 600;
|
|
516
|
+
};
|
|
512
517
|
};
|
|
513
518
|
label: {
|
|
514
519
|
page: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ct-veh.d.ts","sourceRoot":"","sources":["../../theme/ct-veh.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkFA;;QA1DE;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG
|
|
1
|
+
{"version":3,"file":"ct-veh.d.ts","sourceRoot":"","sources":["../../theme/ct-veh.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAkFA;;QA1DE;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;QAEH;;WAEG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWH"}
|
package/dist/theme/ct-veh.js
CHANGED
package/dist/theme/mudah.js
CHANGED
|
@@ -22,7 +22,7 @@ const px = (v) => `${v}px`;
|
|
|
22
22
|
* })
|
|
23
23
|
* ```
|
|
24
24
|
*/
|
|
25
|
-
const breakpoints = ['576px', '768px', '992px', '
|
|
25
|
+
const breakpoints = ['576px', '768px', '992px', '1280px', '1440px'];
|
|
26
26
|
// index in sx: 1, 2, 3, 4, 5 (not a mistake, 0 is smallest viewport)
|
|
27
27
|
/**
|
|
28
28
|
* @mediaQueries
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export interface HeaderAnnotationProps {
|
|
3
|
+
/**
|
|
4
|
+
* Element or component to be rendered as
|
|
5
|
+
* @default 'h2'
|
|
6
|
+
*/
|
|
7
|
+
as?: React.ElementType;
|
|
8
|
+
/**
|
|
9
|
+
* Additional classes to be added to the component
|
|
10
|
+
*/
|
|
11
|
+
className?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Content of the component
|
|
14
|
+
*/
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
}
|
|
17
|
+
declare const HeaderAnnotation: React.FC<HeaderAnnotationProps>;
|
|
18
|
+
export default HeaderAnnotation;
|
|
19
|
+
//# sourceMappingURL=HeaderAnnotation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"HeaderAnnotation.d.ts","sourceRoot":"","sources":["../../typography/HeaderAnnotation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAU/B,MAAM,WAAW,qBAAqB;IACpC;;;OAGG;IACH,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IACvB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED,QAAA,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAWrD,CAAC;AAEF,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import theme from '@clad-ui/theme';
|
|
3
|
+
import { css, cx } from '@linaria/core';
|
|
4
|
+
const { typo } = theme;
|
|
5
|
+
const styleClass = css `
|
|
6
|
+
${typo.header.annotation}
|
|
7
|
+
`;
|
|
8
|
+
const HeaderAnnotation = ({ as = 'h2', className, children, ...props }) => {
|
|
9
|
+
const attrs = {
|
|
10
|
+
className: cx(styleClass, className),
|
|
11
|
+
...props,
|
|
12
|
+
};
|
|
13
|
+
return React.createElement(as, attrs, children);
|
|
14
|
+
};
|
|
15
|
+
export default HeaderAnnotation;
|
|
@@ -5,6 +5,7 @@ export { default as DisplayAnnotation } from './DisplayAnnotation';
|
|
|
5
5
|
export { default as HeaderPage } from './HeaderPage';
|
|
6
6
|
export { default as HeaderSection } from './HeaderSection';
|
|
7
7
|
export { default as HeaderCaption } from './HeaderCaption';
|
|
8
|
+
export { default as HeaderAnnotation } from './HeaderAnnotation';
|
|
8
9
|
export { default as LabelPage } from './LabelPage';
|
|
9
10
|
export { default as LabelSection } from './LabelSection';
|
|
10
11
|
export { default as LabelCaption } from './LabelCaption';
|
|
@@ -27,6 +28,7 @@ export type { DisplayAnnotationProps } from './DisplayAnnotation';
|
|
|
27
28
|
export type { HeaderPageProps } from './HeaderPage';
|
|
28
29
|
export type { HeaderSectionProps } from './HeaderSection';
|
|
29
30
|
export type { HeaderCaptionProps } from './HeaderCaption';
|
|
31
|
+
export type { HeaderAnnotationProps } from './HeaderAnnotation';
|
|
30
32
|
export type { LabelPageProps } from './LabelPage';
|
|
31
33
|
export type { LabelSectionProps } from './LabelSection';
|
|
32
34
|
export type { LabelCaptionProps } from './LabelCaption';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../typography/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAC7D,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,IAAI,UAAU,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,OAAO,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC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;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAClE,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAC1D,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAChE,YAAY,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAClD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,iBAAiB,EAAE,MAAM,gBAAgB,CAAC;AACxD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAChD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC5D,YAAY,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC"}
|
package/dist/typography/index.js
CHANGED
|
@@ -5,6 +5,7 @@ export { default as DisplayAnnotation } from './DisplayAnnotation';
|
|
|
5
5
|
export { default as HeaderPage } from './HeaderPage';
|
|
6
6
|
export { default as HeaderSection } from './HeaderSection';
|
|
7
7
|
export { default as HeaderCaption } from './HeaderCaption';
|
|
8
|
+
export { default as HeaderAnnotation } from './HeaderAnnotation';
|
|
8
9
|
export { default as LabelPage } from './LabelPage';
|
|
9
10
|
export { default as LabelSection } from './LabelSection';
|
|
10
11
|
export { default as LabelCaption } from './LabelCaption';
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { default as sx } from "./sx";
|
|
|
3
3
|
export { default as getBreakpointsValues } from "./getBreakpointsValues";
|
|
4
4
|
export { default as cleanHtml } from "./cleanHtml";
|
|
5
5
|
export { default as cx } from "./cx";
|
|
6
|
+
export { default as useBodyScrollLock } from "./scrollLock";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/utils/index.js
CHANGED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll Lock utilities for modal/drawer components
|
|
3
|
+
*/
|
|
4
|
+
export { useBodyScrollLock } from './useBodyScrollLock';
|
|
5
|
+
export { scrollLockedClass } from './scrollLock.styles';
|
|
6
|
+
export { useBodyScrollLock as default } from './useBodyScrollLock';
|
|
7
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../utils/scrollLock/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAGxD,OAAO,EAAE,iBAAiB,IAAI,OAAO,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scroll Lock utilities for modal/drawer components
|
|
3
|
+
*/
|
|
4
|
+
export { useBodyScrollLock } from './useBodyScrollLock';
|
|
5
|
+
export { scrollLockedClass } from './scrollLock.styles';
|
|
6
|
+
// Re-export the hook as default
|
|
7
|
+
export { useBodyScrollLock as default } from './useBodyScrollLock';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"scrollLock.styles.d.ts","sourceRoot":"","sources":["../../../utils/scrollLock/scrollLock.styles.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,0CAG7B,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to manage body scroll locking with reference counting.
|
|
3
|
+
* Supports multiple modals/drawers being open simultaneously.
|
|
4
|
+
* Only locks scroll when the first modal opens, and only unlocks when all modals are closed.
|
|
5
|
+
*
|
|
6
|
+
* @param isActive - Whether the modal/drawer should contribute to the scroll lock
|
|
7
|
+
*/
|
|
8
|
+
export declare function useBodyScrollLock(isActive: boolean): void;
|
|
9
|
+
export default useBodyScrollLock;
|
|
10
|
+
//# sourceMappingURL=useBodyScrollLock.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBodyScrollLock.d.ts","sourceRoot":"","sources":["../../../utils/scrollLock/useBodyScrollLock.ts"],"names":[],"mappings":"AAIA;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,QAAQ,EAAE,OAAO,QA+BlD;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { useEffect } from 'react';
|
|
2
|
+
import { scrollLockedClass } from './scrollLock.styles';
|
|
3
|
+
const COUNT_ATTR = 'data-ct-modal-count';
|
|
4
|
+
/**
|
|
5
|
+
* Hook to manage body scroll locking with reference counting.
|
|
6
|
+
* Supports multiple modals/drawers being open simultaneously.
|
|
7
|
+
* Only locks scroll when the first modal opens, and only unlocks when all modals are closed.
|
|
8
|
+
*
|
|
9
|
+
* @param isActive - Whether the modal/drawer should contribute to the scroll lock
|
|
10
|
+
*/
|
|
11
|
+
export function useBodyScrollLock(isActive) {
|
|
12
|
+
useEffect(() => {
|
|
13
|
+
if (!document)
|
|
14
|
+
return;
|
|
15
|
+
const { body } = document;
|
|
16
|
+
if (!body)
|
|
17
|
+
return;
|
|
18
|
+
const getCount = () => parseInt(body.getAttribute(COUNT_ATTR) || '0', 10);
|
|
19
|
+
const setCount = (count) => body.setAttribute(COUNT_ATTR, count.toString());
|
|
20
|
+
if (isActive) {
|
|
21
|
+
const current = getCount();
|
|
22
|
+
const newCount = current + 1;
|
|
23
|
+
setCount(newCount);
|
|
24
|
+
if (newCount === 1) {
|
|
25
|
+
body.classList.add(scrollLockedClass);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
return () => {
|
|
29
|
+
if (isActive) {
|
|
30
|
+
const current = getCount();
|
|
31
|
+
const newCount = Math.max(0, current - 1);
|
|
32
|
+
setCount(newCount);
|
|
33
|
+
if (newCount === 0) {
|
|
34
|
+
body.classList.remove(scrollLockedClass);
|
|
35
|
+
body.removeAttribute(COUNT_ATTR);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, [isActive]);
|
|
40
|
+
}
|
|
41
|
+
export default useBodyScrollLock;
|
package/dist/utils/sx.d.ts
CHANGED
|
@@ -96,7 +96,7 @@ export type FontSizes = "body" | "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subt
|
|
|
96
96
|
export type Shadows = "none" | "sm" | "md" | "lg";
|
|
97
97
|
export type BorderWidths = "none" | "sm" | "md" | "lg" | "xl" | "strokeDivider" | "strokeAction" | "strokeEmphasize";
|
|
98
98
|
export type Radii = "none" | "circle" | "xs" | "sm" | "md" | "lg" | "xl" | "$sm" | "pill";
|
|
99
|
-
export type Sizes = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl";
|
|
99
|
+
export type Sizes = "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl";
|
|
100
100
|
/**
|
|
101
101
|
* - Themeable style object
|
|
102
102
|
*/
|
|
@@ -156,13 +156,13 @@ export type ThemableStyle = {
|
|
|
156
156
|
boxShadow?: "none" | "sm" | "md" | "lg" | ("none" | "sm" | "md" | "lg")[] | undefined;
|
|
157
157
|
textShadow?: "none" | "sm" | "md" | "lg" | ("none" | "sm" | "md" | "lg")[] | undefined;
|
|
158
158
|
zIndex?: number | number[] | undefined;
|
|
159
|
-
width?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
160
|
-
minWidth?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
161
|
-
maxWidth?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
162
|
-
height?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
163
|
-
minHeight?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
164
|
-
maxHeight?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
165
|
-
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
159
|
+
width?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
160
|
+
minWidth?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
161
|
+
maxWidth?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
162
|
+
height?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
163
|
+
minHeight?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
164
|
+
maxHeight?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
165
|
+
size?: "xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl" | ("xxs" | "xs" | "sm" | "md" | "lg" | "xl" | "xxl" | "xxxl" | "xxxs" | "xxxxl" | "xxxxxl" | "$sm" | "vW" | "vH" | "quarter" | "third" | "half" | "twoThird" | "threeQuarter" | "full" | "lxl" | "buttonMaxWidth" | "$md" | "$lg" | "$xl")[] | undefined;
|
|
166
166
|
};
|
|
167
167
|
/**
|
|
168
168
|
* All standard CSS properties as regular object, except those from ThemableStyle
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type ReactRef<T> = React.RefObject<T> | React.MutableRefObject<T> | React.Ref<T>;
|
|
2
|
+
export type As<Props = any> = React.ElementType<Props>;
|
|
3
|
+
export type PropsOf<T extends As> = React.ComponentPropsWithoutRef<T> & {
|
|
4
|
+
as?: As;
|
|
5
|
+
};
|
|
6
|
+
export type HTMLCladUIProps<T extends As = 'div', OmitKeys extends keyof any = never> = Omit<PropsOf<T>, OmitKeys> & {
|
|
7
|
+
as?: As;
|
|
8
|
+
};
|
|
9
|
+
export type RightJoinProps<SourceProps extends object = {}, OverrideProps extends object = {}> = Omit<SourceProps, keyof OverrideProps | 'as'> & OverrideProps;
|
|
10
|
+
export type MergeWithAs<ComponentProps extends object, AsProps extends object, AdditionalProps extends object = {}, AsComponent extends As = As> = (RightJoinProps<ComponentProps, AdditionalProps> | RightJoinProps<AsProps, AdditionalProps>) & {
|
|
11
|
+
as?: AsComponent;
|
|
12
|
+
};
|
|
13
|
+
export type InternalForwardRefRenderFunction<Component extends As, Props extends object = {}> = {
|
|
14
|
+
<AsComponent extends As = Component>(props: MergeWithAs<React.ComponentPropsWithoutRef<Component>, React.ComponentPropsWithoutRef<AsComponent>, Props, AsComponent>): React.ReactElement | null;
|
|
15
|
+
readonly $$typeof: symbol;
|
|
16
|
+
defaultProps?: Partial<Props> | undefined;
|
|
17
|
+
propTypes?: React.WeakValidationMap<Props> | undefined;
|
|
18
|
+
displayName?: string | undefined;
|
|
19
|
+
};
|
|
20
|
+
export declare function forwardRef<Component extends As, Props extends object>(component: React.ForwardRefRenderFunction<any, RightJoinProps<PropsOf<Component>, Props> & {
|
|
21
|
+
as?: As;
|
|
22
|
+
}>): InternalForwardRefRenderFunction<Component, Props>;
|
|
23
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../utils/types.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,gBAAgB,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAExF,MAAM,MAAM,EAAE,CAAC,KAAK,GAAG,GAAG,IAAI,KAAK,CAAC,WAAW,CAAC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,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,EAAE,KAAK,CAAC,iBAAiB,CAAC,KAAK,CAAC,GAAG,SAAS,CAAC;IACvD,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEF,wBAAgB,UAAU,CAAC,SAAS,SAAS,EAAE,EAAE,KAAK,SAAS,MAAM,EACnE,SAAS,EAAE,KAAK,CAAC,wBAAwB,CACvC,GAAG,EACH,cAAc,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG;IAC1C,EAAE,CAAC,EAAE,EAAE,CAAC;CACT,CACF,GAEmC,gCAAgC,CAAC,SAAS,EAAE,KAAK,CAAC,CACvF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chotot/clad-ui",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Classified Ads group (Carousell, Chotot, Mudah, Onekyat) design system.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"./theme": "./dist/theme/index.js",
|
|
29
29
|
"./utils": "./dist/utils/index.js",
|
|
30
30
|
"./package.json": "./package.json",
|
|
31
|
-
"./README.md": "./README.md"
|
|
31
|
+
"./README.md": "./README.md",
|
|
32
|
+
"./CHANGELOG.md": "./CHANGELOG.md"
|
|
32
33
|
},
|
|
33
34
|
"main": "./dist/index.js",
|
|
34
35
|
"types": "./dist/index.d.ts",
|
|
@@ -75,7 +76,7 @@
|
|
|
75
76
|
"rimraf": "^3.0.2",
|
|
76
77
|
"sort-package-json": "2.4.1",
|
|
77
78
|
"stylelint": "*",
|
|
78
|
-
"@clad-ui/dotfiles": "0.
|
|
79
|
+
"@clad-ui/dotfiles": "0.5.0"
|
|
79
80
|
},
|
|
80
81
|
"peerDependencies": {
|
|
81
82
|
"@linaria/core": "^4.2.10",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export default GuideImage;
|
|
2
|
-
declare function GuideImage({ isBad, isGood, alt, ...props }: {
|
|
3
|
-
[x: string]: any;
|
|
4
|
-
isBad?: boolean | undefined;
|
|
5
|
-
isGood?: boolean | undefined;
|
|
6
|
-
alt: any;
|
|
7
|
-
}): JSX.Element;
|
|
8
|
-
export const guideImageClass: import("@linaria/core").LinariaClassName;
|
|
9
|
-
//# sourceMappingURL=GuideImage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"GuideImage.d.ts","sourceRoot":"","sources":["../../storybook/GuideImage.js"],"names":[],"mappings":";AAyCA;;;;;gBAEC;AAtBD,uEAkBE"}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright 2021, ChoTot Ltd.
|
|
3
|
-
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
* you may not use this file except in compliance with the License.
|
|
5
|
-
* You may obtain a copy of the License at
|
|
6
|
-
*
|
|
7
|
-
* http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
-
*
|
|
9
|
-
* Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
-
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
-
* See the License for the specific language governing permissions and
|
|
13
|
-
* limitations under the License.
|
|
14
|
-
*/
|
|
15
|
-
import React from 'react';
|
|
16
|
-
import { css, cx } from '@linaria/core';
|
|
17
|
-
import theme from '@clad-ui/theme';
|
|
18
|
-
const { space, colors, radii } = theme;
|
|
19
|
-
const guideImageClass = css `
|
|
20
|
-
display: block;
|
|
21
|
-
margin: auto;
|
|
22
|
-
margin-bottom: ${space.sm};
|
|
23
|
-
border-radius: ${radii.sm};
|
|
24
|
-
padding: ${space.sm};
|
|
25
|
-
background-color: ${colors.neutralBG};
|
|
26
|
-
max-height: 400px;
|
|
27
|
-
max-width: 100%;
|
|
28
|
-
width: auto;
|
|
29
|
-
|
|
30
|
-
&.do {
|
|
31
|
-
background-color: ${colors.positiveBG};
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
&.dont {
|
|
35
|
-
background-color: ${colors.criticalBG};
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
const GuideImage = ({ isBad = false, isGood = false, alt, ...props }) => (<img className={cx(guideImageClass, isGood && 'do', isBad && 'dont')} alt={alt} {...props}/>);
|
|
39
|
-
export default GuideImage;
|
|
40
|
-
export { guideImageClass };
|