A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t\t
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
6 |
7 |
8 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
9 |
10 |
11 |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
12 |
13 |
14 |
15 |
16 |
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
17 |
18 |
19 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
20 |
21 |
22 |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
23 |
24 |
25 |
26 |
27 |
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
28 |
29 |
30 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
31 |
32 |
33 |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
34 |
35 |
36 |
37 |
38 |
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
39 |
40 |
41 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
42 |
43 |
44 |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
45 |
46 |
47 |
48 |
49 |
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
50 |
51 |
52 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
53 |
54 |
55 |
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
9 |
10 |
11 |
12 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
13 |
14 |
15 | ```
16 | ## Slots
17 | An `accordion` is a [panel](../concepts/panel.md) container, so panels are described in the main slot.
18 | ## Properties
19 | - `defaultIcon: string` The icon of the items. Defaulted to `'dropdown'`
20 | ### Forwarded to classes
21 | - `styled: boolean` Here defaulted to `true`!
22 | ### Forwarded to semantic configuration
23 | - `exclusive`: boolean
24 | - `on`: string
25 | - `animateChildren`: boolean
26 | - `closeNested`: boolean
27 | - `collapsible`: boolean
28 | - `duration`: number
29 | ### Model
30 | The model type depends on the `exclusive` configuration
31 | #### Exclusive = `true`/`undefined`
32 | By default, accordions are exclusive (one panel shown at a time). In this case, the model is the `{string}` name of the displayed panel or null for none.
33 | #### Exclusive = `false`
34 | In case of multi-opened accordions, the model can be a list or a hash, depending of what value is provided. Anything provided here won't be replaced but modified internally.
35 | ##### Array
36 | If an array is provided, that array is a `string[]` providing the name of the opened panels.
37 | ##### Hash
38 | If a `{[panelName: string]: boolean}` hash is provided, it will indicate with `true` or `false` whether a panel is opened by name. Note, as an input, tru-ish and fals-ish values are accepted.
39 | ## Events
40 | These events happen without arguments. Also, the events about closing only happen when a panel is explicitely closed, not when another one is exclusively opened
41 | - `opening`
42 | - `open`
43 | - `closing`
44 | - `close`
45 | - `change`
--------------------------------------------------------------------------------
/docs/components/breadcrumbs.md:
--------------------------------------------------------------------------------
1 | # [Bread-crumbs](https://semantic-ui.com/collections/breadcrumb.html)
2 | Regular breadcrumb semantic-ui control
3 |
4 | ## Functionment
5 | These breadcrumbs are supposed to work with `vue-router`. They are provided with an array of crumbs and display them.
6 |
7 | A `Crumb` is a vue-router `Location` that has a `text` property. The location can provide a `name` for a named route, or a `fullPath` or whatever helps retrieve the route.
8 |
9 | ## Properties
10 | The main property is of course `crumbs`: an array of `Crumbs`, namely, a route specification with a text.
11 |
12 | With it comes the property `separator` - this is an icon class (defaulted to `'right angle'` that somewhat makes a ">") to include between the crumbs.
--------------------------------------------------------------------------------
/docs/components/button.md:
--------------------------------------------------------------------------------
1 | # [Button](https://semantic-ui.com/elements/button.html)
2 | ## Examples
3 | ```html
4 |
5 |
6 | button-l
7 |
8 |
9 | button-i
10 |
11 |
12 |
13 | button-r
14 |
15 |
16 |
17 |
18 |
19 | ```
20 | ## Slots
21 | Buttons have two slots (`prepend` and `append`) where an `icon` can be used.
22 |
23 | ## Properties
24 | - `icon`: Specifying an icon here is a shortcut to introducing in the button ``
25 | - `native-type`: `
5 | ```
6 | ## Slots
7 | The content is reported in the checkbox' label.
8 |
9 | ## Properties
10 | - `label`: Text to display beside the checkbox
11 | ### Forwarded as classes
12 | - `disabled: Boolean`
13 | - `readOnly: Boolean`
14 | - `toggle: Boolean`
15 | - `slider: Boolean`
16 | ## Events
17 | - `enable`
18 | - `disable`
19 | - `input(value: boolean)`
20 | - `checked`
21 | - `unchecked`
22 | - `indeterminate`
23 | These are cancelable events :
24 | - `before-checked`
25 | - `before-indeterminate`
26 | - `before-determinate`
27 | - `before-unchecked`
28 |
--------------------------------------------------------------------------------
/docs/components/dimm.md:
--------------------------------------------------------------------------------
1 | # [Dimming](https://semantic-ui.com/modules/dimmer.html)
2 |
3 | The customizable dimmers come in two components and loading that can just bind a text comes as a directive.
4 |
5 | The two components are really similar, one is `dimmable` and surrounds the part to dimm down. The second is `dimmer` and is inside the `
` or other to dimm down. There are few nuances for ease and shortcuts.
6 | ## Usages
7 | ```html
8 |
27 |
28 |
29 | ```
30 | ## Commonly to `dimmer` and `dimmable`
31 | ### Properties
32 | The model is `visible: boolean` (event: `change`) specifying whether the dimmer is active or not.
33 | #### Forwarded from the element classes
34 | - `variation: 'simple'|'inverted'|''`
35 | #### Forwarded from the configuration
36 | - `on: string`
37 | - `duration: {show: number, hide:number}`
38 | - `transition: string`
39 | ### Events
40 | - `show`
41 | - `hide`
42 | - `change(visible: boolean)`
43 | ## Specificity of `dimmer`
44 | The property `page: boolean` allows the `dimmer` not to dimm its container but the whole page.
45 |
46 | Note that a dimmer dimms the *element* it is in, not the *component*.
47 | ## Specificity of `dimmable`
48 | The `dimmable`' dimmer content can be given in the `dimmer` slot. There is a predefined slot who displays these two properties:
49 | - `icon: string`
50 | - `text: string`
51 |
52 | Also, this property:
53 | - `blurring: boolean`
54 |
55 | Last but not least, the `dimmer` slot of a dimmable is already surrounded by `div.content div.center`, so it is less configurable but shorter as a shortcut.
56 |
57 | # [loading](https://semantic-ui.com/elements/loader.html)
58 |
59 | The directive `v-loading` allows to dimm an element and display a loading icon with a text on it.
60 |
61 | ## Usage
62 | ```html
63 |
64 | ```
65 | `loadingValue` is of course a component' data.
66 | This data can take a falsy value to hide the loading-dimmer (for regular state) or be shown
67 | - If it is a `string`, this will be the message displayed
68 | - If it is `true`, only the icon will be displayed
69 |
70 | Some easy way to manage a boolean and use a string are:
71 | ```html
72 | Load ?
73 |
74 | ...
75 | ```
76 | ```html
77 | Load ?
78 |
79 | ...
80 | ```
81 | ### Modifiers
82 | - `blurring`
83 | - `indeterminate`
84 | - `inverted`
85 | - Size specification : `mini`, `tiny`, `small`, `medium`, `large`
86 |
87 | # dimm-parts
88 |
89 | The directive `v-dimm-parts` allow some parts of the element to be dimmed when the mouse is out of the element.
90 | ```html
91 |
92 |
93 |
94 | ```
95 | Use a dimming-identifier if the element might contain other dimm-parts. All the sub-elements with the attribute `dimmed-part` (or `dimmed-part="identifier"` if `v-dimm-parts:identifier` has been used) will be dimmed when the mouse is out of the `dimm-part` element.
96 |
97 | Modifiers:
98 | - `inverted` to have inverted dimmers
--------------------------------------------------------------------------------
/docs/components/flag.md:
--------------------------------------------------------------------------------
1 | # [Flag](https://semantic-ui.com/elements/flag.html)
2 |
3 | ## Properties
4 | - `country`: Specifies the country's flag to show. As indicated on Semantic documentation : "two digit country code, the full name, or a common alias"
--------------------------------------------------------------------------------
/docs/components/form.md:
--------------------------------------------------------------------------------
1 | # [Form](https://semantic-ui.com/collections/form.html)
2 |
3 | Note: Forms can use the principle of [`data-molds`](./data-mold.md)
4 |
5 | Forms use a bit of semantic for shaping and much internal management. For example, the validation occurs through [json-schema](http://json-schema.org/) validation. and the error display is completely customizable.
6 |
7 | There is a whole [concept](../concepts/form.md) to read about it to understand the API docs. There is much more complexity than what expressed here but here is the standard usage - that can be redundant but fast to grab without learning slope.
8 | ## Internal management
9 |
10 | As `form` is [commanded](../concepts/commanded.md). Its commands will just be emitted as events (the `params` beeing the only argument).
11 |
12 | ### Fields
13 | Forms come with their component `field` that automatise a big deal of model/field management. For instance, each field can specify a `prepend` and `append` slots. If a field has no `append` (or `prepend`) slot,
14 | - the `append` slot will display the label of the field.
15 | - the `prepend` slot will display the errors of the field.
16 |
17 | The default slot just gives the input part of the field (so that the user can override the input keeping the label and error management) but one can override the whole providing a `field` slot.
18 |
19 | All these slots can be scope-less or can be provided using a scope containing only `scope.model` that will be the *form*' model. This can be useful when the form' model is complex and can raise errors while computing.
20 | ```html
21 |
22 |
23 |
24 |
25 | ```
26 | This won't be displayed and raise no error, and is far shorter than :
27 | ```html
28 |
29 | ```
30 |
31 | As noticed here, when scoped, the `input` slot is used instead of the default one.
32 |
33 | ## Slots
34 |
35 | - The default slot is the one displayed. It can receive a scope that specifies `model` - this is useful as, when no model is selected, the slot will not be shown : so there is no need to test the model before each usage
36 | - The `empty` slot is displayed when no model is available
37 |
38 | ## Properties
39 | - `model: any`
40 | - `schema: any` should be a valid json-schema.
--------------------------------------------------------------------------------
/docs/components/icon.md:
--------------------------------------------------------------------------------
1 | # [Icon](https://semantic-ui.com/elements/icon.html#/definition)
2 |
3 | The component contains no logic by itself but is taken into consideration when used within another component.
4 |
5 | ## Properties
6 | - `icon: string`: Specifies the icon name. Refer [here](https://semantic-ui.com/elements/icon.html#/icon) for the list of names.
7 |
8 | ## Icon compositions
9 | The `icon` string can contain the `'+'` character to denote an icon composition. The classes appearing after a '+' will be additional icons. Any class appearing before any '+' is a group class.
10 |
11 | Using `icon="+loading sun +user"` will generate :
12 | ```html
13 |
14 |
15 |
16 |
17 | ```
18 |
19 | Using `icon="huge +loading sun +user"` will generate :
20 | ```html
21 |
22 |
23 |
24 |
25 | ```
--------------------------------------------------------------------------------
/docs/components/input.md:
--------------------------------------------------------------------------------
1 | # [Input](https://semantic-ui.com/elements/input.html)
2 |
3 | ## Slots
4 | Inputs have two slots (`prepend` and `append`) where an `icon`, a `button` or something with the class `label` can be used.
5 |
6 | The `input` slot can also be given to replace the `` used by default.
7 |
8 | ## Properties
9 | The `v-model` is the value and raises the `input` event on change.
10 | - `placeholder: string`
11 | - `name` is the native input name (if none is given, one will be generated)
12 | - `type` is the native type attribute and defaults to `"text"`
13 | ### Forwarded as semantic class
14 | - `loading: boolean`
15 | - `disabled: boolean`
16 | - `error: boolean`
17 | - `transparent: boolean`
18 | - `fluid: boolean`
--------------------------------------------------------------------------------
/docs/components/modal.md:
--------------------------------------------------------------------------------
1 | # [Modal](https://semantic-ui.com/modules/modal.html)
2 |
3 | ## Usage
4 | ### The modal
5 | Use the `v-model` to get the modal' invoker.
6 | - the invoker needs to have a unique name in the data
7 | - the invoker doesn't need to be previously declared in the data
8 | ```html
9 |
10 | ...
11 |
12 | ```
13 | ### Outside of the modal
14 | The invoker can be used outside of the modal to open it.
15 | ```html
16 | Open!
17 | ```
18 | The invoker can be called with a function as argument or no argument and will return a promise.
19 | ### Inside of the modal
20 | Inside of the modal, a code just has to call the invoker with a string argument that will be the "return value" of the modal.
21 | ```html
22 | Send!
23 | ```
24 | As `modal` is [commanded](../concepts/commanded.md), the directive `command` can be used as a shortcut to the simple case `@click="xxxModal(command)` is :
25 | ```html
26 | Send!
27 | ```
28 | ### Programatically
29 | Invoking the modal will return a promise that will fail if the given command is `'cancel'` and succeed for other values giving the command as a value
30 |
31 | The specified call-back function will be called only in case of promise resolution (when the command is not `'cancel'`)
32 | ## Slots
33 | A `header` slot can be given. If not, a `header` property can be given.
34 |
35 | ## Properties
36 | - `header: string` to display if no `header` slot is given
37 | ### Programmatic classes:
38 | - `inverted: boolean`
39 | - `blurring: boolean`
40 | - `detachable: boolean`
41 | - `autofocus: boolean`
42 | - `observeChanges: boolean`
43 | - `allowMultiple: boolean`
44 | - `keyboardShortcuts: boolean`
45 | - `offset: number`
46 | - `closable: boolean`
47 | - //TODO: dimmerSettings?
48 | - `transition: string`
49 | - `duration: number`
50 | - `queue: boolean`
51 | ### Content classes :
52 | - `scrolling`
53 | - `image`
54 | ## Events
55 | - `visible`
56 | - `hidden`
57 | - `set-callback`: sets the v-model
--------------------------------------------------------------------------------
/docs/components/progress.md:
--------------------------------------------------------------------------------
1 | # [Progress](https://semantic-ui.com/modules/progress.html)
2 |
3 |
4 | ## Exemple
5 | ```html
6 |
7 | ```
8 | ## Slots
9 | The default slot can specify the label (text under).
10 | The property `label` can be used instead.
11 | The priority is given to the status texts.
12 |
13 | ## Properties
14 | The `v-model` is the status and raises the `status` event on change.
15 | - `status: 'active'|'warning'|'success'|'error'`
16 | Also,
17 | - `label: string` can specify the label (if no slot is given and no status text specified)
18 | - `ratio: boolean` is used to display the ratio (value/total) instead of the percentage
19 |
20 | ### Forwarded to classes
21 | - `active`
22 | - `bottom-attached`
23 | - `disabled`
24 | - `indicating`
25 | - `inverted`
26 | - `top-attached`
27 | ### Forwarded to semantic configuration
28 | - `autoSuccess: boolean`
29 | - `showActivity: boolean`
30 | - `precision: number`
31 | ### Non-reactive
32 | Texts can be defined statically: the value has to be set at object construction and any modification later will have no effect,
33 | the initial value will remain used.
34 | These texts can use four templated strings: percent, value, total, left.
35 |
36 | Exemple: `active-text="Uloading {value} on {total} files"`
37 |
38 | A text can be defined for the label per status
39 | - `active-text`
40 | - `error-text`
41 | - `success-text`
42 | - `warning-text`
43 | The last one specifies the text inside the progress bar (and is still templated)
44 | - `progress-text`
45 | This is forwarded to the `percent` and `ratio` text of `semantic`. Also, the default ration text is `{v}/{t}` instead of `{v} of {t}`
46 |
47 | ## Events
48 | These events happen without arguments. Also, the events about closing only happen when a panel is explicitely closed, not when another one is exclusively opened
49 | - `opening`
50 | - `open`
51 | - `closing`
52 | - `close`
53 | - `change`
--------------------------------------------------------------------------------
/docs/components/select.md:
--------------------------------------------------------------------------------
1 | # [Select](https://semantic-ui.com/modules/dropdown.html)
2 | (alias: `dropdown`)
3 | ## Slots
4 | ### default
5 | The default slot is the menu. It can be filled with `` that are basically short-cuts for `
` with these two proprieties:
6 | - `value`
7 | - `text`
8 |
9 | Note: One can give a different text and html content to the option by giving the attribute and a content. When semantic-ui refers to text, it refers to the attribute content.
10 |
11 | ### bar
12 | The bar is the closed combo-box. If not given, it will default to
13 | ```html
14 |
{{placeholder}}
15 | {{text}}
16 |
17 | ```
18 | ## Properties
19 | The `v-model` is the selected value and raises the `select` event on change.
20 |
21 | If no `bar` named-slot is given, it will display:
22 | - `icon` (default: 'dropdown')
23 | - `text` (also modified by code and user)
24 | - `placeholder`
25 |
26 | These properties forward directly to the jQuery initialisation :
27 | - `on`: string
28 | - `forceSelection`: boolean
29 | - `allowCategorySelection`: boolean
30 | - `direction`: 'auto'|'upward'|'downward'
31 | - `keepOnScreen`: boolean
32 | - `fullTextSearch`: boolean|'exact'
33 | - `showOnFocus`: boolean
34 | - `allowTab`: boolean
35 | - `transition`: 'auto'|'slide down'|'slide up'
36 | - `duration`: number
37 | - `minCharacters`: number
38 | - `match`: 'both'|'text'|'value'
39 | - `preserveHTML`: boolean
40 | - `action`: 'activate'|'select'|'combo'|'nothing'|'hide'|'command'
41 | In the case of `command`, it will raise the `command` event and take no other action on selection.
42 | ## Events
43 | - `change(value)` is raised when the value changed
44 | - `command(value)` is raised when a value is clicked and `action` is `command`
45 | - `add(value, text, element)` when an element is added
46 | - `remove(value, text, element)` when an element is removed
47 | - `noResult(searchValue)` when a research returns an empty result
48 | ## Methods
49 | - `hide(): void` - can cancel the operation by throwing `"cancel"`
50 | - `show(): void` - can cancel the operation by throwing `"cancel"`
51 | - `visible(): boolean`
52 | - `clear(): void`
53 |
54 | ## TODO-s
55 | The multiple selection is still untested
--------------------------------------------------------------------------------
/docs/components/table.md:
--------------------------------------------------------------------------------
1 | # [Table](https://semantic-ui.com/collections/table.html)
2 | Note: Forms can use the principle of [`data-molds`](./data-mold.md)
3 | ## Slots
4 | The default slot contains the columns to display.
5 | `header` and `footer` are table-wide headers and footers
6 | ## Proprieties
7 | The `v-model` is the current row : the one the user clicked on. One can set it to another row with an affectation or bind to it. (note: the current row is an item from the provided `rows`)
8 |
9 | Vue's magic is that : if `v-model` is not used, no row will be marked current. If you care about the current row, it will be marked as such. For ui consistency, it is advised to use the attribute `selectable` on the row that basically just shows `:hover` and add a dynamic side.
10 | - `rows: any[]` is the list of items to display (models)
11 | - `row-class: (row: any)=> string` Gather the classes that apply to `row`
12 | - `id-property: string` allows the table to retrieve the id of a row
13 | - `body-height: number` specifies the height of the body in pixel. *Once specified* a lot of things happen (in the css) - this is meant to allow a scroll-bar under the column headers - some css/js skill is still needed for the 2-pixel difference between columns.
14 | - `row-height: number` forces the rows to have the same height. Once `body-height` *and* `row-height` are used, the library will create the tr elements *only* for the visible rows. Therefore, a massive amount of rows can be given without the risk to update all the tousands of elements on each changes
15 |
16 | ## Events
17 |
18 | # Columns
19 | ## Slots
20 | Each column has two slots : `header` and beside a default, `display` and `input` scoped slot whose scope contains:
21 | - `model` is the object mapped to this row (from `table.rows`)
22 | - `index` is the numeric index of the row
23 | - `field` that gives all informations like the value and the schema
24 | If a default slot is specified, it is used all the time. If not, the `display` will be used until an `input` is specified *and* the row is in edit mode. The default slot also has a boolean `edition` in its scope.
25 | ```html
26 |
27 | My property A
28 | {{scope.model.myPropA}}
29 |
30 |
31 | My property B
32 | {{field.value}}
33 |
34 | ```
35 |
36 | ## Proprieties
37 | - `prop` gives the property of the row this column displays. For now, it is just given to retrieve the value when no cell template is provided.
38 | - `header` gives the text in the header if no template is provided
39 | - `edit` specifies that the `input` is used instead of the `display` to edit the value
40 | ## Events
41 |
42 | ## Custom columns
43 | In a custom column type, (a component that just contains a column), the injection `table` is available and refers to the table the column is in.
44 |
45 | A custom column must contain only a `ripper` and provide two slots (an unscoped `header` and a scoped `default`). It should also use the `managedColumn` mixin from the `Table`
46 |
47 | ```typescript
48 | import {Ripper} from 'vue-ripper'
49 | import {Table} from 'v-semantic'
50 | @Component({
51 | components: {Ripper},
52 | mixins: [Table.managedColumn]
53 | })
54 | ```
55 |
56 | ### CheckboxColumn
57 |
58 | The checkbox-column can be used for boolean values as well as for selection. There is no "multi-select" in the table, it is achieved by placing a checkbox-column at the begining.
59 |
60 | If no header is specified (the same way than with regular columns), a "check-all" checkbox is placed in the header
61 | #### Slots
62 | The `header` slot allows to describe a complex header. It has in its scope:
63 | - `allSelected` a boolean value bound to the select-all situation (`true`/`false`/`null`)
64 | - `setSelection` is a callback that takes one argument (boolean/array) and behaves exactly like setting the `selection` does
65 |
66 | The default slot allows to replace the checkbox by another component. If used its scope is the following:
67 | - `row` is the row the cell applies to
68 | - `checked` is bound to the boolean value (checked or not) for this cell
69 | - `select`, `unselect` and `toggle` are three callbacks that take the row as an argument to (de)select the row.
70 | #### Properties
71 |
72 | - `header` can be specified if a `header` slot is not given
73 |
74 | - `selection` is the model (emitting the event `selection-change`) and can be watched deeply : if the parent doesn't change it, it will remain the same `Array` that will be modified.
75 |
76 | The parent can also set the `selection` to a non-array value. In this case, the model will be immediately updated to the effective array of selection.
77 | - If set to a falsy value, the selection will become "none" `[]`
78 | - If set to `true` or to the array `table.rows`, the selection will become "all"
79 |
--------------------------------------------------------------------------------
/docs/components/tabs.md:
--------------------------------------------------------------------------------
1 | # [Tabs](https://semantic-ui.com/modules/tab.htmlhttps://semantic-ui.com/modules/tab.html)
2 |
3 | ## Exemple
4 | ```html
5 |
6 |
7 |
A dog is a type of domesticated animal. Known for its loyalty and faithfulness, it can be found as a welcome guest in many households across the world.
8 |
9 |
10 |
11 |
There are many breeds of dogs. Each breed varies in size and temperament. Owners often select a breed of dog that they find to be compatible with their own lifestyle and desires from a companion.
12 |
13 |
14 | ```
15 | ## Slots
16 | An `tabs` is a [panel](../concepts/panel.md) container, so panels are described in the main slot.
17 |
18 | ## Properties
19 | - `defaultIcon: string` The icon of the items. Defaulted to `''`
20 | - `attached: boolean` Defaulted to `true`, manage the `xxx atached` classes
21 | - `position: 'top'|'bottom'|'left'|'right'` The *tabs*' position in regard to the content
22 | ### Forwarded to classes
23 | - `type: 'tabular'|'pointing'|''` Here defaulted to `'tabular'`!
24 | - `primary`
25 | - `secondary`
26 |
27 | ### Model
28 | The `{string}` model is the name of the selected tab.
29 |
30 | ## Future
31 | There is no plan to implement the ajax tabs.
--------------------------------------------------------------------------------
/docs/concepts/commanded.md:
--------------------------------------------------------------------------------
1 | # Commanded
2 |
3 | ## Exemple
4 | ```typescript
5 | import Command from 'v-semantic'
6 |
7 | @Component
8 | class MyComponent extends Command.Commanded {
9 |
10 | command(command: string, params?: any) {
11 | //...
12 | }
13 | ...
14 | ```
15 | ```html
16 |
17 | ...
18 |
19 | ```
20 | ## In english
21 | A `Commanded` component just allows components placed inside to use the `v-command` directive to invoke its `command` method.
22 |
23 | ## Usages
24 | ### Conter-indications
25 | This directive can only apply on **components** emitting the `click` event.
26 | So, this will **not** work:
27 | ```html
28 |
29 | ```
30 | Though, this could be done.
31 | ### Agnosticity
32 | Beside the "cuteness" of `` instead of ``, this is useful when the control describing the button doesn't know what `doSomething` is.
33 |
34 | Example : A pannel of buttons with save/reset/export/... to have at the end of each form. The panel can be described in a custom control, then used in each form it is needed into, their button will just specify `v-command:save` etc., then the form in which the panel is included will receive that command.
35 |
36 | ## Value
37 | The command value is given as the parameter. If the value is a function, it will be called before the command is effected.
38 |
39 | If the return value is `false`, the command will **not** be executed. If it is `undefined` or `true`, the command will be executed without parameter.
40 | For any other value, the command will be executed with the return value a parameter.
41 |
42 | ```html
43 |
44 |
45 | ```
46 |
47 | ```ts
48 | {
49 | validateOk() {
50 | return !!this.myValue && this.myValue;
51 | }
52 | }
53 | ```
--------------------------------------------------------------------------------
/docs/concepts/data-mold.md:
--------------------------------------------------------------------------------
1 | # Data mold
2 |
3 | Let's imagine that an application deals several times with some specific numbers (card, id, serial, ...) and wish to enhance their edition - using a specific mask in each ``, or even displaying (the string `"123-45678-9"` instead of the value `"123456789"`) or allow at each edition a drop-down (with flags for country-code for instance).
4 |
5 | This would be a `"MySpecificSomethingNumber"` that has to be edited and showed each time the same. Should it be in a form or in a table for instance. (Note that all the following can apply for any even complex data that should fit in a table-column or be edited by one field in forms)
6 |
7 | It is desirable therefore to write once for all the `data-mold` for that `"MySpecificSomethingNumber"` that will specify how to render it, how to edit it, if it needs something in its form label, etc.
8 |
9 | A `data-mold` can even be written as a user-component, as it just needs to be included in a `modeled` (ie. `Form` or `Table`) to be available for usage.
10 |
11 | An example has been given in the `demo/3clr` folder - and is used in the `Form` and `Table` examples.
12 |
13 | ## The slots of a data-mold
14 | First of all, each slot is optionally given. If a slot is not given, it will fall back to the more general mold until the default hard-coded value of `v-semantic`
15 | All these slot scopes are `field` who has a `value`, a `model`, etc.
16 | ### Generic ones
17 | #### input
18 | This one gives an input, something the user can interract with. The value to read and write is `field.value` from the slot scope.
19 | #### display
20 | This one just displays the value without letting the user interract.
21 | ### Form-specific
22 | #### append / prepend
23 | They appear around the input/display.
24 | Usually, `prepend` contains the label and `append` the error description.
25 | #### field
26 | If specified, it is used instead of any `input`/`display` ones
27 | #### field-input / field-display
28 | Used instead of `input`/`display` in a field if specified
29 | ### Table-specific
30 | #### cell
31 | If specified, it is used instead of any `input`/`display` ones
32 | #### cell-input / cell-display
33 | Used instead of `input`/`display` in a cell if specified
--------------------------------------------------------------------------------
/docs/concepts/form.md:
--------------------------------------------------------------------------------
1 | # Forms
2 |
3 | Note: this is a specific use case of [`data-molds`](./data-mold.md)
4 |
5 | Forms are much more developped than `semantic` did. Indeed, there is no intelligence behind semantic's form beside validation.
6 | These can simply be used "manually".
7 | ```html
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 | ```
25 |
26 | The purpose of the development on `forms` is to *make repetitive things unnecessary while letting the possibility to detail any specific case*. This might lead to some complications in appearance as it gives the programer several ways to reach the same sometimes; but once well understood, choices can be made clearly.
27 |
28 | ## The simplest : `field`
29 | ### Inside the `field`
30 | Taking the example above, it could be rewritten like this:
31 | ```html
32 |
33 |
34 |
35 |
36 |
37 | ```
38 | #### `field` input slot
39 | This was possible because all the fields needed an ``. Now, let's imagine a check-box input :
40 |
41 | ```html
42 |
43 | ...
44 |
45 |
46 |
47 |
48 | ```
49 | Also, the slot beeing scoped, the input could be re-written like this to avoid repeating `optIn` (even if not very useful here):
50 | ```html
51 |
52 | ```
53 |
54 | ### Field-modifying form slot
55 | Labels and errors are displayed in the field object, in so-called `prepend` and `append` slots. The last example was equivalent to this:
56 | ```html
57 |
58 |
59 |
62 |
63 |
64 |
65 | ```
66 |
67 | Now, let's imagine we wish to use a `fancy-label`for each input, we could do this :
68 |
69 | ```html
70 |
71 |
72 |
73 |
74 | {{field.label}}
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 | ```
86 |
87 | First of all, **all** the fields will be affected by the template here given **except** if they have a specific `prepend` slot.
88 |
89 | In general, the scoped slot of the form is the static slot of the field. This works for `prepend`, `append`, `input` and `field` that override the whole, even prepend, append and input.
90 |
91 | The scope is always the `field: VueComponent` object. It gives the programmer acces to valuable information like
92 | - `label`
93 | - `labelStyle`
94 | - `property` that is the given name
95 | - `name` that is the given name or a generated name if needed
96 | - `value` that is watched and is up-to-date, so that can be used as a `v-model`
97 |
98 | - and also `info`, that is a property of field that is unused by `v-semantic` and just forwarded here - that can be useful to set an icon if the template uses an icon for instance.
99 |
--------------------------------------------------------------------------------
/docs/concepts/panel.md:
--------------------------------------------------------------------------------
1 | # Panel (this library concept)
2 | A panel is basically a content and a title that is supposed to be ripped apart. It is used for exemple in [accordion](./accordion.md) and [tabs](./tabs.md).
3 |
4 | A panel has no reason to be outside of a panel container (it will show an injection error even), this is a sub-component of other components
5 |
6 | ## Slot
7 | The main slot is the content of the panel. A `title` slot can be provided too.
8 |
9 | ## Properties
10 | If no title slot is provided, these two properties are used:
11 | - `title: string`
12 | - `icon: string` If not specified, the container provides a default icon (`'dropdown'` for `accordion` and `''` for `tabs`)
--------------------------------------------------------------------------------
/docs/globals/scrollbar.md:
--------------------------------------------------------------------------------
1 | # Scrollbars
2 | ## `Vue.prototype`
3 | Each `Vue` component has the `$scrollBarSize` property that contains 2 numbers: `{width: w, height: h}` that correspond to the width and height of respectively vertical and horizontal scrollbars.
4 | ## CSS
5 | Also, some CSS classes are made available globally:
6 | - `width100lessSB` and `height100lessSB` that will give `calc( 100% - **px )` to fit the whole parent' width/height like if a scrollbar was shown.
7 | - `paddingSBright` and `paddingSBbottom` define a `padding-right` (resp. `padding-bottom`) in pixels of the scrollbar size
8 |
9 | ## TODO
10 | It could be made reactive for when the user changes the zoom/resolution/...
--------------------------------------------------------------------------------
/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "v-semantic",
3 | "version": "2.0.3",
4 | "description": "Semantic-ui2 + vue2",
5 | "main": "dist/v-semantic.js",
6 | "ts:main": "src/index.ts",
7 | "sideEffects": false,
8 | "typescript": {
9 | "definition": "dist/v-semantic.d.ts"
10 | },
11 | "directories": {
12 | "example": "demo",
13 | "doc": "docs",
14 | "lib": "dist"
15 | },
16 | "scripts": {
17 | "start": "webpack --watch",
18 | "demo": "webpack --watch --config demo/webpack.config.js",
19 | "prepack": "webpack",
20 | "lint": "eslint src"
21 | },
22 | "keywords": [
23 | "semantic",
24 | "semantic-ui",
25 | "vue"
26 | ],
27 | "repository": "github:eddow/v-semantic.git",
28 | "author": "fmdm",
29 | "license": "ISC",
30 | "bugs": {
31 | "url": "https://github.com/eddow/v-semantic/issues"
32 | },
33 | "config": {
34 | "semantic": {
35 | "install": true,
36 | "src": "./node_modules/semantic-ui/src/",
37 | "config": "./src/less/semantic/theme.config"
38 | }
39 | },
40 | "homepage": "https://github.com/eddow/v-semantic#readme",
41 | "devDependencies": {
42 | "@types/jquery": "^3.3.22",
43 | "@types/semantic-ui": "^2.2.6",
44 | "babel-core": "^6.26.3",
45 | "babel-eslint": "^8.2.6",
46 | "css-loader": "^1.0.1",
47 | "eslint": "^4.19.1",
48 | "eslint-config-standard": "^11.0.0",
49 | "eslint-plugin-import": "^2.14.0",
50 | "eslint-plugin-node": "^6.0.1",
51 | "eslint-plugin-promise": "^3.8.0",
52 | "eslint-plugin-standard": "^3.1.0",
53 | "eslint-plugin-vue": "^4.7.1",
54 | "expose-loader": "^0.7.5",
55 | "file-loader": "^2.0.0",
56 | "fuse-box": "^3.6.0",
57 | "raw-loader": "^0.5.1",
58 | "semantic-ui": "^2.4.2",
59 | "source-map-loader": "^0.2.4",
60 | "style-loader": "^0.23.1",
61 | "ts-json-schema-decorator": "^1.2.4",
62 | "ts-loader": "^5.3.0",
63 | "typescript": "^3.1.6",
64 | "vue": "^2.6.10",
65 | "vue-codemirror": "^4.0.6",
66 | "vue-hot-reload-api": "^2.2.0",
67 | "vue-loader": "^15.4.2",
68 | "vue-property-decorator": "^6.1.0",
69 | "vue-router": "^3.0.1",
70 | "vue-template-compiler": "^2.6.10",
71 | "vue-template-es2015-compiler": "^1.6.0",
72 | "webpack": "^4.25.1",
73 | "webpack-cli": "^3.1.2",
74 | "webpack-dts-bundle": "0.0.2",
75 | "webpack-node-externals": "^1.7.2"
76 | },
77 | "dependencies": {
78 | "ajv": "^6.5.5",
79 | "js-object-ext": "^1.0.5",
80 | "node-sass": "^4.5.3",
81 | "tslib": "^1.9.3",
82 | "vue-resize-directive": "^1.1.4",
83 | "vue-ripper": "^1.1.9"
84 | },
85 | "peerDependencies": {
86 | "jquery": "^3.3.1",
87 | "semantic-ui": "^2.4",
88 | "vue": "^2.6.0"
89 | }
90 | }
91 |
--------------------------------------------------------------------------------
/semantic.json:
--------------------------------------------------------------------------------
1 | {
2 | "base": "semantic\\",
3 | "paths": {
4 | "source": {
5 | "config": "src/theme.config",
6 | "definitions": "src/definitions/",
7 | "site": "src/site/",
8 | "themes": "src/themes/"
9 | },
10 | "output": {
11 | "packaged": "dist/",
12 | "uncompressed": "dist/components/",
13 | "compressed": "dist/components/",
14 | "themes": "dist/themes/"
15 | },
16 | "clean": "dist/"
17 | },
18 | "permission": false,
19 | "autoInstall": false,
20 | "rtl": false,
21 | "version": "2.4.2"
22 | }
--------------------------------------------------------------------------------
/src/components.ts:
--------------------------------------------------------------------------------
1 |
2 | import Flag from './components/flag.vue'
3 | import Button from './components/button.vue'
4 | import Icon from './components/icon.vue'
5 | import Input from './components/input.vue'
6 | import Modal from './components/modal.vue'
7 | import Checkbox from './components/checkbox.vue'
8 | import Progress from './components/progress.vue'
9 | import Breadcrumbs from './components/breadcrumbs.vue'
10 |
11 | import Form from './components/form/index.vue'
12 | import Field from './components/form/field.vue'
13 | import {DataMold, FieldInput} from './components/data/holders'
14 |
15 | import Sidebar from './components/sidebar.vue'
16 |
17 | import Select from './components/select/index.vue'
18 | import Option from './components/select/option.vue'
19 |
20 | import Table from './components/table/index.vue'
21 | import Column from './components/table/column.vue'
22 | import CheckboxColumn from './components/table/checkbox-column.vue'
23 | import RowEditColumn from './components/table/row-edit-column.vue'
24 |
25 | import Accordion from './components/accordion.vue'
26 | import Tabs from './components/tabs.vue'
27 | import Panel from './components/panel.vue'
28 |
29 | import Dimmer from './components/dimmer.vue'
30 | import Dimmable from './components/dimmable.vue'
31 |
32 | var Dropdown = Select;
33 | export {
34 | Flag, Button, Icon, Input, Modal, Checkbox, Progress, Breadcrumbs,
35 | Form, Field, FieldInput, DataMold,
36 | Sidebar, Select, Option, Dropdown,
37 | Table, Column, CheckboxColumn, RowEditColumn,
38 | Accordion, Tabs, Panel,
39 | Dimmer, Dimmable
40 | }
41 |
--------------------------------------------------------------------------------
/src/components/accordion.vue:
--------------------------------------------------------------------------------
1 |
2 |