@sk-web-gui/core 0.1.37 → 0.1.38
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/dist/cjs/colors.js +140 -0
- package/dist/cjs/colors.js.map +1 -0
- package/dist/cjs/components/accordion.js +86 -0
- package/dist/cjs/components/accordion.js.map +1 -0
- package/dist/cjs/components/alert.js +71 -0
- package/dist/cjs/components/alert.js.map +1 -0
- package/dist/cjs/components/avatar.js +78 -0
- package/dist/cjs/components/avatar.js.map +1 -0
- package/dist/cjs/components/badge.js +53 -0
- package/dist/cjs/components/badge.js.map +1 -0
- package/dist/cjs/components/breadcrumb.js +23 -0
- package/dist/cjs/components/breadcrumb.js.map +1 -0
- package/dist/cjs/components/button-group.js +50 -0
- package/dist/cjs/components/button-group.js.map +1 -0
- package/dist/cjs/components/button.js +154 -0
- package/dist/cjs/components/button.js.map +1 -0
- package/dist/cjs/components/calendar.js +76 -0
- package/dist/cjs/components/calendar.js.map +1 -0
- package/dist/cjs/components/card.js +59 -0
- package/dist/cjs/components/card.js.map +1 -0
- package/dist/cjs/components/checkbox.js +92 -0
- package/dist/cjs/components/checkbox.js.map +1 -0
- package/dist/cjs/components/code.js +21 -0
- package/dist/cjs/components/code.js.map +1 -0
- package/dist/cjs/components/cookie-consent.js +35 -0
- package/dist/cjs/components/cookie-consent.js.map +1 -0
- package/dist/cjs/components/divider.js +24 -0
- package/dist/cjs/components/divider.js.map +1 -0
- package/dist/cjs/components/dot.js +70 -0
- package/dist/cjs/components/dot.js.map +1 -0
- package/dist/cjs/components/footer.js +39 -0
- package/dist/cjs/components/footer.js.map +1 -0
- package/dist/cjs/components/forms.js +225 -0
- package/dist/cjs/components/forms.js.map +1 -0
- package/dist/cjs/components/header.js +34 -0
- package/dist/cjs/components/header.js.map +1 -0
- package/dist/cjs/components/icon-button.js +17 -0
- package/dist/cjs/components/icon-button.js.map +1 -0
- package/dist/cjs/components/icon.js +20 -0
- package/dist/cjs/components/icon.js.map +1 -0
- package/dist/cjs/components/kbd.js +21 -0
- package/dist/cjs/components/kbd.js.map +1 -0
- package/dist/cjs/components/link.js +29 -0
- package/dist/cjs/components/link.js.map +1 -0
- package/dist/cjs/components/message.js +63 -0
- package/dist/cjs/components/message.js.map +1 -0
- package/dist/cjs/components/modal.js +35 -0
- package/dist/cjs/components/modal.js.map +1 -0
- package/dist/cjs/components/notification.js +58 -0
- package/dist/cjs/components/notification.js.map +1 -0
- package/dist/cjs/components/pagination.js +66 -0
- package/dist/cjs/components/pagination.js.map +1 -0
- package/dist/cjs/components/radio.js +95 -0
- package/dist/cjs/components/radio.js.map +1 -0
- package/dist/cjs/components/switch.js +107 -0
- package/dist/cjs/components/switch.js.map +1 -0
- package/dist/cjs/components/table.js +23 -0
- package/dist/cjs/components/table.js.map +1 -0
- package/dist/cjs/components/tag.js +88 -0
- package/dist/cjs/components/tag.js.map +1 -0
- package/dist/cjs/components/types.js +10 -0
- package/dist/cjs/components/types.js.map +1 -0
- package/dist/cjs/components/user-menu.js +33 -0
- package/dist/cjs/components/user-menu.js.map +1 -0
- package/dist/cjs/components/zebratable.js +70 -0
- package/dist/cjs/components/zebratable.js.map +1 -0
- package/dist/cjs/index.js +282 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/with-opacity.js +15 -0
- package/dist/cjs/with-opacity.js.map +1 -0
- package/dist/esm/colors.js +137 -0
- package/dist/esm/colors.js.map +1 -0
- package/dist/esm/components/accordion.js +76 -0
- package/dist/esm/components/accordion.js.map +1 -0
- package/dist/esm/components/alert.js +67 -0
- package/dist/esm/components/alert.js.map +1 -0
- package/dist/esm/components/avatar.js +68 -0
- package/dist/esm/components/avatar.js.map +1 -0
- package/dist/esm/components/badge.js +48 -0
- package/dist/esm/components/badge.js.map +1 -0
- package/dist/esm/components/breadcrumb.js +13 -0
- package/dist/esm/components/breadcrumb.js.map +1 -0
- package/dist/esm/components/button-group.js +40 -0
- package/dist/esm/components/button-group.js.map +1 -0
- package/dist/esm/components/button.js +197 -0
- package/dist/esm/components/button.js.map +1 -0
- package/dist/esm/components/calendar.js +66 -0
- package/dist/esm/components/calendar.js.map +1 -0
- package/dist/esm/components/card.js +49 -0
- package/dist/esm/components/card.js.map +1 -0
- package/dist/esm/components/checkbox.js +110 -0
- package/dist/esm/components/checkbox.js.map +1 -0
- package/dist/esm/components/code.js +11 -0
- package/dist/esm/components/code.js.map +1 -0
- package/dist/esm/components/cookie-consent.js +25 -0
- package/dist/esm/components/cookie-consent.js.map +1 -0
- package/dist/esm/components/divider.js +14 -0
- package/dist/esm/components/divider.js.map +1 -0
- package/dist/esm/components/dot.js +61 -0
- package/dist/esm/components/dot.js.map +1 -0
- package/dist/esm/components/footer.js +29 -0
- package/dist/esm/components/footer.js.map +1 -0
- package/dist/esm/components/forms.js +217 -0
- package/dist/esm/components/forms.js.map +1 -0
- package/dist/esm/components/header.js +29 -0
- package/dist/esm/components/header.js.map +1 -0
- package/dist/esm/components/icon-button.js +7 -0
- package/dist/esm/components/icon-button.js.map +1 -0
- package/dist/esm/components/icon.js +10 -0
- package/dist/esm/components/icon.js.map +1 -0
- package/dist/esm/components/kbd.js +11 -0
- package/dist/esm/components/kbd.js.map +1 -0
- package/dist/esm/components/link.js +19 -0
- package/dist/esm/components/link.js.map +1 -0
- package/dist/esm/components/message.js +53 -0
- package/dist/esm/components/message.js.map +1 -0
- package/dist/esm/components/modal.js +25 -0
- package/dist/esm/components/modal.js.map +1 -0
- package/dist/esm/components/notification.js +48 -0
- package/dist/esm/components/notification.js.map +1 -0
- package/dist/esm/components/pagination.js +56 -0
- package/dist/esm/components/pagination.js.map +1 -0
- package/dist/esm/components/radio.js +88 -0
- package/dist/esm/components/radio.js.map +1 -0
- package/dist/esm/components/switch.js +98 -0
- package/dist/esm/components/switch.js.map +1 -0
- package/dist/esm/components/table.js +13 -0
- package/dist/esm/components/table.js.map +1 -0
- package/dist/esm/components/tag.js +84 -0
- package/dist/esm/components/tag.js.map +1 -0
- package/dist/esm/components/types.js +3 -0
- package/dist/esm/components/types.js.map +1 -0
- package/dist/esm/components/user-menu.js +23 -0
- package/dist/esm/components/user-menu.js.map +1 -0
- package/dist/esm/components/zebratable.js +60 -0
- package/dist/esm/components/zebratable.js.map +1 -0
- package/dist/esm/index.js +327 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/with-opacity.js +10 -0
- package/dist/esm/with-opacity.js.map +1 -0
- package/dist/types/accordion/index.d.ts +1 -0
- package/dist/types/accordion/src/accordion.d.ts +17 -0
- package/dist/types/accordion/src/index.d.ts +1 -0
- package/dist/types/accordion/src/styles.d.ts +1 -0
- package/dist/types/accordion/stories/accordion.stories.d.ts +40 -0
- package/dist/types/alert/index.d.ts +1 -0
- package/dist/types/alert/src/alert.d.ts +15 -0
- package/dist/types/alert/src/index.d.ts +8 -0
- package/dist/types/alert/src/styles.d.ts +2 -0
- package/dist/types/breadcrumb/index.d.ts +1 -0
- package/dist/types/breadcrumb/src/breadcrumb.d.ts +34 -0
- package/dist/types/breadcrumb/src/index.d.ts +10 -0
- package/dist/types/breadcrumb/stories/breadcrumb.stories.d.ts +28 -0
- package/dist/types/button/index.d.ts +1 -0
- package/dist/types/button/src/button-group.d.ts +20 -0
- package/dist/types/button/src/button.d.ts +21 -0
- package/dist/types/button/src/icon-button.d.ts +17 -0
- package/dist/types/button/src/index.d.ts +10 -0
- package/dist/types/button/src/styles.d.ts +1 -0
- package/dist/types/button/stories/announcement.d.ts +6 -0
- package/dist/types/button/stories/button-group.stories.d.ts +14 -0
- package/dist/types/button/stories/button.stories.d.ts +127 -0
- package/dist/types/button/stories/icon-button.stories.d.ts +16 -0
- package/dist/types/card/index.d.ts +1 -0
- package/dist/types/card/src/card.d.ts +38 -0
- package/dist/types/card/src/index.d.ts +1 -0
- package/dist/types/card/src/styles.d.ts +1 -0
- package/dist/types/card/stories/card.stories.d.ts +56 -0
- package/dist/types/checkbox/index.d.ts +1 -0
- package/dist/types/checkbox/src/checkbox-group.d.ts +36 -0
- package/dist/types/checkbox/src/checkbox.d.ts +46 -0
- package/dist/types/checkbox/src/index.d.ts +9 -0
- package/dist/types/checkbox/src/styles.d.ts +2 -0
- package/dist/types/checkbox/stories/checkbox.stories.d.ts +103 -0
- package/dist/types/cookie-consent/index.d.ts +1 -0
- package/dist/types/cookie-consent/src/cookie-consent.d.ts +37 -0
- package/dist/types/cookie-consent/src/index.d.ts +1 -0
- package/dist/types/cookie-consent/src/styles.d.ts +1 -0
- package/dist/types/core/src/colors.d.ts +1 -0
- package/dist/types/core/src/components/accordion.d.ts +3 -0
- package/dist/types/core/src/components/alert.d.ts +3 -0
- package/dist/types/core/src/components/avatar.d.ts +3 -0
- package/dist/types/core/src/components/badge.d.ts +3 -0
- package/dist/types/core/src/components/breadcrumb.d.ts +3 -0
- package/dist/types/core/src/components/button-group.d.ts +3 -0
- package/dist/types/core/src/components/button.d.ts +3 -0
- package/dist/types/core/src/components/calendar.d.ts +3 -0
- package/dist/types/core/src/components/card.d.ts +3 -0
- package/dist/types/core/src/components/checkbox.d.ts +3 -0
- package/dist/types/core/src/components/code.d.ts +3 -0
- package/dist/types/core/src/components/cookie-consent.d.ts +3 -0
- package/dist/types/core/src/components/divider.d.ts +3 -0
- package/dist/types/core/src/components/dot.d.ts +3 -0
- package/dist/types/core/src/components/footer.d.ts +3 -0
- package/dist/types/core/src/components/forms.d.ts +3 -0
- package/dist/types/core/src/components/header.d.ts +3 -0
- package/dist/types/core/src/components/icon-button.d.ts +3 -0
- package/dist/types/core/src/components/icon.d.ts +3 -0
- package/dist/types/core/src/components/kbd.d.ts +3 -0
- package/dist/types/core/src/components/link.d.ts +3 -0
- package/dist/types/core/src/components/message.d.ts +3 -0
- package/dist/types/core/src/components/modal.d.ts +3 -0
- package/dist/types/core/src/components/notification.d.ts +3 -0
- package/dist/types/core/src/components/pagination.d.ts +3 -0
- package/dist/types/core/src/components/radio.d.ts +3 -0
- package/dist/types/core/src/components/switch.d.ts +3 -0
- package/dist/types/core/src/components/table.d.ts +3 -0
- package/dist/types/core/src/components/tag.d.ts +3 -0
- package/dist/types/core/src/components/types.d.ts +5 -0
- package/dist/types/core/src/components/user-menu.d.ts +3 -0
- package/dist/types/core/src/components/zebratable.d.ts +3 -0
- package/dist/types/core/src/index.d.ts +1 -0
- package/dist/types/core/src/with-opacity.d.ts +3 -0
- package/dist/types/divider/index.d.ts +1 -0
- package/dist/types/divider/src/divider.d.ts +9 -0
- package/dist/types/divider/src/index.d.ts +1 -0
- package/dist/types/divider/stories/divider.stories.d.ts +33 -0
- package/dist/types/dot/index.d.ts +1 -0
- package/dist/types/dot/src/dot.d.ts +12 -0
- package/dist/types/dot/src/index.d.ts +1 -0
- package/dist/types/dot/src/styles.d.ts +1 -0
- package/dist/types/dot/stories/dot.stories.d.ts +15 -0
- package/dist/types/footer/index.d.ts +1 -0
- package/dist/types/footer/src/footer.d.ts +11 -0
- package/dist/types/footer/src/index.d.ts +1 -0
- package/dist/types/footer/stories/footer.stories.d.ts +95 -0
- package/dist/types/forms/index.d.ts +1 -0
- package/dist/types/forms/src/calendar/index.d.ts +12 -0
- package/dist/types/forms/src/calendar/styles.d.ts +1 -0
- package/dist/types/forms/src/form-control/index.d.ts +27 -0
- package/dist/types/forms/src/form-error-message/index.d.ts +9 -0
- package/dist/types/forms/src/form-helper-text/index.d.ts +9 -0
- package/dist/types/forms/src/form-label/index.d.ts +13 -0
- package/dist/types/forms/src/index.d.ts +8 -0
- package/dist/types/forms/src/input/index.d.ts +15 -0
- package/dist/types/forms/src/input/input.d.ts +30 -0
- package/dist/types/forms/src/input/styles.d.ts +1 -0
- package/dist/types/forms/src/input-addon/index.d.ts +13 -0
- package/dist/types/forms/src/input-element/index.d.ts +15 -0
- package/dist/types/forms/src/input-group/index.d.ts +11 -0
- package/dist/types/forms/src/select/index.d.ts +6 -0
- package/dist/types/forms/src/select/styles.d.ts +1 -0
- package/dist/types/forms/src/textarea/index.d.ts +13 -0
- package/dist/types/forms/stories/calendar.stories.d.ts +58 -0
- package/dist/types/forms/stories/check.d.ts +6 -0
- package/dist/types/forms/stories/form-control.stories.d.ts +16 -0
- package/dist/types/forms/stories/input.stories.d.ts +32 -0
- package/dist/types/forms/stories/select.stories.d.ts +118 -0
- package/dist/types/forms/stories/textarea.stories.d.ts +23 -0
- package/dist/types/header/index.d.ts +1 -0
- package/dist/types/header/src/header.d.ts +13 -0
- package/dist/types/header/src/index.d.ts +1 -0
- package/dist/types/header/stories/header.stories.d.ts +118 -0
- package/dist/types/icon/index.d.ts +1 -0
- package/dist/types/icon/src/core.d.ts +10 -0
- package/dist/types/icon/src/icon.d.ts +14 -0
- package/dist/types/icon/src/index.d.ts +2 -0
- package/dist/types/icon/stories/icon.stories.d.ts +12 -0
- package/dist/types/image/index.d.ts +1 -0
- package/dist/types/image/src/image.d.ts +28 -0
- package/dist/types/image/src/index.d.ts +2 -0
- package/dist/types/image/src/use-image.d.ts +52 -0
- package/dist/types/image/stories/image.stories.d.ts +12 -0
- package/dist/types/link/index.d.ts +1 -0
- package/dist/types/link/src/index.d.ts +1 -0
- package/dist/types/link/src/link.d.ts +12 -0
- package/dist/types/link/stories/link.stories.d.ts +46 -0
- package/dist/types/message/index.d.ts +1 -0
- package/dist/types/message/src/index.d.ts +1 -0
- package/dist/types/message/src/message.d.ts +2 -0
- package/dist/types/message/stories/message.stories.d.ts +11 -0
- package/dist/types/notification/index.d.ts +1 -0
- package/dist/types/notification/src/index.d.ts +1 -0
- package/dist/types/notification/src/notification.d.ts +5 -0
- package/dist/types/notification/stories/notification.stories.d.ts +11 -0
- package/dist/types/pagination/index.d.ts +1 -0
- package/dist/types/pagination/src/index.d.ts +1 -0
- package/dist/types/pagination/src/pagination.d.ts +11 -0
- package/dist/types/pagination/src/styles.d.ts +1 -0
- package/dist/types/pagination/stories/pagination.stories.d.ts +75 -0
- package/dist/types/radio/index.d.ts +1 -0
- package/dist/types/radio/src/index.d.ts +9 -0
- package/dist/types/radio/src/radio-group.d.ts +41 -0
- package/dist/types/radio/src/radio.d.ts +45 -0
- package/dist/types/radio/src/styles.d.ts +2 -0
- package/dist/types/radio/stories/radio-group.stories.d.ts +75 -0
- package/dist/types/radio/stories/radio.stories.d.ts +104 -0
- package/dist/types/react/index.d.ts +1 -0
- package/dist/types/react/src/index.d.ts +26 -0
- package/dist/types/spinner/index.d.ts +1 -0
- package/dist/types/spinner/src/index.d.ts +1 -0
- package/dist/types/spinner/src/spinner.d.ts +8 -0
- package/dist/types/spinner/src/styles.d.ts +2 -0
- package/dist/types/spinner/stories/spinner.stories.d.ts +13 -0
- package/dist/types/switch/index.d.ts +1 -0
- package/dist/types/switch/src/index.d.ts +1 -0
- package/dist/types/switch/src/styles.d.ts +2 -0
- package/dist/types/switch/src/switch.d.ts +42 -0
- package/dist/types/switch/stories/switch.stories.d.ts +76 -0
- package/dist/types/table/index.d.ts +1 -0
- package/dist/types/table/src/index.d.ts +1 -0
- package/dist/types/table/src/styles.d.ts +1 -0
- package/dist/types/table/src/zebratable.d.ts +33 -0
- package/dist/types/table/stories/zebratable.stories.d.ts +69 -0
- package/dist/types/tag/index.d.ts +1 -0
- package/dist/types/tag/src/index.d.ts +1 -0
- package/dist/types/tag/src/styles.d.ts +1 -0
- package/dist/types/tag/src/tag.d.ts +13 -0
- package/dist/types/tag/stories/tag.stories.d.ts +86 -0
- package/dist/types/theme/index.d.ts +1 -0
- package/dist/types/theme/src/colors.d.ts +272 -0
- package/dist/types/theme/src/create-memo-class.d.ts +1 -0
- package/dist/types/theme/src/create-theme-vars/calc.d.ts +19 -0
- package/dist/types/theme/src/create-theme-vars/create-theme-vars.d.ts +9 -0
- package/dist/types/theme/src/create-theme-vars/css-var.d.ts +7 -0
- package/dist/types/theme/src/create-theme-vars/index.d.ts +4 -0
- package/dist/types/theme/src/create-theme-vars/theme-tokens.d.ts +10 -0
- package/dist/types/theme/src/create-theme-vars/to-css-var.d.ts +2 -0
- package/dist/types/theme/src/default-theme.d.ts +4 -0
- package/dist/types/theme/src/gui-provider.d.ts +16 -0
- package/dist/types/theme/src/index.d.ts +6 -0
- package/dist/types/theme/src/types.d.ts +56 -0
- package/dist/types/theme/src/use-safe-effect.d.ts +2 -0
- package/dist/types/theme/src/utils.d.ts +1 -0
- package/dist/types/toast/index.d.ts +1 -0
- package/dist/types/toast/src/index.d.ts +1 -0
- package/dist/types/toast/src/toast.d.ts +62 -0
- package/dist/types/toasted-notes/index.d.ts +1 -0
- package/dist/types/toasted-notes/src/Alert.d.ts +8 -0
- package/dist/types/toasted-notes/src/Message.d.ts +26 -0
- package/dist/types/toasted-notes/src/Positions.d.ts +9 -0
- package/dist/types/toasted-notes/src/Toast.d.ts +13 -0
- package/dist/types/toasted-notes/src/ToastManager.d.ts +45 -0
- package/dist/types/toasted-notes/src/index.d.ts +4 -0
- package/dist/types/toasted-notes/src/useTimeout.d.ts +3 -0
- package/dist/types/user-menu/index.d.ts +1 -0
- package/dist/types/user-menu/src/index.d.ts +6 -0
- package/dist/types/user-menu/src/styles.d.ts +1 -0
- package/dist/types/user-menu/src/user-menu.d.ts +21 -0
- package/dist/types/user-menu/stories/announcement.d.ts +6 -0
- package/dist/types/user-menu/stories/user-menu.stories.d.ts +5 -0
- package/dist/types/utils/index.d.ts +1 -0
- package/dist/types/utils/src/assertion.d.ts +4 -0
- package/dist/types/utils/src/children.d.ts +8 -0
- package/dist/types/utils/src/color.d.ts +9 -0
- package/dist/types/utils/src/index.d.ts +10 -0
- package/dist/types/utils/src/object.d.ts +6 -0
- package/dist/types/utils/src/refs.d.ts +5 -0
- package/dist/types/utils/src/slug.d.ts +1 -0
- package/dist/types/utils/src/types.d.ts +13 -0
- package/dist/types/utils/src/walk-object.d.ts +5 -0
- package/dist/types/visually-hidden/index.d.ts +1 -0
- package/dist/types/visually-hidden/src/index.d.ts +32 -0
- package/package.json +2 -2
- package/src/components/dropdown-filter.js +1 -1
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface IButtonProps extends DefaultProps {
|
|
4
|
+
loading?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
active?: boolean;
|
|
7
|
+
loadingText?: string;
|
|
8
|
+
type?: 'button' | 'reset' | 'submit';
|
|
9
|
+
leftIcon?: React.ReactElement;
|
|
10
|
+
rightIcon?: React.ReactElement;
|
|
11
|
+
color?: string;
|
|
12
|
+
size?: 'sm' | 'md' | 'lg';
|
|
13
|
+
/** Controls button appearance */
|
|
14
|
+
variant?: 'link' | 'solid' | 'outline' | 'light' | 'ghost';
|
|
15
|
+
children?: React.ReactNode;
|
|
16
|
+
rounded?: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface ButtonProps extends React.HTMLAttributes<HTMLButtonElement>, IButtonProps {
|
|
19
|
+
}
|
|
20
|
+
export declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
declare type OmittedProps = 'leftIcon' | 'rightIcon' | 'loadingText';
|
|
4
|
+
interface IIconButtonProps extends Omit<ButtonProps, OmittedProps> {
|
|
5
|
+
/**
|
|
6
|
+
* The icon to be used in the button.
|
|
7
|
+
*/
|
|
8
|
+
icon?: React.ReactElement;
|
|
9
|
+
}
|
|
10
|
+
export interface IconButtonProps extends React.HTMLAttributes<HTMLButtonElement>, IIconButtonProps {
|
|
11
|
+
/**
|
|
12
|
+
* A11y: A label that describes the button
|
|
13
|
+
*/
|
|
14
|
+
'aria-label'?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const IconButton: React.ForwardRefExoticComponent<IconButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ButtonProps } from './button';
|
|
3
|
+
import { ButtonGroup, ButtonGroupProps } from './button-group';
|
|
4
|
+
import { IconButton, IconButtonProps } from './icon-button';
|
|
5
|
+
interface Button extends React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>> {
|
|
6
|
+
Group: typeof ButtonGroup;
|
|
7
|
+
}
|
|
8
|
+
declare const Button: Button;
|
|
9
|
+
export type { ButtonProps, ButtonGroupProps, IconButtonProps };
|
|
10
|
+
export { Button, ButtonGroup, IconButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useButtonClass: (args?: any) => string;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Button } from '../src';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: Button;
|
|
6
|
+
parameters: {
|
|
7
|
+
controls: {
|
|
8
|
+
hideNoControlsWarning: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Knappgrupp: () => JSX.Element;
|
|
14
|
+
export declare const Fastsittandes: () => JSX.Element;
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Meta } from '@storybook/react';
|
|
3
|
+
import { ButtonProps } from '../src';
|
|
4
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const Template: {
|
|
7
|
+
({ ...args }: ButtonProps): JSX.Element;
|
|
8
|
+
storyName: string;
|
|
9
|
+
argTypes: {
|
|
10
|
+
disabled: {
|
|
11
|
+
type: {
|
|
12
|
+
name: string;
|
|
13
|
+
required: boolean;
|
|
14
|
+
};
|
|
15
|
+
description: string;
|
|
16
|
+
table: {
|
|
17
|
+
defaultValue: {
|
|
18
|
+
summary: string;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
control: string;
|
|
22
|
+
defaultValue: boolean;
|
|
23
|
+
};
|
|
24
|
+
size: {
|
|
25
|
+
type: {
|
|
26
|
+
name: string;
|
|
27
|
+
required: boolean;
|
|
28
|
+
};
|
|
29
|
+
description: string;
|
|
30
|
+
table: {
|
|
31
|
+
defaultValue: {
|
|
32
|
+
summary: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
options: string[];
|
|
36
|
+
control: string;
|
|
37
|
+
defaultValue: string;
|
|
38
|
+
};
|
|
39
|
+
loading: {
|
|
40
|
+
type: {
|
|
41
|
+
name: string;
|
|
42
|
+
required: boolean;
|
|
43
|
+
};
|
|
44
|
+
description: string;
|
|
45
|
+
table: {
|
|
46
|
+
defaultValue: {
|
|
47
|
+
summary: string;
|
|
48
|
+
};
|
|
49
|
+
};
|
|
50
|
+
control: string;
|
|
51
|
+
defaultValue: boolean;
|
|
52
|
+
};
|
|
53
|
+
loadingText: {
|
|
54
|
+
type: {
|
|
55
|
+
name: string;
|
|
56
|
+
required: boolean;
|
|
57
|
+
};
|
|
58
|
+
description: string;
|
|
59
|
+
table: {
|
|
60
|
+
defaultValue: {
|
|
61
|
+
summary: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
control: string;
|
|
65
|
+
defaultValue: string;
|
|
66
|
+
};
|
|
67
|
+
variant: {
|
|
68
|
+
type: {
|
|
69
|
+
name: string;
|
|
70
|
+
required: boolean;
|
|
71
|
+
};
|
|
72
|
+
description: string;
|
|
73
|
+
table: {
|
|
74
|
+
defaultValue: {
|
|
75
|
+
summary: string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
options: string[];
|
|
79
|
+
control: string;
|
|
80
|
+
defaultValue: string;
|
|
81
|
+
};
|
|
82
|
+
type: {
|
|
83
|
+
type: {
|
|
84
|
+
name: string;
|
|
85
|
+
required: boolean;
|
|
86
|
+
};
|
|
87
|
+
description: string;
|
|
88
|
+
table: {
|
|
89
|
+
defaultValue: {
|
|
90
|
+
summary: string;
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
options: string[];
|
|
94
|
+
control: string;
|
|
95
|
+
defaultValue: string;
|
|
96
|
+
};
|
|
97
|
+
color: {
|
|
98
|
+
type: {
|
|
99
|
+
name: string;
|
|
100
|
+
required: boolean;
|
|
101
|
+
};
|
|
102
|
+
description: string;
|
|
103
|
+
table: {
|
|
104
|
+
defaultValue: {
|
|
105
|
+
summary: string;
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
options: (string | undefined)[];
|
|
109
|
+
control: string;
|
|
110
|
+
defaultValue: string;
|
|
111
|
+
};
|
|
112
|
+
rounded: {
|
|
113
|
+
type: {
|
|
114
|
+
name: string;
|
|
115
|
+
required: boolean;
|
|
116
|
+
};
|
|
117
|
+
description: string;
|
|
118
|
+
table: {
|
|
119
|
+
defaultValue: {
|
|
120
|
+
summary: string;
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
control: string;
|
|
124
|
+
defaultValue: boolean;
|
|
125
|
+
};
|
|
126
|
+
};
|
|
127
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const _default: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: import("react").ForwardRefExoticComponent<import("../src").IconButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
parameters: {
|
|
6
|
+
controls: {
|
|
7
|
+
hideNoControlsWarning: boolean;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default _default;
|
|
12
|
+
export declare const Outline: () => JSX.Element;
|
|
13
|
+
export declare const Solid: () => JSX.Element;
|
|
14
|
+
export declare const Light: () => JSX.Element;
|
|
15
|
+
export declare const Ghost: () => JSX.Element;
|
|
16
|
+
export declare const Size: () => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
2
|
+
import { LinkProps } from '@sk-web-gui/link';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
interface ICardProps extends DefaultProps {
|
|
5
|
+
clickable?: boolean;
|
|
6
|
+
outlined?: boolean;
|
|
7
|
+
borderTop?: boolean;
|
|
8
|
+
as?: React.ElementType;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export interface CardProps extends React.HTMLAttributes<HTMLDivElement>, ICardProps {
|
|
12
|
+
}
|
|
13
|
+
export declare const Card: React.ForwardRefExoticComponent<CardProps & React.RefAttributes<HTMLDivElement>>;
|
|
14
|
+
interface ICardListProps extends DefaultProps {
|
|
15
|
+
as?: React.ElementType;
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
}
|
|
18
|
+
export interface CardListProps extends React.HTMLAttributes<HTMLDivElement>, ICardListProps {
|
|
19
|
+
}
|
|
20
|
+
export declare const CardList: React.ForwardRefExoticComponent<CardListProps & React.RefAttributes<HTMLDivElement>>;
|
|
21
|
+
interface ICardBodyProps extends DefaultProps {
|
|
22
|
+
as?: React.ElementType;
|
|
23
|
+
children?: React.ReactNode;
|
|
24
|
+
}
|
|
25
|
+
export interface CardBodyProps extends React.HTMLAttributes<HTMLDivElement>, ICardBodyProps {
|
|
26
|
+
}
|
|
27
|
+
export declare const CardBody: React.ForwardRefExoticComponent<CardBodyProps & React.RefAttributes<HTMLDivElement>>;
|
|
28
|
+
interface ICardImageProps extends DefaultProps {
|
|
29
|
+
as?: React.ElementType;
|
|
30
|
+
children?: React.ReactNode;
|
|
31
|
+
src?: string;
|
|
32
|
+
alt?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface CardImageProps extends React.HTMLAttributes<HTMLImageElement>, ICardImageProps {
|
|
35
|
+
}
|
|
36
|
+
export declare const CardImage: React.ForwardRefExoticComponent<CardImageProps & React.RefAttributes<HTMLImageElement>>;
|
|
37
|
+
export declare const CardLink: React.ForwardRefExoticComponent<LinkProps & React.RefAttributes<unknown>>;
|
|
38
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './card';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCardClass: (args?: any) => string;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CardProps } from '../src';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: import("react").ForwardRefExoticComponent<CardProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
parameters: {};
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
export declare const Template: {
|
|
10
|
+
(args: CardProps): JSX.Element;
|
|
11
|
+
argTypes: {
|
|
12
|
+
clickable: {
|
|
13
|
+
type: {
|
|
14
|
+
name: string;
|
|
15
|
+
required: boolean;
|
|
16
|
+
};
|
|
17
|
+
description: string;
|
|
18
|
+
table: {
|
|
19
|
+
defaultValue: {
|
|
20
|
+
summary: string;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
control: string;
|
|
24
|
+
defaultValue: boolean;
|
|
25
|
+
};
|
|
26
|
+
borderTop: {
|
|
27
|
+
type: {
|
|
28
|
+
name: string;
|
|
29
|
+
required: boolean;
|
|
30
|
+
};
|
|
31
|
+
description: string;
|
|
32
|
+
table: {
|
|
33
|
+
defaultValue: {
|
|
34
|
+
summary: string;
|
|
35
|
+
};
|
|
36
|
+
};
|
|
37
|
+
control: string;
|
|
38
|
+
defaultValue: boolean;
|
|
39
|
+
};
|
|
40
|
+
outlined: {
|
|
41
|
+
type: {
|
|
42
|
+
name: string;
|
|
43
|
+
required: boolean;
|
|
44
|
+
};
|
|
45
|
+
description: string;
|
|
46
|
+
table: {
|
|
47
|
+
defaultValue: {
|
|
48
|
+
summary: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
control: string;
|
|
52
|
+
defaultValue: boolean;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
storyName: string;
|
|
56
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { CheckboxProps } from './checkbox';
|
|
4
|
+
export interface CheckboxGroupProps extends DefaultProps {
|
|
5
|
+
/**
|
|
6
|
+
* The id of the checkbox group.
|
|
7
|
+
*/
|
|
8
|
+
id?: CheckboxProps['id'];
|
|
9
|
+
/**
|
|
10
|
+
* The name of the checkbox group. This prop is passed to each checbox
|
|
11
|
+
*/
|
|
12
|
+
name?: CheckboxProps['name'];
|
|
13
|
+
/**
|
|
14
|
+
* The content of the checkbox group. Must be the `Checkbox` component
|
|
15
|
+
*/
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* The initial value of the checkbox group
|
|
19
|
+
*/
|
|
20
|
+
defaultValue?: Array<CheckboxProps['value']>;
|
|
21
|
+
/**
|
|
22
|
+
* The value of the checkbox group
|
|
23
|
+
*/
|
|
24
|
+
value?: Array<CheckboxProps['value']>;
|
|
25
|
+
/**
|
|
26
|
+
* The callback fired when any children Checkbox is checked or unchecked
|
|
27
|
+
*/
|
|
28
|
+
onChange?: (value: Array<CheckboxProps['value']>) => void;
|
|
29
|
+
/**
|
|
30
|
+
* If `true`, the checkboxes will aligned horizontally.
|
|
31
|
+
*/
|
|
32
|
+
inline?: boolean;
|
|
33
|
+
size?: CheckboxProps['size'];
|
|
34
|
+
color?: CheckboxProps['color'];
|
|
35
|
+
}
|
|
36
|
+
export declare const CheckboxGroup: React.ForwardRefExoticComponent<CheckboxGroupProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
interface ICheckboxProps<T = HTMLInputElement> extends DefaultProps {
|
|
4
|
+
disabled?: React.InputHTMLAttributes<T>['disabled'];
|
|
5
|
+
invalid?: boolean;
|
|
6
|
+
required?: React.InputHTMLAttributes<T>['required'];
|
|
7
|
+
readOnly?: React.InputHTMLAttributes<T>['readOnly'];
|
|
8
|
+
indeterminate?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* If `true`, the checkbox will be initially checked.
|
|
11
|
+
*/
|
|
12
|
+
defaultChecked?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* If `true`, the checkbox will be checked.
|
|
15
|
+
* You'll need to pass `onChange` to update it's value (since it's now controlled)
|
|
16
|
+
*/
|
|
17
|
+
checked?: boolean;
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
value?: string | number;
|
|
21
|
+
color?: string;
|
|
22
|
+
size?: 'sm' | 'md' | 'lg';
|
|
23
|
+
/**
|
|
24
|
+
* A11y: A label that describes the input
|
|
25
|
+
*/
|
|
26
|
+
'aria-label'?: string;
|
|
27
|
+
/**
|
|
28
|
+
* A11y: The id of the element that describes the input
|
|
29
|
+
*/
|
|
30
|
+
'aria-describedby'?: string;
|
|
31
|
+
/**
|
|
32
|
+
* A11y: Refers to the id of the element that labels the checkbox element.
|
|
33
|
+
*/
|
|
34
|
+
'aria-labelledby'?: string;
|
|
35
|
+
/**
|
|
36
|
+
* The children is the label to be displayed to the right of the checkbox.
|
|
37
|
+
*/
|
|
38
|
+
children?: React.ReactNode;
|
|
39
|
+
/**
|
|
40
|
+
* The callback invoked when the checked state of the `Checkbox` changes..
|
|
41
|
+
*/
|
|
42
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
43
|
+
}
|
|
44
|
+
export declare type CheckboxProps = ICheckboxProps & React.HTMLAttributes<HTMLInputElement>;
|
|
45
|
+
export declare const Checkbox: React.ForwardRefExoticComponent<ICheckboxProps<HTMLInputElement> & React.HTMLAttributes<HTMLInputElement> & React.RefAttributes<HTMLInputElement>>;
|
|
46
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CheckboxProps } from './checkbox';
|
|
3
|
+
import { CheckboxGroup, CheckboxGroupProps } from './checkbox-group';
|
|
4
|
+
interface Checkbox extends React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>> {
|
|
5
|
+
Group: typeof CheckboxGroup;
|
|
6
|
+
}
|
|
7
|
+
declare const Checkbox: Checkbox;
|
|
8
|
+
export type { CheckboxProps, CheckboxGroupProps };
|
|
9
|
+
export { Checkbox, CheckboxGroup };
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Checkbox, CheckboxProps } from '../src';
|
|
3
|
+
declare const _default: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: Checkbox;
|
|
6
|
+
parameters: {
|
|
7
|
+
controls: {
|
|
8
|
+
hideNoControlsWarning: boolean;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
};
|
|
12
|
+
export default _default;
|
|
13
|
+
export declare const Template: {
|
|
14
|
+
(args: CheckboxProps): JSX.Element;
|
|
15
|
+
argTypes: {
|
|
16
|
+
required: {
|
|
17
|
+
type: {
|
|
18
|
+
name: string;
|
|
19
|
+
required: boolean;
|
|
20
|
+
};
|
|
21
|
+
description: string;
|
|
22
|
+
table: {
|
|
23
|
+
defaultValue: {
|
|
24
|
+
summary: string;
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
control: string;
|
|
28
|
+
defaultValue: boolean;
|
|
29
|
+
};
|
|
30
|
+
invalid: {
|
|
31
|
+
type: {
|
|
32
|
+
name: string;
|
|
33
|
+
required: boolean;
|
|
34
|
+
};
|
|
35
|
+
description: string;
|
|
36
|
+
table: {
|
|
37
|
+
defaultValue: {
|
|
38
|
+
summary: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
control: string;
|
|
42
|
+
defaultValue: boolean;
|
|
43
|
+
};
|
|
44
|
+
disabled: {
|
|
45
|
+
type: {
|
|
46
|
+
name: string;
|
|
47
|
+
required: boolean;
|
|
48
|
+
};
|
|
49
|
+
description: string;
|
|
50
|
+
table: {
|
|
51
|
+
defaultValue: {
|
|
52
|
+
summary: string;
|
|
53
|
+
};
|
|
54
|
+
};
|
|
55
|
+
control: string;
|
|
56
|
+
defaultValue: boolean;
|
|
57
|
+
};
|
|
58
|
+
indeterminate: {
|
|
59
|
+
type: {
|
|
60
|
+
name: string;
|
|
61
|
+
required: boolean;
|
|
62
|
+
};
|
|
63
|
+
description: string;
|
|
64
|
+
table: {
|
|
65
|
+
defaultValue: {
|
|
66
|
+
summary: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
control: string;
|
|
70
|
+
defaultValue: boolean;
|
|
71
|
+
};
|
|
72
|
+
defaultChecked: {
|
|
73
|
+
type: {
|
|
74
|
+
name: string;
|
|
75
|
+
required: boolean;
|
|
76
|
+
};
|
|
77
|
+
description: string;
|
|
78
|
+
table: {
|
|
79
|
+
defaultValue: {
|
|
80
|
+
summary: string;
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
control: string;
|
|
84
|
+
defaultValue: boolean;
|
|
85
|
+
};
|
|
86
|
+
size: {
|
|
87
|
+
type: {
|
|
88
|
+
name: string;
|
|
89
|
+
required: boolean;
|
|
90
|
+
};
|
|
91
|
+
description: string;
|
|
92
|
+
table: {
|
|
93
|
+
defaultValue: {
|
|
94
|
+
summary: string;
|
|
95
|
+
};
|
|
96
|
+
};
|
|
97
|
+
options: string[];
|
|
98
|
+
control: string;
|
|
99
|
+
defaultValue: string;
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
storyName: string;
|
|
103
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './src';
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { DefaultProps } from '@sk-web-gui/theme';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { CookieSetOptions } from 'universal-cookie';
|
|
4
|
+
export declare const defaultCookieConsentName = "SKCookieConsent";
|
|
5
|
+
export interface ConsentCookie {
|
|
6
|
+
optional: boolean;
|
|
7
|
+
displayName: string;
|
|
8
|
+
description: string;
|
|
9
|
+
cookieName: string;
|
|
10
|
+
}
|
|
11
|
+
export interface CheckableConsentCookie extends ConsentCookie {
|
|
12
|
+
isChecked: boolean;
|
|
13
|
+
}
|
|
14
|
+
export declare enum ConsentType {
|
|
15
|
+
Necessary = "Necessary",
|
|
16
|
+
All = "All",
|
|
17
|
+
Custom = "Custom"
|
|
18
|
+
}
|
|
19
|
+
export declare function getConsent(): string[];
|
|
20
|
+
export declare function resetConsent(): void;
|
|
21
|
+
export declare function getCheckableCookies(cookies: ConsentCookie[]): CheckableConsentCookie[];
|
|
22
|
+
interface CookieConsentProps extends DefaultProps {
|
|
23
|
+
isOpen?: boolean;
|
|
24
|
+
onConsent: (cookies: ConsentCookie[]) => void;
|
|
25
|
+
closeable?: boolean;
|
|
26
|
+
onDecline?: () => void;
|
|
27
|
+
cookies: ConsentCookie[];
|
|
28
|
+
title: string;
|
|
29
|
+
body: React.ReactElement;
|
|
30
|
+
resetConsentOnInit: boolean;
|
|
31
|
+
options?: CookieSetOptions;
|
|
32
|
+
}
|
|
33
|
+
export declare function CookieConsent({ title, body, onConsent, cookies, onDecline, closeable, resetConsentOnInit, options, }: CookieConsentProps): JSX.Element;
|
|
34
|
+
export declare namespace CookieConsent {
|
|
35
|
+
var displayName: string;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './cookie-consent';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useCookieConsentClass: (args?: any) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|