superdesk-ui-framework 2.4.14 → 2.4.15
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/app/index.js +1 -0
- package/app/scripts/modals.js +23 -9
- package/app/styles/_buttons.scss +17 -0
- package/app/styles/_modals.scss +23 -17
- package/app/styles/_tooltips.scss +66 -0
- package/app/styles/app.scss +1 -0
- package/app/styles/components/_sd-toaster.scss +6 -5
- package/app/styles/form-elements/_inputs.scss +1 -0
- package/app/styles/form-elements/_select-grid.scss +77 -0
- package/app/styles/pr-superdesk-theme.scss +3 -1
- package/app/styles/primereact/_pr-menu.scss +38 -0
- package/app/styles/primereact/_pr-skeleton.scss +35 -0
- package/app/styles/variables/_colors.scss +30 -18
- package/app-typescript/components/Button.tsx +2 -2
- package/app-typescript/components/DropdownFirst.tsx +2 -2
- package/app-typescript/components/IconPicker.tsx +277 -0
- package/app-typescript/components/ListItemLoader.tsx +30 -0
- package/app-typescript/components/Menu.tsx +149 -0
- package/app-typescript/components/PropsList.tsx +2 -2
- package/app-typescript/components/Radio.tsx +19 -10
- package/app-typescript/components/SelectGrid.tsx +233 -0
- package/app-typescript/components/SelectWithTemplate.tsx +0 -2
- package/app-typescript/components/Skeleton.tsx +48 -0
- package/app-typescript/components/Toast.tsx +31 -5
- package/app-typescript/components/ToastMessage.tsx +9 -16
- package/app-typescript/components/ToastText.tsx +2 -4
- package/app-typescript/components/ToastWrapper.tsx +4 -4
- package/app-typescript/components/Togglebox.tsx +108 -0
- package/app-typescript/components/Tooltip.tsx +25 -1
- package/app-typescript/index.ts +8 -0
- package/dist/components/modals.html +180 -4
- package/dist/examples.bundle.css +52 -36
- package/dist/examples.bundle.js +5527 -2989
- package/dist/react/Alerts.tsx +4 -4
- package/dist/react/Autocomplete.tsx +17 -17
- package/dist/react/Badges.tsx +4 -4
- package/dist/react/BigIconFont.tsx +3 -3
- package/dist/react/ButtonGroups.tsx +6 -6
- package/dist/react/Buttons.tsx +11 -11
- package/dist/react/Carousel.tsx +15 -15
- package/dist/react/Checkboxs.tsx +10 -10
- package/dist/react/DatePicker.tsx +6 -6
- package/dist/react/Dropdowns.tsx +15 -15
- package/dist/react/EmptyStates.tsx +4 -4
- package/dist/react/GridItem.tsx +8 -8
- package/dist/react/GridList.tsx +3 -3
- package/dist/react/IconButtons.tsx +3 -3
- package/dist/react/IconFont.tsx +10 -9
- package/dist/react/IconLabels.tsx +4 -4
- package/dist/react/IconPicker.tsx +65 -0
- package/dist/react/Index.tsx +27 -2
- package/dist/react/Inputs.tsx +9 -9
- package/dist/react/Labels.tsx +6 -6
- package/dist/react/LeftNavigations.tsx +6 -6
- package/dist/react/ListItems.tsx +34 -0
- package/dist/react/Menu.tsx +159 -0
- package/dist/react/Modal.tsx +9 -9
- package/dist/react/NavButtons.tsx +7 -7
- package/dist/react/Popover.tsx +5 -5
- package/dist/react/Radios.tsx +29 -29
- package/dist/react/SelectGrid.tsx +121 -0
- package/dist/react/Selects.tsx +8 -8
- package/dist/react/Switch.tsx +5 -5
- package/dist/react/Tabs.tsx +12 -12
- package/dist/react/TimePicker.tsx +4 -4
- package/dist/react/Toasts.tsx +44 -56
- package/dist/react/Togglebox.tsx +51 -0
- package/dist/react/Tooltips.tsx +48 -4
- package/dist/superdesk-ui.bundle.css +3771 -94
- package/dist/superdesk-ui.bundle.js +4468 -2037
- package/dist/vendor.bundle.js +53380 -53380
- package/examples/pages/components/modals.html +180 -4
- package/examples/pages/react/Alerts.tsx +4 -4
- package/examples/pages/react/Autocomplete.tsx +17 -17
- package/examples/pages/react/Badges.tsx +4 -4
- package/examples/pages/react/BigIconFont.tsx +3 -3
- package/examples/pages/react/ButtonGroups.tsx +6 -6
- package/examples/pages/react/Buttons.tsx +11 -11
- package/examples/pages/react/Carousel.tsx +15 -15
- package/examples/pages/react/Checkboxs.tsx +10 -10
- package/examples/pages/react/DatePicker.tsx +6 -6
- package/examples/pages/react/Dropdowns.tsx +15 -15
- package/examples/pages/react/EmptyStates.tsx +4 -4
- package/examples/pages/react/GridItem.tsx +8 -8
- package/examples/pages/react/GridList.tsx +3 -3
- package/examples/pages/react/IconButtons.tsx +3 -3
- package/examples/pages/react/IconFont.tsx +10 -9
- package/examples/pages/react/IconLabels.tsx +4 -4
- package/examples/pages/react/IconPicker.tsx +65 -0
- package/examples/pages/react/Index.tsx +27 -2
- package/examples/pages/react/Inputs.tsx +9 -9
- package/examples/pages/react/Labels.tsx +6 -6
- package/examples/pages/react/LeftNavigations.tsx +6 -6
- package/examples/pages/react/ListItems.tsx +34 -0
- package/examples/pages/react/Menu.tsx +159 -0
- package/examples/pages/react/Modal.tsx +9 -9
- package/examples/pages/react/NavButtons.tsx +7 -7
- package/examples/pages/react/Popover.tsx +5 -5
- package/examples/pages/react/Radios.tsx +29 -29
- package/examples/pages/react/SelectGrid.tsx +121 -0
- package/examples/pages/react/Selects.tsx +8 -8
- package/examples/pages/react/Switch.tsx +5 -5
- package/examples/pages/react/Tabs.tsx +12 -12
- package/examples/pages/react/TimePicker.tsx +4 -4
- package/examples/pages/react/Toasts.tsx +44 -56
- package/examples/pages/react/Togglebox.tsx +51 -0
- package/examples/pages/react/Tooltips.tsx +48 -4
- package/package.json +2 -2
- package/patches/@superdesk+primereact+5.0.2-4.patch +13 -0
- package/react/components/Button.d.ts +1 -1
- package/react/components/Button.js +2 -1
- package/react/components/DropdownFirst.js +1 -1
- package/react/components/IconPicker.d.ts +24 -0
- package/react/components/IconPicker.js +283 -0
- package/react/components/ListItemLoader.d.ts +4 -0
- package/react/components/ListItemLoader.js +62 -0
- package/react/components/Menu.d.ts +59 -0
- package/react/components/Menu.js +92 -0
- package/react/components/PropsList.d.ts +1 -1
- package/react/components/PropsList.js +1 -1
- package/react/components/Radio.d.ts +8 -7
- package/react/components/Radio.js +1 -1
- package/react/components/SelectGrid.d.ts +45 -0
- package/react/components/SelectGrid.js +179 -0
- package/react/components/SelectWithTemplate.js +0 -1
- package/react/components/Skeleton.d.ts +30 -0
- package/react/components/Skeleton.js +55 -0
- package/react/components/Toast.d.ts +15 -0
- package/react/components/Toast.js +69 -0
- package/react/components/ToastMessage.d.ts +18 -0
- package/react/components/ToastMessage.js +66 -0
- package/react/components/ToastText.d.ts +9 -0
- package/react/components/ToastText.js +42 -0
- package/react/components/ToastWrapper.d.ts +31 -0
- package/react/components/ToastWrapper.js +116 -0
- package/react/components/Togglebox.d.ts +27 -0
- package/react/components/Togglebox.js +76 -0
- package/react/components/Tooltip.d.ts +2 -5
- package/react/components/Tooltip.js +48 -7
- package/react/index.d.ts +7 -0
- package/react/index.js +14 -0
package/dist/react/Alerts.tsx
CHANGED
@@ -87,10 +87,10 @@ export default class AlertDoc extends React.Component {
|
|
87
87
|
|
88
88
|
<h3 className="docs-page__h3">Props</h3>
|
89
89
|
<PropsList>
|
90
|
-
<Prop name='type'
|
91
|
-
<Prop name='style'
|
92
|
-
<Prop name='size'
|
93
|
-
<Prop name='restoreIcon'
|
90
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight | sd-green' default='default' description='Default + semantic colour variations (e.g. primary, success etc.)'/>
|
91
|
+
<Prop name='style' isRequired={false} type='filled | hollow' default='filled' description='Alerts may be one of styles such as hollow alerts, alerts without background (text-only) or default filled.'/>
|
92
|
+
<Prop name='size' isRequired={false} type='normal | small' default='normal' description='Specifies a small or normal alert.'/>
|
93
|
+
<Prop name='restoreIcon' isRequired={false} type='info | help' default='info' description=''/>
|
94
94
|
</PropsList>
|
95
95
|
</section>
|
96
96
|
)
|
@@ -294,29 +294,29 @@ export default class AutocompleteDoc extends React.Component<{}, IState> {
|
|
294
294
|
|
295
295
|
<h3 className='docs-page__h3'>Props</h3>
|
296
296
|
<PropsList>
|
297
|
-
<Prop name='items'
|
298
|
-
<Prop name='value'
|
299
|
-
<Prop name='keyValue'
|
300
|
-
<Prop name='minLength'
|
301
|
-
<Prop name='listItemTemplate'
|
302
|
-
<Prop name='label'
|
303
|
-
<Prop name='info'
|
304
|
-
<Prop name='error'
|
305
|
-
<Prop name='placeholder'
|
306
|
-
<Prop name='isSearchField'
|
297
|
+
<Prop name='items' isRequired={true} type='array' default='/' description='Array of values for autocomplete' />
|
298
|
+
<Prop name='value' isRequired={false} type='any' default='/' description='Value to be predefined on component load' />
|
299
|
+
<Prop name='keyValue' isRequired={false} type='string' default='/' description='Key value if array is combined of objects' />
|
300
|
+
<Prop name='minLength' isRequired={false} type='number' default='1' description='Minimum number of characters to initiate a search' />
|
301
|
+
<Prop name='listItemTemplate' isRequired={false} type='function' default='/' description='Create custom view of list item' />
|
302
|
+
<Prop name='label' isRequired={false} type='string' default='/' description='Input label' />
|
303
|
+
<Prop name='info' isRequired={false} type='string' default='/' description='Hint text' />
|
304
|
+
<Prop name='error' isRequired={false} type='string' default='/' description='Error text' />
|
305
|
+
<Prop name='placeholder' isRequired={false} type='string' default='/' description='Placeholder text for the input field.' />
|
306
|
+
<Prop name='isSearchField' isRequired={false} type='boolean' default='false'
|
307
307
|
description='Styles the input as a search field, adds a search icon and the option to clear the field. No visible
|
308
308
|
lable is present in this option.' />
|
309
|
-
<Prop name='inlineLabel'
|
310
|
-
<Prop name='required'
|
311
|
-
<Prop name='disabled'
|
312
|
-
<Prop name='invalid'
|
309
|
+
<Prop name='inlineLabel' isRequired={false} type='boolean' default='false' description='Position labels as inline' />
|
310
|
+
<Prop name='required' isRequired={false} type='boolean' default='false' description='Mark field as required' />
|
311
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='Mark field as disabled' />
|
312
|
+
<Prop name='invalid' isRequired={false} type='boolean' default='false' description='Mark field as invalid' />
|
313
313
|
</PropsList>
|
314
314
|
|
315
315
|
<h3 className='docs-page__h3'>Events</h3>
|
316
316
|
<PropsList>
|
317
|
-
<Prop name='search'
|
318
|
-
<Prop name='onChange'
|
319
|
-
<Prop name='onSelect'
|
317
|
+
<Prop name='search' isRequired={false} type='function' default='/' description='Custom function for filtering items' />
|
318
|
+
<Prop name='onChange' isRequired={true} type='function' default='/' description='Returns value of text input' />
|
319
|
+
<Prop name='onSelect' isRequired={false} type='function' default='/' description='Returns selected value' />
|
320
320
|
</PropsList>
|
321
321
|
</section>
|
322
322
|
)
|
package/dist/react/Badges.tsx
CHANGED
@@ -148,10 +148,10 @@ export default class BadgeDoc extends React.Component {
|
|
148
148
|
|
149
149
|
<h3 className="docs-page__h3">Props</h3>
|
150
150
|
<PropsList>
|
151
|
-
<Prop name='text'
|
152
|
-
<Prop name='type'
|
153
|
-
<Prop name='color'
|
154
|
-
<Prop name='shape'
|
151
|
+
<Prop name='text' isRequired={false} type='string' default='/' description='Badge text value.' />
|
152
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight | sd-green' default='default' description='Default + semantic colour variations (e.g. primary, success etc.)' />
|
153
|
+
<Prop name='color' isRequired={false} type='string' default='/' description='Extended color palette from the framework (e.g. red--500); NOTE: The badge can have either a Type or Color defined, not both at the same time.' />
|
154
|
+
<Prop name='shape' isRequired={false} type='round | square' default='round' description='Make shape of badge square or default round.' />
|
155
155
|
</PropsList>
|
156
156
|
</section>
|
157
157
|
)
|
@@ -27,9 +27,9 @@ export default class BigIconFontDoc extends React.PureComponent{
|
|
27
27
|
|
28
28
|
<h3 className="docs-page__h3">Props</h3>
|
29
29
|
<PropsList>
|
30
|
-
<Prop name='name'
|
31
|
-
<Prop name='type'
|
32
|
-
<Prop name='size'
|
30
|
+
<Prop name='name' isRequired={false} type='string' default='/' description='Icon name value.' />
|
31
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight | sd-green' default='default' description='Default + semantic colour variations (e.g. primary, success etc.)' />
|
32
|
+
<Prop name='size' isRequired={false} type='small | big' default='small' description='Specifies a small or big size of Icon.' />
|
33
33
|
</PropsList>
|
34
34
|
</section>);
|
35
35
|
}
|
@@ -142,10 +142,10 @@ export default class ButtonGroupsDoc extends React.Component {
|
|
142
142
|
|
143
143
|
<h3 className="docs-page__h3">Props</h3>
|
144
144
|
<PropsList>
|
145
|
-
<Prop name='orientation'
|
146
|
-
<Prop name='spaces'
|
147
|
-
<Prop name='align'
|
148
|
-
<Prop name='padded'
|
145
|
+
<Prop name='orientation' isRequired={false} type='horizontal | vertical' default='horizontal' description='Specifies orientation for child components of ButtonGroup'/>
|
146
|
+
<Prop name='spaces' isRequired={false} type='comfort | compact' default='comfort' description='Space between buttons: comfort (default) or compact.'/>
|
147
|
+
<Prop name='align' isRequired={false} type='left | right | center | inline' default='left' description='Alignment in relation to the parent element. Inline value renders the ButtonGroup without pushing surrounding elements.'/>
|
148
|
+
<Prop name='padded' isRequired={false} type='boolean' default='false' description='Adds predefined space to the side based on alignment and orientation.'/>
|
149
149
|
</PropsList>
|
150
150
|
|
151
151
|
|
@@ -284,8 +284,8 @@ export default class ButtonGroupsDoc extends React.Component {
|
|
284
284
|
|
285
285
|
<h3 className="docs-page__h3">Props</h3>
|
286
286
|
<PropsList>
|
287
|
-
<Prop name='size'
|
288
|
-
<Prop name='border'
|
287
|
+
<Prop name='size' isRequired={false} type='mini | small | medium | large' default='small' description='Specifies the size of the divider (spacing between buttons).'/>
|
288
|
+
<Prop name='border' isRequired={false} type='boolean' default='false' description='Adds a dotted border in the middle of the divider.'/>
|
289
289
|
</PropsList>
|
290
290
|
|
291
291
|
|
package/dist/react/Buttons.tsx
CHANGED
@@ -433,17 +433,17 @@ export default class ButtonsDoc extends React.Component {
|
|
433
433
|
|
434
434
|
<h3 className="docs-page__h3">Props</h3>
|
435
435
|
<PropsList>
|
436
|
-
<Prop name='text'
|
437
|
-
<Prop name='iconOnly'
|
438
|
-
<Prop name='expand'
|
439
|
-
<Prop name='style'
|
440
|
-
<Prop name='shape'
|
441
|
-
<Prop name='type'
|
442
|
-
<Prop name='theme'
|
443
|
-
<Prop name='size'
|
444
|
-
<Prop name='icon'
|
445
|
-
<Prop name='disabled'
|
446
|
-
<Prop name='onClick'
|
436
|
+
<Prop name='text' isRequired={true} type='string' default='/' description='Text value of the Button. In the case of iconOnly buttons the value will be set to the aria-label.'/>
|
437
|
+
<Prop name='iconOnly' isRequired={false} type='boolean' default='false' description='This prop is used for Buttons with icons only. It set to true, it will visually hide the text and use the value for the aria-label.'/>
|
438
|
+
<Prop name='expand' isRequired={false} type='boolean' default='false' description='Spans the full width of the Button parent.'/>
|
439
|
+
<Prop name='style' isRequired={false} type='filled | hollow | text-only' default='filled' description='Buttons may be one of styles such as hollow buttons, buttons without background (text-only) or filled (default).'/>
|
440
|
+
<Prop name='shape' isRequired={false} type='square | round' default='square' description='Make shape of button round or default square.'/>
|
441
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight | sd-green' default='default' description='Default + semantic colour variations (e.g. primary, success etc.).'/>
|
442
|
+
<Prop name='theme' isRequired={false} type='light | dark' default='light' description='Styles button for diffrent background.'/>
|
443
|
+
<Prop name='size' isRequired={false} type='small | normal | large' default='normal' description='Specifies a small, normal or large button.'/>
|
444
|
+
<Prop name='icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
|
445
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='Disables the Button, preventing mouse events.'/>
|
446
|
+
<Prop name='onClick' isRequired={true} type='function' default='false' description='Callback fired when a button is pressed.'/>
|
447
447
|
</PropsList>
|
448
448
|
</section>
|
449
449
|
)
|
package/dist/react/Carousel.tsx
CHANGED
@@ -127,21 +127,21 @@ const images = ${JSON.stringify(images, null, 2)};
|
|
127
127
|
|
128
128
|
<h3 className="docs-page__h3">Props</h3>
|
129
129
|
<PropsList>
|
130
|
-
<Prop name='images'
|
131
|
-
<Prop name='title'
|
132
|
-
<Prop name='description'
|
133
|
-
<Prop name='imageCount'
|
134
|
-
<Prop name='headerMeta'
|
135
|
-
<Prop name='id'
|
136
|
-
<Prop name='className'
|
137
|
-
<Prop name='theme'
|
138
|
-
<Prop name='page'
|
139
|
-
<Prop name='circular'
|
140
|
-
<Prop name='autoplayInterval'
|
141
|
-
<Prop name='numVisible'
|
142
|
-
<Prop name='numScroll'
|
143
|
-
<Prop name='responsiveOptions'
|
144
|
-
<Prop name='onPageChange'
|
130
|
+
<Prop name='images' isRequired={true} type='Array<{src: string; alt?: string;}' default='null' description='An array of images to display' />
|
131
|
+
<Prop name='title' isRequired={false} type='string' default='null' description='Gallery title' />
|
132
|
+
<Prop name='description' isRequired={false} type='string' default='null' description='Gallery description' />
|
133
|
+
<Prop name='imageCount' isRequired={false} type='number' default='null' description='If there are more images in gallery than what is visible you can set total count here.' />
|
134
|
+
<Prop name='headerMeta' isRequired={false} type='JSX.Element' default='null' description='Additional metadata section displayed top right if provided' />
|
135
|
+
<Prop name='id' isRequired={false} type='string' default='images.length' description='Unique identifier of the element' />
|
136
|
+
<Prop name='className' isRequired={false} type='string' default='null' description='Style class of the component' />
|
137
|
+
<Prop name='theme' isRequired={false} type='light | dark' default='light' description='Item style' />
|
138
|
+
<Prop name='page' isRequired={false} type='number' default='0' description='Index of the first item.' />
|
139
|
+
<Prop name='circular' isRequired={false} type='boolean' default='false' description='Defines if scrolling would be infinite' />
|
140
|
+
<Prop name='autoplayInterval' isRequired={false} type='number' default='0' description='Time in milliseconds to scroll items automatically' />
|
141
|
+
<Prop name='numVisible' isRequired={false} type='number' default='1' description='Number of items per page' />
|
142
|
+
<Prop name='numScroll' isRequired={false} type='number' default='1' description='Number of items to scroll' />
|
143
|
+
<Prop name='responsiveOptions' isRequired={false} type='object[]' default='null' description='An array of options for responsive design' />
|
144
|
+
<Prop name='onPageChange' isRequired={false} type='function' default='null' description='Callback to invoke after scroll' />
|
145
145
|
</PropsList>
|
146
146
|
</section>
|
147
147
|
)
|
package/dist/react/Checkboxs.tsx
CHANGED
@@ -415,19 +415,19 @@ export default class CheckboxsDoc extends React.Component<{}, IState> {
|
|
415
415
|
<h3 className="docs-page__h3">Props</h3>
|
416
416
|
<p className="docs-page__paragraph">Checkbox</p>
|
417
417
|
<PropsList>
|
418
|
-
<Prop name='checked'
|
419
|
-
<Prop name='label text'
|
420
|
-
<Prop name='label side'
|
421
|
-
<Prop name='label hidden'
|
422
|
-
<Prop name='disabled'
|
418
|
+
<Prop name='checked' isRequired={true} type='boolean' default='false' description='The checked state of the input.'/>
|
419
|
+
<Prop name='label text' isRequired={true} type='string' default='/' description='Label text value.'/>
|
420
|
+
<Prop name='label side' isRequired={false} type='left | right' default='right' description='Position of label relative to the button.'/>
|
421
|
+
<Prop name='label hidden' isRequired={false} type='boolean' default='false' description='Hides visually the label and adds an aria-label for screen-reader support.'/>
|
422
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='The disabled state of Checkbox.'/>
|
423
423
|
</PropsList>
|
424
424
|
<p className="docs-page__paragraph">Checkbox Button</p>
|
425
425
|
<PropsList>
|
426
|
-
<Prop name='checked'
|
427
|
-
<Prop name='label text'
|
428
|
-
<Prop name='label icon'
|
429
|
-
<Prop name='label hidden'
|
430
|
-
<Prop name='disabled'
|
426
|
+
<Prop name='checked' isRequired={true} type='boolean' default='/' description='The checked state of the input'/>
|
427
|
+
<Prop name='label text' isRequired={true} type='string' default='/' description='Label text value.'/>
|
428
|
+
<Prop name='label icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
|
429
|
+
<Prop name='label hidden' isRequired={false} type='boolean' default='false' description='Hides visually the label and adds an aria-label for screen-reader support.'/>
|
430
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='The disabled state of CheckboxButton'/>
|
431
431
|
</PropsList>
|
432
432
|
</section>
|
433
433
|
)
|
@@ -98,16 +98,16 @@ export default class DatePickerDoc extends React.Component {
|
|
98
98
|
|
99
99
|
<h3 className='docs-page__h3'>Props</h3>
|
100
100
|
<PropsList>
|
101
|
-
<Prop name='value'
|
102
|
-
<Prop name='disabled'
|
103
|
-
<Prop name='dateFormat'
|
104
|
-
<Prop name='shortcuts'
|
105
|
-
<Prop name='locale'
|
101
|
+
<Prop name='value' isRequired={false} type='Date' default='/' description='Item value' />
|
102
|
+
<Prop name='disabled' isRequired={false} type='boolean' default='false' description='Mark field as disabled' />
|
103
|
+
<Prop name='dateFormat' isRequired={true} type='string' default='/' description='Date format to use, i.e. "MM/DD/YYYY"' />
|
104
|
+
<Prop name='shortcuts' isRequired={false} type='string' default='/' description='Shortcuts for calendar popup, i.e. [{label: "tomorrow", days: 1}]' />
|
105
|
+
<Prop name='locale' isRequired={false} type='string' default='/' description='see: https://primefaces.org/primereact/showcase/#/calendar' />
|
106
106
|
</PropsList>
|
107
107
|
|
108
108
|
<h3 className='docs-page__h3'>Events</h3>
|
109
109
|
<PropsList>
|
110
|
-
<Prop name='onChange'
|
110
|
+
<Prop name='onChange' isRequired={true} type='function' default='/' description='Returns value of date input' />
|
111
111
|
</PropsList>
|
112
112
|
</section>
|
113
113
|
);
|
package/dist/react/Dropdowns.tsx
CHANGED
@@ -362,33 +362,33 @@ export default class DropdownDoc extends React.Component {
|
|
362
362
|
|
363
363
|
<h3 className="docs-page__h3">Props</h3>
|
364
364
|
<PropsList>
|
365
|
-
<Prop name='label'
|
366
|
-
<Prop name='align'
|
367
|
-
<Prop name='append'
|
368
|
-
<Prop name='items'
|
369
|
-
<Prop name='children'
|
365
|
+
<Prop name='label' isRequired={false} type='string' default='/' description='Text value of label.'/>
|
366
|
+
<Prop name='align' isRequired={false} type='left | right' default='left' description='Position of dropdown menu based on button'/>
|
367
|
+
<Prop name='append' isRequired={false} type='boolean' default='false' description='Append inner dropdown menu to the body'/>
|
368
|
+
<Prop name='items' isRequired={true} type='Array<menuitem | submenu | menugroup | "divider">' default='/' description='Items, divider, groups or submenu of dropdown menu'/>
|
369
|
+
<Prop name='children' isRequired={true} type='React.ReactNode' default='/' description='If children is "string" type than button have default style with arrow, also children can be custom styled buttons'/>
|
370
370
|
</PropsList>
|
371
371
|
|
372
372
|
<p className='docs-page__paragraph'>Items: Menu item</p>
|
373
373
|
<PropsList>
|
374
|
-
<Prop name='label'
|
375
|
-
<Prop name='icon'
|
376
|
-
<Prop name='onSelect'
|
374
|
+
<Prop name='label' isRequired={true} type='string' default='/' description='Text value of label.'/>
|
375
|
+
<Prop name='icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
|
376
|
+
<Prop name='onSelect' isRequired={false} type='function' default='false' description='Callback fired when a item is select.'/>
|
377
377
|
</PropsList>
|
378
378
|
|
379
379
|
<p className='docs-page__paragraph'>Items: Menu group</p>
|
380
380
|
<PropsList>
|
381
|
-
<Prop name='label'
|
382
|
-
<Prop name='type'
|
383
|
-
<Prop name='items'
|
381
|
+
<Prop name='label' isRequired={false} type='string' default='/' description='Text value of label.'/>
|
382
|
+
<Prop name='type' isRequired={true} type='group' default='group' description='/'/>
|
383
|
+
<Prop name='items' isRequired={true} type='Array<menuitem | submenu | menugroup | "divider">' default='/' description='Items, divider, groups or submenu of group in dropdown menu'/>
|
384
384
|
</PropsList>
|
385
385
|
|
386
386
|
<p className='docs-page__paragraph'>Items: Submenu</p>
|
387
387
|
<PropsList>
|
388
|
-
<Prop name='label'
|
389
|
-
<Prop name='icon'
|
390
|
-
<Prop name='type'
|
391
|
-
<Prop name='items'
|
388
|
+
<Prop name='label' isRequired={true} type='string' default='/' description='Text value of label.'/>
|
389
|
+
<Prop name='icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
|
390
|
+
<Prop name='type' isRequired={true} type='submenu' default='submenu' description='/'/>
|
391
|
+
<Prop name='items' isRequired={true} type='Array<menuitem | submenu | menugroup | "divider">' default='/' description='Items, divider, groups or submenu of submenu in dropdown menu'/>
|
392
392
|
</PropsList>
|
393
393
|
</section>
|
394
394
|
)
|
@@ -124,10 +124,10 @@ export default class EmptyStateDoc extends React.Component {
|
|
124
124
|
|
125
125
|
<h3 className="docs-page__h3">Props</h3>
|
126
126
|
<PropsList>
|
127
|
-
<Prop name='title'
|
128
|
-
<Prop name='description'
|
129
|
-
<Prop name='size'
|
130
|
-
<Prop name='illustration'
|
127
|
+
<Prop name='title' isRequired={true} type='string' default='false' description='Title of the Empty state info block.'/>
|
128
|
+
<Prop name='description' isRequired={false} type='string' default='false' description='Additional information e.g. suggested actions etc.'/>
|
129
|
+
<Prop name='size' isRequired={false} type='small | large' default='small' description='Specifies the size and type of the illustration. Small should be used for narrow areas, like side panels, while large is suited for wider content areas. '/>
|
130
|
+
<Prop name='illustration' isRequired={false} type='string' default='1' description='In combination with the size prop this defines the illustration. Possible values: 1, 2, 3 and dashboard (with size large only).'/>
|
131
131
|
</PropsList>
|
132
132
|
|
133
133
|
</section>
|
package/dist/react/GridItem.tsx
CHANGED
@@ -378,26 +378,26 @@ export default class GridItemDoc extends React.Component<{}, IState> {
|
|
378
378
|
|
379
379
|
<h3 className="docs-page__h3">GridItem Props</h3>
|
380
380
|
<PropsList>
|
381
|
-
<Prop name='status'
|
382
|
-
<Prop name='itemtype'
|
383
|
-
<Prop name='fetched'
|
384
|
-
<Prop name='locked'
|
385
|
-
<Prop name='onClick'
|
381
|
+
<Prop name='status' isRequired={false} type='actioning | selected | activated | string' default='/' description='Specifies the status of the item. Multiple values are possible.'/>
|
382
|
+
<Prop name='itemtype' isRequired={false} type='audio | composite | file | graphic | photo | slideshow | text | video | string' default='file' description='Specifies the file type of the item.'/>
|
383
|
+
<Prop name='fetched' isRequired={false} type='boolean' default='false' description='If set to true it will add a visual marker in the content area indicating that the item was fetched.'/>
|
384
|
+
<Prop name='locked' isRequired={false} type='boolean' default='false' description='Visual indication if the item is locked (red border at the bottom).'/>
|
385
|
+
<Prop name='onClick' isRequired={false} type='function' default='false' description='Callback fired when when the item is pressed. Should be added only if there is a click action on the whole item. Adds pointer cursor and hover action to the item if present.'/>
|
386
386
|
</PropsList>
|
387
387
|
|
388
388
|
<h3 className="docs-page__h3">GridItemFooterBlock Props</h3>
|
389
389
|
<PropsList>
|
390
|
-
<Prop name='align'
|
390
|
+
<Prop name='align' isRequired={false} type='left | right' default='left' description='Sets the alignment of items inside the footer. Must be placed inside the GridItemFooter component.'/>
|
391
391
|
</PropsList>
|
392
392
|
|
393
393
|
<h3 className="docs-page__h3">GridItemFooterActions Props</h3>
|
394
394
|
<PropsList>
|
395
|
-
<Prop name='autohide'
|
395
|
+
<Prop name='autohide' isRequired={false} type='boolean' default='true' description='Action buttons in the footer are by default hidden and revealed only when the cursor hovers the item. Set to false to make the action buttons always visible.'/>
|
396
396
|
</PropsList>
|
397
397
|
|
398
398
|
<h3 className="docs-page__h3">GridItemTime Props</h3>
|
399
399
|
<PropsList>
|
400
|
-
<Prop name='time'
|
400
|
+
<Prop name='time' isRequired={true} type='sring' default='/' description='Sets the value of the time component.'/>
|
401
401
|
</PropsList>
|
402
402
|
|
403
403
|
|
package/dist/react/GridList.tsx
CHANGED
@@ -95,9 +95,9 @@ export default class GridListDoc extends React.Component {
|
|
95
95
|
|
96
96
|
<h3 className="docs-page__h3">Props</h3>
|
97
97
|
<PropsList>
|
98
|
-
<Prop name='size'
|
99
|
-
<Prop name='gap'
|
100
|
-
<Prop name='margin'
|
98
|
+
<Prop name='size' isRequired={false} type='x-small | small | medium | large' default='small' description='Specifies the size of the items in the grid. '/>
|
99
|
+
<Prop name='gap' isRequired={false} type='small | medium | large | x-large' default='small' description='Defines the gap between the items inside the Grid list. '/>
|
100
|
+
<Prop name='margin' isRequired={false} type='0 | 1 | 2 | 3' default='3' description='Defines the margin around the Grid list. The values are based on multipliers of the the $sd-base-increment (equal to 8px). Setting the value to 3 results in a margin of 24px.'/>
|
101
101
|
</PropsList>
|
102
102
|
|
103
103
|
</section>
|
@@ -81,9 +81,9 @@ export default class IconButtonDoc extends React.Component {
|
|
81
81
|
|
82
82
|
<h3 className="docs-page__h3">Props</h3>
|
83
83
|
<PropsList>
|
84
|
-
<Prop name='icon'
|
85
|
-
<Prop name='ariaValue'
|
86
|
-
<Prop name='size'
|
84
|
+
<Prop name='icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
|
85
|
+
<Prop name='ariaValue' isRequired={true} type='string' default='/' description='Description for screen readers'/>
|
86
|
+
<Prop name='size' isRequired={false} type='small' default='normal' description='Creates an IconButton with a smaller footprint.'/>
|
87
87
|
</PropsList>
|
88
88
|
</section>
|
89
89
|
)
|
package/dist/react/IconFont.tsx
CHANGED
@@ -3,19 +3,20 @@ import * as Markup from "../../js/react";
|
|
3
3
|
|
4
4
|
import { Icon, Prop, PropsList } from '../../../app-typescript';
|
5
5
|
|
6
|
+
//@ts-ignore
|
6
7
|
import * as iconFont from '../../../app/styles/_icon-font.scss';
|
7
8
|
|
8
|
-
export default class IconFontDoc extends React.PureComponent{
|
9
|
-
render(){
|
9
|
+
export default class IconFontDoc extends React.PureComponent {
|
10
|
+
render() {
|
10
11
|
const array = iconFont.icon.split(', ');
|
11
12
|
const icons = array.map((icon, index) =>
|
12
13
|
<li key={index}>
|
13
|
-
<Icon name={icon}/>
|
14
|
+
<Icon name={icon} />
|
14
15
|
<span>{icon}</span>
|
15
16
|
</li>
|
16
|
-
|
17
|
-
return(
|
18
|
-
<section className="docs-page__container">
|
17
|
+
);
|
18
|
+
return (
|
19
|
+
<section className="docs-page__container">
|
19
20
|
<h2 className="docs-page__h2 docs-page__text-align--center">Icon font</h2>
|
20
21
|
<Markup.ReactMarkupCodePreview>{`
|
21
22
|
<Icon name="photo" />
|
@@ -27,9 +28,9 @@ export default class IconFontDoc extends React.PureComponent{
|
|
27
28
|
|
28
29
|
<h3 className="docs-page__h3">Props</h3>
|
29
30
|
<PropsList>
|
30
|
-
<Prop name='name'
|
31
|
-
<Prop name='type'
|
32
|
-
<Prop name='size'
|
31
|
+
<Prop name='name' isRequired={false} type='string' default='/' description='Icon name value.' />
|
32
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight | sd-green' default='default' description='Default + semantic colour variations (e.g. primary, success etc.)' />
|
33
|
+
<Prop name='size' isRequired={false} type='small | big' default='small' description='Specifies a small or big size of Icon.' />
|
33
34
|
</PropsList>
|
34
35
|
</section>);
|
35
36
|
}
|
@@ -59,10 +59,10 @@ export default class IconLabelDoc extends React.Component {
|
|
59
59
|
|
60
60
|
<h3 className="docs-page__h3">Props</h3>
|
61
61
|
<PropsList>
|
62
|
-
<Prop name='text'
|
63
|
-
<Prop name='type'
|
64
|
-
<Prop name='icon'
|
65
|
-
<Prop name='style'
|
62
|
+
<Prop name='text' isRequired={true} type='string' default='/' description='IconLabel text value.'/>
|
63
|
+
<Prop name='type' isRequired={false} type='default | primary | success | warning | alert | highlight | sd-green' default='default' description='Default + semantic colour variations (e.g. primary, success etc.).'/>
|
64
|
+
<Prop name='icon' isRequired={false} type='string' default='/' description='Icon class name without the icon- part.'/>
|
65
|
+
<Prop name='style' isRequired={false} type='basic | translucent' default='basic' description='Defines the style of the label (basic or translucent).'/>
|
66
66
|
</PropsList>
|
67
67
|
</section>
|
68
68
|
)
|
@@ -0,0 +1,65 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import * as Markup from "../../js/react";
|
3
|
+
import { IconPicker, PropsList, Prop } from "../../../app-typescript";
|
4
|
+
|
5
|
+
const IconPickerDocs = () => {
|
6
|
+
|
7
|
+
const [value, setValue] = React.useState('amp');
|
8
|
+
|
9
|
+
return (
|
10
|
+
<section className="docs-page__container">
|
11
|
+
<h2 className="docs-page__h2">Icon Picker</h2>
|
12
|
+
<Markup.ReactMarkupCodePreview>{`
|
13
|
+
<IconPicker
|
14
|
+
label="Icon"
|
15
|
+
filterPlaceholder="Search..."
|
16
|
+
translateFunction={(text: string): string => text}
|
17
|
+
value={value}
|
18
|
+
onChange={(value) => {
|
19
|
+
setValue(value);
|
20
|
+
}}
|
21
|
+
/>
|
22
|
+
`}
|
23
|
+
</Markup.ReactMarkupCodePreview>
|
24
|
+
<Markup.ReactMarkup>
|
25
|
+
<Markup.ReactMarkupPreview>
|
26
|
+
<IconPicker
|
27
|
+
label="Icon"
|
28
|
+
filterPlaceholder="Search..."
|
29
|
+
translateFunction={(text: string): string => text}
|
30
|
+
value={value}
|
31
|
+
onChange={(value) => {
|
32
|
+
setValue(value);
|
33
|
+
}}
|
34
|
+
/>
|
35
|
+
</Markup.ReactMarkupPreview>
|
36
|
+
<Markup.ReactMarkupCode>{`
|
37
|
+
|
38
|
+
const [value, setValue] = React.useState("amp");
|
39
|
+
...
|
40
|
+
<IconPicker
|
41
|
+
label="Icon"
|
42
|
+
filterPlaceholder="Search..."
|
43
|
+
translateFunction={(text: string): string => text}
|
44
|
+
value={value}
|
45
|
+
onChange={(value) => {
|
46
|
+
setValue(value);
|
47
|
+
}}
|
48
|
+
/>
|
49
|
+
`}</Markup.ReactMarkupCode>
|
50
|
+
</Markup.ReactMarkup>
|
51
|
+
|
52
|
+
<h3 className="docs-page__h3">Props</h3>
|
53
|
+
<PropsList>
|
54
|
+
<Prop name='label' isRequired={false} type='string' default='Icon' description='Select label' />
|
55
|
+
<Prop name='filterPlaceholder' isRequired={false} type='string' default='Search...' description='Filter placeholder' />
|
56
|
+
<Prop name='translateFunction' isRequired={false} type='function' default='(text) => text' description='eg: gettext' />
|
57
|
+
<Prop name='value' isRequired={true} type='string' default='null' description='Current value' />
|
58
|
+
<Prop name='onChange' isRequired={true} type='Function' default='null' description='Callback onChange event ' />
|
59
|
+
</PropsList>
|
60
|
+
|
61
|
+
</section>
|
62
|
+
)
|
63
|
+
}
|
64
|
+
|
65
|
+
export default IconPickerDocs;
|